query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
sequencelengths
3
101
negative_scores
sequencelengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
optional string residues = 3; usually be numbered sequentially.
public com.google.protobuf.ByteString getResiduesBytes() { java.lang.Object ref = residues_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); residues_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getResidues();", "public Builder setResidues(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n residues_ = value;\n onChanged();\n return this;\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\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 residues_ = s;\n }\n return s;\n }\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n residues_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\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 residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Builder setResiduesBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n residues_ = value;\n onChanged();\n return this;\n }", "private List<String> generateN3Optional() {\n\t\treturn list(\n\t\t\t\t\t\"?conceptNode <\" + VitroVocabulary.RDF_TYPE + \"> <\" + SKOSConceptType + \"> .\\n\" +\n\t\t\t\t\t\"?conceptNode <\" + label + \"> ?conceptLabel .\"\n\t \t);\n\n }", "private void assignMissingResidueIds() {\n \t\tfor (Atom atom: atomVector) {\n \t\t\tif (atom.residue_id == Integer.MIN_VALUE) {\n \t\t\t\tatom.residue_id = atom.authorResidue_id;\n \t\t\t\tatom.nonpolymer = true;\n \t\t\t}\n \t\t}\n \t}", "boolean hasResidues();", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public void setReserve3(java.lang.String reserve3) {\n this.reserve3 = reserve3;\n }", "com.google.protobuf.ByteString\n getResiduesBytes();", "@Test\n void multiConstruct() {\n var multicons = \"(define conCar_a (cons 1 2))(define conCar_b (cons 3 conCar_a))(define conCar_c (cons conCar_b 4))(define conCar_d (cons conCar_b conCar_c))\";\n Main.parseInputString(multicons);\n assertEquals(\"(3 1 . 2)\", Main.parseInputString(\"(display (car conCar_d)) \"));\n }", "String slotOfCar(String regNumber);", "public GI3( String[] textParms )\n {\n super( textParms );\n }", "private void setInstruc(int[] instruc2) \n\t{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "static int setCon(String input){\n if (input.equals(\"little\")||input.equals(\"1\")) return 1;\n if (input.equals(\"average\")||input.equals(\"2\"))return 2;\n if (input.equals(\"lot\") || input.equals(\"3\")) return 3;\n if (input.equals(\"manual\") || input.equals(\"4\")) return 4;\n throw new RuntimeException(\n \"Illigal second paramter on command line, use : <little,average,lot>\");\n }", "public Recurso(int idRecurso, String descripcionRecurso){\n this.idRecurso = idRecurso; //Recibimos el numero \n this.descripcionRecurso = descripcionRecurso; //Material que deseamos\n }", "public void setResidue(char residue)\r\n {\n if (residue == '[')\r\n this.residue = 'n';\r\n else if (residue == ']')\r\n this.residue = 'c';\r\n else\r\n this.residue = residue;\r\n\r\n if (this.residue == 'n' || this.residue == 'c')\r\n throw new IllegalArgumentException(\"N-terminal and C-terminal labels are not currently supported\");\r\n }", "public void printResiduals(double t, double resid1, double resid2);", "@Override\n\tpublic Instruction parseInstruction(InstructionSequence seq, State state) \n\t{\n\t\treturn new Iconst3();\n\t}", "static int size_of_rlc(String passed){\n\t\treturn 1;\n\t}", "public void setRsv3(String rsv3) {\r\n this.rsv3 = rsv3;\r\n }", "private void parsePlateau(String s) {\r\n String[] parsedString = s.split(\" \");\r\n plateau[0] = Integer.parseInt(parsedString[0]);\r\n plateau[1] = Integer.parseInt(parsedString[1]);\r\n }", "public boolean checkR3(String candidateSolution){\n\t\t//Split the string to a number of 9 digits\n\t\tString []candSol = candidateSolution.split(\"(?<=\\\\G.........)\");\n\t\tint candSolIndex = 0;\n\t\t\n\t\twhile(candSolIndex < 9){\n\n\t\t\tString testPart = candSol[candSolIndex];\n\t\t\t//R2 part\n\t\t\tboolean ok = checkIfDublicate(testPart);\n\t\t\tcandSolIndex++;\n\t\t\tif(ok){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn true;\t\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "public void setExtra3(String extra3) {\n this.extra3 = extra3;\n }", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public void setIDINTERNOPE1(int value) {\n this.idinternope1 = value;\n }", "void mo19167a(String str, String str2, int i, String str3, int i2);", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false, 16), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "static void initSample3(){\n // put values into the sField\n sField[3][6] = \"X\";\n sField[4][6] = \"X\";\n sField[5][6] = \"X\";\n sField[6][6] = \"X\";\n sField[7][6] = \".\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\";\n sField[1][8] = \"O\";\n }", "final String getResourceName(int resid) {\n if (am == null)\n return null;\n ResTable.resource_name name = new ResTable.resource_name(null, null, null);\n if (!am.getResources(false).getResourceName(resid, name)) {\n return null;\n }\n String str = null;\n if (name.mPackage != null) {\n str = name.mPackage;\n }\n\n if (name.mType != null) {\n if (str.length() > 0) {\n str += \":\";\n }\n str += name.mType;\n }\n\n if (name.mName != null) {\n if (str.length() > 0) {\n str += \"/\";\n }\n str += name.mName;\n }\n\n return str;\n }", "public void setRegulations(String regulations) {\n this.regulations = regulations;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private List<String> generateN3Required(VitroRequest vreq) {\n \tList<String> n3Required = list(\n \t getPrefixesString() + \"\\n\" +\n \t \"?subject ?predicate ?conceptNode .\\n\"\n \t);\n \tList<String> inversePredicate = getInversePredicate(vreq);\n\t\t//Adding inverse predicate if it exists\n\t\tif(inversePredicate.size() > 0) {\n\t\t\tn3Required.add(\"?conceptNode <\" + inversePredicate.get(0) + \"> ?subject .\");\n\t\t}\n \treturn n3Required;\n }", "public static String getResidSnippet(String resident) {\n String snippet = null;\n try {\n JSONObject jsonObject = new JSONObject(resident);\n snippet = jsonObject.getString(\"resid\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return snippet;\n }", "@Test public void testParseManyDigits3() {\n String pows10 =\n \"0.00000000000001\\n\"+\n \"1000001\\n\"+\n \"2000001\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(1e-14),\n ard(1000001L),\n ard(2000001L),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 16, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[][].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "void mo11024a(int i, int i2, String str);", "@Override\r\n\tpublic vec3 get3(String ponits) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List getListByResId(Integer resid) {\n\t\tString sql = \"select g.resid from GroupFunres g where resid = '\" + resid + \"'\";\n\t\tList list = this.queryForList(sql);\n\t\tList idList=new ArrayList();\n\t\tif (list != null && list.size() > 0) {\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tidList.add(list.get(i));\n\t\t\t}\n\t\t\treturn idList;\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic int resid() {\n\t\treturn currnet().resid();\n\t}", "private String insertarCartaNaturalResources() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 0,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 0,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 5,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n true,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n String nombre = \"\";\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "public static int[][] AssetCreater(String srt) {\n\r\n\t\tint Length = ArrLength(srt);\r\n\r\n\t\tint[][] TempArr = new int[5][Length];\r\n\r\n\t\tint Xoffset = 0;\r\n\r\n\t\t// goes through entire word and if any letter corrisponds with a letter it's\r\n\t\t// testing for\r\n\t\t// it calls a function to add the new symbol to 2d array\r\n\r\n\t\t// I considered commenting all this but I think it's pretty self explanitory\r\n\r\n\t\tfor (int k = 0; k < srt.length(); k++) {\r\n\r\n\t\t\tif (srt.charAt(k) == '0') {\r\n\t\t\t\t// if it's 0 add Zero Matrix to the matrix\r\n\t\t\t\tTempArr = AddToArr(TempArr, Zero, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '1') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, One, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '2') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Two, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '3') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Three, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '4') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Four, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '5') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Five, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '6') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Six, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '7') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Seven, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '8') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Eight, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '9') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Nine, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'a') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ALetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'b') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, BLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'c') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, CLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'd') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'e') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ELetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'f') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, FLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'g') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, GLetter, 4, Xoffset);\r\n\r\n\t\t\t\t// G is a bigger number so I just add 1 to offset\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'h') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, HLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'i') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ILetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'j') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, JLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'k') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, KLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'l') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, LLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'm') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, MLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'n') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, NLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == 'o') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, OLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'p') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, PLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'q') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, QLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'r') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, RLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 's') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, SLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 't') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, TLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'u') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ULetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'v') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, VLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'w') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, WLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\t\t\t} else if (srt.charAt(k) == 'x') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, XLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'y') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, YLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'z') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ZLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == ' ') {\r\n\t\t\t\tXoffset -= 2;\r\n\t\t\t\t// space is too big number so I just sub 2 from offset\r\n\r\n\t\t\t} else if (srt.charAt(k) == '-') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DashLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == ':') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ColonLetter, 3, Xoffset);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tXoffset += 4;\r\n\t\t}\r\n\t\treturn TempArr;\r\n\t}", "private static void initSet1(String[] set1) {\n\t\tset1[0] = \"rs36129689\";\n\t\tset1[1] = \"rs36153986\";\n\t\tset1[2] = \"rs493934\";\n\t\tset1[3] = \"rs36146958\";\n\t\tset1[4] = \"rs36197089\";\n\t\tset1[5] = \"rs35773247\";\n\t\tset1[6] = \"rs35346884\";\n\t\tset1[7] = \"rs493040\";\n\t\tset1[8] = \"rs35473000\";\n\t\tset1[9] = \"rs123456\";\n\t\tset1[10] = \"rs1234567\";\n\t\tset1[11] = \"rs12345678\";\n\t\tset1[12] = \"rs1234234\";\n\t\tset1[13] = \"rs492232\";\n\t\tset1[14] = \"rs492184\";\n\t\tset1[15] = \"rs123123\";\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setText(String text) {\n \tif (_assocModel == null) return;\n\t\tString mult;\n\t\tPattern p = Pattern.compile(\"([\\\\d]|\\\\Q*\\\\E)([.]{2}+([\\\\d]|\\\\Q*\\\\E))?\");\t// regex for multiplicities: (digit | *) + optional(.. (digit | *))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can use a Collection to handle multiplicities of *; we really only care about\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the upper bound also\n\t\tMatcher m = p.matcher(text);\n\t\t// regex didn't find anything, so we'll assign a default multiplicity\n\t\tif (!m.find() || m.group().length() < 0) {\n\t\t\tmult=\"1\";\n\t\t}\n\t\telse mult = m.group();\n\t\t_assocModel.setMultiplicity(mult);\n\t\tsuper.setText(mult);\n\t}", "public Integer getResnr() {\n\t\treturn this.resnr;\n\t}", "static void perform_xri(String passed){\n\t\tint type = type_of_xri(passed);\n\t\tif(type==1)\n\t\t\txri_with_acc(passed);\n\t}", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public String designPN(String nr)\r\n {\r\n String newStr=\"(\";\r\n if(nr.length()!=10){return null;}\r\n else\r\n {\r\n newStr=newStr+nr.substring(0,4)+\")-\";\r\n // System.out.println(\"phase 1 \"+ newStr);\r\n newStr=newStr+nr.substring(4,7)+\"-\";\r\n // System.out.println(\"phase 2 \"+ newStr);\r\n newStr=newStr+nr.substring(7,10);\r\n // System.out.println(\"phase 3 \"+ newStr);\r\n }\r\n return newStr;\r\n\r\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_7() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void readArmies(){\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n vertices.get(Integer.parseInt(armyLine[1])-1).addArmies(Integer.parseInt(armyLine[2]));\n System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n // Read countries armies for AI agents\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n allSCountries.get(Integer.parseInt(armyLine[1])).setNumberArmies(Integer.parseInt(armyLine[2]));\n // System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n NState.globalState.allCountries=allSCountries;\n }", "public static String guessResidueTypeFromFeatureLength(int seqLength,\n int featureLength) {\n float basepairsPerResidue = (Math.abs((float)featureLength/\n (float)seqLength));\n return (basepairsPerResidue > 2.0 ? SequenceI.AA : SequenceI.DNA);\n }", "void adobe_coeff( CharPtr make, CharPtr model) {\n \n adobe_coeff( make.toString(), model.toString());\n}", "private static String lllIIllIl(short IIIlIIlllllIIll, String IIIIlIlllllIIll) {\n }", "public String getRelationIdString(SpatialElement se1, String se1Role, SpatialElement se2, String se2Role, SpatialElement se3, String se3Role) {\n String idString = \"\";\n if (se1 != null && se2 != null && se3 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n se3.role = se3Role;\n idString = se1.id+\"-\"+se2.id+\"-\"+se3.id;\n }\n else if (se1 != null && se2 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n idString = se1.id+\"-\"+se2.id+\"-null\";\n }\n else if (se1 != null && se3 != null) {\n se1.role = se1Role;\n se3.role = se3Role;\n idString = se1.id+\"-null-\"+se3.id;\n }\n else if (se2 != null && se3 != null) {\n se2.role = se2Role;\n se3.role = se3Role;\n idString = \"null-\"+se2.id+\"-\"+se3.id;\n }\n return idString;\n }", "public String[] getVariants_ru(int[] randIds){\n Cursor crs;\n String[] variants_ru = new String[4];\n for(int i = 0; i< 4; i++){\n String[] args = new String[1];\n args[0] = Integer.toString(randIds[i]+1);\n crs = aniDB.getReadableDatabase().rawQuery(\"SELECT name_ru FROM titles WHERE id = ?\",args);\n if(crs.moveToFirst()) {\n variants_ru[i] = crs.getString(crs.getColumnIndex(\"name_ru\"));\n }\n crs.close();\n }\n return variants_ru;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_9() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void setSpare3(String spare3) {\r\n this.spare3 = spare3;\r\n }", "public void restricciones(String oraciones){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Restricciones semanticas\");\n alert.setHeaderText(oraciones);\n alert.showAndWait();\n }", "void mo8715r(String str, String str2, String str3);", "static int type_of_inr(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "public void setRemark3(java.lang.String _remark3)\r\n {\r\n this._remark3 = _remark3;\r\n }", "public Recipe(String[] in)\r\n {\r\n double temp;\r\n if (in.length == 3){\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2];\r\n this.w_qty = makeDecimal(in[0]);\r\n }\r\n else {if (in.length == 5) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3] + \" \" + in[4];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = Double.parseDouble(in[0])+ temp;\r\n }\r\n else if (in.length == 4) {\r\n if (in[1].contains(\"/\")) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = temp + Double.parseDouble(in[0]);}\r\n else {\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2] + \" \" + in[3];\r\n this.w_qty = makeDecimal(in[0]);}\r\n }\r\n }\r\n this.working_measure = measure;\r\n this.final_measure = measure;\r\n }", "public /* synthetic */ CinemaDescriptionItem(String str, int i2, int i3, f fVar) {\n this(str, (i3 & 2) != 0 ? 3 : i2);\n }", "private static int _addPossibleValues(int rowNumber, int y, int x, short[][] spareMatrix,String[] rowIds, SudokuModel model) {\r\n\r\n\t\tfor(short i = 0; i <9; i++){\r\n\t\t\tif(!model.restrictionIsSatisfied(y, x, i+1))\r\n\t\t\trowNumber = _addRestrictions(rowNumber,y,x,i,spareMatrix,rowIds);\r\n\t\t}\r\n\t\t\r\n\t\treturn rowNumber;\r\n\t}", "public static void loadMatric(int matr[][]) throws IOException{\n\n\t\tfor(int i=0;i<7;i++){\n\t\t\tfor(int j=0;j<6;j++){\n\t\t\t\tSystem.out.print(\"INSERISCI\"+i+j+\": \");\n\t\t\t\tSystem.out.flush();\n\t\t\t\tmatr[i][j]=System.in.read()-'0';\n\t\t\t\tSystem.in.skip(2);\n\t\t\t}}}", "public TextPropDefaultViewModel_ textWithDefaultQuantityRes(@PluralsRes int pluralRes,\n int quantity, Object... formatArgs) {\n onMutation();\n assignedAttributes_epoxyGeneratedModel.set(0);\n textWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);\n return this;\n }", "public boolean restrizione14()\r\n\t\tthrows RestrizioniSpecException\r\n\t\t{\r\n\t\tfor (int i = 0; i < this.equivalenzeInput.size(); i++)\r\n\t\t\t{\r\n\t\t\t// si preleva il nome dell'interazione di output connessa a questa componente\r\n\t\t\tAttacDecl attacDecl = this.attacsDeclInput.get(i);\r\n\t\t\tString string = attacDecl.getOutputInteraction();\r\n\t\t\t// si preleva la relativa equivalenza\r\n\t\t\tIEquivalenza equivalenza = this.equivalenzeInput.get(i);\r\n\t\t\t// si preleva l'azione corrispondente a string\r\n\t\t\tAction action = equivalenza.getActionFromName(string);\r\n\t\t\tif (action == null)\r\n\t\t\t\t{\r\n\t\t\t\tString string2 = equivalenza.getAEIdecl().getName();\r\n\t\t\t\tthrow new RestrizioniSpecException(\"The \"+string+\" action of instance \"+\r\n\t\t\t\t\t\tstring2+\" don't found\");\r\n\t\t\t\t}\r\n\t\t\tActionRate actionRate = action.getRate();\r\n\t\t\tif (!(actionRate instanceof RateInf))\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\treturn true;\r\n\t\t}", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "void playYearOfPlentyCard(String resource1, String resource2);", "public int cuantosRenglones() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas renglones quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "java.lang.String getNum1();", "static int size_of_rrc(String passed){\n\t\treturn 1;\n\t}", "public void agregarpal(String n) {\n\n switch (pos) {\n case 0:\n pal1 = n;\n case 1:\n pal2 = n;\n case 2:\n pal3 = n;\n case 3:\n pal4 = n;\n case 4:\n pal5 = n;\n break;\n }//fin switch\n\n pos++;\n }", "public void int3_m() {\n\t\t\n\t}", "public static void muestraArreglo(int[] arreglo) {\r\n\t\tfor (int i = 0; i < arreglo.length; i++) {\r\n\t\t\tescribir(\"[\" + arreglo[i] + \"]\", false);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tint first = rand.nextInt(7);\n\t\tint second = rand.nextInt(7);\n\t\tint third = rand.nextInt(7);\n\t\t\n\t\tint middle = rand.nextInt(741);\n\t\t\n\t\tint last = rand.nextInt(9999);\n\t\t\n\t\tString middleString= Integer.toString(middle);\n\t\tString lastString = Integer.toString(last); \n\t\tString firstString = Integer.toString(first);\n\t\tString secondString = Integer.toString(second);\n\t\tString thirdString = Integer.toString(third);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\twhile (middleString.length()<3) {\n\t\t\tmiddleString = \"0\" + middleString;\n\t\t\t\n\t\t}\n\t\t\n\t\twhile (lastString.length()<4){\n\t\t\tlastString = \"0\" + lastString;\n\t\t}\n\t\t\n\t\tSystem.out.println(firstString + secondString + thirdString + \"-\"+ middleString +\"-\"+ lastString);\n\t\t\n\t\t\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_8() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT, BASE), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public String getChoice3(int a){\n String choice2 = choices[a][2];\n return choice2;\n }", "@Override\n\tpublic void setStreet3(java.lang.String street3) {\n\t\t_candidate.setStreet3(street3);\n\t}", "static void initSample4(){\n // put values into the sField\n sField[5][4] = \"X\";\n sField[4][5] = \".\";\n sField[3][6] = \"X\";\n sField[2][7] = \"X\";\n sField[1][8] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\"; \n }", "private String theFunctionThatSolvesAllProblems(String input) throws IOException {\n\n first = new MyInt[9];\n second = new MyInt[9];\n third = new MyInt[9];\n myPointers = new MyIntPointer[7];\n\n M = new MyInt();\n D = new MyInt();\n C = new MyInt();\n L = new MyInt();\n X = new MyInt();\n V = new MyInt();\n I = new MyInt();\n\n hasI = false;\n hasX = false;\n hasC = false;\n hasM = false;\n hasV = false;\n hasL = false;\n hasD = false;\n\n firstLength = 0;\n secondLength = 0;\n thirdLength = 0;\n\n initializeEquation(input);\n\n return arabic();\n\n }", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public void setSecondary3(java.lang.String secondary3) {\n this.secondary3 = secondary3;\n }", "@Test\n public void execute_nricParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"nric\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"s1234567A\", \"nric\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"s1234567A\", \"nric\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"S1234567a S5234569A\", \"nric\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"S1234567a S5234569A\", \"nric\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", false, true, Collections.emptyList());\n }", "@Nullable public abstract String loadVerseText(int ari);", "public void setIDINTERNODC(int value) {\n this.idinternodc = value;\n }", "public int getImageResourceIdForExercise(Context context){\n\n TypedArray imagesArray = context.getResources().obtainTypedArray(R.array.images_array);\n int id = 0;\n\n if(musclePart == 1) {\n return imagesArray.getResourceId((exeNumber -1),0);\n }else {\n for (int i = 1; i < imagesArray.length(); i++) {\n if(i == (((musclePart - 1) * 6) + exeNumber) - 1){\n id = imagesArray.getResourceId(i,0);\n break;\n }\n }\n }\n imagesArray.recycle();\n return id;\n }", "static void lxi_to_reg_pair(String passed){\n\t\tchar fourth = passed.charAt(4);\n\t\tif(fourth=='B'){\n\t\t\tregisters.put('B', passed.substring(6,8));\n\t\t\tregisters.put('C', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='D'){\n\t\t\tregisters.put('D', passed.substring(6,8));\n\t\t\tregisters.put('E', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='H'){\n\t\t\tregisters.put('H', passed.substring(6,8));\n\t\t\tregisters.put('L', passed.substring(8));\n\t\t}\n\t}", "public void mo32111rr(int i) {\n }", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_10() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void setResearchno(String researchno) {\r\n\t\tthis.researchno = researchno;\r\n\t}", "public static void main(String[] args) {\n //The letters are randomly chosen through this block of code with use of ASCII code.\n char let1 = (char) ((int)(Math.random() * 26 + 65));\n char let2 = (char) ((int)(Math.random() * 26 + 65));\n char let3 = (char) ((int)(Math.random() * 26 + 65));\n \n //This generates a number of four digits to follow the letters. \n int num = (int)(Math.random() * 9000 + 999);\n \n //The combination is now printed to the screen through this. \n System.out.println(\"The plate number is \" + let1 + let2 +let3 + num); \n }" ]
[ "0.6329081", "0.6194227", "0.54719037", "0.5433558", "0.518184", "0.5128492", "0.49376035", "0.48442668", "0.4724605", "0.47152042", "0.46729997", "0.46720904", "0.46649334", "0.46318775", "0.45997924", "0.45697337", "0.4542916", "0.45292935", "0.4528893", "0.4520108", "0.4519737", "0.44881666", "0.44780436", "0.44735065", "0.44489574", "0.44477877", "0.444215", "0.44362456", "0.44323435", "0.44189802", "0.44128108", "0.44005463", "0.4376711", "0.43688625", "0.43648276", "0.43617478", "0.43591163", "0.43416727", "0.4335052", "0.43315908", "0.4329952", "0.43269566", "0.43071407", "0.43052205", "0.4292204", "0.4291854", "0.42805734", "0.4268324", "0.42664614", "0.42613685", "0.42600182", "0.42569944", "0.4249713", "0.42468822", "0.42467374", "0.42442796", "0.4241471", "0.42339703", "0.4233759", "0.42332256", "0.42295268", "0.42280847", "0.4224324", "0.42241433", "0.42238563", "0.42236635", "0.42236212", "0.4223061", "0.4221378", "0.42211592", "0.42188528", "0.42151642", "0.4209863", "0.42045972", "0.42030525", "0.42028436", "0.42011267", "0.41935775", "0.41925663", "0.4190933", "0.41856375", "0.4185583", "0.418238", "0.4180645", "0.4177586", "0.41763222", "0.41750142", "0.4172534", "0.4164202", "0.41633672", "0.41617814", "0.4157633", "0.41560853", "0.4150837", "0.4150766", "0.4150187", "0.41422424", "0.41411856", "0.4141147", "0.4139943" ]
0.53454846
4
optional string residues = 3; usually be numbered sequentially.
public Builder setResidues( java.lang.String value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; residues_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getResidues();", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\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 residues_ = s;\n }\n return s;\n }\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n residues_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\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 residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Builder setResiduesBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n residues_ = value;\n onChanged();\n return this;\n }", "private List<String> generateN3Optional() {\n\t\treturn list(\n\t\t\t\t\t\"?conceptNode <\" + VitroVocabulary.RDF_TYPE + \"> <\" + SKOSConceptType + \"> .\\n\" +\n\t\t\t\t\t\"?conceptNode <\" + label + \"> ?conceptLabel .\"\n\t \t);\n\n }", "private void assignMissingResidueIds() {\n \t\tfor (Atom atom: atomVector) {\n \t\t\tif (atom.residue_id == Integer.MIN_VALUE) {\n \t\t\t\tatom.residue_id = atom.authorResidue_id;\n \t\t\t\tatom.nonpolymer = true;\n \t\t\t}\n \t\t}\n \t}", "boolean hasResidues();", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public void setReserve3(java.lang.String reserve3) {\n this.reserve3 = reserve3;\n }", "com.google.protobuf.ByteString\n getResiduesBytes();", "@Test\n void multiConstruct() {\n var multicons = \"(define conCar_a (cons 1 2))(define conCar_b (cons 3 conCar_a))(define conCar_c (cons conCar_b 4))(define conCar_d (cons conCar_b conCar_c))\";\n Main.parseInputString(multicons);\n assertEquals(\"(3 1 . 2)\", Main.parseInputString(\"(display (car conCar_d)) \"));\n }", "String slotOfCar(String regNumber);", "public GI3( String[] textParms )\n {\n super( textParms );\n }", "private void setInstruc(int[] instruc2) \n\t{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "static int setCon(String input){\n if (input.equals(\"little\")||input.equals(\"1\")) return 1;\n if (input.equals(\"average\")||input.equals(\"2\"))return 2;\n if (input.equals(\"lot\") || input.equals(\"3\")) return 3;\n if (input.equals(\"manual\") || input.equals(\"4\")) return 4;\n throw new RuntimeException(\n \"Illigal second paramter on command line, use : <little,average,lot>\");\n }", "public void setResidue(char residue)\r\n {\n if (residue == '[')\r\n this.residue = 'n';\r\n else if (residue == ']')\r\n this.residue = 'c';\r\n else\r\n this.residue = residue;\r\n\r\n if (this.residue == 'n' || this.residue == 'c')\r\n throw new IllegalArgumentException(\"N-terminal and C-terminal labels are not currently supported\");\r\n }", "public Recurso(int idRecurso, String descripcionRecurso){\n this.idRecurso = idRecurso; //Recibimos el numero \n this.descripcionRecurso = descripcionRecurso; //Material que deseamos\n }", "@Override\n\tpublic Instruction parseInstruction(InstructionSequence seq, State state) \n\t{\n\t\treturn new Iconst3();\n\t}", "public void printResiduals(double t, double resid1, double resid2);", "static int size_of_rlc(String passed){\n\t\treturn 1;\n\t}", "public void setRsv3(String rsv3) {\r\n this.rsv3 = rsv3;\r\n }", "private void parsePlateau(String s) {\r\n String[] parsedString = s.split(\" \");\r\n plateau[0] = Integer.parseInt(parsedString[0]);\r\n plateau[1] = Integer.parseInt(parsedString[1]);\r\n }", "public void setExtra3(String extra3) {\n this.extra3 = extra3;\n }", "public boolean checkR3(String candidateSolution){\n\t\t//Split the string to a number of 9 digits\n\t\tString []candSol = candidateSolution.split(\"(?<=\\\\G.........)\");\n\t\tint candSolIndex = 0;\n\t\t\n\t\twhile(candSolIndex < 9){\n\n\t\t\tString testPart = candSol[candSolIndex];\n\t\t\t//R2 part\n\t\t\tboolean ok = checkIfDublicate(testPart);\n\t\t\tcandSolIndex++;\n\t\t\tif(ok){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn true;\t\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public void setIDINTERNOPE1(int value) {\n this.idinternope1 = value;\n }", "void mo19167a(String str, String str2, int i, String str3, int i2);", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false, 16), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "static void initSample3(){\n // put values into the sField\n sField[3][6] = \"X\";\n sField[4][6] = \"X\";\n sField[5][6] = \"X\";\n sField[6][6] = \"X\";\n sField[7][6] = \".\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\";\n sField[1][8] = \"O\";\n }", "final String getResourceName(int resid) {\n if (am == null)\n return null;\n ResTable.resource_name name = new ResTable.resource_name(null, null, null);\n if (!am.getResources(false).getResourceName(resid, name)) {\n return null;\n }\n String str = null;\n if (name.mPackage != null) {\n str = name.mPackage;\n }\n\n if (name.mType != null) {\n if (str.length() > 0) {\n str += \":\";\n }\n str += name.mType;\n }\n\n if (name.mName != null) {\n if (str.length() > 0) {\n str += \"/\";\n }\n str += name.mName;\n }\n\n return str;\n }", "public void setRegulations(String regulations) {\n this.regulations = regulations;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private List<String> generateN3Required(VitroRequest vreq) {\n \tList<String> n3Required = list(\n \t getPrefixesString() + \"\\n\" +\n \t \"?subject ?predicate ?conceptNode .\\n\"\n \t);\n \tList<String> inversePredicate = getInversePredicate(vreq);\n\t\t//Adding inverse predicate if it exists\n\t\tif(inversePredicate.size() > 0) {\n\t\t\tn3Required.add(\"?conceptNode <\" + inversePredicate.get(0) + \"> ?subject .\");\n\t\t}\n \treturn n3Required;\n }", "public static String getResidSnippet(String resident) {\n String snippet = null;\n try {\n JSONObject jsonObject = new JSONObject(resident);\n snippet = jsonObject.getString(\"resid\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return snippet;\n }", "@Test public void testParseManyDigits3() {\n String pows10 =\n \"0.00000000000001\\n\"+\n \"1000001\\n\"+\n \"2000001\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(1e-14),\n ard(1000001L),\n ard(2000001L),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 16, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[][].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "void mo11024a(int i, int i2, String str);", "@Override\r\n\tpublic vec3 get3(String ponits) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List getListByResId(Integer resid) {\n\t\tString sql = \"select g.resid from GroupFunres g where resid = '\" + resid + \"'\";\n\t\tList list = this.queryForList(sql);\n\t\tList idList=new ArrayList();\n\t\tif (list != null && list.size() > 0) {\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tidList.add(list.get(i));\n\t\t\t}\n\t\t\treturn idList;\n\t\t}\n\t\treturn null;\n\t}", "private String insertarCartaNaturalResources() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 0,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 0,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 5,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n true,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n String nombre = \"\";\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "@Override\n\tpublic int resid() {\n\t\treturn currnet().resid();\n\t}", "public static int[][] AssetCreater(String srt) {\n\r\n\t\tint Length = ArrLength(srt);\r\n\r\n\t\tint[][] TempArr = new int[5][Length];\r\n\r\n\t\tint Xoffset = 0;\r\n\r\n\t\t// goes through entire word and if any letter corrisponds with a letter it's\r\n\t\t// testing for\r\n\t\t// it calls a function to add the new symbol to 2d array\r\n\r\n\t\t// I considered commenting all this but I think it's pretty self explanitory\r\n\r\n\t\tfor (int k = 0; k < srt.length(); k++) {\r\n\r\n\t\t\tif (srt.charAt(k) == '0') {\r\n\t\t\t\t// if it's 0 add Zero Matrix to the matrix\r\n\t\t\t\tTempArr = AddToArr(TempArr, Zero, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '1') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, One, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '2') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Two, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '3') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Three, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '4') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Four, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '5') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Five, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '6') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Six, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '7') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Seven, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '8') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Eight, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '9') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Nine, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'a') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ALetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'b') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, BLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'c') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, CLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'd') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'e') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ELetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'f') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, FLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'g') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, GLetter, 4, Xoffset);\r\n\r\n\t\t\t\t// G is a bigger number so I just add 1 to offset\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'h') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, HLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'i') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ILetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'j') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, JLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'k') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, KLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'l') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, LLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'm') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, MLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'n') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, NLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == 'o') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, OLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'p') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, PLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'q') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, QLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'r') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, RLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 's') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, SLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 't') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, TLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'u') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ULetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'v') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, VLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'w') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, WLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\t\t\t} else if (srt.charAt(k) == 'x') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, XLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'y') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, YLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'z') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ZLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == ' ') {\r\n\t\t\t\tXoffset -= 2;\r\n\t\t\t\t// space is too big number so I just sub 2 from offset\r\n\r\n\t\t\t} else if (srt.charAt(k) == '-') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DashLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == ':') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ColonLetter, 3, Xoffset);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tXoffset += 4;\r\n\t\t}\r\n\t\treturn TempArr;\r\n\t}", "private static void initSet1(String[] set1) {\n\t\tset1[0] = \"rs36129689\";\n\t\tset1[1] = \"rs36153986\";\n\t\tset1[2] = \"rs493934\";\n\t\tset1[3] = \"rs36146958\";\n\t\tset1[4] = \"rs36197089\";\n\t\tset1[5] = \"rs35773247\";\n\t\tset1[6] = \"rs35346884\";\n\t\tset1[7] = \"rs493040\";\n\t\tset1[8] = \"rs35473000\";\n\t\tset1[9] = \"rs123456\";\n\t\tset1[10] = \"rs1234567\";\n\t\tset1[11] = \"rs12345678\";\n\t\tset1[12] = \"rs1234234\";\n\t\tset1[13] = \"rs492232\";\n\t\tset1[14] = \"rs492184\";\n\t\tset1[15] = \"rs123123\";\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setText(String text) {\n \tif (_assocModel == null) return;\n\t\tString mult;\n\t\tPattern p = Pattern.compile(\"([\\\\d]|\\\\Q*\\\\E)([.]{2}+([\\\\d]|\\\\Q*\\\\E))?\");\t// regex for multiplicities: (digit | *) + optional(.. (digit | *))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can use a Collection to handle multiplicities of *; we really only care about\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the upper bound also\n\t\tMatcher m = p.matcher(text);\n\t\t// regex didn't find anything, so we'll assign a default multiplicity\n\t\tif (!m.find() || m.group().length() < 0) {\n\t\t\tmult=\"1\";\n\t\t}\n\t\telse mult = m.group();\n\t\t_assocModel.setMultiplicity(mult);\n\t\tsuper.setText(mult);\n\t}", "public Integer getResnr() {\n\t\treturn this.resnr;\n\t}", "static void perform_xri(String passed){\n\t\tint type = type_of_xri(passed);\n\t\tif(type==1)\n\t\t\txri_with_acc(passed);\n\t}", "public String designPN(String nr)\r\n {\r\n String newStr=\"(\";\r\n if(nr.length()!=10){return null;}\r\n else\r\n {\r\n newStr=newStr+nr.substring(0,4)+\")-\";\r\n // System.out.println(\"phase 1 \"+ newStr);\r\n newStr=newStr+nr.substring(4,7)+\"-\";\r\n // System.out.println(\"phase 2 \"+ newStr);\r\n newStr=newStr+nr.substring(7,10);\r\n // System.out.println(\"phase 3 \"+ newStr);\r\n }\r\n return newStr;\r\n\r\n }", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_7() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static String guessResidueTypeFromFeatureLength(int seqLength,\n int featureLength) {\n float basepairsPerResidue = (Math.abs((float)featureLength/\n (float)seqLength));\n return (basepairsPerResidue > 2.0 ? SequenceI.AA : SequenceI.DNA);\n }", "void adobe_coeff( CharPtr make, CharPtr model) {\n \n adobe_coeff( make.toString(), model.toString());\n}", "public void readArmies(){\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n vertices.get(Integer.parseInt(armyLine[1])-1).addArmies(Integer.parseInt(armyLine[2]));\n System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n // Read countries armies for AI agents\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n allSCountries.get(Integer.parseInt(armyLine[1])).setNumberArmies(Integer.parseInt(armyLine[2]));\n // System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n NState.globalState.allCountries=allSCountries;\n }", "private static String lllIIllIl(short IIIlIIlllllIIll, String IIIIlIlllllIIll) {\n }", "public String getRelationIdString(SpatialElement se1, String se1Role, SpatialElement se2, String se2Role, SpatialElement se3, String se3Role) {\n String idString = \"\";\n if (se1 != null && se2 != null && se3 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n se3.role = se3Role;\n idString = se1.id+\"-\"+se2.id+\"-\"+se3.id;\n }\n else if (se1 != null && se2 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n idString = se1.id+\"-\"+se2.id+\"-null\";\n }\n else if (se1 != null && se3 != null) {\n se1.role = se1Role;\n se3.role = se3Role;\n idString = se1.id+\"-null-\"+se3.id;\n }\n else if (se2 != null && se3 != null) {\n se2.role = se2Role;\n se3.role = se3Role;\n idString = \"null-\"+se2.id+\"-\"+se3.id;\n }\n return idString;\n }", "public String[] getVariants_ru(int[] randIds){\n Cursor crs;\n String[] variants_ru = new String[4];\n for(int i = 0; i< 4; i++){\n String[] args = new String[1];\n args[0] = Integer.toString(randIds[i]+1);\n crs = aniDB.getReadableDatabase().rawQuery(\"SELECT name_ru FROM titles WHERE id = ?\",args);\n if(crs.moveToFirst()) {\n variants_ru[i] = crs.getString(crs.getColumnIndex(\"name_ru\"));\n }\n crs.close();\n }\n return variants_ru;\n }", "public void setSpare3(String spare3) {\r\n this.spare3 = spare3;\r\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_9() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void restricciones(String oraciones){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Restricciones semanticas\");\n alert.setHeaderText(oraciones);\n alert.showAndWait();\n }", "void mo8715r(String str, String str2, String str3);", "public void setRemark3(java.lang.String _remark3)\r\n {\r\n this._remark3 = _remark3;\r\n }", "public /* synthetic */ CinemaDescriptionItem(String str, int i2, int i3, f fVar) {\n this(str, (i3 & 2) != 0 ? 3 : i2);\n }", "static int type_of_inr(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "public Recipe(String[] in)\r\n {\r\n double temp;\r\n if (in.length == 3){\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2];\r\n this.w_qty = makeDecimal(in[0]);\r\n }\r\n else {if (in.length == 5) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3] + \" \" + in[4];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = Double.parseDouble(in[0])+ temp;\r\n }\r\n else if (in.length == 4) {\r\n if (in[1].contains(\"/\")) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = temp + Double.parseDouble(in[0]);}\r\n else {\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2] + \" \" + in[3];\r\n this.w_qty = makeDecimal(in[0]);}\r\n }\r\n }\r\n this.working_measure = measure;\r\n this.final_measure = measure;\r\n }", "public TextPropDefaultViewModel_ textWithDefaultQuantityRes(@PluralsRes int pluralRes,\n int quantity, Object... formatArgs) {\n onMutation();\n assignedAttributes_epoxyGeneratedModel.set(0);\n textWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);\n return this;\n }", "private static int _addPossibleValues(int rowNumber, int y, int x, short[][] spareMatrix,String[] rowIds, SudokuModel model) {\r\n\r\n\t\tfor(short i = 0; i <9; i++){\r\n\t\t\tif(!model.restrictionIsSatisfied(y, x, i+1))\r\n\t\t\trowNumber = _addRestrictions(rowNumber,y,x,i,spareMatrix,rowIds);\r\n\t\t}\r\n\t\t\r\n\t\treturn rowNumber;\r\n\t}", "public boolean restrizione14()\r\n\t\tthrows RestrizioniSpecException\r\n\t\t{\r\n\t\tfor (int i = 0; i < this.equivalenzeInput.size(); i++)\r\n\t\t\t{\r\n\t\t\t// si preleva il nome dell'interazione di output connessa a questa componente\r\n\t\t\tAttacDecl attacDecl = this.attacsDeclInput.get(i);\r\n\t\t\tString string = attacDecl.getOutputInteraction();\r\n\t\t\t// si preleva la relativa equivalenza\r\n\t\t\tIEquivalenza equivalenza = this.equivalenzeInput.get(i);\r\n\t\t\t// si preleva l'azione corrispondente a string\r\n\t\t\tAction action = equivalenza.getActionFromName(string);\r\n\t\t\tif (action == null)\r\n\t\t\t\t{\r\n\t\t\t\tString string2 = equivalenza.getAEIdecl().getName();\r\n\t\t\t\tthrow new RestrizioniSpecException(\"The \"+string+\" action of instance \"+\r\n\t\t\t\t\t\tstring2+\" don't found\");\r\n\t\t\t\t}\r\n\t\t\tActionRate actionRate = action.getRate();\r\n\t\t\tif (!(actionRate instanceof RateInf))\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\treturn true;\r\n\t\t}", "public static void loadMatric(int matr[][]) throws IOException{\n\n\t\tfor(int i=0;i<7;i++){\n\t\t\tfor(int j=0;j<6;j++){\n\t\t\t\tSystem.out.print(\"INSERISCI\"+i+j+\": \");\n\t\t\t\tSystem.out.flush();\n\t\t\t\tmatr[i][j]=System.in.read()-'0';\n\t\t\t\tSystem.in.skip(2);\n\t\t\t}}}", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "void playYearOfPlentyCard(String resource1, String resource2);", "public int cuantosRenglones() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas renglones quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "java.lang.String getNum1();", "static int size_of_rrc(String passed){\n\t\treturn 1;\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public void agregarpal(String n) {\n\n switch (pos) {\n case 0:\n pal1 = n;\n case 1:\n pal2 = n;\n case 2:\n pal3 = n;\n case 3:\n pal4 = n;\n case 4:\n pal5 = n;\n break;\n }//fin switch\n\n pos++;\n }", "public void int3_m() {\n\t\t\n\t}", "public static void muestraArreglo(int[] arreglo) {\r\n\t\tfor (int i = 0; i < arreglo.length; i++) {\r\n\t\t\tescribir(\"[\" + arreglo[i] + \"]\", false);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tint first = rand.nextInt(7);\n\t\tint second = rand.nextInt(7);\n\t\tint third = rand.nextInt(7);\n\t\t\n\t\tint middle = rand.nextInt(741);\n\t\t\n\t\tint last = rand.nextInt(9999);\n\t\t\n\t\tString middleString= Integer.toString(middle);\n\t\tString lastString = Integer.toString(last); \n\t\tString firstString = Integer.toString(first);\n\t\tString secondString = Integer.toString(second);\n\t\tString thirdString = Integer.toString(third);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\twhile (middleString.length()<3) {\n\t\t\tmiddleString = \"0\" + middleString;\n\t\t\t\n\t\t}\n\t\t\n\t\twhile (lastString.length()<4){\n\t\t\tlastString = \"0\" + lastString;\n\t\t}\n\t\t\n\t\tSystem.out.println(firstString + secondString + thirdString + \"-\"+ middleString +\"-\"+ lastString);\n\t\t\n\t\t\n\t}", "public String getChoice3(int a){\n String choice2 = choices[a][2];\n return choice2;\n }", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "@Override\n\tpublic void setStreet3(java.lang.String street3) {\n\t\t_candidate.setStreet3(street3);\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_8() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT, BASE), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private String theFunctionThatSolvesAllProblems(String input) throws IOException {\n\n first = new MyInt[9];\n second = new MyInt[9];\n third = new MyInt[9];\n myPointers = new MyIntPointer[7];\n\n M = new MyInt();\n D = new MyInt();\n C = new MyInt();\n L = new MyInt();\n X = new MyInt();\n V = new MyInt();\n I = new MyInt();\n\n hasI = false;\n hasX = false;\n hasC = false;\n hasM = false;\n hasV = false;\n hasL = false;\n hasD = false;\n\n firstLength = 0;\n secondLength = 0;\n thirdLength = 0;\n\n initializeEquation(input);\n\n return arabic();\n\n }", "static void initSample4(){\n // put values into the sField\n sField[5][4] = \"X\";\n sField[4][5] = \".\";\n sField[3][6] = \"X\";\n sField[2][7] = \"X\";\n sField[1][8] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\"; \n }", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "public void setSecondary3(java.lang.String secondary3) {\n this.secondary3 = secondary3;\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "@Test\n public void execute_nricParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"nric\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"s1234567A\", \"nric\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"s1234567A\", \"nric\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"S1234567a S5234569A\", \"nric\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"S1234567a S5234569A\", \"nric\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", false, true, Collections.emptyList());\n }", "@Nullable public abstract String loadVerseText(int ari);", "public void setIDINTERNODC(int value) {\n this.idinternodc = value;\n }", "static void lxi_to_reg_pair(String passed){\n\t\tchar fourth = passed.charAt(4);\n\t\tif(fourth=='B'){\n\t\t\tregisters.put('B', passed.substring(6,8));\n\t\t\tregisters.put('C', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='D'){\n\t\t\tregisters.put('D', passed.substring(6,8));\n\t\t\tregisters.put('E', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='H'){\n\t\t\tregisters.put('H', passed.substring(6,8));\n\t\t\tregisters.put('L', passed.substring(8));\n\t\t}\n\t}", "public int getImageResourceIdForExercise(Context context){\n\n TypedArray imagesArray = context.getResources().obtainTypedArray(R.array.images_array);\n int id = 0;\n\n if(musclePart == 1) {\n return imagesArray.getResourceId((exeNumber -1),0);\n }else {\n for (int i = 1; i < imagesArray.length(); i++) {\n if(i == (((musclePart - 1) * 6) + exeNumber) - 1){\n id = imagesArray.getResourceId(i,0);\n break;\n }\n }\n }\n imagesArray.recycle();\n return id;\n }", "public void mo32111rr(int i) {\n }", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n //The letters are randomly chosen through this block of code with use of ASCII code.\n char let1 = (char) ((int)(Math.random() * 26 + 65));\n char let2 = (char) ((int)(Math.random() * 26 + 65));\n char let3 = (char) ((int)(Math.random() * 26 + 65));\n \n //This generates a number of four digits to follow the letters. \n int num = (int)(Math.random() * 9000 + 999);\n \n //The combination is now printed to the screen through this. \n System.out.println(\"The plate number is \" + let1 + let2 +let3 + num); \n }", "public void setResearchno(String researchno) {\r\n\t\tthis.researchno = researchno;\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_10() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}" ]
[ "0.632804", "0.54703444", "0.54320204", "0.53430146", "0.5179291", "0.512601", "0.49395695", "0.48429784", "0.4722289", "0.47159922", "0.46766278", "0.46699157", "0.46671402", "0.4631843", "0.4602065", "0.45691842", "0.4545522", "0.45275655", "0.4526531", "0.45224777", "0.45165515", "0.44878346", "0.44798192", "0.44746506", "0.4452068", "0.4451284", "0.44419998", "0.4435498", "0.4435365", "0.44183835", "0.44146082", "0.43992442", "0.43743503", "0.4366774", "0.43646222", "0.4363635", "0.43602377", "0.43424073", "0.43341428", "0.43334198", "0.43322542", "0.4321793", "0.43049264", "0.4304571", "0.42924526", "0.42903167", "0.42785272", "0.42693284", "0.42629048", "0.42606726", "0.4259107", "0.42573783", "0.42485988", "0.42480448", "0.4245962", "0.42444512", "0.4242475", "0.42358047", "0.4231975", "0.4231563", "0.42311695", "0.422844", "0.42273057", "0.42271665", "0.42261523", "0.4224413", "0.42234236", "0.4222285", "0.42197564", "0.42193034", "0.42184776", "0.42145425", "0.42101064", "0.4205031", "0.42048913", "0.42003375", "0.4199567", "0.41949332", "0.41934097", "0.4189292", "0.41866213", "0.4185099", "0.4182001", "0.41813993", "0.41809544", "0.4176753", "0.417664", "0.41718188", "0.4167094", "0.41648847", "0.41612086", "0.41609636", "0.41544276", "0.41524765", "0.41507205", "0.4148269", "0.41443336", "0.41425788", "0.41406265", "0.41387102" ]
0.6192523
1
optional string residues = 3; usually be numbered sequentially.
public Builder clearResidues() { bitField0_ = (bitField0_ & ~0x00000004); residues_ = getDefaultInstance().getResidues(); onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getResidues();", "public Builder setResidues(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n residues_ = value;\n onChanged();\n return this;\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\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 residues_ = s;\n }\n return s;\n }\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n residues_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\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 residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Builder setResiduesBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n residues_ = value;\n onChanged();\n return this;\n }", "private List<String> generateN3Optional() {\n\t\treturn list(\n\t\t\t\t\t\"?conceptNode <\" + VitroVocabulary.RDF_TYPE + \"> <\" + SKOSConceptType + \"> .\\n\" +\n\t\t\t\t\t\"?conceptNode <\" + label + \"> ?conceptLabel .\"\n\t \t);\n\n }", "private void assignMissingResidueIds() {\n \t\tfor (Atom atom: atomVector) {\n \t\t\tif (atom.residue_id == Integer.MIN_VALUE) {\n \t\t\t\tatom.residue_id = atom.authorResidue_id;\n \t\t\t\tatom.nonpolymer = true;\n \t\t\t}\n \t\t}\n \t}", "boolean hasResidues();", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public void setReserve3(java.lang.String reserve3) {\n this.reserve3 = reserve3;\n }", "com.google.protobuf.ByteString\n getResiduesBytes();", "@Test\n void multiConstruct() {\n var multicons = \"(define conCar_a (cons 1 2))(define conCar_b (cons 3 conCar_a))(define conCar_c (cons conCar_b 4))(define conCar_d (cons conCar_b conCar_c))\";\n Main.parseInputString(multicons);\n assertEquals(\"(3 1 . 2)\", Main.parseInputString(\"(display (car conCar_d)) \"));\n }", "String slotOfCar(String regNumber);", "public GI3( String[] textParms )\n {\n super( textParms );\n }", "private void setInstruc(int[] instruc2) \n\t{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "static int setCon(String input){\n if (input.equals(\"little\")||input.equals(\"1\")) return 1;\n if (input.equals(\"average\")||input.equals(\"2\"))return 2;\n if (input.equals(\"lot\") || input.equals(\"3\")) return 3;\n if (input.equals(\"manual\") || input.equals(\"4\")) return 4;\n throw new RuntimeException(\n \"Illigal second paramter on command line, use : <little,average,lot>\");\n }", "public Recurso(int idRecurso, String descripcionRecurso){\n this.idRecurso = idRecurso; //Recibimos el numero \n this.descripcionRecurso = descripcionRecurso; //Material que deseamos\n }", "public void setResidue(char residue)\r\n {\n if (residue == '[')\r\n this.residue = 'n';\r\n else if (residue == ']')\r\n this.residue = 'c';\r\n else\r\n this.residue = residue;\r\n\r\n if (this.residue == 'n' || this.residue == 'c')\r\n throw new IllegalArgumentException(\"N-terminal and C-terminal labels are not currently supported\");\r\n }", "@Override\n\tpublic Instruction parseInstruction(InstructionSequence seq, State state) \n\t{\n\t\treturn new Iconst3();\n\t}", "public void printResiduals(double t, double resid1, double resid2);", "static int size_of_rlc(String passed){\n\t\treturn 1;\n\t}", "public void setRsv3(String rsv3) {\r\n this.rsv3 = rsv3;\r\n }", "private void parsePlateau(String s) {\r\n String[] parsedString = s.split(\" \");\r\n plateau[0] = Integer.parseInt(parsedString[0]);\r\n plateau[1] = Integer.parseInt(parsedString[1]);\r\n }", "public boolean checkR3(String candidateSolution){\n\t\t//Split the string to a number of 9 digits\n\t\tString []candSol = candidateSolution.split(\"(?<=\\\\G.........)\");\n\t\tint candSolIndex = 0;\n\t\t\n\t\twhile(candSolIndex < 9){\n\n\t\t\tString testPart = candSol[candSolIndex];\n\t\t\t//R2 part\n\t\t\tboolean ok = checkIfDublicate(testPart);\n\t\t\tcandSolIndex++;\n\t\t\tif(ok){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn true;\t\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "public void setExtra3(String extra3) {\n this.extra3 = extra3;\n }", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public void setIDINTERNOPE1(int value) {\n this.idinternope1 = value;\n }", "void mo19167a(String str, String str2, int i, String str3, int i2);", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false, 16), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "static void initSample3(){\n // put values into the sField\n sField[3][6] = \"X\";\n sField[4][6] = \"X\";\n sField[5][6] = \"X\";\n sField[6][6] = \"X\";\n sField[7][6] = \".\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\";\n sField[1][8] = \"O\";\n }", "final String getResourceName(int resid) {\n if (am == null)\n return null;\n ResTable.resource_name name = new ResTable.resource_name(null, null, null);\n if (!am.getResources(false).getResourceName(resid, name)) {\n return null;\n }\n String str = null;\n if (name.mPackage != null) {\n str = name.mPackage;\n }\n\n if (name.mType != null) {\n if (str.length() > 0) {\n str += \":\";\n }\n str += name.mType;\n }\n\n if (name.mName != null) {\n if (str.length() > 0) {\n str += \"/\";\n }\n str += name.mName;\n }\n\n return str;\n }", "public void setRegulations(String regulations) {\n this.regulations = regulations;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private List<String> generateN3Required(VitroRequest vreq) {\n \tList<String> n3Required = list(\n \t getPrefixesString() + \"\\n\" +\n \t \"?subject ?predicate ?conceptNode .\\n\"\n \t);\n \tList<String> inversePredicate = getInversePredicate(vreq);\n\t\t//Adding inverse predicate if it exists\n\t\tif(inversePredicate.size() > 0) {\n\t\t\tn3Required.add(\"?conceptNode <\" + inversePredicate.get(0) + \"> ?subject .\");\n\t\t}\n \treturn n3Required;\n }", "public static String getResidSnippet(String resident) {\n String snippet = null;\n try {\n JSONObject jsonObject = new JSONObject(resident);\n snippet = jsonObject.getString(\"resid\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return snippet;\n }", "@Test public void testParseManyDigits3() {\n String pows10 =\n \"0.00000000000001\\n\"+\n \"1000001\\n\"+\n \"2000001\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(1e-14),\n ard(1000001L),\n ard(2000001L),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 16, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[][].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "void mo11024a(int i, int i2, String str);", "@Override\r\n\tpublic vec3 get3(String ponits) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List getListByResId(Integer resid) {\n\t\tString sql = \"select g.resid from GroupFunres g where resid = '\" + resid + \"'\";\n\t\tList list = this.queryForList(sql);\n\t\tList idList=new ArrayList();\n\t\tif (list != null && list.size() > 0) {\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tidList.add(list.get(i));\n\t\t\t}\n\t\t\treturn idList;\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic int resid() {\n\t\treturn currnet().resid();\n\t}", "private String insertarCartaNaturalResources() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 0,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 0,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 5,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n true,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n String nombre = \"\";\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "public static int[][] AssetCreater(String srt) {\n\r\n\t\tint Length = ArrLength(srt);\r\n\r\n\t\tint[][] TempArr = new int[5][Length];\r\n\r\n\t\tint Xoffset = 0;\r\n\r\n\t\t// goes through entire word and if any letter corrisponds with a letter it's\r\n\t\t// testing for\r\n\t\t// it calls a function to add the new symbol to 2d array\r\n\r\n\t\t// I considered commenting all this but I think it's pretty self explanitory\r\n\r\n\t\tfor (int k = 0; k < srt.length(); k++) {\r\n\r\n\t\t\tif (srt.charAt(k) == '0') {\r\n\t\t\t\t// if it's 0 add Zero Matrix to the matrix\r\n\t\t\t\tTempArr = AddToArr(TempArr, Zero, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '1') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, One, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '2') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Two, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '3') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Three, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '4') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Four, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '5') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Five, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '6') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Six, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '7') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Seven, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '8') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Eight, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '9') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Nine, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'a') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ALetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'b') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, BLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'c') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, CLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'd') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'e') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ELetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'f') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, FLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'g') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, GLetter, 4, Xoffset);\r\n\r\n\t\t\t\t// G is a bigger number so I just add 1 to offset\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'h') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, HLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'i') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ILetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'j') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, JLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'k') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, KLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'l') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, LLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'm') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, MLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'n') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, NLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == 'o') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, OLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'p') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, PLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'q') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, QLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'r') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, RLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 's') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, SLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 't') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, TLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'u') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ULetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'v') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, VLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'w') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, WLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\t\t\t} else if (srt.charAt(k) == 'x') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, XLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'y') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, YLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'z') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ZLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == ' ') {\r\n\t\t\t\tXoffset -= 2;\r\n\t\t\t\t// space is too big number so I just sub 2 from offset\r\n\r\n\t\t\t} else if (srt.charAt(k) == '-') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DashLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == ':') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ColonLetter, 3, Xoffset);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tXoffset += 4;\r\n\t\t}\r\n\t\treturn TempArr;\r\n\t}", "private static void initSet1(String[] set1) {\n\t\tset1[0] = \"rs36129689\";\n\t\tset1[1] = \"rs36153986\";\n\t\tset1[2] = \"rs493934\";\n\t\tset1[3] = \"rs36146958\";\n\t\tset1[4] = \"rs36197089\";\n\t\tset1[5] = \"rs35773247\";\n\t\tset1[6] = \"rs35346884\";\n\t\tset1[7] = \"rs493040\";\n\t\tset1[8] = \"rs35473000\";\n\t\tset1[9] = \"rs123456\";\n\t\tset1[10] = \"rs1234567\";\n\t\tset1[11] = \"rs12345678\";\n\t\tset1[12] = \"rs1234234\";\n\t\tset1[13] = \"rs492232\";\n\t\tset1[14] = \"rs492184\";\n\t\tset1[15] = \"rs123123\";\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setText(String text) {\n \tif (_assocModel == null) return;\n\t\tString mult;\n\t\tPattern p = Pattern.compile(\"([\\\\d]|\\\\Q*\\\\E)([.]{2}+([\\\\d]|\\\\Q*\\\\E))?\");\t// regex for multiplicities: (digit | *) + optional(.. (digit | *))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can use a Collection to handle multiplicities of *; we really only care about\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the upper bound also\n\t\tMatcher m = p.matcher(text);\n\t\t// regex didn't find anything, so we'll assign a default multiplicity\n\t\tif (!m.find() || m.group().length() < 0) {\n\t\t\tmult=\"1\";\n\t\t}\n\t\telse mult = m.group();\n\t\t_assocModel.setMultiplicity(mult);\n\t\tsuper.setText(mult);\n\t}", "public Integer getResnr() {\n\t\treturn this.resnr;\n\t}", "static void perform_xri(String passed){\n\t\tint type = type_of_xri(passed);\n\t\tif(type==1)\n\t\t\txri_with_acc(passed);\n\t}", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public String designPN(String nr)\r\n {\r\n String newStr=\"(\";\r\n if(nr.length()!=10){return null;}\r\n else\r\n {\r\n newStr=newStr+nr.substring(0,4)+\")-\";\r\n // System.out.println(\"phase 1 \"+ newStr);\r\n newStr=newStr+nr.substring(4,7)+\"-\";\r\n // System.out.println(\"phase 2 \"+ newStr);\r\n newStr=newStr+nr.substring(7,10);\r\n // System.out.println(\"phase 3 \"+ newStr);\r\n }\r\n return newStr;\r\n\r\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_7() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static String guessResidueTypeFromFeatureLength(int seqLength,\n int featureLength) {\n float basepairsPerResidue = (Math.abs((float)featureLength/\n (float)seqLength));\n return (basepairsPerResidue > 2.0 ? SequenceI.AA : SequenceI.DNA);\n }", "public void readArmies(){\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n vertices.get(Integer.parseInt(armyLine[1])-1).addArmies(Integer.parseInt(armyLine[2]));\n System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n // Read countries armies for AI agents\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n allSCountries.get(Integer.parseInt(armyLine[1])).setNumberArmies(Integer.parseInt(armyLine[2]));\n // System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n NState.globalState.allCountries=allSCountries;\n }", "void adobe_coeff( CharPtr make, CharPtr model) {\n \n adobe_coeff( make.toString(), model.toString());\n}", "private static String lllIIllIl(short IIIlIIlllllIIll, String IIIIlIlllllIIll) {\n }", "public String getRelationIdString(SpatialElement se1, String se1Role, SpatialElement se2, String se2Role, SpatialElement se3, String se3Role) {\n String idString = \"\";\n if (se1 != null && se2 != null && se3 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n se3.role = se3Role;\n idString = se1.id+\"-\"+se2.id+\"-\"+se3.id;\n }\n else if (se1 != null && se2 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n idString = se1.id+\"-\"+se2.id+\"-null\";\n }\n else if (se1 != null && se3 != null) {\n se1.role = se1Role;\n se3.role = se3Role;\n idString = se1.id+\"-null-\"+se3.id;\n }\n else if (se2 != null && se3 != null) {\n se2.role = se2Role;\n se3.role = se3Role;\n idString = \"null-\"+se2.id+\"-\"+se3.id;\n }\n return idString;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_9() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public String[] getVariants_ru(int[] randIds){\n Cursor crs;\n String[] variants_ru = new String[4];\n for(int i = 0; i< 4; i++){\n String[] args = new String[1];\n args[0] = Integer.toString(randIds[i]+1);\n crs = aniDB.getReadableDatabase().rawQuery(\"SELECT name_ru FROM titles WHERE id = ?\",args);\n if(crs.moveToFirst()) {\n variants_ru[i] = crs.getString(crs.getColumnIndex(\"name_ru\"));\n }\n crs.close();\n }\n return variants_ru;\n }", "public void setSpare3(String spare3) {\r\n this.spare3 = spare3;\r\n }", "public void restricciones(String oraciones){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Restricciones semanticas\");\n alert.setHeaderText(oraciones);\n alert.showAndWait();\n }", "void mo8715r(String str, String str2, String str3);", "static int type_of_inr(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "public void setRemark3(java.lang.String _remark3)\r\n {\r\n this._remark3 = _remark3;\r\n }", "public /* synthetic */ CinemaDescriptionItem(String str, int i2, int i3, f fVar) {\n this(str, (i3 & 2) != 0 ? 3 : i2);\n }", "public Recipe(String[] in)\r\n {\r\n double temp;\r\n if (in.length == 3){\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2];\r\n this.w_qty = makeDecimal(in[0]);\r\n }\r\n else {if (in.length == 5) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3] + \" \" + in[4];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = Double.parseDouble(in[0])+ temp;\r\n }\r\n else if (in.length == 4) {\r\n if (in[1].contains(\"/\")) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = temp + Double.parseDouble(in[0]);}\r\n else {\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2] + \" \" + in[3];\r\n this.w_qty = makeDecimal(in[0]);}\r\n }\r\n }\r\n this.working_measure = measure;\r\n this.final_measure = measure;\r\n }", "private static int _addPossibleValues(int rowNumber, int y, int x, short[][] spareMatrix,String[] rowIds, SudokuModel model) {\r\n\r\n\t\tfor(short i = 0; i <9; i++){\r\n\t\t\tif(!model.restrictionIsSatisfied(y, x, i+1))\r\n\t\t\trowNumber = _addRestrictions(rowNumber,y,x,i,spareMatrix,rowIds);\r\n\t\t}\r\n\t\t\r\n\t\treturn rowNumber;\r\n\t}", "public TextPropDefaultViewModel_ textWithDefaultQuantityRes(@PluralsRes int pluralRes,\n int quantity, Object... formatArgs) {\n onMutation();\n assignedAttributes_epoxyGeneratedModel.set(0);\n textWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);\n return this;\n }", "public static void loadMatric(int matr[][]) throws IOException{\n\n\t\tfor(int i=0;i<7;i++){\n\t\t\tfor(int j=0;j<6;j++){\n\t\t\t\tSystem.out.print(\"INSERISCI\"+i+j+\": \");\n\t\t\t\tSystem.out.flush();\n\t\t\t\tmatr[i][j]=System.in.read()-'0';\n\t\t\t\tSystem.in.skip(2);\n\t\t\t}}}", "public boolean restrizione14()\r\n\t\tthrows RestrizioniSpecException\r\n\t\t{\r\n\t\tfor (int i = 0; i < this.equivalenzeInput.size(); i++)\r\n\t\t\t{\r\n\t\t\t// si preleva il nome dell'interazione di output connessa a questa componente\r\n\t\t\tAttacDecl attacDecl = this.attacsDeclInput.get(i);\r\n\t\t\tString string = attacDecl.getOutputInteraction();\r\n\t\t\t// si preleva la relativa equivalenza\r\n\t\t\tIEquivalenza equivalenza = this.equivalenzeInput.get(i);\r\n\t\t\t// si preleva l'azione corrispondente a string\r\n\t\t\tAction action = equivalenza.getActionFromName(string);\r\n\t\t\tif (action == null)\r\n\t\t\t\t{\r\n\t\t\t\tString string2 = equivalenza.getAEIdecl().getName();\r\n\t\t\t\tthrow new RestrizioniSpecException(\"The \"+string+\" action of instance \"+\r\n\t\t\t\t\t\tstring2+\" don't found\");\r\n\t\t\t\t}\r\n\t\t\tActionRate actionRate = action.getRate();\r\n\t\t\tif (!(actionRate instanceof RateInf))\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\treturn true;\r\n\t\t}", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "void playYearOfPlentyCard(String resource1, String resource2);", "java.lang.String getNum1();", "public int cuantosRenglones() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas renglones quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "static int size_of_rrc(String passed){\n\t\treturn 1;\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public void int3_m() {\n\t\t\n\t}", "public void agregarpal(String n) {\n\n switch (pos) {\n case 0:\n pal1 = n;\n case 1:\n pal2 = n;\n case 2:\n pal3 = n;\n case 3:\n pal4 = n;\n case 4:\n pal5 = n;\n break;\n }//fin switch\n\n pos++;\n }", "public static void muestraArreglo(int[] arreglo) {\r\n\t\tfor (int i = 0; i < arreglo.length; i++) {\r\n\t\t\tescribir(\"[\" + arreglo[i] + \"]\", false);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tint first = rand.nextInt(7);\n\t\tint second = rand.nextInt(7);\n\t\tint third = rand.nextInt(7);\n\t\t\n\t\tint middle = rand.nextInt(741);\n\t\t\n\t\tint last = rand.nextInt(9999);\n\t\t\n\t\tString middleString= Integer.toString(middle);\n\t\tString lastString = Integer.toString(last); \n\t\tString firstString = Integer.toString(first);\n\t\tString secondString = Integer.toString(second);\n\t\tString thirdString = Integer.toString(third);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\twhile (middleString.length()<3) {\n\t\t\tmiddleString = \"0\" + middleString;\n\t\t\t\n\t\t}\n\t\t\n\t\twhile (lastString.length()<4){\n\t\t\tlastString = \"0\" + lastString;\n\t\t}\n\t\t\n\t\tSystem.out.println(firstString + secondString + thirdString + \"-\"+ middleString +\"-\"+ lastString);\n\t\t\n\t\t\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_8() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT, BASE), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public String getChoice3(int a){\n String choice2 = choices[a][2];\n return choice2;\n }", "@Override\n\tpublic void setStreet3(java.lang.String street3) {\n\t\t_candidate.setStreet3(street3);\n\t}", "static void initSample4(){\n // put values into the sField\n sField[5][4] = \"X\";\n sField[4][5] = \".\";\n sField[3][6] = \"X\";\n sField[2][7] = \"X\";\n sField[1][8] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\"; \n }", "private String theFunctionThatSolvesAllProblems(String input) throws IOException {\n\n first = new MyInt[9];\n second = new MyInt[9];\n third = new MyInt[9];\n myPointers = new MyIntPointer[7];\n\n M = new MyInt();\n D = new MyInt();\n C = new MyInt();\n L = new MyInt();\n X = new MyInt();\n V = new MyInt();\n I = new MyInt();\n\n hasI = false;\n hasX = false;\n hasC = false;\n hasM = false;\n hasV = false;\n hasL = false;\n hasD = false;\n\n firstLength = 0;\n secondLength = 0;\n thirdLength = 0;\n\n initializeEquation(input);\n\n return arabic();\n\n }", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public void setSecondary3(java.lang.String secondary3) {\n this.secondary3 = secondary3;\n }", "@Test\n public void execute_nricParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"nric\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"s1234567A\", \"nric\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"s1234567A\", \"nric\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"S1234567a S5234569A\", \"nric\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"S1234567a S5234569A\", \"nric\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", false, true, Collections.emptyList());\n }", "@Nullable public abstract String loadVerseText(int ari);", "public void setIDINTERNODC(int value) {\n this.idinternodc = value;\n }", "static void lxi_to_reg_pair(String passed){\n\t\tchar fourth = passed.charAt(4);\n\t\tif(fourth=='B'){\n\t\t\tregisters.put('B', passed.substring(6,8));\n\t\t\tregisters.put('C', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='D'){\n\t\t\tregisters.put('D', passed.substring(6,8));\n\t\t\tregisters.put('E', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='H'){\n\t\t\tregisters.put('H', passed.substring(6,8));\n\t\t\tregisters.put('L', passed.substring(8));\n\t\t}\n\t}", "public int getImageResourceIdForExercise(Context context){\n\n TypedArray imagesArray = context.getResources().obtainTypedArray(R.array.images_array);\n int id = 0;\n\n if(musclePart == 1) {\n return imagesArray.getResourceId((exeNumber -1),0);\n }else {\n for (int i = 1; i < imagesArray.length(); i++) {\n if(i == (((musclePart - 1) * 6) + exeNumber) - 1){\n id = imagesArray.getResourceId(i,0);\n break;\n }\n }\n }\n imagesArray.recycle();\n return id;\n }", "public void mo32111rr(int i) {\n }", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "public void setResearchno(String researchno) {\r\n\t\tthis.researchno = researchno;\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_10() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n //The letters are randomly chosen through this block of code with use of ASCII code.\n char let1 = (char) ((int)(Math.random() * 26 + 65));\n char let2 = (char) ((int)(Math.random() * 26 + 65));\n char let3 = (char) ((int)(Math.random() * 26 + 65));\n \n //This generates a number of four digits to follow the letters. \n int num = (int)(Math.random() * 9000 + 999);\n \n //The combination is now printed to the screen through this. \n System.out.println(\"The plate number is \" + let1 + let2 +let3 + num); \n }" ]
[ "0.6327813", "0.6192469", "0.54701954", "0.54318446", "0.53435236", "0.517985", "0.51273394", "0.49388522", "0.4843686", "0.47237444", "0.47163254", "0.4672512", "0.46710652", "0.46661896", "0.46322954", "0.46011934", "0.4569921", "0.45437083", "0.45296323", "0.45279846", "0.45203218", "0.45189357", "0.448949", "0.44783738", "0.44738823", "0.4448853", "0.44484988", "0.44427297", "0.44364527", "0.4433593", "0.44193015", "0.441404", "0.4399441", "0.4376159", "0.4368925", "0.4364866", "0.4362959", "0.4357302", "0.43427482", "0.43348527", "0.43325981", "0.43311843", "0.4325681", "0.43061322", "0.43053252", "0.4292421", "0.42918912", "0.42805928", "0.42690328", "0.4265863", "0.4261377", "0.42598525", "0.42585045", "0.42498323", "0.42467907", "0.42458472", "0.42452836", "0.4242436", "0.4234264", "0.42334983", "0.42330155", "0.42293504", "0.4227454", "0.42257997", "0.42255232", "0.42251506", "0.42247605", "0.42231393", "0.42229062", "0.42220333", "0.4220982", "0.4219076", "0.42158842", "0.42102906", "0.4204864", "0.42048565", "0.42022958", "0.42021188", "0.41942436", "0.41938663", "0.41903755", "0.4186586", "0.41846168", "0.41824836", "0.41813582", "0.41777498", "0.41771463", "0.4175399", "0.41727102", "0.41639477", "0.41636065", "0.4162537", "0.4157625", "0.41564998", "0.4151467", "0.41509706", "0.41508955", "0.41437665", "0.41414803", "0.41412947", "0.41412067" ]
0.0
-1
optional string residues = 3; usually be numbered sequentially.
public Builder setResiduesBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; residues_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getResidues();", "public Builder setResidues(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n residues_ = value;\n onChanged();\n return this;\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\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 residues_ = s;\n }\n return s;\n }\n }", "public java.lang.String getResidues() {\n java.lang.Object ref = residues_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n residues_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getResiduesBytes() {\n java.lang.Object ref = residues_;\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 residues_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "private List<String> generateN3Optional() {\n\t\treturn list(\n\t\t\t\t\t\"?conceptNode <\" + VitroVocabulary.RDF_TYPE + \"> <\" + SKOSConceptType + \"> .\\n\" +\n\t\t\t\t\t\"?conceptNode <\" + label + \"> ?conceptLabel .\"\n\t \t);\n\n }", "private void assignMissingResidueIds() {\n \t\tfor (Atom atom: atomVector) {\n \t\t\tif (atom.residue_id == Integer.MIN_VALUE) {\n \t\t\t\tatom.residue_id = atom.authorResidue_id;\n \t\t\t\tatom.nonpolymer = true;\n \t\t\t}\n \t\t}\n \t}", "boolean hasResidues();", "static int size_of_xri(String passed){\n\t\treturn 2;\n\t}", "public void setReserve3(java.lang.String reserve3) {\n this.reserve3 = reserve3;\n }", "com.google.protobuf.ByteString\n getResiduesBytes();", "@Test\n void multiConstruct() {\n var multicons = \"(define conCar_a (cons 1 2))(define conCar_b (cons 3 conCar_a))(define conCar_c (cons conCar_b 4))(define conCar_d (cons conCar_b conCar_c))\";\n Main.parseInputString(multicons);\n assertEquals(\"(3 1 . 2)\", Main.parseInputString(\"(display (car conCar_d)) \"));\n }", "String slotOfCar(String regNumber);", "public GI3( String[] textParms )\n {\n super( textParms );\n }", "private void setInstruc(int[] instruc2) \n\t{\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "static int setCon(String input){\n if (input.equals(\"little\")||input.equals(\"1\")) return 1;\n if (input.equals(\"average\")||input.equals(\"2\"))return 2;\n if (input.equals(\"lot\") || input.equals(\"3\")) return 3;\n if (input.equals(\"manual\") || input.equals(\"4\")) return 4;\n throw new RuntimeException(\n \"Illigal second paramter on command line, use : <little,average,lot>\");\n }", "public Recurso(int idRecurso, String descripcionRecurso){\n this.idRecurso = idRecurso; //Recibimos el numero \n this.descripcionRecurso = descripcionRecurso; //Material que deseamos\n }", "public void setResidue(char residue)\r\n {\n if (residue == '[')\r\n this.residue = 'n';\r\n else if (residue == ']')\r\n this.residue = 'c';\r\n else\r\n this.residue = residue;\r\n\r\n if (this.residue == 'n' || this.residue == 'c')\r\n throw new IllegalArgumentException(\"N-terminal and C-terminal labels are not currently supported\");\r\n }", "public void printResiduals(double t, double resid1, double resid2);", "@Override\n\tpublic Instruction parseInstruction(InstructionSequence seq, State state) \n\t{\n\t\treturn new Iconst3();\n\t}", "static int size_of_rlc(String passed){\n\t\treturn 1;\n\t}", "public void setRsv3(String rsv3) {\r\n this.rsv3 = rsv3;\r\n }", "private void parsePlateau(String s) {\r\n String[] parsedString = s.split(\" \");\r\n plateau[0] = Integer.parseInt(parsedString[0]);\r\n plateau[1] = Integer.parseInt(parsedString[1]);\r\n }", "public boolean checkR3(String candidateSolution){\n\t\t//Split the string to a number of 9 digits\n\t\tString []candSol = candidateSolution.split(\"(?<=\\\\G.........)\");\n\t\tint candSolIndex = 0;\n\t\t\n\t\twhile(candSolIndex < 9){\n\n\t\t\tString testPart = candSol[candSolIndex];\n\t\t\t//R2 part\n\t\t\tboolean ok = checkIfDublicate(testPart);\n\t\t\tcandSolIndex++;\n\t\t\tif(ok){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn true;\t\t\t\t\n\t\t}\n\t\treturn false;\n\t}", "public void setExtra3(String extra3) {\n this.extra3 = extra3;\n }", "public void init() {\n\t\tinit(\"1,0 3,0 5,0 7,0 9,0 0,1 2,1 4,1 6,1 8,1 1,2 3,2 5,2 7,2 9,2 0,3 2,3 4,3 6,3 8,3\", \n\t\t\t \"1,6 3,6 5,6 7,6 9,6 0,7 2,7 4,7 6,7 8,7 1,8 3,8 5,8 7,8 9,8 0,9 2,9 4,9 6,9 8,9\"); \n }", "public void setIDINTERNOPE1(int value) {\n this.idinternope1 = value;\n }", "void mo19167a(String str, String str2, int i, String str3, int i2);", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(3, 5, 0, 10, false, 16), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "static void initSample3(){\n // put values into the sField\n sField[3][6] = \"X\";\n sField[4][6] = \"X\";\n sField[5][6] = \"X\";\n sField[6][6] = \"X\";\n sField[7][6] = \".\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\";\n sField[1][8] = \"O\";\n }", "final String getResourceName(int resid) {\n if (am == null)\n return null;\n ResTable.resource_name name = new ResTable.resource_name(null, null, null);\n if (!am.getResources(false).getResourceName(resid, name)) {\n return null;\n }\n String str = null;\n if (name.mPackage != null) {\n str = name.mPackage;\n }\n\n if (name.mType != null) {\n if (str.length() > 0) {\n str += \":\";\n }\n str += name.mType;\n }\n\n if (name.mName != null) {\n if (str.length() > 0) {\n str += \"/\";\n }\n str += name.mName;\n }\n\n return str;\n }", "public void setRegulations(String regulations) {\n this.regulations = regulations;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_4() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testPositiveGenerateStrings_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[] response = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[] response2 = roc.generateStrings(10, 5, \"abcd\", false, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\r\n\t\t\t\tresponse = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateStrings(10, 5, \"abcd\", false, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "private List<String> generateN3Required(VitroRequest vreq) {\n \tList<String> n3Required = list(\n \t getPrefixesString() + \"\\n\" +\n \t \"?subject ?predicate ?conceptNode .\\n\"\n \t);\n \tList<String> inversePredicate = getInversePredicate(vreq);\n\t\t//Adding inverse predicate if it exists\n\t\tif(inversePredicate.size() > 0) {\n\t\t\tn3Required.add(\"?conceptNode <\" + inversePredicate.get(0) + \"> ?subject .\");\n\t\t}\n \treturn n3Required;\n }", "public static String getResidSnippet(String resident) {\n String snippet = null;\n try {\n JSONObject jsonObject = new JSONObject(resident);\n snippet = jsonObject.getString(\"resid\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return snippet;\n }", "@Test public void testParseManyDigits3() {\n String pows10 =\n \"0.00000000000001\\n\"+\n \"1000001\\n\"+\n \"2000001\\n\"+\n \"\";\n double[][] pows10_exp = new double[][] {\n ard(1e-14),\n ard(1000001L),\n ard(2000001L),\n };\n Key k = FVecFactory.makeByteVec(pows10);\n Key r1 = Key.make(\"r1\");\n ParseDataset.parse(r1, k);\n testParsed(r1,pows10_exp);\n }", "@Test\r\n\tpublic void testPositiveGenerateSignedIntegerSequences_3() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tHashMap<String,Object> o = roc.generateSignedIntegerSequences(3, 5, 0, 10, false, 16, userData);\r\n\t\t\t\t\r\n\t\t\t\tthis.signedValueTester(roc, i, o, String[][].class, true);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "void mo11024a(int i, int i2, String str);", "@Override\r\n\tpublic vec3 get3(String ponits) {\n\t\treturn null;\r\n\t}", "@Override\n\tpublic List getListByResId(Integer resid) {\n\t\tString sql = \"select g.resid from GroupFunres g where resid = '\" + resid + \"'\";\n\t\tList list = this.queryForList(sql);\n\t\tList idList=new ArrayList();\n\t\tif (list != null && list.size() > 0) {\n\t\t\tfor(int i=0;i<list.size();i++){\n\t\t\t\tidList.add(list.get(i));\n\t\t\t}\n\t\t\treturn idList;\n\t\t}\n\t\treturn null;\n\t}", "@Override\n\tpublic int resid() {\n\t\treturn currnet().resid();\n\t}", "private String insertarCartaNaturalResources() {\n int[] valoresEnemigo = {\n// this.dañoEnemigo=valoresEnemigo[0];\n 0,\n// this.curaEnemigo=valoresEnemigo[1];\n 0,\n// this.cartasEnemigo=valoresEnemigo[2];\n 0,\n// this.descarteEnemigo=valoresEnemigo[3];\n 0,\n// this.recursosEnemigo=valoresEnemigo[4];\n 0,\n// this.moverMesaAManoEnemigo=valoresEnemigo[5];\n 0,\n// this.moverDescarteAManoEnemigo=valoresEnemigo[6];\n 0,\n// this.moverDeckAManoEnemigo=valoresEnemigo[7];\n 0,\n// this.moverMesaADeckEnemigo=valoresEnemigo[8];\n 0,\n// this.moverDescarteADeckEnemigo=valoresEnemigo[9];\n 0,\n// this.moverManoADeckEnemigo=valoresEnemigo[10];\n 0,\n// this.moverMesaADescarteEnemigo=valoresEnemigo[11];\n 0,\n// this.moverManoADescarteEnemigo=valoresEnemigo[12];\n 0,\n// this.moverDeckADescarteEnemigo=valoresEnemigo[13];\n 0,\n// this.moverDescarteAMesaEnemigo=valoresEnemigo[14];\n 0,\n// this.moverManoAMesaEnemigo=valoresEnemigo[15];\n 0,\n// this.moverDeckAMesaEnemigo=valoresEnemigo[16];\n 0\n };\n int[] valoresOwner = {\n// this.dañoOwner=valoresOwner[0];\n 0,\n// this.curaOwner=valoresOwner[1];\n 0,\n// this.cartasOwner=valoresOwner[2];\n 0,\n// this.descarteOwner=valoresOwner[3];\n 0,\n// this.recursosOwner=valoresOwner[4];\n 5,\n// this.moverMesaAManoOwner=valoresOwner[5];\n 0,\n// this.moverDescarteAManoOwner=valoresOwner[6];\n 0,\n// this.moverDeckAManoOwner=valoresOwner[7];\n 0,\n// this.moverMesaADeckOwner=valoresOwner[8];\n 0,\n// this.moverDescarteADeckOwner=valoresOwner[9];\n 0,\n// this.moverManoADeckOwner=valoresOwner[10];\n 0,\n// this.moverMesaADescarteOwner=valoresOwner[11];\n 0,\n// this.moverManoADescarteOwner=valoresOwner[12];\n 0,\n// this.moverDeckADescarteOwner=valoresOwner[13];\n 0,\n// this.moverDescarteAMesaOwner=valoresOwner[14];\n 0,\n// this.moverManoAMesaOwner=valoresOwner[15];\n 0,\n// this.moverDeckAMesaOwner=valoresOwner[16];\n 0\n };\n boolean[]valoresPlay={\n //this.OnMoveMesaADescarte=valoresPlay[0];\n false,\n //this.OnMoveMesaADeck=valoresPlay[1];\n false,\n //this.OnMoveMesaAMano=valoresPlay[2];\n false,\n //this.OnMoveDescarteAMesa=valoresPlay[3];\n false,\n //this.OnMoveDescarteADeck=valoresPlay[4];\n false,\n// this.OnMoveDescarteAMano=valoresPlay[5];\n false,\n// this.OnMoveDeckADescarte=valoresPlay[6];\n false,\n// this.OnMoveDeckAMesa=valoresPlay[7];\n false,\n// this.OnMoveDeckAMano=valoresPlay[8];\n false,\n// this.OnMoveManoADescarte=valoresPlay[9];\n false,\n// this.OnMoveManoAMesa=valoresPlay[10];\n true,\n// this.OnMoveManoADeck=valoresPlay[11];\n false,\n// this.OnStartTurnTable=valoresPlay[12];\n false,\n// this.OnStartTurnHand=valoresPlay[13];\n false,\n// this.OnStartTurnDiscard=valoresPlay[14];\n false,\n// this.OnStartTurnDeck=valoresPlay[15];\n false,\n// this.OnEndTurnTable=valoresPlay[16];\n false,\n// this.OnEndTurnHand=valoresPlay[17];\n false,\n// this.OnEndTurnDiscard=valoresPlay[18];\n false,\n// this.OnEndTurnDeck=valoresPlay[19];\n false,\n };\n ArrayList<Integer> datos = new ArrayList<Integer>();\n String nombre = \"\";\n for (int i = 0; i < valoresEnemigo.length; i++) {\n datos.add(valoresEnemigo[i]);\n }\n for (int i = 0; i < valoresOwner.length; i++) {\n datos.add(valoresOwner[i]);\n }\n for (int i = 0; i < valoresPlay.length; i++) {\n if(valoresPlay[i]){\n datos.add(1);\n }else{\n datos.add(0);\n }\n }\n String insert=\"\";\n for(int i=0;i<datos.size();i++){\n if(i<datos.size()-1) {\n insert += datos.get(i) + \", \";\n }else{\n insert += datos.get(i) + \" )\";\n }\n }\n return insert;\n }", "public static int[][] AssetCreater(String srt) {\n\r\n\t\tint Length = ArrLength(srt);\r\n\r\n\t\tint[][] TempArr = new int[5][Length];\r\n\r\n\t\tint Xoffset = 0;\r\n\r\n\t\t// goes through entire word and if any letter corrisponds with a letter it's\r\n\t\t// testing for\r\n\t\t// it calls a function to add the new symbol to 2d array\r\n\r\n\t\t// I considered commenting all this but I think it's pretty self explanitory\r\n\r\n\t\tfor (int k = 0; k < srt.length(); k++) {\r\n\r\n\t\t\tif (srt.charAt(k) == '0') {\r\n\t\t\t\t// if it's 0 add Zero Matrix to the matrix\r\n\t\t\t\tTempArr = AddToArr(TempArr, Zero, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '1') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, One, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '2') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Two, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '3') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Three, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '4') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Four, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '5') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Five, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '6') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Six, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '7') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Seven, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '8') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Eight, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == '9') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, Nine, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'a') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ALetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'b') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, BLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'c') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, CLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'd') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'e') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ELetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'f') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, FLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'g') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, GLetter, 4, Xoffset);\r\n\r\n\t\t\t\t// G is a bigger number so I just add 1 to offset\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'h') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, HLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'i') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ILetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'j') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, JLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'k') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, KLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'l') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, LLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'm') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, MLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'n') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, NLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == 'o') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, OLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'p') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, PLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'q') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, QLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'r') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, RLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 's') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, SLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 't') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, TLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'u') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ULetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'v') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, VLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'w') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, WLetter, 5, Xoffset);\r\n\r\n\t\t\t\tXoffset += 2;\r\n\t\t\t} else if (srt.charAt(k) == 'x') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, XLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'y') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, YLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == 'z') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ZLetter, 4, Xoffset);\r\n\r\n\t\t\t\tXoffset += 1;\r\n\t\t\t} else if (srt.charAt(k) == ' ') {\r\n\t\t\t\tXoffset -= 2;\r\n\t\t\t\t// space is too big number so I just sub 2 from offset\r\n\r\n\t\t\t} else if (srt.charAt(k) == '-') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, DashLetter, 3, Xoffset);\r\n\r\n\t\t\t} else if (srt.charAt(k) == ':') {\r\n\r\n\t\t\t\tTempArr = AddToArr(TempArr, ColonLetter, 3, Xoffset);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tXoffset += 4;\r\n\t\t}\r\n\t\treturn TempArr;\r\n\t}", "private static void initSet1(String[] set1) {\n\t\tset1[0] = \"rs36129689\";\n\t\tset1[1] = \"rs36153986\";\n\t\tset1[2] = \"rs493934\";\n\t\tset1[3] = \"rs36146958\";\n\t\tset1[4] = \"rs36197089\";\n\t\tset1[5] = \"rs35773247\";\n\t\tset1[6] = \"rs35346884\";\n\t\tset1[7] = \"rs493040\";\n\t\tset1[8] = \"rs35473000\";\n\t\tset1[9] = \"rs123456\";\n\t\tset1[10] = \"rs1234567\";\n\t\tset1[11] = \"rs12345678\";\n\t\tset1[12] = \"rs1234234\";\n\t\tset1[13] = \"rs492232\";\n\t\tset1[14] = \"rs492184\";\n\t\tset1[15] = \"rs123123\";\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_5() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(3, 5, 0, 10, false, 16, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void setText(String text) {\n \tif (_assocModel == null) return;\n\t\tString mult;\n\t\tPattern p = Pattern.compile(\"([\\\\d]|\\\\Q*\\\\E)([.]{2}+([\\\\d]|\\\\Q*\\\\E))?\");\t// regex for multiplicities: (digit | *) + optional(.. (digit | *))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// can use a Collection to handle multiplicities of *; we really only care about\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// the upper bound also\n\t\tMatcher m = p.matcher(text);\n\t\t// regex didn't find anything, so we'll assign a default multiplicity\n\t\tif (!m.find() || m.group().length() < 0) {\n\t\t\tmult=\"1\";\n\t\t}\n\t\telse mult = m.group();\n\t\t_assocModel.setMultiplicity(mult);\n\t\tsuper.setText(mult);\n\t}", "public Integer getResnr() {\n\t\treturn this.resnr;\n\t}", "static void perform_xri(String passed){\n\t\tint type = type_of_xri(passed);\n\t\tif(type==1)\n\t\t\txri_with_acc(passed);\n\t}", "private void inzsr() {\n\t\tid1Ctdta = 1;\n\t\tstrCtdta = \"Each KGS \";\n\t\tfor (int idxCtdta = 1; idxCtdta <= 1; idxCtdta++) {\n\t\t\tum[idxCtdta] = subString(strCtdta, id1Ctdta, 11);\n\t\t\tid1Ctdta = Integer.valueOf(id1Ctdta + 11);\n\t\t}\n\t\t// Initialise message subfile\n\t\tnmfkpinds.setPgmInd32(true);\n\t\tstateVariable.setZzpgm(replaceStr(stateVariable.getZzpgm(), 1, 8, \"WWCONDET\"));\n\t\t// - Set date\n\t\tstateVariable.setZzdate(getDate().toInt());\n\t\t// -\n\t\t// - CONTRACT\n\t\tcontractHeader.retrieve(stateVariable.getXwordn());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// - CUSTOMER\n\t\tpurchases.retrieve(stateVariable.getXwbccd());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00012 Debtor not found on Purchases\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwg4tx(all(\"-\", 40));\n\t\t}\n\t\t// - REPRESENTATIVE\n\t\tsalespersons.retrieve(stateVariable.getPerson());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00013 Rep not found on Salespersons\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setPname(all(\"-\", 34));\n\t\t}\n\t\t// - STATUS\n\t\torderStatusDescription.retrieve(stateVariable.getXwstat());\n\t\tnmfkpinds.setPgmInd99(! lastIO.isFound());\n\t\t// BR00014 Status not found on Order_status_description\n\t\tif (nmfkpinds.pgmInd99()) {\n\t\t\tstateVariable.setXwsdsc(all(\"-\", 20));\n\t\t}\n\t}", "public String designPN(String nr)\r\n {\r\n String newStr=\"(\";\r\n if(nr.length()!=10){return null;}\r\n else\r\n {\r\n newStr=newStr+nr.substring(0,4)+\")-\";\r\n // System.out.println(\"phase 1 \"+ newStr);\r\n newStr=newStr+nr.substring(4,7)+\"-\";\r\n // System.out.println(\"phase 2 \"+ newStr);\r\n newStr=newStr+nr.substring(7,10);\r\n // System.out.println(\"phase 3 \"+ newStr);\r\n }\r\n return newStr;\r\n\r\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_7() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void readArmies(){\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n vertices.get(Integer.parseInt(armyLine[1])-1).addArmies(Integer.parseInt(armyLine[2]));\n System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n // Read countries armies for AI agents\n\n for ( j= 0;j<countriesArmyLines.size();j++) {\n String [] armyLine = countriesArmyLines.get(j).split(\" \");\n allSCountries.get(Integer.parseInt(armyLine[1])).setNumberArmies(Integer.parseInt(armyLine[2]));\n // System.out.println(\"army \"+vertices.get(j).getNumberArmies());\n }\n NState.globalState.allCountries=allSCountries;\n }", "public static String guessResidueTypeFromFeatureLength(int seqLength,\n int featureLength) {\n float basepairsPerResidue = (Math.abs((float)featureLength/\n (float)seqLength));\n return (basepairsPerResidue > 2.0 ? SequenceI.AA : SequenceI.DNA);\n }", "void adobe_coeff( CharPtr make, CharPtr model) {\n \n adobe_coeff( make.toString(), model.toString());\n}", "private static String lllIIllIl(short IIIlIIlllllIIll, String IIIIlIlllllIIll) {\n }", "public String getRelationIdString(SpatialElement se1, String se1Role, SpatialElement se2, String se2Role, SpatialElement se3, String se3Role) {\n String idString = \"\";\n if (se1 != null && se2 != null && se3 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n se3.role = se3Role;\n idString = se1.id+\"-\"+se2.id+\"-\"+se3.id;\n }\n else if (se1 != null && se2 != null) {\n se1.role = se1Role;\n se2.role = se2Role;\n idString = se1.id+\"-\"+se2.id+\"-null\";\n }\n else if (se1 != null && se3 != null) {\n se1.role = se1Role;\n se3.role = se3Role;\n idString = se1.id+\"-null-\"+se3.id;\n }\n else if (se2 != null && se3 != null) {\n se2.role = se2Role;\n se3.role = se3Role;\n idString = \"null-\"+se2.id+\"-\"+se3.id;\n }\n return idString;\n }", "public String[] getVariants_ru(int[] randIds){\n Cursor crs;\n String[] variants_ru = new String[4];\n for(int i = 0; i< 4; i++){\n String[] args = new String[1];\n args[0] = Integer.toString(randIds[i]+1);\n crs = aniDB.getReadableDatabase().rawQuery(\"SELECT name_ru FROM titles WHERE id = ?\",args);\n if(crs.moveToFirst()) {\n variants_ru[i] = crs.getString(crs.getColumnIndex(\"name_ru\"));\n }\n crs.close();\n }\n return variants_ru;\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_9() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tint[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tint[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void setSpare3(String spare3) {\r\n this.spare3 = spare3;\r\n }", "public void restricciones(String oraciones){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Restricciones semanticas\");\n alert.setHeaderText(oraciones);\n alert.showAndWait();\n }", "void mo8715r(String str, String str2, String str3);", "static int type_of_inr(String passed){\n\t\tif(general_registers.contains(passed.charAt(4)))\n\t\t\treturn 1;\n\t\telse if(passed.charAt(4)=='M')\n\t\t\treturn 2;\n\t\telse\n\t\t\treturn 0;\n\t}", "public void setRemark3(java.lang.String _remark3)\r\n {\r\n this._remark3 = _remark3;\r\n }", "public Recipe(String[] in)\r\n {\r\n double temp;\r\n if (in.length == 3){\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2];\r\n this.w_qty = makeDecimal(in[0]);\r\n }\r\n else {if (in.length == 5) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3] + \" \" + in[4];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = Double.parseDouble(in[0])+ temp;\r\n }\r\n else if (in.length == 4) {\r\n if (in[1].contains(\"/\")) {\r\n this.origQty = in[0] + \" \" + in[1];\r\n this.measure = in[2];\r\n this.ingredient = in[3];\r\n temp = makeDecimal(in[1]);\r\n this.w_qty = temp + Double.parseDouble(in[0]);}\r\n else {\r\n this.origQty = in[0];\r\n this.measure = in[1];\r\n this.ingredient = in[2] + \" \" + in[3];\r\n this.w_qty = makeDecimal(in[0]);}\r\n }\r\n }\r\n this.working_measure = measure;\r\n this.final_measure = measure;\r\n }", "public /* synthetic */ CinemaDescriptionItem(String str, int i2, int i3, f fVar) {\n this(str, (i3 & 2) != 0 ? 3 : i2);\n }", "private static int _addPossibleValues(int rowNumber, int y, int x, short[][] spareMatrix,String[] rowIds, SudokuModel model) {\r\n\r\n\t\tfor(short i = 0; i <9; i++){\r\n\t\t\tif(!model.restrictionIsSatisfied(y, x, i+1))\r\n\t\t\trowNumber = _addRestrictions(rowNumber,y,x,i,spareMatrix,rowIds);\r\n\t\t}\r\n\t\t\r\n\t\treturn rowNumber;\r\n\t}", "public static void loadMatric(int matr[][]) throws IOException{\n\n\t\tfor(int i=0;i<7;i++){\n\t\t\tfor(int j=0;j<6;j++){\n\t\t\t\tSystem.out.print(\"INSERISCI\"+i+j+\": \");\n\t\t\t\tSystem.out.flush();\n\t\t\t\tmatr[i][j]=System.in.read()-'0';\n\t\t\t\tSystem.in.skip(2);\n\t\t\t}}}", "public TextPropDefaultViewModel_ textWithDefaultQuantityRes(@PluralsRes int pluralRes,\n int quantity, Object... formatArgs) {\n onMutation();\n assignedAttributes_epoxyGeneratedModel.set(0);\n textWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);\n return this;\n }", "public boolean restrizione14()\r\n\t\tthrows RestrizioniSpecException\r\n\t\t{\r\n\t\tfor (int i = 0; i < this.equivalenzeInput.size(); i++)\r\n\t\t\t{\r\n\t\t\t// si preleva il nome dell'interazione di output connessa a questa componente\r\n\t\t\tAttacDecl attacDecl = this.attacsDeclInput.get(i);\r\n\t\t\tString string = attacDecl.getOutputInteraction();\r\n\t\t\t// si preleva la relativa equivalenza\r\n\t\t\tIEquivalenza equivalenza = this.equivalenzeInput.get(i);\r\n\t\t\t// si preleva l'azione corrispondente a string\r\n\t\t\tAction action = equivalenza.getActionFromName(string);\r\n\t\t\tif (action == null)\r\n\t\t\t\t{\r\n\t\t\t\tString string2 = equivalenza.getAEIdecl().getName();\r\n\t\t\t\tthrow new RestrizioniSpecException(\"The \"+string+\" action of instance \"+\r\n\t\t\t\t\t\tstring2+\" don't found\");\r\n\t\t\t\t}\r\n\t\t\tActionRate actionRate = action.getRate();\r\n\t\t\tif (!(actionRate instanceof RateInf))\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\treturn true;\r\n\t\t}", "public void setNoOfRelevantLines(int norl) { this.noOfRelevantLines = norl; }", "void playYearOfPlentyCard(String resource1, String resource2);", "public int cuantosRenglones() \r\n\t{\r\n\t\tString respuesta = JOptionPane.showInputDialog(\"cuantas renglones quiere\");\r\n\t\tint respuesta1 = Integer.parseInt(respuesta);\r\n\t\treturn respuesta1;\r\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "java.lang.String getNum1();", "static int size_of_rrc(String passed){\n\t\treturn 1;\n\t}", "public void agregarpal(String n) {\n\n switch (pos) {\n case 0:\n pal1 = n;\n case 1:\n pal2 = n;\n case 2:\n pal3 = n;\n case 3:\n pal4 = n;\n case 4:\n pal5 = n;\n break;\n }//fin switch\n\n pos++;\n }", "public void int3_m() {\n\t\t\n\t}", "public static void muestraArreglo(int[] arreglo) {\r\n\t\tfor (int i = 0; i < arreglo.length; i++) {\r\n\t\t\tescribir(\"[\" + arreglo[i] + \"]\", false);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tRandom rand = new Random();\n\t\tint first = rand.nextInt(7);\n\t\tint second = rand.nextInt(7);\n\t\tint third = rand.nextInt(7);\n\t\t\n\t\tint middle = rand.nextInt(741);\n\t\t\n\t\tint last = rand.nextInt(9999);\n\t\t\n\t\tString middleString= Integer.toString(middle);\n\t\tString lastString = Integer.toString(last); \n\t\tString firstString = Integer.toString(first);\n\t\tString secondString = Integer.toString(second);\n\t\tString thirdString = Integer.toString(third);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\twhile (middleString.length()<3) {\n\t\t\tmiddleString = \"0\" + middleString;\n\t\t\t\n\t\t}\n\t\t\n\t\twhile (lastString.length()<4){\n\t\t\tlastString = \"0\" + lastString;\n\t\t}\n\t\t\n\t\tSystem.out.println(firstString + secondString + thirdString + \"-\"+ middleString +\"-\"+ lastString);\n\t\t\n\t\t\n\t}", "public boolean hasResidues() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_8() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tcollector.checkThat(roc.generateIntegerSequences(4, LENGTH, MIN, MAX, REPLACEMENT, BASE), notNullValue());\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public String getChoice3(int a){\n String choice2 = choices[a][2];\n return choice2;\n }", "@Override\n\tpublic void setStreet3(java.lang.String street3) {\n\t\t_candidate.setStreet3(street3);\n\t}", "static void initSample4(){\n // put values into the sField\n sField[5][4] = \"X\";\n sField[4][5] = \".\";\n sField[3][6] = \"X\";\n sField[2][7] = \"X\";\n sField[1][8] = \"X\";\n \n sField[1][5] = \"O\";\n sField[1][6] = \"O\";\n sField[1][7] = \".\"; \n }", "private String theFunctionThatSolvesAllProblems(String input) throws IOException {\n\n first = new MyInt[9];\n second = new MyInt[9];\n third = new MyInt[9];\n myPointers = new MyIntPointer[7];\n\n M = new MyInt();\n D = new MyInt();\n C = new MyInt();\n L = new MyInt();\n X = new MyInt();\n V = new MyInt();\n I = new MyInt();\n\n hasI = false;\n hasX = false;\n hasC = false;\n hasM = false;\n hasV = false;\n hasL = false;\n hasD = false;\n\n firstLength = 0;\n secondLength = 0;\n thirdLength = 0;\n\n initializeEquation(input);\n\n return arabic();\n\n }", "public StrumInstrument(String type, String manufacturer, int nrStrings, double stringSize) {\n super(type, manufacturer);\n this.nrStrings = nrStrings;\n this.stringSize = stringSize;\n }", "public int[] contarCodons(String seq){\n int [] countCodons=new int[65];\n for (int i=0;i<seq.length()-2;i=i+3){\n String c=seq.substring(i, i+3);\n int j=0;\n while (j<nameCodon.length && nameCodon[j].compareTo(c)!=0) j++;\n if (j<nameCodon.length)\n countCodons[j]++;\n else\n countCodons[64]++;\n }\n return countCodons;\n\n }", "public void setSecondary3(java.lang.String secondary3) {\n this.secondary3 = secondary3;\n }", "@Test\n public void execute_nricParameter() throws ParseException {\n //No user input\n execute_parameterPredicate_test(0, \" \", \"nric\", true, false, Collections.emptyList());\n //Single keyword, ignore case, person found.\n execute_parameterPredicate_test(1, \"s1234567A\", \"nric\", true, false, Arrays.asList(ALICE));\n //Single keyword, case sensitive, no one found.\n execute_parameterPredicate_test(0, \"s1234567A\", \"nric\", false, false, Collections.emptyList());\n //Multiple keywords, ignore case, or condition, multiple people found\n execute_parameterPredicate_test(2, \"S1234567a S5234569A\", \"nric\", true, false, Arrays.asList(ALICE, GEORGE));\n //Multiple keywords, ignore case, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", true, true, Collections.emptyList());\n //Multiple keywords, case sensitive, or condition, one person found\n execute_parameterPredicate_test(1, \"S1234567a S5234569A\", \"nric\", false, false, Arrays.asList(GEORGE));\n //Multiple keywords, case sensitive, and condition, no one found\n execute_parameterPredicate_test(0, \"S1234567a S5234569A\", \"nric\", false, true, Collections.emptyList());\n }", "@Nullable public abstract String loadVerseText(int ari);", "public void setIDINTERNODC(int value) {\n this.idinternodc = value;\n }", "public int getImageResourceIdForExercise(Context context){\n\n TypedArray imagesArray = context.getResources().obtainTypedArray(R.array.images_array);\n int id = 0;\n\n if(musclePart == 1) {\n return imagesArray.getResourceId((exeNumber -1),0);\n }else {\n for (int i = 1; i < imagesArray.length(); i++) {\n if(i == (((musclePart - 1) * 6) + exeNumber) - 1){\n id = imagesArray.getResourceId(i,0);\n break;\n }\n }\n }\n imagesArray.recycle();\n return id;\n }", "static void lxi_to_reg_pair(String passed){\n\t\tchar fourth = passed.charAt(4);\n\t\tif(fourth=='B'){\n\t\t\tregisters.put('B', passed.substring(6,8));\n\t\t\tregisters.put('C', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='D'){\n\t\t\tregisters.put('D', passed.substring(6,8));\n\t\t\tregisters.put('E', passed.substring(8));\n\t\t}\n\t\telse if(fourth=='H'){\n\t\t\tregisters.put('H', passed.substring(6,8));\n\t\t\tregisters.put('L', passed.substring(8));\n\t\t}\n\t}", "public void mo32111rr(int i) {\n }", "static int size_of_lxi(String passed){\n\t\treturn 3;\n\t}", "@Test\r\n\tpublic void testPositiveGenerateIntegerSequences_10() {\n\t\tint i = 1;\r\n\t\tfor (RandomOrgClient roc : rocs) {\r\n\t\t\ttry {\r\n\t\t\t\tString[][] response = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tString[][] response2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, identifier);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t\tresponse = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, notNullValue());\r\n\t\t\t\t\r\n\t\t\t\tresponse2 = roc.generateIntegerSequences(4, LENGTH, MIN, MAX, \r\n\t\t\t\t\t\tREPLACEMENT, BASE, date);\r\n\t\t\t\tcollector.checkThat(response, equalTo(response2));\r\n\t\t\t\t\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tcollector.addError(new Error(errorMessage(i, e, true)));\r\n\t\t\t}\r\n\t\t\ti++;\r\n\t\t}\r\n\t}", "public void setResearchno(String researchno) {\r\n\t\tthis.researchno = researchno;\r\n\t}", "public static void main(String[] args) {\n //The letters are randomly chosen through this block of code with use of ASCII code.\n char let1 = (char) ((int)(Math.random() * 26 + 65));\n char let2 = (char) ((int)(Math.random() * 26 + 65));\n char let3 = (char) ((int)(Math.random() * 26 + 65));\n \n //This generates a number of four digits to follow the letters. \n int num = (int)(Math.random() * 9000 + 999);\n \n //The combination is now printed to the screen through this. \n System.out.println(\"The plate number is \" + let1 + let2 +let3 + num); \n }" ]
[ "0.6329081", "0.6194227", "0.54719037", "0.5433558", "0.53454846", "0.518184", "0.49376035", "0.48442668", "0.4724605", "0.47152042", "0.46729997", "0.46720904", "0.46649334", "0.46318775", "0.45997924", "0.45697337", "0.4542916", "0.45292935", "0.4528893", "0.4520108", "0.4519737", "0.44881666", "0.44780436", "0.44735065", "0.44489574", "0.44477877", "0.444215", "0.44362456", "0.44323435", "0.44189802", "0.44128108", "0.44005463", "0.4376711", "0.43688625", "0.43648276", "0.43617478", "0.43591163", "0.43416727", "0.4335052", "0.43315908", "0.4329952", "0.43269566", "0.43071407", "0.43052205", "0.4292204", "0.4291854", "0.42805734", "0.4268324", "0.42664614", "0.42613685", "0.42600182", "0.42569944", "0.4249713", "0.42468822", "0.42467374", "0.42442796", "0.4241471", "0.42339703", "0.4233759", "0.42332256", "0.42295268", "0.42280847", "0.4224324", "0.42241433", "0.42238563", "0.42236635", "0.42236212", "0.4223061", "0.4221378", "0.42211592", "0.42188528", "0.42151642", "0.4209863", "0.42045972", "0.42030525", "0.42028436", "0.42011267", "0.41935775", "0.41925663", "0.4190933", "0.41856375", "0.4185583", "0.418238", "0.4180645", "0.4177586", "0.41763222", "0.41750142", "0.4172534", "0.4164202", "0.41633672", "0.41617814", "0.4157633", "0.41560853", "0.4150837", "0.4150766", "0.4150187", "0.41422424", "0.41411856", "0.4141147", "0.4139943" ]
0.5128492
6
optional int32 target_pos = 5; Index in target protein that this decoy protein is from
public boolean hasTargetPos() { return ((bitField0_ & 0x00000008) == 0x00000008); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTargetPos();", "public int getTargetPos() {\n return targetPos_;\n }", "public int getTargetPos() {\n return targetPos_;\n }", "public void setTargetPos(final int target) {\n \n switch(target){\n // Set target position right from current position\n case T_RIGHT:\n if(this.columnT < this.buffer.get(lineT).size()) // Check if position exists\n this.columnT++;\n break;\n // Set target position left from current position\n case T_LEFT:\n if(this.columnT > 0) // Check if position exists\n this.columnT--;\n break;\n // Set target position up from current position\n case T_UP:\n if(this.lineT > 0) { // Check if position exists\n this.lineT--;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position down from current position\n case T_DOWN:\n if(this.lineT < this.buffer.size() - 1) { // Check if position exists\n this.lineT++;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position to first position\n case T_HOME:\n this.columnT = 0;\n break;\n // Set target position to last position\n case T_END:\n this.columnT = this.buffer.get(lineT).size();\n break;\n default:\n System.out.println(\"Invalid target position\");\n break;\n }\n }", "@Override\n public int getTargetPosition() {\n return 0;\n }", "public Contig getTarget() { return target; }", "N getTarget();", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "@InVertex\n Object getTarget();", "public ObjectSequentialNumber getTarget() {\n return target;\n }", "public int getTargetArgIndex() {\n\t\treturn this.targetArgIndex;\n\t}", "TrgPlace getTarget();", "public Builder setTargetPos(int value) {\n bitField0_ |= 0x00000008;\n targetPos_ = value;\n onChanged();\n return this;\n }", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public Integer getTargetID()\r\n\t\t{ return mapping.getTargetId(); }", "BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }", "@Override\n public Vertex getTarget() {\n return targetVertex;\n }", "public void SetTargetOffset(int target_offset) {\n target_offset_ = target_offset;\n }", "public int advanceStartPosition(int target) throws IOException {\n // Naive implementations; subclasses may provide a faster version.\n int pos;\n do {\n pos = nextStartPosition();\n } while (pos < target && pos != NO_MORE_POSITIONS);\n return pos;\n }", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "boolean hasTargetPos();", "public Integer getTargetid() {\n return targetid;\n }", "public Point getTarget() {\n\t\treturn _target;\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}", "public long getTargetId() {\n return targetId;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public void setTargeted() {\n targeted ++;\n }", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "public Point getTarget()\n\t{\n\t\treturn this.target;\n\t}", "public Living getTarget();", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "public Entity.ID getTargetID() {\n return targetID;\n }", "public EntityID getTarget() {\n\t\treturn target.getValue();\n\t}", "public abstract int getSourceIndex(int index);", "private int findPos(byte[] contents, String target)\n {\n String contentsStr = null;\n try\n {\n contentsStr = new String(contents, \"ISO-8859-1\");\n }\n catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n return contentsStr.indexOf(target);\n }", "@Override\n\tpublic int getTargetParameter() {\n\t\treturn 0;\n\t}", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "public static void testDiGui(int[] candidates, int target, int start) {\n\n if (target == 0) {\n return;\n } else if (target < 0) {\n return;\n } else {\n for (int i = start; i < candidates.length && candidates[i] > 0; i++) {\n\n System.out.println(candidates[i]);\n target = candidates[i];\n i++;\n testDiGui(candidates, target, i);\n target = -1;\n }\n }\n\n System.out.println(target);\n }", "public StateID GetTarget()\n {\n return targetID;\n }", "public int findPosition(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 <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "String getTarget();", "String getTarget();", "public Player getTarget() {\n return target;\n }", "public Vector getTargets(){\n return targets;\n }", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }", "@Override\n\tpublic void findTarget(List<Combat> other) {\n\t}", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "public CPointer<BlenderObject> getTarget() throws IOException\n\t{\n\t\tlong __dna__targetAddress;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 128);\n\t\t} else {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 104);\n\t\t}\n\t\tClass<?>[] __dna__targetTypes = new Class[]{BlenderObject.class};\n\t\treturn new CPointer<BlenderObject>(__dna__targetAddress, __dna__targetTypes, __io__blockTable.getBlock(__dna__targetAddress, BlenderObject.__DNA__SDNA_INDEX), __io__blockTable);\n\t}", "public static Direction offsetTarget(MapLocation target) throws GameActionException {\n\t\tfloat offsetDistMax = 2.5f;\n\t\tMapLocation newTarget = null;\n\t\tint c = 0;\n\t\twhile (newTarget == null) {\n\t\t\tc++;\n\t\t\ttry{\n\t\t\t\tDirection dir = myLoc.directionTo(target);\n\t\t\t\t\n\t\t\t\tif (c > 5) {\n\t\t\t\t\tdir = myLoc.directionTo(target);\n\t\t\t\t\tnewTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (Math.random() > 0.5) dir = dir.rotateLeftDegrees(90);\n\t\t\t\telse dir = dir.rotateRightDegrees(90);\n\t\t\t\t\n\t\t\t\tfloat offsetDist = (float) (Math.random()*offsetDistMax);\n\n\t\t\t\tnewTarget = target.add(dir, offsetDist);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tdebug_print(\"blah: \" + e.getMessage());\n\t\t\t\te.getMessage();\n\t\t\t}\n\n\t\t}\n\t\tdebug_dot(newTarget, 225, 100, 0);\n\t\treturn myLoc.directionTo(newTarget);\n\t}", "public java.lang.String getTargetNumber() {\r\n return targetNumber;\r\n }", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public DNode getTo() { return targetnode; }", "public void toSelectingAttackTarget() {\n }", "public double getTargetX() {\n return m_targetX;\n }", "public Spatial getTarget() {\r\n return target;\r\n }", "com.google.protobuf.ByteString getTargetBytes();", "private static int predictDistance(Position source, Position target) {\n int x = source.getX() - target.getX();\n int y = source.getY() - target.getY();\n int c = (int)Math.ceil(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n return c;\n }", "public void setTarget_table(String target_table) {\n this.target_table = target_table;\n }", "private byte[] getTarget( byte[] buffer ){\n \tbyte target[] = new byte[Constants.TARGET_ID_LEN];\n \tfor (int i=0; i<Constants.TARGET_ID_LEN; i++){\n \t\ttarget[i] = buffer[i + Constants.MESSAGE_ID_LEN + 1];\n \t}\n \treturn target;\n }", "@Test\n\tpublic void testTargetsFourSteps() {\n\t\tboard.calcTargets(14, 24, 4);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 20)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 23)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t}", "public Iterator<Point> getPointAt(ModelObject target, int pos);", "Object getTarget();", "Object getTarget();", "private Position computeTargetConsideringLead(Position sourcePos, TargetGridElement targetGridElement) {\r\n\r\n // Target-Position & velocity-Vector\r\n Position targetPosition = targetGridElement.getCurrentGridElementPosition();\r\n Direction targetPosDirection = Directions.of(targetPosition.getDirection(), targetGridElement.getTargetVelocity());\r\n\r\n // Source-Position & velocity-Vector\r\n double angleBetweenSourceAndTarget = sourcePos.calcAngleRelativeTo(targetPosition);\r\n sourcePos = sourcePos.rotate(angleBetweenSourceAndTarget);\r\n Direction sourcePosDirection = Directions.of(sourcePos.getDirection(), velocity);\r\n\r\n Float64Vector targetVMinusSourceV = targetPosition.getVector().minus(sourcePos.getVector());\r\n double a = targetPosDirection.getVector().normValue() * targetPosDirection.getVector().normValue()\r\n - (sourcePosDirection.getVector().normValue() * sourcePosDirection.getVector().normValue());\r\n double b = 2 * targetVMinusSourceV.times(targetPosDirection.getVector()).doubleValue();\r\n double c = targetVMinusSourceV.normValue() * targetVMinusSourceV.normValue();\r\n\r\n if (a >= 0) {\r\n return targetPosition;\r\n }\r\n double sqrt = Math.sqrt(b * b - 4 * a * c);\r\n double dt1 = solveQuadraticFormula(a, b, sqrt, -1);\r\n double dt = computeDeltaT(a, b, sqrt, dt1);\r\n Float64Vector targetDirVectorWithTime = targetPosDirection.getVector().times(dt);\r\n return Positions.of(targetPosition.getX() + targetDirVectorWithTime.getValue(0), targetPosition.getY() + targetDirVectorWithTime.getValue(1),\r\n sourcePos.getZ());\r\n }", "@VisibleForTesting\n int[] findMatches(Token[] source, Token[] target) {\n final LevenshteinDistance table = new LevenshteinDistance(source, target);\n table.calculate();\n final int targetLen = target.length;\n final int[] result = new int[targetLen];\n LevenshteinDistance.EditOperation[] ops = table.getTargetOperations();\n for (int i = 0; i < targetLen; ++i) {\n if (ops[i].getType() == LevenshteinDistance.EDIT_UNCHANGED) {\n result[i] = ops[i].getPosition();\n } else {\n result[i] = -1;\n }\n }\n return result;\n }", "private void populateGUI(TargetDecoyMap targetDecoyMap) {\n\n ValidationQcParameters validationQCPreferences = identificationParameters.getIdValidationParameters().getValidationQCParameters();\n\n // Validation level\n validationLevelJComboBox.setSelectedItem(psParameter.getMatchValidationLevel().getName());\n\n // Database info\n FastaParameters fastaParameters = identificationParameters.getFastaParameters();\n boolean targetDecoy = fastaParameters.isTargetDecoy();\n\n if (!targetDecoy) {\n\n targetDecoyLbl.setText(\"Target only\");\n targetDecoyLbl.setForeground(Color.red);\n\n } else {\n\n targetDecoyLbl.setForeground(GREEN);\n\n }\n\n try {\n\n FastaSummary fastaSummary = FastaSummary.getSummary(fastaFile, fastaParameters, null);\n int nTarget = fastaSummary.nTarget;\n nTargetLbl.setText(nTarget + \" target sequences\");\n\n if (nTarget < 10000) {\n\n nTargetLbl.setForeground(Color.red);\n\n } else if (nTarget > 1000000) {\n\n nTargetLbl.setForeground(ORANGE);\n\n } else {\n\n nTargetLbl.setForeground(GREEN);\n\n }\n\n } catch (IOException iOException) {\n\n nTargetLbl.setText(\"Database size not available\");\n nTargetLbl.setForeground(Color.red);\n\n }\n\n // Target/Decoy group\n ((TitledBorder) targetDecoyGroupPanel.getBorder()).setTitle(\"Target/Decoy Distributions\");\n targetDecoyGroupPanel.repaint();\n if (targetDecoy) {\n int nTargetOnly = targetDecoyMap.getnTargetOnly();\n matchesBeforeFirstDecoyLbl.setText(nTargetOnly + \" matches before the first decoy hit\");\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n double desiredThreshold = targetDecoyResults.getUserInput();\n double nTargetLimit = 100.0 / desiredThreshold;\n if (nTargetOnly < nTargetLimit) {\n matchesBeforeFirstDecoyLbl.setForeground(Color.red);\n } else {\n matchesBeforeFirstDecoyLbl.setForeground(GREEN);\n }\n recommendedNumberOfTargetHitsLbl.setText(\"Recommended: \" + Util.roundDouble(nTargetLimit, 0) + \" matches before the first decoy hit\");\n\n double resolution = targetDecoyMap.getResolution();\n confidenceResolutionLbl.setText(\"PEP/Confidence resolution of \" + Util.roundDouble(resolution, 2) + \"%\");\n\n double minResolution = desiredThreshold;\n if (resolution > 10 * minResolution) {\n confidenceResolutionLbl.setForeground(Color.red);\n } else if (resolution > minResolution) {\n confidenceResolutionLbl.setForeground(ORANGE);\n } else {\n confidenceResolutionLbl.setForeground(GREEN);\n }\n recommendedResolutionLbl.setText(\"Recommended: resolution < \" + Util.roundDouble(minResolution, 2) + \"%\");\n } else {\n matchesBeforeFirstDecoyLbl.setText(\"No decoy\");\n matchesBeforeFirstDecoyLbl.setForeground(Color.gray);\n confidenceResolutionLbl.setText(\"Impossible to estimate confidence resolution\");\n confidenceResolutionLbl.setForeground(Color.gray);\n }\n\n // Target/decoy results\n if (targetDecoy) {\n \n double confidence = psParameter.getConfidence();\n MatchValidationLevel matchValidationLevel = psParameter.getMatchValidationLevel();\n validationStatusLbl.setText(\"Validation Status: \" + matchValidationLevel.getName());\n\n switch (matchValidationLevel) {\n case confident:\n validationStatusLbl.setForeground(GREEN);\n break;\n \n case doubtful:\n validationStatusLbl.setForeground(ORANGE);\n break;\n\n case not_validated:\n validationStatusLbl.setForeground(Color.red);\n break;\n\n case none:\n validationStatusLbl.setForeground(Color.gray);\n }\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n String validationThresholdTxt = \"\";\n double threshold = targetDecoyResults.getUserInput();\n int thresholdType = targetDecoyResults.getInputType();\n if (thresholdType == 0) {\n validationThresholdTxt += \"Validation Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 1) {\n validationThresholdTxt += \"FDR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 2) {\n validationThresholdTxt += \"FNR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n }\n validationThresholdLbl.setText(validationThresholdTxt);\n\n confidenceLbl.setText(\"Confidence: \" + Util.roundDouble(confidence, 2) + \"%\");\n double validationThreshold = targetDecoyResults.getConfidenceLimit();\n confidenceThresholdLbl.setText(\"Expected Confidence: \" + Util.roundDouble(validationThreshold, 2) + \"%\");\n double margin = validationQCPreferences.getConfidenceMargin() * targetDecoyMap.getResolution();\n double confidenceThreshold = validationThreshold + margin;\n if (confidenceThreshold > 100) {\n confidenceThreshold = 100;\n }\n confidenceThresholdLbl.setText(\"Confident confidence: \" + Util.roundDouble(confidenceThreshold, 2) + \"%\");\n if (confidence < validationThreshold) {\n confidenceLbl.setForeground(Color.red);\n } else if (confidence < confidenceThreshold) {\n confidenceLbl.setForeground(ORANGE);\n } else {\n confidenceLbl.setForeground(GREEN);\n }\n } else {\n validationStatusLbl.setText(\"Validation Status: \" + psParameter.getMatchValidationLevel().getName());\n validationThresholdLbl.setText(\"Impossible to estimate validation threshold\");\n confidenceLbl.setText(\"Impossible to estimate confidence\");\n confidenceThresholdLbl.setText(\"Impossible to estimate confidence threshold\");\n validationStatusLbl.setForeground(Color.gray);\n confidenceLbl.setForeground(Color.gray);\n }\n\n // Quality filters\n final DefaultTableModel tableModel = new FiltersTableModel();\n qualityFiltersTable.setModel(tableModel);\n qualityFiltersTable.getColumn(\"\").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setCellRenderer(new TrueFalseIconRenderer(\n new ImageIcon(this.getClass().getResource(\"/icons/accept-new.png\")),\n new ImageIcon(this.getClass().getResource(\"/icons/error-new.png\")),\n \"Yes\", \"No\"));\n\n int valid = 0;\n for (String qcCheck : psParameter.getQcCriteria()) {\n if (psParameter.isQcPassed(qcCheck)) {\n valid++;\n }\n }\n ((TitledBorder) qualityFiltersPanel.getBorder()).setTitle(\"Quality Filters (\" + valid + \"/\" + psParameter.getQcCriteria().size() + \")\");\n }", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public T getPater(T target) {\r\n int index = getIndex(target);\r\n if (index * 2 + 1 >= SIZE) {\r\n return null;\r\n } else if (tree[index * 2 + 1] == null) {\r\n return null;\r\n } else {\r\n return tree[index * 2 + 1];\r\n }\r\n }", "@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();", "java.lang.String getTarget();", "java.lang.String getTarget();", "protected void FacetoTarget(Character pc, Object target) {\n int dx, dy;\n if (target instanceof Character) {\n dx = ((Character) target).x - pc.x;\n dy = ((Character) target).y - pc.y;\n } else if (target instanceof Envir_Item) {\n dx = ((Envir_Item) target).getX() - bottom_screen.left - pc.x;\n dy = ((Envir_Item) target).getY() - bottom_screen.top - pc.y;\n } else {\n return;\n }\n\n if (Math.abs(dx) >= Math.abs(dy)) {\n if (dx > 0) {\n pc.setDir(2);\n } else {\n pc.setDir(1);\n }\n } else {\n if (dy > 0) {\n pc.setDir(0);\n } else {\n pc.setDir(3);\n }\n }\n }", "public String targetId() {\n return this.targetId;\n }", "public void processTargetTracker (Entity squad, Entity target, boolean contactEnd) {\n\t}", "final int getNextBuildTarget(int difficulty) {\n/* 1970 */ difficulty = Math.min(5, difficulty);\n/* 1971 */ int start = difficulty * 3;\n/* 1972 */ int templateFound = -1;\n/* */ int x;\n/* 1974 */ for (x = start; x < 17; x++) {\n/* */ \n/* 1976 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1978 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 1983 */ if (templateFound == -1)\n/* */ {\n/* */ \n/* 1986 */ for (x = start; x > 0; x--) {\n/* */ \n/* 1988 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1990 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ }\n/* 1996 */ if (templateFound > -1) {\n/* */ \n/* 1998 */ if (templateFound < 3)\n/* 1999 */ return 717; \n/* 2000 */ if (templateFound < 6)\n/* 2001 */ return 714; \n/* 2002 */ if (templateFound < 9)\n/* 2003 */ return 713; \n/* 2004 */ if (templateFound < 12)\n/* 2005 */ return 715; \n/* 2006 */ if (templateFound < 15) {\n/* 2007 */ return 712;\n/* */ }\n/* 2009 */ return 716;\n/* */ } \n/* 2011 */ return -1;\n/* */ }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private <T> void getPossibleTargets(TargetingScheme<T> t, TargetList<T> current, List<? extends T> searchSpace, int startInd,\n List<TargetList<T>> outputList) {\n if (t.isFullyTargeted(current)) {\n outputList.add(current);\n return;\n }\n if (startInd >= searchSpace.size()) {\n System.out.println(\"this shouldn't happen lmao\");\n }\n int numToSelect = Math.min(searchSpace.size(), t.getMaxTargets());\n for (int i = startInd; i < searchSpace.size() - (numToSelect - current.targeted.size() - 1); i++) {\n T c = searchSpace.get(i);\n if (!current.targeted.contains(c)) {\n TargetList<T> copy = current.clone();\n copy.targeted.add(c);\n this.getPossibleTargets(t, copy, searchSpace, i + 1, outputList);\n }\n }\n }", "@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "public RaceCar getTarget() {\n return target;\n }", "public String getTarget() {\n return this.target;\n }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "public Map<Integer, TargetDef> getTargetQueries();", "public int pacmanMoves(List<Integer> target){\n int numOfmoves = 0;\n //counts the steps to get to the target\n for(int i=target.get(0);i>0;i--){\n numOfmoves++;\n }\n for(int i=target.get(1);i>0;i--){\n numOfmoves++;\n }\n return numOfmoves;\n }", "private boolean reachX(Position target) {\n return position.x == target.x;\n }", "@Override\n public ControllerViewEvent getTargetEffectOne() {\n ArrayList<Square> possibleTarget = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().getSquareColour()) && !getOwner().getPosition().getNextSquare(i).findRoomPlayers().isEmpty())\n possibleTarget.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTarget), Encoder.encodeSquareTargetsY(possibleTarget));\n }", "public Move(int index, Target target){\r\n this.handIndex = index;\r\n this.target = target;\r\n }", "abstract public int findTargetToReplace(MemRef r);", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public Object getTargetValue(int idx, Object def);" ]
[ "0.7208216", "0.711838", "0.7026227", "0.6587456", "0.6540184", "0.63887453", "0.6240099", "0.60881144", "0.60421956", "0.60260797", "0.59927416", "0.5961661", "0.5951217", "0.5929538", "0.5864982", "0.5806449", "0.57913244", "0.5777108", "0.57526284", "0.5707325", "0.56631124", "0.56596076", "0.55706894", "0.5553167", "0.5550857", "0.5544616", "0.55020076", "0.54722196", "0.545999", "0.54580796", "0.5455644", "0.54523754", "0.5440916", "0.5437973", "0.5423368", "0.54180104", "0.54173386", "0.5415172", "0.5412724", "0.54115814", "0.53849953", "0.53788877", "0.537144", "0.5369927", "0.5362503", "0.5362503", "0.5338059", "0.5331119", "0.53288203", "0.5326971", "0.5326226", "0.5316535", "0.5306508", "0.5304909", "0.530147", "0.52970266", "0.5291735", "0.52872056", "0.5277293", "0.52696824", "0.52694315", "0.5264898", "0.5264582", "0.52636695", "0.52605814", "0.5255733", "0.5249242", "0.52484304", "0.52367175", "0.52367175", "0.52348226", "0.52270764", "0.5221397", "0.5202773", "0.5195396", "0.5188123", "0.51800674", "0.51800674", "0.5177376", "0.51749456", "0.5158779", "0.51570404", "0.51548624", "0.51479465", "0.514179", "0.51369697", "0.51334816", "0.5132537", "0.51316065", "0.5130061", "0.51290584", "0.51271945", "0.512173", "0.5117925", "0.51127553", "0.511223", "0.5107555", "0.50928557", "0.5091661", "0.5086859" ]
0.5230993
71
optional int32 target_pos = 5; Index in target protein that this decoy protein is from
public int getTargetPos() { return targetPos_; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTargetPos();", "public int getTargetPos() {\n return targetPos_;\n }", "public void setTargetPos(final int target) {\n \n switch(target){\n // Set target position right from current position\n case T_RIGHT:\n if(this.columnT < this.buffer.get(lineT).size()) // Check if position exists\n this.columnT++;\n break;\n // Set target position left from current position\n case T_LEFT:\n if(this.columnT > 0) // Check if position exists\n this.columnT--;\n break;\n // Set target position up from current position\n case T_UP:\n if(this.lineT > 0) { // Check if position exists\n this.lineT--;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position down from current position\n case T_DOWN:\n if(this.lineT < this.buffer.size() - 1) { // Check if position exists\n this.lineT++;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position to first position\n case T_HOME:\n this.columnT = 0;\n break;\n // Set target position to last position\n case T_END:\n this.columnT = this.buffer.get(lineT).size();\n break;\n default:\n System.out.println(\"Invalid target position\");\n break;\n }\n }", "@Override\n public int getTargetPosition() {\n return 0;\n }", "public Contig getTarget() { return target; }", "N getTarget();", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "@InVertex\n Object getTarget();", "public ObjectSequentialNumber getTarget() {\n return target;\n }", "public int getTargetArgIndex() {\n\t\treturn this.targetArgIndex;\n\t}", "TrgPlace getTarget();", "public Builder setTargetPos(int value) {\n bitField0_ |= 0x00000008;\n targetPos_ = value;\n onChanged();\n return this;\n }", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public Integer getTargetID()\r\n\t\t{ return mapping.getTargetId(); }", "BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }", "@Override\n public Vertex getTarget() {\n return targetVertex;\n }", "public void SetTargetOffset(int target_offset) {\n target_offset_ = target_offset;\n }", "public int advanceStartPosition(int target) throws IOException {\n // Naive implementations; subclasses may provide a faster version.\n int pos;\n do {\n pos = nextStartPosition();\n } while (pos < target && pos != NO_MORE_POSITIONS);\n return pos;\n }", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "boolean hasTargetPos();", "public Integer getTargetid() {\n return targetid;\n }", "public Point getTarget() {\n\t\treturn _target;\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}", "public long getTargetId() {\n return targetId;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public void setTargeted() {\n targeted ++;\n }", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "public Point getTarget()\n\t{\n\t\treturn this.target;\n\t}", "public Living getTarget();", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "public Entity.ID getTargetID() {\n return targetID;\n }", "public EntityID getTarget() {\n\t\treturn target.getValue();\n\t}", "public abstract int getSourceIndex(int index);", "@Override\n\tpublic int getTargetParameter() {\n\t\treturn 0;\n\t}", "private int findPos(byte[] contents, String target)\n {\n String contentsStr = null;\n try\n {\n contentsStr = new String(contents, \"ISO-8859-1\");\n }\n catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n return contentsStr.indexOf(target);\n }", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "public static void testDiGui(int[] candidates, int target, int start) {\n\n if (target == 0) {\n return;\n } else if (target < 0) {\n return;\n } else {\n for (int i = start; i < candidates.length && candidates[i] > 0; i++) {\n\n System.out.println(candidates[i]);\n target = candidates[i];\n i++;\n testDiGui(candidates, target, i);\n target = -1;\n }\n }\n\n System.out.println(target);\n }", "public StateID GetTarget()\n {\n return targetID;\n }", "public int findPosition(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 <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "String getTarget();", "String getTarget();", "public Player getTarget() {\n return target;\n }", "public Vector getTargets(){\n return targets;\n }", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "@Override\n\tpublic void findTarget(List<Combat> other) {\n\t}", "public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "public CPointer<BlenderObject> getTarget() throws IOException\n\t{\n\t\tlong __dna__targetAddress;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 128);\n\t\t} else {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 104);\n\t\t}\n\t\tClass<?>[] __dna__targetTypes = new Class[]{BlenderObject.class};\n\t\treturn new CPointer<BlenderObject>(__dna__targetAddress, __dna__targetTypes, __io__blockTable.getBlock(__dna__targetAddress, BlenderObject.__DNA__SDNA_INDEX), __io__blockTable);\n\t}", "public static Direction offsetTarget(MapLocation target) throws GameActionException {\n\t\tfloat offsetDistMax = 2.5f;\n\t\tMapLocation newTarget = null;\n\t\tint c = 0;\n\t\twhile (newTarget == null) {\n\t\t\tc++;\n\t\t\ttry{\n\t\t\t\tDirection dir = myLoc.directionTo(target);\n\t\t\t\t\n\t\t\t\tif (c > 5) {\n\t\t\t\t\tdir = myLoc.directionTo(target);\n\t\t\t\t\tnewTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (Math.random() > 0.5) dir = dir.rotateLeftDegrees(90);\n\t\t\t\telse dir = dir.rotateRightDegrees(90);\n\t\t\t\t\n\t\t\t\tfloat offsetDist = (float) (Math.random()*offsetDistMax);\n\n\t\t\t\tnewTarget = target.add(dir, offsetDist);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tdebug_print(\"blah: \" + e.getMessage());\n\t\t\t\te.getMessage();\n\t\t\t}\n\n\t\t}\n\t\tdebug_dot(newTarget, 225, 100, 0);\n\t\treturn myLoc.directionTo(newTarget);\n\t}", "public java.lang.String getTargetNumber() {\r\n return targetNumber;\r\n }", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public DNode getTo() { return targetnode; }", "public void toSelectingAttackTarget() {\n }", "public double getTargetX() {\n return m_targetX;\n }", "com.google.protobuf.ByteString getTargetBytes();", "public Spatial getTarget() {\r\n return target;\r\n }", "public void setTarget_table(String target_table) {\n this.target_table = target_table;\n }", "private static int predictDistance(Position source, Position target) {\n int x = source.getX() - target.getX();\n int y = source.getY() - target.getY();\n int c = (int)Math.ceil(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n return c;\n }", "private byte[] getTarget( byte[] buffer ){\n \tbyte target[] = new byte[Constants.TARGET_ID_LEN];\n \tfor (int i=0; i<Constants.TARGET_ID_LEN; i++){\n \t\ttarget[i] = buffer[i + Constants.MESSAGE_ID_LEN + 1];\n \t}\n \treturn target;\n }", "@Test\n\tpublic void testTargetsFourSteps() {\n\t\tboard.calcTargets(14, 24, 4);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 20)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 23)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t}", "public Iterator<Point> getPointAt(ModelObject target, int pos);", "Object getTarget();", "Object getTarget();", "private Position computeTargetConsideringLead(Position sourcePos, TargetGridElement targetGridElement) {\r\n\r\n // Target-Position & velocity-Vector\r\n Position targetPosition = targetGridElement.getCurrentGridElementPosition();\r\n Direction targetPosDirection = Directions.of(targetPosition.getDirection(), targetGridElement.getTargetVelocity());\r\n\r\n // Source-Position & velocity-Vector\r\n double angleBetweenSourceAndTarget = sourcePos.calcAngleRelativeTo(targetPosition);\r\n sourcePos = sourcePos.rotate(angleBetweenSourceAndTarget);\r\n Direction sourcePosDirection = Directions.of(sourcePos.getDirection(), velocity);\r\n\r\n Float64Vector targetVMinusSourceV = targetPosition.getVector().minus(sourcePos.getVector());\r\n double a = targetPosDirection.getVector().normValue() * targetPosDirection.getVector().normValue()\r\n - (sourcePosDirection.getVector().normValue() * sourcePosDirection.getVector().normValue());\r\n double b = 2 * targetVMinusSourceV.times(targetPosDirection.getVector()).doubleValue();\r\n double c = targetVMinusSourceV.normValue() * targetVMinusSourceV.normValue();\r\n\r\n if (a >= 0) {\r\n return targetPosition;\r\n }\r\n double sqrt = Math.sqrt(b * b - 4 * a * c);\r\n double dt1 = solveQuadraticFormula(a, b, sqrt, -1);\r\n double dt = computeDeltaT(a, b, sqrt, dt1);\r\n Float64Vector targetDirVectorWithTime = targetPosDirection.getVector().times(dt);\r\n return Positions.of(targetPosition.getX() + targetDirVectorWithTime.getValue(0), targetPosition.getY() + targetDirVectorWithTime.getValue(1),\r\n sourcePos.getZ());\r\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "@VisibleForTesting\n int[] findMatches(Token[] source, Token[] target) {\n final LevenshteinDistance table = new LevenshteinDistance(source, target);\n table.calculate();\n final int targetLen = target.length;\n final int[] result = new int[targetLen];\n LevenshteinDistance.EditOperation[] ops = table.getTargetOperations();\n for (int i = 0; i < targetLen; ++i) {\n if (ops[i].getType() == LevenshteinDistance.EDIT_UNCHANGED) {\n result[i] = ops[i].getPosition();\n } else {\n result[i] = -1;\n }\n }\n return result;\n }", "private void populateGUI(TargetDecoyMap targetDecoyMap) {\n\n ValidationQcParameters validationQCPreferences = identificationParameters.getIdValidationParameters().getValidationQCParameters();\n\n // Validation level\n validationLevelJComboBox.setSelectedItem(psParameter.getMatchValidationLevel().getName());\n\n // Database info\n FastaParameters fastaParameters = identificationParameters.getFastaParameters();\n boolean targetDecoy = fastaParameters.isTargetDecoy();\n\n if (!targetDecoy) {\n\n targetDecoyLbl.setText(\"Target only\");\n targetDecoyLbl.setForeground(Color.red);\n\n } else {\n\n targetDecoyLbl.setForeground(GREEN);\n\n }\n\n try {\n\n FastaSummary fastaSummary = FastaSummary.getSummary(fastaFile, fastaParameters, null);\n int nTarget = fastaSummary.nTarget;\n nTargetLbl.setText(nTarget + \" target sequences\");\n\n if (nTarget < 10000) {\n\n nTargetLbl.setForeground(Color.red);\n\n } else if (nTarget > 1000000) {\n\n nTargetLbl.setForeground(ORANGE);\n\n } else {\n\n nTargetLbl.setForeground(GREEN);\n\n }\n\n } catch (IOException iOException) {\n\n nTargetLbl.setText(\"Database size not available\");\n nTargetLbl.setForeground(Color.red);\n\n }\n\n // Target/Decoy group\n ((TitledBorder) targetDecoyGroupPanel.getBorder()).setTitle(\"Target/Decoy Distributions\");\n targetDecoyGroupPanel.repaint();\n if (targetDecoy) {\n int nTargetOnly = targetDecoyMap.getnTargetOnly();\n matchesBeforeFirstDecoyLbl.setText(nTargetOnly + \" matches before the first decoy hit\");\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n double desiredThreshold = targetDecoyResults.getUserInput();\n double nTargetLimit = 100.0 / desiredThreshold;\n if (nTargetOnly < nTargetLimit) {\n matchesBeforeFirstDecoyLbl.setForeground(Color.red);\n } else {\n matchesBeforeFirstDecoyLbl.setForeground(GREEN);\n }\n recommendedNumberOfTargetHitsLbl.setText(\"Recommended: \" + Util.roundDouble(nTargetLimit, 0) + \" matches before the first decoy hit\");\n\n double resolution = targetDecoyMap.getResolution();\n confidenceResolutionLbl.setText(\"PEP/Confidence resolution of \" + Util.roundDouble(resolution, 2) + \"%\");\n\n double minResolution = desiredThreshold;\n if (resolution > 10 * minResolution) {\n confidenceResolutionLbl.setForeground(Color.red);\n } else if (resolution > minResolution) {\n confidenceResolutionLbl.setForeground(ORANGE);\n } else {\n confidenceResolutionLbl.setForeground(GREEN);\n }\n recommendedResolutionLbl.setText(\"Recommended: resolution < \" + Util.roundDouble(minResolution, 2) + \"%\");\n } else {\n matchesBeforeFirstDecoyLbl.setText(\"No decoy\");\n matchesBeforeFirstDecoyLbl.setForeground(Color.gray);\n confidenceResolutionLbl.setText(\"Impossible to estimate confidence resolution\");\n confidenceResolutionLbl.setForeground(Color.gray);\n }\n\n // Target/decoy results\n if (targetDecoy) {\n \n double confidence = psParameter.getConfidence();\n MatchValidationLevel matchValidationLevel = psParameter.getMatchValidationLevel();\n validationStatusLbl.setText(\"Validation Status: \" + matchValidationLevel.getName());\n\n switch (matchValidationLevel) {\n case confident:\n validationStatusLbl.setForeground(GREEN);\n break;\n \n case doubtful:\n validationStatusLbl.setForeground(ORANGE);\n break;\n\n case not_validated:\n validationStatusLbl.setForeground(Color.red);\n break;\n\n case none:\n validationStatusLbl.setForeground(Color.gray);\n }\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n String validationThresholdTxt = \"\";\n double threshold = targetDecoyResults.getUserInput();\n int thresholdType = targetDecoyResults.getInputType();\n if (thresholdType == 0) {\n validationThresholdTxt += \"Validation Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 1) {\n validationThresholdTxt += \"FDR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 2) {\n validationThresholdTxt += \"FNR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n }\n validationThresholdLbl.setText(validationThresholdTxt);\n\n confidenceLbl.setText(\"Confidence: \" + Util.roundDouble(confidence, 2) + \"%\");\n double validationThreshold = targetDecoyResults.getConfidenceLimit();\n confidenceThresholdLbl.setText(\"Expected Confidence: \" + Util.roundDouble(validationThreshold, 2) + \"%\");\n double margin = validationQCPreferences.getConfidenceMargin() * targetDecoyMap.getResolution();\n double confidenceThreshold = validationThreshold + margin;\n if (confidenceThreshold > 100) {\n confidenceThreshold = 100;\n }\n confidenceThresholdLbl.setText(\"Confident confidence: \" + Util.roundDouble(confidenceThreshold, 2) + \"%\");\n if (confidence < validationThreshold) {\n confidenceLbl.setForeground(Color.red);\n } else if (confidence < confidenceThreshold) {\n confidenceLbl.setForeground(ORANGE);\n } else {\n confidenceLbl.setForeground(GREEN);\n }\n } else {\n validationStatusLbl.setText(\"Validation Status: \" + psParameter.getMatchValidationLevel().getName());\n validationThresholdLbl.setText(\"Impossible to estimate validation threshold\");\n confidenceLbl.setText(\"Impossible to estimate confidence\");\n confidenceThresholdLbl.setText(\"Impossible to estimate confidence threshold\");\n validationStatusLbl.setForeground(Color.gray);\n confidenceLbl.setForeground(Color.gray);\n }\n\n // Quality filters\n final DefaultTableModel tableModel = new FiltersTableModel();\n qualityFiltersTable.setModel(tableModel);\n qualityFiltersTable.getColumn(\"\").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setCellRenderer(new TrueFalseIconRenderer(\n new ImageIcon(this.getClass().getResource(\"/icons/accept-new.png\")),\n new ImageIcon(this.getClass().getResource(\"/icons/error-new.png\")),\n \"Yes\", \"No\"));\n\n int valid = 0;\n for (String qcCheck : psParameter.getQcCriteria()) {\n if (psParameter.isQcPassed(qcCheck)) {\n valid++;\n }\n }\n ((TitledBorder) qualityFiltersPanel.getBorder()).setTitle(\"Quality Filters (\" + valid + \"/\" + psParameter.getQcCriteria().size() + \")\");\n }", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public T getPater(T target) {\r\n int index = getIndex(target);\r\n if (index * 2 + 1 >= SIZE) {\r\n return null;\r\n } else if (tree[index * 2 + 1] == null) {\r\n return null;\r\n } else {\r\n return tree[index * 2 + 1];\r\n }\r\n }", "@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();", "java.lang.String getTarget();", "java.lang.String getTarget();", "protected void FacetoTarget(Character pc, Object target) {\n int dx, dy;\n if (target instanceof Character) {\n dx = ((Character) target).x - pc.x;\n dy = ((Character) target).y - pc.y;\n } else if (target instanceof Envir_Item) {\n dx = ((Envir_Item) target).getX() - bottom_screen.left - pc.x;\n dy = ((Envir_Item) target).getY() - bottom_screen.top - pc.y;\n } else {\n return;\n }\n\n if (Math.abs(dx) >= Math.abs(dy)) {\n if (dx > 0) {\n pc.setDir(2);\n } else {\n pc.setDir(1);\n }\n } else {\n if (dy > 0) {\n pc.setDir(0);\n } else {\n pc.setDir(3);\n }\n }\n }", "public String targetId() {\n return this.targetId;\n }", "public void processTargetTracker (Entity squad, Entity target, boolean contactEnd) {\n\t}", "final int getNextBuildTarget(int difficulty) {\n/* 1970 */ difficulty = Math.min(5, difficulty);\n/* 1971 */ int start = difficulty * 3;\n/* 1972 */ int templateFound = -1;\n/* */ int x;\n/* 1974 */ for (x = start; x < 17; x++) {\n/* */ \n/* 1976 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1978 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 1983 */ if (templateFound == -1)\n/* */ {\n/* */ \n/* 1986 */ for (x = start; x > 0; x--) {\n/* */ \n/* 1988 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1990 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ }\n/* 1996 */ if (templateFound > -1) {\n/* */ \n/* 1998 */ if (templateFound < 3)\n/* 1999 */ return 717; \n/* 2000 */ if (templateFound < 6)\n/* 2001 */ return 714; \n/* 2002 */ if (templateFound < 9)\n/* 2003 */ return 713; \n/* 2004 */ if (templateFound < 12)\n/* 2005 */ return 715; \n/* 2006 */ if (templateFound < 15) {\n/* 2007 */ return 712;\n/* */ }\n/* 2009 */ return 716;\n/* */ } \n/* 2011 */ return -1;\n/* */ }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private <T> void getPossibleTargets(TargetingScheme<T> t, TargetList<T> current, List<? extends T> searchSpace, int startInd,\n List<TargetList<T>> outputList) {\n if (t.isFullyTargeted(current)) {\n outputList.add(current);\n return;\n }\n if (startInd >= searchSpace.size()) {\n System.out.println(\"this shouldn't happen lmao\");\n }\n int numToSelect = Math.min(searchSpace.size(), t.getMaxTargets());\n for (int i = startInd; i < searchSpace.size() - (numToSelect - current.targeted.size() - 1); i++) {\n T c = searchSpace.get(i);\n if (!current.targeted.contains(c)) {\n TargetList<T> copy = current.clone();\n copy.targeted.add(c);\n this.getPossibleTargets(t, copy, searchSpace, i + 1, outputList);\n }\n }\n }", "@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "public RaceCar getTarget() {\n return target;\n }", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public String getTarget() {\n return this.target;\n }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "public Map<Integer, TargetDef> getTargetQueries();", "public int pacmanMoves(List<Integer> target){\n int numOfmoves = 0;\n //counts the steps to get to the target\n for(int i=target.get(0);i>0;i--){\n numOfmoves++;\n }\n for(int i=target.get(1);i>0;i--){\n numOfmoves++;\n }\n return numOfmoves;\n }", "private boolean reachX(Position target) {\n return position.x == target.x;\n }", "@Override\n public ControllerViewEvent getTargetEffectOne() {\n ArrayList<Square> possibleTarget = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().getSquareColour()) && !getOwner().getPosition().getNextSquare(i).findRoomPlayers().isEmpty())\n possibleTarget.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTarget), Encoder.encodeSquareTargetsY(possibleTarget));\n }", "public Move(int index, Target target){\r\n this.handIndex = index;\r\n this.target = target;\r\n }", "abstract public int findTargetToReplace(MemRef r);", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public Object getTargetValue(int idx, Object def);" ]
[ "0.72070193", "0.71176636", "0.65883696", "0.6540211", "0.6389332", "0.62401557", "0.6088823", "0.6042046", "0.6026822", "0.59922683", "0.59617716", "0.5952347", "0.5927231", "0.5865617", "0.5804873", "0.57911575", "0.5779437", "0.5752125", "0.57074404", "0.56632656", "0.5658816", "0.55715674", "0.5552582", "0.5551386", "0.55458444", "0.55028933", "0.5470551", "0.5460408", "0.5460383", "0.5454869", "0.54528135", "0.54427713", "0.54384637", "0.5423418", "0.54160035", "0.54159033", "0.5415505", "0.54135805", "0.5410636", "0.53850126", "0.53770673", "0.53725374", "0.5370817", "0.5362621", "0.5362621", "0.53384846", "0.533114", "0.532655", "0.5325865", "0.5325294", "0.5315289", "0.53069997", "0.53039217", "0.53013194", "0.52991605", "0.5292784", "0.52879494", "0.5278216", "0.527026", "0.5269566", "0.5265678", "0.5265059", "0.52625775", "0.52624786", "0.52567136", "0.52502584", "0.52465475", "0.5236916", "0.5236916", "0.5234374", "0.52314544", "0.52256864", "0.52217335", "0.5203472", "0.51952904", "0.518883", "0.5180644", "0.5180644", "0.5177744", "0.5175976", "0.51593596", "0.5156938", "0.51557666", "0.5150206", "0.5142317", "0.51371086", "0.51346606", "0.51323545", "0.5131008", "0.51309377", "0.5129773", "0.5127894", "0.51222754", "0.51171285", "0.5113022", "0.51127446", "0.5107978", "0.5092966", "0.50916225", "0.5087733" ]
0.7025487
2
optional int32 target_pos = 5; Index in target protein that this decoy protein is from
public Builder setTargetPos(int value) { bitField0_ |= 0x00000008; targetPos_ = value; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTargetPos();", "public int getTargetPos() {\n return targetPos_;\n }", "public int getTargetPos() {\n return targetPos_;\n }", "public void setTargetPos(final int target) {\n \n switch(target){\n // Set target position right from current position\n case T_RIGHT:\n if(this.columnT < this.buffer.get(lineT).size()) // Check if position exists\n this.columnT++;\n break;\n // Set target position left from current position\n case T_LEFT:\n if(this.columnT > 0) // Check if position exists\n this.columnT--;\n break;\n // Set target position up from current position\n case T_UP:\n if(this.lineT > 0) { // Check if position exists\n this.lineT--;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position down from current position\n case T_DOWN:\n if(this.lineT < this.buffer.size() - 1) { // Check if position exists\n this.lineT++;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position to first position\n case T_HOME:\n this.columnT = 0;\n break;\n // Set target position to last position\n case T_END:\n this.columnT = this.buffer.get(lineT).size();\n break;\n default:\n System.out.println(\"Invalid target position\");\n break;\n }\n }", "@Override\n public int getTargetPosition() {\n return 0;\n }", "public Contig getTarget() { return target; }", "N getTarget();", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "@InVertex\n Object getTarget();", "public ObjectSequentialNumber getTarget() {\n return target;\n }", "public int getTargetArgIndex() {\n\t\treturn this.targetArgIndex;\n\t}", "TrgPlace getTarget();", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public Integer getTargetID()\r\n\t\t{ return mapping.getTargetId(); }", "BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }", "@Override\n public Vertex getTarget() {\n return targetVertex;\n }", "public void SetTargetOffset(int target_offset) {\n target_offset_ = target_offset;\n }", "public int advanceStartPosition(int target) throws IOException {\n // Naive implementations; subclasses may provide a faster version.\n int pos;\n do {\n pos = nextStartPosition();\n } while (pos < target && pos != NO_MORE_POSITIONS);\n return pos;\n }", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "boolean hasTargetPos();", "public Integer getTargetid() {\n return targetid;\n }", "public Point getTarget() {\n\t\treturn _target;\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}", "public long getTargetId() {\n return targetId;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "public void setTargeted() {\n targeted ++;\n }", "public Point getTarget()\n\t{\n\t\treturn this.target;\n\t}", "public Living getTarget();", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "public Entity.ID getTargetID() {\n return targetID;\n }", "public EntityID getTarget() {\n\t\treturn target.getValue();\n\t}", "public abstract int getSourceIndex(int index);", "private int findPos(byte[] contents, String target)\n {\n String contentsStr = null;\n try\n {\n contentsStr = new String(contents, \"ISO-8859-1\");\n }\n catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n return contentsStr.indexOf(target);\n }", "@Override\n\tpublic int getTargetParameter() {\n\t\treturn 0;\n\t}", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "public static void testDiGui(int[] candidates, int target, int start) {\n\n if (target == 0) {\n return;\n } else if (target < 0) {\n return;\n } else {\n for (int i = start; i < candidates.length && candidates[i] > 0; i++) {\n\n System.out.println(candidates[i]);\n target = candidates[i];\n i++;\n testDiGui(candidates, target, i);\n target = -1;\n }\n }\n\n System.out.println(target);\n }", "public StateID GetTarget()\n {\n return targetID;\n }", "public int findPosition(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 <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "String getTarget();", "String getTarget();", "public Player getTarget() {\n return target;\n }", "public Vector getTargets(){\n return targets;\n }", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "@Override\n\tpublic void findTarget(List<Combat> other) {\n\t}", "public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "public CPointer<BlenderObject> getTarget() throws IOException\n\t{\n\t\tlong __dna__targetAddress;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 128);\n\t\t} else {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 104);\n\t\t}\n\t\tClass<?>[] __dna__targetTypes = new Class[]{BlenderObject.class};\n\t\treturn new CPointer<BlenderObject>(__dna__targetAddress, __dna__targetTypes, __io__blockTable.getBlock(__dna__targetAddress, BlenderObject.__DNA__SDNA_INDEX), __io__blockTable);\n\t}", "public static Direction offsetTarget(MapLocation target) throws GameActionException {\n\t\tfloat offsetDistMax = 2.5f;\n\t\tMapLocation newTarget = null;\n\t\tint c = 0;\n\t\twhile (newTarget == null) {\n\t\t\tc++;\n\t\t\ttry{\n\t\t\t\tDirection dir = myLoc.directionTo(target);\n\t\t\t\t\n\t\t\t\tif (c > 5) {\n\t\t\t\t\tdir = myLoc.directionTo(target);\n\t\t\t\t\tnewTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (Math.random() > 0.5) dir = dir.rotateLeftDegrees(90);\n\t\t\t\telse dir = dir.rotateRightDegrees(90);\n\t\t\t\t\n\t\t\t\tfloat offsetDist = (float) (Math.random()*offsetDistMax);\n\n\t\t\t\tnewTarget = target.add(dir, offsetDist);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tdebug_print(\"blah: \" + e.getMessage());\n\t\t\t\te.getMessage();\n\t\t\t}\n\n\t\t}\n\t\tdebug_dot(newTarget, 225, 100, 0);\n\t\treturn myLoc.directionTo(newTarget);\n\t}", "public java.lang.String getTargetNumber() {\r\n return targetNumber;\r\n }", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public DNode getTo() { return targetnode; }", "public double getTargetX() {\n return m_targetX;\n }", "public void toSelectingAttackTarget() {\n }", "com.google.protobuf.ByteString getTargetBytes();", "public Spatial getTarget() {\r\n return target;\r\n }", "private static int predictDistance(Position source, Position target) {\n int x = source.getX() - target.getX();\n int y = source.getY() - target.getY();\n int c = (int)Math.ceil(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n return c;\n }", "public void setTarget_table(String target_table) {\n this.target_table = target_table;\n }", "private byte[] getTarget( byte[] buffer ){\n \tbyte target[] = new byte[Constants.TARGET_ID_LEN];\n \tfor (int i=0; i<Constants.TARGET_ID_LEN; i++){\n \t\ttarget[i] = buffer[i + Constants.MESSAGE_ID_LEN + 1];\n \t}\n \treturn target;\n }", "@Test\n\tpublic void testTargetsFourSteps() {\n\t\tboard.calcTargets(14, 24, 4);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 20)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 23)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t}", "public Iterator<Point> getPointAt(ModelObject target, int pos);", "Object getTarget();", "Object getTarget();", "private Position computeTargetConsideringLead(Position sourcePos, TargetGridElement targetGridElement) {\r\n\r\n // Target-Position & velocity-Vector\r\n Position targetPosition = targetGridElement.getCurrentGridElementPosition();\r\n Direction targetPosDirection = Directions.of(targetPosition.getDirection(), targetGridElement.getTargetVelocity());\r\n\r\n // Source-Position & velocity-Vector\r\n double angleBetweenSourceAndTarget = sourcePos.calcAngleRelativeTo(targetPosition);\r\n sourcePos = sourcePos.rotate(angleBetweenSourceAndTarget);\r\n Direction sourcePosDirection = Directions.of(sourcePos.getDirection(), velocity);\r\n\r\n Float64Vector targetVMinusSourceV = targetPosition.getVector().minus(sourcePos.getVector());\r\n double a = targetPosDirection.getVector().normValue() * targetPosDirection.getVector().normValue()\r\n - (sourcePosDirection.getVector().normValue() * sourcePosDirection.getVector().normValue());\r\n double b = 2 * targetVMinusSourceV.times(targetPosDirection.getVector()).doubleValue();\r\n double c = targetVMinusSourceV.normValue() * targetVMinusSourceV.normValue();\r\n\r\n if (a >= 0) {\r\n return targetPosition;\r\n }\r\n double sqrt = Math.sqrt(b * b - 4 * a * c);\r\n double dt1 = solveQuadraticFormula(a, b, sqrt, -1);\r\n double dt = computeDeltaT(a, b, sqrt, dt1);\r\n Float64Vector targetDirVectorWithTime = targetPosDirection.getVector().times(dt);\r\n return Positions.of(targetPosition.getX() + targetDirVectorWithTime.getValue(0), targetPosition.getY() + targetDirVectorWithTime.getValue(1),\r\n sourcePos.getZ());\r\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "@VisibleForTesting\n int[] findMatches(Token[] source, Token[] target) {\n final LevenshteinDistance table = new LevenshteinDistance(source, target);\n table.calculate();\n final int targetLen = target.length;\n final int[] result = new int[targetLen];\n LevenshteinDistance.EditOperation[] ops = table.getTargetOperations();\n for (int i = 0; i < targetLen; ++i) {\n if (ops[i].getType() == LevenshteinDistance.EDIT_UNCHANGED) {\n result[i] = ops[i].getPosition();\n } else {\n result[i] = -1;\n }\n }\n return result;\n }", "private void populateGUI(TargetDecoyMap targetDecoyMap) {\n\n ValidationQcParameters validationQCPreferences = identificationParameters.getIdValidationParameters().getValidationQCParameters();\n\n // Validation level\n validationLevelJComboBox.setSelectedItem(psParameter.getMatchValidationLevel().getName());\n\n // Database info\n FastaParameters fastaParameters = identificationParameters.getFastaParameters();\n boolean targetDecoy = fastaParameters.isTargetDecoy();\n\n if (!targetDecoy) {\n\n targetDecoyLbl.setText(\"Target only\");\n targetDecoyLbl.setForeground(Color.red);\n\n } else {\n\n targetDecoyLbl.setForeground(GREEN);\n\n }\n\n try {\n\n FastaSummary fastaSummary = FastaSummary.getSummary(fastaFile, fastaParameters, null);\n int nTarget = fastaSummary.nTarget;\n nTargetLbl.setText(nTarget + \" target sequences\");\n\n if (nTarget < 10000) {\n\n nTargetLbl.setForeground(Color.red);\n\n } else if (nTarget > 1000000) {\n\n nTargetLbl.setForeground(ORANGE);\n\n } else {\n\n nTargetLbl.setForeground(GREEN);\n\n }\n\n } catch (IOException iOException) {\n\n nTargetLbl.setText(\"Database size not available\");\n nTargetLbl.setForeground(Color.red);\n\n }\n\n // Target/Decoy group\n ((TitledBorder) targetDecoyGroupPanel.getBorder()).setTitle(\"Target/Decoy Distributions\");\n targetDecoyGroupPanel.repaint();\n if (targetDecoy) {\n int nTargetOnly = targetDecoyMap.getnTargetOnly();\n matchesBeforeFirstDecoyLbl.setText(nTargetOnly + \" matches before the first decoy hit\");\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n double desiredThreshold = targetDecoyResults.getUserInput();\n double nTargetLimit = 100.0 / desiredThreshold;\n if (nTargetOnly < nTargetLimit) {\n matchesBeforeFirstDecoyLbl.setForeground(Color.red);\n } else {\n matchesBeforeFirstDecoyLbl.setForeground(GREEN);\n }\n recommendedNumberOfTargetHitsLbl.setText(\"Recommended: \" + Util.roundDouble(nTargetLimit, 0) + \" matches before the first decoy hit\");\n\n double resolution = targetDecoyMap.getResolution();\n confidenceResolutionLbl.setText(\"PEP/Confidence resolution of \" + Util.roundDouble(resolution, 2) + \"%\");\n\n double minResolution = desiredThreshold;\n if (resolution > 10 * minResolution) {\n confidenceResolutionLbl.setForeground(Color.red);\n } else if (resolution > minResolution) {\n confidenceResolutionLbl.setForeground(ORANGE);\n } else {\n confidenceResolutionLbl.setForeground(GREEN);\n }\n recommendedResolutionLbl.setText(\"Recommended: resolution < \" + Util.roundDouble(minResolution, 2) + \"%\");\n } else {\n matchesBeforeFirstDecoyLbl.setText(\"No decoy\");\n matchesBeforeFirstDecoyLbl.setForeground(Color.gray);\n confidenceResolutionLbl.setText(\"Impossible to estimate confidence resolution\");\n confidenceResolutionLbl.setForeground(Color.gray);\n }\n\n // Target/decoy results\n if (targetDecoy) {\n \n double confidence = psParameter.getConfidence();\n MatchValidationLevel matchValidationLevel = psParameter.getMatchValidationLevel();\n validationStatusLbl.setText(\"Validation Status: \" + matchValidationLevel.getName());\n\n switch (matchValidationLevel) {\n case confident:\n validationStatusLbl.setForeground(GREEN);\n break;\n \n case doubtful:\n validationStatusLbl.setForeground(ORANGE);\n break;\n\n case not_validated:\n validationStatusLbl.setForeground(Color.red);\n break;\n\n case none:\n validationStatusLbl.setForeground(Color.gray);\n }\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n String validationThresholdTxt = \"\";\n double threshold = targetDecoyResults.getUserInput();\n int thresholdType = targetDecoyResults.getInputType();\n if (thresholdType == 0) {\n validationThresholdTxt += \"Validation Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 1) {\n validationThresholdTxt += \"FDR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 2) {\n validationThresholdTxt += \"FNR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n }\n validationThresholdLbl.setText(validationThresholdTxt);\n\n confidenceLbl.setText(\"Confidence: \" + Util.roundDouble(confidence, 2) + \"%\");\n double validationThreshold = targetDecoyResults.getConfidenceLimit();\n confidenceThresholdLbl.setText(\"Expected Confidence: \" + Util.roundDouble(validationThreshold, 2) + \"%\");\n double margin = validationQCPreferences.getConfidenceMargin() * targetDecoyMap.getResolution();\n double confidenceThreshold = validationThreshold + margin;\n if (confidenceThreshold > 100) {\n confidenceThreshold = 100;\n }\n confidenceThresholdLbl.setText(\"Confident confidence: \" + Util.roundDouble(confidenceThreshold, 2) + \"%\");\n if (confidence < validationThreshold) {\n confidenceLbl.setForeground(Color.red);\n } else if (confidence < confidenceThreshold) {\n confidenceLbl.setForeground(ORANGE);\n } else {\n confidenceLbl.setForeground(GREEN);\n }\n } else {\n validationStatusLbl.setText(\"Validation Status: \" + psParameter.getMatchValidationLevel().getName());\n validationThresholdLbl.setText(\"Impossible to estimate validation threshold\");\n confidenceLbl.setText(\"Impossible to estimate confidence\");\n confidenceThresholdLbl.setText(\"Impossible to estimate confidence threshold\");\n validationStatusLbl.setForeground(Color.gray);\n confidenceLbl.setForeground(Color.gray);\n }\n\n // Quality filters\n final DefaultTableModel tableModel = new FiltersTableModel();\n qualityFiltersTable.setModel(tableModel);\n qualityFiltersTable.getColumn(\"\").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setCellRenderer(new TrueFalseIconRenderer(\n new ImageIcon(this.getClass().getResource(\"/icons/accept-new.png\")),\n new ImageIcon(this.getClass().getResource(\"/icons/error-new.png\")),\n \"Yes\", \"No\"));\n\n int valid = 0;\n for (String qcCheck : psParameter.getQcCriteria()) {\n if (psParameter.isQcPassed(qcCheck)) {\n valid++;\n }\n }\n ((TitledBorder) qualityFiltersPanel.getBorder()).setTitle(\"Quality Filters (\" + valid + \"/\" + psParameter.getQcCriteria().size() + \")\");\n }", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public T getPater(T target) {\r\n int index = getIndex(target);\r\n if (index * 2 + 1 >= SIZE) {\r\n return null;\r\n } else if (tree[index * 2 + 1] == null) {\r\n return null;\r\n } else {\r\n return tree[index * 2 + 1];\r\n }\r\n }", "@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();", "java.lang.String getTarget();", "java.lang.String getTarget();", "protected void FacetoTarget(Character pc, Object target) {\n int dx, dy;\n if (target instanceof Character) {\n dx = ((Character) target).x - pc.x;\n dy = ((Character) target).y - pc.y;\n } else if (target instanceof Envir_Item) {\n dx = ((Envir_Item) target).getX() - bottom_screen.left - pc.x;\n dy = ((Envir_Item) target).getY() - bottom_screen.top - pc.y;\n } else {\n return;\n }\n\n if (Math.abs(dx) >= Math.abs(dy)) {\n if (dx > 0) {\n pc.setDir(2);\n } else {\n pc.setDir(1);\n }\n } else {\n if (dy > 0) {\n pc.setDir(0);\n } else {\n pc.setDir(3);\n }\n }\n }", "public String targetId() {\n return this.targetId;\n }", "public void processTargetTracker (Entity squad, Entity target, boolean contactEnd) {\n\t}", "final int getNextBuildTarget(int difficulty) {\n/* 1970 */ difficulty = Math.min(5, difficulty);\n/* 1971 */ int start = difficulty * 3;\n/* 1972 */ int templateFound = -1;\n/* */ int x;\n/* 1974 */ for (x = start; x < 17; x++) {\n/* */ \n/* 1976 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1978 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 1983 */ if (templateFound == -1)\n/* */ {\n/* */ \n/* 1986 */ for (x = start; x > 0; x--) {\n/* */ \n/* 1988 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1990 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ }\n/* 1996 */ if (templateFound > -1) {\n/* */ \n/* 1998 */ if (templateFound < 3)\n/* 1999 */ return 717; \n/* 2000 */ if (templateFound < 6)\n/* 2001 */ return 714; \n/* 2002 */ if (templateFound < 9)\n/* 2003 */ return 713; \n/* 2004 */ if (templateFound < 12)\n/* 2005 */ return 715; \n/* 2006 */ if (templateFound < 15) {\n/* 2007 */ return 712;\n/* */ }\n/* 2009 */ return 716;\n/* */ } \n/* 2011 */ return -1;\n/* */ }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private <T> void getPossibleTargets(TargetingScheme<T> t, TargetList<T> current, List<? extends T> searchSpace, int startInd,\n List<TargetList<T>> outputList) {\n if (t.isFullyTargeted(current)) {\n outputList.add(current);\n return;\n }\n if (startInd >= searchSpace.size()) {\n System.out.println(\"this shouldn't happen lmao\");\n }\n int numToSelect = Math.min(searchSpace.size(), t.getMaxTargets());\n for (int i = startInd; i < searchSpace.size() - (numToSelect - current.targeted.size() - 1); i++) {\n T c = searchSpace.get(i);\n if (!current.targeted.contains(c)) {\n TargetList<T> copy = current.clone();\n copy.targeted.add(c);\n this.getPossibleTargets(t, copy, searchSpace, i + 1, outputList);\n }\n }\n }", "@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public RaceCar getTarget() {\n return target;\n }", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "public String getTarget() {\n return this.target;\n }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "public Map<Integer, TargetDef> getTargetQueries();", "public int pacmanMoves(List<Integer> target){\n int numOfmoves = 0;\n //counts the steps to get to the target\n for(int i=target.get(0);i>0;i--){\n numOfmoves++;\n }\n for(int i=target.get(1);i>0;i--){\n numOfmoves++;\n }\n return numOfmoves;\n }", "private boolean reachX(Position target) {\n return position.x == target.x;\n }", "@Override\n public ControllerViewEvent getTargetEffectOne() {\n ArrayList<Square> possibleTarget = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().getSquareColour()) && !getOwner().getPosition().getNextSquare(i).findRoomPlayers().isEmpty())\n possibleTarget.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTarget), Encoder.encodeSquareTargetsY(possibleTarget));\n }", "public Move(int index, Target target){\r\n this.handIndex = index;\r\n this.target = target;\r\n }", "abstract public int findTargetToReplace(MemRef r);", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public Object getTargetValue(int idx, Object def);" ]
[ "0.7206571", "0.7117444", "0.7025358", "0.6587333", "0.654027", "0.6389806", "0.6238807", "0.6088033", "0.6042456", "0.6026513", "0.5990601", "0.596186", "0.59256035", "0.58652", "0.58051986", "0.5791811", "0.5778122", "0.5752512", "0.5707377", "0.56628066", "0.56578076", "0.55705696", "0.5553402", "0.5550476", "0.55453557", "0.55022377", "0.54702526", "0.54594177", "0.5457834", "0.54556626", "0.54529303", "0.5441363", "0.5438267", "0.5423198", "0.54156786", "0.5415017", "0.5414559", "0.54125375", "0.5409692", "0.5384799", "0.53763807", "0.537134", "0.53702104", "0.536234", "0.536234", "0.533871", "0.53301316", "0.5326372", "0.5324716", "0.5323353", "0.53147966", "0.53051144", "0.5303109", "0.5302729", "0.5298493", "0.5291774", "0.5288417", "0.5277727", "0.52700394", "0.52690774", "0.5265777", "0.526535", "0.52631265", "0.5261877", "0.5256413", "0.5248495", "0.5247573", "0.52366936", "0.52366936", "0.5234915", "0.52302146", "0.5225281", "0.5222027", "0.5203414", "0.5196437", "0.5188593", "0.5180256", "0.5180256", "0.51783085", "0.5175197", "0.5157977", "0.51560104", "0.515589", "0.5148793", "0.51410234", "0.5134453", "0.5133053", "0.5131375", "0.5130805", "0.5130157", "0.5129761", "0.5126217", "0.51200306", "0.5116111", "0.51128805", "0.51116383", "0.51070386", "0.50912166", "0.5090113", "0.50849116" ]
0.5950487
12
optional int32 target_pos = 5; Index in target protein that this decoy protein is from
public Builder clearTargetPos() { bitField0_ = (bitField0_ & ~0x00000008); targetPos_ = 0; onChanged(); return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getTargetPos();", "public int getTargetPos() {\n return targetPos_;\n }", "public int getTargetPos() {\n return targetPos_;\n }", "public void setTargetPos(final int target) {\n \n switch(target){\n // Set target position right from current position\n case T_RIGHT:\n if(this.columnT < this.buffer.get(lineT).size()) // Check if position exists\n this.columnT++;\n break;\n // Set target position left from current position\n case T_LEFT:\n if(this.columnT > 0) // Check if position exists\n this.columnT--;\n break;\n // Set target position up from current position\n case T_UP:\n if(this.lineT > 0) { // Check if position exists\n this.lineT--;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position down from current position\n case T_DOWN:\n if(this.lineT < this.buffer.size() - 1) { // Check if position exists\n this.lineT++;\n if(this.columnT > this.buffer.get(lineT).size()) // Check for correct positioning\n this.columnT = this.buffer.get(lineT).size();\n }\n break;\n // Set target position to first position\n case T_HOME:\n this.columnT = 0;\n break;\n // Set target position to last position\n case T_END:\n this.columnT = this.buffer.get(lineT).size();\n break;\n default:\n System.out.println(\"Invalid target position\");\n break;\n }\n }", "@Override\n public int getTargetPosition() {\n return 0;\n }", "public Contig getTarget() { return target; }", "N getTarget();", "public void setTargetPosition(double position){\n targetPosition = position;\n }", "@InVertex\n Object getTarget();", "public ObjectSequentialNumber getTarget() {\n return target;\n }", "public int getTargetArgIndex() {\n\t\treturn this.targetArgIndex;\n\t}", "TrgPlace getTarget();", "public Builder setTargetPos(int value) {\n bitField0_ |= 0x00000008;\n targetPos_ = value;\n onChanged();\n return this;\n }", "private int getIndex(T target) {\r\n for (int i = 0; i < SIZE; i++) {\r\n if (tree[i] == target) {\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }", "public Integer getTargetID()\r\n\t\t{ return mapping.getTargetId(); }", "BlockPos getPosTarget() {\n BlockPosDim loc = LocationGpsCard.getPosition(inventory.getStackInSlot(0));\n if (loc != null && loc.getPos() != null) {\n return loc.getPos();\n }\n return this.getBlockPos();\n }", "@Override\n public Vertex getTarget() {\n return targetVertex;\n }", "public void SetTargetOffset(int target_offset) {\n target_offset_ = target_offset;\n }", "public int advanceStartPosition(int target) throws IOException {\n // Naive implementations; subclasses may provide a faster version.\n int pos;\n do {\n pos = nextStartPosition();\n } while (pos < target && pos != NO_MORE_POSITIONS);\n return pos;\n }", "private Vector2 findTarget() \r\n\t{\r\n\t\tVector2 tempVector = new Vector2(1,1);\r\n\t\ttempVector.setLength(Constants.RANGEDSPEED); //TODO make so it can be changed when level difficulty increases\r\n\t\ttempVector.setAngle(rotation + 90);\r\n\t\treturn tempVector;\r\n\t}", "public EntityID nextTarget(Set<StandardEntity> victims) {\n\n// Clustering clustering = this.moduleManager.getModule(SampleModuleKey.AMBULANCE_MODULE_CLUSTERING);\n\n// if (this.clusterIndex == -1) {\n this.clusterIndex = clustering.getClusterIndex(this.agentInfo.getID());\n// }\n\n\n Collection<StandardEntity> elements = clustering.getClusterEntities(this.clusterIndex);\n\n calculateMapCenters(this.clusterIndex, elements);\n\n\n targetsMap.clear();\n\n if (previousTarget != null && !victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n previousTarget = null;\n }\n\n\n refreshTargetsMap(victims, targetsMap);\n\n calculateDecisionParameters(victims, targetsMap);\n\n calculateVictimsCostValue();\n\n\n AmbulanceTarget bestTarget = null;\n bestTarget = findBestVictim(targetsMap, elements);\n\n //considering inertia for the current target to prevent loop in target selection\n if (previousTarget != null && victims.contains(worldInfo.getEntity(previousTarget.getVictimID()))) {\n if (bestTarget != null && !bestTarget.getVictimID().equals(previousTarget.getVictimID())) {\n Human bestHuman = (Human) worldInfo.getEntity(bestTarget.getVictimID());\n Human previousHuman = (Human) worldInfo.getEntity(previousTarget.getVictimID());\n\n double bestHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(bestHuman.getPosition()).calc().getDistance();\n double previousHumanCost = pathPlanning.setFrom(agentInfo.getPosition()).setDestination(previousHuman.getPosition()).calc().getDistance();\n if (previousHumanCost < bestHumanCost) {\n bestTarget = previousTarget;\n }\n }\n }\n\n previousTarget = bestTarget;\n\n if (bestTarget != null) {\n return bestTarget.getVictimID();\n } else {\n return null;\n }\n\n }", "boolean hasTargetPos();", "public Integer getTargetid() {\n return targetid;\n }", "public Point getTarget() {\n\t\treturn _target;\n\t}", "@Test\n\t\t\tpublic void testTargetOneStep()\n\t\t\t{\n\t\t\t\t//Test one step and check for the right space\n\t\t\t\tboard.calcTargets(0, 7, 1);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(1, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(1, 7)));\n\n\t\t\t\t// Test one step near a door with the incorrect direction\n\t\t\t\tboard.calcTargets(13, 6, 1);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(3, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 6)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 5)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 7)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "private TrackingResult followTarget(Rect target)\n\t{\n\t\t// Clear any existing target rectangle.\n\t\tcamera.addTarget(null);\n\t\t\n\t\t// Outline the target being tracked.\n\t\tcamera.addTarget(target);\n\t\t\n\t\t// This is field of view size.\n\t\tSize imageSize = camera.getImageSize();\n\t\t\n\t\t// get size of target outline area.\n\t\tint targetArea = target.height * target.width;\n\t\t\n\t\t// If we have just acquired target, record initial size. Size comparison\n\t\t// is how we determine distance to target.\n\t\t\n\t\tif (initialTargetArea == 0) initialTargetArea = targetArea;\n\t\t\n\t\t// Compute center point of target in the camera view image.\n\t\tint targetCenterX = target.x + target.width / 2;\n\t\tint imageCenterX = (int) (imageSize.width / 2);\n\t\t\n\t\t// offset minus indicates target is left of image center,\n\t\t// plus to the right. If target is left, drone needs to turn\n\t\t// left to center the target in the image which is a minus yaw value.\n\t\t\n\t\tint offset = targetCenterX - imageCenterX;\n\n\t\tlogger.fine(\"offset=\" + offset);\n\t\t\n\t\toffset *= .25;\t// Scale offset down;\n\t\t\n\t\t// Determine change in distance from last target acquisition.\n\t\t\n\t\tdouble distance = initialTargetArea - targetArea;\n\t\t\n\t\tlogger.fine(String.format(\"ia=%d ta=%d dist=%.0f\", initialTargetArea, targetArea, distance));\n\t\t\n\t\t//initialTargetArea = targetArea;\n\t\t\n\t\tdouble scaleFactor = 0.0;\n\t\t\n\t\t// If distance is small, call it good otherwise the drone\n\t\t// hunts back and forth. Value must be determined by testing.\n\t\t\n\t\tif (Math.abs(distance) < 2000.0) \n\t\t\tdistance = 0.0;\n\t\telse\n\t\t{\n\t\t\t// Scale distance change to a fwd/back movement value of 20% for flyRC command.\n\t\t\t// For some unknown reason, need more power to fly forward than back and even\n\t\t\t// with 30%, forward seems not reliable.\n\t\t\t// scaleFactor must be positive to preserve the sign of distance value.\n\t\t\t\n\t\t\tscaleFactor = 20.0 / Math.abs(distance);\n\t\t\n\t\t\tdistance = distance * scaleFactor;\n\t\t}\n\t\t\n\t\tlogger.fine(String.format(\"dist=%.1f fact=%f\", distance, scaleFactor));\n\t\t\n\t\treturn new TrackingResult(offset, (int) distance);\n\t}", "public long getTargetId() {\n return targetId;\n }", "@Override\r\n\t\r\n\t\r\n\t\r\n\tpublic int[] locate(int target) {\r\n\t\tint low = 0; \r\n\t\tint high = length()- 1;\r\n\t\t\r\n\t\twhile ( low <= high) {\r\n\t\t\tint mid = ((low + high)/2);\r\n\t\t\tint value = inspect(mid,0);\r\n\t\t\t\t\t\r\n\t\t\tif ( value == target) {\r\n\t\t\t\treturn new int[] {mid,0};\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\telse if (value < target) {\r\n\t\t\t\tlow = mid +1;\r\n\t\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\thigh = mid -1;\r\n\t\t}\r\n\t\t\r\n\t}\r\n\t\treturn binarySearch(high, target);\r\n\t}", "public void setTargeted() {\n targeted ++;\n }", "public void setTarget(ObjectSequentialNumber target) {\n this.target = target;\n }", "public Point getTarget()\n\t{\n\t\treturn this.target;\n\t}", "public Living getTarget();", "public void setTargetid(Integer targetid) {\n this.targetid = targetid;\n }", "public Entity.ID getTargetID() {\n return targetID;\n }", "public EntityID getTarget() {\n\t\treturn target.getValue();\n\t}", "public abstract int getSourceIndex(int index);", "private int findPos(byte[] contents, String target)\n {\n String contentsStr = null;\n try\n {\n contentsStr = new String(contents, \"ISO-8859-1\");\n }\n catch (UnsupportedEncodingException e)\n {\n e.printStackTrace();\n }\n return contentsStr.indexOf(target);\n }", "@Override\n\tpublic int getTargetParameter() {\n\t\treturn 0;\n\t}", "public Integer getTargetId() {\n\t\treturn targetId;\n\t}", "public static void testDiGui(int[] candidates, int target, int start) {\n\n if (target == 0) {\n return;\n } else if (target < 0) {\n return;\n } else {\n for (int i = start; i < candidates.length && candidates[i] > 0; i++) {\n\n System.out.println(candidates[i]);\n target = candidates[i];\n i++;\n testDiGui(candidates, target, i);\n target = -1;\n }\n }\n\n System.out.println(target);\n }", "public StateID GetTarget()\n {\n return targetID;\n }", "public int findPosition(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 <= end) {\n int mid = start + (end - start) / 2;\n if (nums[mid] == target) return mid;\n if (nums[mid] < target)\n start = mid + 1;\n else\n end = mid - 1;\n }\n return -1;\n }", "public void setTargetPosition(float x, float y){\r\n this.targetX = x;\r\n this.targetY = y;\r\n }", "public Long getTargetId() {\r\n return targetId;\r\n }", "String getTarget();", "String getTarget();", "public Player getTarget() {\n return target;\n }", "public Vector getTargets(){\n return targets;\n }", "private int getPosition(int[][] matrix, int target) {\n int rows = matrix.length;\n int columns = matrix[0].length;\n // Indices to traverse the matrix\n int i = rows - 1;\n int j = 0;\n // Position of the element\n int position = 0;\n // Loop until we are inside the boundary of the matrix\n while (i >= 0 && j < columns) {\n if (target >= matrix[i][j]) {\n position += i + 1;\n j++;\n } else {\n i--;\n }\n }\n return position;\n }", "public int search(int target)\n {\n for(int i = 0; i<list.length; i++)\n {\n if(target == list[i])\n {\n return i;\n }\n }\n }", "@Override\n\tpublic void findTarget(List<Combat> other) {\n\t}", "@Override\n\tpublic int[] locate(int target) {\n\t\tint n = this.length(); //number of rows\n\t\tint min = 0;\n\t\tint max = n-1;\n\t\tint mid = 0;\n\t\tint mid_element = 0;\n\t\twhile(min <= max){\n\t\t\tmid = (min + max)/2;\n\t\t\tmid_element = inspect(mid,mid);\n\t\t\tif(mid_element == target){\n\t\t\t\treturn new int[]{mid, mid};\n\t\t\t}\n\t\t\telse if(mid_element < target){\n\t\t\t\tmin = mid + 1;\n\t\t\t}\n\t\t\telse if(mid_element > target){\n\t\t\t\tmax = mid - 1;\n\t\t\t}\n\t\t}\n\t\tif(target < mid_element){\n\t\t\tif(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r,max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c <= mid; c++){\n\t\t\t\t\tif(inspect(mid, c) == target){\n\t\t\t\t\t\treturn new int[]{mid,c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tif(target > inspect(0, n-1)){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\telse if(target <= inspect(0, max)){\n\t\t\t\tfor(int r = 0; r < max; r++){\n\t\t\t\t\tif(inspect(r, max) == target){\n\t\t\t\t\t\treturn new int[]{r, max};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tfor(int c = 0; c < min; c++){\n\t\t\t\t\tif(inspect(min, c) == target){\n\t\t\t\t\t\treturn new int[]{min, c};\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "@Test\n\t\t\tpublic void testTargetsThreeSteps() {\n\t\t\t\t//Using walkway space that will go near a door with the wrong direction\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "private static int[] searchRange2(int[] nums, int target) {\n int targetPos = findTargetPosition(nums, target);\n if (targetPos == -1) {\n return new int[] {-1, -1};\n }\n int leftPos = findLeftTargetPos(nums, target, targetPos);\n int rightPos = findRightTargetPos(nums, target, targetPos);\n\n return new int[] {leftPos, rightPos};\n }", "public CPointer<BlenderObject> getTarget() throws IOException\n\t{\n\t\tlong __dna__targetAddress;\n\t\tif ((__io__pointersize == 8)) {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 128);\n\t\t} else {\n\t\t\t__dna__targetAddress = __io__block.readLong(__io__address + 104);\n\t\t}\n\t\tClass<?>[] __dna__targetTypes = new Class[]{BlenderObject.class};\n\t\treturn new CPointer<BlenderObject>(__dna__targetAddress, __dna__targetTypes, __io__blockTable.getBlock(__dna__targetAddress, BlenderObject.__DNA__SDNA_INDEX), __io__blockTable);\n\t}", "public static Direction offsetTarget(MapLocation target) throws GameActionException {\n\t\tfloat offsetDistMax = 2.5f;\n\t\tMapLocation newTarget = null;\n\t\tint c = 0;\n\t\twhile (newTarget == null) {\n\t\t\tc++;\n\t\t\ttry{\n\t\t\t\tDirection dir = myLoc.directionTo(target);\n\t\t\t\t\n\t\t\t\tif (c > 5) {\n\t\t\t\t\tdir = myLoc.directionTo(target);\n\t\t\t\t\tnewTarget = target;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (Math.random() > 0.5) dir = dir.rotateLeftDegrees(90);\n\t\t\t\telse dir = dir.rotateRightDegrees(90);\n\t\t\t\t\n\t\t\t\tfloat offsetDist = (float) (Math.random()*offsetDistMax);\n\n\t\t\t\tnewTarget = target.add(dir, offsetDist);\n\t\t\t\t\n\n\t\t\t\t\n\t\t\t} catch (Exception e) {\n\t\t\t\tdebug_print(\"blah: \" + e.getMessage());\n\t\t\t\te.getMessage();\n\t\t\t}\n\n\t\t}\n\t\tdebug_dot(newTarget, 225, 100, 0);\n\t\treturn myLoc.directionTo(newTarget);\n\t}", "public java.lang.String getTargetNumber() {\r\n return targetNumber;\r\n }", "private void setNewTarget() {\n startPoint = new Circle(targetPoint);\n projection.addShift(this.targetGenerator.shiftX(startPoint), this.targetGenerator.shiftY(startPoint),\n this.targetGenerator.gridManager);\n this.targetPoint = new Circle(this.targetGenerator.generateTarget(startPoint), this.targetGenerator.gridManager.pointSize);\n projection.convertFromPixels(this.targetPoint);\n \n gameListeners.addedNewLine(startPoint, targetPoint);\n \n // TODO make probability upgradeable to spawn a new pickup\n if (Math.random() < pickupSpawnProbability) {\n generateNewPickup(); \n }\n }", "public DNode getTo() { return targetnode; }", "public void toSelectingAttackTarget() {\n }", "public double getTargetX() {\n return m_targetX;\n }", "public Spatial getTarget() {\r\n return target;\r\n }", "com.google.protobuf.ByteString getTargetBytes();", "private static int predictDistance(Position source, Position target) {\n int x = source.getX() - target.getX();\n int y = source.getY() - target.getY();\n int c = (int)Math.ceil(Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2)));\n return c;\n }", "public void setTarget_table(String target_table) {\n this.target_table = target_table;\n }", "private byte[] getTarget( byte[] buffer ){\n \tbyte target[] = new byte[Constants.TARGET_ID_LEN];\n \tfor (int i=0; i<Constants.TARGET_ID_LEN; i++){\n \t\ttarget[i] = buffer[i + Constants.MESSAGE_ID_LEN + 1];\n \t}\n \treturn target;\n }", "@Test\n\tpublic void testTargetsFourSteps() {\n\t\tboard.calcTargets(14, 24, 4);\n\t\tSet<BoardCell> targets= board.getTargets();\n\t\tassertEquals(7, targets.size());\n\t\tassertTrue(targets.contains(board.getCellAt(14, 20)));\n\t\tassertTrue(targets.contains(board.getCellAt(15, 21)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 22)));\n\t\tassertTrue(targets.contains(board.getCellAt(17, 23)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(15, 23)));\n\t\tassertTrue(targets.contains(board.getCellAt(16, 24)));\t\t\t\n\t\tassertTrue(targets.contains(board.getCellAt(14, 22)));\n\t}", "public Iterator<Point> getPointAt(ModelObject target, int pos);", "Object getTarget();", "Object getTarget();", "private Position computeTargetConsideringLead(Position sourcePos, TargetGridElement targetGridElement) {\r\n\r\n // Target-Position & velocity-Vector\r\n Position targetPosition = targetGridElement.getCurrentGridElementPosition();\r\n Direction targetPosDirection = Directions.of(targetPosition.getDirection(), targetGridElement.getTargetVelocity());\r\n\r\n // Source-Position & velocity-Vector\r\n double angleBetweenSourceAndTarget = sourcePos.calcAngleRelativeTo(targetPosition);\r\n sourcePos = sourcePos.rotate(angleBetweenSourceAndTarget);\r\n Direction sourcePosDirection = Directions.of(sourcePos.getDirection(), velocity);\r\n\r\n Float64Vector targetVMinusSourceV = targetPosition.getVector().minus(sourcePos.getVector());\r\n double a = targetPosDirection.getVector().normValue() * targetPosDirection.getVector().normValue()\r\n - (sourcePosDirection.getVector().normValue() * sourcePosDirection.getVector().normValue());\r\n double b = 2 * targetVMinusSourceV.times(targetPosDirection.getVector()).doubleValue();\r\n double c = targetVMinusSourceV.normValue() * targetVMinusSourceV.normValue();\r\n\r\n if (a >= 0) {\r\n return targetPosition;\r\n }\r\n double sqrt = Math.sqrt(b * b - 4 * a * c);\r\n double dt1 = solveQuadraticFormula(a, b, sqrt, -1);\r\n double dt = computeDeltaT(a, b, sqrt, dt1);\r\n Float64Vector targetDirVectorWithTime = targetPosDirection.getVector().times(dt);\r\n return Positions.of(targetPosition.getX() + targetDirVectorWithTime.getValue(0), targetPosition.getY() + targetDirVectorWithTime.getValue(1),\r\n sourcePos.getZ());\r\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "@VisibleForTesting\n int[] findMatches(Token[] source, Token[] target) {\n final LevenshteinDistance table = new LevenshteinDistance(source, target);\n table.calculate();\n final int targetLen = target.length;\n final int[] result = new int[targetLen];\n LevenshteinDistance.EditOperation[] ops = table.getTargetOperations();\n for (int i = 0; i < targetLen; ++i) {\n if (ops[i].getType() == LevenshteinDistance.EDIT_UNCHANGED) {\n result[i] = ops[i].getPosition();\n } else {\n result[i] = -1;\n }\n }\n return result;\n }", "private void populateGUI(TargetDecoyMap targetDecoyMap) {\n\n ValidationQcParameters validationQCPreferences = identificationParameters.getIdValidationParameters().getValidationQCParameters();\n\n // Validation level\n validationLevelJComboBox.setSelectedItem(psParameter.getMatchValidationLevel().getName());\n\n // Database info\n FastaParameters fastaParameters = identificationParameters.getFastaParameters();\n boolean targetDecoy = fastaParameters.isTargetDecoy();\n\n if (!targetDecoy) {\n\n targetDecoyLbl.setText(\"Target only\");\n targetDecoyLbl.setForeground(Color.red);\n\n } else {\n\n targetDecoyLbl.setForeground(GREEN);\n\n }\n\n try {\n\n FastaSummary fastaSummary = FastaSummary.getSummary(fastaFile, fastaParameters, null);\n int nTarget = fastaSummary.nTarget;\n nTargetLbl.setText(nTarget + \" target sequences\");\n\n if (nTarget < 10000) {\n\n nTargetLbl.setForeground(Color.red);\n\n } else if (nTarget > 1000000) {\n\n nTargetLbl.setForeground(ORANGE);\n\n } else {\n\n nTargetLbl.setForeground(GREEN);\n\n }\n\n } catch (IOException iOException) {\n\n nTargetLbl.setText(\"Database size not available\");\n nTargetLbl.setForeground(Color.red);\n\n }\n\n // Target/Decoy group\n ((TitledBorder) targetDecoyGroupPanel.getBorder()).setTitle(\"Target/Decoy Distributions\");\n targetDecoyGroupPanel.repaint();\n if (targetDecoy) {\n int nTargetOnly = targetDecoyMap.getnTargetOnly();\n matchesBeforeFirstDecoyLbl.setText(nTargetOnly + \" matches before the first decoy hit\");\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n double desiredThreshold = targetDecoyResults.getUserInput();\n double nTargetLimit = 100.0 / desiredThreshold;\n if (nTargetOnly < nTargetLimit) {\n matchesBeforeFirstDecoyLbl.setForeground(Color.red);\n } else {\n matchesBeforeFirstDecoyLbl.setForeground(GREEN);\n }\n recommendedNumberOfTargetHitsLbl.setText(\"Recommended: \" + Util.roundDouble(nTargetLimit, 0) + \" matches before the first decoy hit\");\n\n double resolution = targetDecoyMap.getResolution();\n confidenceResolutionLbl.setText(\"PEP/Confidence resolution of \" + Util.roundDouble(resolution, 2) + \"%\");\n\n double minResolution = desiredThreshold;\n if (resolution > 10 * minResolution) {\n confidenceResolutionLbl.setForeground(Color.red);\n } else if (resolution > minResolution) {\n confidenceResolutionLbl.setForeground(ORANGE);\n } else {\n confidenceResolutionLbl.setForeground(GREEN);\n }\n recommendedResolutionLbl.setText(\"Recommended: resolution < \" + Util.roundDouble(minResolution, 2) + \"%\");\n } else {\n matchesBeforeFirstDecoyLbl.setText(\"No decoy\");\n matchesBeforeFirstDecoyLbl.setForeground(Color.gray);\n confidenceResolutionLbl.setText(\"Impossible to estimate confidence resolution\");\n confidenceResolutionLbl.setForeground(Color.gray);\n }\n\n // Target/decoy results\n if (targetDecoy) {\n \n double confidence = psParameter.getConfidence();\n MatchValidationLevel matchValidationLevel = psParameter.getMatchValidationLevel();\n validationStatusLbl.setText(\"Validation Status: \" + matchValidationLevel.getName());\n\n switch (matchValidationLevel) {\n case confident:\n validationStatusLbl.setForeground(GREEN);\n break;\n \n case doubtful:\n validationStatusLbl.setForeground(ORANGE);\n break;\n\n case not_validated:\n validationStatusLbl.setForeground(Color.red);\n break;\n\n case none:\n validationStatusLbl.setForeground(Color.gray);\n }\n\n TargetDecoyResults targetDecoyResults = targetDecoyMap.getTargetDecoyResults();\n String validationThresholdTxt = \"\";\n double threshold = targetDecoyResults.getUserInput();\n int thresholdType = targetDecoyResults.getInputType();\n if (thresholdType == 0) {\n validationThresholdTxt += \"Validation Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 1) {\n validationThresholdTxt += \"FDR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n } else if (targetDecoyResults.getInputType() == 2) {\n validationThresholdTxt += \"FNR Threshold: \" + Util.roundDouble(threshold, 2) + \"%\";\n }\n validationThresholdLbl.setText(validationThresholdTxt);\n\n confidenceLbl.setText(\"Confidence: \" + Util.roundDouble(confidence, 2) + \"%\");\n double validationThreshold = targetDecoyResults.getConfidenceLimit();\n confidenceThresholdLbl.setText(\"Expected Confidence: \" + Util.roundDouble(validationThreshold, 2) + \"%\");\n double margin = validationQCPreferences.getConfidenceMargin() * targetDecoyMap.getResolution();\n double confidenceThreshold = validationThreshold + margin;\n if (confidenceThreshold > 100) {\n confidenceThreshold = 100;\n }\n confidenceThresholdLbl.setText(\"Confident confidence: \" + Util.roundDouble(confidenceThreshold, 2) + \"%\");\n if (confidence < validationThreshold) {\n confidenceLbl.setForeground(Color.red);\n } else if (confidence < confidenceThreshold) {\n confidenceLbl.setForeground(ORANGE);\n } else {\n confidenceLbl.setForeground(GREEN);\n }\n } else {\n validationStatusLbl.setText(\"Validation Status: \" + psParameter.getMatchValidationLevel().getName());\n validationThresholdLbl.setText(\"Impossible to estimate validation threshold\");\n confidenceLbl.setText(\"Impossible to estimate confidence\");\n confidenceThresholdLbl.setText(\"Impossible to estimate confidence threshold\");\n validationStatusLbl.setForeground(Color.gray);\n confidenceLbl.setForeground(Color.gray);\n }\n\n // Quality filters\n final DefaultTableModel tableModel = new FiltersTableModel();\n qualityFiltersTable.setModel(tableModel);\n qualityFiltersTable.getColumn(\"\").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setMaxWidth(50);\n qualityFiltersTable.getColumn(\" \").setCellRenderer(new TrueFalseIconRenderer(\n new ImageIcon(this.getClass().getResource(\"/icons/accept-new.png\")),\n new ImageIcon(this.getClass().getResource(\"/icons/error-new.png\")),\n \"Yes\", \"No\"));\n\n int valid = 0;\n for (String qcCheck : psParameter.getQcCriteria()) {\n if (psParameter.isQcPassed(qcCheck)) {\n valid++;\n }\n }\n ((TitledBorder) qualityFiltersPanel.getBorder()).setTitle(\"Quality Filters (\" + valid + \"/\" + psParameter.getQcCriteria().size() + \")\");\n }", "public String getTarget()\r\n\t{\r\n\t\treturn _target;\r\n\t}", "public T getPater(T target) {\r\n int index = getIndex(target);\r\n if (index * 2 + 1 >= SIZE) {\r\n return null;\r\n } else if (tree[index * 2 + 1] == null) {\r\n return null;\r\n } else {\r\n return tree[index * 2 + 1];\r\n }\r\n }", "@objid (\"19651663-f981-4f11-802a-d5d7cbd6f88a\")\n Instance getTarget();", "java.lang.String getTarget();", "java.lang.String getTarget();", "protected void FacetoTarget(Character pc, Object target) {\n int dx, dy;\n if (target instanceof Character) {\n dx = ((Character) target).x - pc.x;\n dy = ((Character) target).y - pc.y;\n } else if (target instanceof Envir_Item) {\n dx = ((Envir_Item) target).getX() - bottom_screen.left - pc.x;\n dy = ((Envir_Item) target).getY() - bottom_screen.top - pc.y;\n } else {\n return;\n }\n\n if (Math.abs(dx) >= Math.abs(dy)) {\n if (dx > 0) {\n pc.setDir(2);\n } else {\n pc.setDir(1);\n }\n } else {\n if (dy > 0) {\n pc.setDir(0);\n } else {\n pc.setDir(3);\n }\n }\n }", "public String targetId() {\n return this.targetId;\n }", "public void processTargetTracker (Entity squad, Entity target, boolean contactEnd) {\n\t}", "final int getNextBuildTarget(int difficulty) {\n/* 1970 */ difficulty = Math.min(5, difficulty);\n/* 1971 */ int start = difficulty * 3;\n/* 1972 */ int templateFound = -1;\n/* */ int x;\n/* 1974 */ for (x = start; x < 17; x++) {\n/* */ \n/* 1976 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1978 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* 1983 */ if (templateFound == -1)\n/* */ {\n/* */ \n/* 1986 */ for (x = start; x > 0; x--) {\n/* */ \n/* 1988 */ if (this.epicTargetItems[x] <= 0L) {\n/* */ \n/* 1990 */ templateFound = x;\n/* */ \n/* */ break;\n/* */ } \n/* */ } \n/* */ }\n/* 1996 */ if (templateFound > -1) {\n/* */ \n/* 1998 */ if (templateFound < 3)\n/* 1999 */ return 717; \n/* 2000 */ if (templateFound < 6)\n/* 2001 */ return 714; \n/* 2002 */ if (templateFound < 9)\n/* 2003 */ return 713; \n/* 2004 */ if (templateFound < 12)\n/* 2005 */ return 715; \n/* 2006 */ if (templateFound < 15) {\n/* 2007 */ return 712;\n/* */ }\n/* 2009 */ return 716;\n/* */ } \n/* 2011 */ return -1;\n/* */ }", "@Override\n\tpublic void setChaseTarget(){\n\t\tthis.setTarget(_pacman.getX()+Constants.SQUARE_SIDE,_pacman.getY()-(4*Constants.SQUARE_SIDE));\n\t}", "void setTarget(String target) {\n try {\n int value = Integer.valueOf(target);\n game.setTarget(value);\n } catch (NumberFormatException e) {\n // caused by inputting strings\n } catch (IllegalArgumentException e) {\n // caused by number < 6.\n game.setTarget(10);\n }\n }", "public boolean hasTargetPos() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "private <T> void getPossibleTargets(TargetingScheme<T> t, TargetList<T> current, List<? extends T> searchSpace, int startInd,\n List<TargetList<T>> outputList) {\n if (t.isFullyTargeted(current)) {\n outputList.add(current);\n return;\n }\n if (startInd >= searchSpace.size()) {\n System.out.println(\"this shouldn't happen lmao\");\n }\n int numToSelect = Math.min(searchSpace.size(), t.getMaxTargets());\n for (int i = startInd; i < searchSpace.size() - (numToSelect - current.targeted.size() - 1); i++) {\n T c = searchSpace.get(i);\n if (!current.targeted.contains(c)) {\n TargetList<T> copy = current.clone();\n copy.targeted.add(c);\n this.getPossibleTargets(t, copy, searchSpace, i + 1, outputList);\n }\n }\n }", "@Test\n\t\t\tpublic void testTargetsFourSteps() {\n\t\t\t\t//Using random walkway space\n\t\t\t\tboard.calcTargets(5, 18, 3);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(10, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 21)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 19)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(3, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(5, 17)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(4, 18)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 18)));\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public int indexOf(E target) {\n\t\tint first = 0;\n\t\tint last = data.size() - 1;\n\n\t\twhile (first <= last) {\n\t\t\tint mid = (first + last) / 2;\n\t\t\tif (cmp.compare(target, data.get(mid)) == 0) {\n\t\t\t\treturn mid;\n\t\t\t}\n\t\t\telse if (cmp.compare(target, data.get(mid)) < 0) {\n\t\t\t\tlast = mid - 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tfirst = mid + 1;\n\t\t\t}\n\t\t}\n\n\t\treturn -1;\n\t}", "@Test\r\n\tpublic void testTargetsFourSteps() {\r\n\t\tboard.calcTargets(24, 0, 4);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(24, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 1)));\r\n\t\t\r\n\t\tboard.calcTargets(0, 20, 4);\r\n\t\ttargets = board.getTargets();\r\n\t\tassertEquals(4, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(1, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(2, 20)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(3, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(4, 20)));\r\n\t\t\r\n\t\t// Includes a path that doesn't have enough length plus one door\r\n\t\tboard.calcTargets(9, 0, 4);\r\n\t\ttargets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 4)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(9, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 3)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(10, 1)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(12, 1)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(8, 2)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(11, 0)));\t\r\n\t}", "public RaceCar getTarget() {\n return target;\n }", "public String getTarget() {\n return this.target;\n }", "@Test\r\n\tpublic void testTargetsSixSteps() {\r\n\t\tboard.calcTargets(24, 17, 6);\r\n\t\tSet<BoardCell> targets= board.getTargets();\r\n\t\tassertEquals(8, targets.size());\r\n\t\tassertTrue(targets.contains(board.getCellAt(18, 17)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(20, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(19, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(21, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(23, 18)));\t\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 19)));\r\n\t\tassertTrue(targets.contains(board.getCellAt(22, 17)));\r\n\t\t\r\n\t}", "public Map<Integer, TargetDef> getTargetQueries();", "public int pacmanMoves(List<Integer> target){\n int numOfmoves = 0;\n //counts the steps to get to the target\n for(int i=target.get(0);i>0;i--){\n numOfmoves++;\n }\n for(int i=target.get(1);i>0;i--){\n numOfmoves++;\n }\n return numOfmoves;\n }", "private boolean reachX(Position target) {\n return position.x == target.x;\n }", "@Override\n public ControllerViewEvent getTargetEffectOne() {\n ArrayList<Square> possibleTarget = new ArrayList<>();\n for (int i = 0; i < 4; i++) {\n if (getOwner().getPosition().checkDirection(i) && !getOwner().getPosition().getNextSquare(i).getSquareColour().equals(getOwner().getPosition().getSquareColour()) && !getOwner().getPosition().getNextSquare(i).findRoomPlayers().isEmpty())\n possibleTarget.add(getOwner().getPosition().getNextSquare(i));\n }\n return new TargetSquareRequestEvent(getOwner().getUsername(), Encoder.encodeSquareTargetsX(possibleTarget), Encoder.encodeSquareTargetsY(possibleTarget));\n }", "public Move(int index, Target target){\r\n this.handIndex = index;\r\n this.target = target;\r\n }", "abstract public int findTargetToReplace(MemRef r);", "@Test\n\t\t\tpublic void testTargetsTwoSteps() {\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(8, 16, 2);\n\t\t\t\tSet<BoardCell> targets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(6, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(10, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(7, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(9, 15)));\n\t\t\t\t//Length of 2\n\t\t\t\tboard.calcTargets(15, 15, 2);\n\t\t\t\ttargets= board.getTargets();\n\t\t\t\tboard.clearTargets();\n\t\t\t\tassertEquals(4, targets.size());\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(13, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(17, 15)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(14, 16)));\n\t\t\t\tassertTrue(targets.contains(board.getCellAt(15, 17)));\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t}", "public Object getTargetValue(int idx, Object def);" ]
[ "0.7208216", "0.711838", "0.7026227", "0.6587456", "0.6540184", "0.63887453", "0.6240099", "0.60881144", "0.60421956", "0.60260797", "0.59927416", "0.5961661", "0.5951217", "0.5929538", "0.5864982", "0.5806449", "0.57913244", "0.5777108", "0.57526284", "0.5707325", "0.56631124", "0.56596076", "0.55706894", "0.5553167", "0.5550857", "0.5544616", "0.55020076", "0.54722196", "0.545999", "0.54580796", "0.5455644", "0.54523754", "0.5440916", "0.5437973", "0.5423368", "0.54180104", "0.54173386", "0.5415172", "0.5412724", "0.54115814", "0.53849953", "0.53788877", "0.537144", "0.5369927", "0.5362503", "0.5362503", "0.5338059", "0.5331119", "0.53288203", "0.5326971", "0.5326226", "0.5316535", "0.5306508", "0.5304909", "0.530147", "0.52970266", "0.5291735", "0.52872056", "0.5277293", "0.52696824", "0.52694315", "0.5264898", "0.5264582", "0.52636695", "0.52605814", "0.5255733", "0.5249242", "0.52484304", "0.52367175", "0.52367175", "0.52348226", "0.5230993", "0.52270764", "0.5221397", "0.5202773", "0.5195396", "0.5188123", "0.51800674", "0.51800674", "0.5177376", "0.51749456", "0.5158779", "0.51570404", "0.51548624", "0.51479465", "0.514179", "0.51369697", "0.51334816", "0.5132537", "0.51316065", "0.5130061", "0.51290584", "0.51271945", "0.512173", "0.5117925", "0.51127553", "0.511223", "0.5107555", "0.50928557", "0.5091661", "0.5086859" ]
0.0
-1
Creates a ConfigPackage with costs incremented by 1
public ConfigPackage(Set<RelayRouteCost> relayTable, String senderNodeId){ this.relayTable = new TreeSet<>(relayTable); this.senderNodeId = senderNodeId; incrementRelayTable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "PackageBuilder() {\n\t\tweightMap = new HashMap<>();\n\t\tcostMap = new HashMap<>();\n\t\tcombinations = new ArrayList<>();\n\t}", "private void setupSettlementCost(){\n\t\tsettlementCost.put(ResourceKind.WOOL, 1);\n\t\tsettlementCost.put(ResourceKind.WOOD, 1);\n\t\tsettlementCost.put(ResourceKind.BRICK, 1);\n\t\tsettlementCost.put(ResourceKind.GRAIN, 1);\n\t}", "public void calculateCost() {\n \tdouble costToShipPack;\n \tint numOfPacks = 1;\n \t\n \tfor(Package p: this.packages) {\n \t\tcostToShipPack = 3 + (p.calcVolume() - 1);\n \t\tthis.totalAmounts.put(\"Package \"+numOfPacks, costToShipPack);\n \t\tnumOfPacks++;\n \t}\n \t\n }", "ShipmentCostEstimate createShipmentCostEstimate();", "public void createCostGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woCostTemp; \n\t\tdouble strCostTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle;\n\n\t\tint noOfRows = itemset0.countRows(); \n\t\tGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woCost = new double[noOfRows];\n\t\tdouble[] structureCost = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\twoCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOSTSINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOST\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\tif (woCost[i]>0 || structureCost[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOCOSTTITLE: Work Order Cost\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\tGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woCost,structureCost);\n\t}", "public CostFactoryImpl() {\n\t\tsuper();\n\t}", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Configuration createConfiguration();", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\theuristicStrategyEClass = createEClass(HEURISTIC_STRATEGY);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__GRAPHIC_REPRESENTATION);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__NEMF);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__ECORE_CONTAINMENT);\n\t\tcreateEAttribute(heuristicStrategyEClass, HEURISTIC_STRATEGY__CURRENT_REPRESENTATION);\n\t\tcreateEAttribute(heuristicStrategyEClass, HEURISTIC_STRATEGY__CURRENT_MMGR);\n\t\tcreateEReference(heuristicStrategyEClass, HEURISTIC_STRATEGY__LIST_REPRESENTATION);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_HEURISTICS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_ROOT_ELEMENT);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_GRAPHICAL_ELEMENTS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___GET_FEATURE_NAME__ECLASS_ECLASS);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___GET_ELIST_ECLASSFROM_EREFERENCE__EREFERENCE);\n\t\tcreateEOperation(heuristicStrategyEClass, HEURISTIC_STRATEGY___EXECUTE_DIRECT_PATH_MATRIX);\n\n\t\tconcreteStrategyLinkEClass = createEClass(CONCRETE_STRATEGY_LINK);\n\n\t\tstrategyLabelEClass = createEClass(STRATEGY_LABEL);\n\t\tcreateEOperation(strategyLabelEClass, STRATEGY_LABEL___GET_LABEL__ECLASS);\n\n\t\tconcreteStrategyLabelFirstStringEClass = createEClass(CONCRETE_STRATEGY_LABEL_FIRST_STRING);\n\n\t\tconcreteStrategyLabelIdentifierEClass = createEClass(CONCRETE_STRATEGY_LABEL_IDENTIFIER);\n\n\t\tconcreteStrategyLabelParameterEClass = createEClass(CONCRETE_STRATEGY_LABEL_PARAMETER);\n\t\tcreateEReference(concreteStrategyLabelParameterEClass, CONCRETE_STRATEGY_LABEL_PARAMETER__LABEL_PARAMETER);\n\n\t\tlabelParameterEClass = createEClass(LABEL_PARAMETER);\n\t\tcreateEAttribute(labelParameterEClass, LABEL_PARAMETER__LIST_LABEL);\n\t\tcreateEOperation(labelParameterEClass, LABEL_PARAMETER___TO_COMMA_SEPARATED_STRING_LABEL);\n\t\tcreateEOperation(labelParameterEClass, LABEL_PARAMETER___DEFAULT_PARAMETERS);\n\n\t\tstrategyRootSelectionEClass = createEClass(STRATEGY_ROOT_SELECTION);\n\t\tcreateEOperation(strategyRootSelectionEClass, STRATEGY_ROOT_SELECTION___GET_ROOT__ELIST_ELIST);\n\t\tcreateEOperation(strategyRootSelectionEClass, STRATEGY_ROOT_SELECTION___LIST_ROOT__ELIST_ELIST);\n\n\t\tconcreteStrategyMaxContainmentEClass = createEClass(CONCRETE_STRATEGY_MAX_CONTAINMENT);\n\n\t\tconcreteStrategyNoParentEClass = createEClass(CONCRETE_STRATEGY_NO_PARENT);\n\n\t\tstrategyPaletteEClass = createEClass(STRATEGY_PALETTE);\n\t\tcreateEOperation(strategyPaletteEClass, STRATEGY_PALETTE___GET_PALETTE__EOBJECT);\n\n\t\tconcreteStrategyPaletteEClass = createEClass(CONCRETE_STRATEGY_PALETTE);\n\n\t\tstrategyArcSelectionEClass = createEClass(STRATEGY_ARC_SELECTION);\n\t\tcreateEReference(strategyArcSelectionEClass, STRATEGY_ARC_SELECTION__ARC_DIRECTION);\n\t\tcreateEOperation(strategyArcSelectionEClass, STRATEGY_ARC_SELECTION___IS_ARC__ECLASS);\n\n\t\tconcreteStrategyArcSelectionEClass = createEClass(CONCRETE_STRATEGY_ARC_SELECTION);\n\n\t\tstrategyArcDirectionEClass = createEClass(STRATEGY_ARC_DIRECTION);\n\t\tcreateEOperation(strategyArcDirectionEClass, STRATEGY_ARC_DIRECTION___GET_DIRECTION__ECLASS);\n\n\t\tarcParameterEClass = createEClass(ARC_PARAMETER);\n\t\tcreateEAttribute(arcParameterEClass, ARC_PARAMETER__SOURCE);\n\t\tcreateEAttribute(arcParameterEClass, ARC_PARAMETER__TARGET);\n\t\tcreateEOperation(arcParameterEClass, ARC_PARAMETER___DEFAULT_PARAM);\n\n\t\tdefaultArcParameterEClass = createEClass(DEFAULT_ARC_PARAMETER);\n\t\tcreateEOperation(defaultArcParameterEClass, DEFAULT_ARC_PARAMETER___TO_COMMA_SEPARATED_STRING_SOURCE);\n\t\tcreateEOperation(defaultArcParameterEClass, DEFAULT_ARC_PARAMETER___TO_COMMA_SEPARATED_STRING_TARGET);\n\n\t\tconcreteStrategyArcDirectionEClass = createEClass(CONCRETE_STRATEGY_ARC_DIRECTION);\n\t\tcreateEReference(concreteStrategyArcDirectionEClass, CONCRETE_STRATEGY_ARC_DIRECTION__PARAM);\n\t\tcreateEOperation(concreteStrategyArcDirectionEClass, CONCRETE_STRATEGY_ARC_DIRECTION___CONTAINS_STRING_EREFERENCE_NAME__ELIST_STRING);\n\n\t\tconcreteStrategyDefaultDirectionEClass = createEClass(CONCRETE_STRATEGY_DEFAULT_DIRECTION);\n\n\t\tstrategyNodeSelectionEClass = createEClass(STRATEGY_NODE_SELECTION);\n\t\tcreateEOperation(strategyNodeSelectionEClass, STRATEGY_NODE_SELECTION___IS_NODE__ECLASS);\n\n\t\tconcreteStrategyDefaultNodeSelectionEClass = createEClass(CONCRETE_STRATEGY_DEFAULT_NODE_SELECTION);\n\n\t\tstrategyPossibleElementsEClass = createEClass(STRATEGY_POSSIBLE_ELEMENTS);\n\t\tcreateEReference(strategyPossibleElementsEClass, STRATEGY_POSSIBLE_ELEMENTS__ECLASS_NO_ELEMENTS);\n\t\tcreateEOperation(strategyPossibleElementsEClass, STRATEGY_POSSIBLE_ELEMENTS___POSSIBLE_ELEMENTS__ECLASS_ELIST_ELIST);\n\n\t\tconcreteStrategyContainmentDiagramElementEClass = createEClass(CONCRETE_STRATEGY_CONTAINMENT_DIAGRAM_ELEMENT);\n\n\t\tecoreMatrixContainmentEClass = createEClass(ECORE_MATRIX_CONTAINMENT);\n\t\tcreateEAttribute(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT__DIRECT_MATRIX_CONTAINMENT);\n\t\tcreateEAttribute(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT__PATH_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_PARENT__INTEGER);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_DIRECT_MATRIX_CONTAINMENT__ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_PATH_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___COPY_MATRIX);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___PRINT_DIRECT_MATRIX_CONTAINMENT__ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_EALL_CHILDS__ECLASS_ELIST);\n\t\tcreateEOperation(ecoreMatrixContainmentEClass, ECORE_MATRIX_CONTAINMENT___GET_ALL_PARENTS__INTEGER);\n\n\t\theuristicStrategySettingsEClass = createEClass(HEURISTIC_STRATEGY_SETTINGS);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_LABEL);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_ROOT);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_PALETTE);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_ARC_SELECTION);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_NODE_SELECTION);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_POSSIBLE_ELEMENTS);\n\t\tcreateEReference(heuristicStrategySettingsEClass, HEURISTIC_STRATEGY_SETTINGS__STRATEGY_LINKCOMPARTMENT);\n\n\t\tstrategyLinkCompartmentEClass = createEClass(STRATEGY_LINK_COMPARTMENT);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_LINKS);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_COMPARTMENT);\n\t\tcreateEReference(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT__LIST_AFFIXED);\n\t\tcreateEOperation(strategyLinkCompartmentEClass, STRATEGY_LINK_COMPARTMENT___EXECUTE_LINK_COMPARTMENTS_HEURISTICS__ECLASS);\n\n\t\tconcreteContainmentasAffixedEClass = createEClass(CONCRETE_CONTAINMENTAS_AFFIXED);\n\n\t\tconcreteContainmentasLinksEClass = createEClass(CONCRETE_CONTAINMENTAS_LINKS);\n\n\t\tconcreteContainmentasCompartmentsEClass = createEClass(CONCRETE_CONTAINMENTAS_COMPARTMENTS);\n\n\t\trepreHeurSSEClass = createEClass(REPRE_HEUR_SS);\n\t\tcreateEReference(repreHeurSSEClass, REPRE_HEUR_SS__HEURISTIC_STRATEGY_SETTINGS);\n\t}", "ShipmentPackage createShipmentPackage();", "private CostHelper() {}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbluetoothPortEClass = createEClass(BLUETOOTH_PORT);\n\n\t\tl2CAPInJobEClass = createEClass(L2CAP_IN_JOB);\n\n\t\tl2CAPoutJobEClass = createEClass(L2CA_POUT_JOB);\n\t}", "private static Pool setUpPool(String name, double volume, double temp,\n double pH, double nutrientCoefficient, GuppySet startingGuppies) {\n Pool pool = new Pool(name, volume, temp, pH, nutrientCoefficient);\n\n pool.addFish(startingGuppies.generateGuppies());\n\n return pool;\n }", "public void createPackageContents()\n {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tclarityAbstractObjectEClass = createEClass(CLARITY_ABSTRACT_OBJECT);\n\t\tcreateEAttribute(clarityAbstractObjectEClass, CLARITY_ABSTRACT_OBJECT__CLARITY_CONNECTION);\n\n\t\tclarityAddFilesEClass = createEClass(CLARITY_ADD_FILES);\n\n\t\tclarityGetBatchResultEClass = createEClass(CLARITY_GET_BATCH_RESULT);\n\n\t\tclarityGetKeyEClass = createEClass(CLARITY_GET_KEY);\n\n\t\tclarityQueryBatchEClass = createEClass(CLARITY_QUERY_BATCH);\n\n\t\tclarityReloadFileEClass = createEClass(CLARITY_RELOAD_FILE);\n\n\t\tclarityRemoveFilesEClass = createEClass(CLARITY_REMOVE_FILES);\n\n\t\tstartBatchEClass = createEClass(START_BATCH);\n\t}", "@Override\r\n\tpublic void addToCost() {\n\t\t\r\n\t}", "public void createConstraint(ConstraintConfig constraintConfig) throws ConfigurationException;", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__PARAMS);\n createEReference(modelEClass, MODEL__STATES);\n createEReference(modelEClass, MODEL__POPULATION);\n\n paramEClass = createEClass(PARAM);\n createEAttribute(paramEClass, PARAM__NAME);\n createEAttribute(paramEClass, PARAM__VALUE);\n\n agentStateEClass = createEClass(AGENT_STATE);\n createEAttribute(agentStateEClass, AGENT_STATE__NAME);\n createEReference(agentStateEClass, AGENT_STATE__PREFIXS);\n\n prefixEClass = createEClass(PREFIX);\n createEReference(prefixEClass, PREFIX__ACTION);\n createEAttribute(prefixEClass, PREFIX__CONTINUE);\n\n actionEClass = createEClass(ACTION);\n createEAttribute(actionEClass, ACTION__NAME);\n createEReference(actionEClass, ACTION__RATE);\n\n acT_SpNoMsgEClass = createEClass(ACT_SP_NO_MSG);\n\n acT_SpBrEClass = createEClass(ACT_SP_BR);\n createEReference(acT_SpBrEClass, ACT_SP_BR__RANGE);\n\n acT_SpUniEClass = createEClass(ACT_SP_UNI);\n createEReference(acT_SpUniEClass, ACT_SP_UNI__RANGE);\n\n acT_InBrEClass = createEClass(ACT_IN_BR);\n createEReference(acT_InBrEClass, ACT_IN_BR__VALUE);\n\n acT_InUniEClass = createEClass(ACT_IN_UNI);\n createEReference(acT_InUniEClass, ACT_IN_UNI__VALUE);\n\n iRangeEClass = createEClass(IRANGE);\n\n pR_ExprEClass = createEClass(PR_EXPR);\n createEReference(pR_ExprEClass, PR_EXPR__PR_E);\n\n terminal_PR_ExprEClass = createEClass(TERMINAL_PR_EXPR);\n createEAttribute(terminal_PR_ExprEClass, TERMINAL_PR_EXPR__LINKED_PARAM);\n\n ratE_ExprEClass = createEClass(RATE_EXPR);\n createEReference(ratE_ExprEClass, RATE_EXPR__RT);\n\n terminal_RATE_ExprEClass = createEClass(TERMINAL_RATE_EXPR);\n createEAttribute(terminal_RATE_ExprEClass, TERMINAL_RATE_EXPR__LINKED_PARAM);\n\n agenT_NUMEClass = createEClass(AGENT_NUM);\n createEAttribute(agenT_NUMEClass, AGENT_NUM__TYPE);\n\n populationEClass = createEClass(POPULATION);\n createEReference(populationEClass, POPULATION__POPU);\n\n agentsEClass = createEClass(AGENTS);\n createEAttribute(agentsEClass, AGENTS__TYPE);\n }", "@Test\n public void testToVendorConfiguration_generateNatPoolIpSpaces() {\n A10Configuration a10Configuration = new A10Configuration();\n a10Configuration.setHostname(\"c\");\n String poolName = \"pool\";\n a10Configuration\n .getNatPools()\n .put(poolName, new NatPool(poolName, Ip.parse(\"1.1.1.1\"), Ip.parse(\"1.1.1.10\"), 24));\n Configuration c =\n Iterables.getOnlyElement(a10Configuration.toVendorIndependentConfigurations());\n\n assertThat(\n c.getIpSpaces(),\n equalTo(\n ImmutableMap.of(\n ipSpaceNameForNatPool(poolName),\n IpRange.range(Ip.parse(\"1.1.1.1\"), Ip.parse(\"1.1.1.10\")))));\n }", "@Test\n public void testCostToDeployDapps() {\n TransactionResult result = deployContract(Contract.AION_BUFFER_PERF);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.BASIC_PERF);\n Assert.assertEquals(2_062_419L, result.energyUsed);\n \n result = deployContract(Contract.POC_EXCHANGE);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.ERC20);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.BASIC_APP);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n \n result = deployContract(Contract.TRS);\n Assert.assertEquals(100_000_000_000L, result.energyUsed);\n }", "Package createPackage();", "public Package(){\n\t\ttrackingNumber = \"Default tracking number\";\n\t\tweight = 0.0;\n\t\tshippingCost = 0.0;\n\t}", "public ExpansionCostConfigRecord() {\n\t\tsuper(ExpansionCostConfig.EXPANSION_COST_CONFIG);\n\t}", "public static void generateAll(ClassLoader classLoader, String packageName) throws IOException, InstantiationException, IllegalAccessException\n\t{\n\t\tnew AbstractConfigGenerator(classLoader)\n\t\t{\n\t\t\t@Override\n\t\t\tprotected String getPackageName()\n\t\t\t{\n\t\t\t\treturn packageName;\n\t\t\t}\n\t\t};\n\t}", "ShipmentGatewayConfig createShipmentGatewayConfig();", "private void setNrpConfigSpec()\n {\n nrpConfigSpec = new DVSNetworkResourcePoolConfigSpec();\n nrpConfigSpec.setKey(nrp.getKey());\n nrpConfigSpec.setName(nrp.getName());\n nrpConfigSpec.setAllocationInfo(nrp.getAllocationInfo());\n nrpConfigSpec.getAllocationInfo().setLimit(new Long(100));\n nrpConfigSpec.getAllocationInfo().getShares().setLevel(SharesLevel.HIGH);\n }", "@Override\n public long generateNewContractSize() {\n return (new Random().nextInt(100) + 1) * 250000L;\n }", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\trunnableEClass = createEClass(RUNNABLE);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__COMPONENT_INSTANCE);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__PORT_INSTANCE);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__PERIOD);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__LABEL_ACCESSES);\r\n\t\tcreateEReference(runnableEClass, RUNNABLE__DEADLINE);\r\n\r\n\t\tlabelEClass = createEClass(LABEL);\r\n\t\tcreateEReference(labelEClass, LABEL__COMPONENT_INSTANCE);\r\n\t\tcreateEReference(labelEClass, LABEL__COMPONENT_STATECHART);\r\n\t\tcreateEAttribute(labelEClass, LABEL__IS_CONSTANT);\r\n\r\n\t\tlabelAccessEClass = createEClass(LABEL_ACCESS);\r\n\t\tcreateEAttribute(labelAccessEClass, LABEL_ACCESS__ACCESS_KIND);\r\n\t\tcreateEReference(labelAccessEClass, LABEL_ACCESS__ACCESS_LABEL);\r\n\t\tcreateEReference(labelAccessEClass, LABEL_ACCESS__ACCESSING_RUNNABLE);\r\n\r\n\t\t// Create enums\r\n\t\tlabelAccessKindEEnum = createEEnum(LABEL_ACCESS_KIND);\r\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttoUseSolverCpFolderEClass = createEClass(TO_USE_SOLVER_CP_FOLDER);\n\t\tcreateEReference(toUseSolverCpFolderEClass, TO_USE_SOLVER_CP_FOLDER__SUB_FOLDERS);\n\t\tcreateEAttribute(toUseSolverCpFolderEClass, TO_USE_SOLVER_CP_FOLDER__NAME);\n\t\tcreateEReference(toUseSolverCpFolderEClass, TO_USE_SOLVER_CP_FOLDER__TO_USE_GENERATORS);\n\n\t\ttoUseSolverCpGeneratorEClass = createEClass(TO_USE_SOLVER_CP_GENERATOR);\n\t\tcreateEReference(toUseSolverCpGeneratorEClass, TO_USE_SOLVER_CP_GENERATOR__SOLVER);\n\t\tcreateEReference(toUseSolverCpGeneratorEClass, TO_USE_SOLVER_CP_GENERATOR__TO_USE_TUPLES);\n\n\t\ttoUseSolverCpTupleEClass = createEClass(TO_USE_SOLVER_CP_TUPLE);\n\t\tcreateEReference(toUseSolverCpTupleEClass, TO_USE_SOLVER_CP_TUPLE__TO_USE_LINEARS);\n\t\tcreateEReference(toUseSolverCpTupleEClass, TO_USE_SOLVER_CP_TUPLE__TO_USE_VARS);\n\t\tcreateEReference(toUseSolverCpTupleEClass, TO_USE_SOLVER_CP_TUPLE__TO_USE_LOGICALS);\n\t}", "@Override\n\tpublic int cost() {\n\t\treturn 5000;\n\t}", "public Cost(boolean time) {\r\n defaultCost = 5;\r\n haveSchedule = time;\r\n }", "public int getInitialConfig() {\n if (initialConfig.equals(\"TOTALSUM\")) {\n return 2;\n }\n if (initialConfig.equals(\"PROBABILISTIC\")) {\n return 1;\n }\n if (initialConfig.equals(\"DETERMINISTIC\")) {\n return 0;\n }\n else {\n throw new IllegalArgumentException(\"Illegal way of generating grid\");\n }\n }", "public void createPackageContents() {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n calcEClass = createEClass(CALC);\n createEReference(calcEClass, CALC__EXPR);\n\n exprEClass = createEClass(EXPR);\n\n bitShiftExprEClass = createEClass(BIT_SHIFT_EXPR);\n createEReference(bitShiftExprEClass, BIT_SHIFT_EXPR__CHILDREN);\n createEAttribute(bitShiftExprEClass, BIT_SHIFT_EXPR__OPERATORS);\n\n bitShiftExprChildEClass = createEClass(BIT_SHIFT_EXPR_CHILD);\n\n additiveExprEClass = createEClass(ADDITIVE_EXPR);\n createEReference(additiveExprEClass, ADDITIVE_EXPR__CHILDREN);\n createEAttribute(additiveExprEClass, ADDITIVE_EXPR__OPERATORS);\n\n additiveExprChildEClass = createEClass(ADDITIVE_EXPR_CHILD);\n\n multiplicativeExprEClass = createEClass(MULTIPLICATIVE_EXPR);\n createEReference(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__CHILDREN);\n createEAttribute(multiplicativeExprEClass, MULTIPLICATIVE_EXPR__OPERATORS);\n\n multiplicativeExprChildEClass = createEClass(MULTIPLICATIVE_EXPR_CHILD);\n\n numberEClass = createEClass(NUMBER);\n createEAttribute(numberEClass, NUMBER__VALUE);\n\n // Create enums\n bitShiftOpEEnum = createEEnum(BIT_SHIFT_OP);\n additiveOpEEnum = createEEnum(ADDITIVE_OP);\n multiplicativeOpEEnum = createEEnum(MULTIPLICATIVE_OP);\n }", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tbankEClass = createEClass(BANK);\r\n\t\tcreateEReference(bankEClass, BANK__MANAGERS);\r\n\t\tcreateEReference(bankEClass, BANK__ACCOUNTS);\r\n\t\tcreateEReference(bankEClass, BANK__CLIENTS);\r\n\r\n\t\tclientEClass = createEClass(CLIENT);\r\n\t\tcreateEReference(clientEClass, CLIENT__MANAGER);\r\n\t\tcreateEReference(clientEClass, CLIENT__ACCOUNTS);\r\n\t\tcreateEAttribute(clientEClass, CLIENT__NAME);\r\n\t\tcreateEReference(clientEClass, CLIENT__SPONSORSHIPS);\r\n\t\tcreateEAttribute(clientEClass, CLIENT__CAPACITY);\r\n\r\n\t\tmanagerEClass = createEClass(MANAGER);\r\n\t\tcreateEReference(managerEClass, MANAGER__CLIENTS);\r\n\t\tcreateEAttribute(managerEClass, MANAGER__NAME);\r\n\r\n\t\taccountEClass = createEClass(ACCOUNT);\r\n\t\tcreateEReference(accountEClass, ACCOUNT__OWNERS);\r\n\t\tcreateEAttribute(accountEClass, ACCOUNT__CREDIT);\r\n\t\tcreateEAttribute(accountEClass, ACCOUNT__OVERDRAFT);\r\n\t\tcreateEReference(accountEClass, ACCOUNT__CARDS);\r\n\r\n\t\tcardEClass = createEClass(CARD);\r\n\t\tcreateEAttribute(cardEClass, CARD__NUMBER);\r\n\t\tcreateEAttribute(cardEClass, CARD__TYPE);\r\n\r\n\t\t// Create enums\r\n\t\tcardTypeEEnum = createEEnum(CARD_TYPE);\r\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttaskEClass = createEClass(TASK);\n\t\tcreateEAttribute(taskEClass, TASK__TASK_ID);\n\t\tcreateEAttribute(taskEClass, TASK__NAME);\n\t\tcreateEReference(taskEClass, TASK__SUBTASKS);\n\t\tcreateEAttribute(taskEClass, TASK__DEADLINE);\n\n\t\tperiodicTaskEClass = createEClass(PERIODIC_TASK);\n\t\tcreateEAttribute(periodicTaskEClass, PERIODIC_TASK__PERIOD);\n\t\tcreateEAttribute(periodicTaskEClass, PERIODIC_TASK__OFFSET);\n\n\t\taperiodicTaskEClass = createEClass(APERIODIC_TASK);\n\t\tcreateEReference(aperiodicTaskEClass, APERIODIC_TASK__INTERARRIVAL_DISTRIBUTION);\n\n\t\tsubtaskEClass = createEClass(SUBTASK);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__NAME);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__PRIORITY);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__RET_ANCHOR_USED);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__ACTIVATION_SYNCHRONOUS);\n\t\tcreateEReference(subtaskEClass, SUBTASK__EXEC_TIME_DISTRIBUTION);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__BYPASS);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__DOWNSAMPLING_FACTOR);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__CALLING_THREAD_PRIORITY);\n\t\tcreateEReference(subtaskEClass, SUBTASK__MUTEXES);\n\t\tcreateEAttribute(subtaskEClass, SUBTASK__PIN_ID);\n\n\t\tdistributionEClass = createEClass(DISTRIBUTION);\n\n\t\tconstantEClass = createEClass(CONSTANT);\n\t\tcreateEAttribute(constantEClass, CONSTANT__VALUE);\n\n\t\texponentialEClass = createEClass(EXPONENTIAL);\n\t\tcreateEAttribute(exponentialEClass, EXPONENTIAL__MEAN);\n\n\t\tuniformEClass = createEClass(UNIFORM);\n\t\tcreateEAttribute(uniformEClass, UNIFORM__MAX);\n\t\tcreateEAttribute(uniformEClass, UNIFORM__MIN);\n\n\t\tunknownEClass = createEClass(UNKNOWN);\n\t\tcreateEAttribute(unknownEClass, UNKNOWN__MEAN);\n\t\tcreateEAttribute(unknownEClass, UNKNOWN__MIN);\n\t\tcreateEAttribute(unknownEClass, UNKNOWN__MAX);\n\n\t\tnormalEClass = createEClass(NORMAL);\n\t\tcreateEAttribute(normalEClass, NORMAL__MEAN);\n\t\tcreateEAttribute(normalEClass, NORMAL__STD_DEV);\n\n\t\tperformanceModelEClass = createEClass(PERFORMANCE_MODEL);\n\t\tcreateEReference(performanceModelEClass, PERFORMANCE_MODEL__TASKS);\n\t\tcreateEAttribute(performanceModelEClass, PERFORMANCE_MODEL__NAME);\n\t\tcreateEReference(performanceModelEClass, PERFORMANCE_MODEL__MUTEXES);\n\t\tcreateEAttribute(performanceModelEClass, PERFORMANCE_MODEL__SOURCE_FILE);\n\n\t\tssTaskEClass = createEClass(SS_TASK);\n\t\tcreateEAttribute(ssTaskEClass, SS_TASK__BUDGET);\n\t\tcreateEAttribute(ssTaskEClass, SS_TASK__REPLENISHMENT_PERIOD);\n\t\tcreateEAttribute(ssTaskEClass, SS_TASK__BACKGROUND_PRIORITY);\n\n\t\tmutexEClass = createEClass(MUTEX);\n\t\tcreateEAttribute(mutexEClass, MUTEX__NAME);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated)\n\t\t\treturn;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tbagTypeEClass = createEClass(BAG_TYPE);\n\n\t\ttupleTypeEClass = createEClass(TUPLE_TYPE);\n\t\tcreateEReference(tupleTypeEClass, TUPLE_TYPE__OCL_LIBRARY);\n\n\t\tcollectionTypeEClass = createEClass(COLLECTION_TYPE);\n\t\tcreateEReference(collectionTypeEClass, COLLECTION_TYPE__ELEMENT_TYPE);\n\t\tcreateEReference(collectionTypeEClass, COLLECTION_TYPE__OCL_LIBRARY);\n\t\tcreateEAttribute(collectionTypeEClass, COLLECTION_TYPE__KIND);\n\n\t\tinvalidTypeEClass = createEClass(INVALID_TYPE);\n\t\tcreateEReference(invalidTypeEClass, INVALID_TYPE__OCL_LIBRARY);\n\n\t\torderedSetTypeEClass = createEClass(ORDERED_SET_TYPE);\n\n\t\tsequenceTypeEClass = createEClass(SEQUENCE_TYPE);\n\n\t\tsetTypeEClass = createEClass(SET_TYPE);\n\n\t\tvoidTypeEClass = createEClass(VOID_TYPE);\n\t\tcreateEReference(voidTypeEClass, VOID_TYPE__OCL_LIBRARY);\n\n\t\ttypeTypeEClass = createEClass(TYPE_TYPE);\n\t\tcreateEReference(typeTypeEClass, TYPE_TYPE__REPRESENTED_TYPE);\n\n\t\toclLibraryEClass = createEClass(OCL_LIBRARY);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_BOOLEAN);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_STRING);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_INTEGER);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_REAL);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_ANY);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_VOID);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_INVALID);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_TYPE);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_COLLECTION);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_SEQUENCE);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_BAG);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_SET);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_ORDERED_SET);\n\t\tcreateEReference(oclLibraryEClass, OCL_LIBRARY__OCL_TUPLE);\n\n\t\tanyTypeEClass = createEClass(ANY_TYPE);\n\t}", "protected void generate() {\n\t\tcpGenerator( nx, ny, nz, ClosePackedLattice.HCP);\n\t}", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n ledsCodeDSLEClass = createEClass(LEDS_CODE_DSL);\n createEReference(ledsCodeDSLEClass, LEDS_CODE_DSL__PROJECT);\n\n projectEClass = createEClass(PROJECT);\n createEAttribute(projectEClass, PROJECT__NAME);\n createEReference(projectEClass, PROJECT__INFRASTRUCTURE_BLOCK);\n createEReference(projectEClass, PROJECT__INTERFACE_BLOCK);\n createEReference(projectEClass, PROJECT__APPLICATION_BLOCK);\n createEReference(projectEClass, PROJECT__DOMAIN_BLOCK);\n\n interfaceBlockEClass = createEClass(INTERFACE_BLOCK);\n createEAttribute(interfaceBlockEClass, INTERFACE_BLOCK__NAME);\n createEReference(interfaceBlockEClass, INTERFACE_BLOCK__INTERFACE_APPLICATION);\n\n interfaceApplicationEClass = createEClass(INTERFACE_APPLICATION);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__TYPE);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME);\n createEAttribute(interfaceApplicationEClass, INTERFACE_APPLICATION__NAME_APP);\n\n infrastructureBlockEClass = createEClass(INFRASTRUCTURE_BLOCK);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__BASE_PACKAGE);\n createEAttribute(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__PROJECT_VERSION);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__LANGUAGE);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__FRAMEWORK);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__ORM);\n createEReference(infrastructureBlockEClass, INFRASTRUCTURE_BLOCK__DATABASE);\n\n databaseEClass = createEClass(DATABASE);\n createEAttribute(databaseEClass, DATABASE__VERSION_VALUE);\n createEAttribute(databaseEClass, DATABASE__NAME_VALUE);\n createEAttribute(databaseEClass, DATABASE__USER_VALUE);\n createEAttribute(databaseEClass, DATABASE__PASS_VALUE);\n createEAttribute(databaseEClass, DATABASE__HOST_VALUE);\n createEAttribute(databaseEClass, DATABASE__ENV_VALUE);\n\n nameVersionEClass = createEClass(NAME_VERSION);\n createEAttribute(nameVersionEClass, NAME_VERSION__NAME_VALUE);\n createEAttribute(nameVersionEClass, NAME_VERSION__VERSION_VALUE);\n\n applicationBlockEClass = createEClass(APPLICATION_BLOCK);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__NAME);\n createEAttribute(applicationBlockEClass, APPLICATION_BLOCK__APPLICATION_DOMAIN);\n\n domainBlockEClass = createEClass(DOMAIN_BLOCK);\n createEAttribute(domainBlockEClass, DOMAIN_BLOCK__NAME);\n createEReference(domainBlockEClass, DOMAIN_BLOCK__MODULE);\n\n moduleBlockEClass = createEClass(MODULE_BLOCK);\n createEAttribute(moduleBlockEClass, MODULE_BLOCK__NAME);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENUM_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__ENTITY_BLOCK);\n createEReference(moduleBlockEClass, MODULE_BLOCK__SERVICE_BLOCK);\n\n serviceBlockEClass = createEClass(SERVICE_BLOCK);\n createEAttribute(serviceBlockEClass, SERVICE_BLOCK__NAME);\n createEReference(serviceBlockEClass, SERVICE_BLOCK__SERVICE_FIELDS);\n\n serviceMethodEClass = createEClass(SERVICE_METHOD);\n createEAttribute(serviceMethodEClass, SERVICE_METHOD__NAME);\n createEReference(serviceMethodEClass, SERVICE_METHOD__METHOD_ACESS);\n\n entityBlockEClass = createEClass(ENTITY_BLOCK);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__ACESS_MODIFIER);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__IS_ABSTRACT);\n createEAttribute(entityBlockEClass, ENTITY_BLOCK__NAME);\n createEReference(entityBlockEClass, ENTITY_BLOCK__CLASS_EXTENDS);\n createEReference(entityBlockEClass, ENTITY_BLOCK__ATTRIBUTES);\n createEReference(entityBlockEClass, ENTITY_BLOCK__REPOSITORY);\n\n attributeEClass = createEClass(ATTRIBUTE);\n createEAttribute(attributeEClass, ATTRIBUTE__ACESS_MODIFIER);\n createEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n createEAttribute(attributeEClass, ATTRIBUTE__NAME);\n createEAttribute(attributeEClass, ATTRIBUTE__PK);\n createEAttribute(attributeEClass, ATTRIBUTE__UNIQUE);\n createEAttribute(attributeEClass, ATTRIBUTE__NULLABLE);\n createEAttribute(attributeEClass, ATTRIBUTE__MIN);\n createEAttribute(attributeEClass, ATTRIBUTE__MAX);\n\n repositoryEClass = createEClass(REPOSITORY);\n createEAttribute(repositoryEClass, REPOSITORY__NAME);\n createEReference(repositoryEClass, REPOSITORY__METHODS);\n\n repositoryFieldsEClass = createEClass(REPOSITORY_FIELDS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__NAME);\n createEReference(repositoryFieldsEClass, REPOSITORY_FIELDS__METHODS_PARAMETERS);\n createEAttribute(repositoryFieldsEClass, REPOSITORY_FIELDS__RETURN_TYPE);\n\n enumBlockEClass = createEClass(ENUM_BLOCK);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__NAME);\n createEAttribute(enumBlockEClass, ENUM_BLOCK__VALUES);\n\n methodParameterEClass = createEClass(METHOD_PARAMETER);\n createEReference(methodParameterEClass, METHOD_PARAMETER__TYPE_AND_ATTR);\n\n typeAndAttributeEClass = createEClass(TYPE_AND_ATTRIBUTE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__TYPE);\n createEAttribute(typeAndAttributeEClass, TYPE_AND_ATTRIBUTE__NAME);\n\n extendBlockEClass = createEClass(EXTEND_BLOCK);\n createEReference(extendBlockEClass, EXTEND_BLOCK__VALUES);\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:42.023 -0500\", hash_original_method = \"B071A6644C9AA816555B15D21EE52FB4\", hash_generated_method = \"D65569BC7D40591501907DE0DFE452CE\")\n \n public void addPackageName(String packageName){\n \taddTaint(packageName.getTaint());\n }", "public void setCost(int c) {\r\n this.cost = c;\r\n }", "ConfigurationPackage getConfigurationPackage();", "public void createPackageContents()\n {\n if (isCreated) return;\n isCreated = true;\n\n // Create classes and their features\n modelEClass = createEClass(MODEL);\n createEReference(modelEClass, MODEL__STMTS);\n\n simpleStatementEClass = createEClass(SIMPLE_STATEMENT);\n\n assignmentEClass = createEClass(ASSIGNMENT);\n createEReference(assignmentEClass, ASSIGNMENT__LEFT_HAND_SIDE);\n createEReference(assignmentEClass, ASSIGNMENT__RIGHT_HAND_SIDE);\n\n expressionEClass = createEClass(EXPRESSION);\n\n unaryMinusExpressionEClass = createEClass(UNARY_MINUS_EXPRESSION);\n createEReference(unaryMinusExpressionEClass, UNARY_MINUS_EXPRESSION__SUB);\n\n unaryPlusExpressionEClass = createEClass(UNARY_PLUS_EXPRESSION);\n createEReference(unaryPlusExpressionEClass, UNARY_PLUS_EXPRESSION__SUB);\n\n logicalNegationExpressionEClass = createEClass(LOGICAL_NEGATION_EXPRESSION);\n createEReference(logicalNegationExpressionEClass, LOGICAL_NEGATION_EXPRESSION__SUB);\n\n bracketExpressionEClass = createEClass(BRACKET_EXPRESSION);\n createEReference(bracketExpressionEClass, BRACKET_EXPRESSION__SUB);\n\n pointerCallEClass = createEClass(POINTER_CALL);\n\n variableCallEClass = createEClass(VARIABLE_CALL);\n createEAttribute(variableCallEClass, VARIABLE_CALL__NAME);\n\n arraySpecifierEClass = createEClass(ARRAY_SPECIFIER);\n\n unarySpecifierEClass = createEClass(UNARY_SPECIFIER);\n createEAttribute(unarySpecifierEClass, UNARY_SPECIFIER__INDEX);\n\n rangeSpecifierEClass = createEClass(RANGE_SPECIFIER);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__FROM);\n createEAttribute(rangeSpecifierEClass, RANGE_SPECIFIER__TO);\n\n ioFunctionsEClass = createEClass(IO_FUNCTIONS);\n createEAttribute(ioFunctionsEClass, IO_FUNCTIONS__FILE_NAME);\n\n infoFunctionsEClass = createEClass(INFO_FUNCTIONS);\n\n manipFunctionsEClass = createEClass(MANIP_FUNCTIONS);\n\n arithFunctionsEClass = createEClass(ARITH_FUNCTIONS);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__EXPRESSION);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__FIELD);\n createEReference(arithFunctionsEClass, ARITH_FUNCTIONS__WHERE_EXPRESSION);\n\n loadEClass = createEClass(LOAD);\n\n storeEClass = createEClass(STORE);\n createEReference(storeEClass, STORE__EXPRESSION);\n\n exportEClass = createEClass(EXPORT);\n createEReference(exportEClass, EXPORT__EXPRESSION);\n\n printEClass = createEClass(PRINT);\n createEReference(printEClass, PRINT__EXPRESSION);\n\n depthEClass = createEClass(DEPTH);\n createEReference(depthEClass, DEPTH__EXPRESSION);\n\n fieldInfoEClass = createEClass(FIELD_INFO);\n createEReference(fieldInfoEClass, FIELD_INFO__EXPRESSION);\n\n containsEClass = createEClass(CONTAINS);\n createEReference(containsEClass, CONTAINS__KEYS);\n createEReference(containsEClass, CONTAINS__RIGHT);\n\n selectEClass = createEClass(SELECT);\n createEReference(selectEClass, SELECT__FIELDS);\n createEReference(selectEClass, SELECT__FROM_EXPRESSION);\n createEReference(selectEClass, SELECT__WHERE_EXPRESSION);\n\n lengthEClass = createEClass(LENGTH);\n createEReference(lengthEClass, LENGTH__EXPRESSION);\n\n sumEClass = createEClass(SUM);\n\n productEClass = createEClass(PRODUCT);\n\n constantEClass = createEClass(CONSTANT);\n\n primitiveEClass = createEClass(PRIMITIVE);\n createEAttribute(primitiveEClass, PRIMITIVE__STR);\n createEAttribute(primitiveEClass, PRIMITIVE__INT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__FLOAT_NUM);\n createEAttribute(primitiveEClass, PRIMITIVE__BOOL);\n createEAttribute(primitiveEClass, PRIMITIVE__NIL);\n\n arrayEClass = createEClass(ARRAY);\n createEReference(arrayEClass, ARRAY__VALUES);\n\n jSonObjectEClass = createEClass(JSON_OBJECT);\n createEReference(jSonObjectEClass, JSON_OBJECT__FIELDS);\n\n fieldEClass = createEClass(FIELD);\n createEReference(fieldEClass, FIELD__KEY);\n createEReference(fieldEClass, FIELD__VALUE);\n\n disjunctionExpressionEClass = createEClass(DISJUNCTION_EXPRESSION);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__LEFT);\n createEReference(disjunctionExpressionEClass, DISJUNCTION_EXPRESSION__RIGHT);\n\n conjunctionExpressionEClass = createEClass(CONJUNCTION_EXPRESSION);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__LEFT);\n createEReference(conjunctionExpressionEClass, CONJUNCTION_EXPRESSION__RIGHT);\n\n equalityExpressionEClass = createEClass(EQUALITY_EXPRESSION);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__LEFT);\n createEReference(equalityExpressionEClass, EQUALITY_EXPRESSION__RIGHT);\n\n inequalityExpressionEClass = createEClass(INEQUALITY_EXPRESSION);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__LEFT);\n createEReference(inequalityExpressionEClass, INEQUALITY_EXPRESSION__RIGHT);\n\n superiorExpressionEClass = createEClass(SUPERIOR_EXPRESSION);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__LEFT);\n createEReference(superiorExpressionEClass, SUPERIOR_EXPRESSION__RIGHT);\n\n superiorOrEqualExpressionEClass = createEClass(SUPERIOR_OR_EQUAL_EXPRESSION);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(superiorOrEqualExpressionEClass, SUPERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n inferiorExpressionEClass = createEClass(INFERIOR_EXPRESSION);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__LEFT);\n createEReference(inferiorExpressionEClass, INFERIOR_EXPRESSION__RIGHT);\n\n inferiorOrEqualExpressionEClass = createEClass(INFERIOR_OR_EQUAL_EXPRESSION);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__LEFT);\n createEReference(inferiorOrEqualExpressionEClass, INFERIOR_OR_EQUAL_EXPRESSION__RIGHT);\n\n additionExpressionEClass = createEClass(ADDITION_EXPRESSION);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__LEFT);\n createEReference(additionExpressionEClass, ADDITION_EXPRESSION__RIGHT);\n\n substractionExpressionEClass = createEClass(SUBSTRACTION_EXPRESSION);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__LEFT);\n createEReference(substractionExpressionEClass, SUBSTRACTION_EXPRESSION__RIGHT);\n\n multiplicationExpressionEClass = createEClass(MULTIPLICATION_EXPRESSION);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__LEFT);\n createEReference(multiplicationExpressionEClass, MULTIPLICATION_EXPRESSION__RIGHT);\n\n divisionExpressionEClass = createEClass(DIVISION_EXPRESSION);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__LEFT);\n createEReference(divisionExpressionEClass, DIVISION_EXPRESSION__RIGHT);\n\n moduloExpressionEClass = createEClass(MODULO_EXPRESSION);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__LEFT);\n createEReference(moduloExpressionEClass, MODULO_EXPRESSION__RIGHT);\n\n arrayCallEClass = createEClass(ARRAY_CALL);\n createEReference(arrayCallEClass, ARRAY_CALL__CALLEE);\n createEReference(arrayCallEClass, ARRAY_CALL__SPECIFIER);\n\n fieldCallEClass = createEClass(FIELD_CALL);\n createEReference(fieldCallEClass, FIELD_CALL__CALLEE);\n createEAttribute(fieldCallEClass, FIELD_CALL__FIELD);\n }", "@Override\r\n\tprotected float generateBaseCost(IGoapUnit goapUnit) {\n\t\treturn 2f;\r\n\t}", "public void createPackageContents() {\n if (this.isCreated) {\n return;\n }\n this.isCreated = true;\n\n // Create classes and their features\n this.systemSpecifiedExecutionTimeEClass = this.createEClass(SYSTEM_SPECIFIED_EXECUTION_TIME);\n\n this.specifiedExecutionTimeEClass = this.createEClass(SPECIFIED_EXECUTION_TIME);\n this.createEReference(this.specifiedExecutionTimeEClass,\n SPECIFIED_EXECUTION_TIME__SPECIFICATION_SPECIFIED_EXECUTION_TIME);\n\n this.componentSpecifiedExecutionTimeEClass = this.createEClass(COMPONENT_SPECIFIED_EXECUTION_TIME);\n this.createEReference(this.componentSpecifiedExecutionTimeEClass,\n COMPONENT_SPECIFIED_EXECUTION_TIME__ASSEMBLY_CONTEXT_COMPONENT_SPECIFIED_EXECUTION_TIME);\n }", "public PackageBuilderConfiguration(Properties properties) {\r\n init( null,\r\n properties );\r\n }", "public void addCost(int amount) {\n\t\tcost = amount;\n\t}", "public static void main(String[] args) {\n Source s1 = new Source(SourceType.FACTORY, \"Source1\");\n s1.setCapacity(10);\n Source s2 = new Source(35, SourceType.WAREHOUSE, \"Source2\");\n Source s3 = new Source(25, SourceType.WAREHOUSE, \"Source3\");\n System.out.println(s1.toString());\n // create the instances for Destination class\n Destination d1 = new Destination();\n d1.setDemand(20);\n d1.setName(\"Destination1\");\n Destination d2 = new Destination(25, \"Destination2\");\n Destination d3 = new Destination(25, \"Destination3\");\n // add sources and destinations\n Problem app = new Problem(3, 3);\n app.addSource(s1);\n app.addSource(s2);\n app.addSource(s3);\n\n app.addDestination(d1);\n app.addDestination(d2);\n app.addDestination(d3);\n\n int[][] cost1 = {{2, 3, 1}, {5, 4, 8}, {5, 6, 8}};\n\n app.setCost(cost1, 3, 3);\n System.out.println(app.toString()); // print the matrix of cost\n\n for (Source s : app.getSource()) {\n System.out.print(s.getCapacity() + \" \");\n }\n System.out.println();\n for (Destination d : app.getDestination()) {\n System.out.print(d.getDemand() + \" \");\n }\n\n }", "protected abstract double getDefaultCost();", "DataPackage createDataPackage();", "public int totalCostOfComponents()\n\t{\n\t\tint total = 0;\n\t\tfor (Component comp: configuration.values())\n\t\t{\n\t\t\ttotal += comp.getCost();\n\t\t}\n\t\treturn total;\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttaskModelEClass = createEClass(TASK_MODEL);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__ROOT);\n\t\tcreateEReference(taskModelEClass, TASK_MODEL__TASKS);\n\t\tcreateEAttribute(taskModelEClass, TASK_MODEL__NAME);\n\n\t\ttaskEClass = createEClass(TASK);\n\t\tcreateEAttribute(taskEClass, TASK__ID);\n\t\tcreateEAttribute(taskEClass, TASK__NAME);\n\t\tcreateEReference(taskEClass, TASK__OPERATOR);\n\t\tcreateEReference(taskEClass, TASK__SUBTASKS);\n\t\tcreateEReference(taskEClass, TASK__PARENT);\n\t\tcreateEAttribute(taskEClass, TASK__MIN);\n\t\tcreateEAttribute(taskEClass, TASK__MAX);\n\t\tcreateEAttribute(taskEClass, TASK__ITERATIVE);\n\n\t\tuserTaskEClass = createEClass(USER_TASK);\n\n\t\tapplicationTaskEClass = createEClass(APPLICATION_TASK);\n\n\t\tinteractionTaskEClass = createEClass(INTERACTION_TASK);\n\n\t\tabstractionTaskEClass = createEClass(ABSTRACTION_TASK);\n\n\t\tnullTaskEClass = createEClass(NULL_TASK);\n\n\t\ttemporalOperatorEClass = createEClass(TEMPORAL_OPERATOR);\n\n\t\tchoiceOperatorEClass = createEClass(CHOICE_OPERATOR);\n\n\t\torderIndependenceOperatorEClass = createEClass(ORDER_INDEPENDENCE_OPERATOR);\n\n\t\tinterleavingOperatorEClass = createEClass(INTERLEAVING_OPERATOR);\n\n\t\tsynchronizationOperatorEClass = createEClass(SYNCHRONIZATION_OPERATOR);\n\n\t\tparallelOperatorEClass = createEClass(PARALLEL_OPERATOR);\n\n\t\tdisablingOperatorEClass = createEClass(DISABLING_OPERATOR);\n\n\t\tsequentialEnablingInfoOperatorEClass = createEClass(SEQUENTIAL_ENABLING_INFO_OPERATOR);\n\n\t\tsequentialEnablingOperatorEClass = createEClass(SEQUENTIAL_ENABLING_OPERATOR);\n\n\t\tsuspendResumeOperatorEClass = createEClass(SUSPEND_RESUME_OPERATOR);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tliveScoreEClass = createEClass(LIVE_SCORE);\n\t\tcreateEReference(liveScoreEClass, LIVE_SCORE__PREFEREDPLAYER);\n\t\tcreateEAttribute(liveScoreEClass, LIVE_SCORE__SALONNAME);\n\n\t\tpreferedPlayerEClass = createEClass(PREFERED_PLAYER);\n\t\tcreateEAttribute(preferedPlayerEClass, PREFERED_PLAYER__NAME);\n\t\tcreateEAttribute(preferedPlayerEClass, PREFERED_PLAYER__WON);\n\t\tcreateEAttribute(preferedPlayerEClass, PREFERED_PLAYER__PLAYINGS);\n\t}", "public int getInitCost(){\n\t\treturn price;\n\t}", "static void configure() {\n float weight = (float) (Math.random() * 4000);\n System.out.println(\"Weight: \" + String.format(\"%.2f\", weight) + \"kg\");\n\n if (weight < 2000) {\n logisticsFactory = new RoadLogistics();\n } else {\n logisticsFactory = new SeaLogistics();\n }\n\n }", "public void newConfig ()\n {\n Class<?> clazz = group.getRawConfigClasses().get(0);\n try {\n ManagedConfig cfg = (ManagedConfig)PreparedEditable.PREPARER.apply(\n clazz.newInstance());\n if (cfg instanceof DerivedConfig) {\n ((DerivedConfig)cfg).cclass = group.getConfigClass();\n }\n newNode(cfg);\n } catch (Exception e) {\n log.warning(\"Failed to instantiate config [class=\" + clazz + \"].\", e);\n }\n }", "protected Configuration createConfiguration()\r\n/* 76: */ {\r\n/* 77:119 */ this.configuration_d.setNumOfIterations(Integer.parseInt(this.jTextField1.getText()));\r\n/* 78:120 */ this.configuration_d.setPopulationSize(Integer.parseInt(this.popSize_d.getText()));\r\n/* 79:121 */ ((GAConfiguration)this.configuration_d).setCrossoverThreshold(Double.valueOf(this.jTextField2.getText()).doubleValue());\r\n/* 80:122 */ ((GAConfiguration)this.configuration_d).setMutationThreshold(Double.valueOf(this.jTextField3.getText()).doubleValue());\r\n/* 81:123 */ ((GAConfiguration)this.configuration_d).setMethod((String)this.methodList_d.getSelectedItem());\r\n/* 82:124 */ return this.configuration_d;\r\n/* 83: */ }", "BRMSPackageBuilder(PackageBuilderConfiguration config) {\n super(config);\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tsutEClass = createEClass(SUT);\n\t\tcreateEAttribute(sutEClass, SUT__HOSTNAME);\n\t\tcreateEAttribute(sutEClass, SUT__IP);\n\t\tcreateEAttribute(sutEClass, SUT__HARDWARE);\n\t\tcreateEReference(sutEClass, SUT__SUT);\n\t\tcreateEReference(sutEClass, SUT__METRICMODEL);\n\t\tcreateEAttribute(sutEClass, SUT__TYPE);\n\n\t\tloadGeneratorEClass = createEClass(LOAD_GENERATOR);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HOSTNAME);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IP);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__IS_MONITOR);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__SUT);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__METRICMODEL);\n\t\tcreateEAttribute(loadGeneratorEClass, LOAD_GENERATOR__HARDWARE);\n\t\tcreateEReference(loadGeneratorEClass, LOAD_GENERATOR__MONITOR);\n\n\t\tmonitorEClass = createEClass(MONITOR);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HOSTNAME);\n\t\tcreateEAttribute(monitorEClass, MONITOR__IP);\n\t\tcreateEReference(monitorEClass, MONITOR__SUT);\n\t\tcreateEAttribute(monitorEClass, MONITOR__HARDWARE);\n\t\tcreateEAttribute(monitorEClass, MONITOR__DESCRIPTION);\n\n\t\tmetricModelEClass = createEClass(METRIC_MODEL);\n\t\tcreateEAttribute(metricModelEClass, METRIC_MODEL__NAME);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__CRITERIA);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__THRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__ASSOCIATIONCOUNTERCRITERIATHRESHOLD);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__DISK_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__TRANSACTION_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__MEMORY_COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__COUNTER);\n\t\tcreateEReference(metricModelEClass, METRIC_MODEL__METRIC);\n\n\t\t// Create enums\n\t\tsuT_TYPEEEnum = createEEnum(SUT_TYPE);\n\t\thardwareEEnum = createEEnum(HARDWARE);\n\t}", "protected abstract void generatePackageFiles(ClassTree classtree) throws Exception;", "public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tdataChannelEClass = createEClass(DATA_CHANNEL);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__CAPACITY);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__SOURCE_EVENT_GROUP);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__SINK_EVENT_GROUP);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__DATA_CHANNEL_SOURCE_CONNECTOR);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__DATA_CHANNEL_SINK_CONNECTOR);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__PARTITIONING);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__TIME_GROUPING);\r\n\t\tcreateEReference(dataChannelEClass, DATA_CHANNEL__JOINS);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__OUTGOING_DISTRIBUTION);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__SCHEDULING);\r\n\t\tcreateEAttribute(dataChannelEClass, DATA_CHANNEL__PUT_POLICY);\r\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tinstructionEClass = createEClass(INSTRUCTION);\n\n\t\tnamedElementEClass = createEClass(NAMED_ELEMENT);\n\t\tcreateEAttribute(namedElementEClass, NAMED_ELEMENT__NAME);\n\n\t\tgoForwardEClass = createEClass(GO_FORWARD);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__CM);\n\t\tcreateEAttribute(goForwardEClass, GO_FORWARD__INFINITE);\n\n\t\tgoBackwardEClass = createEClass(GO_BACKWARD);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__CM);\n\t\tcreateEAttribute(goBackwardEClass, GO_BACKWARD__INFINITE);\n\n\t\tbeginEClass = createEClass(BEGIN);\n\n\t\trotateEClass = createEClass(ROTATE);\n\t\tcreateEAttribute(rotateEClass, ROTATE__DEGREES);\n\t\tcreateEAttribute(rotateEClass, ROTATE__RANDOM);\n\n\t\treleaseEClass = createEClass(RELEASE);\n\n\t\tactionEClass = createEClass(ACTION);\n\n\t\tblockEClass = createEClass(BLOCK);\n\n\t\tendEClass = createEClass(END);\n\n\t\tchoreographyEClass = createEClass(CHOREOGRAPHY);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__INSTRUCTIONS);\n\t\tcreateEReference(choreographyEClass, CHOREOGRAPHY__EDGE_INSTRUCTIONS);\n\n\t\tedgeInstructionEClass = createEClass(EDGE_INSTRUCTION);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__SOURCE);\n\t\tcreateEReference(edgeInstructionEClass, EDGE_INSTRUCTION__TARGET);\n\n\t\tgrabEClass = createEClass(GRAB);\n\t}", "private Datacenter createDatacenter(String name){\n List<Host> hostList = new ArrayList<Host>();\n\n for (int i=0; i<HostCount; i++){\n\n // 2. A Machine contains one or more PEs or CPUs/Cores.\n List<Pe> peList = new ArrayList<Pe>();\n\n // 3. Create PEs and add these into a list.\n for (int j=0; j<HostCoreCount; j++){\n peList.add(new Pe(j, new PeProvisionerSimple(HostCoreMips)));\n }\n\n\n //in this example, the VMAllocatonPolicy in use is SpaceShared. It means that only one VM\n //is allowed to run on each Pe. As each Host has only one Pe, only one VM can run on each Host.\n hostList.add(\n new Host(\n i,\n new RamProvisionerSimple(HostRam),\n new BwProvisionerSimple(HostBandwidth),\n HostStorage,\n peList,\n new VmSchedulerSpaceShared(peList)\n )\n );\n }\n\n\n // 5. Create a DatacenterCharacteristics object that stores the\n // properties of a data center: architecture, OS, list of\n // Machines, allocation policy: time- or space-shared, time zone\n // and its price (G$/Pe time unit).\n String arch = \"x86\"; // system architecture\n String os = \"Linux\"; // operating system\n String vmm = \"Xen\";\n double time_zone = 10.0; // time zone this resource located\n double cost = 3.0; // the cost of using processing in this resource\n double costPerMem = 0.05;\t\t// the cost of using memory in this resource\n double costPerStorage = 0.001;\t// the cost of using storage in this resource\n double costPerBw = 0.0;\t\t\t// the cost of using bw in this resource\n LinkedList<Storage> storageList = new LinkedList<Storage>();\t//we are not adding SAN devices by now\n\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\n arch, os, vmm, hostList, time_zone, cost, costPerMem, costPerStorage, costPerBw);\n\n // 6. Finally, we need to create a PowerDatacenter object.\n Datacenter datacenter = null;\n\n try {\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return datacenter;\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\txActivityDiagramArbiterEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER);\n\n\t\txActivityDiagramArbiterStateEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_STATE);\n\n\t\txActivityDiagramArbiterTransitionEClass = createEClass(XACTIVITY_DIAGRAM_ARBITER_TRANSITION);\n\t}", "@Override\n\t\tpublic FTECost build() {\n\t\t\tMoney totalCost = Money.zero(Monetary.getCurrency(CurrencyCode.INR.name())).add(cost.annualSalary).add(cost.commission).add(cost.bonus).add(cost.otherCost);\n\t\t\tMoney hourlyRate = totalCost.divide(Costing.NUMBER_OF_WEEKS_IN_A_YEAR).divide(Costing.STANDARD_WORKING_HOURS_PER_WEEK);\n\t\t\tthis.cost.payment(Payment.of(PayRateUnit.HOURLY, hourlyRate));\n\t\t\treturn this.cost;\n\t\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tarrayOfStringEClass = createEClass(ARRAY_OF_STRING);\n\t\tcreateEAttribute(arrayOfStringEClass, ARRAY_OF_STRING__VALUES);\n\n\t\tcontainerEClass = createEClass(CONTAINER);\n\t\tcreateEAttribute(containerEClass, CONTAINER__NAME);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CONTAINERID);\n\t\tcreateEAttribute(containerEClass, CONTAINER__IMAGE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__BUILD);\n\t\tcreateEAttribute(containerEClass, CONTAINER__COMMAND);\n\t\tcreateEAttribute(containerEClass, CONTAINER__PORTS);\n\t\tcreateEAttribute(containerEClass, CONTAINER__EXPOSE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__VOLUMES);\n\t\tcreateEAttribute(containerEClass, CONTAINER__ENVIRONMENT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__ENV_FILE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__NET);\n\t\tcreateEAttribute(containerEClass, CONTAINER__DNS);\n\t\tcreateEAttribute(containerEClass, CONTAINER__DNS_SEARCH);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CAP_ADD);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CAP_DROP);\n\t\tcreateEAttribute(containerEClass, CONTAINER__WORKING_DIR);\n\t\tcreateEAttribute(containerEClass, CONTAINER__ENTRYPOINT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__USER);\n\t\tcreateEAttribute(containerEClass, CONTAINER__DOMAIN_NAME);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MEM_LIMIT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MEMORY_SWAP);\n\t\tcreateEAttribute(containerEClass, CONTAINER__PRIVILEGED);\n\t\tcreateEAttribute(containerEClass, CONTAINER__RESTART);\n\t\tcreateEAttribute(containerEClass, CONTAINER__STDIN_OPEN);\n\t\tcreateEAttribute(containerEClass, CONTAINER__INTERACTIVE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CPU_SHARES);\n\t\tcreateEAttribute(containerEClass, CONTAINER__PID);\n\t\tcreateEAttribute(containerEClass, CONTAINER__IPC);\n\t\tcreateEAttribute(containerEClass, CONTAINER__ADD_HOST);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MAC_ADDRESS);\n\t\tcreateEAttribute(containerEClass, CONTAINER__RM);\n\t\tcreateEAttribute(containerEClass, CONTAINER__SECURITY_OPT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__DEVICE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__LXC_CONF);\n\t\tcreateEAttribute(containerEClass, CONTAINER__PUBLISH_ALL);\n\t\tcreateEAttribute(containerEClass, CONTAINER__READ_ONLY);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MONITORED);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CPU_USED);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MEMORY_USED);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CPU_PERCENT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MEMORY_PERCENT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__DISK_USED);\n\t\tcreateEAttribute(containerEClass, CONTAINER__DISK_PERCENT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__BANDWIDTH_USED);\n\t\tcreateEAttribute(containerEClass, CONTAINER__BANDWIDTH_PERCENT);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MONITORING_INTERVAL);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CPU_MAX_VALUE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__MEMORY_MAX_VALUE);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CORE_MAX);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CPU_SET_CPUS);\n\t\tcreateEAttribute(containerEClass, CONTAINER__CPU_SET_MEMS);\n\t\tcreateEAttribute(containerEClass, CONTAINER__TTY);\n\t\tcreateEOperation(containerEClass, CONTAINER___CREATE);\n\t\tcreateEOperation(containerEClass, CONTAINER___STOP);\n\t\tcreateEOperation(containerEClass, CONTAINER___RUN);\n\t\tcreateEOperation(containerEClass, CONTAINER___PAUSE);\n\t\tcreateEOperation(containerEClass, CONTAINER___UNPAUSE);\n\t\tcreateEOperation(containerEClass, CONTAINER___KILL__STRING);\n\n\t\tlinkEClass = createEClass(LINK);\n\t\tcreateEAttribute(linkEClass, LINK__ALIAS);\n\n\t\tnetworklinkEClass = createEClass(NETWORKLINK);\n\n\t\tvolumesfromEClass = createEClass(VOLUMESFROM);\n\t\tcreateEAttribute(volumesfromEClass, VOLUMESFROM__MODE);\n\n\t\tcontainsEClass = createEClass(CONTAINS);\n\n\t\tmachineEClass = createEClass(MACHINE);\n\t\tcreateEAttribute(machineEClass, MACHINE__NAME);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_INSTALL_URL);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_OPT);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_INSECURE_REGISTRY);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_REGISTRY_MIRROR);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_LABEL);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_STORAGE_DRIVER);\n\t\tcreateEAttribute(machineEClass, MACHINE__ENGINE_ENV);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_IMAGE);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_MASTER);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_DISCOVERY);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_STRATEGY);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_OPT);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_HOST);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_ADDR);\n\t\tcreateEAttribute(machineEClass, MACHINE__SWARM_EXPERIMENTAL);\n\t\tcreateEAttribute(machineEClass, MACHINE__TLS_SAN);\n\t\tcreateEOperation(machineEClass, MACHINE___STARTALL);\n\n\t\tvolumeEClass = createEClass(VOLUME);\n\t\tcreateEAttribute(volumeEClass, VOLUME__DRIVER);\n\t\tcreateEAttribute(volumeEClass, VOLUME__LABELS);\n\t\tcreateEAttribute(volumeEClass, VOLUME__OPTIONS);\n\t\tcreateEAttribute(volumeEClass, VOLUME__SOURCE);\n\t\tcreateEAttribute(volumeEClass, VOLUME__DESTINATION);\n\t\tcreateEAttribute(volumeEClass, VOLUME__MODE);\n\t\tcreateEAttribute(volumeEClass, VOLUME__RW);\n\t\tcreateEAttribute(volumeEClass, VOLUME__PROPAGATION);\n\t\tcreateEAttribute(volumeEClass, VOLUME__NAME);\n\n\t\tnetworkEClass = createEClass(NETWORK);\n\t\tcreateEAttribute(networkEClass, NETWORK__NETWORK_ID);\n\t\tcreateEAttribute(networkEClass, NETWORK__NAME);\n\t\tcreateEAttribute(networkEClass, NETWORK__AUX_ADDRESS);\n\t\tcreateEAttribute(networkEClass, NETWORK__DRIVER);\n\t\tcreateEAttribute(networkEClass, NETWORK__GATEWAY);\n\t\tcreateEAttribute(networkEClass, NETWORK__INTERNAL);\n\t\tcreateEAttribute(networkEClass, NETWORK__IP_RANGE);\n\t\tcreateEAttribute(networkEClass, NETWORK__IPAM_DRIVER);\n\t\tcreateEAttribute(networkEClass, NETWORK__IPAM_OPT);\n\t\tcreateEAttribute(networkEClass, NETWORK__IPV6);\n\t\tcreateEAttribute(networkEClass, NETWORK__OPT);\n\t\tcreateEAttribute(networkEClass, NETWORK__SUBNET);\n\n\t\tmachinegenericEClass = createEClass(MACHINEGENERIC);\n\t\tcreateEAttribute(machinegenericEClass, MACHINEGENERIC__ENGINE_PORT);\n\t\tcreateEAttribute(machinegenericEClass, MACHINEGENERIC__IP_ADDRESS);\n\t\tcreateEAttribute(machinegenericEClass, MACHINEGENERIC__SSH_KEY);\n\t\tcreateEAttribute(machinegenericEClass, MACHINEGENERIC__SSH_USER);\n\t\tcreateEAttribute(machinegenericEClass, MACHINEGENERIC__SSH_PORT);\n\n\t\tmachineamazonec2EClass = createEClass(MACHINEAMAZONEC2);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__ACCESS_KEY);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__AMI);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__INSTANCE_TYPE);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__REGION);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__ROOT_SIZE);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__SECRET_KEY);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__SECURITY_GROUP);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__SESSION_TOKEN);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__SUBNET_ID);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__VPC_ID);\n\t\tcreateEAttribute(machineamazonec2EClass, MACHINEAMAZONEC2__ZONE);\n\n\t\tmachinedigitaloceanEClass = createEClass(MACHINEDIGITALOCEAN);\n\t\tcreateEAttribute(machinedigitaloceanEClass, MACHINEDIGITALOCEAN__ACCESS_TOKEN);\n\t\tcreateEAttribute(machinedigitaloceanEClass, MACHINEDIGITALOCEAN__IMAGE);\n\t\tcreateEAttribute(machinedigitaloceanEClass, MACHINEDIGITALOCEAN__REGION);\n\t\tcreateEAttribute(machinedigitaloceanEClass, MACHINEDIGITALOCEAN__SIZE);\n\n\t\tmachinegooglecomputeengineEClass = createEClass(MACHINEGOOGLECOMPUTEENGINE);\n\t\tcreateEAttribute(machinegooglecomputeengineEClass, MACHINEGOOGLECOMPUTEENGINE__ZONE);\n\t\tcreateEAttribute(machinegooglecomputeengineEClass, MACHINEGOOGLECOMPUTEENGINE__MACHINE_TYPE);\n\t\tcreateEAttribute(machinegooglecomputeengineEClass, MACHINEGOOGLECOMPUTEENGINE__USERNAME);\n\t\tcreateEAttribute(machinegooglecomputeengineEClass, MACHINEGOOGLECOMPUTEENGINE__INSTANCE_NAME);\n\t\tcreateEAttribute(machinegooglecomputeengineEClass, MACHINEGOOGLECOMPUTEENGINE__PROJECT);\n\n\t\tmachineibmsoftlayerEClass = createEClass(MACHINEIBMSOFTLAYER);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__API_ENDPOINT);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__USER);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__API_KEY);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__CPU);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__DISK_SIZE);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__DOMAIN);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__HOURLY_BILLING);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__IMAGE);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__LOCAL_DISK);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__PRIVATE_NET_ONLY);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__REGION);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__PUBLIC_VLAN_ID);\n\t\tcreateEAttribute(machineibmsoftlayerEClass, MACHINEIBMSOFTLAYER__PRIVATE_VLAN_ID);\n\n\t\tmachinemicrosoftazureEClass = createEClass(MACHINEMICROSOFTAZURE);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__SUBSCRIPTION_ID);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__SUBSCRIPTION_CERT);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__ENVIRONMENT);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__MACHINE_LOCATION);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__RESOURCE_GROUP);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__SIZE);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__SSH_USER);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__VNET);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__SUBNET);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__SUBNET_PREFIX);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__AVAILABILITY_SET);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__OPEN_PORT);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__PRIVATE_IP_ADDRESS);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__NO_PUBLIC_IP);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__STATIC_PUBLIC_IP);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__DOCKER_PORT);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__USE_PRIVATE_IP);\n\t\tcreateEAttribute(machinemicrosoftazureEClass, MACHINEMICROSOFTAZURE__IMAGE);\n\n\t\tmachinemicrosofthypervEClass = createEClass(MACHINEMICROSOFTHYPERV);\n\t\tcreateEAttribute(machinemicrosofthypervEClass, MACHINEMICROSOFTHYPERV__VIRTUAL_SWITCH);\n\t\tcreateEAttribute(machinemicrosofthypervEClass, MACHINEMICROSOFTHYPERV__BOOT2DOCKER_URL);\n\t\tcreateEAttribute(machinemicrosofthypervEClass, MACHINEMICROSOFTHYPERV__DISK_SIZE);\n\t\tcreateEAttribute(machinemicrosofthypervEClass, MACHINEMICROSOFTHYPERV__STATIC_MAC_ADDRESS);\n\t\tcreateEAttribute(machinemicrosofthypervEClass, MACHINEMICROSOFTHYPERV__VLAN_ID);\n\n\t\tmachineopenstackEClass = createEClass(MACHINEOPENSTACK);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__FLAVOR_ID);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__FLAVOR_NAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__IMAGE_ID);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__IMAGE_NAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__AUTH_URL);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__USERNAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__PASSWORD);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__TENANT_NAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__TENANT_ID);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__REGION);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__ENDPOINT_TYPE);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__NET_ID);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__NET_NAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__SEC_GROUPS);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__FLOATING_IP_POOL);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__ACTIVE_TIME_OUT);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__AVAILABILITY_ZONE);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__DOMAIN_ID);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__DOMAIN_NAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__INSECURE);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__IP_VERSION);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__KEYPAIR_NAME);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__PRIVATE_KEY_FILE);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__SSH_PORT);\n\t\tcreateEAttribute(machineopenstackEClass, MACHINEOPENSTACK__SSH_USER);\n\n\t\tmachinerackspaceEClass = createEClass(MACHINERACKSPACE);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__USERNAME);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__API_KEY);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__REGION);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__END_POINT_TYPE);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__IMAGE_ID);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__FLAVOR_ID);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__SSH_USER);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__SSH_PORT);\n\t\tcreateEAttribute(machinerackspaceEClass, MACHINERACKSPACE__DOCKER_INSTALL);\n\n\t\tmachinevirtualboxEClass = createEClass(MACHINEVIRTUALBOX);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__BOOT2DOCKER_URL);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__DISK_SIZE);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__HOST_DNS_RESOLVER);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__IMPORT_BOOT2_DOCKER_VM);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__HOST_ONLY_CIDR);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__HOST_ONLY_NIC_TYPE);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__HOST_ONLY_NIC_PROMISC);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__NO_SHARE);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__NO_DNS_PROXY);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__NO_VTX_CHECK);\n\t\tcreateEAttribute(machinevirtualboxEClass, MACHINEVIRTUALBOX__SHARE_FOLDER);\n\n\t\tmachinevmwarefusionEClass = createEClass(MACHINEVMWAREFUSION);\n\t\tcreateEAttribute(machinevmwarefusionEClass, MACHINEVMWAREFUSION__BOOT2DOCKER_URL);\n\t\tcreateEAttribute(machinevmwarefusionEClass, MACHINEVMWAREFUSION__DISK_SIZE);\n\t\tcreateEAttribute(machinevmwarefusionEClass, MACHINEVMWAREFUSION__MEMORY_SIZE);\n\t\tcreateEAttribute(machinevmwarefusionEClass, MACHINEVMWAREFUSION__NO_SHARE);\n\n\t\tmachinevmwarevcloudairEClass = createEClass(MACHINEVMWAREVCLOUDAIR);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__USERNAME);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__PASSWORD);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__CATALOG);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__CATALOG_ITEM);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__COMPUTE_ID);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__CPU_COUNT);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__DOCKER_PORT);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__EDGEGATEWAY);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__MEMORY_SIZE);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__VAPP_NAME);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__ORGVDCNETWORK);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__PROVISION);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__PUBLIC_IP);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__SSH_PORT);\n\t\tcreateEAttribute(machinevmwarevcloudairEClass, MACHINEVMWAREVCLOUDAIR__VDC_ID);\n\n\t\tmachinevmwarevsphereEClass = createEClass(MACHINEVMWAREVSPHERE);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__USERNAME);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__PASSWORD);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__BOOT2DOCKER_URL);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__COMPUTE_IP);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__CPU_COUNT);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__DATACENTER);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__DATASTORE);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__DISK_SIZE);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__MEMORY_SIZE);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__NETWORK);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__POOL);\n\t\tcreateEAttribute(machinevmwarevsphereEClass, MACHINEVMWAREVSPHERE__VCENTER);\n\n\t\tmachineexoscaleEClass = createEClass(MACHINEEXOSCALE);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__URL);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__API_KEY);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__API_SECRET_KEY);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__INSTANCE_PROFILE);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__IMAGE);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__SECURITY_GROUP);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__AVAILABILITY_ZONE);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__SSH_USER);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__USER_DATA);\n\t\tcreateEAttribute(machineexoscaleEClass, MACHINEEXOSCALE__AFFINITY_GROUP);\n\n\t\tmachinegrid5000EClass = createEClass(MACHINEGRID5000);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__USERNAME);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__PASSWORD);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__SITE);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__WALLTIME);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__SSH_PRIVATE_KEY);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__SSH_PUBLIC_KEY);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__IMAGE);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__RESOURCE_PROPERTIES);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__USE_JOB_RESERVATION);\n\t\tcreateEAttribute(machinegrid5000EClass, MACHINEGRID5000__HOST_TO_PROVISION);\n\n\t\tclusterEClass = createEClass(CLUSTER);\n\t\tcreateEAttribute(clusterEClass, CLUSTER__NAME);\n\n\t\t// Create enums\n\t\tmodeEEnum = createEEnum(MODE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tcharacteristicComponentEClass = createEClass(CHARACTERISTIC_COMPONENT);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__NAME);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__MODULE);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__PREFIX);\n\t\tcreateEAttribute(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__CONTAINER);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__ACTIONS);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__ATTRIBUTES);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__PROPERTIES);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__USED_BACI_TYPES);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__USED_DEV_IOS);\n\t\tcreateEReference(characteristicComponentEClass, CHARACTERISTIC_COMPONENT__COMPONENT_INSTANCES);\n\n\t\tactionEClass = createEClass(ACTION);\n\t\tcreateEAttribute(actionEClass, ACTION__NAME);\n\t\tcreateEAttribute(actionEClass, ACTION__TYPE);\n\t\tcreateEReference(actionEClass, ACTION__PARAMETERS);\n\n\t\tparameterEClass = createEClass(PARAMETER);\n\t\tcreateEAttribute(parameterEClass, PARAMETER__NAME);\n\t\tcreateEAttribute(parameterEClass, PARAMETER__TYPE);\n\n\t\tattributeEClass = createEClass(ATTRIBUTE);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__NAME);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__TYPE);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__REQUIRED);\n\t\tcreateEAttribute(attributeEClass, ATTRIBUTE__DEFAULT_VALUE);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__NAME);\n\t\tcreateEReference(propertyEClass, PROPERTY__BACI_TYPE);\n\t\tcreateEReference(propertyEClass, PROPERTY__DEV_IO);\n\n\t\tusedDevIOsEClass = createEClass(USED_DEV_IOS);\n\t\tcreateEReference(usedDevIOsEClass, USED_DEV_IOS__DEV_IOS);\n\n\t\tdevIOEClass = createEClass(DEV_IO);\n\t\tcreateEAttribute(devIOEClass, DEV_IO__NAME);\n\t\tcreateEAttribute(devIOEClass, DEV_IO__REQUIRED_LIBRARIES);\n\t\tcreateEReference(devIOEClass, DEV_IO__DEV_IO_VARIABLES);\n\n\t\tdevIOVariableEClass = createEClass(DEV_IO_VARIABLE);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__NAME);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__TYPE);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__IS_READ);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__IS_WRITE);\n\t\tcreateEAttribute(devIOVariableEClass, DEV_IO_VARIABLE__IS_PROPERTY_SPECIFIC);\n\n\t\tusedBaciTypesEClass = createEClass(USED_BACI_TYPES);\n\t\tcreateEReference(usedBaciTypesEClass, USED_BACI_TYPES__BACI_TYPES);\n\n\t\tbaciTypeEClass = createEClass(BACI_TYPE);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__NAME);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__ACCESS_TYPE);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__BASIC_TYPE);\n\t\tcreateEAttribute(baciTypeEClass, BACI_TYPE__SEQ_TYPE);\n\n\t\tcomponentInstancesEClass = createEClass(COMPONENT_INSTANCES);\n\t\tcreateEReference(componentInstancesEClass, COMPONENT_INSTANCES__INSTANCES);\n\t\tcreateEReference(componentInstancesEClass, COMPONENT_INSTANCES__CONTAINING_CARACTERISTIC_COMPONENT);\n\n\t\tinstanceEClass = createEClass(INSTANCE);\n\t\tcreateEAttribute(instanceEClass, INSTANCE__NAME);\n\t\tcreateEReference(instanceEClass, INSTANCE__CONTAINING_COMPONENT_INSTANCES);\n\t\tcreateEReference(instanceEClass, INSTANCE__ATTRIBUTE_VALUES_CONTAINER);\n\t\tcreateEReference(instanceEClass, INSTANCE__CHARACTERISTIC_VALUES_CONTAINER);\n\t\tcreateEAttribute(instanceEClass, INSTANCE__AUTO_START);\n\t\tcreateEAttribute(instanceEClass, INSTANCE__DEFAULT);\n\n\t\tattributeValuesEClass = createEClass(ATTRIBUTE_VALUES);\n\t\tcreateEReference(attributeValuesEClass, ATTRIBUTE_VALUES__INSTANCE_ATTRIBUTES);\n\t\tcreateEReference(attributeValuesEClass, ATTRIBUTE_VALUES__CONTAINING_INSTANCE);\n\n\t\tattributeValueEClass = createEClass(ATTRIBUTE_VALUE);\n\t\tcreateEAttribute(attributeValueEClass, ATTRIBUTE_VALUE__NAME);\n\t\tcreateEAttribute(attributeValueEClass, ATTRIBUTE_VALUE__VALUE);\n\n\t\tcharacteristicValuesEClass = createEClass(CHARACTERISTIC_VALUES);\n\t\tcreateEAttribute(characteristicValuesEClass, CHARACTERISTIC_VALUES__PROPERTY_NAME);\n\t\tcreateEReference(characteristicValuesEClass, CHARACTERISTIC_VALUES__INSTANCE_CHARACTERISTICS);\n\t\tcreateEReference(characteristicValuesEClass, CHARACTERISTIC_VALUES__CONTAINING_INSTANCE);\n\n\t\tcharacteristicValueEClass = createEClass(CHARACTERISTIC_VALUE);\n\t\tcreateEAttribute(characteristicValueEClass, CHARACTERISTIC_VALUE__NAME);\n\t\tcreateEAttribute(characteristicValueEClass, CHARACTERISTIC_VALUE__VALUE);\n\n\t\tpropertyDefinitionEClass = createEClass(PROPERTY_DEFINITION);\n\n\t\t// Create enums\n\t\taccessTypeEEnum = createEEnum(ACCESS_TYPE);\n\t\tbasicTypeEEnum = createEEnum(BASIC_TYPE);\n\t\tseqTypeEEnum = createEEnum(SEQ_TYPE);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__STMTS);\n\n\t\tstmtEClass = createEClass(STMT);\n\n\t\tarithEClass = createEClass(ARITH);\n\n\t\talVarRefEClass = createEClass(AL_VAR_REF);\n\t\tcreateEAttribute(alVarRefEClass, AL_VAR_REF__NAME);\n\n\t\tarithLitEClass = createEClass(ARITH_LIT);\n\t\tcreateEAttribute(arithLitEClass, ARITH_LIT__VAL);\n\n\t\tarithOpEClass = createEClass(ARITH_OP);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__LHS);\n\t\tcreateEReference(arithOpEClass, ARITH_OP__RHS);\n\n\t\tarithPlusEClass = createEClass(ARITH_PLUS);\n\n\t\tarithMinusEClass = createEClass(ARITH_MINUS);\n\n\t\tprintEClass = createEClass(PRINT);\n\t\tcreateEAttribute(printEClass, PRINT__NAME);\n\n\t\tassignEClass = createEClass(ASSIGN);\n\t\tcreateEAttribute(assignEClass, ASSIGN__NAME);\n\t\tcreateEReference(assignEClass, ASSIGN__VAL);\n\n\t\tifStmtEClass = createEClass(IF_STMT);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__IF_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__ELSE_BRANCH);\n\t\tcreateEReference(ifStmtEClass, IF_STMT__TEST);\n\n\t\trandRangeEClass = createEClass(RAND_RANGE);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MIN);\n\t\tcreateEAttribute(randRangeEClass, RAND_RANGE__MAX);\n\n\t\tequalityTestEClass = createEClass(EQUALITY_TEST);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__LHS);\n\t\tcreateEReference(equalityTestEClass, EQUALITY_TEST__RHS);\n\t}", "@Override\n public long cost() {\n return 100;\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockArchitecturePkgEClass = createEClass(BLOCK_ARCHITECTURE_PKG);\n\n\t\tblockArchitectureEClass = createEClass(BLOCK_ARCHITECTURE);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_REQUIREMENT_PKGS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_DATA_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONED_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONING_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATED_ARCHITECTURES);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATING_ARCHITECTURES);\n\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_DATA_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_STATE_MACHINES);\n\n\t\tcomponentArchitectureEClass = createEClass(COMPONENT_ARCHITECTURE);\n\n\t\tcomponentEClass = createEClass(COMPONENT);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_USES);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONED_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONING_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATED_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVIDED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__REQUIRED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_COMPONENT_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PARTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PHYSICAL_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_PATH);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINK_CATEGORIES);\n\n\t\tabstractActorEClass = createEClass(ABSTRACT_ACTOR);\n\n\t\tpartEClass = createEClass(PART);\n\t\tcreateEReference(partEClass, PART__PROVIDED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__REQUIRED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__OWNED_DEPLOYMENT_LINKS);\n\t\tcreateEReference(partEClass, PART__DEPLOYED_PARTS);\n\t\tcreateEReference(partEClass, PART__DEPLOYING_PARTS);\n\t\tcreateEReference(partEClass, PART__OWNED_ABSTRACT_TYPE);\n\t\tcreateEAttribute(partEClass, PART__VALUE);\n\t\tcreateEAttribute(partEClass, PART__MAX_VALUE);\n\t\tcreateEAttribute(partEClass, PART__MIN_VALUE);\n\t\tcreateEAttribute(partEClass, PART__CURRENT_MASS);\n\n\t\tarchitectureAllocationEClass = createEClass(ARCHITECTURE_ALLOCATION);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATED_ARCHITECTURE);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATING_ARCHITECTURE);\n\n\t\tcomponentAllocationEClass = createEClass(COMPONENT_ALLOCATION);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATED_COMPONENT);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATING_COMPONENT);\n\n\t\tsystemComponentEClass = createEClass(SYSTEM_COMPONENT);\n\t\tcreateEAttribute(systemComponentEClass, SYSTEM_COMPONENT__DATA_COMPONENT);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__DATA_TYPE);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__PARTICIPATIONS_IN_CAPABILITY_REALIZATIONS);\n\n\t\tinterfacePkgEClass = createEClass(INTERFACE_PKG);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACES);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACE_PKGS);\n\n\t\tinterfaceEClass = createEClass(INTERFACE);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__MECHANISM);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__STRUCTURAL);\n\t\tcreateEReference(interfaceEClass, INTERFACE__IMPLEMENTOR_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__USER_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_USES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVISIONING_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__EXCHANGE_ITEMS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__OWNED_EXCHANGE_ITEM_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_LOGICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_CONTEXT_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_PHYSICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_LOGICAL_INTERFACES);\n\n\t\tinterfaceImplementationEClass = createEClass(INTERFACE_IMPLEMENTATION);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__INTERFACE_IMPLEMENTOR);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__IMPLEMENTED_INTERFACE);\n\n\t\tinterfaceUseEClass = createEClass(INTERFACE_USE);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__INTERFACE_USER);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__USED_INTERFACE);\n\n\t\tprovidedInterfaceLinkEClass = createEClass(PROVIDED_INTERFACE_LINK);\n\t\tcreateEReference(providedInterfaceLinkEClass, PROVIDED_INTERFACE_LINK__INTERFACE);\n\n\t\trequiredInterfaceLinkEClass = createEClass(REQUIRED_INTERFACE_LINK);\n\t\tcreateEReference(requiredInterfaceLinkEClass, REQUIRED_INTERFACE_LINK__INTERFACE);\n\n\t\tinterfaceAllocationEClass = createEClass(INTERFACE_ALLOCATION);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATED_INTERFACE);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATING_INTERFACE_ALLOCATOR);\n\n\t\tinterfaceAllocatorEClass = createEClass(INTERFACE_ALLOCATOR);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__OWNED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__PROVISIONED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__ALLOCATED_INTERFACES);\n\n\t\tactorCapabilityRealizationInvolvementEClass = createEClass(ACTOR_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tsystemComponentCapabilityRealizationInvolvementEClass = createEClass(SYSTEM_COMPONENT_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tcomponentContextEClass = createEClass(COMPONENT_CONTEXT);\n\n\t\texchangeItemAllocationEClass = createEClass(EXCHANGE_ITEM_ALLOCATION);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__SEND_PROTOCOL);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__RECEIVE_PROTOCOL);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATED_ITEM);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATING_INTERFACE);\n\n\t\tdeployableElementEClass = createEClass(DEPLOYABLE_ELEMENT);\n\t\tcreateEReference(deployableElementEClass, DEPLOYABLE_ELEMENT__DEPLOYING_LINKS);\n\n\t\tdeploymentTargetEClass = createEClass(DEPLOYMENT_TARGET);\n\t\tcreateEReference(deploymentTargetEClass, DEPLOYMENT_TARGET__DEPLOYMENT_LINKS);\n\n\t\tabstractDeploymentLinkEClass = createEClass(ABSTRACT_DEPLOYMENT_LINK);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__DEPLOYED_ELEMENT);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__LOCATION);\n\n\t\tabstractPathInvolvedElementEClass = createEClass(ABSTRACT_PATH_INVOLVED_ELEMENT);\n\n\t\tabstractPhysicalArtifactEClass = createEClass(ABSTRACT_PHYSICAL_ARTIFACT);\n\t\tcreateEReference(abstractPhysicalArtifactEClass, ABSTRACT_PHYSICAL_ARTIFACT__ALLOCATOR_CONFIGURATION_ITEMS);\n\n\t\tabstractPhysicalLinkEndEClass = createEClass(ABSTRACT_PHYSICAL_LINK_END);\n\t\tcreateEReference(abstractPhysicalLinkEndEClass, ABSTRACT_PHYSICAL_LINK_END__INVOLVED_LINKS);\n\n\t\tabstractPhysicalPathLinkEClass = createEClass(ABSTRACT_PHYSICAL_PATH_LINK);\n\n\t\tphysicalLinkEClass = createEClass(PHYSICAL_LINK);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_COMPONENT_EXCHANGE_FUNCTIONAL_EXCHANGE_ALLOCATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_REALIZATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__CATEGORIES);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__SOURCE_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__TARGET_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZED_PHYSICAL_LINKS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZING_PHYSICAL_LINKS);\n\n\t\tphysicalLinkCategoryEClass = createEClass(PHYSICAL_LINK_CATEGORY);\n\t\tcreateEReference(physicalLinkCategoryEClass, PHYSICAL_LINK_CATEGORY__LINKS);\n\n\t\tphysicalLinkEndEClass = createEClass(PHYSICAL_LINK_END);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PORT);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PART);\n\n\t\tphysicalLinkRealizationEClass = createEClass(PHYSICAL_LINK_REALIZATION);\n\n\t\tphysicalPathEClass = createEClass(PHYSICAL_PATH);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__INVOLVED_LINKS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__FIRST_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_REALIZATIONS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZED_PHYSICAL_PATHS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZING_PHYSICAL_PATHS);\n\n\t\tphysicalPathInvolvementEClass = createEClass(PHYSICAL_PATH_INVOLVEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__NEXT_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__PREVIOUS_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_ELEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_COMPONENT);\n\n\t\tphysicalPathReferenceEClass = createEClass(PHYSICAL_PATH_REFERENCE);\n\t\tcreateEReference(physicalPathReferenceEClass, PHYSICAL_PATH_REFERENCE__REFERENCED_PHYSICAL_PATH);\n\n\t\tphysicalPathRealizationEClass = createEClass(PHYSICAL_PATH_REALIZATION);\n\n\t\tphysicalPortEClass = createEClass(PHYSICAL_PORT);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_COMPONENT_PORT_ALLOCATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_PHYSICAL_PORT_REALIZATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__ALLOCATED_COMPONENT_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZED_PHYSICAL_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZING_PHYSICAL_PORTS);\n\n\t\tphysicalPortRealizationEClass = createEClass(PHYSICAL_PORT_REALIZATION);\n\t}", "int getResourceCost();", "@Override\r\n public void generateTasks() {\r\n int tasks = Integer.parseInt(this.getProperty(\"numTask\", \"1000\"));\r\n setNumOfTasks(tasks);\r\n //TODO:fixed port here !!!! need to change!!!\r\n serverPort = Integer.parseInt(this.getProperty(\"reqServerPort\", \"5560\")); \r\n PROC_MAX = Integer.parseInt(this.getProperty(\"reqServerMaxConcurrentClients\",\"10\"));\r\n location = this.getProperty(\"location\", \"rutgers\");\r\n energyplusPropertyFile = this.getProperty(\"energyplusTemplate\", \"energyplus.property\");\r\n \r\n winnerTakeAll = Boolean.parseBoolean(this.getProperty(\"winnerTakeAll\",\"true\"));\r\n jobDistributionMap = new HashMap<Integer,Integer>();\r\n copyJobDistributionMap = new HashMap<Integer,Integer>();\r\n //System.out.println(\"energyplusPropertyFile:\"+energyplusPropertyFile);\r\n \r\n initInfoSystem();\r\n initDistributionSystem();\r\n startFedServer();\r\n }", "@Autowired\n\tpublic void setCost(@Value(\"${repair.cost}\") int cost) {\n\t\tthis.cost = oneOrMore(cost);\n\t}", "private static Datacenter createDatacenter(String name) {\n List<Host> hostList = new ArrayList<Host>();\r\n\r\n // 2. A Machine contains one or more PEs or CPUs/Cores.\r\n // In this example, it will have only one core.\r\n List<Pe> peList = new ArrayList<Pe>();\r\n\r\n\r\n // 3. Create PEs and add these into a list.\r\n peList.add(new Pe(0, new PeProvisionerSimple(mips+100))); // need to store Pe id and MIPS Rating\r\n\r\n // 4. Create Host with its id and list of PEs and add them to the list\r\n // of machines\r\n long storage = 1000000; // host storage\r\n\r\n\r\n for (int hostId = 0; hostId < vmNum; hostId++) {\r\n hostList.add(\r\n new Host(\r\n hostId,\r\n new RamProvisionerSimple((int)((ram*1.1)/Constants.MB)),\r\n new BwProvisionerSimple(bw+10),\r\n storage,\r\n peList,\r\n new VmSchedulerTimeShared(peList)\r\n )\r\n ); // This is our machine\r\n }\r\n\r\n\r\n // 5. Create a DatacenterCharacteristics object that stores the\r\n // properties of a data center: architecture, OS, list of\r\n // Machines, allocation policy: time- or space-shared, time zone\r\n // and its price (G$/Pe time unit).\r\n String arch = \"x86\"; // system architecture\r\n String os = \"Linux\"; // operating system\r\n String vmm = \"Xen\";\r\n double time_zone = 10.0; // time zone this resource located\r\n double cost = 3.0; // the cost of using processing in this resource\r\n double costPerMem = 0.05; // the cost of using memory in this resource\r\n double costPerStorage = 0.001; // the cost of using storage in this\r\n // resource\r\n double costPerBw = 0.0; // the cost of using bw in this resource\r\n LinkedList<Storage> storageList = new LinkedList<Storage>(); // we are not adding SAN\r\n // devices by now\r\n\r\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\r\n arch, os, vmm, hostList, time_zone, cost, costPerMem,\r\n costPerStorage, costPerBw);\r\n\r\n // 6. Finally, we need to create a PowerDatacenter object.\r\n Datacenter datacenter = null;\r\n try {\r\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return datacenter;\r\n }", "private void setupconfigIpCPoints() {\n for (int i = 1; i <= 3; i++) {\n ConnectPoint connectPoint = new ConnectPoint(\n getDeviceId(i),\n PortNumber.portNumber(1));\n configIpCPoints.add(connectPoint);\n }\n }", "public Cost(float c) {\r\n defaultCost = c;\r\n }", "public void createPackageContents() {\n\t\tif (isCreated)\n\t\t\treturn;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tprojectEClass = createEClass(PROJECT);\n\t\tcreateEReference(projectEClass, PROJECT__PLUGINS);\n\t\tcreateEAttribute(projectEClass, PROJECT__NAME);\n\t\tcreateEReference(projectEClass, PROJECT__REPOSITORIES);\n\t\tcreateEReference(projectEClass, PROJECT__DEPENDENCIES);\n\t\tcreateEReference(projectEClass, PROJECT__VIEWS);\n\t\tcreateEReference(projectEClass, PROJECT__PROPERTIES);\n\n\t\tpluginEClass = createEClass(PLUGIN);\n\t\tcreateEReference(pluginEClass, PLUGIN__REPOSITORIES);\n\t\tcreateEReference(pluginEClass, PLUGIN__OUTPUT_PORTS);\n\t\tcreateEReference(pluginEClass, PLUGIN__DISPLAYS);\n\n\t\tportEClass = createEClass(PORT);\n\t\tcreateEAttribute(portEClass, PORT__NAME);\n\t\tcreateEAttribute(portEClass, PORT__EVENT_TYPES);\n\t\tcreateEAttribute(portEClass, PORT__ID);\n\n\t\tinputPortEClass = createEClass(INPUT_PORT);\n\t\tcreateEReference(inputPortEClass, INPUT_PORT__PARENT);\n\n\t\toutputPortEClass = createEClass(OUTPUT_PORT);\n\t\tcreateEReference(outputPortEClass, OUTPUT_PORT__SUBSCRIBERS);\n\t\tcreateEReference(outputPortEClass, OUTPUT_PORT__PARENT);\n\n\t\tpropertyEClass = createEClass(PROPERTY);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__NAME);\n\t\tcreateEAttribute(propertyEClass, PROPERTY__VALUE);\n\n\t\tfilterEClass = createEClass(FILTER);\n\t\tcreateEReference(filterEClass, FILTER__INPUT_PORTS);\n\n\t\treaderEClass = createEClass(READER);\n\n\t\trepositoryEClass = createEClass(REPOSITORY);\n\n\t\tdependencyEClass = createEClass(DEPENDENCY);\n\t\tcreateEAttribute(dependencyEClass, DEPENDENCY__FILE_PATH);\n\n\t\trepositoryConnectorEClass = createEClass(REPOSITORY_CONNECTOR);\n\t\tcreateEAttribute(repositoryConnectorEClass, REPOSITORY_CONNECTOR__NAME);\n\t\tcreateEReference(repositoryConnectorEClass, REPOSITORY_CONNECTOR__REPOSITORY);\n\t\tcreateEAttribute(repositoryConnectorEClass, REPOSITORY_CONNECTOR__ID);\n\n\t\tdisplayEClass = createEClass(DISPLAY);\n\t\tcreateEAttribute(displayEClass, DISPLAY__NAME);\n\t\tcreateEReference(displayEClass, DISPLAY__PARENT);\n\t\tcreateEAttribute(displayEClass, DISPLAY__ID);\n\n\t\tviewEClass = createEClass(VIEW);\n\t\tcreateEAttribute(viewEClass, VIEW__NAME);\n\t\tcreateEAttribute(viewEClass, VIEW__DESCRIPTION);\n\t\tcreateEReference(viewEClass, VIEW__DISPLAY_CONNECTORS);\n\t\tcreateEAttribute(viewEClass, VIEW__ID);\n\n\t\tdisplayConnectorEClass = createEClass(DISPLAY_CONNECTOR);\n\t\tcreateEAttribute(displayConnectorEClass, DISPLAY_CONNECTOR__NAME);\n\t\tcreateEReference(displayConnectorEClass, DISPLAY_CONNECTOR__DISPLAY);\n\t\tcreateEAttribute(displayConnectorEClass, DISPLAY_CONNECTOR__ID);\n\n\t\tanalysisComponentEClass = createEClass(ANALYSIS_COMPONENT);\n\t\tcreateEAttribute(analysisComponentEClass, ANALYSIS_COMPONENT__NAME);\n\t\tcreateEAttribute(analysisComponentEClass, ANALYSIS_COMPONENT__CLASSNAME);\n\t\tcreateEReference(analysisComponentEClass, ANALYSIS_COMPONENT__PROPERTIES);\n\t\tcreateEAttribute(analysisComponentEClass, ANALYSIS_COMPONENT__ID);\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tcmdEClass = createEClass(CMD);\n\t\tcreateEAttribute(cmdEClass, CMD__PRIORITY);\n\t\tcreateEAttribute(cmdEClass, CMD__STAMP);\n\n\t\tcompoundCmdEClass = createEClass(COMPOUND_CMD);\n\t\tcreateEReference(compoundCmdEClass, COMPOUND_CMD__CHILDREN);\n\n\t\txCmdEClass = createEClass(XCMD);\n\t\tcreateEAttribute(xCmdEClass, XCMD__OBJ);\n\n\t\tbyteCmdEClass = createEClass(BYTE_CMD);\n\t\tcreateEAttribute(byteCmdEClass, BYTE_CMD__MESSAGE);\n\n\t\t// Create enums\n\t\tpriorityEEnum = createEEnum(PRIORITY);\n\t}", "public void setMaxTotalCost(int amount);", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\ttableEClass = createEClass(TABLE);\n\t\tcreateEReference(tableEClass, TABLE__DATABASE);\n\t\tcreateEReference(tableEClass, TABLE__COLUMNS);\n\t\tcreateEReference(tableEClass, TABLE__CONSTRAINTS);\n\n\t\ttableConstraintEClass = createEClass(TABLE_CONSTRAINT);\n\t\tcreateEAttribute(tableConstraintEClass, TABLE_CONSTRAINT__NAME);\n\t\tcreateEReference(tableConstraintEClass, TABLE_CONSTRAINT__TABLE);\n\n\t\tprimaryKeyTableConstraintEClass = createEClass(PRIMARY_KEY_TABLE_CONSTRAINT);\n\t\tcreateEReference(primaryKeyTableConstraintEClass, PRIMARY_KEY_TABLE_CONSTRAINT__COLUMNS);\n\n\t\tuniqueTableConstraintEClass = createEClass(UNIQUE_TABLE_CONSTRAINT);\n\t\tcreateEReference(uniqueTableConstraintEClass, UNIQUE_TABLE_CONSTRAINT__COLUMNS);\n\n\t\tcheckTableConstraintEClass = createEClass(CHECK_TABLE_CONSTRAINT);\n\t\tcreateEReference(checkTableConstraintEClass, CHECK_TABLE_CONSTRAINT__EXPRESSION);\n\n\t\tforeignKeyTableConstraintEClass = createEClass(FOREIGN_KEY_TABLE_CONSTRAINT);\n\t\tcreateEReference(foreignKeyTableConstraintEClass, FOREIGN_KEY_TABLE_CONSTRAINT__COLUMNS);\n\t\tcreateEReference(foreignKeyTableConstraintEClass, FOREIGN_KEY_TABLE_CONSTRAINT__FOREIGN_TABLE);\n\t\tcreateEReference(foreignKeyTableConstraintEClass, FOREIGN_KEY_TABLE_CONSTRAINT__FOREIGN_COLUMNS);\n\t}", "public void createPackageContents() {\r\n\t\tif (isCreated)\r\n\t\t\treturn;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tissueEClass = createEClass(ISSUE);\r\n\t\tcreateEReference(issueEClass, ISSUE__PROPOSALS);\r\n\t\tcreateEReference(issueEClass, ISSUE__SOLUTION);\r\n\t\tcreateEReference(issueEClass, ISSUE__CRITERIA);\r\n\t\tcreateEAttribute(issueEClass, ISSUE__ACTIVITY);\r\n\t\tcreateEReference(issueEClass, ISSUE__ASSESSMENTS);\r\n\r\n\t\tproposalEClass = createEClass(PROPOSAL);\r\n\t\tcreateEReference(proposalEClass, PROPOSAL__ASSESSMENTS);\r\n\t\tcreateEReference(proposalEClass, PROPOSAL__ISSUE);\r\n\r\n\t\tsolutionEClass = createEClass(SOLUTION);\r\n\t\tcreateEReference(solutionEClass, SOLUTION__UNDERLYING_PROPOSALS);\r\n\t\tcreateEReference(solutionEClass, SOLUTION__ISSUE);\r\n\r\n\t\tcriterionEClass = createEClass(CRITERION);\r\n\t\tcreateEReference(criterionEClass, CRITERION__ASSESSMENTS);\r\n\r\n\t\tassessmentEClass = createEClass(ASSESSMENT);\r\n\t\tcreateEReference(assessmentEClass, ASSESSMENT__PROPOSAL);\r\n\t\tcreateEReference(assessmentEClass, ASSESSMENT__CRITERION);\r\n\t\tcreateEAttribute(assessmentEClass, ASSESSMENT__VALUE);\r\n\r\n\t\tcommentEClass = createEClass(COMMENT);\r\n\t\tcreateEReference(commentEClass, COMMENT__SENDER);\r\n\t\tcreateEReference(commentEClass, COMMENT__RECIPIENTS);\r\n\t\tcreateEReference(commentEClass, COMMENT__COMMENTED_ELEMENT);\r\n\r\n\t\taudioCommentEClass = createEClass(AUDIO_COMMENT);\r\n\t\tcreateEReference(audioCommentEClass, AUDIO_COMMENT__AUDIO_FILE);\r\n\t}", "public Config createConfig(String filename);", "@Transactional\r\n public long create(DirectProjectCPConfig config) throws ContributionServiceException {\r\n String signature = CLASS_NAME + \".create(DirectProjectCPConfig config)\";\r\n\r\n return createEntity(signature, config, \"config\", config == null ? 0L : config.getDirectProjectId(),\r\n \"config#directProjectId\");\r\n }", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\trepositoryEClass = createEClass(REPOSITORY);\n\t\tcreateEAttribute(repositoryEClass, REPOSITORY__NAME);\n\t\tcreateEAttribute(repositoryEClass, REPOSITORY__LOCATION);\n\n\t\trepositoryManagerEClass = createEClass(REPOSITORY_MANAGER);\n\t}", "@Override\n\tpublic double cost() {\n\t\treturn 10000;\n\t}", "@Override\r\n\tprotected void processCost() {\n\r\n\t}", "double setCost(double cost);", "public void createPackageContents()\r\n {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n productEClass = createEClass(PRODUCT);\r\n createEAttribute(productEClass, PRODUCT__PRICE);\r\n createEAttribute(productEClass, PRODUCT__NAME);\r\n createEAttribute(productEClass, PRODUCT__ID);\r\n createEReference(productEClass, PRODUCT__PRODUCER);\r\n createEReference(productEClass, PRODUCT__WISHLISTS);\r\n createEReference(productEClass, PRODUCT__OFFERED_BY);\r\n\r\n customerEClass = createEClass(CUSTOMER);\r\n createEReference(customerEClass, CUSTOMER__ALL_BOUGHT_PRODUCTS);\r\n createEAttribute(customerEClass, CUSTOMER__NAME);\r\n createEAttribute(customerEClass, CUSTOMER__AGE);\r\n createEAttribute(customerEClass, CUSTOMER__ID);\r\n createEReference(customerEClass, CUSTOMER__WISHLISTS);\r\n createEAttribute(customerEClass, CUSTOMER__USERNAME);\r\n\r\n producerEClass = createEClass(PRODUCER);\r\n createEAttribute(producerEClass, PRODUCER__ID);\r\n createEAttribute(producerEClass, PRODUCER__NAME);\r\n createEReference(producerEClass, PRODUCER__PRODUCTS);\r\n\r\n storeEClass = createEClass(STORE);\r\n createEReference(storeEClass, STORE__CUSTOMERS);\r\n createEReference(storeEClass, STORE__PRODUCTS);\r\n createEReference(storeEClass, STORE__PRODUCERS);\r\n createEReference(storeEClass, STORE__SELLERS);\r\n\r\n bookEClass = createEClass(BOOK);\r\n createEAttribute(bookEClass, BOOK__AUTHOR);\r\n\r\n dvdEClass = createEClass(DVD);\r\n createEAttribute(dvdEClass, DVD__INTERPRET);\r\n\r\n wishlistEClass = createEClass(WISHLIST);\r\n createEReference(wishlistEClass, WISHLIST__PRODUCTS);\r\n\r\n sellerEClass = createEClass(SELLER);\r\n createEAttribute(sellerEClass, SELLER__NAME);\r\n createEAttribute(sellerEClass, SELLER__ID);\r\n createEAttribute(sellerEClass, SELLER__USERNAME);\r\n createEReference(sellerEClass, SELLER__ALL_PRODUCTS_TO_SELL);\r\n createEReference(sellerEClass, SELLER__EREFERENCE0);\r\n createEReference(sellerEClass, SELLER__SOLD_PRODUCTS);\r\n }", "public void createPackageContents() {\r\n\t\tif (isCreated) return;\r\n\t\tisCreated = true;\r\n\r\n\t\t// Create classes and their features\r\n\t\tpuzzleTaskEClass = createEClass(PUZZLE_TASK);\r\n\t\tcreateEReference(puzzleTaskEClass, PUZZLE_TASK__PUZZLES);\r\n\t\tcreateEReference(puzzleTaskEClass, PUZZLE_TASK__PLAYER_LEVELS);\r\n\t\tcreateEReference(puzzleTaskEClass, PUZZLE_TASK__PLAYER_TASK_SCORES);\r\n\t\tcreateEOperation(puzzleTaskEClass, PUZZLE_TASK___ACCEPT_PUZZLE_PROPOSAL__STRING_PLAYER);\r\n\t\tcreateEOperation(puzzleTaskEClass, PUZZLE_TASK___CALCULATE_SCORE__INT_PLAYER_BOOLEAN);\r\n\t\tcreateEOperation(puzzleTaskEClass, PUZZLE_TASK___ACCEPT_PLAYER__PLAYER);\r\n\r\n\t\tpuzzlePieceEClass = createEClass(PUZZLE_PIECE);\r\n\t\tcreateEAttribute(puzzlePieceEClass, PUZZLE_PIECE__IMAGE);\r\n\t\tcreateEAttribute(puzzlePieceEClass, PUZZLE_PIECE__PLAYER_COUNT);\r\n\r\n\t\tpuzzleTaskViewEClass = createEClass(PUZZLE_TASK_VIEW);\r\n\t\tcreateEAttribute(puzzleTaskViewEClass, PUZZLE_TASK_VIEW__IMAGE);\r\n\t\tcreateEAttribute(puzzleTaskViewEClass, PUZZLE_TASK_VIEW__SCORE);\r\n\t\tcreateEAttribute(puzzleTaskViewEClass, PUZZLE_TASK_VIEW__LEVEL);\r\n\t\tcreateEOperation(puzzleTaskViewEClass, PUZZLE_TASK_VIEW___PROPOSE_ANSWER__STRING);\r\n\t\tcreateEOperation(puzzleTaskViewEClass, PUZZLE_TASK_VIEW___FINISH);\r\n\t\tcreateEOperation(puzzleTaskViewEClass, PUZZLE_TASK_VIEW___START_PUZZLE);\r\n\t\tcreateEOperation(puzzleTaskViewEClass, PUZZLE_TASK_VIEW___ACCEPT_PLAYER);\r\n\r\n\t\tplayerToIntEClass = createEClass(PLAYER_TO_INT);\r\n\t\tcreateEReference(playerToIntEClass, PLAYER_TO_INT__KEY);\r\n\t\tcreateEAttribute(playerToIntEClass, PLAYER_TO_INT__VALUE);\r\n\r\n\t\tpuzzleEClass = createEClass(PUZZLE);\r\n\t\tcreateEAttribute(puzzleEClass, PUZZLE__LEVEL);\r\n\t\tcreateEOperation(puzzleEClass, PUZZLE___ACCEPT_PROPOSAL__STRING);\r\n\t\tcreateEOperation(puzzleEClass, PUZZLE___FINISH_PUZZLE__PLAYER);\r\n\t\tcreateEOperation(puzzleEClass, PUZZLE___START_PUZZLE__PLAYER);\r\n\t\tcreateEOperation(puzzleEClass, PUZZLE___GET_IMAGE__PLAYER);\r\n\r\n\t\tsimplePuzzleEClass = createEClass(SIMPLE_PUZZLE);\r\n\t\tcreateEReference(simplePuzzleEClass, SIMPLE_PUZZLE__INSTRUCTIONS);\r\n\t\tcreateEAttribute(simplePuzzleEClass, SIMPLE_PUZZLE__SOLUTION);\r\n\t\tcreateEReference(simplePuzzleEClass, SIMPLE_PUZZLE__PUZZLE_PIECES);\r\n\t\tcreateEReference(simplePuzzleEClass, SIMPLE_PUZZLE__PLAYER_PIECES);\r\n\t\tcreateEOperation(simplePuzzleEClass, SIMPLE_PUZZLE___ACCEPT_PROPOSAL__STRING);\r\n\t\tcreateEOperation(simplePuzzleEClass, SIMPLE_PUZZLE___FINISH_PUZZLE__PLAYER);\r\n\t\tcreateEOperation(simplePuzzleEClass, SIMPLE_PUZZLE___START_PUZZLE__PLAYER);\r\n\t\tcreateEOperation(simplePuzzleEClass, SIMPLE_PUZZLE___GET_IMAGE__PLAYER);\r\n\r\n\t\tplayerTaskScoreEClass = createEClass(PLAYER_TASK_SCORE);\r\n\t\tcreateEReference(playerTaskScoreEClass, PLAYER_TASK_SCORE__PLAYER);\r\n\t\tcreateEAttribute(playerTaskScoreEClass, PLAYER_TASK_SCORE__SCORE);\r\n\t\tcreateEAttribute(playerTaskScoreEClass, PLAYER_TASK_SCORE__LEVEL);\r\n\r\n\t\tplayerTaskScoresEClass = createEClass(PLAYER_TASK_SCORES);\r\n\t\tcreateEReference(playerTaskScoresEClass, PLAYER_TASK_SCORES__SCORES);\r\n\r\n\t\tplayerToPuzzlePieceEClass = createEClass(PLAYER_TO_PUZZLE_PIECE);\r\n\t\tcreateEReference(playerToPuzzlePieceEClass, PLAYER_TO_PUZZLE_PIECE__KEY);\r\n\t\tcreateEReference(playerToPuzzlePieceEClass, PLAYER_TO_PUZZLE_PIECE__VALUE);\r\n\t}", "private void generateConfig() \n {\n Random randomSpin = new Random();\n //System.out.println(\"Generated lattice looks like this:\");\n for (int i = 0; i < m; i++) {\n for (int j = 0; j < m; j++) {\n if (randomSpin.nextDouble() < 0.5) {\n lattice[i][j] = -1; \n } else {\n lattice[i][j] = 1;\n }\n // System.out.printf(\"%d \", lattice[i][j]);\n }\n // System.out.println();\n\n }\n }", "@Override\n\tprotected void createPackage() {\n\t\tdecorations.add(new BridesMaidDeco());\n\t\tdecorations.add(new BridalDeco());\n\t}", "public void createPackageContents() {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n kShapeLayoutEClass = createEClass(KSHAPE_LAYOUT);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__XPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__YPOS);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__WIDTH);\r\n createEAttribute(kShapeLayoutEClass, KSHAPE_LAYOUT__HEIGHT);\r\n createEReference(kShapeLayoutEClass, KSHAPE_LAYOUT__INSETS);\r\n\r\n kEdgeLayoutEClass = createEClass(KEDGE_LAYOUT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__BEND_POINTS);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__SOURCE_POINT);\r\n createEReference(kEdgeLayoutEClass, KEDGE_LAYOUT__TARGET_POINT);\r\n\r\n kLayoutDataEClass = createEClass(KLAYOUT_DATA);\r\n\r\n kPointEClass = createEClass(KPOINT);\r\n createEAttribute(kPointEClass, KPOINT__X);\r\n createEAttribute(kPointEClass, KPOINT__Y);\r\n\r\n kInsetsEClass = createEClass(KINSETS);\r\n createEAttribute(kInsetsEClass, KINSETS__TOP);\r\n createEAttribute(kInsetsEClass, KINSETS__BOTTOM);\r\n createEAttribute(kInsetsEClass, KINSETS__LEFT);\r\n createEAttribute(kInsetsEClass, KINSETS__RIGHT);\r\n\r\n kIdentifierEClass = createEClass(KIDENTIFIER);\r\n createEAttribute(kIdentifierEClass, KIDENTIFIER__ID);\r\n\r\n kVectorEClass = createEClass(KVECTOR);\r\n createEAttribute(kVectorEClass, KVECTOR__X);\r\n createEAttribute(kVectorEClass, KVECTOR__Y);\r\n\r\n kVectorChainEClass = createEClass(KVECTOR_CHAIN);\r\n }", "ShipmentGatewayConfigType createShipmentGatewayConfigType();", "void setCost(double cost);", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tanalyzerJobEClass = createEClass(ANALYZER_JOB);\n\t\tcreateEReference(analyzerJobEClass, ANALYZER_JOB__RFS_SERVICE);\n\n\t\tcomponentFailureEClass = createEClass(COMPONENT_FAILURE);\n\t\tcreateEReference(componentFailureEClass, COMPONENT_FAILURE__COMPONENT_REF);\n\n\t\tcomponentWorkFlowRunEClass = createEClass(COMPONENT_WORK_FLOW_RUN);\n\t\tcreateEReference(componentWorkFlowRunEClass, COMPONENT_WORK_FLOW_RUN__FAILURE_REFS);\n\n\t\texpressionFailureEClass = createEClass(EXPRESSION_FAILURE);\n\t\tcreateEReference(expressionFailureEClass, EXPRESSION_FAILURE__EXPRESSION_REF);\n\n\t\tfailureEClass = createEClass(FAILURE);\n\t\tcreateEAttribute(failureEClass, FAILURE__MESSAGE);\n\n\t\tjobEClass = createEClass(JOB);\n\t\tcreateEAttribute(jobEClass, JOB__END_TIME);\n\t\tcreateEAttribute(jobEClass, JOB__INTERVAL);\n\t\tcreateEAttribute(jobEClass, JOB__JOB_STATE);\n\t\tcreateEAttribute(jobEClass, JOB__NAME);\n\t\tcreateEAttribute(jobEClass, JOB__REPEAT);\n\t\tcreateEAttribute(jobEClass, JOB__START_TIME);\n\n\t\tjobRunContainerEClass = createEClass(JOB_RUN_CONTAINER);\n\t\tcreateEReference(jobRunContainerEClass, JOB_RUN_CONTAINER__JOB);\n\t\tcreateEReference(jobRunContainerEClass, JOB_RUN_CONTAINER__WORK_FLOW_RUNS);\n\n\t\tmetricSourceJobEClass = createEClass(METRIC_SOURCE_JOB);\n\t\tcreateEReference(metricSourceJobEClass, METRIC_SOURCE_JOB__METRIC_SOURCES);\n\n\t\tnodeReporterJobEClass = createEClass(NODE_REPORTER_JOB);\n\t\tcreateEReference(nodeReporterJobEClass, NODE_REPORTER_JOB__NODE);\n\n\t\tnodeTypeReporterJobEClass = createEClass(NODE_TYPE_REPORTER_JOB);\n\t\tcreateEReference(nodeTypeReporterJobEClass, NODE_TYPE_REPORTER_JOB__NODE_TYPE);\n\t\tcreateEReference(nodeTypeReporterJobEClass, NODE_TYPE_REPORTER_JOB__SCOPE_OBJECT);\n\n\t\toperatorReporterJobEClass = createEClass(OPERATOR_REPORTER_JOB);\n\t\tcreateEReference(operatorReporterJobEClass, OPERATOR_REPORTER_JOB__OPERATOR);\n\n\t\tretentionJobEClass = createEClass(RETENTION_JOB);\n\n\t\trfsServiceMonitoringJobEClass = createEClass(RFS_SERVICE_MONITORING_JOB);\n\t\tcreateEReference(rfsServiceMonitoringJobEClass, RFS_SERVICE_MONITORING_JOB__RFS_SERVICE);\n\n\t\trfsServiceReporterJobEClass = createEClass(RFS_SERVICE_REPORTER_JOB);\n\t\tcreateEReference(rfsServiceReporterJobEClass, RFS_SERVICE_REPORTER_JOB__RFS_SERVICE);\n\n\t\tserviceUserFailureEClass = createEClass(SERVICE_USER_FAILURE);\n\t\tcreateEReference(serviceUserFailureEClass, SERVICE_USER_FAILURE__SERVICE_USER_REF);\n\n\t\tworkFlowRunEClass = createEClass(WORK_FLOW_RUN);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__ENDED);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__LOG);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__PROGRESS);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__PROGRESS_MESSAGE);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__PROGRESS_TASK);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__STARTED);\n\t\tcreateEAttribute(workFlowRunEClass, WORK_FLOW_RUN__STATE);\n\n\t\t// Create enums\n\t\tjobRunStateEEnum = createEEnum(JOB_RUN_STATE);\n\t\tjobStateEEnum = createEEnum(JOB_STATE);\n\n\t\t// Create data types\n\t\tjobRunStateObjectEDataType = createEDataType(JOB_RUN_STATE_OBJECT);\n\t\tjobStateObjectEDataType = createEDataType(JOB_STATE_OBJECT);\n\t}", "public GenerateRandomInstances(int n) {\r\n this.sources = new Source[n];\r\n this.sources[0] = new Factory(\"S\" + 0, (int) (Math.random() * 50) + 10);\r\n for (int i = 1; i < n; i++) { // generate random values for supply\r\n this.sources[i] = new Warehouse(\"S\" + i, (int) (Math.random() * 50) + 10);\r\n //sum += this.sources[i].getSupply();\r\n }\r\n this.destinations = new Destination[n];\r\n for (int i = 0; i < n; i++) { // generate random values for supply\r\n this.destinations[i] = new Destination(\"D\" + i, (int) (Math.random() * 50) + 10);\r\n }\r\n this.costMatrix = new int[n][n];\r\n for (int k = 0; k < n; k++) { // generate random values for cost matrix\r\n for (int j = 0; j < n; j++) {\r\n this.costMatrix[k][j] = (int) (Math.random() * 9) + 1;\r\n }\r\n }\r\n }", "public Label create() {\n\t\t\tgeneratedValue += 1;\n\t\t\treturn new Label(Type.GENERATED, generatedValue);\n\t\t}", "protected int addObjConfig()\r\n\t{\r\n\t\tobjConfigs.add(new GridObjConfig());\r\n\t\tobjConfig = objConfigs.size() - 1;\r\n\t\tobjConfigs.get(objConfig).imgScale = 1;\r\n\t\tobjConfigs.get(objConfig).innerGrid = true;\r\n\t\treturn objConfig;\r\n\t}", "private static List<Integer> packDPInit(PackageDTO packageDTO) {\n // Declare the table dynamically\n Integer itemsSize = packageDTO.getItems().size();\n Integer capacityGrams = packageDTO.getCapacity() * GRAMS_IN_KILO;\n Integer mem[][] = new Integer[itemsSize + 1][capacityGrams + 1];\n\n //I need to re-instance my list as an Integer List to use The values on my memoization structure\n List<Integer> weights = new ArrayList<>();\n for(ItemDTO item : packageDTO.getItems()){\n Double weightGrams = item.getWeight() * GRAMS_IN_KILO;\n weights.add(weightGrams.intValue());\n }\n\n // Loop to initially filled the\n // table with -1\n for(int i = 0; i < itemsSize + 1; i++)\n for(int j = 0; j < capacityGrams + 1; j++)\n mem[i][j] = -1;\n\n List<Integer> optimalChoice = new ArrayList<>();\n packDPRec(capacityGrams, weights, packageDTO.getItems(), weights.size(), mem, optimalChoice);\n return optimalChoice;\n }", "@Override\n\tprotected void setCost(double cst) {\n\t\t\n\t}", "public void calculateCost()\n\t{\n\t\tLogManager lgmngr = LogManager.getLogManager(); \n\t\tLogger log = lgmngr.getLogger(Logger.GLOBAL_LOGGER_NAME);\n\t\tString s = \"\";\n\t\tint costperfeet = 0;\n\t\tif (this.materialStandard.equals(\"standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1200;\n\t\telse if (this.materialStandard.equals(\"above standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1500;\n\t\telse if(this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == false)\n\t\t\tcostperfeet = 1800;\n\t\telse if (this.materialStandard.equals(\"high standard materials\") && this.fullyAutomated == true)\n\t\t\tcostperfeet = 2500;\n\t\t\n\t\tint totalCost = costperfeet * this.totalArea;\n\t\t/*s = \"Total Cost of Construction is :- \";\n\t\twriter.printf(\"%s\" + totalCost, s);\n\t\twriter.flush();*/\n\t\tlog.log(Level.INFO, \"Total Cost of Construction is :- \" + totalCost);\n\t}", "public void initAsg(){\n\t\tConfigure conf = Configure.getConf();\n\t\tint min = conf.getMaxNum();\n\t\t\n\t\t//launch min number of instances\n\t\tTimeManager.PrintCurrentTime(\"Init Cluster, launching %d DC\\n\", min);\n\t\tfor(int i=0; i < min; i++){\n\t\t\tConnToDC dc = nova.launchOne(conf.getInatanceName());\n\t\t\tif(dc != null){\n\t\t\t\tdcList.offer(dc);\n\t\t\t\tlb.addDC(dc.getIp());\n\t\t\t\tTimeManager.PrintCurrentTime(\"Successfully launch 1 DC [%s:%s]\\n\", \n\t\t\t\t\t\tdc.getIp(), dc.getId());\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ;\n\t}", "public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tldprojectEClass = createEClass(LDPROJECT);\n\t\tcreateEAttribute(ldprojectEClass, LDPROJECT__NAME);\n\t\tcreateEAttribute(ldprojectEClass, LDPROJECT__LIFECYCLE);\n\t\tcreateEAttribute(ldprojectEClass, LDPROJECT__ROBUSTNESS);\n\t\tcreateEOperation(ldprojectEClass, LDPROJECT___PUBLISH);\n\t\tcreateEOperation(ldprojectEClass, LDPROJECT___UNPUBLISH);\n\t\tcreateEOperation(ldprojectEClass, LDPROJECT___UPDATE);\n\n\t\tlddatabaselinkEClass = createEClass(LDDATABASELINK);\n\t\tcreateEAttribute(lddatabaselinkEClass, LDDATABASELINK__DATABASE);\n\t\tcreateEAttribute(lddatabaselinkEClass, LDDATABASELINK__PORT);\n\n\t\tldprojectlinkEClass = createEClass(LDPROJECTLINK);\n\n\t\tldnodeEClass = createEClass(LDNODE);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__NAME);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__MONGO_HOSTS);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__MAIN_PROJECT);\n\t\tcreateEAttribute(ldnodeEClass, LDNODE__ANALYTICS_READ_PREFERENCE);\n\n\t\t// Create enums\n\t\tlifecycleEEnum = createEEnum(LIFECYCLE);\n\t\trobustnessEEnum = createEEnum(ROBUSTNESS);\n\t}" ]
[ "0.5587466", "0.5441681", "0.5439995", "0.5340993", "0.5309832", "0.5205512", "0.51179576", "0.5072119", "0.50627923", "0.49767083", "0.49758542", "0.48874995", "0.48658842", "0.48511446", "0.48467708", "0.48290274", "0.4827892", "0.4825164", "0.480296", "0.47982532", "0.4788024", "0.47693285", "0.47571227", "0.4753946", "0.47450495", "0.474105", "0.47340155", "0.47176418", "0.47123638", "0.47025228", "0.46872762", "0.46789613", "0.46774656", "0.4676884", "0.4661234", "0.4655005", "0.4643449", "0.46305016", "0.46295503", "0.46188635", "0.46186337", "0.4597922", "0.4581293", "0.45796007", "0.45748803", "0.45605713", "0.45571", "0.45539144", "0.4551163", "0.4547283", "0.45459378", "0.4539737", "0.45385653", "0.45359385", "0.45279452", "0.45265886", "0.45239526", "0.45238832", "0.4523595", "0.45209494", "0.4518015", "0.45154893", "0.45136273", "0.45110422", "0.45019618", "0.44869795", "0.44770798", "0.44735238", "0.44718218", "0.4460534", "0.44495624", "0.44485065", "0.44365686", "0.44342035", "0.4422553", "0.44217318", "0.4420739", "0.44181535", "0.4417966", "0.44158852", "0.44109413", "0.4407811", "0.44068986", "0.4401187", "0.4399867", "0.43964583", "0.4392371", "0.43895772", "0.4387324", "0.43856764", "0.43846482", "0.4381599", "0.43760508", "0.43745053", "0.43694365", "0.43679744", "0.43629667", "0.43623424", "0.43590033", "0.43587056" ]
0.44802707
66
Create positive disk material
public void createPositiveDisk(int diskID, float posX, float posY, float speedX, float speedY){ Material posDiskMat = new Material(sapp.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md"); posDiskMat.setColor("Color", ColorRGBA.Green); Vector3f tempVector = new Vector3f(speedX, speedY, 0); PositiveDisk pDisk = new PositiveDisk(diskID, tempVector, posX, posY, POSDISK_R, posDiskMat, sapp); diskList.add(pDisk); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "WithCreate withDiskSizeGB(Integer diskSizeGB);", "void createMaterial(Material material) throws CreateException;", "public static void create(Disks disk){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tHibernateUtilMastere.getSession().save(disk);\r\n\t\t\tHibernateUtilMastere.getSession().getTransaction().commit();\r\n\t\t} catch(HibernateException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public void createNegativeDisk(int diskID, float posX, float posY, float speedX, float speedY){\n Material negDiskMat = new Material(sapp.getAssetManager(),\n \"Common/MatDefs/Misc/Unshaded.j3md\");\n negDiskMat.setColor(\"Color\", ColorRGBA.Red);\n \n Vector3f tempVector = new Vector3f(speedX, speedY, 0);\n NegativeDisk nDisk = new NegativeDisk(diskID, tempVector, posX, posY, NEGDISK_R, negDiskMat, sapp);\n diskList.add(nDisk);\n }", "public ADisk(boolean format)\n { \n\t // build lock\n\t this.setFailureProb(0);\n ADisk_lock = new SimpleLock();\n waitLock = new SimpleLock();\n atranslist = new ActiveTransactionList();\n //initialize lists and logs\n wblist = new WriteBackList(this);\n commitDone = waitLock.newCondition();\n writebackDone = waitLock.newCondition();\n readDone = waitLock.newCondition();\n logReadDone = waitLock.newCondition();\n wbbarrier = waitLock.newCondition();\n commitBarrierSector = -1;\n commitBarrierTid = -1;\n writebackBarrierSector = -1;\n writebackBarrierTid = -1;\n readSector = -1;\n readTid = -1;\n logReadSector = -1;\n logReadTid = -1;\n wbbarrierSec = -1;\n wbbarrierTag = -1;\n \n\t d = null;\n\t try{\n\t d = new Disk(this);\n\t }\n\t catch(FileNotFoundException fnf){\n\t System.out.println(\"Unable to open disk file\");\n\t System.exit(-1);\n\t }\n\t \n\t //create writeback thread\n\t writebackthread = new WriteBackThread();\n try {\n\t if (format == true){\n\t \t lstatus = new LogStatus(this, false);\n\t \t \n\t \t ///wipe the disk\n\t \t /*byte[] blank = new byte[Disk.SECTOR_SIZE];\n\t \t for(int i = 0; i < Disk.SECTOR_SIZE; i++)\n\t \t \tblank[i] = 0x00;\n\t \t for(int i = 0; i < this.getNSectors(); i++){\n\t \t \tif(i == this.getNSectors() - 1){\n\t \t \t\tthis.commitBarrierSector = i;\n\t \t \t\tthis.commitBarrierTid = Disk.SECTOR_SIZE + 10;\n\t \t \t\td.addBarrier(); // must wait for the entire wipe write to be on disk\n\t \t \t}\n\t \t \td.startRequest(Disk.WRITE, Disk.SECTOR_SIZE+10, i, blank);\n\t \t }\n \t \tcommitWait();*/\n\t \t // We decided not to wipe the disk because the instructions were vague and it seems insanely inefficient to wipe the disk and there doesnt seem to be reason to wipe it. It also makes our tests run very slow. \n\t } \n\t else {\n\t \t //RECOVERY\n\t \t lstatus = new LogStatus(this, true);\n\t \t byte[] next = lstatus.recoverNext();\n\t while(next != null){\n\t \t Transaction temp = Transaction.parseLogBytesDebug(next, this);\n\t \t wblist.addCommitted(temp);\t \n\t \t next = lstatus.recoverNext();\n\t } \n\t }\n }\n catch(IOException e){\n\t\t\tSystem.out.println(\"IO exception\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n }\n catch(IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Illegal Argument exception\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n }\n \n }", "public void format( RawDisk disk) {\n \tthis.tempDisk.format();\n }", "public void create_crystal() {\n\t\tcrystalQuantity[1] += (1+create_modifier);\n\t\tautomerge();\n\t\tcollection();\n\t}", "com.google.protobuf.ByteString getDiskBytes();", "public HWDiskStore() {\n this.diskStore = new oshi.hardware.HWDiskStore();\n }", "abstract public Vcard createVcard();", "java.lang.String getDisk();", "public DiskPoolVolume() {\n }", "public Disk(int size){\n this.size = size;\n }", "Digital_Artifact createDigital_Artifact();", "private void createFiOrDi(Directory root, String type, int freeBlock) {\n\t\tif(Constants.DIRECTORY_FILE.equals(type)) {\n\t\t\tsector.put(freeBlock, new Directory());\n\t\t} else {\n\t\t\tsector.put(freeBlock, new Data());\n\t\t}\n\t}", "Stone create();", "public void changeDisk(){\n if(isFull==true) {\n if (this.type == TYPE.WHITE) {\n this.type = TYPE.BLACK;\n } else {\n type = TYPE.WHITE;\n }\n }\n return;\n }", "@Before\n public void init(){\n spaceCapacity = 20;\n fileSystem = new FileSystem(spaceCapacity);\n }", "public RLDiskDrive() {\n }", "public static void main(String[] args) throws Exception {\n int B = 4096; //bytes max por pagina\n int M = 200; //cantidad de rectangulos tal que el nodo no pese mas que B\n\n int maxCord = 500000;\n int maxDelta = 100;\n\n Random rnd = new Random();\n\n int m = (M * 40) / 100; // m = 40% M\n\n int left = rnd.nextInt(maxCord);\n int bottom = rnd.nextInt(maxCord);\n int deltaX = rnd.nextInt(maxDelta);\n int deltaY = rnd.nextInt(maxDelta);\n\n Rectangle r = new Rectangle(left, left + deltaX, bottom + deltaY, bottom);\n DiskController diskController = new DiskController(M);\n long address = diskController.memoryAssigner();\n Node tree = new Root(m, M, r, diskController, address);\n\n diskController.saveNode(tree);\n long rootSize =diskController.getNodeSize(address);\n System.out.println(\"Tamaño de raiz : \" + rootSize + \" bytes\");\n\n int n=0;\n while (diskController.getNodeSize(address) < B){\n if(n==157) { break;}\n n++;\n Rectangle rn;\n left = rnd.nextInt(maxCord);\n bottom = rnd.nextInt(maxCord);\n deltaX = rnd.nextInt(maxDelta);\n deltaY = rnd.nextInt(maxDelta);\n rn = new Rectangle(left, left + deltaX, bottom + deltaY, bottom);\n tree.insert(rn, new LinearSplit());\n System.out.println(\"Rectangulos insertados : \" + n);\n }\n float nodeCoverage = diskController.nodeOcupation();\n System.out.println(\"Coverage : \"+nodeCoverage);\n System.out.println(\"Tamaño de raiz llena : \" + diskController.getNodeSize(address) + \" bytes, con \"+n+\" nodos insertados. Con raiz vacía de \"+rootSize+\" bytes\");\n //Tamaño de raiz llena : 4089 bytes, con 157 nodos insertados. Con raiz vacía de 478 bytes\n\n }", "int getDiskNum();", "public Material create();", "Active_Digital_Artifact createActive_Digital_Artifact();", "interface WithCreationData {\n /**\n * Specifies the creationData property: Disk source information. CreationData information cannot be changed\n * after the disk has been created..\n *\n * @param creationData Disk source information. CreationData information cannot be changed after the disk\n * has been created.\n * @return the next definition stage.\n */\n WithCreate withCreationData(CreationData creationData);\n }", "private static Datacenter createDatacenter(String name) {\n List<Host> hostList = new ArrayList<Host>();\r\n\r\n // 2. A Machine contains one or more PEs or CPUs/Cores.\r\n // In this example, it will have only one core.\r\n List<Pe> peList = new ArrayList<Pe>();\r\n\r\n\r\n // 3. Create PEs and add these into a list.\r\n peList.add(new Pe(0, new PeProvisionerSimple(mips+100))); // need to store Pe id and MIPS Rating\r\n\r\n // 4. Create Host with its id and list of PEs and add them to the list\r\n // of machines\r\n long storage = 1000000; // host storage\r\n\r\n\r\n for (int hostId = 0; hostId < vmNum; hostId++) {\r\n hostList.add(\r\n new Host(\r\n hostId,\r\n new RamProvisionerSimple((int)((ram*1.1)/Constants.MB)),\r\n new BwProvisionerSimple(bw+10),\r\n storage,\r\n peList,\r\n new VmSchedulerTimeShared(peList)\r\n )\r\n ); // This is our machine\r\n }\r\n\r\n\r\n // 5. Create a DatacenterCharacteristics object that stores the\r\n // properties of a data center: architecture, OS, list of\r\n // Machines, allocation policy: time- or space-shared, time zone\r\n // and its price (G$/Pe time unit).\r\n String arch = \"x86\"; // system architecture\r\n String os = \"Linux\"; // operating system\r\n String vmm = \"Xen\";\r\n double time_zone = 10.0; // time zone this resource located\r\n double cost = 3.0; // the cost of using processing in this resource\r\n double costPerMem = 0.05; // the cost of using memory in this resource\r\n double costPerStorage = 0.001; // the cost of using storage in this\r\n // resource\r\n double costPerBw = 0.0; // the cost of using bw in this resource\r\n LinkedList<Storage> storageList = new LinkedList<Storage>(); // we are not adding SAN\r\n // devices by now\r\n\r\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\r\n arch, os, vmm, hostList, time_zone, cost, costPerMem,\r\n costPerStorage, costPerBw);\r\n\r\n // 6. Finally, we need to create a PowerDatacenter object.\r\n Datacenter datacenter = null;\r\n try {\r\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return datacenter;\r\n }", "private static String createSshCommand(String diskName,String byteSize, String blockCount) {\n\t\tlog.info(\"Entered createSshCommand\");\n\n\t\tString processCmd = \"dd if=/dev/urandom of=\" + diskName + \" bs=\" + byteSize + \" count=\" + blockCount + \"&\";\n\t\treturn (processCmd);\n\n\t}", "public DiskEncryptionInfo() {\n }", "public void startup( RawDisk disk) {\n\t\tthis.tempDisk = disk;\t\n }", "@Test\n public void testAddVolumeWithSameDiskTiering() throws IOException {\n datanode = mock(DataNode.class);\n storage = mock(DataStorage.class);\n this.conf = new Configuration();\n this.conf.setLong(DFS_DATANODE_SCAN_PERIOD_HOURS_KEY, 0);\n this.conf.set(DFSConfigKeys.DFS_DATANODE_REPLICA_CACHE_ROOT_DIR_KEY,\n replicaCacheRootDir);\n conf.setBoolean(DFSConfigKeys.DFS_DATANODE_ALLOW_SAME_DISK_TIERING,\n true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE,\n 0.4);\n\n when(datanode.getConf()).thenReturn(conf);\n final DNConf dnConf = new DNConf(datanode);\n when(datanode.getDnConf()).thenReturn(dnConf);\n final BlockScanner disabledBlockScanner = new BlockScanner(datanode);\n when(datanode.getBlockScanner()).thenReturn(disabledBlockScanner);\n final ShortCircuitRegistry shortCircuitRegistry =\n new ShortCircuitRegistry(conf);\n when(datanode.getShortCircuitRegistry()).thenReturn(shortCircuitRegistry);\n when(datanode.getDataSetLockManager()).thenReturn(manager);\n\n createStorageDirs(storage, conf, 1);\n dataset = new FsDatasetImpl(datanode, storage, conf);\n\n List<NamespaceInfo> nsInfos = Lists.newArrayList();\n for (String bpid : BLOCK_POOL_IDS) {\n nsInfos.add(new NamespaceInfo(0, CLUSTER_ID, bpid, 1));\n }\n StorageLocation archive = createStorageWithStorageType(\"archive1\",\n StorageType.ARCHIVE, conf, storage, datanode);\n dataset.addVolume(archive, nsInfos);\n assertEquals(2, dataset.getVolumeCount());\n\n String mount = new DF(new File(archive.getUri()), conf).getMount();\n double archiveRatio = dataset.getMountVolumeMap()\n .getCapacityRatioByMountAndStorageType(mount, StorageType.ARCHIVE);\n double diskRatio = dataset.getMountVolumeMap()\n .getCapacityRatioByMountAndStorageType(mount, StorageType.DISK);\n assertEquals(0.4, archiveRatio, 0);\n assertEquals(0.6, diskRatio, 0);\n\n // Add second ARCHIVAL volume should fail fsDataSetImpl.\n try {\n dataset.addVolume(\n createStorageWithStorageType(\"archive2\",\n StorageType.ARCHIVE, conf, storage, datanode), nsInfos);\n fail(\"Should throw exception for\" +\n \" same storage type already exists on same mount.\");\n } catch (IOException e) {\n assertTrue(e.getMessage()\n .startsWith(\"Storage type ARCHIVE already exists on same mount:\"));\n }\n }", "public String getDisk() {\n return disk;\n }", "MemoryPartition createMemoryPartition();", "WithPartitionsAndCreate withStandardSku();", "@BeforeClass\n public static void createOriginalFSImage() throws IOException {\n MiniDFSCluster cluster = null;\n try {\n Configuration conf = new Configuration();\n conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true);\n conf.setBoolean(DFSConfigKeys.DFS_STORAGE_POLICY_ENABLED_KEY, true);\n\n File[] nnDirs = MiniDFSCluster.getNameNodeDirectory(\n MiniDFSCluster.getBaseDirectory(), 0, 0);\n tempDir = nnDirs[0];\n\n cluster = new MiniDFSCluster.Builder(conf).build();\n cluster.waitActive();\n DistributedFileSystem hdfs = cluster.getFileSystem();\n\n Path dir = new Path(\"/dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n dir = new Path(\"/dir_wo_sp/sub_dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, ALLSSD_STORAGE_POLICY_NAME);\n\n Path file = new Path(\"/dir_wo_sp/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n file = new Path(\"/dir_wo_sp/file_w_sp_allssd\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n hdfs.setStoragePolicy(file, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n }\n\n dir = new Path(\"/dir_w_sp_allssd\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.ALLSSD_STORAGE_POLICY_NAME);\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_wo_sp\");\n hdfs.mkdirs(dir);\n\n file = new Path(\"/dir_w_sp_allssd/file_wo_sp\");\n try (FSDataOutputStream o = hdfs.create(file)) {\n o.write(123);\n o.close();\n }\n\n dir = new Path(\"/dir_w_sp_allssd/sub_dir_w_sp_hot\");\n hdfs.mkdirs(dir);\n hdfs.setStoragePolicy(dir, HdfsConstants.HOT_STORAGE_POLICY_NAME);\n\n // Write results to the fsimage file\n hdfs.setSafeMode(SafeModeAction.ENTER, false);\n hdfs.saveNamespace();\n\n // Determine the location of the fsimage file\n originalFsimage = FSImageTestUtil.findLatestImageFile(FSImageTestUtil\n .getFSImage(cluster.getNameNode()).getStorage().getStorageDir(0));\n if (originalFsimage == null) {\n throw new RuntimeException(\"Didn't generate or can't find fsimage\");\n }\n LOG.debug(\"original FS image file is \" + originalFsimage);\n } finally {\n if (cluster != null) {\n cluster.shutdown();\n }\n }\n }", "public long\n getDisk()\n {\n return pDisk;\n }", "static void print_disk(int size){\n for(int i = 0; i < 5-size; i++)\n System.out.print(\" \");\n for(int i = 0; i < size; i++){\n if(i == size/2 && size%2 == 0)\n System.out.print(\"||--\");\n else if(i == size/2 && size%2 == 1)\n System.out.print(\"-||-\");\n else\n System.out.print(\"--\");\n }\n for(int i = 0; i < 5-size; i++)\n System.out.print(\" \");\n System.out.print(\"\\t\");\n }", "public SVCustom build(){\n if(this.disks < 1) return new SVCustom();\n SVCustom s = new SVCustom(new Point(100, (int)Math.pow(2, this.disks)*104 - 52));\n int left[] = new int[]{0,1};\n int right[] = new int[]{1,2};\n int bottom[] = new int[]{0,2};\n SierpinskiTriangle t = new SierpinskiTriangle(0,this.disks,this.disks-1, left, right, bottom, buildInitial(this.disks));\n s.setAttribute(\"font-family\", \"Arial\");\n s.addContent(t, \"Triangle\");\n return s;\n }", "public D64DiskImage( String filename, List<Sector> sectorList) {\n\n\t// Use the constructor of the base class.\n\tsuper( filename, sectorList);\n }", "private FSDataOutputStream createNewFile() throws Exception {\n\t\tlogger.traceEntry();\n\t\tPath newFile = new Path(rootDirectory, \"dim_\" + System.currentTimeMillis() + \".json\");\n\t\tlogger.debug(\"Creating file \" + newFile.getName());\n\t\tFSDataOutputStream dataOutputStream = null;\n\n\t\tif (!hadoopFileSystem.exists(newFile)) {\n\t\t\tdataOutputStream = hadoopFileSystem.create(newFile);\n\t\t} else {\n\t\t\tdataOutputStream = hadoopFileSystem.append(newFile);\n\t\t}\n\n\t\tdataOutputStreams.clear();\n\t\tdataOutputStreams.add(dataOutputStream);\n\t\tlogger.traceExit();\n\t\treturn dataOutputStream;\n\t}", "SMALL createSMALL();", "interface WithDiskSizeGB {\n /**\n * Specifies the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it\n * indicates the size of the disk to create. If this field is present for updates or creation with other\n * options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and\n * can only increase the disk's size..\n *\n * @param diskSizeGB If creationData.createOption is Empty, this field is mandatory and it indicates the\n * size of the disk to create. If this field is present for updates or creation with other options, it\n * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can\n * only increase the disk's size.\n * @return the next definition stage.\n */\n WithCreate withDiskSizeGB(Integer diskSizeGB);\n }", "public static Node createLargeTree() {\n final int dcCount = 2;\n final int rackCount = 6;\n final int snCount = 6;\n final int hdCount = 12;\n\n int id = 0;\n // root\n Node root = new Node();\n root.setName(\"root\");\n root.setId(id++);\n root.setType(Types.ROOT);\n root.setSelection(Selection.STRAW);\n // DC\n List<Node> dcs = new ArrayList<Node>();\n for (int i = 1; i <= dcCount; i++) {\n Node dc = new Node();\n dcs.add(dc);\n dc.setName(\"dc\" + i);\n dc.setId(id++);\n dc.setType(Types.DATA_CENTER);\n dc.setSelection(Selection.STRAW);\n dc.setParent(root);\n // racks\n List<Node> racks = new ArrayList<Node>();\n for (int j = 1; j <= rackCount; j++) {\n Node rack = new Node();\n racks.add(rack);\n rack.setName(dc.getName() + \"rack\" + j);\n rack.setId(id++);\n rack.setType(StorageSystemTypes.RACK);\n rack.setSelection(Selection.STRAW);\n rack.setParent(dc);\n // storage nodes\n List<Node> sns = new ArrayList<Node>();\n for (int k = 1; k <= snCount; k++) {\n Node sn = new Node();\n sns.add(sn);\n sn.setName(rack.getName() + \"sn\" + k);\n sn.setId(id++);\n sn.setType(StorageSystemTypes.STORAGE_NODE);\n sn.setSelection(Selection.STRAW);\n sn.setParent(rack);\n // hds\n List<Node> hds = new ArrayList<Node>();\n for (int l = 1; l <= hdCount; l++) {\n Node hd = new Node();\n hds.add(hd);\n hd.setName(sn.getName() + \"hd\" + l);\n hd.setId(id++);\n hd.setType(StorageSystemTypes.DISK);\n hd.setWeight(100);\n hd.setParent(sn);\n }\n sn.setChildren(hds);\n }\n rack.setChildren(sns);\n }\n dc.setChildren(racks);\n }\n root.setChildren(dcs);\n return root;\n }", "public interface VirtualDisk {\n\n /**\n * Returns the name of the image; usually it's original\n * filename, without the suffix.\n *\n * @return The floppy disk image name.\n */\n String getName();\n\n /**\n * Returns the root directory folder of this virtual\n * floppy disk image.\n *\n * @return The root directory contents.\n */\n VirtualDirectory getRootContents();\n\n /**\n * Returns the type of this floppy disk image.\n *\n * @return The floppy disk image type.\n */\n ImageType getType();\n\n /**\n * Allows to retrieve one of the virtual files in this\n * virtual disk, based on its UUID.\n *\n * @param uuid The UUID value.\n * @return The file, or null, if no file with that UUID exists.\n */\n VirtualFile getFile(String uuid);\n\n /**\n * Exports the contents of this floppy disk image to a\n * local file system directory, retaining the relative\n * directory structure of the original image.\n * <p>\n * NOTE 1: In case of problems with the extraction caused by\n * weird file names causing issues with the rules of the local\n * file system, try exporting the contents as .zip archive\n * instead. That may work in cases where a plain file export\n * does not.\n * <p>\n * NOTE 2: If some file entries cannot be extracted, the extraction\n * will still be carried out for everything else.\n *\n * @param targetDirectory The target directory where to extract the contents.\n * @throws IOException If the extraction failed.\n */\n void exportToDirectory(File targetDirectory) throws IOException;\n\n void exportAsZip(File zipFile) throws IOException;\n\n void exportAsZip(OutputStream target) throws IOException;\n}", "public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}", "public int getDisk()\n {\n return this.disk;\n }", "@Test\r\n\tpublic void testCapacityZero(){\r\n\t\tString expectedResult = \"-\";\r\n\t\tString itemsResults = Packer.pack(\"./src/test/resources/capacityZero.txt\");\r\n\t\tassertEquals(expectedResult, itemsResults);\r\n\t\tSystem.out.println(\"Test passed. CapacityZero.\");\r\n\t}", "@Test(timeout = 10000)\n public void testShouldConsiderSameMountVolume() throws IOException {\n FsVolumeImpl volume = new FsVolumeImplBuilder()\n .setConf(conf)\n .setDataset(dataset)\n .setStorageID(\"storage-id\")\n .setStorageDirectory(\n new StorageDirectory(StorageLocation.parse(BASE_DIR)))\n .build();\n assertFalse(dataset.shouldConsiderSameMountVolume(volume,\n StorageType.ARCHIVE, null));\n\n conf.setBoolean(DFSConfigKeys\n .DFS_DATANODE_ALLOW_SAME_DISK_TIERING, true);\n conf.setDouble(DFSConfigKeys\n .DFS_DATANODE_RESERVE_FOR_ARCHIVE_DEFAULT_PERCENTAGE,\n 0.5);\n volume = new FsVolumeImplBuilder()\n .setConf(conf)\n .setDataset(dataset)\n .setStorageID(\"storage-id\")\n .setStorageDirectory(\n new StorageDirectory(StorageLocation.parse(BASE_DIR)))\n .build();\n assertTrue(dataset.shouldConsiderSameMountVolume(volume,\n StorageType.ARCHIVE, null));\n assertTrue(dataset.shouldConsiderSameMountVolume(volume,\n StorageType.ARCHIVE, \"\"));\n assertFalse(dataset.shouldConsiderSameMountVolume(volume,\n StorageType.DISK, null));\n assertFalse(dataset.shouldConsiderSameMountVolume(volume,\n StorageType.ARCHIVE, \"target\"));\n }", "Passive_Digital_Artifact createPassive_Digital_Artifact();", "private static Datacenter CreateDataCenter() {\n\t\tList<Pe> peList = new ArrayList<Pe>();\n\t\t//One PE with 1000 Mips\n\t\tPeProvisionerSimple peProvisioner = new PeProvisionerSimple(1000);\n\t\t////Four 1000 MIPS PEs\n\t\tfor (int id = 0; id < 4; id++) {\n\t\t\tPe core = new Pe(id, peProvisioner);\n\t\t\tpeList.add(core);\n\t\t}\n\t\t//Initialize the hosts\n\t\tList<Host> hostList = new ArrayList<Host>();\n\t\t//8 GB RAM\n\t\tint ram = 8000;\n\t\t//1 MPBS network bandwidth\n\t\tint bw = 1000;\n\t\t//100 GB storage\n\t\tlong storage = 100000;\n\t\tfor (int id = 0; id < 4; id++) {\n\t\t\tHost host = new Host(id, new RamProvisionerSimple(ram), new BwProvisionerSimple(bw), storage, peList,\n\t\t\t\t\tnew VmSchedulerSpaceShared(peList));\n\t\t\thostList.add(host);\n\t\t}\n\t\t//Initialize the data center\n\t\tString architecture = \"x64\";\n\t\tString os = \"Kelly Linux\";\n\t\tString vmm = \"XEN\";\n\t\tdouble timeZone = -4.0;\n\t\tdouble computeCostPerSec = 3.0;\n\t\tdouble costPerMem = 1.0;\n\t\tdouble costPerStorage = 0.05;\n\t\tdouble costPerBW = 0.10;\n\t\tDatacenterCharacteristics datacenterCharacteristics = new DatacenterCharacteristics(architecture, os, vmm,\n\t\t\t\thostList, timeZone, computeCostPerSec, costPerMem, costPerStorage, costPerBW);\n\t\tLinkedList<Storage> SANstorage = new LinkedList<Storage>();\n\t\tDatacenter datacenter = null;\n\t\ttry {\n\t\t\tdatacenter = new Datacenter(\"datacenter0\", datacenterCharacteristics,\n\t\t\t\t\tnew VmAllocationPolicySimple(hostList), SANstorage, 1);\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\treturn datacenter;\n\t}", "private Sector generateSector(int x, int y){\n\t\tTerrainMap terrain = this.worldGen.generateTerrainMap(x, y);\n\t\treturn new Sector(terrain, this.renderQueue, matLib);\n\t}", "private Datacenter createDatacenter(String name){\n List<Host> hostList = new ArrayList<Host>();\n\n for (int i=0; i<HostCount; i++){\n\n // 2. A Machine contains one or more PEs or CPUs/Cores.\n List<Pe> peList = new ArrayList<Pe>();\n\n // 3. Create PEs and add these into a list.\n for (int j=0; j<HostCoreCount; j++){\n peList.add(new Pe(j, new PeProvisionerSimple(HostCoreMips)));\n }\n\n\n //in this example, the VMAllocatonPolicy in use is SpaceShared. It means that only one VM\n //is allowed to run on each Pe. As each Host has only one Pe, only one VM can run on each Host.\n hostList.add(\n new Host(\n i,\n new RamProvisionerSimple(HostRam),\n new BwProvisionerSimple(HostBandwidth),\n HostStorage,\n peList,\n new VmSchedulerSpaceShared(peList)\n )\n );\n }\n\n\n // 5. Create a DatacenterCharacteristics object that stores the\n // properties of a data center: architecture, OS, list of\n // Machines, allocation policy: time- or space-shared, time zone\n // and its price (G$/Pe time unit).\n String arch = \"x86\"; // system architecture\n String os = \"Linux\"; // operating system\n String vmm = \"Xen\";\n double time_zone = 10.0; // time zone this resource located\n double cost = 3.0; // the cost of using processing in this resource\n double costPerMem = 0.05;\t\t// the cost of using memory in this resource\n double costPerStorage = 0.001;\t// the cost of using storage in this resource\n double costPerBw = 0.0;\t\t\t// the cost of using bw in this resource\n LinkedList<Storage> storageList = new LinkedList<Storage>();\t//we are not adding SAN devices by now\n\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\n arch, os, vmm, hostList, time_zone, cost, costPerMem, costPerStorage, costPerBw);\n\n // 6. Finally, we need to create a PowerDatacenter object.\n Datacenter datacenter = null;\n\n try {\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return datacenter;\n }", "public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Chassis createChassis();", "public SuperBlock(int diskSize) {\n\n //Byte array to read the first disk block\n byte[] superBlock = new byte[Disk.blockSize];\n SysLib.rawread(0, superBlock);\n\n //Set our three variables from the block\n totalBlocks = SysLib.bytes2int(superBlock, 0);\n totalInodes = SysLib.bytes2int(superBlock, 4);\n freeList = SysLib.bytes2int(superBlock,8);\n\n //Check to see if we need to format the disk\n if(totalBlocks != diskSize && totalInodes < 1 && freeList < 2){\n totalBlocks = diskSize;\n format(64);\n }\n \n \n }", "private String createMcNo(String date) throws IOException {\n for (int i = 0; i < 10000; i++) {\n String mcNo = date + \"-\" + i;\n String filePathString = Paths.get(\"data\", String.format(\"MC%s.pdf\", mcNo)).toString();\n System.out.println(filePathString);\n File f = new File(filePathString);\n if (!f.exists()) {\n return mcNo;\n }\n }\n throw new IOException(\"Too many MCs today\");\n }", "public HWDiskStore(oshi.hardware.HWDiskStore diskStore) {\n this.diskStore = new oshi.hardware.HWDiskStore(diskStore);\n }", "public Maser(Sector sector, int direction){\n\t\tsuper(sector, direction);\n\t\tlabel = Configs.MSR;\n\t\tsectors = new ArrayList<Sector>();\n\t}", "public static TMaterial createEntity(EntityManager em) {\n TMaterial tMaterial = new TMaterial()\n .qty(DEFAULT_QTY)\n .hargaBeli(DEFAULT_HARGA_BELI)\n .hargaTotal(DEFAULT_HARGA_TOTAL)\n .inout(DEFAULT_INOUT);\n return tMaterial;\n }", "public export.serializers.avro.DeviceInfo.Builder clearSector() {\n sector = null;\n fieldSetFlags()[2] = false;\n return this;\n }", "public Directory() {\n files = new ArrayList<VipeFile>();\n sectors = new int[600];\n }", "public VolumeInfo getVolumeInformation(DiskDeviceContext ctx) {\n \n // Check if the context has volume information\n \n VolumeInfo volInfo = ctx.getVolumeInformation();\n \n if ( volInfo == null) {\n \n // Create volume information for the filesystem\n \n volInfo = new VolumeInfo(ctx.getDeviceName());\n \n // Add to the device context\n \n ctx.setVolumeInformation(volInfo);\n }\n\n // Check if the serial number is valid\n \n if ( volInfo.getSerialNumber() == 0) {\n \n // Generate a random serial number\n \n volInfo.setSerialNumber(new java.util.Random().nextInt()); \n }\n \n // Check if the creation date is valid\n \n if ( volInfo.hasCreationDateTime() == false) {\n \n // Set the creation date to now\n \n volInfo.setCreationDateTime(new java.util.Date());\n }\n \n // Return the volume information\n \n return volInfo;\n }", "@Nonnull\r\n @Override\r\n public FileSystem produce() throws IOException {\r\n return newInstance();\r\n }", "@Override\n\tpublic void startUp() {\n\t\tSystem.out.println(\"disk startup!\");\n\n\t}", "public DiskBackedProjectFilePartSet() {\r\n // make two files to use\r\n fileA = TempFileUtil.createTemporaryFile();\r\n fileB = TempFileUtil.createTemporaryFile();\r\n }", "private void createBuildVolume() {\n\n addVolume(shellScriptInfo.getBuild().getBuildDir());\n }", "public void superBlock() throws FileNotFoundException, IOException\n {\n \tByteBuffer buf = ByteBuffer.allocate(1024);\n \tbuf.order(ByteOrder.LITTLE_ENDIAN);\n \tbyte[] bytes = new byte[1024];\n f.seek(1024);\n \tf.read(bytes);\n \tbuf.put(bytes);\n\n \tmagicNum = buf.getShort(56);\n \ttotalInodes = buf.getInt(0);\n \ttotalBlocks = buf.getInt(4);\n \tblocksPerGroup = buf.getInt(32);\n \tinodesPerGroup = buf.getInt(40);\n \tsizeOfInode = buf.getInt(88);\n\n \tbyte[] stringLabel = new byte[16];\n \tbuf.position(120);\n buf.get(stringLabel);\n \tvolumeLabel = new String(stringLabel);\n\n System.out.println(\"Magic Number : \"+String.format(\"0x%04X\",magicNum));\n System.out.println(\"Total Inodes: \"+totalInodes);\n System.out.println(\"Total Blocks: \"+totalBlocks);\n System.out.println(\"Blocks per Group: \"+blocksPerGroup);\n System.out.println(\"Inodes per Group: \"+inodesPerGroup);\n System.out.println(\"Size Of each Inode in bytes: \"+sizeOfInode);\n System.out.println(\"Volume Label: \"+ volumeLabel+ \"\\n\");\n }", "public void createPartition(int nPid);", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "@Override\n\tpublic int create(Semester sem) {\n\t\treturn 0;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Material [kd=\" + kd + \", ks=\" + ks + \", kr=\" + kr + \", kt=\" + kt + \", nShininess=\" + nShininess + \"]\";\n\t}", "@SuppressWarnings(\"unused\")\n\tprivate FileChannel openDiskChannel() throws FileNotFoundException {\n\t\tRandomAccessFile f = new RandomAccessFile(this.underlined_device, \"rw\");\n\t\treturn f.getChannel();\n\t}", "public void create() {\n\t\t\n\t}", "private void addSystemDirFilesToImage() throws IOException {\n File sourceSystemDir = new File(builderContext.sourceTbOptionsDir, \"system.v2\");\n if (!isValidCSMSource(sourceSystemDir)) {\n // Fall back to the system default, ~/Amplio/ACM/system.v2\n sourceSystemDir = new File(AmplioHome.getAppSoftwareDir(), \"system.v2\");\n }\n\n File targetSystemDir = new File(imageDir, \"system\");\n\n // The csm_data.txt file. Control file for the TB.\n File csmData = new File(sourceSystemDir, \"csm_data.txt\");\n FileUtils.copyFileToDirectory(csmData, targetSystemDir);\n\n // Optionally, the source for csm_data.txt file. \n File controlDefFile = new File(sourceSystemDir, \"control_def.txt\");\n if (controlDefFile.exists()) {\n FileUtils.copyFileToDirectory(controlDefFile, targetSystemDir);\n }\n\n // If UF is hidden in the deployment, copy the appropriate 'uf.der' file to 'system/'\n if (deploymentInfo.isUfHidden()) {\n UfKeyHelper ufKeyHelper = new UfKeyHelper(builderContext.project);\n byte[] publicKey = ufKeyHelper.getPublicKeyFor(builderContext.deploymentNo);\n File derFile = new File(targetSystemDir, \"uf.der\");\n try (FileOutputStream fos = new FileOutputStream(derFile);\n DataOutputStream dos = new DataOutputStream(fos)){\n dos.write(publicKey);\n }\n }\n }", "public void setHardDisk(double systemHardDisk)\n\t{\n\t\thardDiskSize = systemHardDisk;\n\t}", "String getDiskFileName();", "public Material() {}", "static private void inputHardDiskSize(System_Y3872052 system) {\n\t\tdouble hdSize = Double.parseDouble(getInputData(\"Please provide the hard disk size, in GB\"));\n\t\tsystem.setHardDisk(hdSize);\n\t}", "private static void createFile() throws Exception {\n\t\t // retrieve an instance of H4File\n\t\t FileFormat fileFormat = FileFormat.getFileFormat(FileFormat.FILE_TYPE_HDF4);\n\n\t\t if (fileFormat == null) {\n\t\t System.err.println(\"Cannot find HDF4 FileFormat.\");\n\t\t return;\n\t\t }\n\n\t\t // create a new file with a given file name.\n\t\t @SuppressWarnings(\"deprecation\")\n\t\t\t\tH4File testFile = (H4File) fileFormat.create(fname);\n\n\t\t if (testFile == null) {\n\t\t System.err.println(\"Failed to create file:\" + fname);\n\t\t return;\n\t\t }\n\n\t\t // open the file and retrieve the root group\n\t\t testFile.open();\n\t\t Group root = (Group) ((javax.swing.tree.DefaultMutableTreeNode) testFile.getRootNode()).getUserObject();\n\n\t\t // set the data values\n\t\t int[] dataIn = new int[20 * 10];\n\t\t for (int i = 0; i < 20; i++) {\n\t\t for (int j = 0; j < 10; j++) {\n\t\t dataIn[i * 10 + j] = 1000 + i * 100 + j;\n\t\t }\n\t\t }\n\n\t\t // create 2D 32-bit (4 bytes) integer dataset of 20 by 10\n\t\t Datatype dtype = testFile.createDatatype(Datatype.CLASS_INTEGER, 4, Datatype.NATIVE, Datatype.NATIVE);\n\t\t @SuppressWarnings(\"unused\")\n\t\t\t\tDataset dataset = testFile\n\t\t .createScalarDS(\"2D 32-bit integer 20x10\", root, dtype, dims2D, null, null, 0, dataIn);\n\n\t\t // close file resource\n\t\t //testFile.close();\n\t\t }", "public static ItemStack createItemStack()\r\n \t{\r\n \t\treturn new ItemStack(0);\r\n \t}", "private KidDatabaseDisk(){\n //for use with loadFromFileUnsafe() builder\n super();\n sequenceLength.add(0);\n exceptionsArr = new ArrayList<HashMap<Integer,Character>>();\n exceptionsArr.add(new HashMap<Integer,Character>());\n }", "private static String addNull(String bitDisk) {\n\t\tbitDisk = \"0\" + bitDisk;\n\t\treturn bitDisk;\n\t}", "@Override\n \t\t\t\tpublic void doCreateProjectedWater() {\n \n \t\t\t\t}", "@Test\n public void testCompacityUsed() {\n System.out.println(\"compacityUsed\");\n RecordFile instance = new RecordFile();\n \n Assert.assertEquals(0, instance.compacityUsed());\n \n byte[] bytes = new byte[10];\n instance.insert(bytes, 0);\n Assert.assertEquals(1, instance.compacityUsed());\n \n bytes = new byte[12];\n instance.write(bytes, 0);\n Assert.assertEquals(1, instance.compacityUsed());\n \n bytes = new byte[100];\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n instance.insert(bytes, 0);\n Assert.assertEquals(10, instance.compacityUsed());\n \n bytes = new byte[100];\n instance.remove(0);\n Assert.assertEquals(9, instance.compacityUsed());\n \n bytes = new byte[100];\n instance.remove(0);\n Assert.assertEquals(8, instance.compacityUsed());\n }", "public void genaratePCB() {\n while (HDD > 0) {\n nJobs++;\n PCB k = new PCB(nJobs);\n k.setBasedOnSize(true);\n HDDQ.add(k);\n HDD -= k.getSize();\n sizeJ += k.getSize();\n }\n }", "@Test\n public void testAddPartitionMetaWithDryRun() throws IOException {\n // create commit instant\n Files.createFile(Paths.get(tablePath, \".hoodie\", \"100.commit\"));\n\n // create partition path\n String partition1 = Paths.get(tablePath, HoodieTestDataGenerator.DEFAULT_FIRST_PARTITION_PATH).toString();\n String partition2 = Paths.get(tablePath, HoodieTestDataGenerator.DEFAULT_SECOND_PARTITION_PATH).toString();\n String partition3 = Paths.get(tablePath, HoodieTestDataGenerator.DEFAULT_THIRD_PARTITION_PATH).toString();\n assertTrue(fs.mkdirs(new Path(partition1)));\n assertTrue(fs.mkdirs(new Path(partition2)));\n assertTrue(fs.mkdirs(new Path(partition3)));\n\n // default is dry run.\n CommandResult cr = shell().executeCommand(\"repair addpartitionmeta\");\n assertTrue(cr.isSuccess());\n\n // expected all 'No'.\n String[][] rows = FSUtils.getAllPartitionFoldersThreeLevelsDown(fs, tablePath)\n .stream()\n .map(partition -> new String[]{partition, \"No\", \"None\"})\n .toArray(String[][]::new);\n String expected = HoodiePrintHelper.print(new String[] {HoodieTableHeaderFields.HEADER_PARTITION_PATH,\n HoodieTableHeaderFields.HEADER_METADATA_PRESENT, HoodieTableHeaderFields.HEADER_ACTION}, rows);\n expected = removeNonWordAndStripSpace(expected);\n String got = removeNonWordAndStripSpace(cr.getResult().toString());\n assertEquals(expected, got);\n }", "interface WithDiskSizeGB {\n /**\n * Specifies the diskSizeGB property: If creationData.createOption is Empty, this field is mandatory and it\n * indicates the size of the disk to create. If this field is present for updates or creation with other\n * options, it indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and\n * can only increase the disk's size..\n *\n * @param diskSizeGB If creationData.createOption is Empty, this field is mandatory and it indicates the\n * size of the disk to create. If this field is present for updates or creation with other options, it\n * indicates a resize. Resizes are only allowed if the disk is not attached to a running VM, and can\n * only increase the disk's size.\n * @return the next definition stage.\n */\n Update withDiskSizeGB(Integer diskSizeGB);\n }", "private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }", "public abstract Parts getRAM();", "public void generateWithoutSpaceCharge() throws ModelException {\n\n\t // Initialize Probe\n this.mdlTmapProbe.reset(); \n\n // Load the probe, synchronize the model, and run \n this.mdlBeamline.setProbe(this.mdlTmapProbe);\n this.mdlBeamline.resyncFromCache();\n this.mdlBeamline.run();\n \n // Save the trajectory\n this.mdlTrjMap = this.mdlBeamline.getTrajectory();\n this.bolScheff = false;\n\t}", "public static void main(String args[])\r\n\t{\r\n\t\t//Creating actual blocks\r\n\t\tfileSystem = new FileSystem[FileSystem.TOTAL_BLOCKS];\r\n\t\tfor (int loop = 0; loop < FileSystem.TOTAL_BLOCKS; loop++)\r\n\t\t{\r\n\t\t\tfileSystem[loop] = new FileSystem();\r\n\t\t}\r\n fileSystem[0].setBlockUsageType(FileSystem.blockUsage.DIRECTORY);\r\n\t\tString userInput;\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tdo\r\n\t\t{\r\n\t\t\tfileSystem[0].getDirectoryStructure().setFree(getFirstFreeBlock());\r\n\t\t\tSystem.out.println(\"\\nEnter the command (help for Help | print to print Block statistics | exit to Exit):\");\r\n\t\t\tuserInput = scanner.nextLine();\r\n\t\t\t// System.out.println(\"User input: \" + userInput);\r\n\t\t\t// validate user input\r\n\t\t\tString operation = userInput.split(\" \")[0];\r\n\t\t\tif (operation == null)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Invalid UserInput \" + userInput);\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tswitch(operation.toLowerCase())\r\n\t\t\t{\r\n\t\t\t\tcase \"create\":\r\n\t\t\t\t\tif (!operationCreate(userInput))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for create: \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"delete\":\r\n\t\t\t\t\tif (!operationDelete(userInput))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for delete: \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"open\":\r\n\t\t\t\t\tif(!operationOpen(userInput))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for open: \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"read\":\r\n\t\t\t\t\tif (openFileBlockNumber == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Please open the file before reading\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (openFileMode != FileSystem.fileOpenMode.INPUT && openFileMode != FileSystem.fileOpenMode.UPDATE)\r\n\t\t\t\t\t{\r\n System.out.println(\"Please open the file in INPUT or UPDATE mode for reading\");\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (!operationRead(userInput))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for read \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"write\":\r\n\t\t\t\t\tif (openFileBlockNumber == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Please open the file before writing\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (openFileMode != FileSystem.fileOpenMode.OUTPUT && openFileMode != FileSystem.fileOpenMode.UPDATE)\r\n\t\t\t\t\t{\r\n System.out.println(\"Please open the file in OUTPUT or UPDATE mode for writing\");\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (!operationWrite(userInput))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for write \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"seek\":\r\n\t\t\t\t\tif (openFileBlockNumber == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Please open the file before seeking\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (openFileMode != FileSystem.fileOpenMode.INPUT && openFileMode != FileSystem.fileOpenMode.UPDATE)\r\n\t\t\t\t\t{\r\n System.out.println(\"Please open the file in INPUT or UPDATE mode for seeking\");\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (!operationSeek(userInput))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for write \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"close\":\r\n\t\t\t\t\tif (openFileBlockNumber == -1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Please create/open the file before closing\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (userInput.equalsIgnoreCase(\"close\"))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\topenFileBlockNumber = -1;\r\n\t\t\t\t\t\topenFileMode = FileSystem.fileOpenMode.INVALID;\r\n\t\t\t\t\t\topenFileSeekPosition = -1;\r\n\t\t\t\t\t\topenFilesDirectory = -1;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Invalid input for close \" + userInput);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"exit\":\r\n\t\t\t\t\tSystem.out.println(\"Exiting the program\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"print\":\r\n\t\t\t\t\tSystem.out.println(\"<------------------- Printing Statistics ------------------->\");\r\n\t\t\t\t\tprintBlocksStatistics();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase \"help\":\r\n\t\t\t\t\tprintHelp();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Invalid input: \" + userInput);\r\n\t\t\t}\r\n\t\t}while(!userInput.equalsIgnoreCase(\"exit\"));\r\n\t\tscanner.close();\r\n\t}", "public static void main(String[] args) {\n \tComputer myPC = new Computer();\r\n\r\n \t// Add a hard disk \r\n \tComponent hdd1 = new HardDisk(1000, 3, \"Seagate\", 790.50);\r\n \tmyPC.addComponent(\"hard disk 1\", hdd1);\r\n\r\n \t// Add a second hard disk\r\n \tComponent hdd2 = new HardDisk(1500, 2, \"Seagate\", 640.69);\r\n \tmyPC.addComponent(\"hard disk 2\", hdd2);\r\n }", "public IndexedFile(Disk disk, int recordSize, int keySize,\n\t\t\tint firstAllocated, int indexStart, int indexSectors,\n\t\t\tint indexRoot, int indexLevels) {\n\t\tthis.disk = disk;\n\t\tthis.indexRoot = indexRoot;\n\t\tthis.indexStart = indexStart;\n\t\tthis.overflowStart = indexRoot + 1;\n\t\tthis.overflowSectors = 0;\n\t}", "@Override\n public void createPartition(Partition partition) {\n \n }", "@Override\n public StorageOutputStream create(File file) throws IOException {\n\treturn null;\n }", "private void m14053d() {\n try {\n File file = new File(f18051l);\n File file2 = new File(f18052m);\n if (!file.exists()) {\n file.mkdirs();\n }\n if (!file2.exists()) {\n file2.createNewFile();\n }\n if (file2.exists()) {\n SQLiteDatabase openOrCreateDatabase = SQLiteDatabase.openOrCreateDatabase(file2, null);\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS bdcltb09(id CHAR(40) PRIMARY KEY,time DOUBLE,tag DOUBLE, type DOUBLE , ac INT);\");\n openOrCreateDatabase.execSQL(\"CREATE TABLE IF NOT EXISTS wof(id CHAR(15) PRIMARY KEY,mktime DOUBLE,time DOUBLE, ac INT, bc INT, cc INT);\");\n openOrCreateDatabase.setVersion(1);\n openOrCreateDatabase.close();\n }\n this.f18053a = true;\n } catch (Exception e) {\n }\n }", "public ServiceRecordDisk(final ServiceRecordDisk o)\r\n { \r\n this.records = o.records;\r\n this.recordsByMemberNum = o.recordsByMemberNum;\r\n this.recordsByProviderNum = o.recordsByProviderNum;\r\n }", "public void mkdir(String path) throws SystemException;", "private String createFileName(){\n \t\n \tString state = Environment.getExternalStorageState();\n \tif(state.equals(Environment.MEDIA_MOUNTED)){ \t\t\n \t\tFile folder = new File(Environment.getExternalStorageDirectory() + \"/ArtCameraPro\");\n \t\tboolean success = true;\n \t\tif (!folder.exists()) {\n \t\t success = folder.mkdir();\n \t\t} \n \t\tString sFileName = Environment.getExternalStorageDirectory() + \"/ArtCameraPro\" + File.separator + System.currentTimeMillis() + \".jpg\";\n \t\treturn sFileName;\n \t\t\n \t}\n \treturn \"\";\n }", "public Material(double _kD, double _kS, int _nShininess) {\n this._kD = _kD;\n this._kS = _kS;\n this._nShininess = _nShininess;\n }", "public Superblock(int diskSize) {\n this.init(diskSize);\n }", "private void initSystemPartition() throws Exception {\n // change the working directory to something that is unique\n // on the system and somewhere either under target directory\n // or somewhere in a temp area of the machine.\n\n // Inject the System Partition\n Partition systemPartition = factory.createPartition(service.getSchemaManager(),\n service.getDnFactory(),\n \"system\", ServerDNConstants.SYSTEM_DN, 500,\n new File(service.getInstanceLayout().getPartitionsDirectory(), \"system\"));\n systemPartition.setSchemaManager(service.getSchemaManager());\n\n factory.addIndex(systemPartition, SchemaConstants.OBJECT_CLASS_AT, 100);\n\n service.setSystemPartition(systemPartition);\n }", "@Produces\n\tpublic Path produceFile() throws IOException{\n\t\tlogger.info(\"The path (generated by PathProducer) will be injected here - # Path : \"+path);\n\t\tif(Files.notExists(path)){\n\t\t\tFiles.createDirectory(path);\n\t\t\tlogger.info(\" Directory Created :: \" +path);\n\t\t}\n\t\t/*\n\t\t * currentTimeMillis will be injected by NumberPrefixProducer and has a seperate qualifier\n\t\t */\n\t\tPath file = path.resolve(\"myFile_\" + currentTimeMillis + \".txt\");\n\t\tlogger.info(\"FileName : \"+file);\n\t\tif(Files.notExists(file)){\n\t\t\tFiles.createFile(file);\n\t\t}\n\t\tlogger.info(\" File Created :: \" +file);\n\t\treturn file;\n\t}" ]
[ "0.61397094", "0.5998623", "0.5983162", "0.57539666", "0.5750802", "0.5513415", "0.54283464", "0.5422495", "0.5408602", "0.5337485", "0.5330776", "0.53133655", "0.5297355", "0.52669907", "0.52639765", "0.52135414", "0.519362", "0.5188232", "0.5182378", "0.51565593", "0.5155907", "0.51534647", "0.51371545", "0.5136565", "0.5133928", "0.5122829", "0.51107675", "0.5106569", "0.50725365", "0.50328135", "0.50249606", "0.50248516", "0.5015952", "0.5001411", "0.4978438", "0.49553862", "0.495212", "0.49409103", "0.49340615", "0.49113673", "0.48914295", "0.4879619", "0.48753163", "0.4874371", "0.48666766", "0.48661268", "0.4860617", "0.48179296", "0.48135075", "0.47761348", "0.47739655", "0.47479105", "0.4743735", "0.47409368", "0.47197682", "0.4715013", "0.47027183", "0.46975997", "0.46947312", "0.4687538", "0.4682271", "0.46668366", "0.46606573", "0.46604106", "0.46560517", "0.46541232", "0.46458036", "0.4643281", "0.46401268", "0.46336257", "0.46273848", "0.46236137", "0.4604584", "0.45963728", "0.4593123", "0.4589881", "0.4588179", "0.45880574", "0.4587702", "0.45865402", "0.45830882", "0.45819548", "0.4580925", "0.45803457", "0.4580049", "0.45791027", "0.45759442", "0.45757914", "0.45747107", "0.4568135", "0.4561596", "0.45588678", "0.4558545", "0.45576045", "0.45568547", "0.4553896", "0.45519507", "0.45476776", "0.45432076", "0.45424685" ]
0.60108584
1
Create negative disks material
public void createNegativeDisk(int diskID, float posX, float posY, float speedX, float speedY){ Material negDiskMat = new Material(sapp.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md"); negDiskMat.setColor("Color", ColorRGBA.Red); Vector3f tempVector = new Vector3f(speedX, speedY, 0); NegativeDisk nDisk = new NegativeDisk(diskID, tempVector, posX, posY, NEGDISK_R, negDiskMat, sapp); diskList.add(nDisk); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createMaterial(Material material) throws CreateException;", "public static ItemStack createItemStack()\r\n \t{\r\n \t\treturn new ItemStack(0);\r\n \t}", "public ItemStack generateItem(){\n\t\tItemStack item = new ItemStack(material);\n\t\tif(damage >= 0) item.setDurability(damage);\n\t\t\n\t\tif(itemName.isEmpty() && loreLine.isEmpty()) return item;\n\t\t\n\t\tItemMeta meta = item.getItemMeta();\n\t\tif(meta == null) return item;\n\t\t\n\t\tmeta.setDisplayName(itemName);\n\t\tmeta.setLore(Arrays.asList(loreLine));\n\t\titem.setItemMeta(meta);\n\t\t\n\t\treturn item;\n\t}", "public void createPositiveDisk(int diskID, float posX, float posY, float speedX, float speedY){\n Material posDiskMat = new Material(sapp.getAssetManager(),\n \"Common/MatDefs/Misc/Unshaded.j3md\");\n posDiskMat.setColor(\"Color\", ColorRGBA.Green);\n \n Vector3f tempVector = new Vector3f(speedX, speedY, 0);\n PositiveDisk pDisk = new PositiveDisk(diskID, tempVector, posX, posY, POSDISK_R, posDiskMat, sapp);\n diskList.add(pDisk);\n \n }", "public void generateWithoutSpaceCharge() throws ModelException {\n\n\t // Initialize Probe\n this.mdlTmapProbe.reset(); \n\n // Load the probe, synchronize the model, and run \n this.mdlBeamline.setProbe(this.mdlTmapProbe);\n this.mdlBeamline.resyncFromCache();\n this.mdlBeamline.run();\n \n // Save the trajectory\n this.mdlTrjMap = this.mdlBeamline.getTrajectory();\n this.bolScheff = false;\n\t}", "public static BufferedImage negative(BufferedImage image) {\n //3-position array where we store R,G,B values of every pixel\n int[] colors;\n //3-position array where we will store the new negative R,B,G values \n int[] negat = new int[3];\n //Create a tessela form the original image so we can modify its pixels\n WritableRaster bitmap = (WritableRaster) image.getData();\n WritableRaster tesela = bitmap.createWritableChild(image.getMinX(), image.getMinY(), image.getWidth(), image.getHeight(), 0,0, null);\n //Image iteration\n for (int x = 0; x < image.getWidth(); x++){\n for (int y = 0; y < image.getHeight(); y++) {\n colors = getPixelColor(image,x,y);\n for (int i = 0; i < 3; i++) {\n //Negative filter means doing 1 - original pixel\n if(colors[i] == 0){\n negat[i] = -1;\n }else{\n negat[i] = 1-colors[i];\n }\n }\n bitmap.setPixel(x,y,negat);\n }\n }\n //Create the negative image and return it\n BufferedImage subImage = new BufferedImage(image.getColorModel(),tesela,image.isAlphaPremultiplied(),null);\n return subImage;\n }", "Minus createMinus();", "Minus createMinus();", "Minus createMinus();", "public SVCustom build(){\n if(this.disks < 1) return new SVCustom();\n SVCustom s = new SVCustom(new Point(100, (int)Math.pow(2, this.disks)*104 - 52));\n int left[] = new int[]{0,1};\n int right[] = new int[]{1,2};\n int bottom[] = new int[]{0,2};\n SierpinskiTriangle t = new SierpinskiTriangle(0,this.disks,this.disks-1, left, right, bottom, buildInitial(this.disks));\n s.setAttribute(\"font-family\", \"Arial\");\n s.addContent(t, \"Triangle\");\n return s;\n }", "public void create_crystal() {\n\t\tcrystalQuantity[1] += (1+create_modifier);\n\t\tautomerge();\n\t\tcollection();\n\t}", "Stone create();", "@Override\n public Builder negativeSample(double negative) {\n super.negativeSample(negative);\n return this;\n }", "public static void create(Disks disk){\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tHibernateUtilMastere.getSession().save(disk);\r\n\t\t\tHibernateUtilMastere.getSession().getTransaction().commit();\r\n\t\t} catch(HibernateException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t}", "public Material create();", "ItemStack make();", "@Override\n public void setNormal()\n {\n setImage(\"Minus.png\");\n }", "public static void main(String[] args) throws SubDesbordamientoMateriales{\n\tSystem.out.println(\"B I E N V E N I D O\\n\"+\r\n\t\t\t\"----BIG SHIP----- \");\t\r\n\t//herramientas\r\n\tboolean Mesa=false;\r\n\tboolean Barco=false;\r\n\tboolean Baston=false;\r\n\tboolean Cana_p=false;\r\n\tboolean Cuerda=false;\r\n\t//crear una variable aleatoria para definir los materiales\r\n\tint tipAl=0;//Tipo Aleatorio\r\n\tint al=0;//aleatorio\r\n\t// SE CREAN LAS CLASES GENERICAS PARA CADA MATERIAL\r\n\t//se crea la clase generica HILO\r\n\t PilaMaterial<Integer> PH = new PilaMaterial<>(4);//numero max que puede llegar a tener\r\n\t//se crea la clase generica RESINA\r\n\t PilaMaterial<Integer> PR = new PilaMaterial<>(1);//numero max que puede llegar a tener\r\n\t //se crea la clase generica MADERA\r\n\t PilaMaterial<Integer> PM = new PilaMaterial<>(5);//numero max que puede llegar a tener\r\n\t\r\n\t //primero crear un arreglo para que se guarden todos los materiales para despues utilizarlos\r\n\t //----> Vector auxiliar----> Quitar int mat[]=new int[30];\r\n\t //Crear una variable para guardar el tipo de material que se ira modificando \r\n\t int VarTM=0;\r\n\tboolean ResinaC=false;\r\n\t//--------------Empieza el juego-----------------\r\n\tfor(int x=0;x<30;x++) {\r\n\t\t//Definir el tipo de material\r\n\t\tVarTM=(int)(Math.random()*(2-(-1)));\r\n\t\t//se define lo que se va apilar (Numero aleatorio)\r\n\t\tal=(int)(Math.random()*(10-1));\r\n\t\t//MADERA\r\n\t\tif(VarTM==0) { \r\n\t\t\t try {\r\n\t\t\t\t PM.apilar(al);\r\n\t\t\t\t // System.out.println(\"M\");//Conteo de las Maderas\r\n\t\t\t\t if((PM.cantidad()==4)&(Mesa==false)) { \r\n\t\t\t\t\t Mesa=true;\r\n\t\t\t\t\t System.out.println(\"Mesa adquirida\");\r\n\t\t\t\t\t //vaciar la pila\r\n\t\t\t\t\t PM.vaciarComple(); \r\n\t\t\t\t }if((PM.cantidad()==2)&(Baston==false)&(Mesa)) {\r\n\t\t\t\t\t Baston=true;\r\n\t\t\t\t\t System.out.println(\"Baston adquirido\");\r\n\t\t\t\t\t//vaciar la pila\r\n\t\t\t\t\t PM.vaciarComple(); \r\n\t\t\t\t }\r\n\t\t\t }catch(DesbordamientoMateriales E) {\r\n\t\t\t\t System.out.println(E.getMessage()+\" Madera esta completa\");\r\n\t\t\t\t if((Barco==false)&(Mesa)&(Baston)&(Cuerda)&(Cana_p)) {\r\n\t\t\t\t\t Barco=true;\r\n\t\t\t\t\t System.out.println(\"Barco adquirido!!\\n--- B I G S H I P :) ---\");\r\n\t\t\t\t\t //Vaciar la pila\r\n\t\t\t\t\t PM.vaciarComple();\r\n\t\t\t\t\t //impresion de vector con materiales\r\n\t\t\t\t\t //System.out.println(\" MATERIALES EN EL MAPA:\");\r\n\t\t\t\t\t // PilaMaterial.impVectorM(mat);\r\n\t\t\t\t\t //Termina el programa con gane\r\n\t\t\t\t\t System.exit(0);\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t\t //RESINA\r\n\t\t}if(VarTM==1) {\r\n\t\t\t try {\r\n\t\t\t PR.apilar(al);\r\n\t\t }catch(DesbordamientoMateriales E) {\r\n\t\t\t System.out.println(E.getMessage()+\" Resina esta Completa :v\");\r\n\t\t\t //condicion aquí\r\n\t\t if(ResinaC==false) {\r\n\t\t\t ResinaC=true;\r\n\t\t\t //Vaciar pila de Resina\r\n\t\t\t PR.vaciarComple();\r\n\t\t\t }\r\n\t\t\t } \r\n\t\t }//HILO\r\n\t\t if(VarTM==2){\r\n\t\t\t try {\r\n\t\t\t PH.apilar(al);\r\n\t\t }catch(DesbordamientoMateriales E) {\r\n\t\t\t System.out.println(E.getMessage()+\" Hilo esta completa \");\r\n\t\t\t if((Cuerda==false)&(Mesa)&(ResinaC)&(Baston)) { //solo que aquí no evaluamos la cantidad que hay en la pila ya que esta desbordada\r\n\t\t\t\t Cuerda=true;\r\n\t\t\t\t System.out.println(\"Cuerda adquirida\");\r\n\t\t\t\t //vaciar la Pila de Hilo\r\n\t\t\t\t PH.vaciarComple();\r\n\t\t\t }\r\n\t\t\t\t //inmediatamente comparar si se cumple lo necesario para la caña\r\n\t\t\t if((Cana_p==false)&(Mesa)&(Baston)&(Cuerda)) {\r\n\t\t \t Cana_p=true;\r\n\t\t \t System.out.println(\"Cana de Pescar Adquirida\");\r\n\t\t\t }\r\n\t\t }\r\n\t\t } \r\n\t }\r\n\t//imprimir el vector para ver los materiales en el mapa\r\n\t//System.out.println(\" MATERIALES EN EL MAPA:\");\r\n //PilaMaterial.impVectorM(mat);\r\n\t}", "public final void negate() {\n \n \tthis.m00 = -this.m00;\n \tthis.m01 = -this.m01;\n \tthis.m02 = -this.m02;\n this.m10 = -this.m10;\n this.m11 = -this.m11;\n this.m12 = -this.m12;\n this.m20 = -this.m20;\n this.m21 = -this.m21;\n this.m22 = -this.m22;\n }", "private void generateGhost() {\r\n\t\ttry {\r\n\t\t\tghost = (FallingPiece)falling.clone();\r\n\t\t} catch (CloneNotSupportedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\twhile(moveIfNoConflict(ghost.moveDown(), ghost));\t\t\r\n\t\tfor (BlockDrawable block : ghost.allBlocks())\r\n\t\t\tblock.setGhost(true);\r\n\t}", "SomeMinus createSomeMinus();", "public Vector3D negate() {\n return scale(-1);\n }", "public static void renderFaceZNeg(RenderBlocks renderBlocks, int slope, double x, double y, double z, Icon icon)\r\n\t{\r\n\t\tdouble uMin = icon.getInterpolatedU(renderBlocks.renderMinX * 16.0D);\r\n\t\tdouble uMax = icon.getInterpolatedU(renderBlocks.renderMaxX * 16.0D);\r\n\t\tdouble vMax = icon.getInterpolatedV(16.0D - renderBlocks.renderMaxY * 16.0D);\r\n\t\tdouble vMin = icon.getInterpolatedV(16.0D - renderBlocks.renderMinY * 16.0D);\r\n\r\n double xMin = x + renderBlocks.renderMinX;\r\n double xMax = x + renderBlocks.renderMaxX;\r\n double yMin = y + renderBlocks.renderMinY;\r\n double yMax = y + renderBlocks.renderMaxY;\r\n double zMin = z + renderBlocks.renderMinZ;\r\n double zMax = z + renderBlocks.renderMaxZ;\r\n\t\t\r\n\t\tswitch (slope) {\r\n\t\t\tcase Slope.EXT_NEG_OBL_SW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_NEG_OBL_NW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_NEG_OBL_SE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_NEG_OBL_NE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_NW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_SW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_POS_OBL_NE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_POS_OBL_SE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMax, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMax, vMin, 3);\r\n\t\t}\r\n\t}", "static void print_disk(int size){\n for(int i = 0; i < 5-size; i++)\n System.out.print(\" \");\n for(int i = 0; i < size; i++){\n if(i == size/2 && size%2 == 0)\n System.out.print(\"||--\");\n else if(i == size/2 && size%2 == 1)\n System.out.print(\"-||-\");\n else\n System.out.print(\"--\");\n }\n for(int i = 0; i < 5-size; i++)\n System.out.print(\" \");\n System.out.print(\"\\t\");\n }", "public ADisk(boolean format)\n { \n\t // build lock\n\t this.setFailureProb(0);\n ADisk_lock = new SimpleLock();\n waitLock = new SimpleLock();\n atranslist = new ActiveTransactionList();\n //initialize lists and logs\n wblist = new WriteBackList(this);\n commitDone = waitLock.newCondition();\n writebackDone = waitLock.newCondition();\n readDone = waitLock.newCondition();\n logReadDone = waitLock.newCondition();\n wbbarrier = waitLock.newCondition();\n commitBarrierSector = -1;\n commitBarrierTid = -1;\n writebackBarrierSector = -1;\n writebackBarrierTid = -1;\n readSector = -1;\n readTid = -1;\n logReadSector = -1;\n logReadTid = -1;\n wbbarrierSec = -1;\n wbbarrierTag = -1;\n \n\t d = null;\n\t try{\n\t d = new Disk(this);\n\t }\n\t catch(FileNotFoundException fnf){\n\t System.out.println(\"Unable to open disk file\");\n\t System.exit(-1);\n\t }\n\t \n\t //create writeback thread\n\t writebackthread = new WriteBackThread();\n try {\n\t if (format == true){\n\t \t lstatus = new LogStatus(this, false);\n\t \t \n\t \t ///wipe the disk\n\t \t /*byte[] blank = new byte[Disk.SECTOR_SIZE];\n\t \t for(int i = 0; i < Disk.SECTOR_SIZE; i++)\n\t \t \tblank[i] = 0x00;\n\t \t for(int i = 0; i < this.getNSectors(); i++){\n\t \t \tif(i == this.getNSectors() - 1){\n\t \t \t\tthis.commitBarrierSector = i;\n\t \t \t\tthis.commitBarrierTid = Disk.SECTOR_SIZE + 10;\n\t \t \t\td.addBarrier(); // must wait for the entire wipe write to be on disk\n\t \t \t}\n\t \t \td.startRequest(Disk.WRITE, Disk.SECTOR_SIZE+10, i, blank);\n\t \t }\n \t \tcommitWait();*/\n\t \t // We decided not to wipe the disk because the instructions were vague and it seems insanely inefficient to wipe the disk and there doesnt seem to be reason to wipe it. It also makes our tests run very slow. \n\t } \n\t else {\n\t \t //RECOVERY\n\t \t lstatus = new LogStatus(this, true);\n\t \t byte[] next = lstatus.recoverNext();\n\t while(next != null){\n\t \t Transaction temp = Transaction.parseLogBytesDebug(next, this);\n\t \t wblist.addCommitted(temp);\t \n\t \t next = lstatus.recoverNext();\n\t } \n\t }\n }\n catch(IOException e){\n\t\t\tSystem.out.println(\"IO exception\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n }\n catch(IllegalArgumentException e){\n\t\t\tSystem.out.println(\"Illegal Argument exception\");\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-1);\n }\n \n }", "public TowersOfHanoi(int noDisks){\n\n this.noDisks = noDisks;\n\n\n }", "@Test\r\n\tpublic void testCapacityZero(){\r\n\t\tString expectedResult = \"-\";\r\n\t\tString itemsResults = Packer.pack(\"./src/test/resources/capacityZero.txt\");\r\n\t\tassertEquals(expectedResult, itemsResults);\r\n\t\tSystem.out.println(\"Test passed. CapacityZero.\");\r\n\t}", "WithPartitionsAndCreate withStandardSku();", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix subtract (org.apache.spark.mllib.linalg.distributed.BlockMatrix other) { throw new RuntimeException(); }", "public Material() {}", "@Override\n\tpublic int volumeMenos() {\n\t\treturn 0;\n\t}", "private static void addFakeItemDataToInWorldBlocksAndCleanUpFakeData() {\n\n Map<String, Materials> MATERIALS_MAP = null;\n\n try {\n Field f = Materials.class.getDeclaredField(\"MATERIALS_MAP\");\n f.setAccessible(true);\n MATERIALS_MAP = (Map<String, Materials>) f.get(null);\n } catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) {\n e.printStackTrace();\n }\n\n if (MATERIALS_MAP == null)\n throw new NullPointerException(\"MATERIALS_MAP null!\");\n\n Materials oreMat = new Materials(-1, null, 0, 0, 0, false, \"bwores\", \"bwores\", null, true, null);\n Materials smallOreMat = new Materials(-1, null, 0, 0, 0, false, \"bwsmallores\", \"bwsmallores\", null, true, null);\n Materials blockMat = new Materials(-1, null, 0, 0, 0, false, \"bwblocks\", \"bwblocks\", null, true, null);\n\n for (int i = 0; i < 16; i++) {\n GT_OreDictUnificator.addAssociation(ore, oreMat, new ItemStack(BWOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(oreSmall, smallOreMat, new ItemStack(BWSmallOres, 1, i), true);\n GT_OreDictUnificator.addAssociation(block, blockMat, new ItemStack(BWBlocks, 1, i), true);\n }\n\n MATERIALS_MAP.remove(\"bwores\");\n MATERIALS_MAP.remove(\"bwsmallores\");\n MATERIALS_MAP.remove(\"bwblocks\");\n }", "public ItemSwordAndShield(Item.ToolMaterial mat)\n/* 21: */ {\n/* 22:20 */ super(mat, \"\");\n/* 23:21 */ if (mat == Item.ToolMaterial.IRON) {\n/* 24:22 */ this.isIron = true;\n/* 25: */ } else {\n/* 26:24 */ this.isIron = false;\n/* 27: */ }\n/* 28: */ }", "public void diffuse() {\r\n\t\tdouble[][][] before = quantity;\r\n\t\t/* Index of the box in positive (negative) .. direction, taking account of the boundary conditions */\r\n\t\tint xAbove, xBelow, yAbove, yBelow, zAbove, zBelow;\r\n\t\t/* Quantity of chemical leaving the box in the positive (negative) .. direction */\r\n\t\tdouble qxAbove, qxBelow, qyAbove, qyBelow, qzAbove, qzBelow;\r\n\t\t/* Flags for leakiness at borders */\r\n\t\tboolean leaky[] = sim.getLeaky();\r\n\t\tdouble leakyRate[] = sim.getLeakyRate();\r\n\t\t/*\r\n\t\t * Flux of molecules crossing in the positive x-direction (Fick's law)\r\n\t\t * \tJ = -D(dC/dx) = -D*(C(x+dx)-C(x))/dx = -D*(N(x+dx)-N(x))/((dx)^2*dy*dz) molecules/(micron)^2/sec\r\n\t\t * Number of molecules transferred in the positive x-direction over dt\r\n\t\t * \txAbove = J*(dy*dz)*dt = -((D*dt)/(dx)^2)*(N(x+dx)-N(x)) = -kX*(N(x+dx)-N(x))\r\n\t\t * where kX = (D*dt)/(dx)^2 is a dimensionless constant\r\n\t\t */\r\n\t\tdouble normX = sim.getDt()/Math.pow(box[0],2);\r\n\t\tdouble normY = sim.getDt()/Math.pow(box[1],2);\r\n\t\tdouble normZ = sim.getDt()/Math.pow(box[2],2);\r\n\t\tdouble kX = diffusivity*normX;\r\n\t\tdouble kY = diffusivity*normY;\r\n\t\tdouble kZ = diffusivity*normZ;\r\n\t\tfor(int i=0;i<boxes[0];i++)\r\n\t\t\tfor(int j=0;j<boxes[1];j++)\r\n\t\t\t\tfor(int k=0;k<boxes[2];k++) {\t\r\n\t\t\t\t\t/* Is this box the last box? \r\n\t\t\t\t\t * \tIf so, is the boundary solid? If so, there is no box above, else, the box 'above' is the first box\r\n\t\t\t\t\t * \tElse, the box above is the next box */\r\n\t\t\t\t\txAbove = (i == boxes[0]-1 ? (sim.getSolid()[0] ? -1 : 0) : i+1);\r\n\t\t\t\t\txBelow = (i == 0 ? (sim.getSolid()[0] ? -1 : boxes[0]-1) : i-1);\r\n\t\t\t\t\tyAbove = (j == boxes[1]-1 ? (sim.getSolid()[1] ? -1 : 0) : j+1);\r\n\t\t\t\t\tyBelow = (j == 0 ? (sim.getSolid()[1] ? -1 : boxes[1]-1) : j-1);\r\n\t\t\t\t\tzAbove = (k == boxes[2]-1 ? (sim.getSolid()[2] ? -1 : 0) : k+1);\r\n\t\t\t\t\tzBelow = (k == 0 ? (sim.getSolid()[2] ? -1 : boxes[2]-1) : k-1);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(xAbove != -1) {\r\n\t\t\t\t\t\t/* Calculate the quantity of chemical leaving the box in this direction */\r\n\t\t\t\t\t\tqxAbove = -kX*(before[xAbove][j][k]-before[i][j][k]);\r\n\t\t\t\t\t\t/* Add that quantity to the box above */ \r\n\t\t\t\t\t\tquantity[xAbove][j][k] += qxAbove;\r\n\t\t\t\t\t\t/* Remove it from this box */\r\n\t\t\t\t\t\tquantity[i][j][k] -= qxAbove;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (leaky[0]) {\r\n\t\t\t\t\t\t\t/* Calculate the quantity of chemical leaving the box in this direction (0 outside box if leaky)*/\r\n\t\t\t\t\t\t\tqxAbove = normX*leakyRate[0]*before[i][j][k];\r\n\t\t\t\t\t\t\t/* Remove it from this box */\r\n\t\t\t\t\t\t\tquantity[i][j][k] -= qxAbove;\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\tif(xBelow != -1) {\r\n\t\t\t\t\t\tqxBelow = -kX*(before[xBelow][j][k]-before[i][j][k]);\r\n\t\t\t\t\t\tquantity[xBelow][j][k] += qxBelow;\r\n\t\t\t\t\t\tquantity[i][j][k] -= qxBelow;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (leaky[1]) {\r\n\t\t\t\t\t\t\tqxBelow = normX*leakyRate[1]*before[i][j][k];\r\n\t\t\t\t\t\t\tquantity[i][j][k] -= qxBelow;\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\tif(yAbove != -1) {\r\n\t\t\t\t\t\tqyAbove = -kY*(before[i][yAbove][k]-before[i][j][k]);\r\n\t\t\t\t\t\tquantity[i][yAbove][k] += qyAbove;\r\n\t\t\t\t\t\tquantity[i][j][k] -= qyAbove;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (leaky[2]) {\r\n\t\t\t\t\t\t\tqyAbove = normY*leakyRate[2]*before[i][j][k];\r\n\t\t\t\t\t\t\tquantity[i][j][k] -= qyAbove;\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\tif(yBelow != -1) {\r\n\t\t\t\t\t\tqyBelow = -kY*(before[i][yBelow][k]-before[i][j][k]);\r\n\t\t\t\t\t\tquantity[i][yBelow][k] += qyBelow;\r\n\t\t\t\t\t\tquantity[i][j][k] -= qyBelow;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (leaky[3]) {\r\n\t\t\t\t\t\t\tqyBelow = normY*leakyRate[3]*before[i][j][k];\r\n\t\t\t\t\t\t\tquantity[i][j][k] -= qyBelow;\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\tif(zAbove != -1) {\r\n\t\t\t\t\t\tqzAbove = -kZ*(before[i][j][zAbove]-before[i][j][k]);\r\n\t\t\t\t\t\tquantity[i][j][zAbove] += qzAbove;\r\n\t\t\t\t\t\tquantity[i][j][k] -= qzAbove;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (leaky[4]) {\r\n\t\t\t\t\t\t\tqzAbove = normZ*leakyRate[4]*before[i][j][k];\r\n\t\t\t\t\t\t\tquantity[i][j][k] -= qzAbove;\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\tif(zBelow != -1) {\r\n\t\t\t\t\t\tqzBelow = -kZ*(before[i][j][zBelow]-before[i][j][k]);\r\n\t\t\t\t\t\tquantity[i][j][zBelow] += qzBelow;\r\n\t\t\t\t\t\tquantity[i][j][k] -= qzBelow;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tif (leaky[3]) {\r\n\t\t\t\t\t\t\tqzBelow = normZ*leakyRate[5]*before[i][j][k];\r\n\t\t\t\t\t\t\tquantity[i][j][k] -= qzBelow;\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}\r\n\t}", "public abstract boolean dropMaterial(ShortPoint2D pos, EMaterialType materialType, boolean offer, boolean forced);", "LocalMaterialData withDefaultBlockData();", "java.lang.String getDisk();", "@Override\n\tpublic String toString() {\n\t\treturn \"Material [kd=\" + kd + \", ks=\" + ks + \", kr=\" + kr + \", kt=\" + kt + \", nShininess=\" + nShininess + \"]\";\n\t}", "public void format( RawDisk disk) {\n \tthis.tempDisk.format();\n }", "public ItemStack createItem(ItemType type, int damage,List<Text> lore);", "public DiskPoolVolume() {\n }", "WithCreate withDiskSizeGB(Integer diskSizeGB);", "public static void renderFaceXNeg(RenderBlocks renderBlocks, int slope, double x, double y, double z, Icon icon)\r\n\t{\r\n\t\tdouble uMin = icon.getInterpolatedU(renderBlocks.renderMinZ * 16.0D);\r\n\t\tdouble uMax = icon.getInterpolatedU(renderBlocks.renderMaxZ * 16.0D);\r\n\t\tdouble vMax = icon.getInterpolatedV(16.0D - renderBlocks.renderMaxY * 16.0D);\r\n\t\tdouble vMin = icon.getInterpolatedV(16.0D - renderBlocks.renderMinY * 16.0D);\r\n\r\n double xMin = x + renderBlocks.renderMinX;\r\n double xMax = x + renderBlocks.renderMaxX;\r\n double yMin = y + renderBlocks.renderMinY;\r\n double yMax = y + renderBlocks.renderMaxY;\r\n double zMin = z + renderBlocks.renderMinZ;\r\n double zMax = z + renderBlocks.renderMaxZ;\r\n\t\t\r\n\t\tswitch (slope) {\r\n\t\t\tcase Slope.EXT_NEG_OBL_SE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_NEG_OBL_SW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_NEG_OBL_NW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_NEG_OBL_NE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_SE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.EXT_POS_OBL_SW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_POS_OBL_NE:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, iconHasFloatingHeight(icon) ? vMax : vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tcase Slope.INT_POS_OBL_NW:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, iconHasFloatingHeight(icon) ? vMax : vMin, 3);\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMax, uMax, vMax, 0);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMax, zMin, uMin, vMax, 1);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMin, uMin, vMin, 2);\r\n\t\t\t\tsetupVertex(renderBlocks, xMin, yMin, zMax, uMax, vMin, 3);\r\n\t\t}\r\n\t}", "@Test\r\n\tpublic void testCapacityNegative(){\r\n\t\ttry{\r\n\t\t\tPacker.pack(\"./src/test/resources/capacityNegative.txt\");\r\n\t\t}catch (APIException e) {\r\n\t\t\t// test passed - exception expected when incorrect parameters are being passed\r\n\t\t\tSystem.out.println(\"Test Passed. CapacityNegative.\");\r\n\t\t\treturn;\r\n\t\t} catch (Throwable t){\r\n\t\t\tSystem.out.println(\"Unexpected throwable: \" + t.getMessage());\r\n\t\t}\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tfail(\"APIException was expected\");\r\n\t}", "public IonModification createOpposite() {\n return new IonModification(getType(), name, molFormula, -mass, charge);\n }", "public RLDiskDrive() {\n }", "public T negative() {\n T A = copy();\n ops.changeSign(A.mat);\n return A;\n }", "@Override\r\n\tpublic vec3 minus() {\n\t\treturn null;\r\n\t}", "public static CreationEntry createMetallicEntries(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, int aCustomCreationCutOff, double aMinimumSkill, CreationCategories aCategory) {\n/* 3657 */ CreationEntry defaultEntry = createSimpleEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ \n/* */ \n/* 3660 */ if (ItemFactory.isMetalLump(aObjectTarget)) {\n/* */ \n/* 3662 */ for (int targetTemplateId : ItemFactory.metalLumpList)\n/* */ {\n/* 3664 */ if (targetTemplateId != aObjectTarget)\n/* */ {\n/* */ \n/* 3667 */ createSimpleEntry(aPrimarySkill, aObjectSource, targetTemplateId, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ }\n/* */ }\n/* */ \n/* 3671 */ } else if (ItemFactory.isMetalLump(aObjectSource)) {\n/* */ \n/* 3673 */ for (int sourceTemplateId : ItemFactory.metalLumpList) {\n/* */ \n/* 3675 */ if (sourceTemplateId != aObjectSource)\n/* */ {\n/* */ \n/* 3678 */ createSimpleEntry(aPrimarySkill, sourceTemplateId, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCustomCreationCutOff, aMinimumSkill, aCategory);\n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 3683 */ return defaultEntry;\n/* */ }", "public Builder clearMaterials() {\n materials_ = com.google.protobuf.LazyStringArrayList.emptyList();\n bitField0_ = (bitField0_ & ~0x00000008);\n ;\n onChanged();\n return this;\n }", "public MineHard()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(16, 16, 32);\r\n addObject(new Person() , 1 , 14);\r\n addObject(new Rock() , 1 , 15);\r\n addObject(new Rock() , 8 , 15);\r\n addObject(new Rock() , 12 , 15);\r\n addObject(new Rock() , 5 , 14);\r\n addObject(new Rock() , 15 , 13);\r\n addObject(new Rock() , 9 , 13);\r\n addObject(new Rock() , 12 , 12);\r\n addObject(new Rock() , 10 , 11);\r\n addObject(new Rock() , 7 , 11);\r\n addObject(new Rock() , 2 , 11);\r\n addObject(new Rock() , 1 , 12);\r\n addObject(new Rock() , 15 , 10);\r\n addObject(new Rock() , 12 , 9);\r\n addObject(new Rock() , 4 , 9);\r\n addObject(new Rock() , 1 , 9);\r\n addObject(new Rock() , 11 , 8);\r\n addObject(new Rock() , 13 , 7);\r\n addObject(new Rock() , 10 , 7);\r\n addObject(new Rock() , 9 , 7);\r\n addObject(new Rock() , 8 , 7);\r\n addObject(new Rock() , 7 , 7);\r\n addObject(new Rock() , 2 , 6);\r\n addObject(new Rock() , 5 , 5);\r\n addObject(new Rock() , 12 , 5);\r\n addObject(new Rock() , 9 , 4);\r\n addObject(new Rock() , 13 , 2);\r\n addObject(new Rock() , 3 , 3);\r\n addObject(new Rock() , 4 , 2);\r\n addObject(new Rock() , 1 , 1);\r\n addObject(new Rock() , 9 , 1);\r\n addObject(new Rock() , 10 , 0);\r\n addObject(new Rock() , 0 , 0);\r\n addObject(new Rock() , 0 , 7);\r\n addObject(new Rock() , 5 , 0);\r\n addObject(new Rock() , 15 , 0);\r\n addObject(new Rock() , 15 , 8);\r\n \r\n addObject(new Goldbar() , 15 , 2);\r\n addObject(new Goldbar() , 12 , 8);\r\n addObject(new Goldbar() , 15 , 15);\r\n addObject(new Goldbar() , 3 , 2);\r\n addObject(new Goldbar() , 9 , 0);\r\n addObject(new Goldbar() , 2 , 9);\r\n \r\n addObject(new Zombie() , 13 , 13);\r\n addObject(new Zombie() , 12 , 6);\r\n addObject(new Zombie() , 6 , 0);\r\n addObject(new Zombie() , 1 , 4);\r\n addObject(new Zombie() , 7 , 9);\r\n addObject(new TryC() , 2 , 1);\r\n addObject(new MainMenu() , 12 , 1);\r\n }", "ExpMaterial createExpMaterial(Container container, Lsid lsid);", "public int getSolidPartsMask()\r\n/* 67: */ {\r\n/* 68: 56 */ return this.CoverSides | 0x20000000;\r\n/* 69: */ }", "public void negative(BufferedImage img, int startX, int startY, int endX, int endY) throws IOException{\r\n int pixels[] = new int[3];\r\n double ww[]=new double[3];\r\n WritableRaster raster = img.getRaster();\r\n \r\n for(int i=startX;i<endX;i++) {\r\n for(int j=startY;j<endY;j++){\r\n \r\n \r\n raster.getPixel(i, j, pixels);\r\n \r\n ww[0] = 255-pixels[0];\r\n ww[1] = 255-pixels[1];\r\n ww[2] = 255-pixels[2];\r\n \r\n raster.setPixel(i, j, ww);\r\n \r\n }\r\n \r\n }\r\n\r\n \r\n\r\n }", "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }", "public void changeDisk(){\n if(isFull==true) {\n if (this.type == TYPE.WHITE) {\n this.type = TYPE.BLACK;\n } else {\n type = TYPE.WHITE;\n }\n }\n return;\n }", "@Override\n \t\t\t\tpublic void doCreateProjectedWater() {\n \n \t\t\t\t}", "public static CreationEntry createMetallicEntries(int aPrimarySkill, int aObjectSource, int aObjectTarget, int aObjectCreated, boolean depleteSource, boolean depleteTarget, float aPercentageLost, boolean depleteEqually, boolean aCreateOnGround, CreationCategories aCategory) {\n/* 3596 */ CreationEntry defaultEntry = createSimpleEntry(aPrimarySkill, aObjectSource, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ \n/* */ \n/* 3599 */ if (ItemFactory.isMetalLump(aObjectTarget)) {\n/* */ \n/* 3601 */ for (int targetTemplateId : ItemFactory.metalLumpList)\n/* */ {\n/* 3603 */ if (targetTemplateId != aObjectTarget)\n/* */ {\n/* */ \n/* 3606 */ createSimpleEntry(aPrimarySkill, aObjectSource, targetTemplateId, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ }\n/* */ }\n/* */ \n/* 3610 */ } else if (ItemFactory.isMetalLump(aObjectSource)) {\n/* */ \n/* 3612 */ for (int sourceTemplateId : ItemFactory.metalLumpList) {\n/* */ \n/* 3614 */ if (sourceTemplateId != aObjectSource)\n/* */ {\n/* */ \n/* 3617 */ createSimpleEntry(aPrimarySkill, sourceTemplateId, aObjectTarget, aObjectCreated, depleteSource, depleteTarget, aPercentageLost, depleteEqually, aCreateOnGround, aCategory);\n/* */ }\n/* */ } \n/* */ } \n/* */ \n/* 3622 */ return defaultEntry;\n/* */ }", "@Test\n void negativeQuality() {\n Item[] items = new Item[]{new Item(\"noValue\", 2, 0)};\n GildedRose app = new GildedRose(items);\n app.updateQuality();\n\n assertEquals(0, app.items[0].quality, \"Quality shouldn't drop below 0\");\n }", "public HWDiskStore() {\n this.diskStore = new oshi.hardware.HWDiskStore();\n }", "abstract public Vcard createVcard();", "public D64DiskImage( String filename, List<Sector> sectorList) {\n\n\t// Use the constructor of the base class.\n\tsuper( filename, sectorList);\n }", "protected void createContents() {\n\t\tshlFaststone = new Shell();\n\t\tshlFaststone.setImage(SWTResourceManager.getImage(Edit.class, \"/image/all1.png\"));\n\t\tshlFaststone.setToolTipText(\"\");\n\t\tshlFaststone.setSize(944, 479);\n\t\tshlFaststone.setText(\"kaca\");\n\t\tshlFaststone.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tComposite composite = new Composite(shlFaststone, SWT.NONE);\n\t\tcomposite.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm = new SashForm(composite, SWT.VERTICAL);\n\t\t//\n\t\tMenu menu = new Menu(shlFaststone, SWT.BAR);\n\t\tshlFaststone.setMenuBar(menu);\n\t\tMenuItem menuItem = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem.setSelection(true);\n\t\tmenuItem.setText(\"\\u6587\\u4EF6\");\n\t\t\n\t\tMenu menu_1 = new Menu(menuItem);\n\t\tmenuItem.setMenu(menu_1);\n\t\t\n\t\tfinal Canvas down=new Canvas(shlFaststone,SWT.NONE|SWT.BORDER|SWT.DOUBLE_BUFFERED);\n\t\t\n\t\tComposite composite_4 = new Composite(sashForm, SWT.BORDER);\n\t\tcomposite_4.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_3 = new SashForm(composite_4, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_3);\n\t\tformToolkit.paintBordersFor(sashForm_3);\n\t\t\n\t\tToolBar toolBar = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.WRAP | SWT.RIGHT);\n\t\ttoolBar.setToolTipText(\"\");\n\t\t\n\t\tToolItem toolItem_6 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_6.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_2.notifyListeners(SWT.Selection,event1);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6253\\u5F00.jpg\"));\n\t\ttoolItem_6.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tToolItem tltmNewItem = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t\n\t\ttltmNewItem.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttltmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\ttltmNewItem.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t//关闭\n\t\tToolItem tltmNewItem_4 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\ttltmNewItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttltmNewItem_4.setText(\"\\u5173\\u95ED\");\n\t\t\n\t\t\n\t\t\n\t\tToolItem tltmNewItem_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmNewItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\t//缩放\n\t\t\n\t\t\n\t\ttltmNewItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u653E\\u5927.jpg\"));\n\t\t\n\t\t//工具栏:放大\n\t\t\n\t\ttltmNewItem_1.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tToolItem tltmNewItem_2 = new ToolItem(toolBar, SWT.NONE);\n\t\t\n\t\t//工具栏:缩小\n\t\ttltmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t\n\t\ttltmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F29\\u5C0F.jpg\"));\n\t\ttltmNewItem_2.setText(\"\\u7F29\\u5C0F\");\n\t\tToolItem toolItem_5 = new ToolItem(toolBar, SWT.NONE);\n\t\ttoolItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tmntmNewItem_5.notifyListeners(SWT.Selection, event2);\n\n\t\t\t}\n\t\t});\n\t\ttoolItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7ED3\\u675F.jpg\"));\n\t\ttoolItem_5.setText(\"\\u9000\\u51FA\");\n\t\t\n\t\tToolBar toolBar_1 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\tformToolkit.adapt(toolBar_1);\n\t\tformToolkit.paintBordersFor(toolBar_1);\n\t\t\n\t\tToolItem toolItem_7 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:标题\n\t\ttoolItem_7.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_7.setText(\"\\u6807\\u9898\");\n\t\ttoolItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6807\\u9898.jpg\"));\n\t\t\n\t\tToolItem toolItem_1 = new ToolItem(toolBar_1, SWT.NONE);\n\t\t\n\t\t//工具栏:调整大小\n\t\ttoolItem_1.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_1.setText(\"\\u8C03\\u6574\\u5927\\u5C0F\");\n\t\ttoolItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u8C03\\u6574\\u5927\\u5C0F.jpg\"));\n\t\t\n\t\tToolBar toolBar_2 = new ToolBar(sashForm_3, SWT.BORDER | SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar_2.setBackground(SWTResourceManager.getColor(SWT.COLOR_GRAY));\n\t\tformToolkit.adapt(toolBar_2);\n\t\tformToolkit.paintBordersFor(toolBar_2);\n\t\t\n\t\tToolItem toolItem_2 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:裁剪\n\t\ttoolItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_2.setText(\"\\u88C1\\u526A\");\n\t\ttoolItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u88C1\\u526A.jpg\"));\n\t\t\n\t\tToolItem toolItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\t\t//工具栏:剪切\n\t\ttoolItem_3.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\t//\n\t\t\n\t\ttoolItem_3.setText(\"\\u526A\\u5207\");\n\t\ttoolItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u526A\\u5207.jpg\"));\n\t\t\n\t\tToolItem toolItem_4 = new ToolItem(toolBar_2, SWT.NONE);\n\t\t\n\n\t\t//工具栏:粘贴\n\t\ttoolItem_4.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\tcomposite_3.layout();\n\t\t\t\tFile f=new File(\"src/picture/beauty.jpg\");\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tButton lblNewLabel_3 = null;\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tcomposite_3.layout();\n\t\t\t}\n\t\t});\n\t\t//omposite;\n\t\t//\n\t\t\n\t\ttoolItem_4.setText(\"\\u590D\\u5236\");\n\t\ttoolItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u590D\\u5236.jpg\"));\n\t\t\n\t\tToolItem tltmNewItem_3 = new ToolItem(toolBar_2, SWT.NONE);\n\t\ttltmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\ttltmNewItem_3.setText(\"\\u7C98\\u8D34\");\n\t\tsashForm_3.setWeights(new int[] {486, 165, 267});\n\t\t\n\t\tComposite composite_1 = new Composite(sashForm, SWT.NONE);\n\t\tformToolkit.adapt(composite_1);\n\t\tformToolkit.paintBordersFor(composite_1);\n\t\tcomposite_1.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_1 = new SashForm(composite_1, SWT.VERTICAL);\n\t\tformToolkit.adapt(sashForm_1);\n\t\tformToolkit.paintBordersFor(sashForm_1);\n\t\t\n\t\tComposite composite_2 = new Composite(sashForm_1, SWT.NONE);\n\t\tformToolkit.adapt(composite_2);\n\t\tformToolkit.paintBordersFor(composite_2);\n\t\tcomposite_2.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tTabFolder tabFolder = new TabFolder(composite_2, SWT.NONE);\n\t\ttabFolder.setTouchEnabled(true);\n\t\tformToolkit.adapt(tabFolder);\n\t\tformToolkit.paintBordersFor(tabFolder);\n\t\t\n\t\tTabItem tbtmNewItem = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem.setText(\"\\u65B0\\u5EFA\\u4E00\");\n\t\t\n\t\tTabItem tbtmNewItem_1 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_1.setText(\"\\u65B0\\u5EFA\\u4E8C\");\n\t\t\n\t\tTabItem tbtmNewItem_2 = new TabItem(tabFolder, SWT.NONE);\n\t\ttbtmNewItem_2.setText(\"\\u65B0\\u5EFA\\u4E09\");\n\t\t\n\t\tButton button = new Button(tabFolder, SWT.CHECK);\n\t\tbutton.setText(\"Check Button\");\n\t\t\n\t\tcomposite_3 = new Composite(sashForm_1, SWT.H_SCROLL | SWT.V_SCROLL);\n\t\t\n\t\tformToolkit.adapt(composite_3);\n\t\tformToolkit.paintBordersFor(composite_3);\n\t\tcomposite_3.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tLabel lblNewLabel_3 = new Label(composite_3, SWT.NONE);\n\t\tformToolkit.adapt(lblNewLabel_3, true, true);\n\t\tlblNewLabel_3.setText(\"\");\n\t\tsashForm_1.setWeights(new int[] {19, 323});\n\t\t\n\t\tComposite composite_5 = new Composite(sashForm, SWT.NONE);\n\t\tcomposite_5.setToolTipText(\"\");\n\t\tcomposite_5.setLayout(new FillLayout(SWT.HORIZONTAL));\n\t\t\n\t\tSashForm sashForm_2 = new SashForm(composite_5, SWT.NONE);\n\t\tformToolkit.adapt(sashForm_2);\n\t\tformToolkit.paintBordersFor(sashForm_2);\n\t\t\n\t\tLabel lblNewLabel = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel, true, true);\n\t\tlblNewLabel.setText(\"1/1\");\n\t\t\n\t\tLabel lblNewLabel_2 = new Label(sashForm_2, SWT.BORDER | SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_2, true, true);\n\t\tlblNewLabel_2.setText(\"\\u5927\\u5C0F\\uFF1A1366*728\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(sashForm_2, SWT.CENTER);\n\t\tformToolkit.adapt(lblNewLabel_1, true, true);\n\t\tlblNewLabel_1.setText(\"\\u7F29\\u653E\\uFF1A100%\");\n\t\t\n\t\tLabel label = new Label(sashForm_2, SWT.NONE);\n\t\tlabel.setAlignment(SWT.RIGHT);\n\t\tformToolkit.adapt(label, true, true);\n\t\tlabel.setText(\"\\u5494\\u5693\\u5DE5\\u4F5C\\u5BA4\\u7248\\u6743\\u6240\\u6709\");\n\t\tsashForm_2.setWeights(new int[] {127, 141, 161, 490});\n\t\tsashForm.setWeights(new int[] {50, 346, 22});\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMenuItem mntmNewItem = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u65B0\\u5EFA.jpg\"));\n\t\tmntmNewItem.setText(\"\\u65B0\\u5EFA\");\n\t\t\n\t\tmntmNewItem_2 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_2.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t\n\t\t\t\t//Label lblNewLabel_3 = new Label(composite_1, SWT.NONE);\n\t\t\t\t//Canvas c=new Canvas(shlFaststone,SWT.BALLOON);\n\t\t\t\t\n\t\t\t\tFileDialog dialog = new FileDialog(shlFaststone,SWT.OPEN); \n\t\t\t\tdialog.setFilterPath(System.getProperty(\"user_home\"));//设置初始路径\n\t\t\t\tdialog.setFilterNames(new String[] {\"文本文档(*txt)\",\"所有文档\"}); \n\t\t\t\tdialog.setFilterExtensions(new String[]{\"*.exe\",\"*.xls\",\"*.*\"});\n\t\t\t\tString path=dialog.open();\n\t\t\t\tString s=null;\n\t\t\t\tFile f=null;\n\t\t\t\tif(path==null||\"\".equals(path)) {\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t\ttry{\n\t\t\t f=new File(path);\n\t\t\t\tbyte[] bs=Fileutil.readFile(f);\n\t\t\t s=new String(bs,\"UTF-8\");\n\t\t\t\t}catch (Exception e1) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\tMessageDialog.openError(shlFaststone, \"出错了\", \"打开\"+path+\"出错了\");\n\t\t\t\t\treturn ;\n\t\t\t\t}\n\t\t\t \n\t\t\t\ttext = new Text(composite_4, SWT.BORDER | SWT.WRAP\n\t\t\t\t\t\t| SWT.H_SCROLL | SWT.V_SCROLL | SWT.CANCEL\n\t\t\t\t\t\t| SWT.MULTI);\n\t\t\t\ttext.setText(s);\n\t\t\t\tcomposite_1.layout();\n\t\t\t\tshlFaststone.setText(shlFaststone.getText()+\"\\t\"+f.getName());\n\t\t\t\t\t\n\t\t\t\tFile f1=new File(path);\n\t\t\t\tImageData imageData;\n\t\t\t\ttry {\n\t\t\t\t\timageData = new ImageData( new FileInputStream( f1));\n\t\t\t\t\tImage image=new Image(shlFaststone.getDisplay(),imageData);\n\t\t\t\t\tlblNewLabel_3.setImage(image);\n\t\t\t\t} catch (FileNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_2.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u6253\\u5F00.jpg\"));\n\t\tmntmNewItem_2.setText(\"\\u6253\\u5F00\");\n\t\t\n\t\tMenuItem mntmNewItem_1 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_1.setText(\"\\u4ECE\\u526A\\u8D34\\u677F\\u5BFC\\u5165\");\n\t\t\n\t\tMenuItem mntmNewItem_3 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_3.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u53E6\\u5B58\\u4E3A.jpg\"));\n\t\tmntmNewItem_3.setText(\"\\u53E6\\u5B58\\u4E3A\");\n\t\t\n\t\t mntmNewItem_5 = new MenuItem(menu_1, SWT.NONE);\n\t\tmntmNewItem_5.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\t boolean result=MessageDialog.openConfirm(shlFaststone,\"退出\",\"是否确认退出\");\n\t\t\t\t if(result) {\n\t\t\t\t\t System.exit(0);\n\t\t\t\t }\n\n\t\t\t}\n\t\t});\n\t\tmntmNewItem_5.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6587\\u4EF6\\u5B50\\u56FE\\u6807/\\u6587\\u4EF6.\\u4FDD\\u5B58.jpg\"));\n\t\tmntmNewItem_5.setText(\"\\u5173\\u95ED\");\n\t\tevent2=new Event();\n\t\tevent2.widget=mntmNewItem_5;\n\n\t\t\n\t\tMenuItem mntmNewSubmenu = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu.setText(\"\\u6355\\u6349\");\n\t\t\n\t\tMenu menu_2 = new Menu(mntmNewSubmenu);\n\t\tmntmNewSubmenu.setMenu(menu_2);\n\t\t\n\t\tMenuItem mntmNewItem_6 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_6.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_6.setText(\"\\u6355\\u6349\\u6D3B\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_7 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_7.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6355\\u6349\\u7A97\\u53E3\\u6216\\u5BF9\\u8C61.jpg\"));\n\t\tmntmNewItem_7.setText(\"\\u6355\\u6349\\u7A97\\u53E3\\u5BF9\\u8C61\");\n\t\t\n\t\tMenuItem mntmNewItem_8 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_8.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.jpg\"));\n\t\tmntmNewItem_8.setText(\"\\u6355\\u6349\\u77E9\\u5F62\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_9 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_9.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u624B\\u7ED8\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_9.setText(\"\\u6355\\u6349\\u624B\\u7ED8\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem mntmNewItem_10 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_10.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u6574\\u4E2A\\u5C4F\\u5E55.jpg\"));\n\t\tmntmNewItem_10.setText(\"\\u6355\\u6349\\u6574\\u4E2A\\u5C4F\\u5E55\");\n\t\t\n\t\tMenuItem mntmNewItem_11 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_11.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3.jpg\"));\n\t\tmntmNewItem_11.setText(\"\\u6355\\u6349\\u6EDA\\u52A8\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_12 = new MenuItem(menu_2, SWT.NONE);\n\t\tmntmNewItem_12.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF.jpg\"));\n\t\tmntmNewItem_12.setText(\"\\u6355\\u6349\\u56FA\\u5B9A\\u5927\\u5C0F\\u533A\\u57DF\");\n\t\t\n\t\tMenuItem menuItem_1 = new MenuItem(menu_2, SWT.NONE);\n\t\tmenuItem_1.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u6355\\u6349/\\u6355\\u6349.\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349.jpg\"));\n\t\tmenuItem_1.setText(\"\\u91CD\\u590D\\u4E0A\\u6B21\\u6355\\u6349\");\n\t\t\n\t\tMenuItem menuItem_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_2.setText(\"\\u7F16\\u8F91\");\n\t\t\n\t\tMenu menu_3 = new Menu(menuItem_2);\n\t\tmenuItem_2.setMenu(menu_3);\n\t\t\n\t\tMenuItem mntmNewItem_14 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_14.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_14.setText(\"\\u64A4\\u9500\");\n\t\t\n\t\tMenuItem mntmNewItem_13 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_13.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\t\tmntmNewItem_13.setText(\"\\u91CD\\u505A\");\n\t\t\n\t\tMenuItem mntmNewItem_15 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_15.setText(\"\\u9009\\u62E9\\u5168\\u90E8\");\n\t\t\n\t\tMenuItem mntmNewItem_16 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_16.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7F16\\u8F91.\\u88C1\\u526A.jpg\"));\n\t\tmntmNewItem_16.setText(\"\\u88C1\\u526A\");\n\t\t\n\t\tMenuItem mntmNewItem_17 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_17.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u526A\\u5207.jpg\"));\n\t\tmntmNewItem_17.setText(\"\\u526A\\u5207\");\n\t\t\n\t\tMenuItem mntmNewItem_18 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_18.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u590D\\u5236.jpg\"));\n\t\tmntmNewItem_18.setText(\"\\u590D\\u5236\");\n\t\t\n\t\tMenuItem menuItem_4 = new MenuItem(menu_3, SWT.NONE);\n\t\tmenuItem_4.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u7C98\\u8D34.jpg\"));\n\t\tmenuItem_4.setText(\"\\u7C98\\u8D34\");\n\t\t\n\t\tMenuItem mntmNewItem_19 = new MenuItem(menu_3, SWT.NONE);\n\t\tmntmNewItem_19.setText(\"\\u5220\\u9664\");\n\t\t\n\t\tMenuItem menuItem_3 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_3.setText(\"\\u7279\\u6548\");\n\t\t\n\t\tMenu menu_4 = new Menu(menuItem_3);\n\t\tmenuItem_3.setMenu(menu_4);\n\t\t\n\t\tMenuItem mntmNewItem_20 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_20.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6C34\\u5370.jpg\"));\n\t\tmntmNewItem_20.setText(\"\\u6C34\\u5370\");\n\t\t\n\t\tPanelPic ppn = new PanelPic();\n\t\tMenuItem mntmNewItem_21 = new MenuItem(menu_4, SWT.NONE);\n\t\tmntmNewItem_21.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tflag[0]=true;\n\t\t\t\tflag[1]=false;\n\n\t\t\t}\n\n\t\t});\n\t\t\n\t\tdown.addMouseListener(new MouseAdapter(){\n\t\t\tpublic void mouseDown(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=true;\n\t\t\t\tpt=new Point(e.x,e.y);\n\t\t\t\tif(flag[1])\n\t\t\t\t{\n\t\t\t\t\trect=new Composite(down,SWT.BORDER);\n\t\t\t\t\trect.setLocation(e.x, e.y);\n\t\t\t\t\tn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tpublic void mouseUp(MouseEvent e)\n\t\t\t{\n\t\t\t\tmouseDown=false;\n\t\t\t\tif(flag[1]&&dirty)\n\t\t\t\t{\n\t\t\t\t\trexx[n-1]=rect.getBounds();\n\t\t\t\t\trect.dispose();\n\t\t\t\t\tdown.redraw();\n\t\t\t\t\tdirty=false;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tdown.addMouseMoveListener(new MouseMoveListener(){\n\t\t\t@Override\n\t\t\tpublic void mouseMove(MouseEvent e) {\n if(mouseDown)\n {\n \t dirty=true;\n\t\t\t\tif(flag[0])\n\t\t\t {\n \t GC gc=new GC(down);\n gc.drawLine(pt.x, pt.y, e.x, e.y);\n list.add(new int[]{pt.x,pt.y,e.x,e.y});\n pt.x=e.x;pt.y=e.y;\n\t\t\t }\n else if(flag[1])\n {\n \t if(rect!=null)\n \t rect.setSize(rect.getSize().x+e.x-pt.x, rect.getSize().y+e.y-pt.y);\n// \t down.redraw();\n \t pt.x=e.x;pt.y=e.y;\n }\n }\n\t\t\t}\n\t\t\t\n\t\t});\n\t\tdown.addPaintListener(new PaintListener(){\n\t\t\t@Override\n\t\t\tpublic void paintControl(PaintEvent e) {\n\t\t\t\tfor(int i=0;i<list.size();i++)\n\t\t\t\t{\n\t\t\t\t\tint a[]=list.get(i);\n\t\t\t\t\te.gc.drawLine(a[0], a[1], a[2], a[3]);\n\t\t\t\t}\n\t\t\t\tfor(int i=0;i<n;i++)\n\t\t\t\t{\n\t\t\t\t\tif(rexx[i]!=null)\n\t\t\t\t\t\te.gc.drawRectangle(rexx[i]);\n\t\t\t\t}\n\t\t\t}});\n\n\t\t\n\t\tmntmNewItem_21.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7279\\u6548.\\u6587\\u5B57.jpg\"));\n\t\tmntmNewItem_21.setText(\"\\u753B\\u7B14\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_1 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_1.setText(\"\\u67E5\\u770B\");\n\t\t\n\t\tMenu menu_5 = new Menu(mntmNewSubmenu_1);\n\t\tmntmNewSubmenu_1.setMenu(menu_5);\n\t\t\n\t\tMenuItem mntmNewItem_24 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_24.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u653E\\u5927.jpg\"));\n\t\tmntmNewItem_24.setText(\"\\u653E\\u5927\");\n\t\t\n\t\tMenuItem mntmNewItem_25 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_25.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u67E5\\u770B.\\u7F29\\u5C0F.jpg\"));\n\t\tmntmNewItem_25.setText(\"\\u7F29\\u5C0F\");\n\t\t\n\t\tMenuItem mntmNewItem_26 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_26.setText(\"\\u5B9E\\u9645\\u5C3A\\u5BF8\\uFF08100%\\uFF09\");\n\t\t\n\t\tMenuItem mntmNewItem_27 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_27.setText(\"\\u9002\\u5408\\u7A97\\u53E3\");\n\t\t\n\t\tMenuItem mntmNewItem_28 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_28.setText(\"100%\");\n\t\t\n\t\tMenuItem mntmNewItem_29 = new MenuItem(menu_5, SWT.NONE);\n\t\tmntmNewItem_29.setText(\"200%\");\n\t\t\n\t\tMenuItem mntmNewSubmenu_2 = new MenuItem(menu, SWT.CASCADE);\n\t\tmntmNewSubmenu_2.setText(\"\\u8BBE\\u7F6E\");\n\t\t\n\t\tMenu menu_6 = new Menu(mntmNewSubmenu_2);\n\t\tmntmNewSubmenu_2.setMenu(menu_6);\n\t\t\n\t\tMenuItem menuItem_5 = new MenuItem(menu, SWT.CASCADE);\n\t\tmenuItem_5.setText(\"\\u5E2E\\u52A9\");\n\t\t\n\t\tMenu menu_7 = new Menu(menuItem_5);\n\t\tmenuItem_5.setMenu(menu_7);\n\t\t\n\t\tMenuItem menuItem_6 = new MenuItem(menu_7, SWT.NONE);\n\t\tmenuItem_6.setText(\"\\u7248\\u672C\");\n\t\t\n\t\tMenuItem mntmNewItem_23 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_23.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u5DE6\\u64A4\\u9500.jpg\"));\n\t\t\n\t\tMenuItem mntmNewItem_30 = new MenuItem(menu, SWT.NONE);\n\t\tmntmNewItem_30.setImage(SWTResourceManager.getImage(Edit.class, \"/\\u622A\\u56FE\\u5DE5\\u5177/\\u56FE\\u7247\\u8D44\\u6E90/\\u7F16\\u8F91\\u5B50\\u56FE\\u6807/\\u53F3\\u64A4\\u9500.jpg\"));\n\n\t}", "int getDiskNum();", "public void setNegative(boolean negative) {\n this.negative = negative;\n }", "public Heading negate() {\r\n return new Heading(HeadingType.DEGREES, -this.degreeNum);\r\n }", "@NonNegative float blockHardness();", "OurIfcMaterial createOurIfcMaterial();", "public void removeMaterial(Material Material) {\n\n\t}", "@Override\n protected void dropRareDrop(int superRare) {\n ItemStack drop = new ItemStack(Items.fishing_rod);\n EffectHelper.setItemName(drop, \"Whip of Destruction\", 0xd);\n drop.addEnchantment(Enchantment.sharpness, 1);\n drop.addEnchantment(Enchantment.unbreaking, 10);\n this.entityDropItem(drop, 0.0F);\n }", "public ElectricShower() {\r\n\t\tthis(12, 0, 4);\r\n\t}", "public Point2F negative()\r\n {return scale(-1);}", "public DynamicModelPart(DynamicModel dynamicModel, float[] x, float[] y, float[] z, int[] sizeX,\n int[] sizeY, int[] sizeZ, float[] extra, int[] u, int[] v, float[] rotation,\n ObjectList<DynamicModelPart.DynamicPart[]> seeds, SpriteIdentifier spriteId,\n Function<Identifier, RenderLayer> layerFactory, boolean UV_SHIFT_APPLY_SYNC,\n boolean UV_SHIFTABLE, int UV_SHIFT_AMOUNT, boolean UV_SHIFT_EVERY_X_TICK,\n boolean UV_SHIFT_EVERY_TICK, int UV_SHIFT_EVERY_X_TICKS,\n boolean UV_SHIFT_EVERY_DELTA_TICK, boolean UV_SHIFT_EVERY_X_DELTA_TICK,\n int UV_SHIFT_EVERY_X_DELTA_TICKS, boolean UPDATE_DYNAMICS_EVERY_TICK,\n boolean UPDATE_DYNAMICS_EVERY_X_TICK, int UPDATE_DYNAMICS_EVERY_X_TICKS,\n boolean UPDATE_DYNAMICS_EVERY_DELTA_TICK, boolean UPDATE_DYNAMICS_EVERY_X_DELTA_TICK,\n int UPDATE_DYNAMICS_EVERY_X_DELTA_TICKS) {\n super(dynamicModel);\n this.dynamicModel = dynamicModel;\n this.cuboids = new ObjectArrayList<DynamicModelPart.DynamicCuboid>();\n this.children = new ObjectArrayList<DynamicModelPart>();\n this.with(UV_SHIFT_APPLY_SYNC, UV_SHIFTABLE, UV_SHIFT_AMOUNT, UV_SHIFT_EVERY_X_TICK,\n UV_SHIFT_EVERY_TICK, UV_SHIFT_EVERY_X_TICKS, UV_SHIFT_EVERY_DELTA_TICK,\n UV_SHIFT_EVERY_X_DELTA_TICK, UV_SHIFT_EVERY_X_DELTA_TICKS,\n UPDATE_DYNAMICS_EVERY_TICK, UPDATE_DYNAMICS_EVERY_X_TICK,\n UPDATE_DYNAMICS_EVERY_X_TICKS, UPDATE_DYNAMICS_EVERY_DELTA_TICK,\n UPDATE_DYNAMICS_EVERY_X_DELTA_TICK, UPDATE_DYNAMICS_EVERY_X_DELTA_TICKS).setX(x)\n .setY(y).setZ(z).setSizeX(sizeX).setSizeY(sizeY).setSizeZ(sizeZ).setExtra(extra)\n .setU(u).setV(v).setRotation(rotation).seeds(seeds).spriteId(spriteId)\n .layerFactory(layerFactory).buildUsingSeeds().buildChildrenUsingSeeds();\n }", "@Test\n public void testAddPartitionMetaWithDryRun() throws IOException {\n // create commit instant\n Files.createFile(Paths.get(tablePath, \".hoodie\", \"100.commit\"));\n\n // create partition path\n String partition1 = Paths.get(tablePath, HoodieTestDataGenerator.DEFAULT_FIRST_PARTITION_PATH).toString();\n String partition2 = Paths.get(tablePath, HoodieTestDataGenerator.DEFAULT_SECOND_PARTITION_PATH).toString();\n String partition3 = Paths.get(tablePath, HoodieTestDataGenerator.DEFAULT_THIRD_PARTITION_PATH).toString();\n assertTrue(fs.mkdirs(new Path(partition1)));\n assertTrue(fs.mkdirs(new Path(partition2)));\n assertTrue(fs.mkdirs(new Path(partition3)));\n\n // default is dry run.\n CommandResult cr = shell().executeCommand(\"repair addpartitionmeta\");\n assertTrue(cr.isSuccess());\n\n // expected all 'No'.\n String[][] rows = FSUtils.getAllPartitionFoldersThreeLevelsDown(fs, tablePath)\n .stream()\n .map(partition -> new String[]{partition, \"No\", \"None\"})\n .toArray(String[][]::new);\n String expected = HoodiePrintHelper.print(new String[] {HoodieTableHeaderFields.HEADER_PARTITION_PATH,\n HoodieTableHeaderFields.HEADER_METADATA_PRESENT, HoodieTableHeaderFields.HEADER_ACTION}, rows);\n expected = removeNonWordAndStripSpace(expected);\n String got = removeNonWordAndStripSpace(cr.getResult().toString());\n assertEquals(expected, got);\n }", "private void generateTreasureDesc() {\n description += \" Treasure: \" + treasure.getDescription() + \" Container: \" + treasure.getContainer();\n try {\n description += \" Protection: \" + treasure.getProtection();\n } catch (NotProtectedException ex) {\n\n }\n }", "public static void deselVols() {\r\n List<MeasureLine> selection = DataClipboard.getSelection();\r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n if (selection.get(i).getVolume() >= 0) {\r\n selection.get(i).setVolume(-1);\r\n }\r\n if(selection.get(i).isEmpty()) {\r\n selection.set(i, null);\r\n }\r\n }\r\n }\r\n \r\n //find new line begin \r\n for(int i = DataClipboard.getSelectionLineBegin(); i < DataClipboard.getSelectionLineEnd() + 1; i++){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineBegin(i);\r\n break;\r\n }\r\n }\r\n \r\n //find new line end \r\n for(int i = DataClipboard.getSelectionLineEnd(); i > DataClipboard.getSelectionLineBegin() - 1; i--){\r\n if(selection.get(i) != null) {\r\n DataClipboard.setSelectionLineEnd(i);\r\n break;\r\n }\r\n }\r\n }", "@Override\n \t\t\t\tpublic void doCreateQuadWater() {\n \n \t\t\t\t}", "private static Datacenter createDatacenter(String name) {\n List<Host> hostList = new ArrayList<Host>();\r\n\r\n // 2. A Machine contains one or more PEs or CPUs/Cores.\r\n // In this example, it will have only one core.\r\n List<Pe> peList = new ArrayList<Pe>();\r\n\r\n\r\n // 3. Create PEs and add these into a list.\r\n peList.add(new Pe(0, new PeProvisionerSimple(mips+100))); // need to store Pe id and MIPS Rating\r\n\r\n // 4. Create Host with its id and list of PEs and add them to the list\r\n // of machines\r\n long storage = 1000000; // host storage\r\n\r\n\r\n for (int hostId = 0; hostId < vmNum; hostId++) {\r\n hostList.add(\r\n new Host(\r\n hostId,\r\n new RamProvisionerSimple((int)((ram*1.1)/Constants.MB)),\r\n new BwProvisionerSimple(bw+10),\r\n storage,\r\n peList,\r\n new VmSchedulerTimeShared(peList)\r\n )\r\n ); // This is our machine\r\n }\r\n\r\n\r\n // 5. Create a DatacenterCharacteristics object that stores the\r\n // properties of a data center: architecture, OS, list of\r\n // Machines, allocation policy: time- or space-shared, time zone\r\n // and its price (G$/Pe time unit).\r\n String arch = \"x86\"; // system architecture\r\n String os = \"Linux\"; // operating system\r\n String vmm = \"Xen\";\r\n double time_zone = 10.0; // time zone this resource located\r\n double cost = 3.0; // the cost of using processing in this resource\r\n double costPerMem = 0.05; // the cost of using memory in this resource\r\n double costPerStorage = 0.001; // the cost of using storage in this\r\n // resource\r\n double costPerBw = 0.0; // the cost of using bw in this resource\r\n LinkedList<Storage> storageList = new LinkedList<Storage>(); // we are not adding SAN\r\n // devices by now\r\n\r\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\r\n arch, os, vmm, hostList, time_zone, cost, costPerMem,\r\n costPerStorage, costPerBw);\r\n\r\n // 6. Finally, we need to create a PowerDatacenter object.\r\n Datacenter datacenter = null;\r\n try {\r\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return datacenter;\r\n }", "public ItemStack getResultOf(ItemStack[] contents) {\n for(int i=0;i<9;i++){ \r\n if(this.isBlankRareEssence(contents[i])){\r\n int hashCode = this.getRecipeHashCode(contents);\r\n \r\n RareItemProperty rip = this.essenceRecipes.get(hashCode);\r\n \r\n if(rip != null){\r\n return this.generateRareEssence(rip);\r\n }\r\n \r\n return null;\r\n }\r\n }\r\n \r\n ItemStack isAddPropertiesTo = null;\r\n Map<RareItemProperty,Integer> propertyLevels = new HashMap<>();\r\n \r\n // allow one itemstack to add properties to\r\n // and rare essences of a specific type\r\n // otherwise it's an invalid recipe\r\n for(ItemStack is : contents) {\r\n if(is != null && !is.getType().equals(Material.AIR)){\r\n if(is.getType().equals(Material.MAGMA_CREAM)){\r\n RareItemProperty rip = this.getPropertyFromRareEssence(is);\r\n \r\n if(rip != null){\r\n Integer currentLevel = propertyLevels.get(rip);\r\n \r\n if(currentLevel == null){\r\n propertyLevels.put(rip,1);\r\n }\r\n else if(currentLevel < rip.getMaxLevel() && propertyLevels.size() < this.MAX_PROPERTIES_PER_ITEM){\r\n propertyLevels.put(rip,currentLevel+1);\r\n }\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n else if(isAddPropertiesTo == null){\r\n isAddPropertiesTo = is.clone();\r\n \r\n isAddPropertiesTo.setAmount(1);\r\n }\r\n else {\r\n return null;\r\n }\r\n }\r\n }\r\n \r\n if(isAddPropertiesTo != null && !propertyLevels.isEmpty()){\r\n // strip existing properties from the item and add them to the properties to add\r\n ItemMeta meta = isAddPropertiesTo.getItemMeta();\r\n List<String> lore;\r\n List<String> newLore = new ArrayList<>();\r\n \r\n if(meta.hasLore()){\r\n lore = meta.getLore();\r\n\r\n for(String sLore : lore){\r\n if(sLore.startsWith(PROPERTY_LINE_PREFIX)){\r\n String sPID = sLore.substring(sLore.lastIndexOf(ChatColor.COLOR_CHAR)+2);\r\n int itemPropertyLevel = 1;\r\n \r\n try{\r\n itemPropertyLevel = RomanNumeral.valueOf(sLore.substring(\r\n sLore.lastIndexOf(ChatColor.GREEN.toString())+2,\r\n sLore.lastIndexOf(ChatColor.COLOR_CHAR)-1\r\n ));\r\n }\r\n catch(IllegalArgumentException ex){\r\n continue;\r\n }\r\n \r\n int pid;\r\n \r\n try{\r\n pid = Integer.parseInt(sPID);\r\n }\r\n catch(NumberFormatException ex){\r\n continue;\r\n }\r\n \r\n RareItemProperty rip = this.plugin.getPropertymanager().getProperty(pid);\r\n \r\n if(rip != null){\r\n Integer currentLevel = propertyLevels.get(rip);\r\n \r\n if(currentLevel == null){\r\n currentLevel = 0;\r\n }\r\n \r\n int newLevel = currentLevel + itemPropertyLevel;\r\n\r\n if(currentLevel < rip.getMaxLevel() && propertyLevels.size() < this.MAX_PROPERTIES_PER_ITEM){\r\n propertyLevels.put(rip,newLevel);\r\n }\r\n }\r\n }\r\n else if(!sLore.equals(PROPERTY_HEADER)){\r\n newLore.add(sLore);\r\n }\r\n }\r\n }\r\n else{\r\n lore = new ArrayList<>();\r\n }\r\n \r\n lore = newLore;\r\n \r\n lore.add(PROPERTY_HEADER);\r\n \r\n for(Entry<RareItemProperty,Integer> entry : propertyLevels.entrySet()){\r\n RareItemProperty rip = entry.getKey();\r\n int level = entry.getValue();\r\n \r\n lore.add(String.format(PROPERTY_LINE,new Object[]{\r\n rip.getName(),\r\n RomanNumeral.convertToRoman(level),\r\n rip.getID()\r\n }));\r\n }\r\n \r\n meta.setLore(lore);\r\n \r\n isAddPropertiesTo.setItemMeta(meta);\r\n \r\n return isAddPropertiesTo;\r\n }\r\n \r\n return null;\r\n }", "public static TMaterial createEntity(EntityManager em) {\n TMaterial tMaterial = new TMaterial()\n .qty(DEFAULT_QTY)\n .hargaBeli(DEFAULT_HARGA_BELI)\n .hargaTotal(DEFAULT_HARGA_TOTAL)\n .inout(DEFAULT_INOUT);\n return tMaterial;\n }", "public Material(double _kD, double _kS, int _nShininess) {\n this._kD = _kD;\n this._kS = _kS;\n this._nShininess = _nShininess;\n }", "public void ToRam() {\n while (ram > 0) {\n if (HDDQ.isEmpty()) {\n break;\n }\n PCB k = HDDQ.remove();\n k.setBasedOnSize(false);\n RAMQ.add(k);\n ram -= k.getSize();\n }\n }", "private void cutoutBlocks(MetropolisGenerator generator, Cartesian v, Cartesian s, Material floor) {\n int xdir, ydir, zdir;\n xdir = s.X < 0 ? -1 : 1;\n ydir = s.Y < 0 ? -1 : 1;\n zdir = s.Z < 0 ? -1 : 1;\n \n for (int x = 0; Math.abs(x) < Math.abs(s.X); x += xdir) {\n for (int z = 0; Math.abs(z) < Math.abs(s.Z); z += zdir) {\n for (int y = 0; Math.abs(y) < Math.abs(s.Y); y += ydir) {\n generator.getWorld().getBlockAt(v.X + x, v.Y + y, v.Z + z).setType(Material.AIR);\n }\n Block below = generator.getWorld().getBlockAt(v.X + x, v.Y - 1, v.Z + z);\n if (!below.isEmpty()) {\n generator.getWorld().getBlockAt(v.X + x, v.Y - 1, v.Z + z).setType(floor);\n }\n }\n }\n }", "public VolcanoGraveYard createGraveYard(float col, float row) {\n List<Part> parts = new ArrayList<>();\n //Top left\n parts.add(new Part(new SquareVector(1, 0), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(2, 0), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(3, 0), \"fenceE-W\", true));\n //Top right\n parts.add(new Part(new SquareVector(9, 0), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(10, 0), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(11, 0), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(12, 0), \"fenceE-W\", true));\n //Corner\n\n // Bottom Left\n parts.add(new Part(new SquareVector(1, -7), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(2, -7), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(3, -7), \"fenceE-W\", true));\n //Corner\n parts.add(new Part(new SquareVector(0, -7), \"fenceN-E\", true));\n\n //Bottom right\n parts.add(new Part(new SquareVector(9, -7), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(10, -7), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(11, -7), \"fenceE-W\", true));\n parts.add(new Part(new SquareVector(12, -7), \"fenceE-W\", true));\n\n //Vertical sides Left\n parts.add(new Part(new SquareVector(0, -6), \"fenceN-S\", true));\n parts.add(new Part(new SquareVector(0, -5), \"fenceN-S\", true));\n parts.add(new Part(new SquareVector(0, -2), \"fenceN-S\", true));\n parts.add(new Part(new SquareVector(0, -1), \"fenceN-S\", true));\n //Vertical sides Right\n parts.add(new Part(new SquareVector(13, -6), \"fenceN-S\", true));\n parts.add(new Part(new SquareVector(13, -5), \"fenceN-S\", true));\n parts.add(new Part(new SquareVector(13, -2), \"fenceN-S\", true));\n parts.add(new Part(new SquareVector(13, -1), \"fenceN-S\", true));\n\n // Corner Trees\n parts.add(new Part(new SquareVector(1, -1), \"tree\", true));\n parts.add(new Part(new SquareVector(12, -1), \"tree\", true));\n parts.add(new Part(new SquareVector(1, -6), \"tree\", true));\n parts.add(new Part(new SquareVector(12, -6), \"tree\", true));\n\n //Bones top corners\n parts.add(new Part(new SquareVector(1, -2), \"Bones\", false));\n parts.add(new Part(new SquareVector(2, -1), \"Bones\", false));\n parts.add(new Part(new SquareVector(11, -1), \"Bones\", false));\n parts.add(new Part(new SquareVector(12, -2), \"Bones\", false));\n\n //Bones Bottom corners\n parts.add(new Part(new SquareVector(1, -5), \"Bones\", false));\n parts.add(new Part(new SquareVector(2, -6), \"Bones\", false));\n parts.add(new Part(new SquareVector(11, -6), \"Bones\", false));\n parts.add(new Part(new SquareVector(12, -5), \"Bones\", false));\n\n //Intersection corners\n parts.add(new Part(new SquareVector(5, -2), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(8, -2), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(5, -5), \"Ruins_4\", true));\n parts.add(new Part(new SquareVector(8, -5), \"Ruins_4\", true));\n\n return new VolcanoGraveYard(col, row, parts);\n }", "public Complex negate() {\n return new Complex(-re, -im);\n }", "public abstract Parts getRAM();", "public WorldImage drawBoard(int blocks) {\r\n return new EmptyImage();\r\n }", "public TileEntityEnergyCube()\n\t{\n\t\tsuper(\"Energy Cube\", 0);\n\t\t\n\t\tinventory = new ItemStack[2];\n\t}", "public TileEntityEnergyCube()\n\t{\n\t\tsuper(\"Energy Cube\", 0);\n\t\t\n\t\tinventory = new ItemStack[2];\n\t}", "public ItemStack makeUnbreakable(ItemStack itemStack){\n net.minecraft.server.v1_8_R3.ItemStack item = CraftItemStack.asNMSCopy(itemStack);\n NBTTagCompound tag = new NBTTagCompound();\n tag.setBoolean(\"Unbreakable\", true);\n item.setTag(tag);\n return CraftItemStack.asCraftMirror(item);\n }", "public void renderInvBlock(bbb renderblocks, int md)\r\n/* 73: */ {\r\n/* 74: 72 */ this.block.f();\r\n/* 75: */ \r\n/* 76: 74 */ this.context.setDefaults();\r\n/* 77: 75 */ this.context.setPos(-0.5D, -0.5D, -0.5D);\r\n/* 78: 76 */ this.context.useNormal = true;\r\n/* 79: 77 */ this.context.setLocalLights(0.5F, 1.0F, 0.8F, 0.8F, 0.6F, 0.6F);\r\n/* 80: */ \r\n/* 81: 79 */ RenderLib.bindTexture(\"/eloraam/machine/machine1.png\");\r\n/* 82: 80 */ baz tessellator = baz.a;\r\n/* 83: */ \r\n/* 84: 82 */ tessellator.b();\r\n/* 85: 83 */ this.context.useNormal = true;\r\n/* 86: */ \r\n/* 87: */ \r\n/* 88: 86 */ this.context.setTex(28, 28, 26, 26, 26, 26);\r\n/* 89: */ \r\n/* 90: 88 */ this.context.renderBox(60, 0.375D, 0.0D, 0.375D, 0.625D, 1.0D, 0.625D);\r\n/* 91: 89 */ this.context.renderBox(60, 0.6240000128746033D, 0.9990000128746033D, 0.6240000128746033D, 0.3759999871253967D, 0.001000000047497451D, 0.3759999871253967D);\r\n/* 92: 90 */ renderFlanges(3, 27);\r\n/* 93: */ \r\n/* 94: 92 */ tessellator.a();\r\n/* 95: 93 */ RenderLib.unbindTexture();\r\n/* 96: 94 */ this.context.useNormal = false;\r\n/* 97: */ }", "public void removeEffectFromSpecialBrick(){\r\n\t\t\t// return everything to the original\r\n\t\t\tColor origColor = (specialBrickId.equals(\"Rect0\"))? discsColors[0]:(specialBrickId.equals(\"Rect1\"))? discsColors[1]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect2\"))? discsColors[2]:(specialBrickId.equals(\"Rect3\"))? discsColors[3]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect4\"))? discsColors[4]:(specialBrickId.equals(\"Rect5\"))? discsColors[5]:\r\n\t\t\t\t\t\t (specialBrickId.equals(\"Rect6\"))? discsColors[6]:(specialBrickId.equals(\"Rect7\"))? discsColors[7]:null; \r\n\t\t\tint origWidth = (specialBrickId.equals(\"Rect0\"))? 30:(specialBrickId.equals(\"Rect1\"))? 60:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect2\"))? 90:(specialBrickId.equals(\"Rect3\"))? 120:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect4\"))? 150:(specialBrickId.equals(\"Rect5\"))? 180:\r\n\t\t\t\t\t\t\t(specialBrickId.equals(\"Rect6\"))? 210:(specialBrickId.equals(\"Rect7\"))? 240:null;\r\n\t\t\tRectangle rect = new Rectangle(origWidth,20, origColor);\r\n\t\t\trect.setId(specialBrickId);\r\n\t\t\trect.setStroke(Color.BLACK);\r\n\t\t\trect.setStrokeWidth(3);\r\n\t\t\t\t\t\t\r\n\t\t\tswitch(specialBrickTower){\r\n\t\t\t\tcase \"firstTower\":\r\n\t\t\t\t\tfor(int i=0; i<firstTower.getChildren().size(); i++){ // cycle through the tower to check which one is the special brick\r\n\t\t\t\t\t\tif (firstTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tfirstTower.getChildren().set(i, rect); // then reset it\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"secondTower\":\r\n\t\t\t\t\tfor(int i=0; i<secondTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (secondTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tsecondTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t\tcase \"thirdTower\":\r\n\t\t\t\t\tfor(int i=0; i<thirdTower.getChildren().size(); i++){\r\n\t\t\t\t\t\tif (thirdTower.getChildren().get(i).getId().equals(specialBrickId)){\r\n\t\t\t\t\t\t\tthirdTower.getChildren().set(i, rect);\r\n\t\t\t\t\t}}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\trect.widthProperty().bind(scene.widthProperty().divide(3).subtract(250-origWidth));\r\n\t\t\trect.heightProperty().bind(scene.heightProperty().divide(19));\r\n\t\t\r\n\t\tif(countDownRunning){towersRegion.getChildren().remove(2);countDownRunning=false;} // remove the count down watch from the screen\t\t\r\n\t\tspecialBrickId=null; // reset the special brick id\r\n\t}", "protected RMShape createDivideShapeRemainder(byte anEdge) { return clone(); }", "public void reset()\t{\n\t\tthis.snake.clear();\r\n\t\tdir = 1;\r\n\t\tthis.snake.add(new Dimension(2,5));\r\n\t\tthis.snake.add(new Dimension(2,6));\r\n\t\tthis.snake.add(new Dimension(2,7));\r\n\t}", "public static void negative (BufferedImage bi)\n {\n imageList.add(deepCopy(bi)); // add the image to the undo list\n int xSize = bi.getWidth();\n int ySize = bi.getHeight();\n\n for (int x = 0; x < xSize; x++)\n {\n for (int y = 0; y < ySize; y++)\n {\n // Calls method in BufferedImage that returns R G B and alpha values\n // encoded together in an integer\n int rgb = bi.getRGB(x, y);\n\n // Call the unpackPixel method to retrieve the four integers for\n // R, G, B and alpha and assign them each to their own integer\n int[] rgbValues = unpackPixel (rgb);\n int alpha = rgbValues[0];\n int red = rgbValues[1];\n int green = rgbValues[2];\n int blue = rgbValues[3];\n\n // make light areas dark, and dark areas light\n blue = 255-blue;\n red = 255-red;\n green = 255-green;\n\n int newColour = packagePixel (red, green, blue, alpha);\n bi.setRGB (x, y, newColour);\n }\n }\n redoList.add(deepCopy(bi)); // add the image to the redo list\n }", "@Override\n\tpublic void init() {\n\t\tfor(EnumStoneType type: EnumStoneType.values()) {\n\t\t\taddChiselVariation(\"stonebrick\", blockStone, type.getMetadata());\n\t\t}\n\n\t\t//Add chisel variations for Endstone Blocks\n\t\tfor(EnumEndStoneType type: EnumEndStoneType.values()) {\n\t\t\taddChiselVariation(\"endstone\", blockEndstone, type.getMetadata());\n\t\t}\n\n\t\tfor(EnumEndStoneSlabType type: EnumEndStoneSlabType.values()) {\n\t\t\taddChiselVariation(\"endstoneslab\", slabEndstone, type.getMetadata());\n\t\t}\n\n\t\t//Add chisel variations for Limestone Blocks\n\t\tfor(EnumLimestoneType type: EnumLimestoneType.values()) {\n\t\t\taddChiselVariation(\"limestone\", blockLimestone, type.getMetadata());\n\t\t}\n\n\t\tfor(EnumLimestoneSlabType type: EnumLimestoneSlabType.values()) {\n\t\t\taddChiselVariation(\"limestoneslab\", slabLimestone, type.getMetadata());\n\t\t}\n\n\t\t//Add chisel variations for Cobblestone Blocks\n\t\tfor(EnumCobblestoneType type: EnumCobblestoneType.values()) {\n\t\t\taddChiselVariation(\"cobblestone\", blockCobblestone, type.getMetadata());\n\t\t}\n\n\t\taddChiselVariation(\"cobblestoneslab\", Blocks.STONE_SLAB, 3);\n\t\tfor(EnumCobblestoneSlabType type: EnumCobblestoneSlabType.values()) {\n\t\t\taddChiselVariation(\"cobblestoneslab\", slabCobblestone, type.getMetadata());\n\t\t}\n\n\t\tfor(EnumMarbleSlabType type: EnumMarbleSlabType.values()) {\n\t\t\taddChiselVariation(\"marbleslab\", slabMarble, type.getMetadata());\n\t\t}\n\n\t\taddChiselVariation(\"stonebrickstairs\", Blocks.STONE_BRICK_STAIRS, 0);\n\t\tstairsStone.forEach(s -> addChiselVariation(\"stonebrickstairs\", s, 0));\n\n\t\tstairsEndstone.forEach(s -> addChiselVariation(\"endstonestairs\", s, 0));\n\n\t\tstairsLimestone.forEach(s -> addChiselVariation(\"limestonestairs\", s, 0));\n\n\t\taddChiselVariation(\"cobblestonestairs\", Blocks.STONE_STAIRS, 0);\n\t\tstairsCobblestone.forEach(s -> addChiselVariation(\"cobblestonestairs\", s, 0));\n\t\n\t\tstairsMarble.forEach(s -> addChiselVariation(\"marblestairs\", s, 0));\n\t\t\n\t}", "public static ChipSet getNegation(ChipSet cs) {\n\t\tChipSet newchips = new ChipSet();\n\n\t\tfor (CtColor color : cs.getColors())\n\t\t\tnewchips.setNumChips(color, -1 * cs.getNumChips(color));\n\n\t\treturn newchips;\n\t}", "private static int getByteMissingDisk(String bitsInDisk0, String bitsInDisk1, String bitsInDisk3) {\n\t\tint[] bits = new int[8];\n\t\t\n\t\twhile (bitsInDisk0.length() <= 7) {\n\t\t\tbitsInDisk0 = addNull(bitsInDisk0);\n\t\t}\n\t\t\n\t\twhile (bitsInDisk1.length() <= 7) {\n\t\t\tbitsInDisk1 = addNull(bitsInDisk1);\n\t\t}\n\t\t\n\t\twhile (bitsInDisk3.length() <= 7) {\n\t\t\tbitsInDisk3 = addNull(bitsInDisk3);\n\t\t}\n\t\t\n\t\tint bitDisk0InInt;\n\t\tint bitDisk1InInt;\n\t\tint bitDisk3InInt;\n\t\tfor(int i = 0; i <= 7; i++) {\n\t\t\t\n\t\t\tbitDisk0InInt = convertCharToInt(bitsInDisk0.charAt(i));\n\t\t\tbitDisk1InInt = convertCharToInt(bitsInDisk1.charAt(i));\t\n\t\t\tbitDisk3InInt = convertCharToInt(bitsInDisk3.charAt(i));\t\n\t\t\t\n\t\t\tint mod = (bitDisk0InInt + bitDisk1InInt) % 2;\n\t\t\tif(mod == bitDisk3InInt) {\n\t\t\t\tbits[i] = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbits[i] = 1;\n\t\t\t}\n\t\t}\n\t\tint resultByte = convertBitsToByte(bits);\n\t\treturn resultByte;\n\t}", "private static String addNull(String bitDisk) {\n\t\tbitDisk = \"0\" + bitDisk;\n\t\treturn bitDisk;\n\t}" ]
[ "0.5429146", "0.5215044", "0.51875705", "0.51807195", "0.50621617", "0.5034565", "0.49938855", "0.49938855", "0.49938855", "0.49896938", "0.4910868", "0.4893043", "0.48611668", "0.485249", "0.4841365", "0.48263356", "0.4809562", "0.4799176", "0.4780119", "0.4744383", "0.47409585", "0.47226986", "0.4689049", "0.4671602", "0.46619385", "0.46569836", "0.4652369", "0.4648944", "0.4647589", "0.46317774", "0.46198097", "0.46119958", "0.4593617", "0.4592998", "0.4591244", "0.45904082", "0.4581339", "0.45783252", "0.45757246", "0.45731345", "0.45698693", "0.45625055", "0.455835", "0.45546132", "0.4552674", "0.45492658", "0.4544445", "0.45377848", "0.45075434", "0.45060456", "0.45056674", "0.4505646", "0.45029682", "0.44942066", "0.44937223", "0.44873318", "0.44804007", "0.4479844", "0.44785464", "0.44706056", "0.44599345", "0.44598567", "0.4451591", "0.44456038", "0.4444064", "0.4441611", "0.44299337", "0.44259235", "0.44252545", "0.44204873", "0.4420379", "0.44185224", "0.4410196", "0.44017228", "0.44006765", "0.43970346", "0.43942195", "0.43899235", "0.43884858", "0.43859392", "0.43855688", "0.4379261", "0.4369297", "0.43666872", "0.4365332", "0.436244", "0.43622357", "0.4359688", "0.4358966", "0.4358966", "0.4358302", "0.43572366", "0.43531415", "0.43484825", "0.4344426", "0.43412077", "0.43372405", "0.4333365", "0.43329805", "0.43325248" ]
0.6641388
0
Custom Keybinding: Map named actions to inputs.
private void initKeys() { //add left, down, right, up playerKeys.add(new keyList(KeyInput.KEY_J, KeyInput.KEY_K, KeyInput.KEY_L, KeyInput.KEY_I)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addStandardBindings() {\n inmap = new InputMap();\n acmap = new ActionMap();\n\n Action copy = ActionTable.getAction(Actions.COPY_ACTION);\n inmap.put((KeyStroke) copy.getValue(Action.ACCELERATOR_KEY), copy.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(copy.getValue(Action.ACTION_COMMAND_KEY), copy);\n\n Action cut = ActionTable.getAction(Actions.CUT_ACTION);\n inmap.put((KeyStroke) cut.getValue(Action.ACCELERATOR_KEY), cut.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(cut.getValue(Action.ACTION_COMMAND_KEY), cut);\n\n Action paste = ActionTable.getAction(Actions.PASTE_ACTION);\n inmap.put((KeyStroke) paste.getValue(Action.ACCELERATOR_KEY), paste.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(paste.getValue(Action.ACTION_COMMAND_KEY), paste);\n\n Action help = ActionTable.getAction(Actions.HELP_ACTION);\n inmap.put((KeyStroke) help.getValue(Action.ACCELERATOR_KEY), help.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(help.getValue(Action.ACTION_COMMAND_KEY), help);\n\n Action open = ActionTable.getAction(OPEN_ACTION);\n inmap.put((KeyStroke) open.getValue(Action.ACCELERATOR_KEY), open.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(open.getValue(Action.ACTION_COMMAND_KEY), open);\n\n Action save = ActionTable.getAction(SAVE_ACTION);\n inmap.put((KeyStroke) save.getValue(Action.ACCELERATOR_KEY), save.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(save.getValue(Action.ACTION_COMMAND_KEY), save);\n\n Action newA = ActionTable.getAction(NEW_ACTION);\n inmap.put((KeyStroke) newA.getValue(Action.ACCELERATOR_KEY), newA.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(newA.getValue(Action.ACTION_COMMAND_KEY), newA);\n\n Action close = ActionTable.getAction(CLOSE_ACTION);\n inmap.put((KeyStroke) close.getValue(Action.ACCELERATOR_KEY), close.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(close.getValue(Action.ACTION_COMMAND_KEY), close);\n\n Action select = ActionTable.getAction(SELECT_ALL_ACTION);\n inmap.put((KeyStroke) select.getValue(Action.ACCELERATOR_KEY), select.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(select.getValue(Action.ACTION_COMMAND_KEY), select);\n\n Action find = ActionTable.getAction(FIND_ACTION);\n inmap.put((KeyStroke) find.getValue(Action.ACCELERATOR_KEY), find.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(find.getValue(Action.ACTION_COMMAND_KEY), find);\n\n Action group = ActionTable.getAction(GROUP_ACTION);\n inmap.put((KeyStroke) group.getValue(Action.ACCELERATOR_KEY), group.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(group.getValue(Action.ACTION_COMMAND_KEY), group);\n\n Action ungroup = ActionTable.getAction(UNGROUP_ACTION);\n inmap.put((KeyStroke) ungroup.getValue(Action.ACCELERATOR_KEY), ungroup.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(ungroup.getValue(Action.ACTION_COMMAND_KEY), ungroup);\n\n Action zoomout = ActionTable.getAction(ZOOMOUT_ACTION);\n inmap.put((KeyStroke) zoomout.getValue(Action.ACCELERATOR_KEY), zoomout.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(zoomout.getValue(Action.ACTION_COMMAND_KEY), zoomout);\n\n Action zoomin = ActionTable.getAction(ZOOMIN_ACTION);\n inmap.put((KeyStroke) zoomin.getValue(Action.ACCELERATOR_KEY), zoomin.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(zoomin.getValue(Action.ACTION_COMMAND_KEY), zoomin);\n\n Action incIn = ActionTable.getAction(INC_INPUT_NODES_ACTION);\n inmap.put((KeyStroke) incIn.getValue(Action.ACCELERATOR_KEY), incIn.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(incIn.getValue(Action.ACTION_COMMAND_KEY), incIn);\n\n Action incOut = ActionTable.getAction(INC_OUTPUT_NODES_ACTION);\n inmap.put((KeyStroke) incOut.getValue(Action.ACCELERATOR_KEY), incOut.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(incOut.getValue(Action.ACTION_COMMAND_KEY), incOut);\n\n Action decIn = ActionTable.getAction(DEC_INPUT_NODES_ACTION);\n inmap.put((KeyStroke) decIn.getValue(Action.ACCELERATOR_KEY), decIn.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(decIn.getValue(Action.ACTION_COMMAND_KEY), decIn);\n\n Action decOut = ActionTable.getAction(DEC_OUTPUT_NODES_ACTION);\n inmap.put((KeyStroke) decOut.getValue(Action.ACCELERATOR_KEY), decOut.getValue(Action.ACTION_COMMAND_KEY));\n acmap.put(decOut.getValue(Action.ACTION_COMMAND_KEY), decOut);\n }", "private void registerKeyboardActions() {\n InputMap inputMap = getInputMap(WHEN_IN_FOCUSED_WINDOW);\r\n ActionMap actionMap = getActionMap();\r\n\r\n // F1\r\n Integer key = new Integer(KeyEvent.VK_F1);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F2\r\n key = new Integer(KeyEvent.VK_F2);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F3\r\n key = new Integer(KeyEvent.VK_F3);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F4\r\n key = new Integer(KeyEvent.VK_F4);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F12\r\n key = new Integer(KeyEvent.VK_F12);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // ESCAPE\r\n key = new Integer(KeyEvent.VK_ESCAPE);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n}", "private void initKeys()\n {\n // You can map one or several inputs to one named action\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_J));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_L));\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_I));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_K));\n inputManager.addMapping(\"Orient\", new KeyTrigger(KeyInput.KEY_O));\n\n // Add the names to the action listener.\n inputManager.addListener(analogListener, \"Left\", \"Right\", \"Up\", \"Down\", \"Orient\");\n }", "private void setKeyBindings() {\n\t\tKeyboard.getPressedActions().register(\"playerMovement\",\n\t\t\t\tnew InputAction<KeyEvent>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(KeyEvent event) {\n\t\t\t\t\t\tint key = event.getKeyCode();\n\n\t\t\t\t\t\tif (key == KeyEvent.VK_W) {\n\t\t\t\t\t\t\tsetDirection(Direction.NORTH);\n\t\t\t\t\t\t} else if (key == KeyEvent.VK_S) {\n\t\t\t\t\t\t\tsetDirection(Direction.SOUTH);\n\t\t\t\t\t\t} else if (key == KeyEvent.VK_D) {\n\t\t\t\t\t\t\tsetDirection(Direction.EAST);\n\t\t\t\t\t\t} else if (key == KeyEvent.VK_A) {\n\t\t\t\t\t\t\tsetDirection(Direction.WEST);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\tKeyboard.getReleasedActions().register(\"playerMovement\",\n\t\t\t\tnew InputAction<KeyEvent>() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void actionPerformed(KeyEvent event) {\n\t\t\t\t\t\tint key = event.getKeyCode();\n\n\t\t\t\t\t\tif (key == KeyEvent.VK_W || key == KeyEvent.VK_S\n\t\t\t\t\t\t\t\t|| key == KeyEvent.VK_D || key == KeyEvent.VK_A) {\n\t\t\t\t\t\t\tsetDirection(Direction.NONE);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t}", "public void putInput(final KeyStroke keyStroke,\r\n final String actionDesc) {\r\n\r\n this.field.getInputMap().put(keyStroke, actionDesc);\r\n\r\n }", "public boolean keyInput(int code, int action);", "@Override\n public void initKeys()\n {\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_J));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_L));\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_I));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_K));\n inputManager.addMapping(\"Orient\", new KeyTrigger(KeyInput.KEY_O));\n inputManager.addMapping(\"pick target\", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));\n\n // Add the names to the listener.\n inputManager.addListener(analogListener, \"Left\", \"Right\", \"Up\", \"Down\", \"Orient\");\n inputManager.addListener(actionListener, \"pick target\");\n }", "public void bindKeys()\n {\n window.btnFurther.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(away), \"away\");\n window.btnFurther.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(away)), \"away\");\n window.btnFurther.getActionMap().put(\"away\", putAway);\n\n window.btnCloser.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(close), \"close\");\n window.btnCloser.getInputMap(JButton.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character.toUpperCase(close)), \"close\");\n }", "private void registerKeyboardActions() {\n\r\n InputMap inputMap = new InputMap();\r\n inputMap.setParent(pnlHeader.getInputMap(JComponent.\r\n WHEN_ANCESTOR_OF_FOCUSED_COMPONENT));\r\n ActionMap actionMap = pnlHeader.getActionMap();\r\n\r\n\r\n // F1\r\n Integer key = new Integer(KeyEvent.VK_F1);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F2\r\n key = new Integer(KeyEvent.VK_F2);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F2, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F3\r\n key = new Integer(KeyEvent.VK_F3);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F4\r\n key = new Integer(KeyEvent.VK_F4);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F4, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F5\r\n key = new Integer(KeyEvent.VK_F5);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // F5\r\n key = new Integer(KeyEvent.VK_F5);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F5, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F6\r\n key = new Integer(KeyEvent.VK_F6);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F6, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F7\r\n key = new Integer(KeyEvent.VK_F7);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F7, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F8\r\n key = new Integer(KeyEvent.VK_F8);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F8, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F9\r\n key = new Integer(KeyEvent.VK_F9);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F9, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F10\r\n key = new Integer(KeyEvent.VK_F10);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F10, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F11\r\n key = new Integer(KeyEvent.VK_F11);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n // F12\r\n key = new Integer(KeyEvent.VK_F12);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // ENTER\r\n key = new Integer(KeyEvent.VK_ENTER);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n\r\n // Escape\r\n key = new Integer(KeyEvent.VK_ESCAPE);\r\n inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), key);\r\n actionMap.put(key, new KeyAction(key));\r\n }", "private void prepOperatorKeys() {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('/'), \"division\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"division\", new KeyAction(ValidOperators.DIVISION));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('*'), \"multiplication\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"multiplication\", new KeyAction(ValidOperators.MULTIPLICATION));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('+'), \"addition\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"addition\", new KeyAction(ValidOperators.ADDITION));\r\n \r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke('-'), \"subtraction\");\r\n MAIN_PANEL.getActionMap()\r\n .put(\"subtraction\", new KeyAction(ValidOperators.SUBTRACTION));\r\n }", "private void initKeys() {\n app.getInputManager().addMapping(\"Drag\", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));\n app.getInputManager().addMapping(\"Left\", new MouseAxisTrigger(MouseInput.AXIS_X, true));\n app.getInputManager().addMapping(\"Right\", new MouseAxisTrigger(MouseInput.AXIS_X, false));\n app.getInputManager().addMapping(\"Up\", new MouseAxisTrigger(MouseInput.AXIS_Y, true));\n app.getInputManager().addMapping(\"Down\", new MouseAxisTrigger(MouseInput.AXIS_Y, false));\n app.getInputManager().addMapping(\"defaultCamPosition\", new KeyTrigger(KeyInput.KEY_MINUS));\n\n app.getInputManager().addMapping(\"camZOOM_Wheel_Minus\", new MouseAxisTrigger(MouseInput.AXIS_WHEEL, true));\n app.getInputManager().addMapping(\"camZOOM_Wheel_Plus\", new MouseAxisTrigger(MouseInput.AXIS_WHEEL, false));\n\n app.getInputManager().addListener(actionListener, \"defaultCamPosition\" , \"Drag\" );\n app.getInputManager().addListener(analogListener, \"Left\", \"Right\", \"Up\", \"Down\" , \"camZOOM_Wheel_Minus\" , \"camZOOM_Wheel_Plus\");\n }", "private void setUpKeys() {\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_S));\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Click\", new MouseButtonTrigger(MouseInput.BUTTON_LEFT));\n inputManager.addListener(this, \"Up\");\n inputManager.addListener(this, \"Down\");\n inputManager.addListener(this, \"Left\");\n inputManager.addListener(this, \"Right\");\n inputManager.addListener(this, \"Click\");\n }", "@Override\n\tpublic void handleKeyInputs(Map<Integer, Boolean> keys) {\n\t\t\n\t}", "default void interactWith(Key key) {\n\t}", "private void installKeyboardActions() {\n InputMap iMap = getInputMap(JComponent.\n WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);\n SwingUtilities.replaceUIInputMap(spinner, JComponent.\n WHEN_ANCESTOR_OF_FOCUSED_COMPONENT,\n iMap); }", "private void setUpKeys() {\n inputManager.addMapping(\"Left\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Right\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Up\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Down\", new KeyTrigger(KeyInput.KEY_S));\n //inputManager.addMapping(\"Shoot\", new KeyTrigger (KeyInput.KEY_LSHIFT));\n inputManager.addMapping(\"Jump\", new KeyTrigger(KeyInput.KEY_SPACE));\n inputManager.addListener(this, \"Left\");\n inputManager.addListener(this, \"Right\");\n inputManager.addListener(this, \"Up\");\n inputManager.addListener(this, \"Down\");\n \n inputManager.addListener(this, \"Jump\");\n }", "public ControlMap(Input input) {\n\t\tcontrols = new EnumMap<Action, Binding>(Action.class);\n\t\tthis.input = input;\n\t\tclear();\n\t}", "@Override\n\tpublic void onKeyInput(long window, int key, int scancode, int action,\n\t\t\tint mods) {\n\n\t}", "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "public void testShortcuts() {\n TestMode mode2 = new TestMode2();\n\n inputScheme.addMode(2, mode2);\n inputScheme.switchMode(2);\n // CMD+ALT+s\n mode2.addShortcut(new EventShortcut(ModifierKeys.ACTION | ModifierKeys.ALT, 's') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // SHIFT+TAB\n mode2.addShortcut(new EventShortcut(ModifierKeys.SHIFT, KeyCodeMap.TAB) {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // CMD+\\\n mode2.addShortcut(new EventShortcut(ModifierKeys.ACTION, '\\\\') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // ;\n mode2.addShortcut(new EventShortcut(ModifierKeys.NONE, ';') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // .\n mode2.addShortcut(new EventShortcut(ModifierKeys.ALT, '.') {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // PAGE_UP\n mode2.addShortcut(new EventShortcut(ModifierKeys.NONE, KeyCodeMap.PAGE_UP) {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n }\n );\n \n // feed in javascript keycode representations\n TestSignalEvent evt1 = new TestSignalEvent('A');\n TestSignalEvent evt2 = new TestSignalEvent('A', ModifierKeys.ACTION, ModifierKeys.ALT);\n TestSignalEvent evt3 = new TestSignalEvent('S');\n TestSignalEvent evt4 = new TestSignalEvent('S', ModifierKeys.ACTION, ModifierKeys.ALT);\n TestSignalEvent evt5 = new TestSignalEvent(KeyCode.TAB, ModifierKeys.SHIFT);\n TestSignalEvent evt6 = new TestSignalEvent(KeyCode.BACKSLASH, ModifierKeys.ACTION);\n TestSignalEvent evt7 = new TestSignalEvent(KeyCode.SEMICOLON);\n TestSignalEvent evt8 = new TestSignalEvent(KeyCode.PERIOD, ModifierKeys.ALT);\n TestSignalEvent evt9 = new TestSignalEvent(KeyCode.PAGE_UP);\n \n // evt1..3 shouldn't fire the callback, only evt4..6 should\n inputScheme.initFlag(0, 1);\n assertFalse(sendSignal(evt1));\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(evt2));\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(evt3));\n assertEquals(inputScheme.getFlag(), 0);\n assertTrue(sendSignal(evt4));\n assertEquals(inputScheme.getFlag(), 1);\n inputScheme.initFlag(0, 2);\n assertTrue(sendSignal(evt5));\n assertEquals(inputScheme.getFlag(), 2);\n inputScheme.initFlag(0, 3);\n assertTrue(sendSignal(evt6));\n assertEquals(inputScheme.getFlag(), 3);\n inputScheme.initFlag(0, 4);\n assertTrue(sendSignal(evt7));\n assertEquals(inputScheme.getFlag(), 4);\n inputScheme.initFlag(0, 5);\n assertTrue(sendSignal(evt8));\n assertEquals(inputScheme.getFlag(), 5);\n inputScheme.initFlag(0, 6);\n assertTrue(sendSignal(evt9));\n assertEquals(inputScheme.getFlag(), 6);\n \n // now try out StreamShortcuts, such as vi quit: \":q!\"\n \n mode2.addShortcut(new StreamShortcut(\":q!\") {\n @Override\n public boolean event(InputScheme scheme, SignalEvent event) {\n // callback in here\n ((TestScheme) scheme).setFlag();\n return true;\n }\n });\n \n TestSignalEvent x = new TestSignalEvent('X');\n TestSignalEvent excl = new TestSignalEvent('1', ModifierKeys.SHIFT); // !\n TestSignalEvent q = new TestSignalEvent('Q');\n TestSignalEvent upperQ = new TestSignalEvent('Q', ModifierKeys.SHIFT);\n TestSignalEvent colon = new TestSignalEvent(KeyCode.SEMICOLON, null, ModifierKeys.SHIFT);\n\n inputScheme.initFlag(0, 2);\n assertFalse(sendSignal(x)); // random entry\n assertEquals(inputScheme.getFlag(), 0);\n assertTrue(sendSignal(colon)); // beginning of command\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(upperQ)); // test uppercase vs lowercase\n assertEquals(inputScheme.getFlag(), 0);\n assertFalse(sendSignal(excl));\n assertEquals(inputScheme.getFlag(), 0);\n \n // do the combo :q!\n assertTrue(sendSignal(colon));\n assertTrue(sendSignal(q));\n assertTrue(sendSignal(excl));\n assertEquals(inputScheme.getFlag(), 2); // triggers callback\n assertFalse(sendSignal(x)); // should reset\n }", "private void setupKeyBindings(){\n // CTRL Z\n KeyStroke ctrl_z = KeyStroke.getKeyStroke(\"control Z\");\n getActionMap().put(\"ctrl_z\", new AbstractAction() {\n @Override\n public void actionPerformed(ActionEvent e) {\n undo();\n repaint();\n }\n });\n getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(ctrl_z,\"ctrl_z\");\n }", "void bindKeys() {\n // ahh, the succinctness of java\n KeyboardFocusManager kfm = KeyboardFocusManager.getCurrentKeyboardFocusManager();\n\n kfm.addKeyEventDispatcher( new KeyEventDispatcher() {\n public boolean dispatchKeyEvent(KeyEvent e) {\n String action=null;\n if(e.getID() != KeyEvent.KEY_PRESSED) \n return false;\n if(e.getModifiers() != 0)\n return false;\n switch(e.getKeyCode()) {\n case KeyEvent.VK_UP:\n action = \"forward\";\n movingForward=true;\n turnval = 0;\n break;\n case KeyEvent.VK_DOWN:\n action=\"backward\";\n movingForward=false;\n turnval = 0;\n break;\n case KeyEvent.VK_LEFT:\n if(movingForward) {\n turnval = (turnval==0) ? 100 : turnval-turnval/2;\n if(turnval<10) { action=\"spinleft\"; turnval=0; }\n else action = \"turn\"+turnval;\n }\n else action = \"spinleft\";\n //action = (movingForward) ? \"turn100\" : \"spinleft\";\n break;\n case KeyEvent.VK_RIGHT:\n if(movingForward) {\n turnval = (turnval==0) ? -100 : turnval-turnval/2;\n if(turnval>-10) { action=\"spinright\"; turnval=0; }\n else action = \"turn\"+turnval;\n }\n else action = \"spinright\";\n //action = (movingForward) ? \"turn-100\" : \"spinright\";\n break;\n case KeyEvent.VK_SPACE:\n action=\"stop\";\n movingForward=false;\n turnval = 0;\n break;\n case KeyEvent.VK_L:\n action=\"blink-leds\";\n break;\n case KeyEvent.VK_R:\n action=\"reset\";\n break;\n case KeyEvent.VK_T:\n action=\"test\";\n break;\n case KeyEvent.VK_V:\n vacuuming = !vacuuming;\n action = (vacuuming) ? \"vacuum-on\":\"vacuum-off\";\n break;\n case KeyEvent.VK_1:\n action=\"50\";\n break;\n case KeyEvent.VK_2:\n action=\"100\";\n break;\n case KeyEvent.VK_3:\n action=\"150\";\n break;\n case KeyEvent.VK_4:\n action=\"250\";\n break;\n case KeyEvent.VK_5:\n action=\"400\";\n break;\n case KeyEvent.VK_6:\n action=\"500\";\n break;\n }\n\n if(action!=null)\n getCurrentTab().actionPerformed(new ActionEvent(this,0,action));\n //System.out.println(\"process '\"+e.getKeyCode()+\"' \"+e);\n return true;\n } \n });\n }", "BaseAction(int key, String name) {\n this.key = key;\n this.name = name;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n String action = e.getActionCommand();\n\n\n if (action.equals(keys[2])){\n //用户按下C\n handleC();\n }else if (action.equals(keys[3])){\n //用户按下退格\n handleBackspace();\n }else if (action.equals(keys[18])){\n //用户按下=\n handleCalc();\n }else{\n //用户输入表达式\n handleExpression(action);\n }\n }", "protected void keyTyped(char par1, int par2) {}", "@Override\n\tpublic void keyTyped(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_KP_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_KP_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\t\n\t}", "private void prepKeyBindings() { \r\n prepNumberKeys();\r\n prepOperatorKeys();\r\n prepSupplementalKeys();\r\n }", "@Override\r\n\t\tpublic ActionMap getHotKeysActionMapper() {\n\t\t\treturn null;\r\n\t\t}", "@Override\r\n\tpublic void actionMapper(String action) {\n\t\tProperty prop = javaScriptWindow.propertyTable.getPropertyTable()\r\n\t\t\t\t.getSelectedProperty();\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.SAVEASNEWBUTTON)) {\r\n\t\t\tsaveAsNewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.NEWBUTTON)) {\r\n\t\t\tnewButtonAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.LOADBUTTON)) {\r\n\t\t\tloadButtonAction();\r\n\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(JavaScriptConstants.SEARCHTEXTBOX)) {\r\n\t\t\tsearchTextAction();\r\n\t\t}\r\n\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.RIGHTSIDECENTERTABLE)) {\r\n\t\t\trightSideCenterTableAction();\r\n\t\t}\r\n\t\tif (action.equalsIgnoreCase(CommonConstants.DELETEBUTTON)) {\r\n\t\t\tdeleteButtonAction();\r\n\t\t}\r\n\t}", "private void prepNumberKeys() {\r\n int numDigits = 10;\r\n for (int i = 0; i < numDigits; i++) {\r\n MAIN_PANEL.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT)\r\n .put(KeyStroke.getKeyStroke((char) ('0' + i)), \"key\" + i);\r\n MAIN_PANEL.getActionMap()\r\n .put(\"key\" + i, new KeyAction(String.valueOf(i)));\r\n } \r\n }", "private void createActions() {\r\n\t\tcreateBlankDocument.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control N\"));\r\n\t\tcreateBlankDocument.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_N);\r\n\t\t\r\n\t\topenDocumentAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control O\"));\r\n\t\topenDocumentAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_O);\r\n\t\t\r\n\t\tsaveDocumentAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control S\"));\r\n\t\tsaveDocumentAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_S);\r\n\t\t\r\n\t\tsaveDocumentAsAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt S\"));\r\n\t\tsaveDocumentAsAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_S);\r\n\t\t\r\n\t\tcloseCurrentTabAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control W\"));\r\n\t\tcloseCurrentTabAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_W);\r\n\r\n\t\tcopyAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control C\"));\r\n\t\tcopyAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_C);\r\n\r\n\t\tcutAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control X\"));\r\n\t\tcutAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_X);\r\n\t\r\n\t\tpasteAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control V\"));\r\n\t\tpasteAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_V);\r\n\r\n\t\tgetStatsAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt I\"));\r\n\t\tgetStatsAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_I);\r\n\t\t\r\n\t\ttoUpperCaseAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control U\"));\r\n\t\ttoUpperCaseAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_U);\r\n\t\t\r\n\t\ttoLowerCaseAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control L\"));\r\n\t\ttoLowerCaseAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_L);\r\n\t\t\r\n\t\tinvertSelected.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control I\"));\r\n\t\tinvertSelected.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_I);\r\n\t\t\r\n\t\tuniqueLinesAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"control Q\"));\r\n\t\tuniqueLinesAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_Q);\r\n\t\t\r\n\t\tsortAscAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt A\"));\r\n\t\tsortAscAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_A);\r\n\t\t\r\n\t\tsortDescAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt D\"));\r\n\t\tsortDescAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_D);\r\n\r\n\t\texitAction.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(\"alt F4\"));\r\n\t\texitAction.putValue(Action.MNEMONIC_KEY, KeyEvent.VK_X);\r\n\t}", "private void Mnemonicos() {\n Action action = new AbstractAction(\"Guardar\") {\n @Override\n public void actionPerformed(ActionEvent e) {\n onClickCrearCta();\n }\n };\n action.putValue(Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0));\n crearCtaBtn.setAction(action);\n crearCtaBtn.getActionMap().put(\"myAction\", action);\n crearCtaBtn.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put((KeyStroke) action.getValue(Action.ACCELERATOR_KEY), \"myAction\");\n }", "private static void bind(int Character) {\n frame.getRootPane().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put(KeyStroke.getKeyStroke(Character,\n Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()),\"console\"); \n }", "public void addActionKey(String name, InputKey key) {\n synchronized(actions) {\n InputAction action = actions.get(name);\n if(action == null)\n actions.put(name, action = new InputAction());\n action.addKey(key);\n }\n }", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\tswitch(arg0.getExtendedKeyCode()){\n\t\t\tcase KeyEvent.VK_DOWN:\n\t\t\t\tlast = new AgentAction(Maze.SOUTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_UP:\n\t\t\t\tlast = new AgentAction(Maze.NORTH);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_LEFT:\n\t\t\t\tlast = new AgentAction(Maze.WEST);\n\t\t\t\tbreak;\n\t\t\tcase KeyEvent.VK_RIGHT:\n\t\t\t\tlast = new AgentAction(Maze.EAST);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\t\t\t\n\t\t}\t\n\t\ttest.setText(Integer.toString(arg0.getExtendedKeyCode()));\n\t}", "@Generated\n @Selector(\"keyCommandWithInput:modifierFlags:action:\")\n public static native UIKeyCommand keyCommandWithInputModifierFlagsAction(@NotNull String input,\n @NInt long modifierFlags, @NotNull SEL action);", "public void onKeyPress(Widget sender, char keyCode, int modifiers) {\n }", "private void setKey(Input input, KeyCode keyCode) {\n inputsMap.put(input, keyCode);\n }", "@Override\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t\n\t\t}", "public void input(){\n\t\tboolean[] inputKeyArray = inputHandler.processKeys();\n\t\tint[] inputMouseArray = inputHandler.processMouse();\n\t\tcurrentLevel.userInput(inputKeyArray, inputMouseArray);\n\t}", "@Override\n\tpublic void invoke(long window, int key, int scancode, int action, int mods) {\n\n\t\t\n\t\tint vk = GLFWInput.keyGlfwToVk(key);\n\t\tint vkAction = GLFWInput.stateGlfwToInput(action);\n\t\tint vbMods = GLFWInput.modGlfwToInput(mods);\n\t\tint vbScanCode = scancode; // scancodeGlfwToInput not needed because there is no known scancodes\n\t\t\n\t\tKeyInputEvent event = eventPool.getObject();\n\t\ttry {\n\t\t\tinputProducer.postKeyInput(event.set(window, vk, vbScanCode, vkAction, vbMods));\t\n\t\t}\n\t\tfinally {\n\t\t\teventPool.returnObject(event);\n\t\t}\n\t}", "private void initializeKeyBoardActions(){\n\r\n\r\n registerKeyboardAction(new java.awt.event.ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n cutMenuItem_actionPerformed(e);}},\r\n \"Cut\",\r\n KeyStroke.getKeyStroke('X', Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false),\r\n JComponent.WHEN_FOCUSED);\r\n registerKeyboardAction(new java.awt.event.ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n copyMenuItem_actionPerformed(e);}},\r\n \"Copy\",\r\n KeyStroke.getKeyStroke('C', Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false),\r\n JComponent.WHEN_FOCUSED);\r\n registerKeyboardAction(new java.awt.event.ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n pasteMenuItem_actionPerformed(e);}},\r\n \"Paste\",\r\n KeyStroke.getKeyStroke('V', Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false),\r\n JComponent.WHEN_FOCUSED);\r\n\r\n\r\n registerKeyboardAction(new java.awt.event.ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n selectAllMenuItem_actionPerformed(e);}},\r\n \"Select All\",\r\n KeyStroke.getKeyStroke('A', Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false),\r\n JComponent.WHEN_FOCUSED);\r\n\r\n registerKeyboardAction(new java.awt.event.ActionListener() {\r\n public void actionPerformed(ActionEvent e) {\r\n deleteMenuItem_actionPerformed(e);}},\r\n \"Delete\",\r\n KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0),\r\n JComponent.WHEN_FOCUSED);\r\n\r\n\r\n}", "public void handleKeyEvent(int id, int keyCode, char keyChar, int modifier) { }", "@Override\r\n public void keyPressed( KeyEvent cIniKeyEvent)\r\n {\n }", "public abstract int getKeybind();", "protected void declareGlobalActionKeys() {\n\r\n }", "public void addKeys() {\n String[] keyArray = {\"SPACE\", \"W\", \"A\", \"S\", \"D\", \"RIGHT\", \"LEFT\",\n \"UP\", \"DOWN\", \"control E\", \"R\"};\n GameContainer.input.addInputKey(keyArray);\n }", "@Override\n\tpublic void keyPressed(int code, char v) {\n\t\tfor (int i = 0; i < keyBindings.size(); i++) {\n\t\t\t((KeyBinding) keyBindings.values().toArray()[i]).onKeyDown(code);\n\t\t}\n\t}", "public KeyboardActionRegister(RichDialogGridBagPanel panel, KeyStroke keyStroke, String methodName) {\r\n this.panel = panel;\r\n this.methodName = methodName;\r\n this.keyStroke = keyStroke;\r\n }", "@Override\n public void keyPressed(KeyEvent e) {\n keys[e.getKeyCode()]=true;\n for(int i=0;i<keyBind.length;i++){\n keyBind[i]=keys[keyn[i]];\n }\n }", "@Override\r\n\tpublic void handle(KeyEvent event) {\n\t}", "@Override\n public void nativeKeyAction(int keyCode) {\n getProgramController().nativeKeyAction(keyCode);\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\r\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent key) {\n\t\tStateEnum currentState = stateControllerManager.getCurrentState();\n\t\tUserActionEnum action = keyboardActionMapping.get(key.getKeyCode());\n\t\tif(action != null) {\n\t\t\tstateControllers.get(currentState).handleAction(action);\n\t\t}\n\n\t}", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\n\t}", "private void initializeKeyBoardActions() {\n\t\tpairsListView.setOnKeyPressed(event -> {\n\t\t\tif (KeyCode.DELETE == event.getCode()) {\n\t\t\t\tremoveSelectedAction();\n\t\t\t}\n\t\t});\n\t\tfirstListView.setOnKeyPressed(this::handleListViewKeys);\n\t\tsecondListView.setOnKeyPressed(this::handleListViewKeys);\n\t}", "void keyPressed(String code);", "@Override\n\t\t\t\tpublic void keyPressed(KeyEvent arg0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic void setInputMap(HashMap<String, Controller> map)\n\t{\n\t\tthis.map = map;\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0) {\n\n\t}", "public void setupKeyboardShortcuts() {\n // Setup ctrl+S combination to fire save button\n editor.getScene().getAccelerators().put(new KeyCodeCombination(KeyCode.S, KeyCombination.SHORTCUT_DOWN), () -> {\n if (!editor.save_button.isDisabled()) {\n editor.save_button.fire();\n }\n });\n }", "public abstract void keyboardInput();", "@Override\n\tpublic void arrowInput(int keyCode) {\n\t\t\n\t}", "@Override\n\tpublic void keyPressed() {\n\t\t\n\t}", "ActionMap createActionMap() {\n ActionMap map = new ActionMapUIResource();\n Action[] actions = editor.getActions();\n //System.out.println(\"building map for UI: \" + getPropertyPrefix());\n int n = actions.length;\n for (int i = 0; i < n; i++) {\n Action a = actions[i];\n map.put(a.getValue(Action.NAME), a);\n //System.out.println(\" \" + a.getValue(Action.NAME));\n }\n map.put(TransferHandler.getCutAction().getValue(Action.NAME),\n TransferHandler.getCutAction());\n map.put(TransferHandler.getCopyAction().getValue(Action.NAME),\n TransferHandler.getCopyAction());\n map.put(TransferHandler.getPasteAction().getValue(Action.NAME),\n TransferHandler.getPasteAction());\n return map;\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void keyPressed(KeyEvent arg0) {\n\t\t\r\n\t}", "private void addAction( List actions, String label, List paramExtractors,\n int pos )\n {\n PSMapPair entry = new PSMapPair( label, paramExtractors );\n\n if ( pos <= 0 )\n actions.add( 0, entry);\n else if ( pos > actions.size())\n actions.add( entry);\n else\n actions.add( pos, entry);\n }", "@Override\r\n\tpublic void keyPressed(KeyEvent keyPressed)\r\n\t{\r\n\t\t\r\n\t}", "@Override\n public void keyPressed(KeyEvent e) {}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void keyPressed(KeyEvent arg0) {\n\t\t\t\t\n\t\t\t}", "public void hitKey() {\n }", "@DefaultMessage(\"Enter information in the fields, then press Commit.\")\n @Key(\"gen.enterInformationPressCommit\")\n String gen_enterInformationPressCommit();", "public void keyPressed(KeyEvent e) {}", "protected void processInputs() {\n\t\twhile (InputInfo.size() > 0) {\n\t\t\tInputInfo info = InputInfo.get();\n\n\t\t\tif (info.kind == 'k' && (info.action == GLFW_PRESS\n\t\t\t\t\t|| info.action == GLFW_REPEAT)) {\n\t\t\t\tint code = info.code;\n\n\t\t\t}// input event is a key\n\t\t\telse if (info.kind == 'm') {// mouse moved\n\t\t\t\t// System.out.println( info );\n\t\t\t} else if (info.kind == 'b') {// button action\n\t\t\t\t// System.out.println( info );\n\t\t\t}\n\n\t\t}// loop to process all input events\n\n\t}", "@Override\n\tpublic void execute(InputKeyEvent event)\n\t{\n\t\tif(event.keyCode() == this.keyCode)\n\t\t\tkeyPressed = event.pressed();\n\t\t\n\t\t// Execute related event\n\t\tif(keyPressed)\n\t\t\tstrategy.execute(event);\n\t\t\t\n\t}", "@Override\n\tpublic void keyPressed(KeyEvent arg0)\n\t{\n\t\t\n\t}", "@SuppressWarnings(\"serial\")\n private void enableStartupKeys() {\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_C, 0), \"controls\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_A, 0), \"about\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_E, 0), \"end game\");\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), \"new game\");\n\n getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_N, 0), \"new game\");\n getActionMap().put(\"new game\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n endGame();\n if (myGameOver || myWelcome) {\n startNewGame();\n }\n }\n });\n\n getActionMap().put(\"controls\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n pauseTimer();\n displayControlDialog();\n if (!myWelcome) {\n startTimer();\n }\n }\n });\n\n getActionMap().put(\"about\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n pauseTimer();\n displayAboutDialog();\n if (!myWelcome) {\n startTimer();\n }\n }\n });\n\n getActionMap().put(\"end game\", new AbstractAction() {\n @Override\n public void actionPerformed(final ActionEvent theEvent) {\n endGame();\n }\n });\n }", "public Action newAction(Object key) {\n\t\tif (key == null)\n\t\t\tthrow new IllegalArgumentException(\"No legal key passed!\");\n\t\tif (super.containsKey(key))\n\t\t\tthrow new IllegalArgumentException(\n\t\t\t\t\t\"Allready kontains a mapping for that key!\");\n\t\tAction action = new ActionForward();\n\t\tsuper.put(key, action);\n\t\tactionList.add(action);\n\t\treturn action;\n\t}", "@Override\n public void onAction(String binding, boolean isPressed, float tpf) {\n\n switch (binding) {\n case \"Up\":\n up = isPressed;\n break;\n case \"Down\":\n down = isPressed;\n break;\n case \"Left\":\n left = isPressed;\n break;\n case \"Right\":\n right = isPressed;\n break;\n case \"Click\":\n click = isPressed;\n break;\n default:\n break;\n }\n\n }", "@Test\n public void testNonStringActionKeys() {\n JXTable table = new JXTable();\n Action l = new AbstractAction(\"dummy\") {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n // TODO Auto-generated method stub\n \n }\n \n };\n table.registerKeyboardAction(l , KeyStroke.getKeyStroke(\"ESCAPE\"), JComponent.WHEN_FOCUSED);\n table.setColumnControlVisible(true);\n table.getColumnControl();\n }", "private void initKeybinds() {\n spellbind1 = KeyBindingHelper.registerKeyBinding(new KeyBinding(\n \"key.malazan.spell1\", // The translation key of the keybinding's name\n InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n GLFW.GLFW_KEY_Z, // The keycode of the key\n \"category.malazan.spells\"\n ));\n // The translation key of the keybinding's name\n // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n // The keycode of the key\n // The translation key of the keybinding's category.\n spellbind2 = KeyBindingHelper.registerKeyBinding(new KeyBinding(\n \"key.malazan.spell2\", // The translation key of the keybinding's name\n InputUtil.Type.KEYSYM, // The type of the keybinding, KEYSYM for keyboard, MOUSE for mouse.\n GLFW.GLFW_KEY_X, // The keycode of the key\n \"category.malazan.spells\" // The translation key of the keybinding's category.\n ));\n }", "private void KeyActionPerformed(java.awt.event.ActionEvent evt) {\n }", "@Override\r\n\t\t\tpublic void keyPressed(KeyEvent arg0)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.68691844", "0.6709685", "0.64483935", "0.618849", "0.6125379", "0.60649943", "0.60281223", "0.5966863", "0.59096044", "0.58873606", "0.5813006", "0.58100194", "0.5801122", "0.579321", "0.5774507", "0.57584053", "0.57436734", "0.5721829", "0.5704422", "0.5703563", "0.5686481", "0.5644106", "0.5552631", "0.5531452", "0.5524265", "0.5515493", "0.54970044", "0.5493872", "0.54915315", "0.54895794", "0.548348", "0.547145", "0.54599386", "0.5442689", "0.5414812", "0.5387876", "0.53569597", "0.53303516", "0.53252566", "0.529495", "0.52936983", "0.528835", "0.52780086", "0.52744466", "0.5263509", "0.5262429", "0.5260571", "0.52474356", "0.52433234", "0.52303284", "0.52182066", "0.5207581", "0.52055824", "0.51896435", "0.5179675", "0.51749825", "0.51711375", "0.51711375", "0.51711375", "0.51711375", "0.5170981", "0.51627284", "0.5162261", "0.5153075", "0.51446825", "0.51446825", "0.51446825", "0.51446825", "0.51403886", "0.51292485", "0.51281226", "0.5127338", "0.51247865", "0.5114049", "0.5114049", "0.5114049", "0.5114049", "0.5114049", "0.51105684", "0.5099444", "0.50980324", "0.5097097", "0.5097097", "0.5097097", "0.5097097", "0.5092498", "0.50922376", "0.5085722", "0.5083598", "0.5081371", "0.5080322", "0.506876", "0.5063426", "0.50602895", "0.5057296", "0.5051005", "0.5046979", "0.5045097", "0.50445306", "0.50445306", "0.50445306" ]
0.0
-1
Disposal Method to destroy all resources when game terminates
@Override public void dispose() { super.dispose(); AssetLoader.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void dispose() {\n\t\ttexture.dispose();\n\t\tcoin.dispose();\n\t\tflap.dispose();\n\t\tdead.dispose();\n\t\tfont.dispose();\n\t\tshadow.dispose();\n\t}", "@Override\n public void dispose() {\n background.dispose();\n logo.dispose();\n game.dispose();\n batch.dispose();\n mySkin.dispose();\n stage.dispose();\n }", "public void dispose() {\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.deactivatePhysics(world);\n\t\t}\n\t\tobjects.clear();\n\t\taddQueue.clear();\n\t\tworld.dispose();\n\t\tobjects = null;\n\t\taddQueue = null;\n\t\tbounds = null;\n\t\tscale = null;\n\t\tworld = null;\n\t\tcanvas = null;\n\t\t\n\t\tclickSound.dispose();\n\t\t\n\t\tlightingSound.dispose();\n\t\t\n\t}", "@Override\r\n public void dispose() {\r\n map.dispose();\r\n player.dispose();\r\n enemy.dispose();\r\n }", "public void shutdown() {\n\t\tInput.cleanUp();\n\t\tVAO.cleanUp();\n\t\tTexture2D.cleanUp();\n\t\tResourceLoader.cleanUp();\n\t}", "public void freeAll()\n\t\t{\n\t\t\ts_cGameInstance = null; \n\t\t}", "@Override\n\tpublic void dispose() {\n\t\tGdx.app.log(\"GameScreen\", \"Disposing\");\n\n\t}", "@Override\n public void destroy() {\n // clean up any resources created by initialize\n }", "@Override\n\tpublic void dispose() {\n\t\tmap.dispose();\n\t\trenderer.dispose();\n\t\tworld.dispose();\n\t\tb2dr.dispose();\n\t\tbatch.dispose();\n\t\t//hud.dispose();\n\t}", "public void destroy() {\n destroyIn(0);\n }", "public void dispose () {\r\n \t\trefCount--;\r\n \t\tif (refCount > 0) return;\r\n \t\tif (meshes.get(Gdx.app) != null) meshes.get(Gdx.app).remove(this);\r\n \t\tvertices.dispose();\r\n \t\tindices.dispose();\r\n \t}", "protected void dispose()\n {\n TextureLoader.disposeTextures();\n TileRender.dispose();\n EntityRender.dispose();\n ItemRender.dispose();\n fontRender.dispose();\n background_render.dispose();\n target_render.dispose();\n box_render.dispose();\n Shader.disposeAll();\n }", "@Override\n public void dispose() {\n batch.dispose();\n playerTexture.dispose();\n world.dispose();\n b2dr.dispose();\n }", "public void dispose()\n {\n if(mapaActual!=null)\n this.mapaActual.dispose();\n \n //Descarga de los recursos gráficos en animaciones\n for( Animation<TextureRegion>[] animaciones: this.mapaAnimaciones.values())\n {\n for(Animation<TextureRegion> an :animaciones)\n {\n for (TextureRegion tx : an.getKeyFrames())\n tx.getTexture().dispose();\n }\n }\n \n //Descarga de los efectos de sonido\n for(Map.Entry<String, Sound>efecto:this.mapaEfectosSonido.entrySet())\n efecto.getValue().dispose();\n \n //Descarga de la musica de fondo\n if(musicaFondo!=null)\n musicaFondo.dispose();\n \n //Descarga de los Skins\n SKIN_PROPIO.dispose();\n }", "@Override\n\tpublic void onExit() {\n\t\tlabelHelp = null;\n\t\tlayer_force = null;\n\t\tmSoundBtn = null;\n\t\tboxMessage = null;\n\n\t\tSystem.gc();\n\t\tsuper.onExit();\n\t}", "public void destroy() {\n this.game.deleteObject(this);\n }", "protected void finalize() {\n\t\tdestroyImages();\n\t}", "@Override\n\tpublic void dispose() {\n\t\tdropImage.dispose();\n\t\tbaddroplet.dispose();\n\t\tdeathraindropImage.dispose();\n\t\tbucketImage.dispose();\n\t\tdropSound.dispose();\n\t\tskinButton.dispose();\n\t\tfont.dispose();\n\t\tbuttonAtlas.dispose();\n\t\trainMusic.dispose();\n\t\tbatch.dispose();\n\t\tstage.dispose();\n\t}", "@Override\r\n public void dispose()\r\n {\r\n\t_level.disposeData();\r\n\t_printText = null;\r\n\t_coin = null;\r\n\tSoundLibrary.getInstance().stop(MUSIC_LEVEL);\r\n\tCamera.getInstance().clearObservers();\r\n }", "@Override\n public void dispose() {\n font.dispose();\n background.dispose();\n if (triggered) {\n stage.dispose();\n }\n }", "protected void cleanupOnClose() {\n\t}", "public void dispose() {\n\t\tthis.shape_renderer.dispose();\n\t\tthis.sprite_renderer.dispose();\n\t}", "public void destroy() {\r\n Display.destroy();\r\n System.exit(0);\r\n }", "private void exit() {\n dispose();\r\n }", "public void dispose() {\n story = null;\n backlog = null;\n parent = null;\n }", "public void dispose() {\n planetSprites.forEach(sprite -> sprite.getTexture().dispose());\n flagSprites.forEach(sprite -> sprite.getTexture().dispose());\n }", "void onCleanup() {\n\t\tdimensionMap.forEachValue(e -> {\n\t\t\te.releaseAllChunkData();\n\t\t\treturn true;\n\t\t});\n\t\tdimensionMap.clear();\n\t\tconnectedPlayers.clear();\n\t}", "public void destroy() {\r\n\t\ttexture.destroy();\r\n\t}", "public void dispose() {\n\t\tglfwFreeCallbacks(window);\n\t\tglfwDestroyWindow(window);\n\t\tsuper.dispose();\n\t}", "@Override\n\tpublic void dispose() {\n\t\tbackground.dispose();\n\t\ttexture.dispose();\n\t\ttexture2.dispose();\n\t\tspriteBatch.dispose();\n\t\tclient.removeListener(listener);\n\t\tui.dispose();\n\t}", "public void dispose() {\n equipment.dispose();\n inventory.dispose();\n }", "public static void dispose()\n {\n for (int texture:allTextures)\n {\n glDeleteTextures(texture);\n }\n }", "@Override\n public void dispose() {\n spriteBatchLayer.dispose();\n imageAnimationActor.dispose();\n translateAnimationActor.dispose();\n assetManager.dispose();\n }", "public void destroy() {}", "public void destroy() {}", "@Override\n public void dispose() {\n Assets.instance.dispose();\n batch.dispose();\n grayScaleView.dispose();\n }", "public final void destroy() {\n requestExit();\n }", "@Override\n\tpublic void dispose() {\n\t\tdestroy();\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "public void destroy() {\n\t\t\r\n\t}", "@Override\n public void dispose() {\n reader.writeToServer(\"Stop\\n\");\n disconnect();\n if (gameScreen != null)\n gameScreen.dispose();\n if (mainMenuScreen != null)\n mainMenuScreen.dispose();\n\n }", "public static void destroy() {\n\t}", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void destroy();", "public void cleanup();", "public void destroy()\r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tSystem.gc();\r\n\t}", "public void destroy() {\r\n\r\n\t}", "@Override\n\tpublic void onDestroy() {\n\t\tquitAllFocus();\n\t\timg.setImageBitmap(null);\n\t\tclearMemory();\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\t//GARBAGE COLLECTOR\n\t\t\tSystem.gc();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "public void release() {\n\n mTextureRender = null;\n mSurfaceTexture = null;\n }", "public void destroy() {\r\n }", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void destroy() {\n\t\t\n\t}", "public void dispose() {\r\n\t\tquit();\r\n\t}", "public void destroy()\r\n\t{\r\n\t}", "@Override\n public void destroy() {\n // destroy any persistent resources\n // such as thread pools or persistent connections\n }", "public static void destroy() {\n handler = null;\n initialized = false;\n }", "public void destroy() {\n \t\n }", "public void cleanup() {\r\n }", "public void dispose () {\n\t\twhile(!stack.isEmpty()) {\n\t\t\tstack.pop().dispose();\n\t\t}\n\t}", "public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }", "public void destroy()\r\n {\r\n }", "@Override\n\tpublic void dispose()\n\t{\n\t\tsuper.dispose();\n\t\tm_pokemon = null;\n\t\tm_boxes = null;\n\t\tm_friends = null;\n\t\tm_bag = null;\n\t\tm_currentShop = null;\n\t\tm_battleField = null;\n\t}", "@Override\n public void dispose(){\n int i;\n String message;\n for (i = disposables.size()-1; i>=0;i--){\n if (logging) {\n Gdx.app.log(TAG, names.get(i));\n }\n disposables.get(i).dispose();\n }\n disposables.clear();\n names.clear();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\t//destroy all running hardware/db etc.\n\t}", "public void destroy() {\n this.alive = false;\n }", "public final void destroy()\n {\n processDestroy();\n super.destroy();\n }", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "public void destroy() {\n\t}", "private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}", "public void destroy() {\n\r\n\t}", "public void destroy() {\n\r\n\t}", "public void destroy() {\n\r\n\t}", "public void destroy() {\n\r\n\t}", "public void destroy() {\n\r\n\t}", "public void destroy(){\n runner.destroy();\n }" ]
[ "0.7963949", "0.7776638", "0.77074283", "0.7620322", "0.7596121", "0.759525", "0.74702835", "0.74165326", "0.7411671", "0.7410868", "0.740023", "0.73898804", "0.73595166", "0.73581666", "0.73453546", "0.73241216", "0.73123425", "0.72921616", "0.72827667", "0.7280445", "0.7280366", "0.72761047", "0.72754806", "0.72730374", "0.7255759", "0.72479045", "0.72465616", "0.7244607", "0.72378385", "0.7237519", "0.72338223", "0.72301596", "0.7212743", "0.72113794", "0.72113794", "0.7207795", "0.7207581", "0.7203958", "0.72011054", "0.72011054", "0.72011054", "0.72011054", "0.7198661", "0.719739", "0.7183204", "0.7183204", "0.7183204", "0.7183204", "0.7183204", "0.7183204", "0.7183204", "0.7183204", "0.7180719", "0.7174127", "0.71637726", "0.7160227", "0.715648", "0.7154622", "0.713937", "0.7138863", "0.7138863", "0.7138863", "0.7138863", "0.7138863", "0.7138863", "0.71364504", "0.71304256", "0.71226174", "0.71162754", "0.7105033", "0.71049255", "0.7101921", "0.70995307", "0.7098253", "0.7091901", "0.70854247", "0.7082466", "0.7077641", "0.7071751", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.70700854", "0.7069728", "0.7068246", "0.7068246", "0.7068246", "0.7068246", "0.7068246", "0.7068123" ]
0.0
-1
TODO Autogenerated method stub
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_HOME || keyCode == KeyEvent.KEYCODE_SEARCH) { Music.getInstance(mContext).stop(); } return super.onKeyDown(keyCode, event); }
{ "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
Provides a way for the view to show the values of the model. Is called from the single constructor of the class.
private void setupView() { view.setName(advertisement.getTitle()); view.setPrice(advertisement.getPrice()); view.setDescription(advertisement.getDescription()); view.setDate(advertisement.getDatePublished()); view.setTags(advertisement.getTags()); setCondition(); if (advertisement.getImageUrl() != null) { //the url here is null right after upload view.setImageUrl(advertisement.getImageUrl()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ViewStudent() {\n initComponents();\n DB_Connection();\n DisplayInitialValues();\n }", "@Override\r\n\tpublic void setModel() {\n\t}", "public ViewDataIn() {\n initComponents();\n }", "public FinancialAssessmentEntityValuesView() {\n this(DSL.name(\"financial_assessment_entity_values_view\"), null);\n }", "public void initView() {\n\t\t view.initView(model);\t \n\t }", "public ViewProperty() {\n initComponents();\n }", "public resultview() {\n initComponents();\n }", "public UserView() {\n initComponents();\n new UserDaoImp().createTable();\n displayDataIntoTable();\n displayDataAtComboBox();\n\n }", "public ViewObject(ActivityInstance instance)\n {\n // Populate fields\n this.templateId = instance.getTemplate().getId();\n this.name = instance.getName();\n this.description = instance.getDescription();\n this.paramValues = instance.getParameterValues();\n }", "public BaseView() {\r\n\t\tsuper();\r\n\t\tthis.modelView = new BaseModelView();\r\n\t\tthis.buildLayout();\r\n\t\tthis.setVisible(true);\r\n\t}", "public ResultJsonView() {\r\n }", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initView() {\n\t\t\r\n\t}", "public void buildModel(){\r\n\t\t\r\n\t\tsuper.buildModel();\r\n\t\t\r\n\t}", "public void displayModelDetails() {\n System.out.println(\"Name: \" + getFirstName() + \" \" + getLastName());\n System.out.println(\"Height: \" + getHeightInFeetAndInches());\n System.out.println(\"Weight: \" + getWeight() + \" pounds\");\n String travelMessage = canTravel ? \"yep\" : \"nope\";\n System.out.println(\"Travels: \" + travelMessage);\n String smokeMessage = smokes ? \"yep\" : \"nope\";\n System.out.println(\"Smokes\" + smokeMessage);\n System.out.println(\"Hourly rate: $\" + calculatePayDollarsPerHour());\n }", "@Override\n\tprotected void initView()\n\t{\n\n\t}", "public View() {\n\t\tlastBlk = new HashMap<>();\n\t\tstate = new HashMap<>();\n\t\tbalance = new HashMap<>();\n\t\tmode = new HashMap<>();\n\t\ttoken = new HashMap<>();\n\t}", "public View() {\n initComponents();\n }", "public PropertiesView(){\n\n\t\tbtnDescTemplate = new DescTemplateWidget(this);\n\t\tbtnCalculation = new DescTemplateWidget(this);\n\n\t\ttable.setWidget(0, 0, new Label(LocaleText.get(\"text\")));\n\t\ttable.setWidget(1, 0, new Label(LocaleText.get(\"helpText\")));\n\t\ttable.setWidget(2, 0, new Label(LocaleText.get(\"type\")));\n\t\ttable.setWidget(3, 0, new Label(LocaleText.get(\"binding\")));\n\t\ttable.setWidget(4, 0, new Label(LocaleText.get(\"visible\")));\n\t\ttable.setWidget(5, 0, new Label(LocaleText.get(\"enabled\")));\n\t\ttable.setWidget(6, 0, new Label(LocaleText.get(\"locked\")));\n\t\ttable.setWidget(7, 0, new Label(LocaleText.get(\"required\")));\n\t\ttable.setWidget(8, 0, new Label(LocaleText.get(\"defaultValue\")));\n\t\ttable.setWidget(9, 0, new Label(LocaleText.get(\"calculation\")));\n\t\t\n\t\tlblDescTemplate = new Label(LocaleText.get(\"descriptionTemplate\"));\n\t\ttable.setWidget(10, 0, lblDescTemplate);\n\t\ttable.setWidget(11, 0, new Label(LocaleText.get(\"formKey\")));\n\n\t\ttable.setWidget(0, 1, txtText);\n\t\ttable.setWidget(1, 1, txtHelpText);\n\t\ttable.setWidget(2, 1, cbDataType);\n\t\ttable.setWidget(3, 1, txtBinding);\n\t\ttable.setWidget(4, 1, chkVisible);\n\t\ttable.setWidget(5, 1, chkEnabled);\n\t\ttable.setWidget(6, 1, chkLocked);\n\t\ttable.setWidget(7, 1, chkRequired);\n\t\ttable.setWidget(8, 1, txtDefaultValue);\n\n\t\tHorizontalPanel panel = new HorizontalPanel();\n\t\tpanel.add(txtCalculation);\n\t\tpanel.add(btnCalculation);\n\t\tpanel.setCellWidth(btnCalculation, \"20%\");\n\t\tFormUtil.maximizeWidget(txtCalculation);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(9, 1, panel);\n\n\t\tpanel = new HorizontalPanel();\n\t\tpanel.add(txtDescTemplate);\n\t\tpanel.add(btnDescTemplate);\n\t\tpanel.setCellWidth(btnDescTemplate, \"20%\");\n\t\tFormUtil.maximizeWidget(txtDescTemplate);\n\t\tFormUtil.maximizeWidget(panel);\n\t\ttable.setWidget(10, 1, panel);\n\t\t\n\t\ttable.setWidget(11, 1, txtFormKey);\n\n\t\ttable.setStyleName(\"cw-FlexTable\");\n\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeText\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeNumber\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDecimal\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDate\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeDateTime\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBoolean\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeMultSelect\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeRepeat\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypePicture\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeVideo\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeAudio\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeSingleSelectDynamic\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeGPS\"));\n\t\tcbDataType.addItem(LocaleText.get(\"qtnTypeBarcode\"));\n\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\n\t\tcellFormatter.setHorizontalAlignment(15, 1, HasHorizontalAlignment.ALIGN_CENTER);\n\n\t\ttable.setWidth(\"100%\");\n\t\tcellFormatter.setWidth(0, 0, \"20%\");\n\t\t//cellFormatter.setColSpan(0, 0, 2);\n\t\t\n\t\t//cellFormatter.setWidth(9, 0, \"20\"+PurcConstants.UNITS);\n\t\t//cellFormatter.setWidth(9, 1, \"20\"+PurcConstants.UNITS);\n\n\t\ttxtText.setWidth(\"100%\");\n\t\ttxtHelpText.setWidth(\"100%\");\n\t\ttxtBinding.setWidth(\"100%\");\n\t\ttxtDefaultValue.setWidth(\"100%\");\n\t\tcbDataType.setWidth(\"100%\");\n\t\ttxtFormKey.setWidth(\"100%\");\n\n\t\tVerticalPanel verticalPanel = new VerticalPanel();\n\t\tverticalPanel.setSpacing(5);\n\t\tverticalPanel.add(table);\n\n\t\tDecoratedTabPanel tabs = new DecoratedTabPanel();\n\t\ttabs.add(skipRulesView, LocaleText.get(\"skipLogic\"));\n\t\ttabs.add(validationRulesView, LocaleText.get(\"validationLogic\"));\n\t\ttabs.add(dynamicListsView, LocaleText.get(\"dynamicLists\"));\n\n\t\ttabs.selectTab(0);\n\t\tverticalPanel.add(tabs);\n\t\tFormUtil.maximizeWidget(tabs);\n\n\t\tFormUtil.maximizeWidget(verticalPanel);\n\t\tinitWidget(verticalPanel);\n\n\t\tsetupEventListeners();\n\n\t\tcbDataType.setSelectedIndex(-1);\n\n\t\tenableQuestionOnlyProperties(false);\n\t\ttxtText.setEnabled(false);\n\t\t//txtDescTemplate.setVisible(false);\n\t\t//btnDescTemplate.setVisible(false);\n\t\tenableDescriptionTemplate(false);\n\t\ttxtCalculation.setEnabled(false);\n\t\tbtnCalculation.setEnabled(false);\n\t\ttxtBinding.setEnabled(false);\n\n\t\ttxtText.setTitle(LocaleText.get(\"questionTextDesc\"));\n\t\ttxtHelpText.setTitle(LocaleText.get(\"questionDescDesc\"));\n\t\ttxtBinding.setTitle(LocaleText.get(\"questionIdDesc\"));\n\t\ttxtDefaultValue.setTitle(LocaleText.get(\"defaultValDesc\"));\n\t\tcbDataType.setTitle(LocaleText.get(\"questionTypeDesc\"));\n\n\t\tDOM.sinkEvents(getElement(), Event.ONKEYDOWN | DOM.getEventsSunk(getElement()));\n\t}", "public View(Model m) {\r\n\t\tsuper();\r\n\t\tsetBackground(Color.black); // Setting background color.\r\n\t\tthis.model = m;\r\n\t}", "private void init()\n\t{\n\t\tsetModel(new Model(Id.model, this, null));\n\t\tsetEnviroment(new Enviroment(Id.enviroment, this, model()));\n\t\tsetVaccinationCenter(new VaccinationCenter(Id.vaccinationCenter, this, model()));\n\t\tsetCanteen(new Canteen(Id.canteen, this, vaccinationCenter()));\n\t\tsetRegistration(new Registration(Id.registration, this, vaccinationCenter()));\n\t\tsetExamination(new Examination(Id.examination, this, vaccinationCenter()));\n\t\tsetVaccination(new Vaccination(Id.vaccination, this, vaccinationCenter()));\n\t\tsetWaitingRoom(new WaitingRoom(Id.waitingRoom, this, vaccinationCenter()));\n\t\tsetSyringes(new Syringes(Id.syringes, this, vaccination()));\n\t}", "@Override\n public void Create() {\n initView();\n initData();\n }", "public ViewEntry() {\n initComponents();\n pnlRates.add(new ViewRateSchedule()); \n pnlRates.validate();\n }", "interface View {\n\n void displayError(String error);\n\n String getBarcode();\n \n String getDescription();\n \n BigDecimal getPrice();\n \n \n }", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initView() {\n\t\t\r\n\t}", "@Override\n\tpublic void initView() {\n\t\t\n\t}", "public SimulationView() {\n initComponents();\n }", "public void modelShow() {\n\t\tSystem.out.println(\"秀衣服\");\n\t}", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "@Override\n protected void initView() {\n }", "@Override\n protected void initView() {\n }", "public ViewProductInfo() {\n initComponents();\n }", "public void buildModel() {\n }", "private void initializeModel() {\n\t\t\n\t}", "private void fetchData() {\n mFirstNameLabel = \"First name:\";\n mFirstNameValue = \"Taylor\";\n mSurnameLabel = \"Surname:\";\n mSurnameValue = \"Swift\";\n\n initFields();\n }", "java.lang.String getModel();", "DataModel getDataModel ();", "public PromedioView() {\n initComponents();\n }", "public VehicleViewRecord() {\n super(VehicleView.VEHICLE_VIEW);\n }", "public VisualView(IModel model1, int tickPerSecond) {\n super();\n this.tickPerSecond = tickPerSecond;\n panel = new MyPanel(model1, tickPerSecond);\n model = model1;\n }", "public ViewClass() {\n\t\tcreateGUI();\n\t\taddComponentsToFrame();\n\t\taddActionListeners();\n\t}", "public AccountViewModel(Model model, ViewState viewState) {\n this.model = model;\n this.viewState = viewState;\n value = new SimpleDoubleProperty();\n total = new SimpleDoubleProperty();\n balance = new SimpleDoubleProperty();\n user = new SimpleStringProperty();\n }", "public ViewAdminRates() {\n initComponents();\n initRates();\n }", "public ViewPropertyDetails(Property property) {\n initComponents();\n this.setTitle(\"Property Details\");\n this.property = property;\n customer = property.getCustomer();\n block = property.getBlock();\n type = property.getType();\n filter = property.getFilter();\n images = property.getImages();\n services = property.getServices();\n characteristics = property.getCharacteristics();\n lblBlock.setText(block.getBlockName());\n lblCustomerName.setText(customer.getName());\n SimpleDateFormat sdfDate = new SimpleDateFormat(\"yyyy-MM-dd\");//dd/MM/yyyy\n lblDateOfArrival.setText(sdfDate.format(property.getDateOfEntry()));\n lblDateOfOwnership.setText(sdfDate.format(property.getDateOfOwnerShip()));\n lblDemand.setText(\"\" + property.getDemand());\n lblLoadShed.setText(\"\" + block.getNoOfHourOfLoadShed());\n lblNoOfRooms.setText(\"\" + property.getNoOfRooms());\n lblPropertyFor.setText(filter.getFilterName());\n lblSize.setText(\"\" + property.getSize());\n lblType.setText(type.getTypeName());\n txtAddress.setText(property.getAddress());\n txtAgreement.setText(property.getAgreement());\n String str = \"\";\n for (int i = 0; i < services.size(); i++) {\n str += services.get(i).getServiceName() + \"\\n\";\n }\n txtServices.setText(str);\n DefaultTableModel model = (DefaultTableModel) tblCharacteristics.getModel();\n PropertyCharacteristic characteristic;\n for (int i = 0; i < characteristics.size(); i++) {\n characteristic = characteristics.get(i);\n model.insertRow(tblCharacteristics.getRowCount(), new Object[]{characteristic.getCharacteristicName(), characteristic.getQuantity()});\n }\n tblCharacteristics.setModel(model);\n model = (DefaultTableModel) tblImages.getModel();\n for (int i = 0; i < images.size(); i++) {\n model.insertRow(tblImages.getRowCount(), new Object[]{images.get(i)});\n }\n tblImages.setModel(model);\n }", "@Override\n public void Create() {\n\n initView();\n }", "public void loadData() {\n if (this.model != null) {\n\n this.dataLayout.setVisibility(View.VISIBLE);\n this.emptyText.setVisibility(View.GONE);\n\n\n if (this.model.getSolution() != null) {\n this.solutionView.setText(this.model.getSolution());\n }\n if (this.model.getArguments() != null) {\n this.argumentsView.setText(this.model.getArguments());\n }\n if (this.model.getQuestion() != null) {\n this.questionView.setText(\n String.valueOf(this.model.getQuestion().getId()));\n }\n } else {\n this.dataLayout.setVisibility(View.GONE);\n this.emptyText.setVisibility(View.VISIBLE);\n }\n }", "public PhanQuyen_View() {\n initComponents();\n }", "private Model(){}", "@Override\n public void initView() {\n }", "public ViewSinFaltante() {\n initComponents();\n }", "public CarShowroom() {\n initialiseShowroom();\n calculateAveragePrice();\n setOldestCar();\n getPriciestCar();\n }", "private void displayData() {\n ChildStatement childStmt = app.getChildStatement();\n\n //---Child\n childModelViewSynchronizer = new ModelViewSynchronizer<Child>(CHILD_CLASS,\n getChildMetadata(), rootView, AppConstants.EMPTY_STRING);\n childModelViewSynchronizer.setLabels();\n childModelViewSynchronizer.setHeaderTitle(R.id.section_child_particulars,\n R.string.label_child);\n childModelViewSynchronizer.displayDataObject(childStmt.getChildItem().getChild());\n\n //---CDA Trustee\n cdaTrusteeModelViewSynchronizer = new ModelViewSynchronizer<Adult>(ADULT_CLASS,\n getCdaTrusteeMetaData(), rootView, AppConstants.EMPTY_STRING);\n cdaTrusteeModelViewSynchronizer.setLabels();\n cdaTrusteeModelViewSynchronizer.setHeaderTitle(R.id.section_cdat_particulars,\n R.string.label_adult_type_cdat);\n cdaTrusteeModelViewSynchronizer.displayDataObject(childStmt.getChildDevAccountTrustee());\n\n //---Child Development Bank Account\n cdaBankModelViewSynchronizer = new ModelViewSynchronizer<CdaBankAccount>(CDA_BANK_ACCOUNT_CLASS,\n getChildDevAccountMetaData(), rootView, AppConstants.EMPTY_STRING);\n cdaBankModelViewSynchronizer.setLabels();\n cdaBankModelViewSynchronizer.setHeaderTitle(R.id.section_cda_details,\n R.string.label_child_dev_acc_detail);\n cdaBankModelViewSynchronizer.displayDataObject(childStmt.getCdaBankAccount());\n\n //--- To From Date\n displayFromToDates();\n\n //Screen - Title and Instructions\n fragmentContainer.setFragmentTitle(rootView,\n R.string.title_activity_family_view_cda_details);\n fragmentContainer.setInstructions(rootView.findViewById(R.id.screen_instructions),\n CURRENT_POSITION, 0, false);\n }", "public void display(){\r\n System.out.println(\"_____________________valuues of__[th]__constuctor_________________________\");\r\n System.out.println(\"No_of_people = \"+NO_OF_PEOPLE);\r\n System.out.println(\"EVENT_NUBMBER = \"+EVENT_NUMBER);}", "private void getDataFromView() throws EmptyTextFieldException, EmptyChoiceBoxException, NumberSmallerOneException {\n\n date = _view.getDate().getValue();\n title = _view.getTitle().getText();\n function = _view.getFunction().getText();\n protagonist = _view.getProtagonist().getText();\n source = _view.getSource().getText();\n references = _view.getReferences().getText();\n description = _view.getDescription().getText();\n checkForEmptyFields();\n\n priority = _view.getPriorityMap().get(_view.getPriority().getValue());\n classification = _view.getClassificationMap().get(_view.getClassification().getValue());\n checkForEmptyChoiceBox();\n\n id = Integer.parseInt(_view.getId().getText());\n ftr = Integer.parseInt(_view.getFtr().getText());\n det = Integer.parseInt(_view.getDet().getText());\n checkForNumbersSmallerOne();\n }", "private void initValueModels()\n {\n myCriterionValue.setName(\"Value\");\n myCriterionMaxValue.setNameAndDescription(\"Maximum value\", \"The maximum value\");\n\n addModel(myCriterionValue);\n addModel(myCriterionMaxValue);\n\n Conditional cond = myOperator.get();\n myCriterionValue.setVisible(cond != Conditional.EMPTY && cond != Conditional.NOT_EMPTY);\n myCriterionMaxValue.setVisible(cond == Conditional.BETWEEN);\n }", "public ContractView() {\n initComponents();\n }", "public GeneralModel() {\n initThemes();\n initProperties();\n }", "public DataViewerImpl() {\n\t\tsuper();\n\t}", "public SalesReportView() {\n initComponents();\n }", "public NapakalakiView() {\n initComponents();\n }", "public companyDetails() {\n initComponents();\n showTableData();\n }", "Object getViewDetails();", "public CoPView(CoP model) {\r\n super(ShoeView.shoeToViewX(model.xProperty().getValue(), model.getSide()), ShoeView.shoeToViewY(model.yProperty().getValue(), model.getSide()), 4, Color.color(0, 0, 1));\r\n this.model = model;\r\n initialize();\r\n }", "public View() {\n // (this constructor is here just for the javadoc tag)\n }", "public View (String table){\n\t\ttry {\n\t\t\tthis.conn=new DatabaseConnector();\n\t\t} catch (ClassNotFoundException exception) {\n\t\t\t// TODO Auto-generated catch-block stub.\n\t\t\texception.printStackTrace();\n\t\t} catch (SQLException exception) {\n\t\t\t// TODO Auto-generated catch-block stub.\n\t\t\texception.printStackTrace();\n\t\t}\n\t\n\t\tthis.table=table; \n\t\tif (this.table.equals(\"Divergence\"))\n\t\t\tthis.columnName=\"DivName\";\n\t\telse if (this.table.equals(\"Annotation\"))\n\t\t\tthis.columnName=\"AnnoName\";\n\t\telse if (this.table.equals(\"Vcf\"))\n\t\t\tthis.columnName=\"VcfName\";\n\t\telse if (this.table.equals(\"Filter\"))\n\t\t\tthis.columnName=\"FilName\";\n\t\telse\n\t\t\tthrow new IllegalArgumentException(\"Invalid view option: \" + this.table);\n\t}", "public PieChartView(Model model) {\n\t\tsuper(model);\n\t}", "public void setValuesForDisplay() {\n \tthis.trainModelGUI.tempLabel.setText(Integer.toString(this.temperature) + DEGREE + \"F\");\n\n //this.trainCars = this.trainModelGUI.numCars();\n this.trainWheels = this.trainCars * TRAIN_NUM_WHEELS;\n this.trainModelGUI.crewCountLabel.setText(Integer.toString(crew));\n this.trainModelGUI.heightVal.setText(Double.toString(truncateTo(this.trainHeight, 2)));\n this.trainModelGUI.widthVal.setText(Double.toString(truncateTo(this.trainWidth, 2)));\n this.trainModelGUI.lengthVal.setText(Double.toString(truncateTo(this.trainLength, 2)));\n this.trainModelGUI.weightVal.setText(Integer.toString(((int)this.trainWeight)));\n this.trainModelGUI.capacityVal.setText(Integer.toString(this.trainCapacity));\n this.trainModelGUI.powerVal.setText(Double.toString(truncateTo(this.powerIn/1000,2)));\n \n GPSAntenna = this.trainModelGUI.signalFailStatus();\n if(!GPSAntenna) {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.gpsAntennaStatusLabel.setText(\"OFF\");\n }\n MBOAntenna = this.trainModelGUI.signalFailStatus();\n if(!MBOAntenna) {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.mboAntennaStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.timeVal.setText(trnMdl.currentTime.toString());\n \tthis.trainModelGUI.stationVal.setText(this.station);\n \t\n \tif(rightDoorIsOpen == true) {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.rightDoorStatusLabel.setText(\"CLOSED\");\n }\n \tif(leftDoorIsOpen == true) {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"OPEN\");\n } else {\n \tthis.trainModelGUI.leftDoorStatusLabel.setText(\"CLOSED\");\n }\n\n \tif(lightsAreOn == true) {\n \t\tthis.trainModelGUI.lightStatusLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.lightStatusLabel.setText(\"OFF\");\n }\n \t\n \tthis.trainModelGUI.numPassengers.setText(Integer.toString(this.numPassengers));\n \tthis.trainModelGUI.numCarsSpinner.setText(Integer.toString(this.trainCars));\n \tthis.trainModelGUI.authorityVal.setText(Double.toString(truncateTo(this.CTCAuthority/METERS_PER_MILE,2)));\n \tthis.trainModelGUI.ctcSpeedLabel.setText(Double.toString(truncateTo(this.CTCSpeed*KPH_TO_MPH,2)));\n \t\n \tif(serviceBrake) {\n \t\tthis.trainModelGUI.serviceLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.serviceLabel.setText(\"OFF\");\n }\n \tif(emerBrake) {\n \t\tthis.trainModelGUI.emergencyLabel.setText(\"ON\");\n } else {\n \tthis.trainModelGUI.emergencyLabel.setText(\"OFF\");\n }\n \t\n \tif(this.arrivalStatus == ARRIVING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"ARRIVING\");\n \t} else if (this.arrivalStatus == EN_ROUTE) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"EN ROUTE\");\n \t} else if (this.arrivalStatus == APPROACHING) {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"APPROACHING\");\n \t} else {\n \t\tthis.trainModelGUI.arrivalStatusLabel.setText(\"DEPARTING\");\n embarkingPassengersSet = false;\n \t}\n\n \tthis.trainModelGUI.currentSpeedLabel.setText(Double.toString(truncateTo((this.currentSpeed*MS_TO_MPH), 2)));\n \n \tif (this.lineColor.equals(\"GREEN\")) {\n \t\tthis.trainModelGUI.lblLine.setText(lineColor);\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.GREEN);\n \t} else {\n \t\tthis.trainModelGUI.lblLine.setText(\"RED\");\n \t\tthis.trainModelGUI.lblLine.setForeground(Color.RED);\n }\n \t\n }", "public personnelMedicalModel(){\n\n }", "@Override\n public void display(){\n System.out.println(\"Student id: \"+getStudentId()+\"\\nName is: \"+getName()+\"\\nAge :\"+getAge()+\"\\nAcademic year: \"+getSchoolYear()\n +\"\\nNationality :\"+getNationality());\n }", "public Tabel(SearchModel model) {\n\t\tsuper(model.getData(), model.getHeader());\n\t\tdataModel = model;\n\t}", "public LetterSettingView() {\r\n initComponents();\r\n }", "public EmployeesViewImpl() {\r\n }", "private View() {}", "Model() {\r\n this.observers = new ArrayList<Observer>();\r\n\r\n init();\r\n }", "private MainModel() {\n jsonManager = new JsonManager(this);\n }", "public StaffMenu() {\n initComponents();\n \n //Init with blank text \n ageLabel.setText(\"\");\n staffNumber.setText(\"\");\n genderLabel.setText(\"\");\n \n //Reading staff list \n ListOfStaff model_staff_list = new ListOfStaff(ListOfStaff.getStaff());\n staffList.setModel(model_staff_list); \n }", "ParametersView(){\r\n\t\ttable.setWidget(0, 0,new Label(OpenXDataFacade.getOpenXDataConstants().label_name()));\r\n\t\ttable.setWidget(0, 1,new Label(OpenXDataFacade.getOpenXDataConstants().label_value()));\r\n\t\ttable.setWidget(0, 2,new Label(OpenXDataFacade.getOpenXDataConstants().label_action()));\r\n\r\n\t\tFlexCellFormatter cellFormatter = table.getFlexCellFormatter();\r\n\t\tcellFormatter.setWidth(0, 2, \"10%\");\r\n\t\ttable.setStyleName(\"cw-FlexTable\");\r\n\r\n\t\tpanel.add(table);\r\n\t\tpanel.add(btnAdd);\r\n\r\n\t\tbtnAdd.addClickHandler(this);\r\n\t\tbtnAdd.setEnabled(false);\r\n\t\t\r\n\t\tinitWidget(panel);\r\n\t}", "@Override\n protected void initViewModel() {\n }", "private void showrecordthroughmodel()\n {\n if(treatmentRequestModel != null)\n {\n tv_right_hand_dia.setText(\"\" + treatmentRequestModel.getSYSBeforeRight());\n tv_right_hand_sys.setText(\"\" + treatmentRequestModel.getDIABeforeRight());\n tv_right_hand_pulse.setText(\"\" + treatmentRequestModel.getPulseBeforeRight());\n\n tv_left_hand_dia.setText(\"\" + treatmentRequestModel.getDIABeforeLeft());\n tv_left_hand_sys.setText(\"\" + treatmentRequestModel.getSYSBeforeLeft());\n tv_left_hand_pulse.setText(\"\" + treatmentRequestModel.getPulseBeforeLeft());\n }\n\n }", "public CutiView() {\n initComponents();\n this.cutiController = new CutiController(new MyConnection().getConnection());\n bindingTable();\n reset();\n }", "@Override\r\n public void performInitialization(Object model) {\r\n super.performInitialization(model);\r\n richTable.setForceLocalJsonData(true);\r\n\r\n //init binding info\r\n if (bindingInfo != null) {\r\n bindingInfo.setDefaults(ViewLifecycle.getView(), getPropertyName());\r\n }\r\n \r\n List<? extends Component> items = getItems();\r\n \r\n ComponentUtils.clearAndAssignIds(items);\r\n\r\n //iterate over this collections items to initialize\r\n for (Component item : this.getItems()) {\r\n initialComponentIds.add(item.getId());\r\n\r\n //if data field, setup a forced placeholder value\r\n if (item instanceof DataField) {\r\n ((DataField) item).setForcedValue(VALUE_TOKEN + item.getId() + VALUE_TOKEN);\r\n }\r\n\r\n ///populate expression map\r\n expressionConversionMap = buildExpressionMap(item, expressionConversionMap);\r\n }\r\n }", "public void initView(){}", "@Override\n public void initView() {\n\n }", "public ViewDetallesPagos () {\r\n\r\n }", "public SalesView() {\n initComponents();\n salesDetailTable.setAutoCreateColumnsFromModel(false);\n jdcTransaksi.setDate(new Date());\n enableForm(false);\n buttonConfig();\n salesDetailTable.getTableHeader().setFont(new Font(\"Segoe UI\", 0, 18)); \n }", "private Values(){}", "public ViewInit() {\n initComponents();\n }", "public TopView(TopModel topModel) {\r\n this.topModel = topModel;\r\n }", "protected abstract void populateView(View v, T model);", "public ViewCustomerKamera() {\n initComponents();\n connectDatabase();\n //updateTable();\n }", "public OnlineVerificationView() {\n }", "@ModelAttribute\r\n\tpublic void loadDataEveryTime(Model model)\r\n\t{\r\n\t\tmodel.addAttribute(\"brands\",mobservice.getAllBrandNames());\r\n\t\tmodel.addAttribute(\"ram\",mobservice.getRamSize());\r\n\t\tmodel.addAttribute(\"rating\",mobservice.getRating());\r\n\t}", "public Viewemployeeexpenditure() {\n initComponents();\n view1();\n \n }", "public viewOpe() {\n initComponents();\n }", "public ExperimentRunViewRecord() {\n super(ExperimentRunView.EXPERIMENT_RUN_VIEW);\n }", "public Data() {\n initComponents();\n getData();\n }", "public PlotViewStatsAndMaths() {\n \t}", "protected List<DataModel> generateModel(){\n\t\tList<DataModel> list = new ArrayList<DataModel>();\n\t\t\n\t\tDataModel outTemperature = new DataModelTemperature(\"Outer Temperature\", this);\n\t\toutTemperature.setShouldAlarm(false);\n\t\toutTemperature.setMaxSafeValue(200);\n\t\toutTemperature.setHowManyPercentageToAdd(0.5);\n\t\toutTemperature.setVibeRate(2.42);\n\t\tlist.add(outTemperature);\n\t\t\n\t\tlist.add(new DataModelTemperature(\"Inner Temperature\", this));\n\t\tlist.add(new DataModelHumidity(\"Humidity\", this));\n\t\tlist.add(new DataModelOxygen(\"Oxygen\", this));\n\t\t\n\t\treturn list;\n\t}" ]
[ "0.6388327", "0.63286704", "0.6306812", "0.6244554", "0.62418354", "0.62278646", "0.61733705", "0.61729634", "0.6126477", "0.6086289", "0.6029034", "0.60283065", "0.60283065", "0.5997702", "0.5997702", "0.5993807", "0.5987181", "0.595941", "0.59439045", "0.5941676", "0.59356725", "0.5923084", "0.5915712", "0.590047", "0.5898896", "0.5860469", "0.58417934", "0.58417934", "0.5839274", "0.5836386", "0.5815672", "0.5790289", "0.578765", "0.578765", "0.576816", "0.5762229", "0.57622224", "0.57462746", "0.5743987", "0.5743651", "0.5739026", "0.5736574", "0.5730791", "0.57277817", "0.5709426", "0.5707408", "0.5705183", "0.5704215", "0.5697392", "0.56777877", "0.56759834", "0.56758094", "0.5667904", "0.566495", "0.5664402", "0.56568503", "0.565678", "0.5652957", "0.56488615", "0.56332386", "0.5630123", "0.5626823", "0.5622699", "0.5618616", "0.56153", "0.5613361", "0.5609438", "0.56093794", "0.56081593", "0.56075937", "0.56005853", "0.56002325", "0.55948716", "0.5593628", "0.5591875", "0.5588644", "0.5581591", "0.5581064", "0.5577922", "0.5577647", "0.55724454", "0.55705297", "0.5568272", "0.5567561", "0.55620664", "0.556008", "0.55586183", "0.5554948", "0.5552261", "0.5551944", "0.5548222", "0.5545793", "0.55452013", "0.55428964", "0.55393434", "0.5536723", "0.55314445", "0.55300564", "0.55296034", "0.5526048", "0.5525991" ]
0.0
-1
Creates new chat with the owner of the advertisement.
private void createNewChat() { if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) { view.showCanNotSendMessageToYourselfToast(); return; } dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(), advertisement.getImageUrl(), chatID -> view.openChat(chatID)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Conversation newConversation(Uuid id, String title, Uuid owner, Time creationTime);", "@Override\n\tpublic void chatCreated(Chat chat, boolean createdLocally) {\n\t\tif (!createdLocally){\n\t\t\t/*try {\n\t\t\t\tchat.sendMessage(\"我是客户端发送的消息!!\");\n\t\t\t} catch (NotConnectedException e) {\n\t\t\t\t// TODOAuto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}*/\n\t\t\tchat.addMessageListener(new UserLocalChatMessageListener());\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n String chat = chat_field.getText().toString();\n\n\n LandingActivity current_activity = (LandingActivity)getActivity();\n if(current_activity != null){\n new Chat(chat, current_user.getUsername(), getActivity());\n }\n //Construct the new Object\n\n }", "public void addChat(String to, String from, String from_fullname, String msg, String date, String status,\r\n String uniqueid, String type, String file_type) {\r\n\r\n String myPhone = getUserDetails().get(\"phone\");\r\n String contactPhone = \"\";\r\n if(myPhone.equals(to)) contactPhone = from;\r\n if(myPhone.equals(from)) contactPhone = to;\r\n\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(UserChat.USERCHAT_TO, to); // TO\r\n values.put(UserChat.USERCHAT_FROM, from); // FROM\r\n values.put(UserChat.USERCHAT_FROM_FULLNAME, from_fullname); // FROM FULL NAME\r\n values.put(UserChat.USERCHAT_MSG, msg); // CHAT MESSAGE\r\n values.put(UserChat.USERCHAT_DATE, date); // DATE\r\n values.put(\"status\", status); // status: pending, sent, delivered, seen\r\n values.put(\"uniqueid\", uniqueid);\r\n values.put(\"type\", type);\r\n values.put(\"file_type\", file_type);\r\n values.put(\"contact_phone\", contactPhone); // Contact\r\n\r\n // Inserting Row\r\n db.insert(UserChat.TABLE_USERCHAT, null, values);\r\n db.close(); // Closing database connection\r\n }", "public void addChatToRoom(String username, String text)\r\n\t{\r\n\t\t// make sure we're not sending the current user's recent chat again\r\n\t\tif(!basicAvatarData.getUsername().equals(username))\r\n\t\t{\r\n\t\t\ttheGridView.addTextBubble(username, text, 100);\r\n\t\t}\r\n\t}", "public ChatRoomCreationMsgBehaviour( String name, String creatorPrimaryKey, boolean isBotChatRoom ) {\n super( name, creatorPrimaryKey );\n this.isBotChatRoom = isBotChatRoom;\n }", "public void make_chat_room() {\n client_PW.println(\"------------make new chat-------------\");\n client_PW.println(\"Enter chat name : \");\n client_PW.flush();\n String line = null;\n String ad=null;\n PrintWriter pw=null;\n HashMap new_chat = new HashMap();\n try {\n line = client_BR.readLine();\n try{\n File file = new File(System.getProperty(\"user.home\"),line + \".txt\");\n pw = new PrintWriter(file);\n \n }catch(Exception e){System.out.println(e);}\n \n synchronized(chat_room) {\n chat_room.put(line, new_chat);\n }\n synchronized(cur_chat_room) {\n cur_chat_room.remove(client_ID);\n }\n String msg = client_ID + \"님이 퇴장하셨습니다\";\n broadcast(msg, null);\n synchronized(new_chat) {\n new_chat.put(client_ID,client_PW);\n }\n synchronized(new_chat) {\n \n new_chat.put(ad,pw);\n }\n cur_chat_room = new_chat;\n } catch (Exception e) { System.out.println(e); }\n \n\n }", "@Override\n\tpublic void chatCreated(Chat conversation, boolean localCreated) {\n\t\tif(!localCreated){\n\n\t\t\tchatInstanceMap.put(conversation.getThreadID(), conversation);\n\n\t\t}\n\t}", "@PutMapping(value=\"/chat/{id}/{userName}/{sentence}\")\n\t\tpublic ResponseEntity<Chat> newChat (@PathVariable long id, @PathVariable String userName, @PathVariable String sentence) {\n\t\t\tif(lobbies.get(id)!=null) {\n\t\t\t\tif(lobbies.get(id).getUser1()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser1().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(lobbies.get(id).getUser2()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser2().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}else {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}", "public void createChatRoom(String name) throws RemoteException {\n\n\t\ttry {\n\t\t\tIChatServer chatStub;\n\t\t\t// make a new chatroom with supplied name\n\t\t\tIChatroom newRoom = new Chatroom(name);\n\t\t\tview.append(\"Make new ChatRoom: \" + newRoom.getName() + \"\\n\");\n\t\t\t// make a new chatserver stub for user in the newchatroom\n\t\t\tIChatServer newChatServer = new ChatServer(user, newRoom);\n\t\t\tview.append(\"Make new ChatServer: <User:\" + newChatServer.getUser().getName() + \", ChatServer: \"\n\t\t\t\t\t+ newChatServer.getChatroom().getName() + \">\\n\");\n\t\t\t//get a chatstub for new chatserver \n\t\t\tchatStub = (IChatServer) UnicastRemoteObject.exportObject(newChatServer, IChatServer.BOUND_PORT);\n\t\t\tregistry.rebind(IChatServer.BOUND_NAME + newRoom.hashCode(), chatStub);\n\t\t\tview.append(\"Make new ChatServer Stub for chatserver.\\n\");\n\t\t\t//add chatstub to newRoom\n\t\t\tnewRoom.addChatServer(chatStub);\n\t\t\tview.append(\"Add new ChatServer Stub to newRoom.\\n\");\n\t\t\t//add newchatroom to the user chatroom lists\n\t\t\tuser.addRoom(newRoom);\n\t\t\tview.append(\"Add new chatroom <\" + newRoom.getName() + \"> to user <\" + user.getName() + \">\\n\");\n\t\t\t//add all chatservers in that room to hashset\n\t\t\tHashSet<IChatServer> proxy = new HashSet<IChatServer>();\n\t\t\tfor (IChatServer item : newChatServer.getChatroom().getChatServers()) {\n\t\t\t\tIChatServer proxyChatServer = new ProxyIChatServer(item);\n\t\t\t\tproxy.add(proxyChatServer);\n\t\t\t}\n\t\t\tIMain2MiniAdpt miniMVCAdpt = view.makeMini(newChatServer, proxy);\n\t\t\tminiMVCAdpts.put(newRoom, miniMVCAdpt);\n\t\t\tcountRoom++;\n\t\t} catch (Exception e) {\n\t\t\tview.append(\"Error creating chatroom!\");\n\t\t}\n\n\t}", "@PostMapping(\"/user-offer-chats\")\n @Timed\n public ResponseEntity<UserOfferChatDTO> createUserOfferChat(@Valid @RequestBody UserOfferChatDTO userOfferChatDTO) throws URISyntaxException {\n log.debug(\"REST request to save UserOfferChat : {}\", userOfferChatDTO);\n if (userOfferChatDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new userOfferChat cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n UserOfferChatDTO result = userOfferChatService.save(userOfferChatDTO);\n return ResponseEntity.created(new URI(\"/api/user-offer-chats/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public void addRoom(Chatroom room){\n\n }", "public abstract void newChatMembersMessage(Message m);", "public Chat() {\n }", "public void createRoom(String roomHost, String roomName) throws IOException {\n ChatRoom newRoom = new ChatRoom(roomHost, roomName);\n chatRooms.add(newRoom);\n }", "private void setupChat() {\n\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 mOutEditText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n mSendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Send a message using content of the edit text widget\n View view = getView();\n if (null != view) {\n TextView textView = (TextView) view.findViewById(R.id.edit_text_out);\n String message = textView.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(BluetoothChatFragment.EXTRAS_ADVERTISE_DATA, message);\n mCallback.onSendMessage(bundle);\n //對話框上顯示\n mConversationArrayAdapter.add(\"Me: \" + message);\n //設為不可發送 並清除訊息文字編輯區\n Send_btn=false;\n mSendButton.setEnabled(Send_btn);\n mOutStringBuffer.setLength(0);\n mOutEditText.setText(mOutStringBuffer);\n\n }\n }\n });\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }", "@Override\n public void onClick(View v) {\n String message = etMessage.getText().toString();\n // buat objek chat\n Chat chat = new Chat(\"yogi\", message);\n // kirim chat ke database\n chatReference.push().setValue(chat);\n // kosongkan inputan\n etMessage.getText().clear();\n }", "@Override\n public void onClick(View view) {\n ChatMessage Message = new\n ChatMessage(mMessageEditText.getText().toString(),\n mUsername,\n null, dateAndTime);\n mFirebaseDatabaseReference.child(chatRoomPath)\n .push().setValue(Message);\n mMessageEditText.setText(\"\");\n\n }", "public void createChat(String roomname, String nickname) {\n\t\t\n\t\tboolean successful = false;\n\t\tString errormessage = \"\";\n\t\t\n\t\t// set default value for roomname\n\t\tif (roomname.equals(\"\")){\n\t\t\troomname = \"default\";\n\t\t}\n\t\t\n\t\t// set default value for nickname\n\t\tif (nickname.equals(\"\")){\n\t\t\tnickname = chatConnection.getConnectedUserID();\n\t\t}\n\t\t// if connection to room already exists, only change the nickname\n\t\tif (roomlist.containsKey(roomname)){ // room already exists\n\t\t\tChatRoom room = roomlist.get(roomname);\n\t\t\tif (!room.getNickname().equals(nickname)){\n\t\t\t\ttry {\n\t\t\t\t\troom.changeNickname(nickname);\n\t\t\t\t\tsuccessful = true;\n\t\t\t\t\troomlist.fireTableDataChanged();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\terrormessage = e.getMessage();\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\telse { // make new connection\n\t\t\tChatRoom groupchat;\n\t\t\ttry {\n\t\t\t\tgroupchat = new ChatRoom(roomname, nickname);\n\t\t\t\troomlist.put(roomname, groupchat);\n\t\t\t\troomlist.fireTableDataChanged();\n\t\t\t\tsuccessful = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\terrormessage = e.getMessage();\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (!successful){\n\t\t\tcreateChatConnectDialog(errormessage);\n\t\t}\n\t}", "public Chat(){ }", "public void writeIdChatAtSpecificUserInDatabase(@NonNull ChatMessage chat) {\n mDatabaseReference.child(\"users\").child(chat.getSender()).child(\"chats\").\n child(chat.getIdChat()).setValue(chat.getReceiver());\n mDatabaseReference.child(\"users\").child(chat.getReceiver()).child(\"chats\").\n child(chat.getIdChat()).setValue(chat.getSender());\n }", "@PostMapping(\"/chat-messages\")\n @Timed\n public ResponseEntity<ChatMessage> createChatMessage(@RequestBody ChatMessage chatMessage) throws URISyntaxException {\n log.debug(\"REST request to save ChatMessage : {}\", chatMessage);\n if (chatMessage.getId() != null) {\n return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, \"idexists\", \"A new chatMessage cannot already have an ID\")).body(null);\n }\n ChatMessage result = chatMessageRepository.save(chatMessage);\n return ResponseEntity.created(new URI(\"/api/chat-messages/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public void createGroupChat(View view){\n\t\tif (!AppSharedPreference.getInstance(CreateGroupChatAutoCompleterView.this).getIsConnectedToInternet()){\n\t\t\tDialogUtils.showInternetAlertDialog(CreateGroupChatAutoCompleterView.this);\n\t\t\treturn;\n\t\t}\n\n\t\tif(selectedContactList.size()>0){\n\t\t\tnew GroupCreaterAsyncTask(this,selectedContactList,groupName,groupIcon).execute();\n\t\t}else{\n\t\t\tAppUtils.showTost(this, \"Please select atleast one contact\");\n\t\t}\n\t\t\n\t}", "public abstract void groupChatCreatedMessage(Message m);", "@PostMapping(\"/chat\")\n public ChatBean createChat(@Valid @RequestBody ChatBean chat) {\n return chatBeanRepository.save(chat);\n }", "public boolean insertForCreateChatTransaction(Chat chat, UserChat userChat1, UserChat userChat2) {\n return spannerOperations.performReadWriteTransaction(\n transactionSpannerOperations -> {\n transactionSpannerOperations.upsert(chat, \"ChatID\", \"CreationTS\");\n transactionSpannerOperations.insert(userChat1);\n transactionSpannerOperations.insert(userChat2);\n\n return true;\n }\n );\n }", "public void requestAddUserToChat(String otherUsername){\n System.out.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.println(\"addtochat\" + \" \" + chatID + \" \" + otherUsername);\n toServer.flush();\n }", "private void setupChat() {\n chatArrayAdapter = new ArrayAdapter<String>(MainActivity.this, R.layout.message);\n\n listView.setAdapter(chatArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n editText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n sendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n String message = editText.getText().toString();\n if(!message.equals(\"\")) {\n sendMessage(message);\n }\n }\n });\n\n }", "private void insertarBd(Chats chat) {\n\t\tString sql = \"INSERT INTO chats (chat,fecha,idUsuario) VALUES(?,?,?)\";\n\n\t\ttry (PreparedStatement ps = con.prepareStatement(sql)) {\n\t\t\tps.setString(1, chat.getTexto());\n\t\t\tps.setDate(2,chat.getFecha() );\n\t\t\tps.setLong(3, chat.getIdUsuario());\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tps.executeUpdate();\n\t\t} catch (SQLException e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "Message newMessage(Uuid id, Uuid author, Uuid conversation, String body, Time creationTime);", "public boolean createChat(String friendName, String conversationID, MessageListener conversationListener){\n\n\t\tboolean chatCreated = false;\n\n\t\tif(serverConnection.isConnected()){\n\n\t\t\tif(!chatInstanceMap.containsKey(friendName))\n\t\t\t{\n\t\t\t\tChat newConversation = serverConnection.getChatManager().createChat(friendName, conversationID, conversationListener);\n\n\t\t\t\tchatInstanceMap.put(friendName, newConversation);\n\n\t\t\t\tchatCreated = true;\n\t\t\t}\n\t\t}\t\n\n\t\treturn chatCreated;\n\t}", "private Conversation createNewConversation(Node conversationsNode, Node participantsNode, String conversationId, Date date, HistoricalMessageImpl message) {\r\n String jidTo = message.getTo();\r\n String jidFrom = message.getFrom();\r\n Boolean isGroupChat = message.getType().equals(Message.Type.groupchat.name());\r\n Participant participantTo = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidTo)));\r\n InterlocutorImpl interlocutorFrom = new InterlocutorImpl(jidFrom, conversationId, isGroupChat);\r\n if (!isGroupChat) {\r\n if (participantTo != null) {\r\n if (participantTo.getInterlocutorList() != null) {\r\n participantTo.addInterlocutor(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n Participant participantFrom = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidFrom)));\r\n InterlocutorImpl interlocutorTo = new InterlocutorImpl(jidTo, conversationId, isGroupChat);\r\n if (participantFrom != null) {\r\n if (participantFrom.getInterlocutorList() != null) {\r\n participantFrom.addInterlocutor(interlocutorTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom = new Participant(jidFrom, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantFrom);\r\n }\r\n } else {\r\n if (participantTo != null) {\r\n if (participantTo.getGroupChatList() != null) {\r\n participantTo.addGroupChat(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setGroupChatList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, new ArrayList<InterlocutorImpl>(), list);\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n }\r\n Conversation conversation = new Conversation(conversationId, date, date);\r\n conversation.addMessage(message);\r\n addConversation(conversationsNode, conversation);\r\n return conversation;\r\n }", "@Override\r\n\tpublic void onChannelPersonalCreateNotify(AirChannel ch)\r\n\t{\n\t\tif (ch != null)\r\n\t\t{\r\n\t\t\tAirtalkeeChannel.getInstance().ChannelMemberGet(ch.getId());\r\n\t\t\tAirSession session = AirtalkeeSessionManager.getInstance().SessionMatch(ch.getId());\r\n\t\t\tif (session != null)\r\n\t\t\t{\r\n\t\t\t\tString tip = String.format(AirServices.getInstance().getString(R.string.talk_channel_tip_create), ch.getCreatorName());\r\n\t\t\t\tAirtalkeeMessage.getInstance().MessageSystemGenerate(session, tip, true);\r\n\t\t\t}\r\n\r\n\t\t\tif (channelListener != null)\r\n\t\t\t{\r\n\t\t\t\tchannelListener.onChannelPersonalCreateNotify(ch);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@MessageMapping(\"/chat.addUser\")\n @SendTo(\"/topic/publicChatRoom\")\n public Message addUser(@Payload Message chatMessage, SimpMessageHeaderAccessor headerAccessor) {\n headerAccessor.getSessionAttributes().put(\"username\", chatMessage.getSender());\n headerAccessor.getSessionAttributes().put(\"usercolor\", \"red\");\n\n return chatMessage;\n }", "public void sendChat(String s) {\n ACLMessage m = new ACLMessage(briscola.common.ACLCodes.ACL_CHAT);\n m.setConversationId(getChatID());\n m.setContent(s);\n if (players == null) {\n say(\"Nessun giocatore in lista\");\n } else {\n for (Player p : players) {\n m.addReceiver(p.getAID());\n }\n send(m);\n }\n }", "public ChatActivity() {\n }", "@PostMapping(\"/chat-rooms\")\n public ResponseEntity<ChatRoom> createChatRoom(@RequestBody ChatRoom chatRoom) throws URISyntaxException {\n log.debug(\"REST request to save ChatRoom : {}\", chatRoom);\n if (chatRoom.getId() != null) {\n throw new BadRequestAlertException(\"A new chatRoom cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n ChatRoom result = chatRoomRepository.save(chatRoom);\n return ResponseEntity.created(new URI(\"/api/chat-rooms/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public ChatClient() {\n\n }", "private synchronized void createConversation(int id) throws IOException {\n ConversationGUI convo = new ConversationGUI(model, id, this);\n conversations.put(id, convo);\n convo.setVisible(true);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.chat_activity);\n\t\t\n\t\ttext = (EditText)findViewById(R.id.etSendMsg);\n\t\tchat = (TextView)findViewById(R.id.tvChat);\n\t\tsend = (Button)findViewById(R.id.bSend);\n\t\t\n\t\tsend.setOnClickListener(this);\n\t\tuser = getIntent().getStringExtra(\"user\");\n\t\tchallenged = getIntent().getStringExtra(\"challenged\");\n\t\tsa = ((SharingAtts)getApplication());\n\t\t\n\t\tit = new ItemTest();\n\t\tString colNames = it.printData(\"chat\")[1];\n\t\tdbm = new DBManager(this, colNames, \"chat\", it.printData(\"chat\")[0]);\n\t\tWarpClient.initialize(Constants.apiKey, Constants.secretKey);\n\t\ttry {\n\t\t\tmyGame = WarpClient.getInstance();\n\t\t\tmyGame.addConnectionRequestListener(this); \n\t\t\tmyGame.connectWithUserName(user);\n\t\t\tmyGame.addNotificationListener(this);\n\t\t\tmyGame.addChatRequestListener(this);\n\t\t\tchat.setText(\"\");\n\t\t\t\n\t\t\tmyGame.addZoneRequestListener(this);\n\t\t\t/*\n\t\t\tmyGame.addRoomRequestListener(this);\n\t\t\tmyGame.addChatRequestListener(this);\n\t\t\t\n\t\t\t*/\n\t\t\t//myGame.getOnlineUsers();\n\t\t\t\n\t\t\t//myGame.addTurnBasedRoomListener(this);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tdbm.openToRead();\n\t\tString msgs = dbm.directQuery(\"SELECT sender,message FROM chat WHERE ((sender LIKE '\"+ sa.name+\"' AND receiver LIKE '\"+ challenged+ \"')\"+\n\t\t\t\t\" OR (sender LIKE '\"+challenged+\"' AND receiver LIKE '\"+ sa.name+\"'))\"+\n\t\t\t\t\"\", new String[]{ \"sender\",\"message\"});\n\t\tLog.d(\"special_query\", \"SELECT sender,message FROM chat WHERE sender LIKE '\"+ sa.name+\"' AND receiver LIKE '\"+ challenged+ \"'\"+\n\t\t\t\t\" OR sender LIKE '\"+challenged+\"' AND receiver LIKE '\"+ sa.name+\"'\"+\n\t\t\t\t\"\");\n\t\tString allRows = dbm.directQuery(\"SELECT * FROM chat\", it.printData(\"chat\")[1].split(\" \"));\n\t\t//allRows.replace(\" \", \"->\");\n\t\tString[] all = allRows.split(\"\\n\");\n\t\t\n\t\tfor(int i=0; i<all.length;i++){\n\t\t\tall[i].replace(\" \", \"->\");;\n\t\t\tLog.d(\"row_\"+i, all[i]);\n\t\t}\n\t\tdbm.close();\n\t\tmsgs = msgs.replace(\",\", \" : \");\n\t\tif(msgs!=null)\n\t\t\tchat.setText(msgs);\n\t\telse\n\t\t\tLog.e(\"msgs\", \"msg is null\");\n\t\t\n\t}", "@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }", "public void createMessage(int tid, int uid, int rank, String detail);", "@Override\n public void onStartConversationSuccessful(StartConversation startConversation) {\n\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n chatFragment = new ChatFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"id\", startConversation.getConversationId());\n bundle.putString(\"token\", startConversation.getToken());\n chatFragment.setArguments(bundle);\n ft.add(R.id.fl_chatlist, chatFragment);\n ft.commit();\n }", "@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}", "@PostMapping(\"/new\")\n @ResponseStatus(HttpStatus.CREATED)\n public Boolean newChat(@RequestBody NewChatEvent event) {\n notificationService.notifyAboutNewChat(event.getChatId(), event.getDepartmentId());\n scheduleService.scheduleReassignment(event.getChatId());\n return Boolean.TRUE;\n }", "public void requestChat(String otherUsername) {\n System.out.println(\"Requesting chat with \" + otherUsername);\n toServer.println(\"newchat\" + \" \" + username + \" \" + otherUsername);\n toServer.flush();\n }", "public Chat_1(String toaNimi) {\n\n nimi = toaNimi;\n\n }", "public GroupChat(String withId) {\n super(withId);\n }", "private void internalAddToChatWindow(String message) {\n jChatConvo.append(message + \"\\n\");\n }", "private void createMemberInvitation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getChatroomInvites();\n\t\tList<User> users = chatroom.getMemberInvitees();\n\t\t// create the relation\n\t\tchatrooms.add(chatroom);\n\t\tusers.add(user);\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t}", "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 }", "private void joinNewClient() {\r\n\t\t\tString clientName = _clientView.getUserName();\r\n\t\t\tif(clientName == null)\r\n\t\t\t\treturn;\r\n\t\t\t_clientModel.connectToServer();\r\n\t\t\t_clientModel.joinChat(clientName);\r\n\t\t}", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"[email protected]\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "public static void addChat($_Abstruct_Value_Item_Main_Chat abstruct_value_item_main_chat) {\n if (abstruct_value_item_main_chat instanceof $_Value_Item_Main_Chat) {\n main_chat_fragment.rooms.add(abstruct_value_item_main_chat);\n recycle_view_main_chat.addItemDecoration(new DividerItemDecoration(SecondActivity.context,\n DividerItemDecoration.VERTICAL));\n main_chat_fragment.recycleAdapter.notifyDataSetChanged();\n List<$_Message> list = new ArrayList();\n MainActivity.allMessages.put(abstruct_value_item_main_chat.getEmail(), new Pair<>(new $_Recycle_View_Room_Chat_Adapter(list, FourActivity.context), list));\n //MainActivity.allMessages.put(value_item_main_chat.getEmail(),new ArrayList<>());\n } else {\n main_chat_fragment.rooms.add(abstruct_value_item_main_chat);\n recycle_view_main_chat.addItemDecoration(new DividerItemDecoration(SecondActivity.context,\n DividerItemDecoration.VERTICAL));\n main_chat_fragment.recycleAdapter.notifyDataSetChanged();\n List<$_Message> list = new ArrayList();\n System.out.println(\"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE === \" + abstruct_value_item_main_chat.getEmail());\n MainActivity.allMessages.put(abstruct_value_item_main_chat.getEmail(), new Pair<>(new $_Recycle_View_Room_Chat_Adapter(list, FourActivity.context), list));\n //MainActivity.allMessages.put(value_item_main_chat.getEmail(),new ArrayList<>());\n }\n\n }", "private void setupChat() {\n chatService = new BluetoothChatService(NavigationDrawerActivity.this, mHandler);\n\n }", "private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }", "private void abrirVentanaChatPrivada() {\n\t\tthis.chatPublico = new MenuVentanaChat(\"Sala\", this, false);\n\t}", "@Override\n\tpublic void onPrivateChatReceived(final String sender, final String msg) {\n\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t public void run() {\n\t\t\t\t sa = ((SharingAtts)getApplication());\n\t\t\t\t chat.append(sender+\": \"+msg+\"\\n\");\t\n\t\t\t\t ItemTest it = new ItemTest();\n\t\t\t\t String colNames = it.printData(\"chat\")[1];\n\t\t\t\t DBManager dbm = new DBManager(ChatActivity.this, colNames,\"chat\",it.printData(\"chat\")[0]);\n\t\t\t\t dbm.openToWrite();\n\t\t\t\t dbm.cretTable();\n\t\t\t\t String msg2 = msg.replace(\" \", \"?*\");\n\t\t\t\t dbm.insertQuery(sender+\" \"+msg2+\" \"+sa.name, colNames.split(\" \")[1]+\" \"+colNames.split(\" \")[2]+\" \"+colNames.split(\" \")[3]);\n\t\t\t\t dbm.close();\n\t\t\t }\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n public void onClick(View view) {\n if(input.getText().toString()!=null){\n msg.child(\"convensation\").child(encry(chatTo)+\"\").push()\n .setValue(new MessagesModel(input.getText().toString(),\n FirebaseAuth.getInstance()\n .getCurrentUser()\n .getDisplayName(),\n ChatName,\n FirebaseAuth.getInstance()\n .getCurrentUser()\n .getEmail(),chatTo,false)\n );\n mAdapter.notifyDataSetChanged();\n input.setText(\"\");\n updateConvensation();\n listOfMessages.scrollToPosition(mAdapter.getItemCount());\n }\n }", "protected void makeRoom(String roomID)\n {\n mChat.child(roomID).child(\"sender1\").setValue(uid1);\n mChat.child(roomID).child(\"sender2\").setValue(uid);\n goToChat(roomID);\n }", "private void sendMessage() {\n Log.d(\"FlashChat\", \"I sent something\");\n // get the message the user typed\n String userInput = mInputText.getText().toString();\n\n if (! (userInput.length() == 0)){\n\n InstantMessage message = new InstantMessage(userInput, mUserMe);\n // push the message to Firebase DB\n mDatabaseReference.child(mLocation).push().setValue(message);\n mInputText.setText(\"\");\n }\n\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_chat, container, false);\n View mBtnSendMessage = inflate.findViewById(R.id.btnStartChat);\n mEtDestination = inflate.findViewById(R.id.etDestainationAddress);\n mEtMessage = inflate.findViewById(R.id.etMessage);\n mRecyclerView = inflate.findViewById(R.id.recycleView);\n LinearLayoutManager linearLayoutManager = new LinearLayoutManager(getContext());\n mRecyclerView.setLayoutManager(linearLayoutManager);\n mRecyclerView.setAdapter(mChatAdapter);\n mBtnSendMessage.setOnClickListener(this);\n\n return inflate;\n }", "private void loadTextChatFragment(){\n int containerId = R.id.fragment_textchat_container;\n mFragmentTransaction = getFragmentManager().beginTransaction();\n mTextChatFragment = (TextChatFragment)this.getFragmentManager().findFragmentByTag(\"TextChatFragment\");\n\n if (mTextChatFragment == null) {\n mTextChatFragment = new TextChatFragment();\n mTextChatFragment.setMaxTextLength(1050);\n mTextChatFragment.setTextChatListener(this);\n mTextChatFragment.setSenderInfo(mSession.getConnection().getConnectionId(), mSession.getConnection().getData());\n\n mFragmentTransaction.add(containerId, mTextChatFragment, \"TextChatFragment\").commit();\n }\n }", "public AddToChat(Point point,Controller c,user user) {\n initComponents();\n setLocation(point);\n controller=c;\n client=user;\n contacts=controller.getContactList(user);\n UsersName=new Vector<String>();\n for(int i=0;i<contacts.size();i++){\n UsersName.add(contacts.get(i).getUserName());\n }\n contactsList.setListData(UsersName);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setSize(278, 382);\n setDefaultCloseOperation(DISPOSE_ON_CLOSE);\n setResizable(false);\n setVisible(true);\n \n }", "@Override\n\t protected Control createDialogArea(Composite parent) {\n\t container = (Composite) super.createDialogArea(parent);\n\t container.setLayout(new GridLayout(2, false));\n\t new Label(container, SWT.NONE);\n\t \n\t Label lblTo = new Label(container, SWT.NONE);\n\t lblTo.setText(\"Recipient:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfRecipient = new Text(container, SWT.BORDER);\n\t tfRecipient.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t new Label(container, SWT.NONE);\n\t \n\t Label lblSubject = new Label(container, SWT.NONE);\n\t lblSubject.setText(\"Subject:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfSubject = new Text(container, SWT.BORDER);\n\t tfSubject.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));\n\t new Label(container, SWT.NONE);\n\t \n\t lblMessage = new Label(container, SWT.NONE);\n\t lblMessage.setText(\"Message:\");\n\t new Label(container, SWT.NONE);\n\t \n\t tfMessage = new Text(container, SWT.BORDER | SWT.WRAP | SWT.MULTI);\n\t GridData gd_text_2 = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);\n\t gd_text_2.heightHint = 292;\n\t tfMessage.setLayoutData(gd_text_2);\n\t getShell().setText(\"Write new Message\");\n\t return container;\n\t }", "private void append_chat_conversation(DataSnapshot dataSnapshot) {\n Vibrator mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n Iterator i = dataSnapshot.getChildren().iterator();\n while (i.hasNext()) {\n String chat_msg = (String) ((DataSnapshot) i.next()).getValue();\n String chat_user_name = (String) ((DataSnapshot) i.next()).getValue();\n if (chat_user_name.equals( ad.getName())) {\n Spannable Chatme = new SpannableString(chat_user_name + \" : \" + chat_msg + \" \\n\");\n Chatme.setSpan(new ForegroundColorSpan(Color.BLUE), 0, chat_user_name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n chat_conversation.append(Chatme);\n\n } else {\n chat_conversation.append( chat_user_name + \" : \" + chat_msg + \" \\n\");\n mVibrator.vibrate(200);\n }\n }\n }", "private void addMessage(final ChatMessage chatMessage)\n\t{\n\t\tfinal SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd MMMM HH:mm:ss\", Locale.US);\n\t\tfinal Date date = chatMessage.getSentDate();\n\t\tprint(\"\\n\" + dateFormat.format(date) + \", \" + chatMessage.getAuthor() + \":\");\n\t\tprint(\"\\n\" + chatMessage.getContent() + \"\\n\");\n\t}", "public void onClickSendMessage(View v) {\n\n String error = \"\";\n\n if (isEmpty(messageTittle)) {\n error = \"entra un titulo valido\";\n } else if (isEmpty(messageText)) {\n error = \"entra un mensaje valido\";\n } else {\n msgtittle = messageTittle.getText().toString();\n msgtext = messageText.getText().toString();\n\n }\n\n if (!error.equals(\"\")) {\n Toast.makeText(this, error, Toast.LENGTH_SHORT).show();\n } else {\n try {\n JMessage jmsg;\n jmsg = new JMessage(msgtext, msgtittle, gson.fromJson(MainActivity.juser, JUser.class), 1, jgroup.getGroupId());\n jmsg.setIdParent(1);\n\n\n Log.d(TAG, \"este es el jmessage a crear =\" + jmsg);\n NewMessage nm = new NewMessage(gson.toJson(jmsg));\n nm.execute();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "private void createChatConnectDialog(String message) {\n\t\tmainWindow.readChatRoomDataFromDialog(message);\n\t}", "public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}", "private void ReceiveFromOther(String message){\n ChatMessage chatMessage = new ChatMessage(message, false, false);\n mAdapter.add(chatMessage);\n\n }", "void setCreateby(final U createdBy);", "public RoomManagementPanel(ChatView chatView, ChatController chatController, JFrame frame) {\n this.chatView = chatView;\n this.chatController = chatController;\n\n createComponents();\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tsetContentView(R.layout.conversation);\n\n\t\t// Die Ansicht, in der der Austausch von Nachrichten zwischen Anna und\n\t\t// Beate dargestellt wird\n\t\tconversation = (TextView) findViewById(R.id.conversation_transcript);\n\n\t\t// Das Eingabefeld fuer eine neue Nachricht\n\t\tEditText newMessage = (EditText) findViewById(R.id.new_message);\n\t\tnewMessage.setImeOptions(EditorInfo.IME_ACTION_DONE);\n\n\t\t// Falls eine neue Nachricht eingegeben wird und mittels \"done\" beendet\n\t\t// wird, wird an die Activity Anna zurueck gegeben\n\t\tnewMessage.setOnEditorActionListener(new OnEditorActionListener() {\n\n\t\t\t@Override\n\t\t\tpublic boolean onEditorAction(TextView view, int arg1, KeyEvent arg2) {\n\t\t\t\tLog.d(logger, \"got editor action \" + arg1 + \" on textview \"\n\t\t\t\t\t\t+ view + \". KeyEvent is: \" + arg2);\n\t\t\t\tif (arg1 == EditorInfo.IME_ACTION_DONE || KeyEvent.KEYCODE_ENTER == arg2.getKeyCode()) {\n\t\t\t\t\tLog.d(logger, \"done was pressed!\");\n\n\t\t\t\t\t// Zugriff auf den eingegebenen Text\n\t\t\t\t\tString message = view.getText().toString();\n\n\t\t\t\t\t// aktualisiere die conversation (nur kurz sichtbar, da sofort die Rueckgabe\n\t\t\t\t\t// an Anna erfolgt)\n\t\t\t\t\tconversation.append(\"\\nmyself> \" + message);\n\t\t\t\t\t\n\t\t\t\t\t// Rueckgabe an Anna\n\t\t\t\t\treturnToAnna(message);\n\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t});\n\n\t\t// lies das Message Argument aus dem Intent aus\n\t\tString msg = getIntent().getExtras().getString(MESSAGE_ARGUMENT_NAME);\n\t\tLog.i(logger, \"onCreate(): message passed as argument is: \" + msg);\n\n\t\t// aktualisiere die Conversation\n\t\tconversation.append(\"\\nanna> \" + msg);\n\n\t}", "public ChatRoom createRoom(String room) {\r\n ChatRoom chatRoom = new ChatRoom(serviceAddress.withLocal(room), null, xmppSession, serviceDiscoveryManager, multiUserChatManager);\r\n chatRoom.initialize();\r\n return chatRoom;\r\n }", "private void getChatScreen(Context context, Intent invitation,\n String number, String name) {\n One2OneChat chat = null;\n if (null != number) {\n Participant contact = new Participant(number, name);\n List<Participant> participantList = new ArrayList<Participant>();\n participantList.add(contact);\n chat = (One2OneChat) ModelImpl.getInstance().addChat(\n participantList, null, null);\n if (null != chat) {\n invitation\n .setClass(context, ChatScreenActivity.class);\n invitation.putExtra(ChatScreenActivity.KEY_CHAT_TAG,\n (ParcelUuid) chat.getChatTag());\n } else {\n Logger.e(TAG, \"getChatScreen(), chat is null!\");\n }\n } else {\n Logger.e(TAG,\n \"getChatScreen(), fileSessionSession is null\");\n }\n }", "public void contactOwnerBtnClicked() {\n if (contactOwnerButtonClickedOnceBefore) {\n String chatID = dataModel.findChatID(advertisement.getUniqueID());\n if (chatID != null) {\n openChat(chatID);\n } else {\n createNewChat();\n }\n } else {\n view.setOwnerButtonText();\n }\n\n contactOwnerButtonClickedOnceBefore = true;\n }", "@OnKeyword(value = \"message\")\n\tpublic void createMessage(TeamchatAPI api) throws Exception {\n\t\tif (isBasecampnotPresent(api)) {\n\t\t\treturn;\n\t\t}\n\t\t// populating with project name list\n\t\tField f = api.objects().select().name(\"project\").label(\"Project\");\n\t\tfor (Project project : bah.getActiveProjects()) {\n\t\t\tf.addOption(project.getName() + \" | \" + project.getId());\n\t\t}\n\t\t// set topic type to message\n\t\ttopicType = \"Message\";\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Get message(s) from a project\")\n\t\t\t\t\t\t.setReplyScreen(api.objects().form().addField(f))\n\t\t\t\t\t\t.setReplyLabel(\"Select Project\")\n\t\t\t\t\t\t.alias(\"createmessage2\")));\n\t}", "private SingleChatPacket(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private void createAdminInvitation(User user, Chatroom chatroom) {\n\t\tList<Chatroom> chatrooms = user.getChatroomAdminInvites();\n\t\tList<User> users = chatroom.getAdminInvitees();\n\t\t// create the relation\n\t\tchatrooms.add(chatroom);\n\t\tusers.add(user);\n\t\t// save the chatroom, and its relations\n\t\tchatroomRepository.save(chatroom);\n\t}", "@Override\r\n\t\t\tpublic void onClick(ClickEvent event) {\n\t\t\t\tif (!chatTextBox.getText().equalsIgnoreCase(\"\")) {\r\n\t\t\t\t\tstoryTimeService.sendRoomChatMessage(roomData.roomName, chatTextBox.getText(), new AsyncCallback<Void>() {\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void onSuccess(Void result) {\r\n\t\t\t\t\t\t\tif (DEBUG)\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"Client: Sent message: \" + chatTextBox.getText());\r\n\t\t\t\t\t\t\tchatTextBox.setText(\"\");\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t}", "void createConversation(@NonNull final ConversationCreate request, @Nullable Callback<ComapiResult<ConversationDetails>> callback);", "public abstract void newChatTitleMessage(Message m);", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_messages, container, false);\n\n mConversationsRecycler = (RecyclerView) view.findViewById(R.id.messages_recycler);\n mConversationAdapter = new ConversationAdapter();\n mConversationAdapter.setOnItemClickListener(new OnItemClickListener() {\n @Override\n public void onClick(View v, int position) {\n Conversation conversation = mConversations.get(position);\n Toast.makeText(getActivity(), \"You want to chat with: \" + mConversations.get(position).getUserInfo().getUserId(), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity(), ChatActivity.class);\n intent.putExtra(\"friend_name\", conversation.getUserInfo().getUserId());\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }\n });\n mLayoutManager = new LinearLayoutManager(getActivity());\n mConversationsRecycler.setLayoutManager(mLayoutManager);\n mConversationsRecycler.setAdapter(mConversationAdapter);\n\n mConversationAdapter.updateUserInfo(mConversations);\n return view;\n }", "public void insertChatMessage(String chatMessageID, String chatID, String replierStaffNo, String replierStudentID, String messageContent, String dateTimePosted)\n {\n if(replierStaffNo.equals(\"\"))\n dbConnection.alterDataBase(\"INSERT INTO ChatMessage VALUES ('\"+chatMessageID+\"', '\"+chatID+\"', null, '\"+replierStudentID+\"', '\"+messageContent+\"', '\"+dateTimePosted+\"');\");\n if(replierStudentID.equals(\"\"))\n dbConnection.alterDataBase(\"INSERT INTO ChatMessage VALUES ('\"+chatMessageID+\"', '\"+chatID+\"', '\"+replierStaffNo+\"', null, '\"+messageContent+\"', '\"+dateTimePosted+\"');\");\n }", "public void SendToAll()\r\n {\r\n AlertDialog.Builder dialog=new AlertDialog.Builder(MainActivity.this);\r\n dialog.setTitle(\"Send Message To All Users\");\r\n dialog.setIcon(R.drawable.ic_action_send) ;\r\n dialog.setMessage(\"Enter your message :\") ;\r\n final EditText input =new EditText(this);\r\n input.setHint(\"Hi !\");\r\n dialog.setView(input) ;\r\n dialog.setPositiveButton(\"Send\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n if (!TextUtils.isEmpty(input.getText()))\r\n {\r\n firebaseUser=FirebaseAuth.getInstance().getCurrentUser() ;\r\n reference=FirebaseDatabase.getInstance().getReference(\"Users\");\r\n reference.addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\r\n for (DataSnapshot snapshot:dataSnapshot.getChildren())\r\n {\r\n final Users users=snapshot.getValue(Users.class);\r\n if (!users.getId().equals(firebaseUser.getUid()))\r\n {\r\n Calendar calendar=Calendar.getInstance() ;\r\n SimpleDateFormat format=new SimpleDateFormat(\"HH:mm\") ;\r\n String time=format.format(calendar.getTime()) ;\r\n String key = reference.child(\"Chats\").push().getKey() ;\r\n HashMap<String,Object>hashMap=new HashMap<>();\r\n hashMap.put(\"sender\",firebaseUser.getUid());\r\n hashMap.put(\"receiver\",users.getId());\r\n hashMap.put(\"message\",input.getText().toString());\r\n hashMap.put(\"id\",key);\r\n hashMap.put(\"time\",time);\r\n hashMap.put(\"isseen\",false) ;\r\n reference=FirebaseDatabase.getInstance().getReference(\"Chats\") ;\r\n reference.child(key).setValue(hashMap) ;\r\n final DatabaseReference chatRef=FirebaseDatabase.getInstance().getReference(\"chatlist\").child(firebaseUser.getUid()).child(users.getId());\r\n chatRef.addListenerForSingleValueEvent(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\r\n if(!dataSnapshot.exists())\r\n {\r\n chatRef.child(\"id\").setValue(users.getId());\r\n }\r\n }\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void onCancelled(@NonNull DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n }\r\n\r\n }\r\n });\r\n dialog.setNegativeButton(\"cancel\", new DialogInterface.OnClickListener() {\r\n @Override\r\n public void onClick(DialogInterface dialog, int which) {\r\n dialog.cancel();\r\n }\r\n });\r\n dialog.show();\r\n }", "public void addChat(final ChatPanel chatPanel)\n {\n if (ConfigurationUtils.isMultiChatWindowEnabled())\n addChatTab(chatPanel);\n else\n addSimpleChat(chatPanel);\n\n chatCount ++;\n\n chatPanel.setShown(true);\n\n for (ChatChangeListener l : chatChangeListeners)\n l.chatChanged(chatPanel);\n }", "public void onButtonClick(View v) {\n // initialize editText with method findViewById()\n // here editText will hold the name of room which is given by user\n EditText editText = findViewById(R.id.conferenceName);\n\n // store the string input by user in editText in\n // an local variable named text of string type\n String text = editText.getText().toString();\n\n // if user has typed some text in\n // EditText then only room will create\n if (text.length() > 0) {\n // creating a room using JitsiMeetConferenceOptions class\n // here .setRoom() method will set the text in room name\n // here launch method with launch a new room to user where\n // they can invite others too.\n JitsiMeetConferenceOptions options\n = new JitsiMeetConferenceOptions.Builder()\n .setRoom(text)\n .build();\n JitsiMeetActivity.launch(this, options);\n }\n\n }", "private void sendMessage(final String send, final String receive, String message){\n\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference();\n final String[] sendName = {\"\"};\n final String[] receiveName = {\"\"};\n\n HashMap<String,Object> hashMap = new HashMap<>();\n\n DatabaseReference userRef = FirebaseDatabase.getInstance().getReference(\"Users\");\n userRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for(DataSnapshot ds : dataSnapshot.getChildren()) {\n String uid = ds.getKey();\n if(uid.equals(send)) sendName[0] = ds.getValue(User.class).getName();\n else if(uid.equals(receive)) receiveName[0] = ds.getValue(User.class).getName();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n\n\n Chat message1 = new Chat(send, sendName[0], receive, receiveName[0], message);\n\n ref.child(\"chats\").push().setValue(message1);\n }", "public void showChat(){\n\t\tElement chatPanel = nifty.getScreen(\"hud\").findElementByName(\"chatPanel\");\n\t\tElement chatText = nifty.getScreen(\"hud\").findElementByName(\"chatText\");\n\t\tif(!chatPanel.isVisible()){\n\t\t\tchatPanel.startEffect(EffectEventId.onCustom);\n\t\t\tchatPanel.setVisible(true);\n\t\t}\n\t\tchatText.setFocus();\n\t}", "private void createHelper(int id, String sendername, int senderid, int getterid, String txt) {\n Message b = new Message(sendername, id, senderid, getterid, txt);\n allmessage.add(b);\n }", "public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }", "public void notifyCreation() {\n Player targetPlayer = this.getTarget().getPlayerReference(Player.class),\n senderPlayer = this.getToTeleport().getPlayerReference(Player.class);\n\n if (targetPlayer == null || senderPlayer == null) {\n return;\n }\n\n MainData.getIns().getMessageManager().getMessage(\"TPA_SENT\").sendTo(senderPlayer);\n\n if (this.type == TeleportType.TPA) {\n MainData.getIns().getMessageManager().getMessage(\"TPA_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n } else if (this.type == TeleportType.TPHERE) {\n MainData.getIns().getMessageManager().getMessage(\"TPHERE_REQUESTED\")\n .format(\"%player%\", getToTeleport().getNameWithPrefix()).sendTo(targetPlayer);\n }\n\n }", "public static void main(String[] args) {\n ChatHandler.setRepository(repository);\n webSocket(\"/chat\", ChatHandler.class);\n\n // this is only necessary for cross site development\n options(\"/*\", ((request, response) -> allowCrossOriginRequests(response)));\n\n // get all known chat rooms\n get(\"/chatRoom\", ((request, response) -> {\n List<ChatRoom> chatRooms = repository.getChatRooms();\n Either<Exception, String> jsonChatRooms = dataToJson(chatRooms);\n return createResponse(response, jsonChatRooms);\n }));\n\n // get chat history for a chat room\n get(\"/chatRoom/:chatRoomId\", ((request, response) -> {\n String id = getParameter(request, \":chatRoomId\");\n Optional<ChatRoom> chatRoom = findChatRoom(id);\n Optional<MessageLog> messageLog = chatRoom.map(cr -> repository.getMessageLog(cr));\n Either<Exception, Optional<String>> jsonMessageLog = dataToJson(messageLog);\n return createOptionalResponse(response, jsonMessageLog);\n }));\n\n // delete chat room including history\n delete(\"/chatRoom/:chatRoomId\", ((request, response) -> {\n String id = getParameter(request, \":chatRoomId\");\n Optional<ChatRoom> chatRoom = findChatRoom(id);\n chatRoom.ifPresent(cr -> repository.deleteChatRoom(cr));\n Either<Exception, Optional<String>> result = Either.right(chatRoom.map(x -> \"\"));\n return createOptionalResponse(response, result);\n }));\n\n // make a participant known to the system and return its id back to the caller\n post(\"/participant\", ((request, response) -> {\n Either<Exception, Participant> participant = jsonToData(request.body(), Participant.class);\n if (participant.isRight()) {\n String id = repository.addParticipant(participant.get());\n Either<Exception, String> jsonId = participant.map(p -> '\"' + id + '\"');\n return createResponse(response, jsonId);\n }\n else {\n return createResponse(response, participant.map(p -> \"\"));\n }\n }));\n\n // gets the Id of an existing participant. A poor mans login.\n get(\"/participant/:participantName\", ((request, response) -> {\n String participantName = getParameter(request, \":participantName\");\n Optional<Participant> knownParticipant = repository.login(participantName);\n Either<Exception, Optional<String>> result = dataToJson(knownParticipant);\n return createOptionalResponse(response, result);\n }));\n\n // make a chat room known to the system and return its id back to the caller\n post(\"/chatRoom\", ((request, response) -> {\n Either<Exception, ChatRoom> chatRoom = jsonToData(request.body(), ChatRoom.class);\n if (chatRoom.isRight()) {\n String id = repository.addChatRoom(chatRoom.get());\n Either<Exception, String> jsonId = chatRoom.map(c -> '\"' + id + '\"');\n return createResponse(response, jsonId);\n }\n else {\n return createResponse(response, chatRoom.map(c -> \"\"));\n }\n }));\n }", "public void chat ( String message ) {\n\t\texecute ( handle -> handle.chat ( message ) );\n\t}", "@Override\n public void add(ChatMessage object) {\n chatMessageList.add(object);\n super.add(object);\n }", "private ChatProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private void createGUI() {\r\n\t\t// Create the frame for client window.\r\n\t\tJFrame frame = new JFrame(\"Client\");\r\n\t\t/*\r\n\t\t * Set the layout as null as using setbounds to set complonents set size\r\n\t\t * and close the frame when clicked on exit\r\n\t\t */\r\n\t\tframe.setLayout(null);\r\n\t\t// exit chat rrom system if clicks on close icon\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tJLabel userlabel = new JLabel(\"Enter Username\");// label for username\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// input\r\n\t\tJLabel inputlabel = new JLabel(\"Enter Message\");// label for message\r\n\t\t/*\r\n\t\t * Create the buttons Send button to send messegs connect to connect to\r\n\t\t * chat room disconnect to logout from the chat room\r\n\t\t */\r\n\t\tJButton send = new JButton(\"Send\");\r\n\t\tJButton connect = new JButton(\"Connect\");\r\n\t\tJButton disconnect = new JButton(\"Disconnect\");\r\n\t\t// usertext is to input username from user and inputfield is to input\r\n\t\t// messages\r\n\t\tJTextField usertext = new JTextField();\r\n\t\t// set textfield as editable\r\n\t\tusertext.setEditable(true);\r\n\t\tJTextField inputfield = new JTextField();\r\n\t\t// set textfield as editable\r\n\t\tinputfield.setEditable(true);\r\n\t\tuserlabel.setBounds(10, 40, 100, 20);\r\n\t\tusertext.setBounds(120, 40, 120, 30);\r\n\t\tinputlabel.setBounds(10, 70, 150, 20);\r\n\t\tinputfield.setBounds(120, 70, 120, 30);\r\n\t\ttextarea.setBounds(10, 110, 500, 300);\r\n\t\t// https://www.youtube.com/watch?v=Uo5DY546rKY\r\n\t\tsend.setBounds(10, 430, 150, 30);\r\n\t\tconnect.setBounds(180, 430, 150, 30);\r\n\t\tdisconnect.setBounds(350, 430, 150, 30);\r\n\t\t// provide scrolling capability to textarea\r\n\t\tJScrollPane scrollPane = new JScrollPane(textarea);\r\n\t\t// set textarea as not editable\r\n\t\ttextarea.setEditable(false);\r\n\t\t// Create textfield to write message\r\n\t\t// http://cs.lmu.edu/~ray/notes/javanetexamples/\r\n\t\t// exit on close\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\t// put created components in the frame.\r\n\t\tframe.add(userlabel);// add userlabel to the frame\r\n\t\tframe.add(usertext);// add usertext to the frame\r\n\t\tframe.add(inputlabel);// add inputlabel to the frame\r\n\t\tframe.add(inputfield);// add inputfield to the frame\r\n\t\tframe.add(textarea);// add textarea to the frame\r\n\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\tframe.add(send);// add send button to the frame\r\n\t\tframe.add(connect);// add connect button to the frame\r\n\t\tframe.add(disconnect);// add disconnect button to the frame\r\n\t\t/*\r\n\t\t * add listeners set action to start button\r\n\t\t * https://docs.oracle.com/javase/tutorial/uiswing/components/button.\r\n\t\t * html#abstractbutton When user clicks on send button after adding\r\n\t\t * message then client converts that message to HTTP format\r\n\t\t */\r\n\t\tsend.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\r\n\t\t\t\ttry {\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * user-agent displays name of the browsers,this list shows\r\n\t\t\t\t\t * this application is independent of a browser. display the\r\n\t\t\t\t\t * host name in this case host is \"localhost\"\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString useragent = \" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36\";\r\n\t\t\t\t\tString host = \" Host:\" + socket.getInetAddress().getHostName();// get\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// host\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// name\r\n\r\n\t\t\t\t\t/* get length of the original messsage */\r\n\t\t\t\t\tString ContentLength = \" Content-length:\" + inputfield.getText().length();\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * htm as this is simple chat room system,independent of the\r\n\t\t\t\t\t * browser the content type is text/plain\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString contentType = \" Conent-Type:text/plain\";\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * To print current date in the HTTP date format explicitly\r\n\t\t\t\t\t * adding the time zone to the formatter\r\n\t\t\t\t\t */\r\n\t\t\t\t\tInstant i = Instant.now();\r\n\t\t\t\t\tString dateFormatted = DateTimeFormatter.RFC_1123_DATE_TIME.withZone(ZoneOffset.UTC).format(i);\r\n\t\t\t\t\tString currentDate = \"Date:\" + dateFormatted;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * To get time difference between to messages and converting\r\n\t\t\t\t\t * it to the string format\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString time2 = dispTime.format(System.currentTimeMillis());\r\n\t\t\t\t\tdate2 = dispTime.parse(time2);\r\n\t\t\t\t\t// get difference between previous message and recent\r\n\t\t\t\t\t// message\r\n\t\t\t\t\tdifference = date2.getTime() - date1.getTime();\r\n\t\t\t\t\tint min = (int) ((difference / (1000 * 60)) % 60);// calculate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// minute\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// difference\r\n\t\t\t\t\tint sec = (int) ((difference / 1000) % 60);//// calculate\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//// seconds\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//// difference\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * the format of the time is two digit numbers so concevert\r\n\t\t\t\t\t * minutes and seconds to 2 digits\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString m = String.format(\"%02d\", min);\r\n\t\t\t\t\tString s = String.format(\"%02d\", sec);\r\n\t\t\t\t\tString time = \"(\" + m + \".\" + s + \") - \";\r\n\t\t\t\t\t// minutes and seconds\r\n\t\t\t\t\tdate1 = date2;\r\n\t\t\t\t\t// append useragent,host,ContentLength,contentType to a\r\n\t\t\t\t\tString httpmsg = useragent + host + ContentLength + contentType + currentDate;\r\n\t\t\t\t\t// append timedifference to the username\r\n\t\t\t\t\tString timetrack = username + time;\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * append all the strings\r\n\t\t\t\t\t * useragent,host,ContentLength,contentType, timedifference\r\n\t\t\t\t\t * to the username for HTTP format in the main message\r\n\t\t\t\t\t * entered server reads this whole message\r\n\t\t\t\t\t */\r\n\t\t\t\t\tString wholeMsg = \"POST:\" + timetrack + \":\" + inputfield.getText() + \":\" + httpmsg + \":Chat\";\r\n\t\t\t\t\tout.println(wholeMsg);// send whole message in HTTP format\r\n\t\t\t\t\t\t\t\t\t\t\t// to output stream\r\n\t\t\t\t\tout.flush(); // flushes the buffer\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\t/*\r\n\t\t\t\t * After sending message to output stream clear the textfield\r\n\t\t\t\t * and set focus to inputfield to take messages input\r\n\t\t\t\t */\r\n\t\t\t\tinputfield.setText(\"\");\r\n\t\t\t\tinputfield.requestFocus();\r\n\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\t/*\r\n\t\t * add listner to connect button after entering username if user clicks\r\n\t\t * on connect button then it checks if the username is valid(ie.only\r\n\t\t * charachters) then its creates a new thread with setting username in\r\n\t\t * title\r\n\t\t */\r\n\t\tconnect.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\t\t\t\tif (isConnected == false) {\r\n\t\t\t\t\t// take username\r\n\t\t\t\t\tusername = usertext.getText();\r\n\r\n\t\t\t\t\t// check if the user name is valid that is contains only\r\n\t\t\t\t\t// letters\r\n\t\t\t\t\tif (username.matches(\"[a-zA-Z]*\")) {\r\n\t\t\t\t\t\tusertext.setEditable(false);\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\t// server is at localhost and port 7879 so use same\r\n\t\t\t\t\t\t\t// port number here\r\n\t\t\t\t\t\t\tsocket = new Socket(\"localhost\", 7879);\r\n\t\t\t\t\t\t\t// create inputstream and outputstream\r\n\t\t\t\t\t\t\tInputStreamReader streamreader = new InputStreamReader(socket.getInputStream());\r\n\t\t\t\t\t\t\tin = new BufferedReader(streamreader);\r\n\t\t\t\t\t\t\tout = new PrintWriter(socket.getOutputStream());\r\n\t\t\t\t\t\t\tout.println(\"POST:\" + username + \":(00.00) has connected.:Connect\");\r\n\t\t\t\t\t\t\tout.flush();\r\n\t\t\t\t\t\t\tisConnected = true; // connection is established so\r\n\t\t\t\t\t\t\t\t\t\t\t\t// this value is true\r\n\t\t\t\t\t\t\tconnect.setEnabled(false);// disable the connect\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// button\r\n\t\t\t\t\t\t\tframe.setTitle(\"Thread \" + username);\r\n\t\t\t\t\t\t} // try\r\n\t\t\t\t\t\tcatch (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// create and start a new thread\r\n\t\t\t\t\t\tThread thread = new Thread(new ListenServer());\r\n\t\t\t\t\t\tthread.start();\r\n\t\t\t\t\t} // if\r\n\t\t\t\t\t\t// if user enters invalid username then give message to\r\n\t\t\t\t\t\t// enter valid user name\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\ttextarea.append(\"Username is not valid.\");\r\n\t\t\t\t\t\ttextarea.append(\"\\nPlease enter only Charachters.\");\r\n\t\t\t\t\t\ttextarea.append(\"\");\r\n\r\n\t\t\t\t\t} // else\r\n\r\n\t\t\t\t} // if\r\n\t\t\t}\r\n\t\t});\r\n\t\t/*\r\n\t\t * add listner to disconnect button this button logs off the user from\r\n\t\t * chat room\r\n\t\t */\r\n\t\tdisconnect.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent action) {\r\n\t\t\t\tString dc = (\"POST:\" + username + \": has disconnected.:Disconnect\");\r\n\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * set output stream disable disconnect and send buttons\r\n\t\t\t\t\t */\r\n\t\t\t\t\tout.println(dc);\r\n\t\t\t\t\tout.flush();\r\n\t\t\t\t\tdisconnect.setEnabled(false);\r\n\t\t\t\t\tsend.setEnabled(false);\r\n\t\t\t\t\t// socket.close();\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\tisConnected = false;\r\n\t\t\t}\r\n\t\t});\r\n\t\t// setting frame as visible\r\n\t\tframe.setVisible(true);\r\n\t\tframe.setSize(520, 500);\r\n\t\tframe.setResizable(false);\r\n\r\n\t}", "@OnAlias(value = \"createmessage2\")\n\tpublic void createMessage2(TeamchatAPI api) throws Exception {\n\t\t// populating with message name list\n\t\t// get option name\n\t\tString[] project = api.context().currentReply().getField(\"project\")\n\t\t\t\t.split(\"\\\\|\");\n\t\t// get topic id from option name\n\t\tprojectId = project[(project.length - 1)].trim();\n\t\tapi.perform(api\n\t\t\t\t.context()\n\t\t\t\t.currentRoom()\n\t\t\t\t.post(new PrimaryChatlet()\n\t\t\t\t\t\t.setQuestion(\"Write your message\")\n\t\t\t\t\t\t.setReplyScreen(\n\t\t\t\t\t\t\t\tapi.objects()\n\t\t\t\t\t\t\t\t\t\t.form()\n\t\t\t\t\t\t\t\t\t\t.addField(\n\t\t\t\t\t\t\t\t\t\t\t\tapi.objects().input()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.name(\"subject\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.label(\"Title\"))\n\t\t\t\t\t\t\t\t\t\t.addField(\n\t\t\t\t\t\t\t\t\t\t\t\tapi.objects().input()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.name(\"content\")\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.label(\"Message\")))\n\t\t\t\t\t\t.setReplyLabel(\"Send\").alias(\"createmessage3\")));\n\t}", "@Override\r\n\tpublic int insertChat(Chat1VO vo) throws Exception {\n\t\treturn dao.insertChat(vo);\r\n\t}" ]
[ "0.6699399", "0.64964175", "0.6363686", "0.6176104", "0.59892815", "0.59523624", "0.5824125", "0.5821683", "0.5778704", "0.5769653", "0.5768573", "0.57663506", "0.57283413", "0.57186896", "0.5712417", "0.5708854", "0.56988716", "0.56770164", "0.5666618", "0.5653004", "0.56518704", "0.5648186", "0.56046623", "0.55820805", "0.5576108", "0.55740976", "0.5523399", "0.550767", "0.54972225", "0.54932696", "0.5463325", "0.54585505", "0.54166055", "0.5415203", "0.5413811", "0.53582436", "0.5349541", "0.5339069", "0.533785", "0.5334495", "0.5313807", "0.53046507", "0.5300494", "0.5295993", "0.52764463", "0.52746713", "0.52708375", "0.5263727", "0.52541757", "0.5230264", "0.52126205", "0.5194278", "0.5189768", "0.5183114", "0.5179646", "0.517936", "0.5175638", "0.5163591", "0.51476514", "0.514581", "0.5130448", "0.51205117", "0.5116793", "0.51039267", "0.50892943", "0.50848013", "0.50774693", "0.50761235", "0.50753796", "0.5067329", "0.5063461", "0.50628304", "0.5062133", "0.50566196", "0.5056123", "0.50532246", "0.50529325", "0.5044944", "0.5044877", "0.50358135", "0.5032038", "0.50297767", "0.5024855", "0.50169283", "0.50139475", "0.5012561", "0.50104475", "0.5007506", "0.5003324", "0.49972215", "0.49936554", "0.49857113", "0.49706084", "0.49672183", "0.49645653", "0.4963755", "0.49511644", "0.49506482", "0.49490407", "0.494379" ]
0.8258849
0
Tells the view to open the editview.
public void onChangedAdBtnPressed() { String uniqueID = advertisement.getUniqueID(); view.showEditView(uniqueID); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickEdit() {\r\n\t\tEdit.click();\r\n\t}", "@FXML\n\tpublic void editClicked(ActionEvent e) {\n\t\tMain.getInstance().navigateToDialog(\n\t\t\t\tConstants.EditableCourseDataViewPath, course);\n\t}", "protected void editClicked(View view){\n FragmentManager fm = getSupportFragmentManager();\n ЕditDialog editDialogFragment = new ЕditDialog(2);\n Bundle args = new Bundle();\n args.putInt(\"position\", this.position);\n args.putString(\"itemName\", this.itm.getItem(this.position).getName());\n args.putString(\"itemUrl\", this.itm.getItem(this.position).getUrl());\n editDialogFragment.setArguments(args);\n editDialogFragment.show(fm, \"edit_item\");\n }", "boolean openPageInEditMode();", "private void goToEditPage()\n {\n Intent intent = new Intent(getActivity(),EditProfilePage.class);\n getActivity().startActivity(intent);\n }", "private void editKnowledge(EditView editView) {\n\n if (!checkIfKnowledgeBaseLoaded()) {\n return;\n }\n\n try {\n URL editUrl = getClass().getResource(\"/fxml/Edit.fxml\");\n Context.getInstance().setCurrentEditView(editView);\n\n AnchorPane editViewPane = FXMLLoader.load(editUrl);\n BorderPane border = MainFrame.getRoot();\n\n border.setCenter(editViewPane);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "void onEditClicked();", "public void onPressEdit() {\r\n Intent intent = new Intent(this, CreateEventActivity.class);\r\n intent.putExtra(CreateEventActivity.EXTRA_EDIT_EVENT_UID, event.uid);\r\n startActivity(intent);\r\n }", "public void clickEditLink() {\r\n\t\tbtn_EditLink.click();\r\n\t}", "public String loadMainEdit(){\r\n\t\treturn \"edit\";\r\n }", "public void edit() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"editButton\").click();\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(NoteListActivity.this,\r\n\t\t\t\t\t\tEditNoteActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\t\t\t}", "private void edit() {\n\n\t}", "@GetMapping(\"/edit\")\r\n public String editView() {\r\n return \"modify\";\r\n }", "@Override\n public void onClick(View view) {\n Intent addEvent = new Intent(getApplicationContext(), EditActivity.class);\n startActivity(addEvent);\n }", "public void toggleEdit()\n {\n \tif (editMode == false) {\n \t\teditMode = true;\n \t} else {\n \t\teditMode = false;\n \t}\n }", "public ViewResumePage clickonedit() throws Exception{\r\n\t\t\ttry {\r\n\t\t\t\telement = driver.findElement(edit);\r\n\t\t\t\tflag = element.isDisplayed() && element.isEnabled();\r\n\t\t\t\tAssert.assertTrue(flag, \"Edit button is not displayed\");\r\n\t\t\t\telement.click();\r\n\t\t\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\r\n\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tthrow new Exception(\"Edit Button NOT FOUND:: \"+e.getLocalizedMessage());\r\n\t\t\t}\r\n\t\t\treturn new ViewResumePage(driver);\r\n\t\t\r\n\t}", "@Override\n\tpublic void editAction(int id) {\n\t\t\n\t}", "@Override\r\n\tpublic void edit() {\n\t\t\r\n\t}", "public String getEditViewPath() {\n return \"games/edit\";\n }", "public String edit() {\n return \"edit\";\n }", "public static void goToEditSongWindow()\n {\n EditSongWindow editSongWindow = new EditSongWindow();\n editSongWindow.setVisible(true);\n editSongWindow.setFatherWindow(actualWindow, false);\n }", "void showTodoViewToEdit(Task task);", "public void setEdit(java.lang.Boolean edit) {\n this.edit = edit;\n }", "@Override\n \t\t\tpublic void onClick(View view) {\n \t\t\t\t Intent intent = new Intent(getActivity(), AddEditChoresActivity.class);\n \t\t\t\t startActivity(intent);\n \t\t\t}", "public edit() {\n initComponents();\n }", "public abstract void edit();", "public void clickOpenEditDialog(Item item){\n /** Store as public reference */\n this.item = item;\n dialogNewItem.show();\n }", "public EditTeamPage pressEditButton() {\n controls.getEditButton().click();\n return new EditTeamPage();\n }", "public void onClickEditModules(View view)\r\n {\r\n Intent intent = new Intent(this, EditPathwaySelection.class);\r\n startActivity(intent);\r\n }", "private void editMode() {\n\t\t// Set the boolean to true to indicate in edit mode\n\t\teditableEditTexts();\n\t\thideEditDelete();\n\t\thideEmail();\n\t\tshowSaveAndAdd();\n\t\tshowThatEditable();\n\t}", "private void launchEditVolPage(View view, Volunteer thisGuy){\n final Intent launchEdit = new Intent(manageVolunteers.this,ManagerEditVolunteer.class);\n\n Bundle bundle = new Bundle();\n bundle.putSerializable(\"thisGuy\", thisGuy);\n launchEdit.putExtra(\"bundle\", bundle);\n startActivity(launchEdit);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(MainActivity.this, EditDataActivity.class);\n startActivity(intent);\n\n }", "@Override\n public void onClick(View view) {\n\n ((EditFragmentInterface) (view.getContext())).edit(projectId, false);\n }", "@Override\n public void onClick(View v) {\n enableEditMode();\n }", "@FXML\n private void editSelected() {\n if (selectedAccount == null) {\n // Warn user if no account was selected.\n noAccountSelectedAlert(\"Edit DonorReceiver\");\n } else {\n EditPaneController.setAccount(selectedAccount);\n PageNav.loadNewPage(PageNav.EDIT);\n }\n }", "private View.OnClickListener HandleEdit() {\n return v -> {\n //Change the application state to edit mode\n mMainActivityState.ChangeActivityMode(Mode.EDIT);\n //Close the current dialog\n mCurrentDialog.dismiss();\n };\n }", "public void onClick(View view) {\n Log.d(\"Edit\",\"EDITED\");\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(CatalogActivity.this, EditorActivity.class);\n startActivity(intent);\n }", "public void contactEdit() {\n Intent editIntent = new Intent(viewContacts.this, editContact.class); //start the intent to go back to edit contact\n editIntent.putExtra(\"MyID\", edit_intent);\n\n startActivity(editIntent); //start the activity\n\n\n\n }", "@FXML\n\tprivate void handleEdit() {\n\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\tshowCustomerInfoDialog(customer);\n\t}", "@Override\n\t\t\t// On click function\n\t\t\tpublic void onClick(View view) {\n\t\t\t\tIntent intent = new Intent(view.getContext(),\n\t\t\t\t\t\tEditProfileActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tfinish();\n\t\t\t}", "private void showThatEditable() {\n\t\tTextView tv = new TextView(this);\n\t\ttv.setText(\"You may now edit this recipe!\");\n\t\tAlertDialog.Builder alert = new AlertDialog.Builder(this);\n\t\talert.setTitle(\"Edit Mode\");\n\t\talert.setView(tv);\n\t\talert.setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\tpublic void onClick(DialogInterface dialog, int whichButton) {\n\t\t\t}\n\t\t});\n\t\talert.show();\n\t}", "protected boolean isEdit(){\n\t\treturn getArguments().getBoolean(ARG_KEY_IS_EDIT);\n\t}", "public void editDoc(View view) {\n Intent intent = new Intent(this, EditActivity.class);\n intent.putExtra(\"text\", doc);\n startActivityForResult(intent, EDIT_DOC);//CTRL+ALT+C per canviar de 0 a una variable\n }", "public Edit() {\n initComponents();\n }", "public void marksEdit(View view) {\n Intent intent = new Intent(getApplicationContext(), InsertingAtten.class);\n intent.putExtra(\"STATUS\", \"edit\");\n intent.putExtra(\"SEMESTER\", semester);\n intent.putExtra(\"SECTION\", section);\n intent.putExtra(\"COURSEID\", courseId);\n intent.putExtra(\"DEPARTMENT\", department);\n intent.putExtra(\"SERIES\", series);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\tIntent i = new Intent(NewProfileActivity.this,\n\t\t\t\t\t\tTBDispContacts.class);\n\t\t\t\ti.putExtra(\"Edit\", \"true\");\n\t\t\t\ti.putExtra(\"Details\", \"false\");\n\t\t\t\tstartActivity(i);\n\t\t\t}", "public void mmEditClick(ActionEvent event) throws Exception{\r\n displayEditProfile();\r\n }", "private void edit() {\n mc.displayGuiScreen(new GuiEditAccount(selectedAccountIndex));\n }", "public String editView()\n {\n logger.info(\"**** In editView in Controller ****\" + categoryId);\n this.category = categoryService.getCategoryByCategoryId(categoryId);\n return Constants.EDIT_CATEGORY_VIEW;\n }", "@FXML\n public void editSet(MouseEvent e) {\n AnchorPane root = null;\n FXMLLoader loader = new FXMLLoader(getClass().getResource(\"/view/learn_update.fxml\"));\n try {\n root = loader.load();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n LearnUpdateController controller = loader.getController();\n controller.initData(txtTitle.getText(), rootController, learnController, apnLearn);\n rootController.setActivity(root);\n root.requestFocus();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\r\n\t\t\t\tIntent intent = new Intent(v.getContext(),\r\n\t\t\t\t\t\tCommonlyPatientEditActivity.class);\r\n\t\t\t\tstartActivity(intent);\r\n\r\n\t\t\t}", "public void setEdit(boolean bool){\r\n edit = bool;\r\n }", "public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }", "public void editOperation() {\n\t\t\r\n\t}", "public void setEditButton(Button editButton) {\n\t\tthis.editButton = editButton;\n\t}", "public EmpresaEditView(String codigo, JDesktopPane index) {\n super(\"EDITAR EMPRESA\");\n index.add(this);\n initComponents();\n EmpresaDAO dao = new EmpresaDAO();\n EmpresaBEAN empresas = dao.get(codigo);\n txtNome.setText(empresas.getNome());\n txtEndereco.setText(empresas.getEndereco());\n txtBairro.setText(empresas.getBairro());\n txtCodigo.setText(empresas.getCodigo());\n txtCnpj.setText(empresas.getCnpj());\n txtTelefone.setText(empresas.getTelefone());\n txtLogradouro.setText(empresas.getLogradouro());\n selectEstado.setSelectedItem(empresas.getEstado());\n\n }", "public void setEditFlag(Boolean editFlag) {\n this.editFlag = editFlag;\n }", "public void onEdit(View view){\n\n Intent intent = new Intent(this,ACT_Edit_Course.class);\n intent.putExtra(\"refID\",selectedCategory);\n startActivity(intent);\n\n }", "public void switchToEditor() {\r\n\t\teditPane.addEditTabs(editTabs);\r\n\t\tlayout.show(this, \"editPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "private void showEdit(String contactId) {\n \t\tIntent i = new Intent(GroupActivity.this, EditContactActivity.class);\r\n \t\ti.setData(Uri.parse(ContactsContract.Contacts.CONTENT_URI + \"/\"\r\n \t\t\t\t+ contactId));\r\n \t\tstartActivityForResult(i, EDIT_CONTACT);\r\n \t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tLog.e(\"edit pressed\", \"edit pressed\");\n\t\t\t\t\teditflag = !editflag;\n\t\t\t\t\tsetFieldEditFlag(editflag);\n\t\t\t\t\t//\tpicview1.setEnabled(true);\n\n\t\t\t\t}", "public static void ShowEditUser() {\n ToggleVisibility(UsersPage.window);\n }", "@Override\n\tpublic ModelAndView edit(String id) {\n\t\treturn null;\n\t}", "protected final void doEdit(Transaction trans, boolean startEdit) {\n\t\tenableForm(false);\n\t\tgetForm().getButton(EDIT).setEnabled(true);\n\n\t\tfillFormWith(trans);\n\n\t\tsetIsInEditMode(true);\n\t\tsetEditModeTransaction(trans);\n\n\t\tif (startEdit == true) {\n\t\t\tenableForm(true);\n\t\t\tgetForm().getButton(EDIT).setEnabled(false);\n\t\t\tgetForm().getButton(PENDING).requestFocus();\n\t\t}\n\t}", "@FXML\r\n\tvoid openEditUser(ActionEvent event) {\r\n\t\tParent root = null;\r\n\t\tnewWindow = new Stage();\r\n\t\ttry {\r\n\t\t\troot = FXMLLoader.load(getClass().getResource(\"3.1-AddISUsersScreen.fxml\"));\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tISUsers = new Scene(root);\r\n\t\tISUsersScreenController._ins.enableFindBtn();\r\n\t\tnewWindow.setTitle(\"Edit IS User\");\r\n\t\tnewWindow.setScene(ISUsers);\r\n\t\tnewWindow.initOwner((Stage) ((Node) event.getSource()).getScene().getWindow());\r\n\t\tnewWindow.initModality(Modality.WINDOW_MODAL);\r\n\t\tnewWindow.setResizable(false);\r\n\t\tnewWindow.show();\r\n\t}", "public static AssessmentEditForm openEditAssessment(Assessment assm, Integer number) {\n AssessmentSearchForm searchPage = openFillSearchForm(assm);\n\n Logger.getInstance().info(\"Click the [Search] button\");\n searchPage.clickButton(Buttons.Search);\n\n Logger.getInstance().info(\"Click the 'Participant's name' of any Assessment shown in the Search Results\");\n new SearchResultsForm().openSearchResult(number);\n Logger.getInstance().info(\"Click the [Edit] button\");\n AssessmentDetailsForm detailsPage = new AssessmentDetailsForm();\n detailsPage.clickButton(Buttons.Edit);\n return new AssessmentEditForm();\n }", "public void clickEdit(View view) {\n if(editTime == true){\n bEdit.setText(\"Edit\");\n editTime = false;\n timePicker.setEnabled(false);\n if(switch1.isChecked())\n scheduleAlarm();\n }\n else {\n editTime = true;\n timePicker.setEnabled(true);\n bEdit.setText(\"Save\");\n hour = timePicker.getCurrentHour(); //get hour\n minute = timePicker.getCurrentMinute(); //get minutes\n }\n }", "private void editComic() {\n mainActivity.ISSUE_ID = comic.getComicID();\n\n //Load the edit fragment\n mainActivity.loadEditComicFragment();\n }", "protected abstract void editItem();", "public void editBtnOnclick()\r\n\t{\r\n\t\tif(cardSet.getCards().size() != 0)\r\n\t\t\tMainRunner.getSceneSelector().switchToCardEditor();\r\n\t}", "@Override\n public void onClick(View view) {\n mRepo.setIsEditingCard(Boolean.TRUE);\n mRepo.setCurrentCardTitle(model.getTitle());\n\n Navigation.findNavController(requireView()).navigate(R.id.action_editDeckFragment_to_submitCardFragment);\n }", "public String edit() {\r\n\t\tuserEdit = (User) users.getRowData();\r\n\t\treturn \"edit\";\r\n\t}", "@Override\n public void onClick(View view) {\n saveBlocks();\n XmlDataManager.changeProject(model);\n\n Intent i = new Intent(DetailViewActivityEdit.this, MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(i);\n finish();\n }", "@FXML\r\n\tprivate void editEmployee(ActionEvent event) {\r\n\t\tbtEditar.setDisable(true);\r\n\t\tbtGuardar.setDisable(false);\r\n\t\tconmuteFields();\r\n\t}", "@Override\n public void editClick(int pos) {\n editPos = pos;\n\n Calendar c = Calendar.getInstance();\n year = c.get(Calendar.YEAR);\n month = c.get(Calendar.MONTH);\n day = c.get(Calendar.DAY_OF_MONTH);\n\n DatePickerDialog datePickerDialog = new DatePickerDialog(AdminCalendar.this, AdminCalendar.this, year, month, day);\n datePickerDialog.show();\n }", "public void editDogButtonClicked() {\r\n if (areFieldsNotBlank()) {\r\n viewModel.editDog();\r\n viewHandler.openView(\"home\");\r\n dogNameField.setStyle(null);\r\n }\r\n }", "void onEditItem(E itemElementView);", "public void onEditItem(View view) {\n Intent data = new Intent(EditItemActivity.this, MainActivity.class);\n data.putExtra(\"position\", elementId);\n data.putExtra(\"text\", etText.getText().toString());\n setResult(RESULT_OK, data);\n finish();\n }", "@Override\n\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\tIntent i = new Intent(view.getContext(), OpenNote.class);\n\t\t\t\t\ti.putExtra(\"ID\", lyrics.get(getBindingAdapterPosition()).getID());\n\t\t\t\t\tview.getContext().startActivity(i);\n\t\t\t\t}", "public void startEdit(String mode) {\n super.setEditMode(true);\n\n if (!isQuestionEditMode) {\n FacesContext.getCurrentInstance().getPartialViewContext().getRenderIds().add(\"tabsView\"); //update tabsView\n }\n\n setPositionEditMode(false);\n setLevelEditMode(false);\n\n setQuestionEditMode(false);\n setIndQuestionInEditMode(-1);\n\n if (\"position\".equals(mode)) {\n setPositionEditMode(true);\n }\n if (\"level\".equals(mode)) {\n setLevelEditMode(true);\n }\n if (\"question\".equals(mode)) {\n setQuestionEditMode(true);\n }\n }", "public void editTitle(View view) {\n Intent intent = new Intent(this, EditActivity.class);\n intent.putExtra(\"text\", title);\n startActivityForResult(intent, EDIT_TITLE);//CTRL+ALT+C per canviar de 0 a una variable\n }", "public void clickEditButton(){\r\n\t\t\r\n\t\tMcsElement.getElementByXpath(driver, \"//div[contains(@class,'x-tab-panel-noborder') and not(contains(@class,'x-hide-display'))]//button[contains(@class,'icon-ov-edit')]\").click();\r\n\t\t\r\n\t}", "public String fillEditPage() {\n\t\t\n\t\ttry{\n\t\t\t// Putting attribute of playlist inside the page to view it \n\t\t\tFacesContext.getCurrentInstance().getExternalContext().getRequestMap().put(\"playlist\", service.viewPlaylist());\n\t\t\t\n\t\t\t// Send user to EditPlaylistPage\n\t\t\treturn \"EditPlaylistPage\";\n\t\t}\n\t\t// Catch exceptions and send to ErrorPage\n\t\tcatch(Exception e) {\n\t\t\treturn \"ErrorPage.xhtml\";\n\t\t}\n\t}", "public void OnIngredients (View View)\n {\n \tIntent intent = new Intent(this, EditIngredients.class);\n \t\tstartActivity(intent);\n }", "public void edit(RequestBean request) {\n\t\t\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n root = inflater.inflate(R.layout.activity_user_information, container, false);\n\n edit = root.findViewById(R.id.button12);\n edit.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openedit(root);\n }\n });\n\n\n return root;\n }", "@Override\n public void onClick(View v) {\n Intent intent = PostEditActivity.newIntent(contex);\n intent.putExtra(\"PostKey\", postKey);\n contex.startActivity(intent);\n }", "public static void editButtonAction(ActionContext actionContext){\n Table dataTable = actionContext.getObject(\"dataTable\");\n Shell shell = actionContext.getObject(\"shell\");\n Thing store = actionContext.getObject(\"store\");\n \n TableItem[] items = dataTable.getSelection();\n if(items == null || items.length == 0){\n MessageBox box = new MessageBox(shell, SWT.ICON_WARNING | SWT.OK);\n box.setText(\"警告\");\n box.setMessage(\"请先选择一条记录!\");\n box.open();\n return;\n }\n \n store.doAction(\"openEditForm\", actionContext, \"record\", items[0].getData());\n }", "@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getActionCommand()==\"IND\"){\n\t\t\tframeVE.setVisible(false);\n\t\t\tAdminIndView View = new AdminIndView();\n\t\t\tView.AdminViewInd(getSelectedEmp());\n\t\t\t\n\t\t}\n\t\tif(e.getActionCommand()==\"GROUP\"){\n\t\t\tframeVE.setVisible(false);\n\t\t\tAdminView View = new AdminView();\n\t\t\tView.AdminPageView();\n\t\t\t\n\t\t}\n\t\tif(e.getActionCommand()==\"Back\"){\n\t\t\tframeVE.setVisible(false);\n\t\t\tAdminFunctionPage AFP = new AdminFunctionPage();\n\t\t\tAFP.AdminControl();\n\t\t}\n\t\t\n\t}", "private void openView(String viewToOpen)\n throws IOException, InterruptedException, URISyntaxException {\n Parent root = null;\n FXMLLoader loader = new FXMLLoader();\n loader.setLocation(getClass().getResource(viewToOpen + \"/\" + viewToOpen + \".fxml\"));\n root = loader.load();\n\n if (\"view0\".equals(viewToOpen)) {\n view0Controller = loader.getController();\n view0Controller.init(getVmFactory());\n }\n\n Scene s;\n s = new Scene(root);\n primaryStage.setScene(s);\n primaryStage.initStyle(StageStyle.UNDECORATED);\n primaryStage.initStyle(StageStyle.TRANSPARENT);\n primaryStage.show();\n\n // getcounter/iteratorvalue\n\n }", "public void editAss() throws IOException {\r\n\t\tif (listview.getSelectionModel().getSelectedItem() != null) {\r\n\t\t\tassToChoose = listview.getSelectionModel().getSelectedItem();\r\n\t\t\tfor (int i = 0; i < b.size(); i++) {\r\n\t\t\t\tif (b.get(i).getAssname().equals(assToChoose)) {\r\n\t\t\t\t\tassId = b.get(i).getAssId();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tconnectionmain.showTeacherEditAssGUI();\r\n\t\t}\r\n\t}", "@Override\n public void onItemClick(AdapterView<?> listView, View view, int position, long itemId) {\n EditAPISettingDialogFragment.newInstance(itemId, getItem(position))\n .show(getSupportFragmentManager(), \"EditAPISettingDialogFragment\");\n }", "@FXML\r\n public void handleOnEditButtonClick ()\r\n {\r\n mainApp.showCountryEditDialog(country);\r\n }", "public boolean shouldEditButtonBePresent();", "public void onClick(View v) {\n\t\t\t\t\tIntent intent=new Intent(DraftEdit.this,Drafts.class);\n\t\t\t\t\tintent.putExtra(\"draftID\", draftID);\n\t\t\t\t\tintent.putExtra(\"draftText\", draftTxt.getText().toString());\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t}", "void gotoEditProfile();", "@FXML\n void setBtnEditOnClick() {\n isEdit = true;\n isAdd = false;\n isDelete = false;\n }", "@OnClick(R.id.btn_edit_profile)\n public void btnEditProfile(View view) {\n Intent i=new Intent(SettingsActivity.this,EditProfileActivity.class);\n i.putExtra(getString(R.string.rootUserInfo), rootUserInfo);\n startActivity(i);\n }", "@FXML\n private void editTest(ActionEvent event)\n {\n }" ]
[ "0.7257606", "0.7012689", "0.68159324", "0.6801494", "0.67296076", "0.6718455", "0.6694782", "0.6688191", "0.6678473", "0.66738445", "0.6644337", "0.6629224", "0.6618185", "0.66160226", "0.66018766", "0.6591853", "0.65881145", "0.6576684", "0.6554193", "0.6524426", "0.6506619", "0.650296", "0.6475312", "0.6461699", "0.64604384", "0.64422727", "0.6426667", "0.6394996", "0.6360529", "0.6338035", "0.6334653", "0.6333429", "0.63180214", "0.62942445", "0.6291348", "0.62860286", "0.62859213", "0.6285116", "0.62728435", "0.62424433", "0.623327", "0.62128985", "0.6211847", "0.61950904", "0.6187883", "0.6161984", "0.61371624", "0.612955", "0.6112059", "0.6108682", "0.6104798", "0.6087695", "0.605768", "0.60558015", "0.6043097", "0.6037955", "0.6031789", "0.60187674", "0.6015407", "0.5986572", "0.59850097", "0.5982403", "0.5980661", "0.5974878", "0.5959927", "0.59581435", "0.59419", "0.5913701", "0.59120935", "0.5911614", "0.5904278", "0.5895685", "0.5879938", "0.5866071", "0.5859034", "0.58523047", "0.58504844", "0.58465004", "0.5838457", "0.58374536", "0.583703", "0.58293223", "0.5826569", "0.5818633", "0.581793", "0.5807022", "0.58040893", "0.57973385", "0.5794211", "0.5793041", "0.57905066", "0.5785645", "0.57844085", "0.57838774", "0.5778802", "0.5776787", "0.57749563", "0.5773086", "0.5767777", "0.5757409", "0.5757048" ]
0.0
-1
Checks if the current user already has an active chat associated with the advertisement. If so, the method finds and opens the already existing chat. Otherwise it creates and opens a new chat.
public void contactOwnerBtnClicked() { if (contactOwnerButtonClickedOnceBefore) { String chatID = dataModel.findChatID(advertisement.getUniqueID()); if (chatID != null) { openChat(chatID); } else { createNewChat(); } } else { view.setOwnerButtonText(); } contactOwnerButtonClickedOnceBefore = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewChat() {\n if (advertisement.getUniqueOwnerID().equals(dataModel.getUserID())) {\n view.showCanNotSendMessageToYourselfToast();\n return;\n }\n\n dataModel.createNewChat(advertisement.getUniqueOwnerID(), advertisement.getOwner(), advertisement.getUniqueID(),\n advertisement.getImageUrl(), chatID -> view.openChat(chatID));\n }", "boolean hasChatRoom();", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n String chat = chat_field.getText().toString();\n\n\n LandingActivity current_activity = (LandingActivity)getActivity();\n if(current_activity != null){\n new Chat(chat, current_user.getUsername(), getActivity());\n }\n //Construct the new Object\n\n }", "public boolean isChatEnabled();", "@Override\n public void onOpenChat(int theChatId) {\n if (theChatId == -1) {\n loadFragment(new StartChatFragment());\n } else {\n Intent intent = new Intent(this, ChatActivity.class);\n intent.putExtra(\"CHAT_ID\", String.valueOf(theChatId));\n startActivity(intent);\n }\n }", "public boolean isSetChat() {\n return this.chat != null;\n }", "@Override\n\tpublic void chatCreated(Chat chat, boolean createdLocally) {\n\t\tif (!createdLocally){\n\t\t\t/*try {\n\t\t\t\tchat.sendMessage(\"我是客户端发送的消息!!\");\n\t\t\t} catch (NotConnectedException e) {\n\t\t\t\t// TODOAuto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}*/\n\t\t\tchat.addMessageListener(new UserLocalChatMessageListener());\n\t\t}\n\t}", "public boolean createChat(String friendName, String conversationID, MessageListener conversationListener){\n\n\t\tboolean chatCreated = false;\n\n\t\tif(serverConnection.isConnected()){\n\n\t\t\tif(!chatInstanceMap.containsKey(friendName))\n\t\t\t{\n\t\t\t\tChat newConversation = serverConnection.getChatManager().createChat(friendName, conversationID, conversationListener);\n\n\t\t\t\tchatInstanceMap.put(friendName, newConversation);\n\n\t\t\t\tchatCreated = true;\n\t\t\t}\n\t\t}\t\n\n\t\treturn chatCreated;\n\t}", "public String existChat(String idChat) {\n\t\tString result = null;\n\t\tCursor cursor = db.query(TABLE_MESSAGES, new String[] {ID_CHAT},\n\t\t\t\tID_CHAT + \" = '\" + idChat+\"'\",\n\t\t\t\tnull, null, null,null);\n\t\tif (cursor.moveToFirst()){\n\t\t\tresult = idChat;\n\t\t}\t\n\t\tif (!cursor.isClosed())\n\t\t\tcursor.close();\n\t\treturn result;\n\t}", "public void showChat(){\n\t\tElement chatPanel = nifty.getScreen(\"hud\").findElementByName(\"chatPanel\");\n\t\tElement chatText = nifty.getScreen(\"hud\").findElementByName(\"chatText\");\n\t\tif(!chatPanel.isVisible()){\n\t\t\tchatPanel.startEffect(EffectEventId.onCustom);\n\t\t\tchatPanel.setVisible(true);\n\t\t}\n\t\tchatText.setFocus();\n\t}", "public void addChat(final ChatPanel chatPanel)\n {\n if (ConfigurationUtils.isMultiChatWindowEnabled())\n addChatTab(chatPanel);\n else\n addSimpleChat(chatPanel);\n\n chatCount ++;\n\n chatPanel.setShown(true);\n\n for (ChatChangeListener l : chatChangeListeners)\n l.chatChanged(chatPanel);\n }", "public void enableChat();", "public void addChatToRoom(String username, String text)\r\n\t{\r\n\t\t// make sure we're not sending the current user's recent chat again\r\n\t\tif(!basicAvatarData.getUsername().equals(username))\r\n\t\t{\r\n\t\t\ttheGridView.addTextBubble(username, text, 100);\r\n\t\t}\r\n\t}", "public boolean chatEnabled();", "public void openCurrentMessage() {\n if (this.currentMessageObject != null) {\n Intent intent = new Intent(ApplicationLoader.applicationContext, LaunchActivity.class);\n long dialogId = this.currentMessageObject.getDialogId();\n if (DialogObject.isEncryptedDialog(dialogId)) {\n intent.putExtra(\"encId\", DialogObject.getEncryptedChatId(dialogId));\n } else if (DialogObject.isUserDialog(dialogId)) {\n intent.putExtra(\"userId\", dialogId);\n } else if (DialogObject.isChatDialog(dialogId)) {\n intent.putExtra(\"chatId\", -dialogId);\n }\n intent.putExtra(\"currentAccount\", this.currentMessageObject.currentAccount);\n intent.setAction(\"com.tmessages.openchat\" + Math.random() + Integer.MAX_VALUE);\n intent.setFlags(32768);\n startActivity(intent);\n onFinish();\n finish();\n }\n }", "public boolean isChatVisible() {\n return chatVisible;\n }", "private void startChat(String chatId){\n Intent chatContactActivity = new Intent(getContext() , ChatActivity.class);\n chatContactActivity.putExtra(\"chatId\", chatId);\n startActivityForResult(chatContactActivity, 16);\n }", "private\tNewChatPopup\tgetChatPopup(UIRosterEntry other)\n\t{\n\t\t//\tFirst check if it is already active. If not then construct if\n\t\t//\tpossible.\n\t\t\n\t\tNewChatPopup popup = (NewChatPopup)this.chats.get(other.getUserId());\n\t\tif (popup == null)\n\t\t{\n\t\t\tNewChatPanel panel = new NewChatPanel(this.me,other);\n\t\t\tpopup = new NewChatPopup(panel, -1);\n\t\t\t\n\t\t\tthis.chats.put(other.getUserId(),popup);\n\t\t}\n\t\tpopup.refreshName();\n\t\treturn\tpopup;\n\t}", "boolean hasChatType();", "boolean hasChatData();", "@Override\n\tpublic void chatCreated(Chat conversation, boolean localCreated) {\n\t\tif(!localCreated){\n\n\t\t\tchatInstanceMap.put(conversation.getThreadID(), conversation);\n\n\t\t}\n\t}", "public boolean hasChatbox() {\r\n return chatbox != null && chatbox.getId() > 0;\r\n }", "private\tvoid\tshowChatPopupIfPossible(NewChatPopup chatPopup)\n\t{\n\t\tif (chatPopup.getIndex() == -1)\n\t\t{\n\t\t\t//\tMeans its either new or being reactivated.\n\t\t\tint\tindex = this.getFreeChatPopupIndex();\n\t\t\tif (index != -1)\n\t\t\t{\n\t\t\t\tchatPopup.setIndex(index);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//\tGet the oldest chat window, close it and show the new one.\n\t\t\t\tNewChatPopup leastActiveChatPopup = this.getLeastActiveChat();\n\t\t\t\tthis.closeChat(leastActiveChatPopup);\n\t\t\t\tindex = this.getFreeChatPopupIndex();\n\t\t\t\tif (index != -1)\n\t\t\t\t{\n\t\t\t\t\tchatPopup.setIndex(index);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//initial chat window should have default location\n\t\t\tchatPopup.setPosition();\n\t\t\tchatPopup.onShow();\n\t\t}\n\t\t\n\t\tif (chatPopup.getIndex() != -1)\n\t\t{\t//the below line commented otherwise every new message would get the chat window to default location\n\t\t\t//chatPopup.setPosition();\n\t\t\tchatPopup.show();\n\t\t\tchatPopup.setVisible(true);\n\t\t\t//chatPopup.onShow();\n\t\t}\n\t}", "@PutMapping(value=\"/chat/{id}/{userName}/{sentence}\")\n\t\tpublic ResponseEntity<Chat> newChat (@PathVariable long id, @PathVariable String userName, @PathVariable String sentence) {\n\t\t\tif(lobbies.get(id)!=null) {\n\t\t\t\tif(lobbies.get(id).getUser1()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser1().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(lobbies.get(id).getUser2()!=null) {\n\t\t\t\t\tif(lobbies.get(id).getUser2().getUserName().equals(userName)) {\n\t\t\t\t\t\t//Añadir el chat al lobby que se solicita\n\t\t\t\t\t\tChat chat = new Chat(sentence,userName);\n\t\t\t\t\t\tif(lobbies.get(id).getMummy().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Mummy\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(lobbies.get(id).getPharaoh().equals(userName)) {\n\t\t\t\t\t\t\tchat.setCharacter(\"Pharaoh\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tlobbies.get(id).addChat(chat);\n\t\t\t\t\t\n\t\t\t\t\treturn new ResponseEntity<>(chat, HttpStatus.OK);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}else {\n\t\t\t\treturn new ResponseEntity<>(HttpStatus.NOT_FOUND);\n\t\t\t}\n\t\t}", "public final boolean hasHerochat()\n\t{\n\t\treturn herochat != null;\n\t}", "private void append_chat_conversation(DataSnapshot dataSnapshot) {\n Vibrator mVibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);\n Iterator i = dataSnapshot.getChildren().iterator();\n while (i.hasNext()) {\n String chat_msg = (String) ((DataSnapshot) i.next()).getValue();\n String chat_user_name = (String) ((DataSnapshot) i.next()).getValue();\n if (chat_user_name.equals( ad.getName())) {\n Spannable Chatme = new SpannableString(chat_user_name + \" : \" + chat_msg + \" \\n\");\n Chatme.setSpan(new ForegroundColorSpan(Color.BLUE), 0, chat_user_name.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n chat_conversation.append(Chatme);\n\n } else {\n chat_conversation.append( chat_user_name + \" : \" + chat_msg + \" \\n\");\n mVibrator.vibrate(200);\n }\n }\n }", "public boolean insertForCreateChatTransaction(Chat chat, UserChat userChat1, UserChat userChat2) {\n return spannerOperations.performReadWriteTransaction(\n transactionSpannerOperations -> {\n transactionSpannerOperations.upsert(chat, \"ChatID\", \"CreationTS\");\n transactionSpannerOperations.insert(userChat1);\n transactionSpannerOperations.insert(userChat2);\n\n return true;\n }\n );\n }", "public void openChat(ChatPanel chatPanel, boolean setSelected)\n {\n boolean isWindowVisible = isVisible();\n\n if(getExtendedState() != JFrame.ICONIFIED)\n {\n if (ConfigurationUtils.isAutoPopupNewMessage() || setSelected)\n {\n if (!isVisible())\n setVisible(true);\n\n toFront();\n }\n else if (!isWindowVisible)\n {\n setFocusableWindowState(false);\n if (!OSUtils.IS_MAC)\n {\n setState(Frame.ICONIFIED);\n }\n\n setVisible(true);\n setFocusableWindowState(true);\n }\n }\n else\n {\n if (setSelected)\n {\n setExtendedState(JFrame.NORMAL);\n toFront();\n }\n\n String chatWindowTitle = getTitle();\n\n if(!chatWindowTitle.startsWith(\"*\"))\n setTitle(\"*\" + chatWindowTitle);\n }\n\n if (setSelected || !isWindowVisible)\n {\n setCurrentChat(chatPanel);\n }\n else if(!getCurrentChat().equals(chatPanel) && getChatTabCount() > 0)\n {\n highlightTab(chatPanel);\n }\n }", "public void toggleChat() {\n chatVisible = !chatVisible;\n }", "public boolean checkIfChatIdExists(long chatId) {\n\n String sqlStatment = \"SELECT ChatID FROM Chat WHERE ChatID=@chatId\";\n Statement statement = Statement.newBuilder(sqlStatment).bind(\"chatId\").to(chatId).build();\n List<Chat> resultSet = spannerTemplate.query(Chat.class, statement, new SpannerQueryOptions().setAllowPartialRead(true));\n \n return !resultSet.isEmpty(); \n }", "public boolean addMessageToChat (Message msg) {\n Logger.write(\"VERBOSE\", \"DB\", \"addMessageToChat(...)\");\n \n try {\n boolean duplicate = false;\n \n String[][] messagesInConvo = getConversationMessages(msg.PCHATgetConversationID());\n for (int i = 0; i < messagesInConvo.length; i++)\n if (messagesInConvo[i][1].equals(Long.toString(msg.getTimestamp())) && messagesInConvo[i][2].equals(msg.PCHATgetText()))\n duplicate = true;\n \n if (!duplicate) {\n execute(DBStrings.addMessageToConvo.replace(\"__convoID__\", msg.PCHATgetConversationID())\n .replace(\"__sendersKey__\", Crypto.encodeKey(getSignatory(msg)))\n .replace(\"__msgText__\", msg.PCHATgetText())\n .replace(\"__time__\", Long.toString(msg.getTimestamp())));\n }\n } catch (java.sql.SQLException e) {\n Logger.write(\"ERROR\", \"DB\", \"SQLException: \" + e);\n return false;\n }\n \n return true;\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.chat_activity);\n\t\t\n\t\ttext = (EditText)findViewById(R.id.etSendMsg);\n\t\tchat = (TextView)findViewById(R.id.tvChat);\n\t\tsend = (Button)findViewById(R.id.bSend);\n\t\t\n\t\tsend.setOnClickListener(this);\n\t\tuser = getIntent().getStringExtra(\"user\");\n\t\tchallenged = getIntent().getStringExtra(\"challenged\");\n\t\tsa = ((SharingAtts)getApplication());\n\t\t\n\t\tit = new ItemTest();\n\t\tString colNames = it.printData(\"chat\")[1];\n\t\tdbm = new DBManager(this, colNames, \"chat\", it.printData(\"chat\")[0]);\n\t\tWarpClient.initialize(Constants.apiKey, Constants.secretKey);\n\t\ttry {\n\t\t\tmyGame = WarpClient.getInstance();\n\t\t\tmyGame.addConnectionRequestListener(this); \n\t\t\tmyGame.connectWithUserName(user);\n\t\t\tmyGame.addNotificationListener(this);\n\t\t\tmyGame.addChatRequestListener(this);\n\t\t\tchat.setText(\"\");\n\t\t\t\n\t\t\tmyGame.addZoneRequestListener(this);\n\t\t\t/*\n\t\t\tmyGame.addRoomRequestListener(this);\n\t\t\tmyGame.addChatRequestListener(this);\n\t\t\t\n\t\t\t*/\n\t\t\t//myGame.getOnlineUsers();\n\t\t\t\n\t\t\t//myGame.addTurnBasedRoomListener(this);\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tdbm.openToRead();\n\t\tString msgs = dbm.directQuery(\"SELECT sender,message FROM chat WHERE ((sender LIKE '\"+ sa.name+\"' AND receiver LIKE '\"+ challenged+ \"')\"+\n\t\t\t\t\" OR (sender LIKE '\"+challenged+\"' AND receiver LIKE '\"+ sa.name+\"'))\"+\n\t\t\t\t\"\", new String[]{ \"sender\",\"message\"});\n\t\tLog.d(\"special_query\", \"SELECT sender,message FROM chat WHERE sender LIKE '\"+ sa.name+\"' AND receiver LIKE '\"+ challenged+ \"'\"+\n\t\t\t\t\" OR sender LIKE '\"+challenged+\"' AND receiver LIKE '\"+ sa.name+\"'\"+\n\t\t\t\t\"\");\n\t\tString allRows = dbm.directQuery(\"SELECT * FROM chat\", it.printData(\"chat\")[1].split(\" \"));\n\t\t//allRows.replace(\" \", \"->\");\n\t\tString[] all = allRows.split(\"\\n\");\n\t\t\n\t\tfor(int i=0; i<all.length;i++){\n\t\t\tall[i].replace(\" \", \"->\");;\n\t\t\tLog.d(\"row_\"+i, all[i]);\n\t\t}\n\t\tdbm.close();\n\t\tmsgs = msgs.replace(\",\", \" : \");\n\t\tif(msgs!=null)\n\t\t\tchat.setText(msgs);\n\t\telse\n\t\t\tLog.e(\"msgs\", \"msg is null\");\n\t\t\n\t}", "private void setupChat() {\n chatService = new BluetoothChatService(NavigationDrawerActivity.this, mHandler);\n\n }", "private boolean openItemAction(MXGroupChatSession session){\n if(session == null)\n return false;\n if(MXChatCustomizer.isForceTablet() && currentSession != null && session.getSessionID().equals(currentSession)){\n return false;\n }\n\n if (session.isAChat()) {\n if(callback != null)\n callback.openChatAction(session.getSessionID());\n currentSession = session.getSessionID();\n } else {\n Phone_MainActivity.joinMeet(session.getMeetID());\n }\n\n return true;\n }", "boolean hasConversation();", "private Chat getChatSession(Intent intent) {\n ApiManager instance = ApiManager.getInstance();\n String sessionId = intent\n .getStringExtra(ChatIntent.EXTRA_CONTACT);\n if (instance == null) {\n Logger.i(TAG, \"ApiManager instance is null\");\n return null;\n }\n ChatService chatApi = instance.getChatApi();\n if (chatApi == null) {\n Logger.d(TAG, \"MessageingApi instance is null\");\n return null;\n }\n Chat chatSession = null;\n Logger.d(TAG, \"The chat session is null1\");\n try {\n chatSession = chatApi.getChat(sessionId);\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"Get chat session failed\");\n Logger.d(TAG, \"The chat session is null2\");\n e.printStackTrace();\n chatSession = null;\n }\n if (chatSession != null) {\n return chatSession;\n }\n try {\n // Set<Chat> totalChats = null;\n Set<Chat> totalChats = chatApi.getChats();\n if (totalChats != null) {\n Logger.w(TAG, \"aaa getChatSession size: \"\n + totalChats.size());\n Logger.d(TAG, \"The chat session is null3 : \"\n + totalChats.size());\n for (Chat setElement : totalChats) {\n if (setElement.getRemoteContact().equals(\n sessionId)) {\n Logger.e(TAG, \"Get chat session finally\");\n // might work or might throw exception, Java calls it\n // indefined behaviour:\n chatSession = setElement;\n break;\n }\n }\n } else {\n Logger.w(TAG, \"aaa getChatSession size: null\");\n }\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"Get chat session xyz\");\n e.printStackTrace();\n }\n return chatSession;\n }", "private boolean setupVaultChat() {\n RegisteredServiceProvider<Chat> rsp = getServer().getServicesManager().getRegistration(net.milkbowl.vault.chat.Chat.class);\n if (rsp != null) {\n \t vaultChat = rsp.getProvider();\n }\n return (vaultChat != null);\n }", "private void individualSend(UserLogic t) {\n if(t != UserLogic.this && t != null && ((String)UI.getContacts().getSelectedValue()).equals(t.username)){\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(username)) { //If both users are directly communicating\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText()); //Send message\r\n t.UI.getContacts().setCellRenderer(clearNotification); //Remove notification\r\n }\r\n else{ //If the user are not directly communicating\r\n t.UI.getContacts().setCellRenderer(setNotification); //Set notification\r\n }\r\n if(t.chats.containsKey(username)){ //Store chats in other users database (When database exists)\r\n ArrayList<String> arrayList = t.chats.get(username); //Get data\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>(); //create new database\r\n arrayList.add(username + \"> \" + UI.getMessage().getText()); //Add new message to the database\r\n t.chats.put(username, arrayList); //Store data\r\n }\r\n }\r\n //This writes on my screen\r\n if(t == UserLogic.this && t!=null){ //On the current user side\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText()); //Write message to screen\r\n String currentChat = (String) UI.getContacts().getSelectedValue(); //Get selected user\r\n if(chats.containsKey(currentChat)){ //check if database exists\r\n ArrayList<String> arrayList = chats.get(currentChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n else { //When database doesn't exist\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(currentChat, arrayList);\r\n }\r\n }\r\n }", "public boolean isGroupChat() {\n return mIsGroupChat;\n }", "protected void goToChat(String recID)\n {\n Intent intent = new Intent(this, MessageActivity.class);\n intent.putExtra(\"EXTRA_SESSION_ID\", recID);\n this.startActivity(intent);\n this.finish();\n }", "private void openChannel() {\n database.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n String channelUrl = (String) dataSnapshot.child(\"channelUrl\").getValue();\n joinChannel(channelUrl);\n } else {\n createChannel();\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "public void addChat(String to, String from, String from_fullname, String msg, String date, String status,\r\n String uniqueid, String type, String file_type) {\r\n\r\n String myPhone = getUserDetails().get(\"phone\");\r\n String contactPhone = \"\";\r\n if(myPhone.equals(to)) contactPhone = from;\r\n if(myPhone.equals(from)) contactPhone = to;\r\n\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(UserChat.USERCHAT_TO, to); // TO\r\n values.put(UserChat.USERCHAT_FROM, from); // FROM\r\n values.put(UserChat.USERCHAT_FROM_FULLNAME, from_fullname); // FROM FULL NAME\r\n values.put(UserChat.USERCHAT_MSG, msg); // CHAT MESSAGE\r\n values.put(UserChat.USERCHAT_DATE, date); // DATE\r\n values.put(\"status\", status); // status: pending, sent, delivered, seen\r\n values.put(\"uniqueid\", uniqueid);\r\n values.put(\"type\", type);\r\n values.put(\"file_type\", file_type);\r\n values.put(\"contact_phone\", contactPhone); // Contact\r\n\r\n // Inserting Row\r\n db.insert(UserChat.TABLE_USERCHAT, null, values);\r\n db.close(); // Closing database connection\r\n }", "public ChatPanel getCurrentChat()\n {\n if(getChatTabCount() > 0)\n return (ChatPanel) chatTabbedPane.getSelectedComponent();\n else\n {\n int componentCount = mainPanel.getComponentCount();\n\n for (int i = 0; i < componentCount; i ++)\n {\n Component c = mainPanel.getComponent(i);\n\n if(c instanceof ChatPanel)\n return (ChatPanel) c;\n }\n }\n return null;\n }", "public void checkRoomExist(final String id)\n {\n final String cartRef = \"chatRoom\";\n mChat= database.getReference(cartRef);\n mChat.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n\n for(DataSnapshot ds: dataSnapshot.getChildren())\n {\n if(ds.child(\"sender1\").getValue().equals(id)&& ds.child(\"sender2\").getValue().equals(uid))\n {\n roomexist=true;\n goToChat(ds.getKey());\n return;\n }\n else if(ds.child(\"sender2\").getValue().equals(id)&& ds.child(\"sender1\").getValue().equals(uid))\n {\n roomexist=true;\n goToChat(ds.getKey());\n return;\n }\n }\n if(!roomexist)\n {\n String key = mChat.push().getKey();\n makeRoom(key);\n }\n Log.d(TAG, \"Value is: \" + cartRef);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n }", "public void createChat(String roomname, String nickname) {\n\t\t\n\t\tboolean successful = false;\n\t\tString errormessage = \"\";\n\t\t\n\t\t// set default value for roomname\n\t\tif (roomname.equals(\"\")){\n\t\t\troomname = \"default\";\n\t\t}\n\t\t\n\t\t// set default value for nickname\n\t\tif (nickname.equals(\"\")){\n\t\t\tnickname = chatConnection.getConnectedUserID();\n\t\t}\n\t\t// if connection to room already exists, only change the nickname\n\t\tif (roomlist.containsKey(roomname)){ // room already exists\n\t\t\tChatRoom room = roomlist.get(roomname);\n\t\t\tif (!room.getNickname().equals(nickname)){\n\t\t\t\ttry {\n\t\t\t\t\troom.changeNickname(nickname);\n\t\t\t\t\tsuccessful = true;\n\t\t\t\t\troomlist.fireTableDataChanged();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\terrormessage = e.getMessage();\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}\n\t\telse { // make new connection\n\t\t\tChatRoom groupchat;\n\t\t\ttry {\n\t\t\t\tgroupchat = new ChatRoom(roomname, nickname);\n\t\t\t\troomlist.put(roomname, groupchat);\n\t\t\t\troomlist.fireTableDataChanged();\n\t\t\t\tsuccessful = true;\n\t\t\t} catch (Exception e) {\n\t\t\t\terrormessage = e.getMessage();\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (!successful){\n\t\t\tcreateChatConnectDialog(errormessage);\n\t\t}\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.chat_room_item, container, false);\n Log.d(\"TAGGOW\", \"onCreateView: \");\n\n findViews();\n\n //to initialize the values\n initViews();\n\n mChatTogetherBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n //add chat fragment\n if (getActivity().getClass() == HomepageActivity.class) {\n //pass in the user details here\n\n if (slideAnimation != null) {\n mNewMsgLayoutContainer.clearAnimation();\n slideAnimation.reset();\n slideAnimation = null;\n }\n\n if (fadeInOutAnim != null) {\n mChatTogetherBtn.clearAnimation();\n fadeInOutAnim.reset();\n fadeInOutAnim = null;\n }\n\n mChatBtnContainer.setBackgroundColor(getResources().getColor(R.color.sixty_black));\n\n if (!((HomepageActivity) getActivity()).mDKLiveChat.checkIfUserNameIsSet())\n createNameAlertDialog();\n\n FragmentTransaction transaction = ((HomepageActivity) getActivity()).getSupportFragmentManager().beginTransaction();\n transaction.replace(((((HomepageActivity) getActivity()).chatSessionFragContainer.getId())), chatSessionFragment);\n transaction.addToBackStack(null);\n transaction.commit();\n isInBckGrnd = true;\n isDetailChatOpen = true;\n }\n\n }\n });\n\n\n ((HomepageActivity) Objects.requireNonNull(getActivity())).mDKLiveChat.joinSession(getRoomName(ChatRoomPagerAdapter.getCurrentItem()), createUserInfo(), new CallbackListener() {\n @Override\n public void onSuccess(String msg, Object... obj) {\n //handle success\n }\n\n @Override\n public void onError(String msg, Object... obj) {\n //handle error\n }\n });\n\n HomepageActivity.currentRoomName = getRoomName(ChatRoomPagerAdapter.getCurrentItem());\n\n liveChatCallbackListener = new LiveChatCallbackListener() {\n @Override\n public void receivedChatMessage(String roomName, MessageInfo message) {\n if(isDetailChatOpen) {\n messageUpdateList(message);\n }else {\n incomingMsgSlideAnimation(message.getChatMessage());\n updateChatMessagList(message);\n }\n }\n };\n\n userPresenceCallBackListener = new UserPresenceCallBackListener() {\n @Override\n public void userEntered(String roomName, UserInfo participant) {\n String userEnteredMessage = participant.getName() + \" entered the room\";\n MessageInfo messageInfo = new MessageInfo();\n messageInfo.setUserId(participant.getUserId());\n messageInfo.setUserName(participant.getName());\n messageInfo.setChatMessage(userEnteredMessage);\n messageInfo.setSystemMessage(true);\n if(isDetailChatOpen) {\n messageUpdateList(messageInfo);\n }else{\n incomingMsgSlideAnimation(userEnteredMessage);\n updateChatMessagList(messageInfo);\n }\n }\n//\n @Override\n public void userExited(String roomName, UserInfo participant) {\n String userExitMessage = participant.getName() + \" exited the room\";\n MessageInfo messageInfo = new MessageInfo();\n messageInfo.setUserId(participant.getUserId());\n messageInfo.setUserName(participant.getName());\n messageInfo.setChatMessage(userExitMessage);\n messageInfo.setSystemMessage(true);\n if(isDetailChatOpen) {\n messageUpdateList(messageInfo);\n }else{\n incomingMsgSlideAnimation(userExitMessage);\n updateChatMessagList(messageInfo);\n }\n }\n//\n @Override\n public void userDataUpdated(String roomName, UserInfo participant) {\n }\n//\n @Override\n public void getNumberOfUsersLiveNow(String roomName, int userCount) {\n\n mUserCount.setText(String.valueOf(userCount));\n\n }\n\n\n\n\n };\n\n ChatRoom room = ((HomepageActivity) getActivity()).mRoomPagerAdapter.listOfRooms.get(roomPos);\n\n ((HomepageActivity) Objects.requireNonNull(getActivity())).mDKLiveChat.subscribe(room.getRoomName(), liveChatCallbackListener, userPresenceCallBackListener, new CallbackListener() {\n @Override\n public void onSuccess(String msg, Object... obj) {\n addMyStatus();\n }\n\n @Override\n public void onError(String msg, Object... obj) {\n\n }\n });\n\n return view;\n }", "public void make_chat_room() {\n client_PW.println(\"------------make new chat-------------\");\n client_PW.println(\"Enter chat name : \");\n client_PW.flush();\n String line = null;\n String ad=null;\n PrintWriter pw=null;\n HashMap new_chat = new HashMap();\n try {\n line = client_BR.readLine();\n try{\n File file = new File(System.getProperty(\"user.home\"),line + \".txt\");\n pw = new PrintWriter(file);\n \n }catch(Exception e){System.out.println(e);}\n \n synchronized(chat_room) {\n chat_room.put(line, new_chat);\n }\n synchronized(cur_chat_room) {\n cur_chat_room.remove(client_ID);\n }\n String msg = client_ID + \"님이 퇴장하셨습니다\";\n broadcast(msg, null);\n synchronized(new_chat) {\n new_chat.put(client_ID,client_PW);\n }\n synchronized(new_chat) {\n \n new_chat.put(ad,pw);\n }\n cur_chat_room = new_chat;\n } catch (Exception e) { System.out.println(e); }\n \n\n }", "public boolean chatFocused(){\n\t\tTextField tf = nifty.getScreen(\"hud\").findNiftyControl(\"chatText\",TextField.class);\n\t\treturn tf.hasFocus();\n\t}", "public static void addChat($_Abstruct_Value_Item_Main_Chat abstruct_value_item_main_chat) {\n if (abstruct_value_item_main_chat instanceof $_Value_Item_Main_Chat) {\n main_chat_fragment.rooms.add(abstruct_value_item_main_chat);\n recycle_view_main_chat.addItemDecoration(new DividerItemDecoration(SecondActivity.context,\n DividerItemDecoration.VERTICAL));\n main_chat_fragment.recycleAdapter.notifyDataSetChanged();\n List<$_Message> list = new ArrayList();\n MainActivity.allMessages.put(abstruct_value_item_main_chat.getEmail(), new Pair<>(new $_Recycle_View_Room_Chat_Adapter(list, FourActivity.context), list));\n //MainActivity.allMessages.put(value_item_main_chat.getEmail(),new ArrayList<>());\n } else {\n main_chat_fragment.rooms.add(abstruct_value_item_main_chat);\n recycle_view_main_chat.addItemDecoration(new DividerItemDecoration(SecondActivity.context,\n DividerItemDecoration.VERTICAL));\n main_chat_fragment.recycleAdapter.notifyDataSetChanged();\n List<$_Message> list = new ArrayList();\n System.out.println(\"EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE === \" + abstruct_value_item_main_chat.getEmail());\n MainActivity.allMessages.put(abstruct_value_item_main_chat.getEmail(), new Pair<>(new $_Recycle_View_Room_Chat_Adapter(list, FourActivity.context), list));\n //MainActivity.allMessages.put(value_item_main_chat.getEmail(),new ArrayList<>());\n }\n\n }", "@Override\n public void onClick(View v) {\n Intent chatIntent = new Intent(v.getContext(), ChatActivity.class);\n chatIntent.putExtra(\"uid\", uid);\n mContext.startActivity(chatIntent);\n }", "private void groupChatSend(UserLogic t) {\n if(((String) UI.getContacts().getSelectedValue()).equals( groupChat)){\r\n if (t != UserLogic.this && t != null) { //Sending to other users chat\r\n if(((String)t.UI.getContacts().getSelectedValue()).equals(groupChat)) {\r\n t.UI.getProperList().addElement(username + \"> \" + UI.getMessage().getText());\r\n t.UI.getContacts().setCellRenderer(clearNotification);\r\n }\r\n else{\r\n t.UI.getContacts().setCellRenderer(setNotification);\r\n }\r\n if(t.chats.containsKey(groupChat)){\r\n ArrayList<String> arrayList = t.chats.get(groupChat);\r\n arrayList.add(username + \"> \" + UI.getMessage().getText());\r\n t.chats.put(groupChat, arrayList);\r\n }\r\n else {\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(username + \"> \" + UI.getMessage().getText());\r\n t.chats.put(groupChat, arrayList);\r\n }\r\n }\r\n\r\n if(t == UserLogic.this && t!=null){ //Send to my screen\r\n UI.getProperList().addElement(\"Me> \" + UI.getMessage().getText());\r\n if(chats.containsKey(groupChat)){ //Database group chat exists\r\n ArrayList<String> arrayList = chats.get(groupChat);\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(groupChat, arrayList);\r\n }\r\n else {\r\n ArrayList<String> arrayList = new ArrayList<>();\r\n arrayList.add(\"Me> \" + UI.getMessage().getText());\r\n chats.put(groupChat, arrayList);\r\n }\r\n }\r\n }\r\n }", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "@Override\n public void onStartConversationSuccessful(StartConversation startConversation) {\n\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n chatFragment = new ChatFragment();\n Bundle bundle = new Bundle();\n bundle.putString(\"id\", startConversation.getConversationId());\n bundle.putString(\"token\", startConversation.getToken());\n chatFragment.setArguments(bundle);\n ft.add(R.id.fl_chatlist, chatFragment);\n ft.commit();\n }", "public boolean isActive() {\n/* 165 */ DatagramChannel ch = javaChannel();\n/* 166 */ return (ch.isOpen() && ((((Boolean)this.config\n/* 167 */ .getOption(ChannelOption.DATAGRAM_CHANNEL_ACTIVE_ON_REGISTRATION)).booleanValue() && isRegistered()) || ch\n/* 168 */ .socket().isBound()));\n/* */ }", "public void run() {\n SimpleChatUI firstWin = new SimpleChatUI();\n windows.add(firstWin);\n firstWin.setVisible(true);\n hub = new HubSession(new LoginCredentials(new ChatKeyManager(CHAT_USER)));\n\n firstWin.setStatus(\"No active chat\");\n }", "private void setupChat() {\n chatArrayAdapter = new ArrayAdapter<String>(MainActivity.this, R.layout.message);\n\n listView.setAdapter(chatArrayAdapter);\n\n // Initialize the compose field with a listener for the return key\n editText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n sendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n String message = editText.getText().toString();\n if(!message.equals(\"\")) {\n sendMessage(message);\n }\n }\n });\n\n }", "public boolean hasConversation() {\n return typeCase_ == 2;\n }", "public void writeIdChatAtSpecificUserInDatabase(@NonNull ChatMessage chat) {\n mDatabaseReference.child(\"users\").child(chat.getSender()).child(\"chats\").\n child(chat.getIdChat()).setValue(chat.getReceiver());\n mDatabaseReference.child(\"users\").child(chat.getReceiver()).child(\"chats\").\n child(chat.getIdChat()).setValue(chat.getSender());\n }", "private void getChatScreen(Context context, Intent invitation,\n String number, String name) {\n One2OneChat chat = null;\n if (null != number) {\n Participant contact = new Participant(number, name);\n List<Participant> participantList = new ArrayList<Participant>();\n participantList.add(contact);\n chat = (One2OneChat) ModelImpl.getInstance().addChat(\n participantList, null, null);\n if (null != chat) {\n invitation\n .setClass(context, ChatScreenActivity.class);\n invitation.putExtra(ChatScreenActivity.KEY_CHAT_TAG,\n (ParcelUuid) chat.getChatTag());\n } else {\n Logger.e(TAG, \"getChatScreen(), chat is null!\");\n }\n } else {\n Logger.e(TAG,\n \"getChatScreen(), fileSessionSession is null\");\n }\n }", "private void showChatPage(){\n lv_chat = (ListView) view_chat.findViewById(R.id.lv_chat);\n pb_loadChat = (ProgressBar) view_chat.findViewById(R.id.pb_load_chat);\n adapter = new ChatListAdapter(getContext(), chatList, self.getId());\n lv_chat.setAdapter(adapter);\n// lv_chat.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n// @Override\n// public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n// Log.d(TAG, \"click\");\n// String message = adapter.getItem(position).messageContent;\n// TextView textView = (TextView) view.findViewById(R.id.tv_otherText);\n// int visibility = textView.getVisibility();\n// if ( visibility == View.VISIBLE ) {\n// Log.d(TAG, \"<\" + message + \"> is visible\");\n// } else {\n// Log.d(TAG, \"<\" + message + \"> is invisible\");\n// }\n// }\n// });\n\n lv_chat.setOnTouchListener(new View.OnTouchListener() {\n @Override\n public boolean onTouch(View v, MotionEvent event) {\n view_chat.requestFocus(); // remove focus from the EditText\n return false;\n }\n });\n\n lv_chat.setOnScrollListener(new AbsListView.OnScrollListener() {\n @Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n if ( scrollState == SCROLL_STATE_TOUCH_SCROLL ) {\n if ( lv_chat.getFirstVisiblePosition() == 0 && !isLoading && !isAllLoaded ){\n Log.d(\"ListView\",\"load more history\");\n loadMoreHistoryChat();\n }\n }\n }\n\n @Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n// if ( firstVisibleItem == 0 && totalItemCount > 0 ) {\n// if ( !isLoading && !isAllLoaded && isOverScrolling) {\n// loadMoreHistoryChat();\n// }\n// }\n }\n });\n loadChatHistory(CHAT_LIMIT,0,0); // load most recent CHAT_LIMIT chats\n fab_send = (FloatingActionButton) view_chat.findViewById(R.id.fab_send);\n fab_more = (FloatingActionButton) view_chat.findViewById(R.id.fab_more);\n fab_less = (FloatingActionButton) view_chat.findViewById(R.id.fab_less);\n fab_gallery = (FloatingActionButton) view_chat.findViewById(R.id.fab_gallery);\n view_functions = view_chat.findViewById(R.id.layout_function_menu);\n et_message = (EditText) view_chat.findViewById(R.id.et_message);\n et_message.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n if ( hasFocus ) {\n if ( adapter != null ) {\n lv_chat.setSelection(adapter.getCount()-1); // scroll to bottom when gaining focus\n }\n } else {\n AppUtils.hideKeyboard(getContext(),v); // hide keyboard when losing focus\n }\n }\n });\n\n fab_send.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n sendTextMessage(et_message.getText().toString());\n }\n });\n\n fab_more.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n fab_more.setVisibility(View.GONE);\n view_functions.setVisibility(View.VISIBLE);\n }\n });\n\n fab_less.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n view_functions.setVisibility(View.GONE);\n fab_more.setVisibility(View.VISIBLE);\n LocalDBHelper localDBHelper = LocalDBHelper.getInstance(getContext());\n localDBHelper.clearAllImageCache();\n }\n });\n\n fab_gallery.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n selectImage();\n }\n });\n\n et_message.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n if ( s != null && s.length() > 0 ) {\n fab_send.setVisibility(View.VISIBLE);\n } else {\n fab_send.setVisibility(View.GONE);\n }\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }", "@Override\r\n\t\t\tpublic void onChat(String message) {\n\r\n\t\t\t}", "private void addChatTab(ChatPanel chatPanel)\n {\n ChatSession chatSession = chatPanel.getChatSession();\n String chatName = chatSession.getChatName();\n\n ChatPanel currentChatPanel = getCurrentChat();\n\n if (currentChatPanel == null)\n {\n this.mainPanel.add(chatPanel, BorderLayout.CENTER);\n }\n else if (getChatTabCount() == 0)\n {\n ChatSession firstChatSession = currentChatPanel.getChatSession();\n\n // Add first two tabs to the tabbed pane.\n chatTabbedPane.addTab( firstChatSession.getChatName(),\n firstChatSession.getChatStatusIcon(),\n currentChatPanel);\n\n chatTabbedPane.addTab( chatName,\n chatSession.getChatStatusIcon(),\n chatPanel);\n\n // When added to the tabbed pane, the first chat panel should\n // rest the selected component.\n chatTabbedPane.setSelectedComponent(currentChatPanel);\n\n //add the chatTabbedPane to the window\n this.mainPanel.add(chatTabbedPane, BorderLayout.CENTER);\n this.mainPanel.validate();\n }\n else\n {\n // The tabbed pane already contains tabs.\n\n chatTabbedPane.addTab(\n chatName,\n chatSession.getChatStatusIcon(),\n chatPanel);\n\n chatTabbedPane.getParent().validate();\n }\n }", "public void setChatVisible(boolean chatVisible) {\n this.chatVisible = chatVisible;\n }", "public void joinChannel() {\n String userId = AuthenticationSingleton.getAdaptedInstance().getUid();\n String token1 = generateToken(userId);\n mRtcEngine.setAudioProfile(Constants.AUDIO_SCENARIO_SHOWROOM, Constants.AUDIO_SCENARIO_GAME_STREAMING);\n int joinStatus = mRtcEngine.joinChannelWithUserAccount(token1, appointment.getId(), userId);\n if (joinStatus == SUCCESS_CODE) {\n appointment.addInCallUser(new DatabaseUser(userId));\n }\n }", "private void addToChatList(Chat[] newChats){\n if ( newChats == null || newChats.length == 0 ) {\n return;\n }\n if ( chatList.size() == 0 ) { // no chat history loaded yet\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n headIndex = newChats[0].id; // update the tail index\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else if ( newChats[newChats.length-1].id < chatList.get(0).id ) { // new.tail is prior to current.head\n // prepend the new chats to the head of the current chat\n int selection = lv_chat.getFirstVisiblePosition();\n selection += newChats.length;\n for ( int i = newChats.length-1; i >= 0; i-- ) {\n chatList.push(newChats[i]);\n }\n lv_chat.setSelection(selection);\n adapter.notifyDataSetChanged();\n Log.d(TAG,\"select:\"+selection);\n headIndex = newChats[0].id; // update the headIndex\n } else if ( newChats[0].id > chatList.get(chatList.size()-1).id ) { // new.head is after current.tail\n // append the new chats to the tail of the current chat\n for ( Chat chat : newChats ) {\n chatList.offer(chat);\n }\n tailIndex = newChats[newChats.length-1].id; // update the tail index\n } else {\n Log.e(TAG,\"Loaded duplicated chat!\");\n }\n }", "public void doSendMsg() {\n FacesContext fctx = FacesContext.getCurrentInstance();\n HttpSession sess = (HttpSession) fctx.getExternalContext().getSession(false);\n SEHRMessagingListener chatHdl = (SEHRMessagingListener) sess.getAttribute(\"ChatHandler\");\n if (chatHdl.isSession()) {\n //TODO implement chat via sehr.xnet.DOMAIN.chat to all...\n if (room.equalsIgnoreCase(\"public\")) {\n //send public inside zone\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PUBLIC, moduleCtrl.getLocalZoneID(), -1, -1);\n } else {\n chatHdl.sendMsg(this.text, SEHRMessagingListener.PRIVATE_USER, moduleCtrl.getLocalZoneID(), -1, curUserToChat.getUsrid());\n }\n this.text = \"\";\n }\n //return \"pm:vwChatRoom\";\n }", "private boolean existeUsuario(String chatId)\n\t{\n\t\treturn usuarioService.findById(chatId).isPresent();\n\t}", "public void setCurrentChat(int id) {\n\t\tOptional<Contacto> contact = currentUser.getContacts().stream().filter(c -> c.getId() == id).findFirst();\n\t\tif (contact.isPresent())\n\t\t\tcurrentContact = contact.get();\n\t}", "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 boolean checkForSnapChat()\n\t{\n\t\tActivityManager activityManager = (ActivityManager) context.getSystemService( ACTIVITY_SERVICE );\n\t\tList<RunningAppProcessInfo> procInfos = activityManager.getRunningAppProcesses();\n\t\tfor(int i = 0; i < procInfos.size(); i++){\n\t\t\tif(procInfos.get(i).processName.equals(\"com.snapchat.android\")) {\n\t\t\t\treturn true;\n\t\t }\n\t\t}\n\t\t \n\t\treturn false;\n\t}", "public void addRoom(Chatroom room){\n\n }", "@PostMapping(\"/user-offer-chats\")\n @Timed\n public ResponseEntity<UserOfferChatDTO> createUserOfferChat(@Valid @RequestBody UserOfferChatDTO userOfferChatDTO) throws URISyntaxException {\n log.debug(\"REST request to save UserOfferChat : {}\", userOfferChatDTO);\n if (userOfferChatDTO.getId() != null) {\n throw new BadRequestAlertException(\"A new userOfferChat cannot already have an ID\", ENTITY_NAME, \"idexists\");\n }\n UserOfferChatDTO result = userOfferChatService.save(userOfferChatDTO);\n return ResponseEntity.created(new URI(\"/api/user-offer-chats/\" + result.getId()))\n .headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))\n .body(result);\n }", "public Session(boolean isgroupchat){\n\t\tthis.isGroupChat = isgroupchat;\n\t\tthis.receivedText=\"Chat log \\n\";\n\t\tthis.sessionID = getNextSessionID();\n\t\tthis.userList = new ArrayList<User>();\n\t\tSystem.out.println(\"SESSION: Session created. Session ID: \"+this.sessionID);\n\t}", "public ChatRoomCreationMsgBehaviour( String name, String creatorPrimaryKey, boolean isBotChatRoom ) {\n super( name, creatorPrimaryKey );\n this.isBotChatRoom = isBotChatRoom;\n }", "public boolean isOnline()\n\t{\t\t\n\t\treturn chatConnection.isConnected();\n\t}", "private void enableChat()\r\n\t{\r\n\t\ttextFieldMessageSaisie.setDisable(false);\r\n\t\tlistViewConversation.setDisable(false);\r\n\t\tbuttonChoisirFichier.setDisable(false);\r\n\t\ttextFieldFichier.setDisable(false);\r\n\t}", "private void setupChat() {\n\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 mOutEditText.setOnEditorActionListener(mWriteListener);\n\n // Initialize the send button with a listener that for click events\n mSendButton.setOnClickListener(new View.OnClickListener() {\n public void onClick(View v) {\n // Send a message using content of the edit text widget\n View view = getView();\n if (null != view) {\n TextView textView = (TextView) view.findViewById(R.id.edit_text_out);\n String message = textView.getText().toString();\n Bundle bundle=new Bundle();\n bundle.putString(BluetoothChatFragment.EXTRAS_ADVERTISE_DATA, message);\n mCallback.onSendMessage(bundle);\n //對話框上顯示\n mConversationArrayAdapter.add(\"Me: \" + message);\n //設為不可發送 並清除訊息文字編輯區\n Send_btn=false;\n mSendButton.setEnabled(Send_btn);\n mOutStringBuffer.setLength(0);\n mOutEditText.setText(mOutStringBuffer);\n\n }\n }\n });\n\n // Initialize the buffer for outgoing messages\n mOutStringBuffer = new StringBuffer(\"\");\n }", "private void updateChat() throws SQLException{\n DBConnect db = DBConnect.getInstance();\n ArrayList<String> messages = db.getChat(selectedCustomer.getChat_id());\n chat.getItems().clear();\n for(String mess :messages){\n chat.getItems().add(mess);\n }\n }", "@OnClick(R.id.enter_chat1)\n public void sendMessage() {\n if (getView() == null) {\n return;\n }\n EditText editText = getView().findViewById(R.id.chat_edit_text1);\n sendMessageBackend(editText.getText().toString(), utils.getChatUser());\n updateListAdapter();\n editText.setText(\"\");\n }", "public IoSession getChatSession() {\n\t\treturn m_chatSession;\n\t}", "private Conversation createNewConversation(Node conversationsNode, Node participantsNode, String conversationId, Date date, HistoricalMessageImpl message) {\r\n String jidTo = message.getTo();\r\n String jidFrom = message.getFrom();\r\n Boolean isGroupChat = message.getType().equals(Message.Type.groupchat.name());\r\n Participant participantTo = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidTo)));\r\n InterlocutorImpl interlocutorFrom = new InterlocutorImpl(jidFrom, conversationId, isGroupChat);\r\n if (!isGroupChat) {\r\n if (participantTo != null) {\r\n if (participantTo.getInterlocutorList() != null) {\r\n participantTo.addInterlocutor(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n Participant participantFrom = getParticipant(participantsNode, CodingUtils.encodeToHex(StringUtils.parseName(jidFrom)));\r\n InterlocutorImpl interlocutorTo = new InterlocutorImpl(jidTo, conversationId, isGroupChat);\r\n if (participantFrom != null) {\r\n if (participantFrom.getInterlocutorList() != null) {\r\n participantFrom.addInterlocutor(interlocutorTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom.setInterlocutorList(list);\r\n }\r\n updateParticipant(participantsNode, participantFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorTo);\r\n participantFrom = new Participant(jidFrom, list, new ArrayList<InterlocutorImpl>());\r\n addParticipant(participantsNode, participantFrom);\r\n }\r\n } else {\r\n if (participantTo != null) {\r\n if (participantTo.getGroupChatList() != null) {\r\n participantTo.addGroupChat(interlocutorFrom);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo.setGroupChatList(list);\r\n }\r\n updateParticipant(participantsNode, participantTo);\r\n } else {\r\n List<InterlocutorImpl> list = new ArrayList<InterlocutorImpl>();\r\n list.add(interlocutorFrom);\r\n participantTo = new Participant(jidTo, new ArrayList<InterlocutorImpl>(), list);\r\n addParticipant(participantsNode, participantTo);\r\n }\r\n }\r\n Conversation conversation = new Conversation(conversationId, date, date);\r\n conversation.addMessage(message);\r\n addConversation(conversationsNode, conversation);\r\n return conversation;\r\n }", "@Override\n public boolean sendMessage(ChatMessage chatMessage){\n return true;\n }", "void closeChat();", "private void fetchChatContact(){\n chatRemoteDAO.getAllChatRequestHandler(profileRemoteDAO.getUserId());\n }", "private boolean isInSession()\n {\n return EngagementActivityManager.getInstance().getCurrentActivityAlias() != null;\n }", "public void setChatid(Integer chatid) {\n this.chatid = chatid;\n }", "@Override\n public void onChatClicked(int position) {\n Log.e(\"SearchExistingActivity\", \"chat plus button wasnt clicked\");\n }", "public Boolean chatroomExists(String chatroomName) {\n\t\tChatroom chatroom = this.chatroomRepository.findByChatroomName(chatroomName);\n\t\treturn chatroom != null;\n\t}", "public static GroupChat getChatSession(String chatId) {\n ApiManager instance = ApiManager.getInstance();\n if (instance == null) {\n Logger.i(TAG, \"getChatSession ApiManager instance is null\");\n return null;\n }\n ChatService messageApi = instance.getChatApi();\n if (messageApi == null) {\n Logger.d(TAG, \"getChatSession MessageingApi instance is null\");\n return null;\n }\n GroupChat chatSession = null;\n try {\n chatSession = messageApi.getGroupChat(chatId);\n return chatSession;\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"getChatSession Get chat session failed\");\n e.printStackTrace();\n chatSession = null;\n return chatSession;\n }\n }", "@Override\n public void onClick(View view) {\n if(input.getText().toString()!=null){\n msg.child(\"convensation\").child(encry(chatTo)+\"\").push()\n .setValue(new MessagesModel(input.getText().toString(),\n FirebaseAuth.getInstance()\n .getCurrentUser()\n .getDisplayName(),\n ChatName,\n FirebaseAuth.getInstance()\n .getCurrentUser()\n .getEmail(),chatTo,false)\n );\n mAdapter.notifyDataSetChanged();\n input.setText(\"\");\n updateConvensation();\n listOfMessages.scrollToPosition(mAdapter.getItemCount());\n }\n }", "public boolean addChatLog(ChatLog cl)\n\t{\n\t\treturn chatLog.add(cl);\n\t}", "@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n Rooms selectedRoom = ((Rooms) adapterView.getItemAtPosition(i));\n\n // Open chat room\n API.openPrivateChatActivity(API.currentUID, selectedRoom.getId(), getView());\n }", "public Chat getChat(long chatId) {\n\n String sqlStatment = \"SELECT * FROM Chat WHERE ChatID=@chatId\";\n Statement statement = Statement.newBuilder(sqlStatment).bind(\"chatId\").to(chatId).build();\n List<Chat> resultSet = spannerTemplate.query(Chat.class, statement, null);\n \n return resultSet.get(0);\n }", "private GroupChat getGroupChatSession(Intent intent) {\n ApiManager instance = ApiManager.getInstance();\n String chatId = intent\n .getStringExtra(GroupChatIntent.EXTRA_CHAT_ID);\n if (instance == null) {\n Logger.i(TAG, \"ApiManager instance is null\");\n return null;\n }\n ChatService chatApi = instance.getChatApi();\n if (chatApi == null) {\n Logger.d(TAG, \"MessageingApi instance is null\");\n return null;\n }\n GroupChat chatSession = null;\n try {\n chatSession = chatApi.getGroupChat(chatId);\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"Get chat session failed\");\n e.printStackTrace();\n chatSession = null;\n } finally {\n return chatSession;\n }\n }", "public boolean active(String ID){\n try(Socket socket = new Socket()){\n socket.connect(new InetSocketAddress(host,port),10000);\n logger.info(\"Alignment Module Active\");\n if(this.getConversationHistory(ID).size() > 0){\n this.deleteConversation(ID);\n }\n return true;\n } catch(IOException e){\n logger.error(\"Timeout or unreachable or failed DNS lookup\");\n return false;\n }\n }", "@Test\n public void testChatLogExists(){\n ListView chatLog = messagesActivity.listOfMessages;\n assertNotNull(chatLog);\n }", "private void loadTextChatFragment(){\n int containerId = R.id.fragment_textchat_container;\n mFragmentTransaction = getFragmentManager().beginTransaction();\n mTextChatFragment = (TextChatFragment)this.getFragmentManager().findFragmentByTag(\"TextChatFragment\");\n\n if (mTextChatFragment == null) {\n mTextChatFragment = new TextChatFragment();\n mTextChatFragment.setMaxTextLength(1050);\n mTextChatFragment.setTextChatListener(this);\n mTextChatFragment.setSenderInfo(mSession.getConnection().getConnectionId(), mSession.getConnection().getData());\n\n mFragmentTransaction.add(containerId, mTextChatFragment, \"TextChatFragment\").commit();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n Intent connectionService = new Intent(this,XmppConnectionService.class); \n bindService(connectionService,this, Context.BIND_AUTO_CREATE);\n \n m_handler = new Handler();\n \n m_discussionThread = new ArrayList<Account>();\n \n m_discussionThreadAdapter = new AccountAdapter(this, R.layout.account_line_list_item, m_discussionThread);\n setListAdapter(m_discussionThreadAdapter);\n getListView().setTextFilterEnabled(true);\n\n // ListActivity has a ListView, which you can get with:\n ListView lv = getListView();\n\n lv.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View v, int pos, long id) {\n\t\t\t\tAccount account = m_discussionThread.get(pos);\n\t\t\t\tLog.i(TAG, \"click on: \"+ account);\n\t\t\t\t\n\t\t\t\tIntent intent = new Intent(ContactActivity.this, ChatActivity.class);\n\t\t\t\tintent.putExtra(\"user\", account.getUser());\n\t\t\t\tstartActivity(intent);\n\t\t\t\t\n\t\t\t}\n \t\n\t\t});\n \n \n \n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_messages, container, false);\n\n mConversationsRecycler = (RecyclerView) view.findViewById(R.id.messages_recycler);\n mConversationAdapter = new ConversationAdapter();\n mConversationAdapter.setOnItemClickListener(new OnItemClickListener() {\n @Override\n public void onClick(View v, int position) {\n Conversation conversation = mConversations.get(position);\n Toast.makeText(getActivity(), \"You want to chat with: \" + mConversations.get(position).getUserInfo().getUserId(), Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(getActivity(), ChatActivity.class);\n intent.putExtra(\"friend_name\", conversation.getUserInfo().getUserId());\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n\n }\n });\n mLayoutManager = new LinearLayoutManager(getActivity());\n mConversationsRecycler.setLayoutManager(mLayoutManager);\n mConversationsRecycler.setAdapter(mConversationAdapter);\n\n mConversationAdapter.updateUserInfo(mConversations);\n return view;\n }", "protected void onStart() {\r\n super.onStart();\r\n\r\n FirebaseRecyclerAdapter<Single_Chat,ChatViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Single_Chat, ChatViewHolder>(\r\n Single_Chat.class,R.layout.card_view_chat_row,ChatViewHolder.class,mDatabase.child(\"Chats\")\r\n ) {\r\n @Override\r\n protected void populateViewHolder(ChatViewHolder viewHolder, Single_Chat model, int position) {\r\n final String targetUid = getRef(position).getKey();\r\n viewHolder.setDisplayName(model.getDisplayName());\r\n final String chatID = model.getChatID();\r\n\r\n viewHolder.mView.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n Intent chatIntent = new Intent(View_Chat.this,Chat.class);\r\n chatIntent.putExtra(\"ChatID\",chatID);\r\n chatIntent.putExtra(\"targetUid\",targetUid);\r\n startActivity(chatIntent);\r\n }\r\n });\r\n }\r\n };\r\n mChatList.setAdapter(firebaseRecyclerAdapter);\r\n }" ]
[ "0.70256215", "0.61822337", "0.60210705", "0.6005191", "0.5892593", "0.5844747", "0.5819451", "0.57845044", "0.5733149", "0.5694194", "0.56805545", "0.56578803", "0.5651399", "0.56103283", "0.5585023", "0.5584359", "0.5551874", "0.54723805", "0.5415248", "0.53993917", "0.5398141", "0.5396006", "0.53884345", "0.53852856", "0.5372235", "0.53634524", "0.5335828", "0.5303522", "0.5296061", "0.5289158", "0.52721065", "0.5270418", "0.52656853", "0.5241655", "0.52321887", "0.5193112", "0.51821595", "0.51684135", "0.515088", "0.51315254", "0.5126295", "0.5087448", "0.508447", "0.5077029", "0.5075869", "0.505091", "0.5039723", "0.50292826", "0.50190014", "0.5014221", "0.50088024", "0.49930152", "0.49641857", "0.49549308", "0.4952811", "0.4945653", "0.4944481", "0.492285", "0.49224213", "0.4922308", "0.49208817", "0.49200755", "0.4910003", "0.4908909", "0.49052715", "0.48997286", "0.4883123", "0.4881883", "0.48785743", "0.48744613", "0.48737976", "0.4870353", "0.48686105", "0.48535624", "0.4846302", "0.48313606", "0.4822689", "0.481936", "0.4809309", "0.48078632", "0.48060966", "0.48055515", "0.48014605", "0.47910103", "0.4788493", "0.47863278", "0.47850507", "0.47744554", "0.4773999", "0.47737393", "0.4770982", "0.47678223", "0.47665787", "0.47633862", "0.47597513", "0.475746", "0.47546107", "0.47470698", "0.47386932", "0.4728751" ]
0.4890523
66
Updates the current advertisement to be marked as a favourite if not already marked as such, if so it removes the advertisement from the users favourites. Also updates the favouriteicon in the DetailsView to correctly represent if the advertisement is a favourite or not.
public void onFavouritesIconPressed() { if (currentAdvertIsFavourite()) { dataModel.removeFromFavourites(advertisement); view.setIsNotAFavouriteIcon(); } else { dataModel.addToFavourites(advertisement); view.setIsAFavouriteIcon(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUpFavouriteIcon() {\n if (isUserOwner()) {\n view.hideFavouriteIcon();\n } else if (currentAdvertIsFavourite()) {\n view.setIsAFavouriteIcon();\n } else {\n view.setIsNotAFavouriteIcon();\n }\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "public void toggleFavorite() {\n setFavorite(!mFavorite);\n }", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (item.isFavorite()) {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite_off);\n\t\t\t\t\t\titem.setFavorite(false);\n\t\t\t\t\t\tpref.setString(item.getFileName(), false);\n\t\t\t\t\t\tif (!inRingtones) {\n\t\t\t\t\t\t\tIntent broadcast = new Intent();\n\t\t\t\t\t\t\tbroadcast.setAction(\"REMOVE_SONG\");\n\t\t\t\t\t\t\tcontext.sendBroadcast(broadcast);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite);\n\t\t\t\t\t\titem.setFavorite(true);\n\t\t\t\t\t\tpref.setString(item.getFileName(), true);\n\t\t\t\t\t}\n\t\t\t\t}", "private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "public static void updateFavorite(String userId, final String foodId, final boolean option, final ImageButton favButton) {\n //get database reference\n final DatabaseReference dbref = FirebaseDatabase.getInstance().getReference(\"users\").child(userId);\n //add eventlistener to reference\n dbref.child(\"favoritesList\").addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ArrayList<String> updated = new ArrayList<>();\n boolean exists = false;\n for (DataSnapshot favDataSnapshot : dataSnapshot.getChildren()) {\n String fav = favDataSnapshot.getValue(String.class);\n if (!option) {\n if (foodId.equals(fav))\n Log.d(\"favor\", \"this one should be deleted \");\n else\n updated.add(fav);\n } else {\n if (foodId.equals(fav)) {\n exists = true;\n updated.add(fav);\n } else\n updated.add(fav);\n }\n }\n if (!exists && option) {\n favButton.setImageResource(R.drawable.ic_favorite);\n updated.add(foodId);\n }\n else\n favButton.setImageResource(R.drawable.ic_favorite_empty);\n dbref.child(\"favoritesList\").setValue(updated);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "public void favorite(int index)\n {\n if (latest != null && latest.index == index)\n {\n if (this.showFavorites && !latest.morph.favorite)\n {\n this.toRemove.put(index, new MorphRemove(index, latest.typeIndex));\n this.remove(index);\n }\n\n latest = null;\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "public void setIsUserFav(User user) {\n if(user.isUsersFavouritePost(this.mPost))\n this.isFavourite.set(true);\n else\n this.isFavourite.set(false);\n\n //if(this.mPost.getFavourite().contains(user))\n // this.isFavourite.set(true);\n //this.isFavourite.set(false);\n }", "@POST(\"/attractions/{attractionId}/favorite\")\n Call<Void> markFavoriteAttraction(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer\n );", "protected void updateProfileFavorites(ActionRequest req, PageViewVO fav) throws ActionException {\n\t\tlog.debug(\"updateProfileFavorites...\");\n\n\t\tMyFavoritesAction mfa = new MyFavoritesAction(getActionInit());\n\t\tmfa.setAttributes(getAttributes());\n\t\tmfa.setDBConnection(dbConn);\n\n\t\tboolean isDelete = Convert.formatBoolean(req.getParameter(\"isDelete\"));\n\t\tif (isDelete) {\n\t\t\tmfa.deleteFavorite(req);\n\t\t} else {\n\t\t\t// set additional req params needed for inserts.\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_TYPE_CD, fav.getReferenceCode());\n\t\t\treq.setParameter(QuickLinksAction.PARAM_KEY_REL_ID, fav.getPageId());\n\t\t\tmfa.insertFavorite(req);\n\t\t}\n\n\t\tupdateSessionFavorites(req.getSession(),fav,isDelete);\n\n\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tif(item.reward.getReward_favorite()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(1);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.orange_star);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(0);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.black_star);\n\t\t\t\t\t}\n\t\t\t\t}", "@Override\n public void FavouriteMovieSelected(View view) {\n if(view.getTag().equals(MovieDetailAdapter.FAVOURITE)) {\n StoreFavoriteMovieIntentService.startAction_ADD_FAV_MOVIE(getActivity(),\n mMovieItem,\n movieDeatailAdapter.getmMovieItemDetail());\n } else {\n StoreFavoriteMovieIntentService.removeFavriteMovie(getActivity(),mMovieItem.getId());\n }\n movieDeatailAdapter.notifyDataSetChanged();\n }", "public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n return;\n }\n\n mBroadcasting = true;\n if (mOnFavoriteChangeListener != null) {\n mOnFavoriteChangeListener.onFavoriteChanged(this, mFavorite);\n }\n updateFavoriteButton(favorite);\n mBroadcasting = false;\n }\n }", "private void premium_isFavOrLike(Context context, ArticleBean articleBean, final ListingIconView favStartImg, final ListingIconView toggleLikeDisLikeImg) {\n ApiManager.isExistFavNdLike(context, articleBean.getArticleId())\n .subscribe(likeVal -> {\n int like = (int) likeVal;\n if (articleBean != null) {\n articleBean.setIsFavourite(like);\n }\n favStartImg.setVisibility(View.VISIBLE);\n favStartImg.setEnabled(true);\n toggleLikeDisLikeImg.setVisibility(View.VISIBLE);\n toggleLikeDisLikeImg.setEnabled(true);\n\n if(THPConstants.IS_USE_SEVER_THEME) {\n if (like == NetConstants.LIKE_NEUTRAL) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_YES) {\n // 2 = app:iconType=\"favourite\"\n favStartImg.updateIcon(2);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_NO) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 6 = app:iconType=\"like\"\n toggleLikeDisLikeImg.updateIcon(6);\n }\n }\n else {\n if (like == NetConstants.LIKE_NEUTRAL) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_YES) {\n favStartImg.setImageResource(R.drawable.ic_like_selected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_NO) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_on_copy);\n }\n }\n\n }, val -> {\n Log.i(\"\", \"\");\n });\n }", "@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}", "private void updateFavoriteButtons() {\n new AsyncTask<Void, Void, Boolean>() {\n\n @Override\n protected Boolean doInBackground(Void... params) {\n return isFavorite();\n }\n\n @Override\n protected void onPostExecute(Boolean isFavorite) {\n if (isFavorite) {\n mButtonRemoveFavorites.setVisibility(View.VISIBLE);\n mButtonMarkAsFavorite.setVisibility(View.GONE);\n } else {\n mButtonMarkAsFavorite.setVisibility(View.VISIBLE);\n mButtonRemoveFavorites.setVisibility(View.GONE);\n }\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n\n mButtonMarkAsFavorite.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n markAsFavorite();\n }\n });\n\n mButtonRemoveFavorites.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeFromFavorites();\n }\n });\n }", "public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }", "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite);", "public void onClickFavoriteButton() {\n String snackBarText;\n if (isFavorite) {\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n mDatabase.movieDao().delete(movie);\n }\n });\n isFavorite = false;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_border_white_24px);\n snackBarText = getString(R.string.remove_favorite);\n } else {\n diskIO.execute(new Runnable() {\n @Override\n public void run() {\n mDatabase.movieDao().insert(movie);\n }\n });\n isFavorite = true;\n mBinding.favoriteButton.setImageResource(R.drawable.ic_star_white_24px);\n snackBarText = getString(R.string.add_favorite);\n }\n Snackbar.make(mBinding.coordinatorLayout, snackBarText, Snackbar.LENGTH_SHORT).show();\n }", "@Override\n public void onClick(View v) {\n if (deletedContentModel != null && deletedContentModel.getBean() != null) {\n premium_updateBookmarkFavLike(null, null, context,\n deletedPosition, deletedContentModel.getBean(), \"dislike\");\n CleverTapUtil.cleverTapBookmarkFavLike(context, articleId, mFrom, \"UNDO\");\n }\n }", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "public void updateFeedItemAsFavorite(FeedItem item) {\n new updateFeedItemFavoriteAsync(itemDao).execute(item);\n }", "private void deleteFav() {\n\n // Call the ContentResolver to delete the favourite at the given content URI.\n // Pass in null for the selection and selection args because the mCurrentFavUri\n // content URI already identifies the fav that we want.\n int rowsDeleted = getContentResolver().delete(mCurrentFavUri, null, null);\n\n // Show a toast message depending on whether or not the delete was successful.\n if (rowsDeleted == 0) {\n // If no rows were deleted, then there was an error with the delete.\n Toast.makeText(this, getString(R.string.editor_delete_pet_failed),\n Toast.LENGTH_SHORT).show();\n } else {\n // Otherwise, the delete was successful and we can display a toast.\n Toast.makeText(this, getString(R.string.editor_delete_pet_successful),\n Toast.LENGTH_SHORT).show();\n }\n\n // Close the activity\n finish();\n }", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_fav) {\n FavoritesDataSource dataSource = new FavoritesDataSource(getBaseContext());\n dataSource.open();\n if(isFav){\n //remove from favorites\n dataSource.deleteFromFavorites(placeid);\n item.setIcon(R.drawable.ic_heart_outline_white);\n Toast.makeText(getBaseContext(),placeName+\" was removed from favorites\",Toast.LENGTH_SHORT).show();\n isFav = false;\n }else{\n //add to favorites\n Place place = new Place(placeid,placeName,address,true,picURL);\n dataSource.addToFavorites(place);\n item.setIcon(R.drawable.ic_heart_fill_white);\n Toast.makeText(getBaseContext(),placeName+\" was added to favorites\",Toast.LENGTH_SHORT).show();\n isFav = true;\n }\n dataSource.close();\n return true;\n }else if(id == R.id.action_share){\n //open twitter url\n String tweetParams = \"text=\"+ URLEncoder.encode(\"Check out \"+placeName+\" located at \"+address+\". Website \")+\"&url=\"+URLEncoder.encode(tweetURL)+\"&hashtags=TravelAndEntertainmentSearch\";\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://twitter.com/intent/tweet?\"+tweetParams));\n startActivity(browserIntent);\n return true;\n }else if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@RequestMapping(value = \"/gifs/{gifId}/favorite\", method = RequestMethod.POST)\n public String toggleFavorite(@PathVariable Long gifId, HttpServletRequest request) {\n Gif gif = gifService.findById(gifId);\n gifService.toggleFavorite(gif);\n return String.format(\"redirect:%s\", request.getHeader(\"referer\"));\n }", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_favorites) {\n if(gameFragment.isFavorites()) {\n item.setIcon(R.drawable.ic_favorite_border);\n gameFragment.filterFavorites(false);\n }\n else {\n item.setIcon(R.drawable.ic_favorite);\n gameFragment.filterFavorites(true);\n }\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic int updateFavoriteVO(FavoriteVO vo) {\n\t\treturn 0;\n\t}", "public void onConfirmFavouriteDeletion();", "public void setFavoriteInRecyclerView(){\n favoriteViewModel = new ViewModelProvider(requireActivity(), AoE2DecencyInjector.getViewModelFactory()).get(FavoriteViewModel.class);\n favoriteViewModel.getFavoritesCivilizations().observe(getViewLifecycleOwner(), new Observer<List<CivilizationFavoriteItemViewModel>>() {\n @Override\n public void onChanged(List<CivilizationFavoriteItemViewModel> civilizationFavoriteItemViewModels) {\n civilizationFavoriteAdapter.setListItemViewModels(civilizationFavoriteItemViewModels);\n }\n });\n\n favoriteViewModel.getCivAdd().observe(getViewLifecycleOwner(), new Observer<Event<String>>() {\n @Override\n public void onChanged(Event<String> stringEvent) {\n //Do nothing\n }\n });\n\n favoriteViewModel.getCivRem().observe(getViewLifecycleOwner(), new Observer<Event<String>>() {\n @Override\n public void onChanged(Event<String> stringEvent) {\n //Do nothing\n }\n });\n }", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "public void changeFavorite(boolean a) {\r\n favorite = a;\r\n }", "@Override\n public void onClick(View view) {\n helper = new DbHelper(context);\n //estrella click listener\n if (holder.estrella.getColorFilter() != null) {\n holder.estrella.clearColorFilter();\n //pub_id = h.hpub_id.getText().toString();\n //aquí elimina\n //Drawer dra = new Drawer();\n //dra.deleteFavorites(h.hpub_id.getText().toString(), Singin.user.getUser_email());\n //helper.eliminar();\n Toast.makeText(context, \"Favorito eliminado\"/*+ pub_id*/, Toast.LENGTH_SHORT).show();\n\n\n\n } else {\n holder.estrella.setColorFilter(ContextCompat.getColor(context,\n R.color.favorito_color));\n //pub_id = h.hpub_id.getText().toString();\n //aquí añade\n //Drawer dra = new Drawer();\n //dra.addFavorites(dra.createFavorite());\n // helper.insertardatos();\n Toast.makeText(context, \"Favorito Añadido\"/*+ pub_id*/, Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t((ImageView) v)\n\t\t\t\t.setImageResource(!followState ? R.drawable.heart\n\t\t\t\t\t\t: R.drawable.favourite);\n\t\t\t\tpost.setFavorite(!followState?1:0);\n\t\t\t\tmHandler.obtainMessage(!followState?3:4, post_id)\n\t\t\t\t.sendToTarget();\n\t\t\t}", "boolean isFavorite(int id);", "public boolean toggleIsFavorite(ContentValues contentValues) {\n SQLiteDatabase db = this.getWritableDatabase();\n\n String movieId = contentValues.getAsString(FavoriteMovieContract.FavoriteMovie.COLUMN_MOVIE_ID);\n\n if (getIsFavorite(movieId)) {\n db.delete(TABLE_NAME, COLUMN_MOVIE_ID + \" = ?\", new String[] { movieId });\n return false;\n } else {\n ContentValues values = new ContentValues();\n values.put(COLUMN_MOVIE_ID, movieId);\n\n db.insert(TABLE_NAME, null, values);\n return true;\n }\n }", "private void setFabIcons() {\n\n if (isAddedToFavorites()) {\n mFabButton.setTag(FAV_TAG);\n mFabButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite));\n } else {\n mFabButton.setTag(NOT_FAV_TAG);\n mFabButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite_border));\n }\n }", "public boolean isAlreadyFavorited(){\r\n if(ui.isIsUserAuthenticated()){\r\n Users user = ui.getUser();\r\n if(user.getFavorites() != null){\r\n return user.getFavorites().contains(recipe);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n\n return true;\n }\n if (id == R.id.action_fav) {\n Intent intent = new Intent(getApplicationContext(),ThirdActivity.class);\n startActivity(intent);\n return true;\n }\n if (id == R.id.action_addfav) {\n\n int i = 0;\n Map<String, ?> map = sharedPreferences.getAll();\n for(Map.Entry mEntry : map.entrySet()){\n if(Pattern.matches(\"fav \"+titre.getText(), mEntry.getKey()+\"\")){\n Toast.makeText(this,titre.getText()+\" removed from favorite\",Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .remove(mEntry.getKey()+\"\")\n .remove(titre.getText()+\" id\")\n .apply();\n i=1;\n }\n }\n\n if(i==0) {\n Toast.makeText(this, titre.getText() + \" added to favorite\", Toast.LENGTH_SHORT).show();\n sharedPreferences\n .edit()\n .putString(\"fav \" + titre.getText(), titre.getText() + \"\")\n .putInt(titre.getText() + \" id\", idAnime)\n .apply();\n }\n i=0;\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void drawFav(Recipe r, ImageView favIcon) {\n int imgFav;\n if (r.isFavorite()) {\n imgFav = getResources().getIdentifier(\"favstarylw\", \"drawable\", getPackageName());\n } else {\n imgFav = getResources().getIdentifier(\"favstargrey\", \"drawable\", getPackageName());\n }\n favIcon.setImageResource(imgFav);\n }", "public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}", "@DELETE(\"/attractions/{attractionId}/favorite\")\n Call<Void> unmarkFavoriteAttraction(\n @Path(\"attractionId\") int attractionId,\n @Header(\"Authorization\") String bearer\n );", "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "private boolean isFavorite() {\n for (int favoriteIndex : favoriteIndexes) {\n if (favoriteIndex == shownTipIndex) {\n return true;\n }\n }\n return false;\n }", "public boolean isFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\treturn mFavoritesCache.isFavoriteSong(getAudioId(),\n\t\t\t\t\t\tgetTrackHost());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void onClick(DialogInterface dialog, int which) {\n myRefFav.child(firebaseUser.getUid()).child(data.get(position).getDishes().get(0).getResturentID()).setValue(\"true\").addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n data.remove(position);\n Toast.makeText(context,\"Added to your favorite list!\",Toast.LENGTH_LONG).show();\n }\n });\n\n }", "public final void resetFavorites() {\n Favorites favorites = Favorites.INSTANCE;\n favorites.clear();\n favorites.load(this.persistenceWrapper.readFavorites());\n }", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "@Override\n public void addProductToFavorites(View view, Intent intent) {\n try {\n if(iProduct != null && view != null && intent != null){\n Context context = view.getContext();\n String jsonProduct = intent.getStringExtra(CommonPresenter.DETAIL_PRODUCT);\n Product product = CommonPresenter.getProductFromJSON(jsonProduct);\n CRUDFavorite crudFavorite = new CRUDFavorite(context);\n boolean isProductExists = crudFavorite.isProductExists(product.getProductId());\n if(isProductExists){\n crudFavorite.deleteByProductId(product.getProductId());\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_delete_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_add_to_favorite_32dp);\n }\n else{\n crudFavorite.add(new Favorite(0, product));\n CommonPresenter.showSnackBarMessage(view, context.getString(R.string.lb_product_add_to_favorite));\n iProduct.changeImageRightResource(R.drawable.ic_favorite_32dp);\n }\n }\n }\n catch (Exception ex){\n Log.e(\"TAG_ERROR\", \"ProductPresenter-->addProductToFavorites() : \"+ex.getMessage());\n }\n }", "public void toggleFavorite(boolean animated) {\n if (!mFavorite) {\n boolean orig = mAnimateFavorite;\n mAnimateFavorite = animated;\n setFavorite(!mFavorite);\n mAnimateFavorite = orig;\n } else {\n boolean orig = mAnimateUnfavorite;\n mAnimateUnfavorite = animated;\n setFavorite(!mFavorite);\n mAnimateUnfavorite = orig;\n }\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.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public void onCancelFavouriteDeletion();", "@Test(suiteName = \"NowPlaying\", testName = \"Disallowed\", description = \"Now Playing - On Demand - Disallowed - Favorite icon\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-259\" })\n\tpublic void disallowedOnDemandFavoriteIcon() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"Now Playing - On Demand - Disallowed - Favorite icon-259\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickNews();\n\t\t\tcommon.scrollUntilTextExists(\"News/Public Radio\");\n\t\t\tgetPageFactory().getEvehome().clickSubCatNews();\n\t\t\tCommon.impicitWait(3);\n\t\t\tgetPageFactory().getdmca().clickOnDemand();\n\t\t\tCommon.impicitWait(3);\n\t\t\tgetPageFactory().getEvehome().navigateToEpisode();\n\t\t\tString string = getPageFactory().getFavorites().favoritingShow();\n\t\t\t/*\n\t\t\t * getPageFactory().getEvehome().minimizebutton().click();\n\t\t\t * getPageFactory().getFavorites().verifyingFavoriteList(string);\n\t\t\t * getPageFactory().getEvehome().validateHomePage();\n\t\t\t * getPageFactory().getEvehome().clickMucisSubRock()\n\t\t\t */;\n\t\t\tgetPageFactory().getFavorites().unfavoriteShow();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "@FXML\n private void chooseFavouritePhotoEvent() {\n if (!PhotoManager.getFavouriteList().isEmpty()) {\n User.setGalleryPhotos(PhotoManager.getFavouriteList());\n fadeOutEvent();\n }\n }", "private void toggleFavorite(Set<Long> selectedSet) {\n toggleMultiple(selectedSet, new MultiToggleHelper() {\n\n @Override\n public boolean getField(Cursor c) {\n return c.getInt(MessagesAdapter.COLUMN_FAVORITE) != 0;\n }\n\n @Override\n public void setField(long messageId, boolean newValue) {\n mController.setMessageFavoriteSync(messageId, newValue);\n }\n });\n }", "public void onClick(DialogInterface dialog, int which) {\n myRefFav.child(firebaseUser.getUid()).child(data.get(position).getDishes().get(0).getResturentID()).setValue(\"true\").addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n\n data.remove(position);\n notifyDataSetChanged();\n Toast.makeText(context,\"Added to your favorite list!\",Toast.LENGTH_LONG).show();\n }\n });\n\n }", "private void showFavouriteIcon(boolean show) {\n faveIcon.setVisible(show);\n defaultIcon.setVisible(!show);\n sortIcon.setVisible(show);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_favorite:\n ItemFavoriteUrl db = new ItemFavoriteUrl(webView.getTitle(), webView.getUrl());\n db.save();\n adapter.notifyDataSetChanged();\n //adapter.add(ItemFavoriteUrl.findById(ItemFavoriteUrl.class, ItemFavoriteUrl.count(ItemFavoriteUrl.class)));\n Toast.makeText(MainActivity.this, R.string.favorite_saved, Toast.LENGTH_SHORT).show();\n /*for (int i=0; i<ItemFavoriteUrl.count(ItemFavoriteUrl.class); i++) {\n db = ItemFavoriteUrl.find\n Log.d(\"db\", db.url);\n }*/\n Log.d(\"count\", adapter.getCount() + \"\");\n break;\n\n case R.id.action_clear:\n ItemFavoriteUrl.deleteAll(ItemFavoriteUrl.class);\n adapter.notifyDataSetChanged();\n Toast.makeText(MainActivity.this, R.string.clear, Toast.LENGTH_SHORT).show();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Gson gson = new Gson();\n dbHelper = new DrinksDbHelper(this);\n String studentDataObjectAsAString = getIntent().getStringExtra(\"Drink\");\n isFavourite = getIntent().getBooleanExtra(\"favourite\", false);\n backScreen = getIntent().getBooleanExtra(\"backScreen\",false);\n drink = gson.fromJson(studentDataObjectAsAString, Drink.class);\n setContentView(R.layout.recipe);\n TextView textViewDrinkName = findViewById(R.id.textViewDrinkName);\n textViewDrinkName.setText(drink.getName());\n ImageView drinkImg = findViewById(R.id.drinkImg);\n byte[] base64converted = Base64.decode(drink.getImage(), Base64.DEFAULT);\n Bitmap bitmap = BitmapFactory.decodeByteArray(base64converted, 0, base64converted.length);\n drinkImg.setImageBitmap(bitmap);\n TextView description = findViewById(R.id.Description);\n description.setText(drink.getDescription());\n TextView glass = findViewById(R.id.glass);\n glass.setText(drink.getGlass());\n TextView recipe = findViewById(R.id.textViewRecipe);\n recipe.setText(drink.getRecipe());\n fav = findViewById(R.id.favourites_Button);\n if(isFavourite) {\n fav.setActivated(true);\n }\n IngredientsListAdapter adapter = new IngredientsListAdapter(this,R.layout.ingredient_list,drink.getIngredients());\n fav.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(isFavourite) {\n isFavourite = false;\n dbHelper.removeFromFavourites(dbHelper.getWritableDatabase(), drink.getId());\n fav.setActivated(false);\n favourites_update(dbHelper.getAllFavourites(dbHelper.getReadableDatabase()));\n }else {\n isFavourite = true;\n dbHelper.addToFavourites(dbHelper.getWritableDatabase(), drink);\n fav.setActivated(true);\n favourites_update(dbHelper.getAllFavourites(dbHelper.getReadableDatabase()));\n }\n }\n });\n NonScrollListView ingredients = findViewById(R.id.ingredients_list);\n ingredients.setClickable(false);\n ingredients.setAdapter(adapter);\n\n\n ImageButton backBtn = findViewById(R.id.back_Button);\n backBtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Intent goBack = new Intent(DrinksDisplayActivity.this, MainActivity.class);\n if (backScreen) goBack.putExtra(\"backScreen\", true);\n startActivity(goBack);\n }\n });\n }", "public void addFavourite(View view){\n // We need to get the input from the fields\n EditText editTextName = (EditText) findViewById(R.id.editTextItemName);\n\n // First we need to make sure that the two required fields have entries and are valid\n if (editTextName.length() == 0) {\n Context context = getApplicationContext();\n CharSequence text = \"Missing Name.\";\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n\n return;\n }\n\n Context context = getApplicationContext();\n CharSequence text = \"Entry added as favourite\";\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n view.setClickable(false); // Turns button off //\n view.setVisibility(View.INVISIBLE);\n\n // Also make text entry invisible\n editTextName.setVisibility(editTextName.INVISIBLE);\n\n Globals.l.add(editTextName.getText().toString(),Globals.f);\n\n\n }", "@Override\n public void onClick(View v) {\n FavouriteDatabase fd = new FavouriteDatabase();\n fd.addToFavouritesList(catID);\n Toast.makeText(getContext(), \"Added to your Favourites\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "public void deleteFavorites() {\n mFavSQLiteDB.delete(FAVORITES_TABLE, null, null);\n }", "@Override\r\n public void onFavoriteClicked() {\r\n fragFav = new FragmentFavoritesList();\r\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r\n // Replace whatever is in the fragment_container view with this fragment,\r\n // and add the transaction to the back stack so the user can navigate back\r\n if (getResources().getBoolean(R.bool.isTablet)) {\r\n transaction.add(R.id.listFrag_tab,fragFav, \"FragmentFavoritesList\");\r\n }else {\r\n transaction.add(R.id.activity_main_smart, fragFav, \"FragmentFavoritesList\");\r\n }\r\n transaction.addToBackStack(null);\r\n // Commit the transaction\r\n transaction.commit();\r\n }", "public void backToPosters(){\n //check if favorite list is going to be displayed or if favorite list has changed\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mFavoriteChanged){\n //refresh favorite list\n showMovieList(mMovieStaff.getMovies(PosterHelper.NAME_ID_FAVORITE),\n PosterHelper.NAME_ID_FAVORITE);\n }\n }", "@Override\n public boolean setUiBeforShow() {\n Log.e(\" ##IS_FAV\", isFavourite + \"\");\n\n if(isFavourite) {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.yellow));\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.yellow), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n } else {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.white));\n\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.white), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n }\n\n\n\n imgCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n }\n });\n\n txtRename.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _renameClick.onRenameOptionClick(pos, \"\");\n dismiss();\n }\n });\n\n txtAddToFavorite.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _favoriteClick.onFavoriteOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScene.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addToSceneClick.onAddToSceneOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScheduler.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addSchedulerClick.onAddSchedulerOptionClick(pos);\n dismiss();\n }\n });\n\n return true;\n }", "private void deleteIcons() {\n Uri uri = DatabaseMap.PlaceEntry\n .buildPlaceByFavoriteUri(getResources().getInteger(R.integer.favorite_add));\n String[] projection = {DatabaseMap.PlaceEntry.PLACE_ICON_FILE_NAME};\n Cursor cursor = getContentResolver().query(uri, projection, null, null, null);\n ArrayList<String> favoritesIcons = new ArrayList<String>();\n\n while (cursor.moveToNext()) {\n favoritesIcons.add(cursor.getString(cursor.getColumnIndex(DatabaseMap.PlaceEntry.PLACE_ICON_FILE_NAME)));\n }\n\n String[] files = fileList();\n for (String fileName : files) {\n if (!favoritesIcons.contains(fileName))\n deleteFile(fileName);\n }\n }", "public void updateFavorited(UserProfile up, String itemCode, Boolean madeIt) {\n ConnectionPool pool = ConnectionPool.getInstance();\n Connection connection = pool.getConnection();\n PreparedStatement ps = null;\n\n String query = \"UPDATE userItems \"\n + \"SET madeIt = ? \"\n + \"WHERE itemCode = ?\";\n try {\n ps = connection.prepareStatement(query);\n ps.setBoolean(1, madeIt);\n ps.setString(2, itemCode);\n\n ps.executeUpdate();\n } catch (SQLException se) {\n System.out.println(\"ERROR: Could not execute SQL statement in: \" + \"Item.changeRating()\");\n System.out.println(\"ERROR: Could not execute SQL statement: \" + se);\n } finally {\n DBUtil.closePreparedStatement(ps);\n pool.freeConnection(connection);\n }\n up.updateFav(itemCode, madeIt);\n }", "@Override\n public void onBindViewHolder(final ViewHolder holder, int position) {\n final JSONObject js = mData.get(position);\n\n if(mData.isEmpty())\n {\n Log.d(TAG, \"onBindViewHolder: \");\n ((PlacesActivity)context).checkEmpty();\n }\n\n String place_name = null;\n String placeIcon = null;\n String vicinity = null;\n //final String placeid= null;\n try {\n place_name = js.get(\"name\").toString();\n vicinity = js.getString(\"vicinity\");\n placeIcon= js.get(\"icon\").toString();\n String placeid= js.get(\"place_id\").toString();\n if(myprefs.contains(placeid))\n {\n holder.myPlaceFav.setImageResource(R.drawable.ic_resfav);\n holder.myPlaceFav.setTag(1);\n }\n else\n holder.myPlaceFav.setTag(0);\n //placeid = js.get(\"place_id\").toString();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n holder.myTextView.setText(place_name);\n holder.myAdr.setText(vicinity);\n Picasso.get().load(placeIcon).into(holder.myPlaceIcon);\n\n\n\n holder.myPlaceFav.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String placeid = null;\n String placename = \"\";\n //boolean flag= false;\n try{\n placeid= js.get(\"place_id\").toString();\n placename= js.get(\"name\").toString();\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n if(Integer.parseInt(holder.myPlaceFav.getTag().toString())==0)\n {\n\n SharedPreferences.Editor editor = myprefs.edit();\n\n editor.putString(placeid,js.toString());\n editor.commit();\n holder.myPlaceFav.setImageResource(R.drawable.ic_resfav);\n holder.myPlaceFav.setTag(1);\n toastMessage(placename+\" added to favorites\");\n\n\n\n\n }\n else\n {\n SharedPreferences.Editor editor = myprefs.edit();\n editor.remove(placeid);\n editor.commit();\n holder.myPlaceFav.setImageResource(R.drawable.ic_resnofav);\n holder.myPlaceFav.setTag(0);\n toastMessage(placename+\" removed from favorites\");\n\n\n }\n\n }\n }\n );\n\n\n //Picasso.get().load(R.drawable.ic_search).into(holder.myPlaceFav);\n }", "@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n if (((MemeLab.get(getActivity())).getMemes()).contains(\n MemeLab.get(getActivity()).getMeme(selectedImagePath)) ||\n ((MemeLab.get(getActivity())).getMyanmarMemes()).contains(\n MemeLab.get(getActivity()).getMeme(selectedImagePath)) ||\n (MemeLab.get(getActivity())\n .getCustomMemes()\n .contains(MemeLab.get(getActivity()).getMeme(selectedImagePath)))) {\n if (isChecked) {\n Toast.makeText(getActivity(), \"added to Favorites\", Toast.LENGTH_SHORT).show();\n sendResult(FAVORITE_RESULT, true);\n }\n if (!isChecked) {\n Toast.makeText(getActivity(), \"removed from Favorites\", Toast.LENGTH_SHORT).show();\n sendResult(FAVORITE_RESULT, false);\n }\n } else {\n Toast.makeText(getActivity(), \"cannot add Custom images to Favorites\", Toast.LENGTH_SHORT)\n .show();\n }\n }", "public void setFavoriteFlag(int flag, long videoID) {\n try {\n SQLiteDatabase database = this.getReadableDatabase();\n database.enableWriteAheadLogging();\n ContentValues contents = new ContentValues();\n contents.put(VideoTable.KEY_VIDEO_IS_FAVORITE, flag);\n database.update(VideoTable.VIDEO_TABLE, contents, VideoTable.KEY_VIDEO_ID + \"=?\", new String[]{\"\" + videoID});\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void onClick(DialogInterface dialog, int id) {\n deleteFav();\n }", "@Subscribe\n public void handleUnfavoriteEvent(UnfavoriteEvent event) {\n Logger.d(\"UnfavoriteEvent\");\n DataHelper.setFavoriteVideo(getContentResolver(), event.getVideoId(), false);\n DataHelper.deleteFavorite(getContentResolver(), event.getVideoId());\n// DataHelper.setFavoriteVideo(getContentResolver(), event.getEventData().getEventData().getResponse().getVideoId(), false);\n }", "@Override\n\t\tpublic void onUnfavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "@FXML\n private void toggleFavorite() {\n raise(new ToggleFavoritePersonEvent(id.getText().substring(0, id.getText().indexOf(\".\"))));\n }", "@Subscribe\n public void onDeleteFavorite(DeleteFavoriteEvent event) {\n mApiService.deleteFavorite(event.neighbour);\n initListFavorite();\n }" ]
[ "0.73203", "0.70733714", "0.70605034", "0.6869812", "0.67203593", "0.6696734", "0.6635987", "0.66157424", "0.6578075", "0.657259", "0.6554182", "0.6497724", "0.64836675", "0.6468765", "0.6436896", "0.6414036", "0.64104605", "0.6410034", "0.6357171", "0.63508373", "0.63321775", "0.6303794", "0.62442064", "0.6218314", "0.6215007", "0.6191239", "0.61626005", "0.6154454", "0.6145177", "0.6116959", "0.6095814", "0.6090826", "0.6089949", "0.60741633", "0.60065156", "0.5976673", "0.59451723", "0.59313536", "0.591653", "0.59126055", "0.5910963", "0.58792233", "0.58792233", "0.5863899", "0.58375704", "0.58231974", "0.5816247", "0.58071136", "0.5804416", "0.57829285", "0.5778145", "0.57702357", "0.57396775", "0.5736261", "0.5726742", "0.57252526", "0.57239693", "0.5711298", "0.5705751", "0.5697807", "0.5693302", "0.5692512", "0.56912345", "0.5691026", "0.5659783", "0.5634283", "0.56325597", "0.56179065", "0.5617721", "0.56147856", "0.5601852", "0.5601322", "0.5586532", "0.55792457", "0.5575409", "0.5566757", "0.5560412", "0.5555458", "0.55543363", "0.55340856", "0.5533558", "0.55121976", "0.5506641", "0.5486947", "0.54827005", "0.5475116", "0.54595673", "0.54533684", "0.5426978", "0.539782", "0.539221", "0.5386631", "0.5383485", "0.5374402", "0.5372689", "0.5371501", "0.53630006", "0.5359264", "0.5355551", "0.5354551" ]
0.75529426
0
Initializes the favouriteicon according to if the current advertisement is part of the users favourites or not.
public void setUpFavouriteIcon() { if (isUserOwner()) { view.hideFavouriteIcon(); } else if (currentAdvertIsFavourite()) { view.setIsAFavouriteIcon(); } else { view.setIsNotAFavouriteIcon(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onFavouritesIconPressed() {\n if (currentAdvertIsFavourite()) {\n dataModel.removeFromFavourites(advertisement);\n view.setIsNotAFavouriteIcon();\n } else {\n dataModel.addToFavourites(advertisement);\n view.setIsAFavouriteIcon();\n }\n }", "private void initFavoriteButtonUI() {\n if (mNeighbour.isFavorite())\n mFavoriteBtn.setImageResource(R.drawable.ic_star_yellow_24dp);\n else\n mFavoriteBtn.setImageResource(R.drawable.ic_star_grey_24dp);\n }", "public static void findFavourites() {\n DataManager.currentFavouritesList.clear();\n\n for (int i = 0; i < DataManager.fullFavouritesList.size(); i++) {\n Attraction attraction = DataManager.findAttractionByName(DataManager.fullFavouritesList.get(i));\n\n if (attraction != null) {\n DataManager.currentFavouritesList.add(attraction);\n }\n }\n\n FavouritesListFragment.backgroundLayout.setVisibility(DataManager.currentFavouritesList.size() == 0 ? View.VISIBLE : View.INVISIBLE);\n\n AttractionsListFragment.attractionsAdapter.notifyDataSetChanged();\n }", "private void initListFavorite() {\n favoritesList = mApiService.getFavorites();\n mRecyclerView.setAdapter(new MyNeighbourRecyclerViewAdapter(favoritesList, this));\n }", "private void premium_isFavOrLike(Context context, ArticleBean articleBean, final ListingIconView favStartImg, final ListingIconView toggleLikeDisLikeImg) {\n ApiManager.isExistFavNdLike(context, articleBean.getArticleId())\n .subscribe(likeVal -> {\n int like = (int) likeVal;\n if (articleBean != null) {\n articleBean.setIsFavourite(like);\n }\n favStartImg.setVisibility(View.VISIBLE);\n favStartImg.setEnabled(true);\n toggleLikeDisLikeImg.setVisibility(View.VISIBLE);\n toggleLikeDisLikeImg.setEnabled(true);\n\n if(THPConstants.IS_USE_SEVER_THEME) {\n if (like == NetConstants.LIKE_NEUTRAL) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_YES) {\n // 2 = app:iconType=\"favourite\"\n favStartImg.updateIcon(2);\n // 10 = app:iconType=\"dislike\"\n toggleLikeDisLikeImg.updateIcon(10);\n }\n else if (like == NetConstants.LIKE_NO) {\n // 11 = app:iconType=\"unfavourite\"\n favStartImg.updateIcon(11);\n // 6 = app:iconType=\"like\"\n toggleLikeDisLikeImg.updateIcon(6);\n }\n }\n else {\n if (like == NetConstants.LIKE_NEUTRAL) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_YES) {\n favStartImg.setImageResource(R.drawable.ic_like_selected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_off_copy);\n } else if (like == NetConstants.LIKE_NO) {\n favStartImg.setImageResource(R.drawable.ic_like_unselected);\n toggleLikeDisLikeImg.setImageResource(R.drawable.ic_switch_on_copy);\n }\n }\n\n }, val -> {\n Log.i(\"\", \"\");\n });\n }", "private void setFabIcons() {\n\n if (isAddedToFavorites()) {\n mFabButton.setTag(FAV_TAG);\n mFabButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite));\n } else {\n mFabButton.setTag(NOT_FAV_TAG);\n mFabButton.setImageDrawable(getResources().getDrawable(R.drawable.ic_favorite_border));\n }\n }", "public void favouriteUser() {\r\n\t\tif(favourited) {\r\n\t\t\tcurrentUser.unfavouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t} else if(currentUser.getUserID() != userToView.getUserID()){\r\n\t\t\tcurrentUser.favouriteUser(userToView.getUserID());\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tCONSTANTS.makeAlertWindow(\"warning\",\"You can not favorite yourself!\");\r\n\t\t}\r\n\t}", "public void refreshFavoriteBtn() {\r\n if (recipe.isFavorite(context)) {\r\n favoriteBtn.setIcon(\"faw_star\");\r\n } else {\r\n favoriteBtn.setIcon(\"faw_star_o\");\r\n }\r\n }", "private void addToFavorites() {\n\n favoriteBool = true;\n preferencesConfig.writeAddFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Added to favorites.\", Toast.LENGTH_SHORT).show();\n\n }", "private void showFavouriteList() {\n setToolbarText(R.string.title_activity_fave_list);\n showFavouriteIcon(false);\n buildList(getFavourites());\n }", "@Override\n\tpublic boolean isFavorite() {\n\t\treturn this.isFavorite;\n\t}", "public boolean isFavorite() {\n return isFavorite;\n }", "public boolean isFavorite() {\n return isFavorite;\n }", "@Test(suiteName = \"NowPlaying\", testName = \"Disallowed\", description = \"Now Playing - On Demand - Disallowed - Favorite icon\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-259\" })\n\tpublic void disallowedOnDemandFavoriteIcon() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"Now Playing - On Demand - Disallowed - Favorite icon-259\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickNews();\n\t\t\tcommon.scrollUntilTextExists(\"News/Public Radio\");\n\t\t\tgetPageFactory().getEvehome().clickSubCatNews();\n\t\t\tCommon.impicitWait(3);\n\t\t\tgetPageFactory().getdmca().clickOnDemand();\n\t\t\tCommon.impicitWait(3);\n\t\t\tgetPageFactory().getEvehome().navigateToEpisode();\n\t\t\tString string = getPageFactory().getFavorites().favoritingShow();\n\t\t\t/*\n\t\t\t * getPageFactory().getEvehome().minimizebutton().click();\n\t\t\t * getPageFactory().getFavorites().verifyingFavoriteList(string);\n\t\t\t * getPageFactory().getEvehome().validateHomePage();\n\t\t\t * getPageFactory().getEvehome().clickMucisSubRock()\n\t\t\t */;\n\t\t\tgetPageFactory().getFavorites().unfavoriteShow();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}", "private boolean checkIfFavorite() {\n if (favoriteIds.contains(movie.getId())) {\n movie.setFavorite(true);\n return true;\n }\n movie.setFavorite(false);\n return false;\n }", "public void setIsUserFav(User user) {\n if(user.isUsersFavouritePost(this.mPost))\n this.isFavourite.set(true);\n else\n this.isFavourite.set(false);\n\n //if(this.mPost.getFavourite().contains(user))\n // this.isFavourite.set(true);\n //this.isFavourite.set(false);\n }", "private boolean isFavorite() {\n for (int favoriteIndex : favoriteIndexes) {\n if (favoriteIndex == shownTipIndex) {\n return true;\n }\n }\n return false;\n }", "public boolean isAlreadyFavorited(){\r\n if(ui.isIsUserAuthenticated()){\r\n Users user = ui.getUser();\r\n if(user.getFavorites() != null){\r\n return user.getFavorites().contains(recipe);\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "public void onClicklistenerForFavorites(View view){\n if(isAlreadyFavorteis() == true){\n Boolean hasDeleted = dBhelper.deleteFavortiesByCategoryId(userAskAbout,inputSpinnerOne.getSelectedItemPosition(),inputSpinnertow.getSelectedItemPosition());\n if(hasDeleted == true) {\n Toast.makeText(getApplicationContext(), \"Your data has deleted in Favorties\", Toast.LENGTH_LONG).show();\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites);\n isAlreadyFavorties = false;\n }\n\n }else\n {\n favortiesMethed();\n isAlreadyFavorties = true;\n favortiesImageView.setBackgroundResource(R.drawable.ic_favourites_pressed);\n }\n\n }", "public boolean isFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\treturn mFavoritesCache.isFavoriteSong(getAudioId(),\n\t\t\t\t\t\tgetTrackHost());\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void toggleFavorites()\n {\n this.showFavorites = !this.showFavorites;\n this.setupMorphs(Morphing.get(this.mc.thePlayer));\n }", "public void setToFavorite(boolean favorite) {\n this.isFavorite = favorite;\n }", "private void showFavouriteIcon(boolean show) {\n faveIcon.setVisible(show);\n defaultIcon.setVisible(!show);\n sortIcon.setVisible(show);\n }", "public void setFavorite(boolean favorite) {\n isFavorite = favorite;\n }", "@Override\n public void onClick(View view) {\n isFavorite = !isFavorite;\n\n if (isFavorite) {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_add_to_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.saveFavorite(ShowTeacherActivity.this, teacher);\n ibFavorite.setImageResource(R.drawable.ic_favorite_full);\n } else {\n Toast.makeText(ShowTeacherActivity.this,\n getString(R.string.message_teacher_delete_from_favorites), Toast.LENGTH_SHORT)\n .show();\n presenter.deleteFavorite(ShowTeacherActivity.this, teacher.getId());\n ibFavorite.setImageResource(R.drawable.ic_favorite_border);\n }\n }", "@Override\n public void onResume() {\n super.onResume();\n initListFavorite();\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n if (isFavorite) {\n menu.findItem(R.id.action_favorite).setIcon(R.drawable.favorite_checked);\n }\n return super.onPrepareOptionsMenu(menu);\n }", "public void setFavorite(boolean favorite) {\n this.favorite = favorite;\n }", "private boolean isAddedToFavorites() {\n boolean isFavorite = false;\n\n String[] projection = {FavMovieEntry.COLUMN_MOVIE_ID};\n String selection = FavMovieEntry.COLUMN_MOVIE_ID + \"=?\";\n String[] selectionArgs = new String[]{\n String.valueOf(sMovie.getMovieId())};\n\n Cursor cursor = this.getContentResolver().query(\n FavMovieEntry.CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null\n );\n\n if (cursor != null && cursor.moveToFirst()) {\n if (cursor.getCount() > 0) {\n isFavorite = true;\n long currentIndex = cursor.getLong(cursor.getColumnIndex(FavMovieEntry.COLUMN_MOVIE_ID));\n mCurrentMovieUri = ContentUris.withAppendedId(FavMovieEntry.CONTENT_URI, currentIndex);\n } else {\n isFavorite = false;\n\n mCurrentMovieUri = null;\n }\n cursor.close();\n }\n\n return isFavorite;\n }", "private void populateFavoritesSections() {\n \tif (mUserProfile.userFavoriteAlbums != null && !Utils.isListEmpty(mUserProfile.userFavoriteAlbums.albums)) {\n \t\tmContainerFavoriteAlbums.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteAlbums userFavoriteAlbums = mUserProfile.userFavoriteAlbums;\n \t\tmTextFavoriteFavoriteAlbumsValue.setText(Integer.toString(userFavoriteAlbums.albumCount));\n \t\t\n \t\tStack<ImageView> favoriteAlbumsImages = new Stack<ImageView>();\n \t\tfavoriteAlbumsImages.add(mTextFavoriteFavoriteAlbum3);\n \t\tfavoriteAlbumsImages.add(mTextFavoriteFavoriteAlbum2);\n \t\tfavoriteAlbumsImages.add(mTextFavoriteFavoriteAlbum1);\n\n \t\tImageView albumImage = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoriteAlbums.albums) {\n \t\t\tif (favoriteAlbumsImages.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\talbumImage = favoriteAlbumsImages.pop();\n \t\t\t\n \t\t\t//mImageFetcher.loadImage(mediaItem.getImageUrl(), albumImage);\n \t\t\t\n \t\t\tPicasso.with(getActivity()).cancelRequest(albumImage);\n \t\t\tif(getActivity() != null && mediaItem.getImageUrl() != null){\n \t\t\t\tPicasso.with(getActivity()).load(mediaItem.getImageUrl()).into(albumImage);\t\n \t\t\t}\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoriteAlbums.setVisibility(View.GONE);\n \t}\n \t\n \t// populates the favorite songs.\n \tif (mUserProfile.userFavoriteSongs != null && !Utils.isListEmpty(mUserProfile.userFavoriteSongs.songs)) {\n \t\tmContainerFavoriteSongs.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteSongs userFavoriteSongs = mUserProfile.userFavoriteSongs;\n \t\tmTextFavoriteSongsValue.setText(Integer.toString(userFavoriteSongs.songsCount));\n \t\t\n \t\tStack<TextView> favoriteSongsNames = new Stack<TextView>();\n \t\tfavoriteSongsNames.add(mTextFavoriteSong3Name);\n \t\tfavoriteSongsNames.add(mTextFavoriteSong2Name);\n \t\tfavoriteSongsNames.add(mTextFavoriteSong1Name);\n\n \t\tTextView songName = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoriteSongs.songs) {\n \t\t\tif (favoriteSongsNames.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tsongName = favoriteSongsNames.pop();\n \t\t\tsongName.setText(mediaItem.getTitle());\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoriteSongs.setVisibility(View.GONE);\n \t}\n \t\n \t// populates the favorite playlists.\n \tif (mUserProfile.userFavoritePlaylists != null && !Utils.isListEmpty(mUserProfile.userFavoritePlaylists.playlists)) {\n \t\tmContainerFavoritePlaylists.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoritePlaylists userFavoritePlaylists = mUserProfile.userFavoritePlaylists;\n \t\tmTextFavoritePlaylistValue.setText(Integer.toString(userFavoritePlaylists.playlistCount));\n \t\t\n \t\tStack<TextView> favoritePlaylistsNames = new Stack<TextView>();\n \t\tfavoritePlaylistsNames.add(mTextFavoritePlaylist3Name);\n \t\tfavoritePlaylistsNames.add(mTextFavoritePlaylist2Name);\n \t\tfavoritePlaylistsNames.add(mTextFavoritePlaylist1Name);\n\n \t\tTextView playlistsName = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoritePlaylists.playlists) {\n \t\t\tif (favoritePlaylistsNames.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tplaylistsName = favoritePlaylistsNames.pop();\n \t\t\tplaylistsName.setText(mediaItem.getTitle());\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoritePlaylists.setVisibility(View.GONE);\n \t}\n \t\n \t// populates the favorite videos.\n \tif (mUserProfile.userFavoriteVideos != null && !Utils.isListEmpty(mUserProfile.userFavoriteVideos.videos)) {\n \t\tmContainerFavoriteVideos.setVisibility(View.VISIBLE);\n \t\t\n \t\tUserFavoriteVideos userFavoriteVideos = mUserProfile.userFavoriteVideos;\n \t\tmTextFavoriteVideosValue.setText(Integer.toString(userFavoriteVideos.videoCount));\n \t\t\n \t\tStack<ImageView> favoriteVideosImages = new Stack<ImageView>();\n \t\tfavoriteVideosImages.add(mTextFavoriteVideo3);\n \t\tfavoriteVideosImages.add(mTextFavoriteVideo2);\n \t\tfavoriteVideosImages.add(mTextFavoriteVideo1);\n\n \t\tImageView videoImage = null;\n \t\t\n \t\tfor (MediaItem mediaItem : userFavoriteVideos.videos) {\n \t\t\tif (favoriteVideosImages.isEmpty())\n \t\t\t\tbreak;\n \t\t\t\n \t\t\tvideoImage = favoriteVideosImages.pop();\n \t\t\t\n \t\t\t//mImageFetcher.loadImage(mediaItem.getImageUrl(), videoImage);\n \t\t\t\n \t\t\tPicasso.with(getActivity()).cancelRequest(videoImage);\n \t\t\tif(getActivity() != null && !TextUtils.isEmpty(mediaItem.getImageUrl())){\n \t\t\t\tPicasso.with(getActivity()).load(mediaItem.getImageUrl()).into(videoImage); \t\t\t\t\n \t\t\t}\n\t\t\t}\n \t\t\n \t} else {\n \t\tmContainerFavoriteVideos.setVisibility(View.GONE);\n \t}\n\t}", "public void setFavortieid(Integer favortieid) {\n this.favortieid = favortieid;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_fav) {\n FavoritesDataSource dataSource = new FavoritesDataSource(getBaseContext());\n dataSource.open();\n if(isFav){\n //remove from favorites\n dataSource.deleteFromFavorites(placeid);\n item.setIcon(R.drawable.ic_heart_outline_white);\n Toast.makeText(getBaseContext(),placeName+\" was removed from favorites\",Toast.LENGTH_SHORT).show();\n isFav = false;\n }else{\n //add to favorites\n Place place = new Place(placeid,placeName,address,true,picURL);\n dataSource.addToFavorites(place);\n item.setIcon(R.drawable.ic_heart_fill_white);\n Toast.makeText(getBaseContext(),placeName+\" was added to favorites\",Toast.LENGTH_SHORT).show();\n isFav = true;\n }\n dataSource.close();\n return true;\n }else if(id == R.id.action_share){\n //open twitter url\n String tweetParams = \"text=\"+ URLEncoder.encode(\"Check out \"+placeName+\" located at \"+address+\". Website \")+\"&url=\"+URLEncoder.encode(tweetURL)+\"&hashtags=TravelAndEntertainmentSearch\";\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://twitter.com/intent/tweet?\"+tweetParams));\n startActivity(browserIntent);\n return true;\n }else if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void saveFavorite(){\n //make sure movie is NOT already a favorite\n if(!mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is a new favorite, favorite movie list status has changed\n mFavoriteChanged = true;\n\n //set movie item favorite status as true\n mMovie.setFavorite(true);\n\n //save movie to favorite database table\n mMovieValet.saveFavorite(mMovie);\n\n //add movie to favorite movie list buffer\n mMovieStaff.addFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void drawFav(Recipe r, ImageView favIcon) {\n int imgFav;\n if (r.isFavorite()) {\n imgFav = getResources().getIdentifier(\"favstarylw\", \"drawable\", getPackageName());\n } else {\n imgFav = getResources().getIdentifier(\"favstargrey\", \"drawable\", getPackageName());\n }\n favIcon.setImageResource(imgFav);\n }", "public void setFavortiestate(String favortiestate) {\n this.favortiestate = favortiestate;\n }", "private void removeFromFavorites() {\n favoriteBool = false;\n preferencesConfig.writeRemoveFavoriteTip(shownTipIndex);\n Toast.makeText(getContext(), \"Removed from favorites\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_favorites) {\n if(gameFragment.isFavorites()) {\n item.setIcon(R.drawable.ic_favorite_border);\n gameFragment.filterFavorites(false);\n }\n else {\n item.setIcon(R.drawable.ic_favorite);\n gameFragment.filterFavorites(true);\n }\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@FXML\n private void chooseFavouritePhotoEvent() {\n if (!PhotoManager.getFavouriteList().isEmpty()) {\n User.setGalleryPhotos(PhotoManager.getFavouriteList());\n fadeOutEvent();\n }\n }", "private void initFaceTracker(boolean isFrontFacing) {\n if (faceDetector != null) {\n isReleased = true;\n faceDetector.release();\n }\n\n faceDetector = new FaceDetector.Builder(context).setTrackingEnabled(true)\n .setClassificationType(FaceDetector.ALL_CLASSIFICATIONS)\n //.setMode(gameManager.getCurrentGame() != null &&\n // gameManager.getCurrentGame().getId().equals(Game.GAME_COOL_CAMS)\n // ? FaceDetector.ACCURATE_MODE : FaceDetector.FAST_MODE)\n .setMode(FaceDetector.ACCURATE_MODE)\n .setProminentFaceOnly(isFrontFacing)\n .setMinFaceSize(isFrontFacing ? 0.35f : 0.15f)\n .build();\n\n isReleased = false;\n\n //Detector.Processor<Face> processor;\n //if (isFrontFacing) {\n // Tracker<Face> tracker = new TribeFaceTracker();\n // processor = new LargestFaceFocusingProcessor.Builder(faceDetector, tracker).build();\n //} else {\n // MultiProcessor.Factory<Face> factory = face -> new TribeFaceTracker();\n // processor = new MultiProcessor.Builder<>(factory).build();\n //}\n\n faceDetector.setProcessor(\n new LargestFaceFocusingProcessor.Builder(faceDetector, new TribeFaceTracker()).build());\n\n //faceDetector.setProcessor(processor);\n\n if (!faceDetector.isOperational()) {\n isFaceTrackerEnabled = false;\n }\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.stops_menu, menu);\r\n\r\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\r\n SearchView searchView = (android.support.v7.widget.SearchView) menu.findItem(R.id.action_search).getActionView();\r\n\r\n ComponentName cn = new ComponentName(this, SearchActivity.class);\r\n searchView.setSearchableInfo(searchManager.getSearchableInfo(cn));\r\n\r\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);\r\n Set<String> selections = sharedPrefs.getStringSet(\"favourties\", null);\r\n\r\n if (selections != null){\r\n for(String s: selections){\r\n Log.i(\"StopsActivity_prefs\", s);\r\n }\r\n }\r\n\r\n /* Check if route has been favourited, and color the star if needed*/\r\n if (route.contains (\"Route\"))\r\n route = route.replace (\"Route \", \"\");\r\n\r\n boolean fav = pref.getBoolean(route, false);\r\n Log.i(\"StopsActivity_Boolean\", \"Boolean is: \" + fav);\r\n\r\n if (fav == false){\r\n Drawable myIcon = getResources().getDrawable( R.drawable.ic_star_rate_white );\r\n ColorFilter filter = new LightingColorFilter( Color.BLACK, Color.LTGRAY);\r\n myIcon.setColorFilter(filter);\r\n }\r\n else{\r\n int hex = 0xFFFF66;\r\n\r\n Drawable myIcon = getResources().getDrawable( R.drawable.ic_star_rate_white );\r\n ColorFilter filter = new LightingColorFilter( Color.BLACK, hex);\r\n myIcon.setColorFilter(filter);\r\n }\r\n\r\n return true;\r\n }", "public int getNumOfFav() {\n return fullPhoto.getNumOfFav();\n }", "public boolean favouriteCurrentAccount()\n {\n if(accountInfo == null)\n {\n System.out.println(\"You need to generate an account before getting the details.\");\n return false;\n }\n return accountInfo.favouriteAccount();\n }", "public void onFavoriteChanged(MaterialFavoriteButton buttonView, boolean favorite);", "public void removeFavorite(){\n //check if movie is in the user favorite list\n if(mMovieStaff.alreadyFavorite(mMovie.getTMDBId())){\n //is in the favorite list, mark that list has changed\n mFavoriteChanged = true;\n\n //update movie item favorite status\n mMovie.setFavorite(false);\n\n //delete movie item from favorite database table\n mMovieValet.deleteFavorite(mMovie);\n\n //remove movie item from favorite movie list buffer\n mMovieStaff.removeFavorite(mMovie);\n }\n\n //check if movie list type is display a favorite list and if the device is a tablet\n if(mMovieType == PosterHelper.NAME_ID_FAVORITE && mIsTablet){\n //both yes, get favorite movies to update poster fragment\n getMovieList(PosterHelper.NAME_ID_FAVORITE);\n }\n }", "public void setFavorite(boolean favorite) {\n if (mFavorite != favorite) {\n mFavorite = favorite;\n // Avoid infinite recursions if setChecked() is called from a listener\n if (mBroadcasting) {\n return;\n }\n\n mBroadcasting = true;\n if (mOnFavoriteChangeListener != null) {\n mOnFavoriteChangeListener.onFavoriteChanged(this, mFavorite);\n }\n updateFavoriteButton(favorite);\n mBroadcasting = false;\n }\n }", "boolean isFavorite(int id);", "public void setFavoriteInRecyclerView(){\n favoriteViewModel = new ViewModelProvider(requireActivity(), AoE2DecencyInjector.getViewModelFactory()).get(FavoriteViewModel.class);\n favoriteViewModel.getFavoritesCivilizations().observe(getViewLifecycleOwner(), new Observer<List<CivilizationFavoriteItemViewModel>>() {\n @Override\n public void onChanged(List<CivilizationFavoriteItemViewModel> civilizationFavoriteItemViewModels) {\n civilizationFavoriteAdapter.setListItemViewModels(civilizationFavoriteItemViewModels);\n }\n });\n\n favoriteViewModel.getCivAdd().observe(getViewLifecycleOwner(), new Observer<Event<String>>() {\n @Override\n public void onChanged(Event<String> stringEvent) {\n //Do nothing\n }\n });\n\n favoriteViewModel.getCivRem().observe(getViewLifecycleOwner(), new Observer<Event<String>>() {\n @Override\n public void onChanged(Event<String> stringEvent) {\n //Do nothing\n }\n });\n }", "private void updateFavoriteButtons() {\n new AsyncTask<Void, Void, Boolean>() {\n\n @Override\n protected Boolean doInBackground(Void... params) {\n return isFavorite();\n }\n\n @Override\n protected void onPostExecute(Boolean isFavorite) {\n if (isFavorite) {\n mButtonRemoveFavorites.setVisibility(View.VISIBLE);\n mButtonMarkAsFavorite.setVisibility(View.GONE);\n } else {\n mButtonMarkAsFavorite.setVisibility(View.VISIBLE);\n mButtonRemoveFavorites.setVisibility(View.GONE);\n }\n }\n }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);\n\n mButtonMarkAsFavorite.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n markAsFavorite();\n }\n });\n\n mButtonRemoveFavorites.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n removeFromFavorites();\n }\n });\n }", "boolean hasFavicon();", "@Override\n\tpublic void onFavorite(User source, User target, Status favoritedStatus) {\n\n\t}", "@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.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public final void resetFavorites() {\n Favorites favorites = Favorites.INSTANCE;\n favorites.clear();\n favorites.load(this.persistenceWrapper.readFavorites());\n }", "public void toggleFavorite() {\n setFavorite(!mFavorite);\n }", "@Override\n\tpublic void setFavorite(boolean value) {\n\t\tthis.isFavorite = value;\n\t}", "void setProjectFavourite(int accountId, int projectId, boolean favourite);", "public void addToFavorites() {\n\n // Create new content values object\n ContentValues contentValues = new ContentValues();\n\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ID, sMovie.getMovieId());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_TITLE, sMovie.getMovieTitle());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_ORIGINAL_TITLE, sMovie.getMovieOriginalTitle());\n contentValues.put(FavMovieEntry.COLUMN_POSTER_PATH, sMovie.getPoster());\n contentValues.put(FavMovieEntry.COLUMN_BACKDROP_PATH, sMovie.getMovieBackdrop());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RELEASE_DATE, sMovie.getReleaseDate());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_RATING, sMovie.getVoteAverage());\n contentValues.put(FavMovieEntry.COLUMN_MOVIE_SYNOPSIS, sMovie.getPlotSynopsis());\n\n try {\n mCurrentMovieUri = getContentResolver().insert(FavMovieEntry.CONTENT_URI,\n contentValues);\n } catch (IllegalArgumentException e) {\n mCurrentMovieUri = null;\n Log.v(LOG_TAG, e.toString());\n }\n\n if (mCurrentMovieUri != null) {\n isAddedToFavorites();\n }\n\n }", "@Subscribe\n public void onFavoriteNeighbour(FavoriteNeighbourEvent event) {\n initFavoriteButtonUI();\n }", "public void toggleFavorite() {\n\t\tsynchronized (this) {\n\t\t\tif (mFavoritesCache != null) {\n\t\t\t\tmFavoritesCache.toggleSong(getAudioId(), getTrackHost(),\n\t\t\t\t\t\tgetTrackName(), getAlbumName(), getArtistName());\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n\n if (favorited) {\n unFavorite(mangaID, user);\n } else {\n favorite(mangaID, mangaDetails.getTitle(), user);\n }\n\n }", "@Override\n\t\tpublic void onFavorite(User arg0, User arg1, Status arg2) {\n\t\t\t\n\t\t}", "@Override\n\tpublic void addFavorit(FavorisImpl newfavorit) {\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_place_details, menu);\n MenuItem item = menu.findItem(R.id.action_fav);\n if (isFav)\n item.setIcon(R.drawable.ic_heart_fill_white);\n return true;\n }", "@Override\n public void onFavoriteDatabaseChanged() {\n //setCategoryCount(FileCategory.Favorite, mFavoriteList.getCount());\n }", "private void getFavData() {\n favouriteViewModel.getFavouritePostData().observe(this, result -> {\n if (result != null) {\n if (result.status == Status.SUCCESS) {\n if (this.getActivity() != null) {\n Utils.psLog(result.status.toString());\n favouriteViewModel.setLoadingState(false);\n itemViewModel.setItemDetailObj(itemViewModel.itemId, itemViewModel.historyFlag, loginUserId);\n }\n\n } else if (result.status == Status.ERROR) {\n if (this.getActivity() != null) {\n Utils.psLog(result.status.toString());\n favouriteViewModel.setLoadingState(false);\n }\n }\n }\n });\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n menu.getItem(0).setIcon(gameFragment.isFavorites()? R.drawable.ic_favorite: R.drawable.ic_favorite_border);\n\n return true;\n }", "private static Achievement createFavoriteAchievement(){\n\n ArrayList<String> picturesPaths = new ArrayList<>();\n picturesPaths.add(\"favorite_none\");\n picturesPaths.add(\"favorite_bronze\");\n picturesPaths.add(\"favorite_silver\");\n picturesPaths.add(\"favorite_diamond\");\n\n ArrayList<String> picturesLabels = new ArrayList<>();\n picturesLabels.add(\"No favorite\");\n picturesLabels.add(\"Curious Chef\");\n picturesLabels.add(\"Local Chef\");\n picturesLabels.add(\"Library Chef\");\n\n ArrayList<Integer> levelSteps = new ArrayList<>();\n levelSteps.add(1);\n levelSteps.add(10);\n levelSteps.add(50);\n\n Function<User, Integer> getUserNbFavorites = u -> u.getFavourites().size();\n\n return new Achievement(\"favorite\", STANDARD_NB_LEVELS, picturesPaths, picturesLabels, levelSteps, getUserNbFavorites);\n }", "public boolean isSetCurrentChannelFavorite() {\n\t\tTVChannel mTVChannel = mTvChannelSelector.getCurrentChannel();\n\t\treturn isSetChannelFavorite(mTVChannel);\n\t}", "public void onFavButtonClicked(View view) {\n isFav = !isFav;\n toggleButtonText(isFav);\n \n // Update DB\n new OperateWithDBMovieAsyncTask().execute(isFav ? ADD_MOVIE : REMOVE_MOVIE);\n }", "@Override\r\n public void onFavoriteClicked() {\r\n fragFav = new FragmentFavoritesList();\r\n FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();\r\n // Replace whatever is in the fragment_container view with this fragment,\r\n // and add the transaction to the back stack so the user can navigate back\r\n if (getResources().getBoolean(R.bool.isTablet)) {\r\n transaction.add(R.id.listFrag_tab,fragFav, \"FragmentFavoritesList\");\r\n }else {\r\n transaction.add(R.id.activity_main_smart, fragFav, \"FragmentFavoritesList\");\r\n }\r\n transaction.addToBackStack(null);\r\n // Commit the transaction\r\n transaction.commit();\r\n }", "public void setFavSite(final String favSite){\n\t\tthis.favSite = favSite;\n\t}", "FavoriteQuestions() {\n list = SharedPrefs.getFavList();\n }", "public static boolean checkForFavorite(Context context,String id){\n Set<String> setSavedFav = getAllFavorites(context);\n if(setSavedFav!=null){\n Log.v(TAG,\"SAVED ID: \"+setSavedFav);\n if(setSavedFav.contains(id))\n return true;\n }\n return false;\n }", "private void deleteIcons() {\n Uri uri = DatabaseMap.PlaceEntry\n .buildPlaceByFavoriteUri(getResources().getInteger(R.integer.favorite_add));\n String[] projection = {DatabaseMap.PlaceEntry.PLACE_ICON_FILE_NAME};\n Cursor cursor = getContentResolver().query(uri, projection, null, null, null);\n ArrayList<String> favoritesIcons = new ArrayList<String>();\n\n while (cursor.moveToNext()) {\n favoritesIcons.add(cursor.getString(cursor.getColumnIndex(DatabaseMap.PlaceEntry.PLACE_ICON_FILE_NAME)));\n }\n\n String[] files = fileList();\n for (String fileName : files) {\n if (!favoritesIcons.contains(fileName))\n deleteFile(fileName);\n }\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t\tif(item.reward.getReward_favorite()==0)\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(1);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.orange_star);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\titem.reward.setReward_favorite(0);\n\t\t\t\t\t\timgFavorite.setImageResource(R.drawable.black_star);\n\t\t\t\t\t}\n\t\t\t\t}", "public void onLoadMenuMyFavoritesSelected();", "@Override\n public boolean setUiBeforShow() {\n Log.e(\" ##IS_FAV\", isFavourite + \"\");\n\n if(isFavourite) {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.yellow));\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.yellow), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n } else {\n txtAddToFavorite.setTextColor(context.getResources().getColor(R.color.white));\n\n Drawable[] drawables = txtAddToFavorite.getCompoundDrawables();\n Drawable leftDrawable = drawables[0];\n\n leftDrawable.setColorFilter(new PorterDuffColorFilter(context.getResources().getColor(R.color.white), PorterDuff.Mode.MULTIPLY));\n txtAddToFavorite.setCompoundDrawables(leftDrawable, null, null, null);\n }\n\n\n\n imgCancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dismiss();\n }\n });\n\n txtRename.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _renameClick.onRenameOptionClick(pos, \"\");\n dismiss();\n }\n });\n\n txtAddToFavorite.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _favoriteClick.onFavoriteOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScene.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addToSceneClick.onAddToSceneOptionClick(pos);\n dismiss();\n }\n });\n\n txtAddToScheduler.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n _addSchedulerClick.onAddSchedulerOptionClick(pos);\n dismiss();\n }\n });\n\n return true;\n }", "@Override\n public void onBindViewHolder(final HomeSuggestionsViewHolder holder, final int position) {\n if (multimediaList != null) {\n\n if (multimediaList.get(position).getAvatar() != null) {\n /*Glide.with(context).load(multimediaList.get(position).getAvatar())\n .apply(RequestOptions.centerCropTransform()).into(holder.suggestionImage);*/\n }\n if (multimediaList.get(position).getName() != null) {\n holder.suggestionTitle.setText(multimediaList.get(position).getName());\n }\n if(multimediaList.get(position).getIsRead()>-1){\n if(multimediaList.get(position).getIsRead()==0){\n holder.seenbutton.setImageDrawable(context.getApplicationContext().getResources().getDrawable(R.drawable.ic_visibility_off_black_24dp));\n }\n if(multimediaList.get(position).getIsRead()==1){\n holder.seenbutton.setImageDrawable(context.getApplicationContext().getResources().getDrawable(R.drawable.ic_visibility_black_24dp));\n }\n }\n\n if(multimediaList.get(position).getIsFavorite()>-1){\n if(multimediaList.get(position).getIsFavorite()==0){\n holder.favbutton.setImageDrawable(context.getApplicationContext().getResources().getDrawable(R.drawable.ic_star_border_black_24dp));\n }\n if(multimediaList.get(position).getIsFavorite()==1){\n holder.favbutton.setImageDrawable(context.getApplicationContext().getResources().getDrawable(R.drawable.ic_star_black_24dp));\n }\n }\n\n\n\n holder.seenbutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (multimediaList.get(position).getIsRead()==0) {\n multimediaList.get(position).setIsRead(1);\n holder.seenbutton.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_visibility_black_24dp));\n\n\n } else {\n multimediaList.get(position).setIsRead(0);\n holder.seenbutton.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_visibility_off_black_24dp));\n }\n }\n });\n holder.favbutton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (multimediaList.get(position).getIsFavorite()==0) {\n multimediaList.get(position).setIsFavorite(1);\n holder.favbutton.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_star_black_24dp));\n\n\n } else {\n multimediaList.get(position).setIsFavorite(0);\n holder.favbutton.setImageDrawable(context.getResources().getDrawable(R.drawable.ic_star_border_black_24dp));\n }\n\n }\n });\n holder.suggestionImage.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if(multimediaList.get(position).getId_multimedia_type().equals(\"pelicula\"));\n// Fragment fragment = new FragmentoDeInfo();\n// Bundle bundle = new Bundle();\n// bundle.putString(\"id\", multimediaList.get(position).getId());\n// bundle.putString(\"name\", multimediaList.get(position).getName());\n// bundle.putString(\"description\", multimediaList.get(position).getDescription());\n// bundle.putString(\"genero\", multimediaList.get(position).getIdGenero());\n// bundle.putString(\"anio\", multimediaList.get(position).getAnio());\n// bundle.putString(\"multimediatype\", multimediaList.get(position).getId_multimedia_type());\n// bundle.putInt(\"favorite\", multimediaList.get(position).getIsFavorite());\n// bundle.putInt(\"read\", multimediaList.get(position).getIsRead());\n// bundle.putSerializable(\"coverimage\", multimediaList.get(position).getAvatar());\n// fragment.setArguments(bundle);\n// FragmentTransaction transaction = ((FragmentActivity) context).getSupportFragmentManager().beginTransaction();\n// transaction.replace(R.id.fragment_home, fragment).commit();\n// transaction.addToBackStack(null);\n\n }\n });\n// }\n }\n\n }", "@Override\n public void onBindViewHolder(final ViewHolder holder, int position) {\n final JSONObject js = mData.get(position);\n\n if(mData.isEmpty())\n {\n Log.d(TAG, \"onBindViewHolder: \");\n ((PlacesActivity)context).checkEmpty();\n }\n\n String place_name = null;\n String placeIcon = null;\n String vicinity = null;\n //final String placeid= null;\n try {\n place_name = js.get(\"name\").toString();\n vicinity = js.getString(\"vicinity\");\n placeIcon= js.get(\"icon\").toString();\n String placeid= js.get(\"place_id\").toString();\n if(myprefs.contains(placeid))\n {\n holder.myPlaceFav.setImageResource(R.drawable.ic_resfav);\n holder.myPlaceFav.setTag(1);\n }\n else\n holder.myPlaceFav.setTag(0);\n //placeid = js.get(\"place_id\").toString();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n\n holder.myTextView.setText(place_name);\n holder.myAdr.setText(vicinity);\n Picasso.get().load(placeIcon).into(holder.myPlaceIcon);\n\n\n\n holder.myPlaceFav.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String placeid = null;\n String placename = \"\";\n //boolean flag= false;\n try{\n placeid= js.get(\"place_id\").toString();\n placename= js.get(\"name\").toString();\n }\n catch (JSONException e)\n {\n e.printStackTrace();\n }\n if(Integer.parseInt(holder.myPlaceFav.getTag().toString())==0)\n {\n\n SharedPreferences.Editor editor = myprefs.edit();\n\n editor.putString(placeid,js.toString());\n editor.commit();\n holder.myPlaceFav.setImageResource(R.drawable.ic_resfav);\n holder.myPlaceFav.setTag(1);\n toastMessage(placename+\" added to favorites\");\n\n\n\n\n }\n else\n {\n SharedPreferences.Editor editor = myprefs.edit();\n editor.remove(placeid);\n editor.commit();\n holder.myPlaceFav.setImageResource(R.drawable.ic_resnofav);\n holder.myPlaceFav.setTag(0);\n toastMessage(placename+\" removed from favorites\");\n\n\n }\n\n }\n }\n );\n\n\n //Picasso.get().load(R.drawable.ic_search).into(holder.myPlaceFav);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tSharedPreferences pres = this.getSharedPreferences(\"parameters\",\r\n\t\t\t\tContext.MODE_PRIVATE);\r\n\t\tString sina_access_token = pres.getString(\"sina_access_token\", \"\");\r\n\t\tString sina_access_secret = pres.getString(\"sina_access_secret\", \"\");\r\n\t\tIntent intent = getIntent();\r\n\t\tString weiBoID = intent.getStringExtra(\"weiBoID\");\r\n\r\n\t\t// http://api.t.sina.com.cn/favorites/create.json\r\n\t\turl = \"http://api.t.sina.com.cn/favorites/create.json\";\r\n//\t\tOauthUtils.getInstance().initSinaData();\r\n//\t\tjsonData = new Weibo().addfavorite(url, httpMethod, sina_access_token,\r\n//\t\t\t\tsina_access_secret, weiBoID, null);\r\n\t\ttry {\r\n\t\t\tjsonObj = new JSONObject(jsonData);\r\n\t\t} catch (JSONException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tif (jsonObj.getString(\"id\").equals(weiBoID)) {\r\n\t\t\t\tsign = \"收藏成功!\";\r\n\t\t\t} else {\r\n\t\t\t\tsign = \"收藏失败!\";\r\n\t\t\t}\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tToast.makeText(FavoriteListActivity.this, sign, Toast.LENGTH_SHORT).show();\r\n\t\tfinish();\r\n\r\n\t}", "private void addChannelToFavorites(String channel) {\r\n channel = prepareChannel(channel);\r\n if (channel != null) {\r\n settings.setAdd(FAVORITES_SETTING, channel);\r\n }\r\n }", "public void m7904a(boolean favorite) {\n this.f6695h = favorite;\n }", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tif (item.isFavorite()) {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite_off);\n\t\t\t\t\t\titem.setFavorite(false);\n\t\t\t\t\t\tpref.setString(item.getFileName(), false);\n\t\t\t\t\t\tif (!inRingtones) {\n\t\t\t\t\t\t\tIntent broadcast = new Intent();\n\t\t\t\t\t\t\tbroadcast.setAction(\"REMOVE_SONG\");\n\t\t\t\t\t\t\tcontext.sendBroadcast(broadcast);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tholder.btnFavorite\n\t\t\t\t\t\t\t\t.setBackgroundResource(R.drawable.icon_favorite);\n\t\t\t\t\t\titem.setFavorite(true);\n\t\t\t\t\t\tpref.setString(item.getFileName(), true);\n\t\t\t\t\t}\n\t\t\t\t}", "private void setUpFavoriteMovieButton () {\n MovieDetailsViewModelFactory factory = new MovieDetailsViewModelFactory (mDb, movie.getMovieId());\n final MovieDetailsViewModel viewModel = ViewModelProviders.of(this, factory).get(MovieDetailsViewModel.class);\n\n // Observe the LiveData object in the ViewModel. Use it also when removing the observer\n viewModel.getMovie().observe(this, new Observer<Movie>() {\n @Override\n public void onChanged(@Nullable Movie dbMovie) {\n viewModel.getMovie().removeObserver(this);\n\n if (dbMovie == null) {\n favoriteMoviesButton.setChecked (false);\n } else if ((movie.getMovieId() == dbMovie.getMovieId()) && !favoriteMoviesButton.isChecked ()){\n favoriteMoviesButton.setChecked (true);\n } else {\n favoriteMoviesButton.setChecked (false);\n }\n }\n });\n }", "public void initialize(User userToView, User currentUser) {\r\n\t\tthis.currentUser = currentUser;\r\n\t\tthis.userToView = userToView;\r\n\t\tuserLabel.setText(userToView.getUserName() + \"'s Profile\");\r\n\t\tif(currentUser.isFavourite(userToView.getUserID())) {\r\n\t\t\tfavouriteButton.setText(\"Unfavourite\");\r\n\t\t\tfavourited = true;\r\n\t\t} else {\r\n\t\t\tfavouriteButton.setText(\"Favourite\");\r\n\t\t\tfavourited = false;\r\n\t\t}\r\n\t\tInputStream stream = getClass().getResourceAsStream(userToView.getAvatarPath());\r\n\t\tImage newImage = new Image(stream);\r\n\t\tprofileImage.setImage(newImage);\r\n\t}", "private void initFbIcon(ReadOnlyPerson person, IconImage image) {\n facebookPage.setGraphic(new ImageView(image.getFbicon()));\n facebookPage.setVisible(!person.getFacebook().value.equals(\"\"));\n }", "public void setFavorite(int favorite) throws Exception {\n if (favorite == 0) {mFavorite = false;}\n else if (favorite == 1) {mFavorite = true;}\n else {throw new Exception(\"Error: Cannot resolve movie 'favorite' \");}\n }", "public AfficherFavorits() {\r\n \r\n initComponents();\r\n \r\n }", "private void init(Context context, AttributeSet attrs) {\n mButtonSize = Utils.dpToPx(48, getResources());\n mPadding = Utils.dpToPx(DEFAULT_PADDING, getResources());\n mFavorite = DEFAULT_FAVORITE;\n mAnimateFavorite = DEFAULT_ANIMATE_FAVORITE;\n mAnimateUnfavorite = DEFAULT_ANIMATE_UNFAVORITE;\n mFavoriteResource = FAVORITE_STAR_BLACK;\n mNotFavoriteResource = FAVORITE_STAR_BORDER_BLACK;\n mRotationDuration = DEFAULT_ROTATION_DURATION;\n mRotationAngle = DEFAULT_ROTATION_ANGLE;\n mBounceDuration = DEFAULT_BOUNCE_DURATION;\n mColor = STYLE_BLACK;\n mType = STYLE_STAR;\n if (!isInEditMode()) {\n if (attrs != null) {\n initAttributes(context, attrs);\n }\n setOnClickListener(new OnClickListener() {\n @Override public void onClick(View v) {\n toggleFavorite();\n }\n });\n }\n if (mFavorite) {\n setImageResource(mFavoriteResource);\n } else {\n setImageResource(mNotFavoriteResource);\n }\n setPadding(mPadding, mPadding, mPadding, mPadding);\n }", "public boolean favouriteAccount(String apiToken, String accountToken)\n {\n accountUtils = new AccountUtils(apiToken);\n return accountUtils.favouriteAccount(accountToken, apiToken);\n }", "@Override\n public void onBindViewHolder(ViewHolderFav viewHolder, final int position) {\n Log.d(\"BarkeeperApp\", \"Element \" + position + \" set.\");\n\n // Get element from your dataset at this position and replace the contents of the view\n // with that element\n viewHolder.getTextView().setText(mDataSet[position]);\n\n Cocktail c = getRightCocktail(mDataSet[position]);\n\n this.map_View_Favs.put(viewHolder.itemView, c);\n\n ImageView imageView = (ImageView) viewHolder.itemView.findViewById(R.id.imageview_listitem);\n if (c.getIsFavourite()){\n imageView.setImageResource(R.drawable.icons8starfilled96);\n imageView.setVisibility(View.VISIBLE);\n }\n }", "private void setupFavoritesListView() {\n ListView listFavorites = (ListView) findViewById(R.id.list_favorites);\n try{\n PlayerDatabaseHelper PlayerDatabaseHelper = new PlayerDatabaseHelper(this);\n db = PlayerDatabaseHelper.getReadableDatabase();\n\n favoritesCursor = db.rawQuery(\"WITH sel_Players(P_id) As (Select player_id FROM SELECTION, USER WHERE NAME = ? AND _id = user_id) SELECT _id, NAME FROM PLAYER, sel_Players WHERE P_id = _id\", new String[] {User.getUName()});\n\n CursorAdapter favoriteAdapter =\n new SimpleCursorAdapter(TopLevelActivity.this,\n android.R.layout.simple_list_item_1,\n favoritesCursor,\n new String[]{\"NAME\"},\n new int[]{android.R.id.text1}, 0);\n listFavorites.setAdapter(favoriteAdapter);\n db.close();\n } catch(SQLiteException e) {\n Toast toast = Toast.makeText(this, \"Database unavailable\", Toast.LENGTH_SHORT);\n toast.show();\n }\n\n listFavorites.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> listView, View v, int position, long id) {\n Intent intent = new Intent(TopLevelActivity.this, forward.class);\n intent.putExtra(forward.EXTRA_PLAYERID, (int)id);\n startActivity(intent);\n }\n });\n }", "private Cursor loadFavorites() {\n PermissionUtils.checkPermissionsGranted(getContext(), new String[]{READ_CONTACTS}, true);\n String selection = ContactsCursorLoader.COLUMN_STARRED + \" = 1\";\n return getContext().getContentResolver().query(\n buildFavoritesUri(),\n getProjection(),\n selection,\n null,\n getSortOrder());\n }", "public void changeFavorite(boolean a) {\r\n favorite = a;\r\n }", "public void onClicked() {\n mypreference = PreferenceManager.getDefaultSharedPreferences(getContext());\n SharedPreferences.Editor editorpref = mypreference.edit();\n Gson gson = new Gson();\n //retrieve the stored ArrayList of fovorite movies as json format\n String storedJsonList = mypreference.getString(\"storedjsonList\", \"\");\n // get the type of this json format\n Type type = new TypeToken<ArrayList<ItemsClass>>() {\n }.getType();\n ArrayList<ItemsClass> movieArrayList = new ArrayList<ItemsClass>();\n //create array list of the retrieved json\n // store it in my Arraylist\n movieArrayList = gson.fromJson(storedJsonList, type);\n\n// favo.setSelected(va[0]);\n ischecked = va[0];\n if (va[0] == true) {\n\n if (movieArrayList == null) {\n\n favoImageButton.setImageResource(R.drawable.liked);\n\n String loadedPosterString = encodeTobase64(theposterImage);\n\n\n serItems.add(new ItemsClass(loadedPosterString, title, releaseDate, overview, rate, id));\n\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id + \"and you list size is\" + serItems.size(), Toast.LENGTH_SHORT).show();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n\n } else if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n int detectId = serItems.get(i).getId();\n if (serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you already have this movie in favorite list \", Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.liked);\n break;\n } else if (serItems.size() > 0 && detectId != id && i < serItems.size() - 1) {\n\n continue;\n\n } else if (detectId != id && i == serItems.size() - 1 && i > serItems.size() - 2) {\n Toast.makeText(getContext(), \"you have favo this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n serItems.add(new ItemsClass(storedPoster, title, releaseDate, overview, rate, id));\n serItems.size();\n //convert all the arraylist with the old and new Items to Json format\n String jsonList = gson.toJson(serItems);\n //save to sharedPreference\n editorpref.putString(\"storedjsonList\", jsonList);\n editorpref.commit();\n va[0] = !va[0];\n break;\n }\n\n }\n }\n\n } else {\n if (movieArrayList != null) {\n serItems = movieArrayList;\n for (int i = 0; i < serItems.size(); i++) {\n\n int detectId = serItems.get(i).getId();\n if (i < serItems.size() && serItems.size() > 0 && detectId == id) {\n Toast.makeText(getContext(), \"you have deleted this movie this movie with id of \" + id, Toast.LENGTH_SHORT).show();\n favoImageButton.setImageResource(R.drawable.like);\n mypreference = getContext().getSharedPreferences(\"moviepref\", Context.MODE_PRIVATE);\n editorpref.putString(\"storedPoster\", \"\");\n editorpref.putString(\"storedTitle\", \"\");\n editorpref.putString(\"storedOverview\", \"\");\n editorpref.putString(\"storedDate\", \"\");\n editorpref.putFloat(\"storedrating\", (float) 0.0);\n editorpref.commit();\n va[0] = !va[0];\n//\n break;\n } else if (detectId != id && i < serItems.size() - 1) {\n continue;\n } else if (detectId == id && i == serItems.size() - 1) {\n Toast.makeText(getContext(), \" actually you don't have this movie in your favorite list \", Toast.LENGTH_SHORT).show();\n }\n\n }\n }\n }\n }", "@RequestMapping(\"/favorites\")\n public String favorites(Model model) {\n // TODO: Get list of all GIFs marked as favorite\n List<Gif> faves = new ArrayList<>();\n\n model.addAttribute(\"gifs\", faves);\n model.addAttribute(\"username\", \"Chris Ramacciotti\"); // Static username\n return \"gif/favorites\";\n }", "@SuppressWarnings(\"unchecked\")\n\tprotected void updateSessionFavorites(SMTSession session, PageViewVO fav, boolean isDelete) {\n\t\t// get the Favs map off of the session.\n\t\tMap<String,List<PageViewVO>> favMap = (Map<String,List<PageViewVO>>)session.getAttribute(MyFavoritesAction.MY_FAVORITES);\n\t\tList<PageViewVO> favs = favMap.get(fav.getReferenceCode());\n\t\tif (favs == null) favs = new ArrayList<>();\n\t\tif (isDelete) {\n\t\t\t// remove fav\n\t\t\tremoveFromSession(favs, fav.getPageId());\n\t\t} else {\n\t\t\t// add fav\n\t\t\tfavs.add(fav);\n\t\t}\n\t\t// replace the favs map on the session.\n\t\tsession.setAttribute(MyFavoritesAction.MY_FAVORITES, favMap);\n\t}", "public void setFavTitle(final String favTitle){\n\t\tthis.favTitle = favTitle;\n\t}", "public CF_ViewHolder(View itemView) {\n super(itemView);\n name = itemView.findViewById(R.id.name);\n likes = itemView.findViewById(R.id.likes);\n\n LL = itemView.findViewById(R.id.LL);\n\n C1 = itemView.findViewById(R.id.color1);\n C2 = itemView.findViewById(R.id.color2);\n C3 = itemView.findViewById(R.id.color3);\n\n fav = itemView.findViewById(R.id.fav);\n pallteby = itemView.findViewById(R.id.plateby);\n\n// fav.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// if (!loved) {\n// String token;\n// SharedPreferences prefs = context.getSharedPreferences(Config.MY_PREFS_NAME, MODE_PRIVATE);\n// token = prefs.getString(\"token\", null);\n//\n// if (token == null) { //if user is signed in only then make him like the product\n// Toast.makeText(context, \"You need to sign in.\", Toast.LENGTH_SHORT).show();\n//\n// } else {\n// fav.setImageResource(context.getResources().getIdentifier(R.mipmap.favorite_selected + \"\", \"drawable\", context.getPackageName()));\n// loved = true;\n// loveCall(\"loved\", PID);\n// }\n//\n//\n// }\n// if (loved) {\n// fav.setImageResource(R.mipmap.top_favourite);\n// loved = false;\n// loveCall(\"not_loved\", PID);\n// }\n// }\n// });\n\n }", "public void setupFavoriteContactCard() {\n if (mRemovalDialogue != null) {\n mRemovalDialogue.setVisibility(GONE);\n mRemovalDialogue.setAlpha(0.f);\n }\n mFavoriteContactCard.setAlpha(1.0f);\n mFavoriteContactCard.setTranslationX(0.f);\n }", "@SmallTest\n\tpublic void testFavoriteToggleButton() {\n\t\tassertNotNull(\"Favorite button not allowed to be null\", mFavButton);\n\t\tassertTrue(\"Favorite toggle button should not be checked\", !mFavButton.isChecked());\n\t}" ]
[ "0.7267459", "0.7104111", "0.6746408", "0.673133", "0.6561797", "0.6528038", "0.64450735", "0.6290142", "0.6235763", "0.6209432", "0.61167514", "0.60265166", "0.60265166", "0.6019936", "0.6010999", "0.6000573", "0.59876174", "0.5939797", "0.59284246", "0.59034956", "0.58832085", "0.58507687", "0.5845194", "0.5831077", "0.5798289", "0.5779551", "0.5777778", "0.57522506", "0.572893", "0.57235444", "0.57216716", "0.57118493", "0.5670342", "0.56520075", "0.5641933", "0.5639571", "0.5604517", "0.56026155", "0.55955905", "0.55945396", "0.55722684", "0.5538148", "0.5517845", "0.5467474", "0.5467412", "0.54645383", "0.5457804", "0.5456831", "0.5440552", "0.5435719", "0.5430896", "0.5415892", "0.540934", "0.5407741", "0.54013675", "0.54002976", "0.5400049", "0.5393296", "0.53837574", "0.5376118", "0.536901", "0.5357553", "0.5354212", "0.53415614", "0.53046066", "0.53042054", "0.52985185", "0.52980757", "0.5296013", "0.52864367", "0.52850777", "0.5282231", "0.5267934", "0.5264045", "0.5237557", "0.5236137", "0.5222966", "0.52087367", "0.5197215", "0.5196663", "0.51964796", "0.51941556", "0.5193644", "0.51857245", "0.5179474", "0.51784116", "0.5166", "0.51492614", "0.513896", "0.5131301", "0.51064414", "0.510538", "0.50832576", "0.5071769", "0.506759", "0.50643146", "0.5062801", "0.506118", "0.5052361", "0.50466245" ]
0.8131646
0
Used to make sure a user cant open multiple views of the same type by tapping a button.
public boolean canProceedWithTapAction() { return ClickDelayHelper.canProceedWithTapAction(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void buttonClick(ClickEvent event) {\r\n\t\tString buttonId = event.getButton().getId();\r\n\t\t\r\n\t\tswitch(buttonId) {\r\n\t\t\r\n\t\t//opens the mainView if the user clicks the gefühlslage button\r\n\t\tcase \"gefuehlslage\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.MAIN_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the diaryView if the user clicks the diary button \r\n\t\tcase \"diary\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.DIARY_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the reportView if the user clicks the report button \r\n\t\tcase \"report\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.REPORT_VIEW);\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t//opens the reminderView if the user clicks the reminder button\t\r\n\t\tcase \"reminder\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.REMINDER_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the medInfoView if the user clicks the medication information button \r\n\t\tcase \"medInfo\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.MEDICATION_INFORMATION_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the depErkView if the user clicks the definition depression button \r\n\t\tcase \"depErk\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.DEFINITION_DEPRESSION_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the settingsView if the user clicks the settings button \r\n\t\tcase \"settings\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.SETTINGS_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the sosView if the user clicks the sos button\r\n\t\tcase \"sos\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.SOS_VIEW);\r\n\t\t break;\r\n\t\t \r\n\t\t//opens the chatView if the user clicks the chat button \r\n\t\tcase \"chat\":\r\n\t\t\tmenuView.getUI().getNavigator().navigateTo(Views.CHAT_VIEW);\r\n\t\t break;\r\n\t\t}\r\n\t}", "@Override\n public void onClick(View view) {\n\n openMain3Activity();\n }", "@Override\n public void onClick(View view) {\n Button trykket = null;\n for (int i = 0; i < 30 ; i++) {\n if (view==buttons.get(i)){\n trykket=buttons.get(i);\n }\n }\n assert trykket != null;\n gæt(trykket);\n\n //vi afslutter spiller hvis det er slut eller vundet.\n if(logik.erSpilletSlut()){\n if(logik.erSpilletTabt()){\n // die.start();\n slutspilllet(false);\n }\n if(logik.erSpilletVundet()) slutspilllet(true);\n }\n\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tclickMulti();\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n\n case R.id.app_1_button:\n mPresenter.openSpotifyStreamerApp();\n break;\n\n case R.id.app_2_button:\n mPresenter.openScoresApp();\n break;\n\n case R.id.app_3_button:\n mPresenter.openLibraryApp();\n break;\n\n case R.id.app_4_button:\n mPresenter.openBuildItBiggerApp();\n break;\n\n case R.id.app_5_button:\n mPresenter.openXyzReaderApp();\n break;\n\n case R.id.app_6_button:\n mPresenter.openCapstoneApp();\n break;\n }\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n\n case R.id.login_tab:\n if (!isLoginLayoutVisible) {\n showLoginLayout();\n }\n break;\n\n case R.id.register_tab:\n\n if (isLoginLayoutVisible) {\n showRegisterlayout();\n }\n break;\n\n case R.id.btn_login:\n checkValidation();\n break;\n\n case R.id.btn_male:\n checkValidationSignup(\"1\");\n break;\n\n case R.id.btn_female:\n checkValidationSignup(\"2\");\n break;\n\n default:\n break;\n }\n\n }", "@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 }", "boolean hasClickView();", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tswitch (v.getId()) {\n\t\t\tcase R.id.mywallet_button: {\n\t\t\t\tIntent intent = new Intent(context, MyWalletActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.my_imageview_shezhi: {\n\t\t\t\tIntent intent = new Intent(context, ST_mainActivity.class);\n\t\t\t\tstartActivityForResult(intent, 3);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.my_toLogintextView1: {\n\t\t\t\tif (isLogin) {\n\t\t\t\t\tIntent intent = new Intent(context, Wdjl_activity.class);\n\t\t\t\t\tstartActivityForResult(intent, 4);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\t//\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.btn_5: {\n\t\t\t\tif (isLogin) {\n\t\t\t\t\tIntent intent2 = new Intent(context,\n\t\t\t\t\t\t\tSelectPicPopupWindow.class);\n\t\t\t\t\tstartActivityForResult(intent2, 2);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.my_bottom_button_lianxiwomen: {\n\t\t\t\tIntent intent = new Intent(context, AboutUs.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.my_bottom_button_guanyuwomen: {\n\t\t\t\tIntent intent = new Intent(context, AboutSoftware.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.jzxx_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\t\tIntent intent = new Intent(context, Wdjl_activity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.xysh_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\t\tIntent intent = new Intent(context, Mycredit.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.jzjl_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\t\tIntent intent = new Intent(context, JZjlactivity.class);\n\t\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.sfrz_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\tIntent intent = new Intent(context, Sfzrz.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.tbgz_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\tIntent intent = new Intent(context, MyGZ_activity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.wdsc_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\tIntent intent = new Intent(context, MySCactivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.myschool_button: {\n\t\t\t\tIntent intent = new Intent(context, Myschoollayout.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.xcap_button: {\n\t\t\t\tIntent intent = new Intent(context, Xcapactivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase R.id.mrqd_button: {\n\t\t\t\tif (isLogin) {\n\t\t\t\tIntent intent = new Intent(context, QdActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\t} else {\n\t\t\t\t\tcreateView(v);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t}\n\t\t}", "@Override\n\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\tstoreClassEntity.setDefault(false);\n\t\t\t\t\tstoreClassEntity.setHighest(false);\n\t\t\t\t\tstoreClassEntity.setLately(true);\n\t\t\t\t\tviewInterface.onClicks(3);\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "public void ClickAceptar(View view){\n\n }", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n case R.id.rc_view:\n break;\n\n }\n }", "@Override\r\n public void onClick(View view) {\n }", "@Override\r\n public void onClick(View view) {\n }", "@Override\r\n public void onClick(View view) {\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\tstoreClassEntity.setDefault(false);\n\t\t\t\t\tstoreClassEntity.setHighest(true);\n\t\t\t\t\tstoreClassEntity.setLately(false);\n\t\t\t\t\tviewInterface.onClicks(2);\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, ViewActivity.class));\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "public abstract void onOneClick(View v);", "@Override\n\tpublic void onClick(View view) {\n\t}", "@Override\n public void onClick(View v) {\n ActivityBad.launch(getActivity());\n\n }", "@Override\r\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n public void onClick(View view) {\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tif(v.getId() == R.id.btn_open_multi_dialog)\n\t\t{\n\t\t\topenMultiDialog();\n\t\t}\n\t\tif(v.getId() == R.id.btn_open_single_dialog)\n\t\t{\n\t\t\topenSingleDialog();\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n int type = i+1;\n Intent intent = new Intent(viewHolder.itemView.getContext(), ShowItemActivity.class);\n intent.putExtra(\"type\",String.valueOf(type));\n viewHolder.itemView.getContext().startActivity(intent);\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n Main.switchViews();\n }", "public void VisibleToNobodyButtonClickHandler(View view)\n\t{\n\t\tswitch (view.getId())\n\t\t{\n\t\t\tcase R.id.visibleToNobodyButton:\n\t\t\t\tfor (Person P : clientApp.getLoggedInUser().getFriends())\n\t\t\t\t{\n\t\t\t\t\tclientApp.getLoggedInUser().blockFriend(P);\n\t\t\t\t\tLog.d(TAG, \"Blocked: \" + P.getName());\n\t\t\t\t}\n\n\t\t\t\treturnMessage.putExtra(\"visibility\", \"Invisible\");\n\t\t\t\tif (getParent() == null)\n\t\t\t\t{\n\t\t\t\t\tsetResult(Activity.RESULT_OK, returnMessage);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tgetParent().setResult(Activity.RESULT_OK, returnMessage);\n\t\t\t\t}\n\t\t\t\tthis.finish();\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n if(view==btn_login_dia)\n {\n new LoginDialog(this);\n }\n else if(view==btn_signup_dia)\n {\n new SignUpDialog(this);\n }\n\n }", "public void viewActivity(View view){\n\n Button button = (Button)view;\n String title = button.getText().toString();\n\n\n int id = view.getId();\n switch (id){\n case R.id.btn1:\n Intent intent1 = new Intent(this,MakeList.class);\n startActivity(intent1);\n break;\n case R.id.btn2:\n Intent intent2 = new Intent(this,ButtonList.class);\n// intent2.putExtra(\"listNum\",listNum);\n// intent2.putStringArrayListExtra(\"arrayList\",arrayList);\n startActivity(intent2);\n break;\n case R.id.btn3:\n Intent intent3 = new Intent(this,TableVIew.class);\n startActivity(intent3);\n break;\n case R.id.btn4:\n Intent intent4 = new Intent(this,BarView.class);\n startActivity(intent4);\n break;\n case R.id.btn5:\n Intent intent5 = new Intent(this,PieView.class);\n startActivity(intent5);\n break;\n case R.id.btn6:\n Intent intent6 = new Intent(this,LineView.class);\n startActivity(intent6);\n break;\n case R.id.btn7:\n Intent intent7 = new Intent(this,Synchronization.class);\n startActivity(intent7);\n break;\n case R.id.btn8:\n Intent intent8 = new Intent(this,DbActivity.class);\n startActivity(intent8);\n break;\n }\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n public void onClick(View view) {\n\n }", "@Override\n public void onClick(View view) {\n\n }", "@Override\n public void onClick(View view) {\n\n }", "@Override\n public void onClick(View view) {\n\n }", "public void onClick(View v) {\n if (!tablet_type.trim().equalsIgnoreCase(\"\")) {\n if (tablet_type.equalsIgnoreCase(\"TAB\")) {\n AddListItem(1);\n\n } else if (tablet_type.equalsIgnoreCase(\"CAP\")) {\n AddListItem(2);\n } else if (tablet_type.equalsIgnoreCase(\"SYR\")) {\n AddListItemSyrup();\n\n } else if (tablet_type.equalsIgnoreCase(\"OINT\")) {\n AddListItemOINT();\n } else {\n AddListItem(1);\n }\n\n } else {\n AddListItem(1);\n\n }\n\n\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (isSelfCreate)\r\n\t\t\t\t{\r\n\t\t\t\t\tshowDialog(DIALOG_SELF);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tshowDialog(DIALOG_OTHER);\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\n\t\t\t\treturn;\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t}", "@Override\n public void onClick(View view) {\n System.out.println(view.getId());\n switch(view.getId()){\n case R.id.btnNewWalk:\n showCreateWalkActivity();\n break;\n case R.id.btnNewWaypoint:\n showAddWayPointActivity();\n break;\n case R.id.btnSaveWalk:\n saveWalk();\n break;\n }\n }", "@Override\n public void onClick(View view) {\n\n }", "@Override\n public void onClick()\n {\n Instance instance = null;\n final AbstractUIField uiField = super.getModelObject();\n if (uiField.getInstanceKey() != null) {\n Menu menu = null;\n try {\n instance = uiField.getInstance();\n menu = Menu.getTypeTreeMenu(instance.getType());\n } catch (final EFapsException e) {\n throw new RestartResponseException(new ErrorPage(e));\n }\n if (menu == null) {\n final Exception ex = new Exception(\"no tree menu defined for type \" + instance.getType().getName());\n throw new RestartResponseException(new ErrorPage(ex));\n }\n\n Page page;\n try {\n page = new ContentContainerPage(menu.getUUID(), uiField.getInstanceKey(),\n getPage() instanceof StructurBrowserPage);\n } catch (final EFapsException e) {\n page = new ErrorPage(e);\n }\n this.setResponsePage(page);\n }\n }", "public void onClick(View view) {\n\n openDialog();\n }", "void contentList_mouseClicked(MouseEvent e) {\n if (e.getClickCount() > 1) {\n doView();\n }\n\n }", "@Override\n public void onClick(View view) {\n\n }", "@Override\n\t\t\t\tpublic void onClick(View view) {\n\t\t\t\t\tstoreClassEntity.setDefault(true);\n\t\t\t\t\tstoreClassEntity.setHighest(false);\n\t\t\t\t\tstoreClassEntity.setLately(false);\n\t\t\t\t\tviewInterface.onClicks(1);\n\t\t\t\t}", "@Override\n public void onClick(View view) {\n // Opens the next page (left)\n //=================================\n if (!leftIsEmpty) {\n Intent nextIntent = new Intent(GlobalPageActivity.this,GlobalPageActivity.class);\n nextIntent.putExtra(\"nextpage\", mThisPage.getNextLeft());\n nextIntent.putExtra(\"MyUserId\", iUserId);\n startActivity(nextIntent);\n finish();\n return;\n }\n\n //=================================\n // Edits the button (left) or\n // denies you access if being worked on\n //=================================\n if (mainIsEmpty){\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.draw_picture_first), Toast.LENGTH_SHORT).show();\n } else {\n if (!mThisPage.getLeftUser().equals(iUserId) && !mThisPage.getRightUser().equals(iUserId) && !mThisPage.getUser().equals(iUserId)) {\n createLeftDialog();\n } else {\n Toast.makeText(GlobalPageActivity.this, getResources().getString(R.string.done_something_already), Toast.LENGTH_SHORT).show();\n }\n }\n }", "void onSingleClick( View view);", "@Override\n public void onClick(View view) {\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t}", "@Override\n public void onClick(View v) {\n setTaskShowType();\n }", "@Override\n\tpublic boolean handleUiEvent(String action, View view) {\n\t\treturn false;\n\t}", "@Override\n public void onClick(View view) {\n saveBlocks();\n XmlDataManager.changeProject(model);\n\n Intent i = new Intent(DetailViewActivityEdit.this, MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n startActivity(i);\n finish();\n }", "@Override\n public void onClick(View view) {\n switch(view.getId()) {\n case R.id.btn1:\n // Must break after each case, or all cases would be run.\n myToast(\"btn1\"); break;\n case R.id.btn2:\n myToast(\"btn2\"); break;\n case R.id.btn3:\n myToast(\"btn3\"); break;\n }\n }", "@Override\n public void onClick(View view) {\n\n if (!prefs.getBoolean(Constants.KEY_IS_MINI_GUIDE_SHOWN, false)) {\n openMiniGuide1();\n } else {\n prefs.edit().putString(Constants.KEY_IS_FIRST_TIME, \"true\");\n startActivity(new Intent(SplashLandingActivity.this, SignUpActivity.class));\n finish();\n }\n\n }", "public void onClick(View view) {\n ArrayList<View> subViews = getSubViews(view);\n if (!subViews.isEmpty()) {\n int visibility = subViews.get(0).getVisibility() == View.VISIBLE\n ? View.GONE : View.VISIBLE;\n for (View subView : subViews) {\n subView.setVisibility(visibility);\n }\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\t}" ]
[ "0.6009797", "0.59018767", "0.5881475", "0.5861835", "0.5852222", "0.57226205", "0.5719741", "0.57192945", "0.56980556", "0.5684141", "0.56703556", "0.5669088", "0.5669088", "0.5669088", "0.5669088", "0.5669088", "0.5669088", "0.5669088", "0.5665722", "0.5608521", "0.5607661", "0.5607661", "0.5607661", "0.55929804", "0.55929804", "0.55929804", "0.5591067", "0.55891", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.55869913", "0.5586539", "0.5579739", "0.5578244", "0.5577229", "0.5576238", "0.5576238", "0.5576238", "0.5576238", "0.5571234", "0.5571234", "0.5568632", "0.5567808", "0.5551507", "0.5550319", "0.554701", "0.5540334", "0.5526395", "0.55258715", "0.55258715", "0.55258715", "0.55258715", "0.55247337", "0.5524665", "0.5524665", "0.5524665", "0.5524665", "0.552409", "0.55157334", "0.55124015", "0.5509998", "0.5501683", "0.5500683", "0.54960257", "0.54944146", "0.549008", "0.548746", "0.54859024", "0.54813397", "0.54805416", "0.54751295", "0.5470342", "0.54662186", "0.5465476", "0.5463006", "0.546111", "0.5457505", "0.54564464", "0.54564464", "0.54564464", "0.54564464" ]
0.0
-1
Auto Created by Zeng
public ShapeBox selectById(Integer id){ return shapeBoxDao.selectById(id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();", "@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "public void create(){}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "CreationData creationData();", "U getCreateby();", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public abstract String getCreator();", "public String getCreator()\n\t{\n\t\treturn null;\n\t}", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public String createNewName() {\n\t\treturn null;\n\t}", "@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}", "@Override\n\tpublic void createccuntNum() {\n\t\t\n\t}", "public Ludo() {\n this.status = \"Created\";\n }", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "Secuencia createSecuencia();", "public Name createName() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "@VTID(13)\r\n int getCreator();", "public void onCreate() {\r\n\t\tcreatorClass.onCreate(table);\r\n\t}", "public abstract void create();", "public void generate() {\n\t}", "@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic void create(Owner owner) {\n\n\t}", "@Override\n public String getCreate() {\n return \"CREATE TABLE IF NOT EXISTS StoreController (\\n\" +\n \"\\tstoreID INTEGER NOT NULL UNIQUE,\\n\" +\n \"\\tstoreShelves INTEGER NOT NULL,\\n\" +\n \"\\tnumberOfShelves INTEGER NOT NULL,\\n\" +\n \"\\tdiscountCounter INTEGER NOT NULL,\\n\" +\n \"\\ttypeCounter INTEGER NOT NULL,\\n\" +\n \"\\tcategoryCounter INTEGER NOT NULL,\\n\"+\n \"\\tFOREIGN KEY(\\\"storeID\\\") REFERENCES \\\"Branches\\\"(\\\"BID\\\"),\\n\" +\n \"\\tPRIMARY KEY(\\\"storeID\\\")\\n\" +\n \");\";\n }", "public abstract long getCreated();", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "private UniqueIdentifier(){\n\t\t\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n // String sql = String.format(\n // \"CREATE table $TABLE ( \" +\n // \"$C_ID INTEGER NOT NULL PRIMARY KEY,\" +\n // \"%C_CREATED_AT INTEGER, $C_TEXT TEXT, $C_USER TEXT)\",\n // ,\n // , \n // , , );\n String sql = context.getResources().getString(R.string.sql_create);\n db.execSQL(sql); // execute the sql\n Log.d(TAG, \"onCreate'd sql: \" + sql);\n }", "@Override\r\n\tpublic void creerEnchere(String desc, String dl) {\n\t\t\r\n\t}", "public long createDemo() {\n mDemoId = insertDemo(\"unnamed\");\n return mDemoId;\n }", "@Override\n public Date getCreated()\n {\n return null;\n }", "Compleja createCompleja();", "public Date getCreationDate() {\n\n \n return creationDate;\n\n }", "Information createInformation();", "private String createUser(String name) {\n\t\treturn null;\n\t}", "public long getCreationDate() {\n return creationDate_;\n }", "public Integer getCreateby() {\n return createby;\n }", "public String getCreator() {\n return this.creator;\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\r\n return creator;\r\n }", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public PCreateAuthor() {\n\t\tsuper(org.jooq.SQLDialect.SYBASE, \"p_create_author\", org.jooq.test.sybase.generatedclasses.Dba.DBA);\n\t}", "@Override\r\n\tpublic boolean create(Moteur obj, Connection conn) throws SQLException {\n\t\treturn false;\r\n\t}", "@Override\n\tprotected String getCreateSql() {\n\t\treturn null;\n\t}", "public Date getCreationTime()\n {\n return created;\n }", "UUID getCreatedUUID()\n {\n return conglomerateUUID;\n }", "public DateTime getCreationTime() { return creationTime; }", "public static void created() {\n\t\t// TODO\n\t}", "@Override\n public String getCreationDate() {\n return creationDate;\n }", "public Generateur() {\n }", "public long getCreationDate() {\n return creationDate_;\n }", "public Timestamp getCreationDate()\n throws OculusException;", "public ScGridColumn<AcActionAutoCorrectedLog> newCreatedByColumn()\n {\n return newCreatedByColumn(\"Created By\");\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public String toString() {\r\n \t\treturn \"\\\"\" + _name + \"\\\" by \" + _creator;\r\n \t}", "public DateTime getCreationTime() {\n return created;\n }", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "String getCreatorId();", "Authorizor createAuthorizor();", "@Override\r\n\tpublic Date getCreated_date() {\n\t\treturn super.getCreated_date();\r\n\t}", "void createACustomer() {\r\n\t\tSystem.out.println(\"\\nCreating a customer:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "OperacionColeccion createOperacionColeccion();", "public long getCreationTime() {\n return this.creationTime;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "@Override\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\tdb.execSQL(\"create table \" + TABLE_NAME + \"(id integer primary key autoincrement,uname text,name text)\");\n\t}", "public long getCreationTime() {\n return creationTime;\n }", "private Person()\r\n\t{\r\n\t\tsuper();\r\n\t\t//created = LocalDateTime.now();\r\n\t\tcreated = Calendar.getInstance().getTime();\r\n\t}", "public long getCreationTime() {\n return creationTime_;\n }", "public String getCreateId() {\n\t\treturn createId;\n\t}" ]
[ "0.6920432", "0.65931475", "0.6527934", "0.65259665", "0.65259665", "0.6510404", "0.6483923", "0.642283", "0.63991857", "0.6369586", "0.6333894", "0.62375087", "0.61862254", "0.6148531", "0.61039674", "0.61033475", "0.60890955", "0.6081319", "0.6070017", "0.60607654", "0.6055151", "0.6052433", "0.60479283", "0.60106456", "0.60023904", "0.5946421", "0.5942304", "0.59085435", "0.5886264", "0.5850743", "0.5842212", "0.5837498", "0.583458", "0.5831616", "0.5831371", "0.58265406", "0.5826332", "0.5826332", "0.5825632", "0.58159083", "0.58133054", "0.5811203", "0.57818705", "0.577669", "0.5775679", "0.57746", "0.5766987", "0.57659215", "0.57576776", "0.57515067", "0.57434005", "0.57423204", "0.57406276", "0.5740475", "0.5735846", "0.57309645", "0.57309645", "0.5730856", "0.5729385", "0.57287014", "0.5723422", "0.5720035", "0.57118255", "0.57013196", "0.5692914", "0.5692579", "0.5689926", "0.5686736", "0.56855637", "0.5680107", "0.56747246", "0.56724894", "0.5670797", "0.56655824", "0.56635034", "0.56612813", "0.5659367", "0.56549186", "0.5654609", "0.56538457", "0.5651983", "0.5651975", "0.56449634", "0.564252", "0.564252", "0.564252", "0.564252", "0.564252", "0.564252", "0.564252", "0.564252", "0.564252", "0.5630092", "0.5630092", "0.5630092", "0.5630092", "0.56264323", "0.5622179", "0.5613139", "0.5612543", "0.5609995" ]
0.0
-1
Auto Created by Zeng
public int insert(ShapeBox shapeBox){ return shapeBoxDao.insertShapeBox(shapeBox); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void create() {\n\t\t\n\t}", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();", "@DISPID(1001) //= 0x3e9. The runtime will prefer the VTID if present\r\n @VTID(8)\r\n int creator();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "public void create(){}", "@Override\r\n\tpublic void create() {\n\r\n\t}", "CreationData creationData();", "U getCreateby();", "private Long createId() {\n return System.currentTimeMillis() % 1000;\n }", "@Override\r\n\tpublic String createID() {\r\n\t\t \r\n\t\t\t\treturn transCode.toString();\r\n\t\t\t\t}", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "public void crear() {\n con = new Conexion();\n con.setInsertar(\"insert into lenguajes_programacion (nombre, fecha_creacion, estado) values ('\"+this.getNombre()+\"', '\"+this.getFecha_creacion()+\"', 'activo')\");\n }", "public CreateData() {\n\t\t\n\t\t// TODO Auto-generated constructor stub\n\t}", "public abstract String getCreator();", "public String getCreator()\n\t{\n\t\treturn null;\n\t}", "private String creatUniqueID(){\n long ID = System.currentTimeMillis();\n return Long.toString(ID).substring(9,13);\n }", "private void AutoID() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "@Override\r\n\tpublic void crearVehiculo() {\n\t\t\r\n\t}", "public String createNewName() {\n\t\treturn null;\n\t}", "@Override\n\tprotected void createCompHeader() {\n\t\tString headerTxt = \"Add a New Pharmacy\";\n\t\tiDartImage icoImage = iDartImage.PHARMACYUSER;\n\t\tbuildCompHeader(headerTxt, icoImage);\n\t}", "@Override\n\tpublic void createccuntNum() {\n\t\t\n\t}", "public Ludo() {\n this.status = \"Created\";\n }", "public long timeOfCreation() {\n\t\treturn timeOfCreation ;\n\t}", "@Override\n\tpublic String createTable() {\n\t\t\t\treturn \"CREATE TABLE history_table_view(id number(8) primary key not null ,sqltext text, pointid varchar2(1024), type varchar2(100))\";\n\t}", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "Secuencia createSecuencia();", "public Name createName() {\n\t\treturn null;\n\t}", "@Override\r\n\tpublic boolean create(Jeu obj) {\n\t\treturn false;\r\n\t}", "@VTID(13)\r\n int getCreator();", "public void onCreate() {\r\n\t\tcreatorClass.onCreate(table);\r\n\t}", "public abstract void create();", "@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic long getCreationTime() {\n\t\treturn 0;\n\t}", "public void generate() {\n\t}", "@Override\n\tpublic void create(Owner owner) {\n\n\t}", "public abstract long getCreated();", "@Override\n public String getCreate() {\n return \"CREATE TABLE IF NOT EXISTS StoreController (\\n\" +\n \"\\tstoreID INTEGER NOT NULL UNIQUE,\\n\" +\n \"\\tstoreShelves INTEGER NOT NULL,\\n\" +\n \"\\tnumberOfShelves INTEGER NOT NULL,\\n\" +\n \"\\tdiscountCounter INTEGER NOT NULL,\\n\" +\n \"\\ttypeCounter INTEGER NOT NULL,\\n\" +\n \"\\tcategoryCounter INTEGER NOT NULL,\\n\"+\n \"\\tFOREIGN KEY(\\\"storeID\\\") REFERENCES \\\"Branches\\\"(\\\"BID\\\"),\\n\" +\n \"\\tPRIMARY KEY(\\\"storeID\\\")\\n\" +\n \");\";\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "@Override\n public boolean create(Revue objet) {\n return false;\n }", "private UniqueIdentifier(){\n\t\t\n\t}", "@Override\n public void onCreate(SQLiteDatabase db) {\n // String sql = String.format(\n // \"CREATE table $TABLE ( \" +\n // \"$C_ID INTEGER NOT NULL PRIMARY KEY,\" +\n // \"%C_CREATED_AT INTEGER, $C_TEXT TEXT, $C_USER TEXT)\",\n // ,\n // , \n // , , );\n String sql = context.getResources().getString(R.string.sql_create);\n db.execSQL(sql); // execute the sql\n Log.d(TAG, \"onCreate'd sql: \" + sql);\n }", "@Override\r\n\tpublic void creerEnchere(String desc, String dl) {\n\t\t\r\n\t}", "public long createDemo() {\n mDemoId = insertDemo(\"unnamed\");\n return mDemoId;\n }", "@Override\n public Date getCreated()\n {\n return null;\n }", "Compleja createCompleja();", "public Date getCreationDate() {\n\n \n return creationDate;\n\n }", "public long getCreationDate() {\n return creationDate_;\n }", "private String createUser(String name) {\n\t\treturn null;\n\t}", "public Integer getCreateby() {\n return createby;\n }", "Information createInformation();", "public String getCreator() {\n return this.creator;\n }", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "public String getCreator() {\r\n return creator;\r\n }", "public String getCreator() {\r\n return creator;\r\n }", "public static void creaHidatoAutomaticament()\n {\n ControladorVista.mostraCreacioHidatoAutomatica();\n }", "public PCreateAuthor() {\n\t\tsuper(org.jooq.SQLDialect.SYBASE, \"p_create_author\", org.jooq.test.sybase.generatedclasses.Dba.DBA);\n\t}", "@Override\r\n\tpublic boolean create(Moteur obj, Connection conn) throws SQLException {\n\t\treturn false;\r\n\t}", "@Override\n\tprotected String getCreateSql() {\n\t\treturn null;\n\t}", "public Date getCreationTime()\n {\n return created;\n }", "UUID getCreatedUUID()\n {\n return conglomerateUUID;\n }", "public DateTime getCreationTime() { return creationTime; }", "public static void created() {\n\t\t// TODO\n\t}", "@Override\n public String getCreationDate() {\n return creationDate;\n }", "public long getCreationDate() {\n return creationDate_;\n }", "public Generateur() {\n }", "public Timestamp getCreationDate()\n throws OculusException;", "public ScGridColumn<AcActionAutoCorrectedLog> newCreatedByColumn()\n {\n return newCreatedByColumn(\"Created By\");\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public String toString() {\r\n \t\treturn \"\\\"\" + _name + \"\\\" by \" + _creator;\r\n \t}", "public DateTime getCreationTime() {\n return created;\n }", "@java.lang.Override\n public long getCreationDate() {\n return creationDate_;\n }", "public void create() {\n String salt = PasswordUtils.getSalt(30);\n\n // Protect user's password. The generated value can be stored in DB.\n String mySecurePassword = PasswordUtils.generateSecurePassword(password, salt);\n\n // Print out protected password\n System.out.println(\"My secure password = \" + mySecurePassword);\n System.out.println(\"Salt value = \" + salt);\n Operator op = new Operator();\n op.setUsername(username);\n op.setDescription(description);\n op.setSalt(salt);\n op.setPassword(mySecurePassword);\n op.setRol(rol);\n operatorService.create(op);\n message = \"Se creo al usuario \" + username;\n username = \"\";\n description = \"\";\n password = \"\";\n rol = null;\n }", "String getCreatorId();", "@Override\r\n\tpublic Date getCreated_date() {\n\t\treturn super.getCreated_date();\r\n\t}", "Authorizor createAuthorizor();", "void createACustomer() {\r\n\t\tSystem.out.println(\"\\nCreating a customer:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public DbRecord()\n {\n m_UserName = \"\";\n // Generate user's unique identifier\n m_Key = new byte[16];\n java.util.UUID guid = java.util.UUID.randomUUID();\n long itemHigh = guid.getMostSignificantBits();\n long itemLow = guid.getLeastSignificantBits();\n for( int i = 7; i >= 0; i-- )\n {\n m_Key[i] = (byte)(itemHigh & 0xFF);\n itemHigh >>>= 8;\n m_Key[8+i] = (byte)(itemLow & 0xFF);\n itemLow >>>= 8;\n }\n m_Template = null;\n }", "OperacionColeccion createOperacionColeccion();", "public long getCreationTime() {\n return this.creationTime;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCreator() {\n return creator;\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "public String getCREATED_BY() {\r\n return CREATED_BY;\r\n }", "@Override\n\tpublic void onCreate(SQLiteDatabase db) {\n\t\tdb.execSQL(\"create table \" + TABLE_NAME + \"(id integer primary key autoincrement,uname text,name text)\");\n\t}", "public long getCreationTime() {\n return creationTime;\n }", "public long getCreationTime() {\n return creationTime_;\n }", "private Person()\r\n\t{\r\n\t\tsuper();\r\n\t\t//created = LocalDateTime.now();\r\n\t\tcreated = Calendar.getInstance().getTime();\r\n\t}", "public String getCreateId() {\n\t\treturn createId;\n\t}" ]
[ "0.6919447", "0.6592205", "0.65273136", "0.65273136", "0.6526771", "0.6509322", "0.6482939", "0.64226073", "0.6398116", "0.6369605", "0.63347435", "0.6240456", "0.61868435", "0.6148987", "0.61028475", "0.61028135", "0.6089556", "0.6082778", "0.6072123", "0.6063734", "0.6054748", "0.60512704", "0.6049027", "0.60095674", "0.60024995", "0.594724", "0.5944591", "0.59063756", "0.58859766", "0.5850906", "0.58434767", "0.58377326", "0.58363986", "0.5831816", "0.58305794", "0.58287036", "0.58287036", "0.58272094", "0.58255136", "0.5815032", "0.58144104", "0.58116317", "0.57817435", "0.5778202", "0.57744", "0.5773076", "0.5769083", "0.57671624", "0.5757261", "0.5753227", "0.5743214", "0.5742909", "0.5742823", "0.57426536", "0.5737093", "0.5733429", "0.5732356", "0.5732356", "0.573224", "0.57282424", "0.57232344", "0.5718919", "0.57140917", "0.5703235", "0.5695371", "0.56934756", "0.56918454", "0.5688321", "0.5686993", "0.5680544", "0.5676528", "0.56721926", "0.5669866", "0.5668013", "0.56638455", "0.56626785", "0.56617486", "0.56556296", "0.5655359", "0.5653888", "0.5651958", "0.56517947", "0.5647706", "0.56440324", "0.56440324", "0.56440324", "0.56440324", "0.56440324", "0.56440324", "0.56440324", "0.56440324", "0.56440324", "0.56320554", "0.56320554", "0.56320554", "0.56320554", "0.56260663", "0.56250775", "0.56154007", "0.56148195", "0.5612448" ]
0.0
-1
Created by Amal Krishnan on 23052017.
public interface OnTouchBeyondarViewListenerMod { void onTouchBeyondarView(MotionEvent var1, ArBeyondarGLSurfaceView var2); }
{ "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}", "public final void mo51373a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public int describeContents() { return 0; }", "@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 protected void initialize() {\n\n \n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n public void init() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n protected void init() {\n }", "private void init() {\n\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void init() {}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void getExras() {\n }", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void gravarBd() {\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}", "private void m50366E() {\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n public void initialize() { \n }", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "public void mo4359a() {\n }", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void memoria() {\n \n }", "@Override public int describeContents() { return 0; }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tpublic void init() {\n\t}", "public void gored() {\n\t\t\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 public void initialize() {\n \n }", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public int getSize() {\n return 1;\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic final void init() {\r\n\r\n\t}" ]
[ "0.60097826", "0.57922465", "0.5725419", "0.567964", "0.5644708", "0.5616999", "0.5616999", "0.56001365", "0.5577452", "0.555679", "0.55538267", "0.5534123", "0.5534123", "0.5534123", "0.5534123", "0.5534123", "0.5534123", "0.5525553", "0.55094194", "0.5507896", "0.55045986", "0.5499671", "0.5490979", "0.54878265", "0.54734856", "0.5471861", "0.5466345", "0.546579", "0.546065", "0.546065", "0.546065", "0.546065", "0.546065", "0.5450554", "0.54437894", "0.5441688", "0.5441688", "0.54086554", "0.5406309", "0.5395224", "0.53929406", "0.5386459", "0.5382567", "0.5382442", "0.53739727", "0.53710026", "0.5370366", "0.53615046", "0.53535086", "0.53535086", "0.53518295", "0.53518295", "0.53518295", "0.53468937", "0.53365934", "0.53365934", "0.53365934", "0.53358203", "0.53318626", "0.5322337", "0.5321452", "0.5315553", "0.5297593", "0.5297593", "0.5297593", "0.52957225", "0.52878505", "0.5275546", "0.5275546", "0.5275546", "0.5274704", "0.52724946", "0.5271291", "0.52687466", "0.5268534", "0.5267915", "0.5267915", "0.5266426", "0.5264013", "0.5263195", "0.52617", "0.5249308", "0.5247712", "0.5247712", "0.52427745", "0.5237493", "0.5237493", "0.5237493", "0.5237493", "0.5237493", "0.5237493", "0.5237493", "0.5235563", "0.5234528", "0.5232429", "0.52316386", "0.5205473", "0.51973206", "0.5195668", "0.5190568", "0.5182297" ]
0.0
-1
private static final Unsafe unsafe = Unsafe.getUnsafe();
public static void main(String[] args) { ConcurrentHashMap<String, String> chm=new ConcurrentHashMap<String, String>(17,0.75f,5); chm.put("hello", "hello"); chm.put("1", "23"); chm.get("1"); String s="hh"; HashMap hm=new HashMap(); int sshift = 0; int ssize = 1; int concurrencyLevel=16; while (ssize < concurrencyLevel) { ++sshift; ssize <<= 1; } System.out.println("ssize is next multiple of 2 if concurrencyLevel is not multiple of 2 => ssize: "+ssize); int segmentShift = 32 - sshift; int segmentMask = ssize - 1; System.out.println("segmentShift(32-ssize)=>"+segmentShift); System.out.println("segmentMask(ssize-1)=>"+segmentMask); int initialCapacity=16; if (initialCapacity > MAXIMUM_CAPACITY) initialCapacity = MAXIMUM_CAPACITY; int c = initialCapacity / ssize; System.out.println("c=initialCapacity / ssize ==> "+c); if (c * ssize < initialCapacity) ++c; System.out.println("c to find capacity if not exact multiple of initial capacity/sszie,then plus 1=> c="+c); int cap = MIN_SEGMENT_TABLE_CAPACITY; while (cap < c) cap <<= 1; System.out.println("capacity="+cap); System.out.println((hash("hello")>>>segmentShift )&segmentMask); //int j = (hash >>> segmentShift) & segmentMask; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Unsafe getUnsafe() {\n return THE_UNSAFE;\n }", "private static Unsafe getUnsafe() {\n try {\n Field singleOneInstanceField = Unsafe.class.getDeclaredField(\"theUnsafe\");\n singleOneInstanceField.setAccessible(true);\n return (Unsafe) singleOneInstanceField.get(null);\n\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "private static Object getUnsafe() {\n\t\tObject unsafe;\n\t\ttry {\n\t\t\tunsafe = ReflectionUtils.get(Class.forName(\"sun.misc.Unsafe\"), \"theUnsafe\");\n\t\t} catch (ClassNotFoundException ex) {\n\t\t\tthrow new RuntimeException(ex);\n\t\t}\n\t\treturn unsafe;\n\t}", "private static sun.misc.Unsafe getUnsafe() {\n try {\n return sun.misc.Unsafe.getUnsafe();\n } catch (SecurityException se) {\n try {\n return java.security.AccessController.doPrivileged\n (new java.security\n .PrivilegedExceptionAction<sun.misc.Unsafe>() {\n public sun.misc.Unsafe run() throws Exception {\n java.lang.reflect.Field f = sun.misc\n .Unsafe.class.getDeclaredField(\"theUnsafe\");\n f.setAccessible(true);\n return (sun.misc.Unsafe) f.get(null);\n }});\n } catch (java.security.PrivilegedActionException e) {\n throw new RuntimeException(\"Could not initialize intrinsics\",\n e.getCause());\n }\n }\n }", "protected AbstractChannel.AbstractUnsafe newUnsafe() {\n/* 713 */ return new EmbeddedUnsafe();\n/* */ }", "public interface IUnsafe {\n\n byte getByte(long address);\n\n void putByte(long address, byte x);\n\n short getShort(long address);\n\n void putShort(long address, short x);\n\n char getChar(long address);\n\n void putChar(long address, char x);\n\n int getInt(long address);\n\n void putInt(long address, int x);\n\n long getLong(long address);\n\n void putLong(long address, long x);\n\n float getFloat(long address);\n\n void putFloat(long address, float x);\n\n double getDouble(long address);\n\n void putDouble(long address, double x);\n\n int getInt(Object o, long address);\n\n void putInt(Object o, long address, int x);\n\n Object getObject(Object o, long address);\n\n void putObject(Object o, long address, Object x);\n\n boolean getBoolean(Object o, long address);\n\n void putBoolean(Object o, long address, boolean x);\n\n byte getByte(Object o, long address);\n\n void putByte(Object o, long address, byte x);\n\n short getShort(Object o, long address);\n\n void putShort(Object o, long address, short x);\n\n char getChar(Object o, long address);\n\n void putChar(Object o, long address, char x);\n\n long getLong(Object o, long address);\n\n void putLong(Object o, long address, long x);\n\n float getFloat(Object o, long address);\n\n void putFloat(Object o, long address, float x);\n\n double getDouble(Object o, long address);\n\n void putDouble(Object o, long address, double x);\n\n\n\n long getAddress(long address);\n\n void putAddress(long address, long x);\n\n long allocateMemory(long bytes);\n\n long reallocateMemory(long address, long bytes);\n\n void setMemory(Object o, long offset, long bytes, byte value);\n\n default void setMemory(long address, long bytes, byte value) {\n setMemory(null, address, bytes, value);\n }\n\n void copyMemory(Object srcBase, long srcOffset, Object destBase, long destOffset, long bytes);\n\n default void copyMemory(long srcAddress, long destAddress, long bytes) {\n copyMemory(null, srcAddress, null, destAddress, bytes);\n }\n\n void freeMemory(long address);\n \n}", "public Unsafe method_4123() {\n return null;\n }", "public static void disableWarning() {\n try {\n Field theUnsafe = Unsafe.class.getDeclaredField(\"theUnsafe\");\n theUnsafe.setAccessible(true);\n Unsafe u = (Unsafe) theUnsafe.get(null);\n\n Class<?> c = Class.forName(\"jdk.internal.module.IllegalAccessLogger\");\n Field logger = c.getDeclaredField(\"logger\");\n u.putObjectVolatile(c, u.staticFieldOffset(logger), null);\n } catch (ClassNotFoundException e) {\n // do nothing\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public T pollUnsafe();", "@Test\n\tpublic void testUnsafe()\n\t{\n\t\tString[] code = {\n\t\t\t\"var a\\n = 'Here is a unsafe character';\"\n\t\t};\n\t\t\n\t\tth.test(code, new LinterOptions().set(\"es3\", true));\n\t}", "private NativeSupport() {\n\t}", "private static native long init();", "Object getNative();", "private NullSafe()\n {\n super();\n }", "private static native void init();", "public static C10067G m32839a() {\n String str = \"newInstance\";\n try {\n Class<?> unsafeClass = Class.forName(\"sun.misc.Unsafe\");\n Field f = unsafeClass.getDeclaredField(\"theUnsafe\");\n f.setAccessible(true);\n return new C10063C(unsafeClass.getMethod(\"allocateInstance\", new Class[]{Class.class}), f.get(null));\n } catch (Exception e) {\n try {\n Method getConstructorId = ObjectStreamClass.class.getDeclaredMethod(\"getConstructorId\", new Class[]{Class.class});\n getConstructorId.setAccessible(true);\n int constructorId = ((Integer) getConstructorId.invoke(null, new Object[]{Object.class})).intValue();\n Method newInstance = ObjectStreamClass.class.getDeclaredMethod(str, new Class[]{Class.class, Integer.TYPE});\n newInstance.setAccessible(true);\n return new C10064D(newInstance, constructorId);\n } catch (Exception e2) {\n try {\n Method newInstance2 = ObjectInputStream.class.getDeclaredMethod(str, new Class[]{Class.class, Class.class});\n newInstance2.setAccessible(true);\n return new C10065E(newInstance2);\n } catch (Exception e3) {\n return new C10066F();\n }\n }\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic static <T> T instantiateUnsafe(Class<T> cls) throws RuntimeException {\n\t\treturn (T) ReflectionUtils.invokeMethod(getUnsafe(), \"allocateInstance\", cls);\n\t}", "private static native long create_0();", "private native static void free(long instance);", "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "public abstract long getNativePtr();", "private ByteBuffer internalNioBuffer()\r\n/* 532: */ {\r\n/* 533:545 */ ByteBuffer tmpNioBuf = this.tmpNioBuf;\r\n/* 534:546 */ if (tmpNioBuf == null) {\r\n/* 535:547 */ this.tmpNioBuf = (tmpNioBuf = ByteBuffer.wrap(this.array));\r\n/* 536: */ }\r\n/* 537:549 */ return tmpNioBuf;\r\n/* 538: */ }", "public static native void staticVoid();", "public void setDataUnsafe(Serializable data) { this.data = data; }", "public native T get();", "public /* bridge */ /* synthetic */ java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e9 in method: java.security.Signer.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: java.security.Signer.1.run():java.lang.Object\");\n }", "public void writeUnsafe(UnsafeMemory um) {\n int mySize = getWriteUnsafeSize();\n um.putInt(mySize);\n //serial\n um.putLong(serialVersionUID);\n\n //class member\n um.putString(fileName);\n\n\n //rocksDbKlueFileName\n um.putString(rocksDbKlueFileName);\n //boolean readOnly\n um.putBoolean(readOnly);\n\n um.putInt(last);\n\n //arrays\n um.put(nameIndex, UnsafeMemory.ARRAYLIST_STRING_TYPE);\n um.put(entries, UnsafeMemory.ARRAYLIST_KID_TYPE);\n um.put(kingdoms,UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n\n\n //No longer stored in memory\n //um.put(sequences,UnsafeMemory.ARRAYLIST_DNABITSTRING_TYPE);\n\n\n\n //ArrayList<Integer> sequenceLength = new ArrayList<Integer>();\n um.put(sequenceLength, UnsafeMemory.ARRAYLIST_INT_TYPE);\n //ArrayList<HashMap<Integer,Character>> exceptionsArr;\n\n int total = 0;\n total += UnsafeMemory.SIZE_OF_INT // byte header\n + UnsafeMemory.SIZE_OF_LONG // SerialUID\n + UnsafeMemory.SIZE_OF_INT; // number of entries\n\n for (int z=0; z < exceptionsArr.size(); z++){\n total += UnsafeMemory.getWriteUnsafeSize(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n um.putInt(total);\n um.putLong(serialVersionUID_ArrayListHashMap_INT_CHAR);\n um.putInt(exceptionsArr.size());\n for (int z=0; z < exceptionsArr.size(); z++){\n um.put(exceptionsArr.get(z), UnsafeMemory.HASHMAP_INTEGER_CHARACTER_TYPE);\n }\n\n }", "private static /* synthetic */ Object m59367b(Object obj) {\n return obj;\n }", "private native String native_init();", "HRESULT SafeArrayAccessData(SAFEARRAY psa, PointerByReference ppvData);", "@C_FUNCTION\n public static native void core_dump();", "public native void pythonDecRef();", "public interface DirectByteBufferAccess {\n\n /**\n * Returns the native memory address of the given direct byte buffer, or 0\n * if the buffer is not direct or if obtaining the address is not supported.\n * \n * @param buffer the direct byte buffer for which to obtain the address\n * @return the native memory address or 0\n */\n long getAddress(ByteBuffer buffer);\n}", "static native ByteBuffer loadJni(long[] nativeData, byte[] buffer, int offset, int len);", "private byte[] primitiveGetToken() {\n return decode(addr_, mask_, token_);\n }", "HRESULT SafeArrayUnaccessData(SAFEARRAY psa);", "private StdDSAEncoder() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.bouncycastle.jcajce.provider.asymmetric.ec.SignatureSpi.StdDSAEncoder.<init>():void\");\n }", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "public void trySafeMethod(){\n safeMethod();\n }", "public boolean isSafe()\r\n {\r\n return isSafe;\r\n }", "public long memoryAddress()\r\n/* 143: */ {\r\n/* 144:172 */ throw new UnsupportedOperationException();\r\n/* 145: */ }", "private Constantes() {\r\n\t\t// No way\r\n\t}", "public native void get(byte[] bytes);", "public /*static*/ native void init();", "static native void free(long buffer);", "private native static long init(long avi);", "private NettyHttpUtil() {\n\t\t// do nothing.\n\t}", "@java.lang.Deprecated\n /* renamed from: a */\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public static synchronized void m13804a(android.content.Context r3, com.facebook.C6787r.C6788a r4) {\n /*\n java.lang.Class<com.facebook.r> r0 = com.facebook.C6787r.class\n monitor-enter(r0)\n java.lang.Boolean r1 = f12487s // Catch:{ all -> 0x0088 }\n boolean r1 = r1.booleanValue() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0012\n if (r4 == 0) goto L_0x0010\n r4.mo20141a() // Catch:{ all -> 0x0088 }\n L_0x0010:\n monitor-exit(r0)\n return\n L_0x0012:\n java.lang.String r1 = \"applicationContext\"\n com.facebook.internal.C6697T.m13461a(r3, r1) // Catch:{ all -> 0x0088 }\n r1 = 0\n com.facebook.internal.C6697T.m13460a(r3, r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6697T.m13466b(r3, r1) // Catch:{ all -> 0x0088 }\n android.content.Context r1 = r3.getApplicationContext() // Catch:{ all -> 0x0088 }\n f12481m = r1 // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n m13810b(r1) // Catch:{ all -> 0x0088 }\n java.lang.String r1 = f12472d // Catch:{ all -> 0x0088 }\n boolean r1 = com.facebook.internal.C6694S.m13436b(r1) // Catch:{ all -> 0x0088 }\n if (r1 != 0) goto L_0x0080\n r1 = 1\n java.lang.Boolean r1 = java.lang.Boolean.valueOf(r1) // Catch:{ all -> 0x0088 }\n f12487s = r1 // Catch:{ all -> 0x0088 }\n boolean r1 = m13817g() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0041\n m13812c() // Catch:{ all -> 0x0088 }\n L_0x0041:\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n boolean r1 = r1 instanceof android.app.Application // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n boolean r1 = com.facebook.C6557O.m12974e() // Catch:{ all -> 0x0088 }\n if (r1 == 0) goto L_0x0056\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n android.app.Application r1 = (android.app.Application) r1 // Catch:{ all -> 0x0088 }\n java.lang.String r2 = f12472d // Catch:{ all -> 0x0088 }\n com.facebook.p127a.p130b.C6602h.m13083a(r1, r2) // Catch:{ all -> 0x0088 }\n L_0x0056:\n com.facebook.internal.C6670D.m13313f() // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6678J.m13355d() // Catch:{ all -> 0x0088 }\n android.content.Context r1 = f12481m // Catch:{ all -> 0x0088 }\n com.facebook.internal.C6712c.m13522a(r1) // Catch:{ all -> 0x0088 }\n com.facebook.internal.G r1 = new com.facebook.internal.G // Catch:{ all -> 0x0088 }\n com.facebook.o r2 = new com.facebook.o // Catch:{ all -> 0x0088 }\n r2.<init>() // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n f12480l = r1 // Catch:{ all -> 0x0088 }\n java.util.concurrent.FutureTask r1 = new java.util.concurrent.FutureTask // Catch:{ all -> 0x0088 }\n com.facebook.p r2 = new com.facebook.p // Catch:{ all -> 0x0088 }\n r2.<init>(r4, r3) // Catch:{ all -> 0x0088 }\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n java.util.concurrent.Executor r2 = m13822l() // Catch:{ all -> 0x0088 }\n r2.execute(r1) // Catch:{ all -> 0x0088 }\n monitor-exit(r0)\n return\n L_0x0080:\n com.facebook.FacebookException r1 = new com.facebook.FacebookException // Catch:{ all -> 0x0088 }\n java.lang.String r2 = \"A valid Facebook app id must be set in the AndroidManifest.xml or set by calling FacebookSdk.setApplicationId before initializing the sdk.\"\n r1.<init>(r2) // Catch:{ all -> 0x0088 }\n throw r1 // Catch:{ all -> 0x0088 }\n L_0x0088:\n r3 = move-exception\n monitor-exit(r0)\n throw r3\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.facebook.C6787r.m13804a(android.content.Context, com.facebook.r$a):void\");\n }", "public static native void release();", "public int available() throws java.io.IOException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.available():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.available():int\");\n }", "@Override\n public final void run() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 1: monitorenter \n // 2: ldc \"-\"\n // 4: putstatic ao.j:Ljava/lang/String;\n // 7: aconst_null \n // 8: astore 9\n // 10: aconst_null \n // 11: astore 13\n // 13: aconst_null \n // 14: astore 12\n // 16: aconst_null \n // 17: astore 14\n // 19: aconst_null \n // 20: astore 15\n // 22: aconst_null \n // 23: astore 11\n // 25: aload_0 \n // 26: getfield ao.g:Z\n // 29: istore 8\n // 31: iload 8\n // 33: ifeq 70\n // 36: aload_0 \n // 37: invokespecial ao.b:()V\n // 40: aconst_null \n // 41: invokestatic cg.Code:(Ljava/io/OutputStream;)V\n // 44: aconst_null \n // 45: invokestatic cg.Code:(Ljava/io/InputStream;)V\n // 48: aload_0 \n // 49: invokespecial ao.f:()V\n // 52: aload_0 \n // 53: getfield ao.e:Z\n // 56: ifne 63\n // 59: aload_0 \n // 60: invokevirtual ao.J:()V\n // 63: aload_0 \n // 64: invokespecial ao.C:()V\n // 67: aload_0 \n // 68: monitorexit \n // 69: return \n // 70: aload_0 \n // 71: iconst_0 \n // 72: putfield ao.h:Z\n // 75: aload_0 \n // 76: iconst_1 \n // 77: putfield ao.e:Z\n // 80: getstatic u.c:Lap;\n // 83: aload_0 \n // 84: getfield ao.J:Ljava/lang/String;\n // 87: iconst_1 \n // 88: iconst_3 \n // 89: invokevirtual ap.Code:(Ljava/lang/String;ZI)Lar;\n // 92: astore 10\n // 94: aload 10\n // 96: astore 9\n // 98: aload_0 \n // 99: aload 9\n // 101: invokeinterface ar.I:()Ljava/lang/String;\n // 106: putfield ao.J:Ljava/lang/String;\n // 109: iconst_0 \n // 110: istore_3 \n // 111: aload_0 \n // 112: iconst_0 \n // 113: putfield ao.d:I\n // 116: aload_0 \n // 117: getfield ao.b:I\n // 120: iconst_4 \n // 121: if_icmpne 142\n // 124: aload 9\n // 126: invokeinterface ar.Z:()J\n // 131: l2i \n // 132: istore_3 \n // 133: aload_0 \n // 134: iload_3 \n // 135: putfield ao.d:I\n // 138: aload_0 \n // 139: invokespecial ao.b:()V\n // 142: aload 9\n // 144: iload_3 \n // 145: i2l \n // 146: invokeinterface ar.Code:(J)Ljava/io/OutputStream;\n // 151: astore 10\n // 153: aload 10\n // 155: astore 11\n // 157: aload 14\n // 159: astore 13\n // 161: aload 15\n // 163: astore 12\n // 165: aload_0 \n // 166: iconst_4 \n // 167: putfield ao.b:I\n // 170: aload 14\n // 172: astore 13\n // 174: aload 15\n // 176: astore 12\n // 178: aload_0 \n // 179: invokespecial ao.b:()V\n // 182: iconst_m1 \n // 183: istore_2 \n // 184: iconst_0 \n // 185: istore 4\n // 187: iconst_1 \n // 188: istore 7\n // 190: iconst_1 \n // 191: istore 6\n // 193: iconst_1 \n // 194: istore 5\n // 196: aload 14\n // 198: astore 13\n // 200: aload 15\n // 202: astore 12\n // 204: aload_0 \n // 205: getfield ao.h:Z\n // 208: ifne 1380\n // 211: aload 14\n // 213: astore 13\n // 215: aload 15\n // 217: astore 12\n // 219: aload_0 \n // 220: invokespecial ao.f:()V\n // 223: aload 14\n // 225: astore 13\n // 227: aload 15\n // 229: astore 12\n // 231: aload_0 \n // 232: getfield ao.f:Z\n // 235: ifeq 560\n // 238: aload 14\n // 240: astore 13\n // 242: aload 15\n // 244: astore 12\n // 246: ldc \"NB\"\n // 248: putstatic ao.j:Ljava/lang/String;\n // 251: aload 14\n // 253: astore 13\n // 255: aload 15\n // 257: astore 12\n // 259: getstatic u.Code:Lbn;\n // 262: astore 16\n // 264: aload 14\n // 266: astore 13\n // 268: aload 15\n // 270: astore 12\n // 272: aload_0 \n // 273: getfield ao.Code:Ljava/lang/String;\n // 276: aload_0 \n // 277: getfield ao.Code:Ljava/lang/String;\n // 280: iconst_0 \n // 281: invokestatic cg.Code:(Ljava/lang/String;Z)Ljava/lang/String;\n // 284: invokevirtual java/lang/String.equals:(Ljava/lang/Object;)Z\n // 287: ifeq 543\n // 290: aload 14\n // 292: astore 13\n // 294: aload 15\n // 296: astore 12\n // 298: aload_0 \n // 299: getfield ao.Code:Ljava/lang/String;\n // 302: iconst_1 \n // 303: invokestatic cg.Code:(Ljava/lang/String;Z)Ljava/lang/String;\n // 306: astore 10\n // 308: aload 14\n // 310: astore 13\n // 312: aload 15\n // 314: astore 12\n // 316: aload_0 \n // 317: aload 16\n // 319: aload 10\n // 321: aconst_null \n // 322: ldc \"GET\"\n // 324: invokeinterface bn.Code:(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lah;\n // 329: putfield ao.a:Lah;\n // 332: iload_3 \n // 333: ifle 376\n // 336: aload 14\n // 338: astore 13\n // 340: aload 15\n // 342: astore 12\n // 344: aload_0 \n // 345: getfield ao.a:Lah;\n // 348: ldc \"Range\"\n // 350: new Ljava/lang/StringBuilder;\n // 353: dup \n // 354: ldc \"bytes=\"\n // 356: invokespecial java/lang/StringBuilder.<init>:(Ljava/lang/String;)V\n // 359: iload_3 \n // 360: invokevirtual java/lang/StringBuilder.append:(I)Ljava/lang/StringBuilder;\n // 363: ldc \"-\"\n // 365: invokevirtual java/lang/StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;\n // 368: invokevirtual java/lang/StringBuilder.toString:()Ljava/lang/String;\n // 371: invokeinterface ah.Code:(Ljava/lang/String;Ljava/lang/String;)V\n // 376: aload 14\n // 378: astore 13\n // 380: aload 15\n // 382: astore 12\n // 384: aload_0 \n // 385: getfield ao.a:Lah;\n // 388: invokeinterface ah.J:()I\n // 393: istore 4\n // 395: iload_3 \n // 396: ifne 1420\n // 399: sipush 200\n // 402: istore_1 \n // 403: goto 1394\n // 406: aload 14\n // 408: astore 13\n // 410: aload 15\n // 412: astore 12\n // 414: aload_0 \n // 415: getfield ao.a:Lah;\n // 418: invokeinterface ah.Z:()Ljava/io/DataInputStream;\n // 423: astore 10\n // 425: aload 10\n // 427: astore 13\n // 429: aload 10\n // 431: astore 12\n // 433: aload_0 \n // 434: getfield ao.a:Lah;\n // 437: invokeinterface ah.B:()J\n // 442: lconst_0 \n // 443: lcmp \n // 444: iflt 1405\n // 447: aload 10\n // 449: astore 13\n // 451: aload 10\n // 453: astore 12\n // 455: aload_0 \n // 456: getfield ao.a:Lah;\n // 459: invokeinterface ah.B:()J\n // 464: l2i \n // 465: iload_3 \n // 466: iadd \n // 467: istore_2 \n // 468: goto 1405\n // 471: iload 4\n // 473: ifeq 765\n // 476: aload 10\n // 478: astore 13\n // 480: aload 10\n // 482: astore 12\n // 484: aload_0 \n // 485: invokespecial ao.d:()V\n // 488: aload_0 \n // 489: invokespecial ao.b:()V\n // 492: aload 11\n // 494: invokestatic cg.Code:(Ljava/io/OutputStream;)V\n // 497: aload 10\n // 499: invokestatic cg.Code:(Ljava/io/InputStream;)V\n // 502: aload 9\n // 504: ifnull 514\n // 507: aload 9\n // 509: invokeinterface ar.C:()V\n // 514: aload_0 \n // 515: invokespecial ao.f:()V\n // 518: aload_0 \n // 519: getfield ao.e:Z\n // 522: ifne 529\n // 525: aload_0 \n // 526: invokevirtual ao.J:()V\n // 529: aload_0 \n // 530: invokespecial ao.C:()V\n // 533: goto 67\n // 536: astore 9\n // 538: aload_0 \n // 539: monitorexit \n // 540: aload 9\n // 542: athrow \n // 543: aload 14\n // 545: astore 13\n // 547: aload 15\n // 549: astore 12\n // 551: aload_0 \n // 552: getfield ao.Code:Ljava/lang/String;\n // 555: astore 10\n // 557: goto 308\n // 560: aload 14\n // 562: astore 13\n // 564: aload 15\n // 566: astore 12\n // 568: bipush 127\n // 570: anewarray Ljava/lang/Object;\n // 573: astore 10\n // 575: aload 14\n // 577: astore 13\n // 579: aload 15\n // 581: astore 12\n // 583: bipush 127\n // 585: newarray I\n // 587: astore 16\n // 589: aload 16\n // 591: bipush 29\n // 593: iconst_2 \n // 594: iastore \n // 595: aload 16\n // 597: bipush 37\n // 599: iload_3 \n // 600: iastore \n // 601: aload 16\n // 603: bipush 43\n // 605: aload 16\n // 607: bipush 43\n // 609: iaload \n // 610: ldc 16777216\n // 612: ior \n // 613: iastore \n // 614: aload 14\n // 616: astore 13\n // 618: aload 15\n // 620: astore 12\n // 622: aload 10\n // 624: bipush 53\n // 626: aload_0 \n // 627: getfield ao.Code:Ljava/lang/String;\n // 630: aastore \n // 631: aload 14\n // 633: astore 13\n // 635: aload 15\n // 637: astore 12\n // 639: invokestatic cg.J:()V\n // 642: aload 14\n // 644: astore 13\n // 646: aload 15\n // 648: astore 12\n // 650: aload_0 \n // 651: aload 10\n // 653: aload 16\n // 655: aload_0 \n // 656: getfield ao.I:Ljava/lang/String;\n // 659: aconst_null \n // 660: invokestatic ce.Code:(Ljava/lang/String;Ljava/lang/String;)I\n // 663: iconst_1 \n // 664: invokestatic bx.Code:([Ljava/lang/Object;[IIZ)Lby;\n // 667: putfield ao.C:Lby;\n // 670: aload 14\n // 672: astore 13\n // 674: aload 15\n // 676: astore 12\n // 678: new Ljava/io/DataInputStream;\n // 681: dup \n // 682: aload_0 \n // 683: getfield ao.C:Lby;\n // 686: invokespecial java/io/DataInputStream.<init>:(Ljava/io/InputStream;)V\n // 689: astore 10\n // 691: aload_0 \n // 692: aload 10\n // 694: invokespecial ao.Code:(Ljava/io/DataInputStream;)I\n // 697: istore_3 \n // 698: iload_3 \n // 699: ifgt 1372\n // 702: iload_3 \n // 703: invokestatic ao.I:(I)Z\n // 706: ifeq 1471\n // 709: ldc 16777216\n // 711: iload_3 \n // 712: iand \n // 713: ifne 1432\n // 716: ldc_w 1073741824\n // 719: iload_3 \n // 720: iand \n // 721: ifne 1450\n // 724: goto 1432\n // 727: aload 12\n // 729: putstatic ao.j:Ljava/lang/String;\n // 732: iload 4\n // 734: istore 5\n // 736: iload_1 \n // 737: istore 4\n // 739: iload 5\n // 741: istore_1 \n // 742: goto 471\n // 745: aload_0 \n // 746: aload 10\n // 748: invokespecial ao.Code:(Ljava/io/DataInputStream;)I\n // 751: istore_3 \n // 752: iconst_0 \n // 753: istore_1 \n // 754: goto 1437\n // 757: ldc_w \"B\"\n // 760: astore 12\n // 762: goto 727\n // 765: iload_1 \n // 766: istore 4\n // 768: iload_3 \n // 769: istore_1 \n // 770: iload 4\n // 772: ifne 795\n // 775: aload_0 \n // 776: getfield ao.c:I\n // 779: iconst_m1 \n // 780: if_icmpeq 912\n // 783: iload_1 \n // 784: aload_0 \n // 785: getfield ao.c:I\n // 788: if_icmpeq 912\n // 791: aload_0 \n // 792: invokespecial ao.d:()V\n // 795: getstatic cg.A:I\n // 798: newarray B\n // 800: astore 12\n // 802: aload_0 \n // 803: invokespecial ao.b:()V\n // 806: aload_0 \n // 807: getfield ao.h:Z\n // 810: ifne 859\n // 813: iload_1 \n // 814: istore_3 \n // 815: iload_1 \n // 816: ifeq 1485\n // 819: iload_1 \n // 820: iconst_m1 \n // 821: if_icmpne 1051\n // 824: sipush 512\n // 827: istore_3 \n // 828: aload 10\n // 830: aload 12\n // 832: iconst_0 \n // 833: iload_3 \n // 834: invokevirtual java/io/DataInputStream.read:([BII)I\n // 837: istore_3 \n // 838: iload_3 \n // 839: iconst_m1 \n // 840: if_icmpne 1062\n // 843: aload_0 \n // 844: getfield ao.c:I\n // 847: iconst_m1 \n // 848: if_icmpne 859\n // 851: aload_0 \n // 852: aload_0 \n // 853: getfield ao.d:I\n // 856: putfield ao.c:I\n // 859: aload 11\n // 861: invokevirtual java/io/OutputStream.flush:()V\n // 864: aload_0 \n // 865: invokespecial ao.b:()V\n // 868: aload 11\n // 870: invokestatic cg.Code:(Ljava/io/OutputStream;)V\n // 873: aload 10\n // 875: invokestatic cg.Code:(Ljava/io/InputStream;)V\n // 878: aload 9\n // 880: ifnull 890\n // 883: aload 9\n // 885: invokeinterface ar.C:()V\n // 890: aload_0 \n // 891: invokespecial ao.f:()V\n // 894: aload_0 \n // 895: getfield ao.e:Z\n // 898: ifne 905\n // 901: aload_0 \n // 902: invokevirtual ao.J:()V\n // 905: aload_0 \n // 906: invokespecial ao.C:()V\n // 909: goto 67\n // 912: aload_0 \n // 913: iload_1 \n // 914: putfield ao.c:I\n // 917: goto 795\n // 920: astore 13\n // 922: aload 11\n // 924: astore 12\n // 926: aload 10\n // 928: astore 11\n // 930: aload 13\n // 932: astore 10\n // 934: aload_0 \n // 935: getfield ao.b:I\n // 938: iconst_1 \n // 939: if_icmpeq 1003\n // 942: aload_0 \n // 943: getfield ao.b:I\n // 946: iconst_2 \n // 947: if_icmpeq 1003\n // 950: aload_0 \n // 951: getfield ao.h:Z\n // 954: ifne 1003\n // 957: aload_0 \n // 958: getfield ao.d:I\n // 961: aload_0 \n // 962: getfield ao.c:I\n // 965: if_icmplt 976\n // 968: aload_0 \n // 969: getfield ao.c:I\n // 972: iconst_m1 \n // 973: if_icmpne 1003\n // 976: aload 10\n // 978: instanceof Ljava/io/IOException;\n // 981: ifeq 1239\n // 984: getstatic u.Code:Lbn;\n // 987: invokeinterface bn.ap:()Z\n // 992: ifeq 1239\n // 995: aload_0 \n // 996: invokespecial ao.c:()V\n // 999: aload_0 \n // 1000: invokespecial ao.b:()V\n // 1003: aload_0 \n // 1004: invokespecial ao.b:()V\n // 1007: aload 12\n // 1009: invokestatic cg.Code:(Ljava/io/OutputStream;)V\n // 1012: aload 11\n // 1014: invokestatic cg.Code:(Ljava/io/InputStream;)V\n // 1017: aload 9\n // 1019: ifnull 1029\n // 1022: aload 9\n // 1024: invokeinterface ar.C:()V\n // 1029: aload_0 \n // 1030: invokespecial ao.f:()V\n // 1033: aload_0 \n // 1034: getfield ao.e:Z\n // 1037: ifne 1044\n // 1040: aload_0 \n // 1041: invokevirtual ao.J:()V\n // 1044: aload_0 \n // 1045: invokespecial ao.C:()V\n // 1048: goto 67\n // 1051: iload_1 \n // 1052: sipush 512\n // 1055: invokestatic java/lang/Math.min:(II)I\n // 1058: istore_3 \n // 1059: goto 828\n // 1062: aload 11\n // 1064: aload 12\n // 1066: iconst_0 \n // 1067: iload_3 \n // 1068: invokevirtual java/io/OutputStream.write:([BII)V\n // 1071: aload_0 \n // 1072: aload_0 \n // 1073: getfield ao.d:I\n // 1076: iload_3 \n // 1077: iadd \n // 1078: putfield ao.d:I\n // 1081: iload_1 \n // 1082: ifle 1369\n // 1085: iload_1 \n // 1086: iload_3 \n // 1087: isub \n // 1088: istore_1 \n // 1089: lconst_0 \n // 1090: iload_3 \n // 1091: i2l \n // 1092: iload_3 \n // 1093: i2l \n // 1094: invokestatic cg.Code:(JJJ)V\n // 1097: iload 4\n // 1099: ifne 1483\n // 1102: aload_0 \n // 1103: getfield ao.d:I\n // 1106: aload_0 \n // 1107: getfield ao.c:I\n // 1110: if_icmpeq 859\n // 1113: goto 1483\n // 1116: aload_0 \n // 1117: aload_0 \n // 1118: getfield ao.d:I\n // 1121: putfield ao.c:I\n // 1124: goto 859\n // 1127: astore 13\n // 1129: aload 10\n // 1131: astore 12\n // 1133: aload 13\n // 1135: astore 10\n // 1137: aload_0 \n // 1138: invokespecial ao.b:()V\n // 1141: aload 11\n // 1143: invokestatic cg.Code:(Ljava/io/OutputStream;)V\n // 1146: aload 12\n // 1148: invokestatic cg.Code:(Ljava/io/InputStream;)V\n // 1151: aload 9\n // 1153: ifnull 1163\n // 1156: aload 9\n // 1158: invokeinterface ar.C:()V\n // 1163: aload_0 \n // 1164: invokespecial ao.f:()V\n // 1167: aload_0 \n // 1168: getfield ao.e:Z\n // 1171: ifne 1178\n // 1174: aload_0 \n // 1175: invokevirtual ao.J:()V\n // 1178: aload_0 \n // 1179: invokespecial ao.C:()V\n // 1182: aload 10\n // 1184: athrow \n // 1185: aload_0 \n // 1186: aload 10\n // 1188: invokespecial ao.Code:(Ljava/io/DataInputStream;)I\n // 1191: istore_1 \n // 1192: iload_1 \n // 1193: invokestatic ao.I:(I)Z\n // 1196: ifeq 1214\n // 1199: ldc_w 536870912\n // 1202: iload_1 \n // 1203: iand \n // 1204: ifeq 1214\n // 1207: ldc 16777216\n // 1209: iload_1 \n // 1210: iand \n // 1211: ifeq 1501\n // 1214: aload_0 \n // 1215: invokespecial ao.d:()V\n // 1218: goto 859\n // 1221: aload_0 \n // 1222: aload 10\n // 1224: invokespecial ao.Code:(Ljava/io/DataInputStream;)I\n // 1227: istore_1 \n // 1228: invokestatic java/lang/Thread.yield:()V\n // 1231: goto 806\n // 1234: iconst_0 \n // 1235: istore_2 \n // 1236: goto 1221\n // 1239: aload_0 \n // 1240: invokevirtual ao.Z:()V\n // 1243: goto 1003\n // 1246: astore 10\n // 1248: aload 12\n // 1250: astore 13\n // 1252: aload 11\n // 1254: astore 12\n // 1256: aload 13\n // 1258: astore 11\n // 1260: goto 1137\n // 1263: astore 10\n // 1265: aconst_null \n // 1266: astore 11\n // 1268: aconst_null \n // 1269: astore 9\n // 1271: goto 1137\n // 1274: astore 10\n // 1276: aconst_null \n // 1277: astore 11\n // 1279: goto 1137\n // 1282: astore 10\n // 1284: aload 13\n // 1286: astore 12\n // 1288: goto 1137\n // 1291: astore 13\n // 1293: aload 10\n // 1295: astore 12\n // 1297: aload 13\n // 1299: astore 10\n // 1301: goto 1137\n // 1304: astore 10\n // 1306: aload 13\n // 1308: astore 12\n // 1310: goto 934\n // 1313: astore 10\n // 1315: aload 13\n // 1317: astore 12\n // 1319: goto 934\n // 1322: astore 10\n // 1324: aload 11\n // 1326: astore 13\n // 1328: aload 12\n // 1330: astore 11\n // 1332: aload 13\n // 1334: astore 12\n // 1336: goto 934\n // 1339: astore 14\n // 1341: aload 10\n // 1343: astore 12\n // 1345: aload 11\n // 1347: astore 13\n // 1349: aload 14\n // 1351: astore 10\n // 1353: aload 12\n // 1355: astore 11\n // 1357: aload 13\n // 1359: astore 12\n // 1361: goto 934\n // 1364: iload_3 \n // 1365: istore_1 \n // 1366: goto 1228\n // 1369: goto 1089\n // 1372: iconst_0 \n // 1373: istore_1 \n // 1374: iload 6\n // 1376: istore_2 \n // 1377: goto 1437\n // 1380: iconst_0 \n // 1381: istore 4\n // 1383: aconst_null \n // 1384: astore 10\n // 1386: iload_2 \n // 1387: istore_1 \n // 1388: iload 7\n // 1390: istore_2 \n // 1391: goto 770\n // 1394: iload 4\n // 1396: iload_1 \n // 1397: if_icmpeq 1427\n // 1400: iconst_1 \n // 1401: istore_1 \n // 1402: goto 406\n // 1405: iconst_0 \n // 1406: istore_3 \n // 1407: iload_1 \n // 1408: istore 4\n // 1410: iload_3 \n // 1411: istore_1 \n // 1412: iload_2 \n // 1413: istore_3 \n // 1414: iload 5\n // 1416: istore_2 \n // 1417: goto 471\n // 1420: sipush 206\n // 1423: istore_1 \n // 1424: goto 1394\n // 1427: iconst_0 \n // 1428: istore_1 \n // 1429: goto 406\n // 1432: iconst_1 \n // 1433: istore_1 \n // 1434: iload 6\n // 1436: istore_2 \n // 1437: iload 4\n // 1439: ifeq 757\n // 1442: ldc_w \"BS\"\n // 1445: astore 12\n // 1447: goto 727\n // 1450: iconst_1 \n // 1451: istore 4\n // 1453: ldc_w 268435456\n // 1456: iload_3 \n // 1457: iand \n // 1458: ifeq 1466\n // 1461: iconst_1 \n // 1462: istore_2 \n // 1463: goto 745\n // 1466: iconst_0 \n // 1467: istore_2 \n // 1468: goto 745\n // 1471: iload_3 \n // 1472: ifge 1372\n // 1475: iconst_1 \n // 1476: istore_1 \n // 1477: iload 6\n // 1479: istore_2 \n // 1480: goto 1437\n // 1483: iload_1 \n // 1484: istore_3 \n // 1485: iload_3 \n // 1486: ifne 1364\n // 1489: iload_2 \n // 1490: ifne 1116\n // 1493: iload 4\n // 1495: ifne 1185\n // 1498: goto 1116\n // 1501: iload_1 \n // 1502: ldc_w 268435456\n // 1505: iand \n // 1506: ifeq 1234\n // 1509: iconst_1 \n // 1510: istore_2 \n // 1511: goto 1221\n // Exceptions:\n // Try Handler\n // Start End Start End Type \n // ----- ----- ----- ----- ---------------------\n // 2 7 536 543 Any\n // 25 31 1304 1313 Ljava/lang/Throwable;\n // 25 31 1263 1274 Any\n // 36 63 536 543 Any\n // 63 67 536 543 Any\n // 70 94 1304 1313 Ljava/lang/Throwable;\n // 70 94 1263 1274 Any\n // 98 109 1313 1322 Ljava/lang/Throwable;\n // 98 109 1274 1282 Any\n // 111 116 1313 1322 Ljava/lang/Throwable;\n // 111 116 1274 1282 Any\n // 116 142 1313 1322 Ljava/lang/Throwable;\n // 116 142 1274 1282 Any\n // 142 153 1313 1322 Ljava/lang/Throwable;\n // 142 153 1274 1282 Any\n // 165 170 1322 1339 Ljava/lang/Throwable;\n // 165 170 1282 1291 Any\n // 178 182 1322 1339 Ljava/lang/Throwable;\n // 178 182 1282 1291 Any\n // 204 211 1322 1339 Ljava/lang/Throwable;\n // 204 211 1282 1291 Any\n // 219 223 1322 1339 Ljava/lang/Throwable;\n // 219 223 1282 1291 Any\n // 231 238 1322 1339 Ljava/lang/Throwable;\n // 231 238 1282 1291 Any\n // 246 251 1322 1339 Ljava/lang/Throwable;\n // 246 251 1282 1291 Any\n // 259 264 1322 1339 Ljava/lang/Throwable;\n // 259 264 1282 1291 Any\n // 272 290 1322 1339 Ljava/lang/Throwable;\n // 272 290 1282 1291 Any\n // 298 308 1322 1339 Ljava/lang/Throwable;\n // 298 308 1282 1291 Any\n // 316 332 1322 1339 Ljava/lang/Throwable;\n // 316 332 1282 1291 Any\n // 344 376 1322 1339 Ljava/lang/Throwable;\n // 344 376 1282 1291 Any\n // 384 395 1322 1339 Ljava/lang/Throwable;\n // 384 395 1282 1291 Any\n // 414 425 1322 1339 Ljava/lang/Throwable;\n // 414 425 1282 1291 Any\n // 433 447 1322 1339 Ljava/lang/Throwable;\n // 433 447 1282 1291 Any\n // 455 468 1322 1339 Ljava/lang/Throwable;\n // 455 468 1282 1291 Any\n // 484 488 1322 1339 Ljava/lang/Throwable;\n // 484 488 1282 1291 Any\n // 488 502 536 543 Any\n // 507 514 536 543 Any\n // 514 529 536 543 Any\n // 529 533 536 543 Any\n // 551 557 1322 1339 Ljava/lang/Throwable;\n // 551 557 1282 1291 Any\n // 568 575 1322 1339 Ljava/lang/Throwable;\n // 568 575 1282 1291 Any\n // 583 589 1322 1339 Ljava/lang/Throwable;\n // 583 589 1282 1291 Any\n // 622 631 1322 1339 Ljava/lang/Throwable;\n // 622 631 1282 1291 Any\n // 639 642 1322 1339 Ljava/lang/Throwable;\n // 639 642 1282 1291 Any\n // 650 670 1322 1339 Ljava/lang/Throwable;\n // 650 670 1282 1291 Any\n // 678 691 1322 1339 Ljava/lang/Throwable;\n // 678 691 1282 1291 Any\n // 691 698 1339 1364 Ljava/lang/Throwable;\n // 691 698 1291 1304 Any\n // 702 709 1339 1364 Ljava/lang/Throwable;\n // 702 709 1291 1304 Any\n // 727 732 1339 1364 Ljava/lang/Throwable;\n // 727 732 1291 1304 Any\n // 745 752 1339 1364 Ljava/lang/Throwable;\n // 745 752 1291 1304 Any\n // 775 795 920 934 Ljava/lang/Throwable;\n // 775 795 1127 1137 Any\n // 795 806 920 934 Ljava/lang/Throwable;\n // 795 806 1127 1137 Any\n // 806 813 920 934 Ljava/lang/Throwable;\n // 806 813 1127 1137 Any\n // 828 838 920 934 Ljava/lang/Throwable;\n // 828 838 1127 1137 Any\n // 843 859 920 934 Ljava/lang/Throwable;\n // 843 859 1127 1137 Any\n // 859 864 920 934 Ljava/lang/Throwable;\n // 859 864 1127 1137 Any\n // 864 878 536 543 Any\n // 883 890 536 543 Any\n // 890 905 536 543 Any\n // 905 909 536 543 Any\n // 912 917 920 934 Ljava/lang/Throwable;\n // 912 917 1127 1137 Any\n // 934 976 1246 1263 Any\n // 976 1003 1246 1263 Any\n // 1003 1017 536 543 Any\n // 1022 1029 536 543 Any\n // 1029 1044 536 543 Any\n // 1044 1048 536 543 Any\n // 1051 1059 920 934 Ljava/lang/Throwable;\n // 1051 1059 1127 1137 Any\n // 1062 1081 920 934 Ljava/lang/Throwable;\n // 1062 1081 1127 1137 Any\n // 1089 1097 920 934 Ljava/lang/Throwable;\n // 1089 1097 1127 1137 Any\n // 1102 1113 920 934 Ljava/lang/Throwable;\n // 1102 1113 1127 1137 Any\n // 1116 1124 920 934 Ljava/lang/Throwable;\n // 1116 1124 1127 1137 Any\n // 1137 1151 536 543 Any\n // 1156 1163 536 543 Any\n // 1163 1178 536 543 Any\n // 1178 1185 536 543 Any\n // 1185 1199 920 934 Ljava/lang/Throwable;\n // 1185 1199 1127 1137 Any\n // 1214 1218 920 934 Ljava/lang/Throwable;\n // 1214 1218 1127 1137 Any\n // 1221 1228 920 934 Ljava/lang/Throwable;\n // 1221 1228 1127 1137 Any\n // 1228 1231 920 934 Ljava/lang/Throwable;\n // 1228 1231 1127 1137 Any\n // 1239 1243 1246 1263 Any\n // \n // The error that occurred was:\n // \n // java.lang.IndexOutOfBoundsException: Index: 749, Size: 749\n // at java.util.ArrayList.rangeCheck(ArrayList.java:659)\n // at java.util.ArrayList.get(ArrayList.java:435)\n // at com.strobel.decompiler.ast.AstBuilder.convertToAst(AstBuilder.java:3379)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:113)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:206)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:94)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:840)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:733)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:610)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:577)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:193)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:160)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:135)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:333)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:254)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "public native void instanceVoid();", "long memoryUnused();", "private static native boolean nativeClassInit();", "HRESULT SafeArrayLock(SAFEARRAY psa);", "private static int m69982c() {\n /* JADX: method processing error */\n/*\nError: java.lang.NullPointerException\n*/\n /*\n r0 = \"android.os.Build$VERSION\";\t Catch:{ Exception -> 0x0018 }\n r0 = java.lang.Class.forName(r0);\t Catch:{ Exception -> 0x0018 }\n r1 = \"SDK_INT\";\t Catch:{ Exception -> 0x0018 }\n r0 = r0.getField(r1);\t Catch:{ Exception -> 0x0018 }\n r1 = 0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.get(r1);\t Catch:{ Exception -> 0x0018 }\n r0 = (java.lang.Integer) r0;\t Catch:{ Exception -> 0x0018 }\n r0 = r0.intValue();\t Catch:{ Exception -> 0x0018 }\n return r0;\n L_0x0018:\n r0 = 0;\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.internal.util.f.c():int\");\n }", "private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:58:16.466 -0500\", hash_original_method = \"37AAAAC75A3E4652292E435C97659047\", hash_generated_method = \"DF49315663E2606797D4BA6FB493CF14\")\n \n private int _eglGetCurrentContext(){\n \treturn getTaintInt();\n }", "public static native int OpenMM_AmoebaVdwForce_getNonbondedMethod(PointerByReference target);", "private native void unrefMsgCPtr ();", "public static native void setLeak(boolean enable);", "public interface Native {\n\n}", "public boolean isCanBeSafe() {\r\n return canBeSafe;\r\n }", "public ByteBuffer nioBuffer()\r\n/* 703: */ {\r\n/* 704:712 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 705:713 */ return super.nioBuffer();\r\n/* 706: */ }", "protected native void init();", "public static void preventIllegalAccessWarnings()\n {\n // Example \"annoying\" trace:\n // WARNING: An illegal reflective access operation has occurred\n // WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:...)\n // WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil\n // WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations\n // WARNING: All illegal access operations will be denied in a future release\n try\n {\n Class<?> c = Class.forName(\"jdk.internal.module.IllegalAccessLogger\");\n Field f = c.getDeclaredField(\"logger\");\n f.setAccessible(true);\n f.set(null, null);\n }\n catch (Exception e)\n {\n // ignore\n }\n }", "public native void constructor();", "public int read() throws java.io.IOException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.read():int, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.read():int\");\n }", "public native static void jnikillMira();", "public boolean canHandleBinaryNatively()\n/* */ {\n/* 391 */ return false;\n/* */ }", "private synchronized native void nativeHide() \n throws UnsatisfiedLinkError;", "public long getContext() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: com.android.org.conscrypt.OpenSSLBIOSource.getContext():long, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.getContext():long\");\n }", "public ByteBufferInputStream(java.nio.ByteBuffer r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e8 in method: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.<init>(java.nio.ByteBuffer):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.android.org.conscrypt.OpenSSLBIOSource.ByteBufferInputStream.<init>(java.nio.ByteBuffer):void\");\n }", "private BufferUtil() {\n\n }", "public static void disableJava9IllegalAccessWarning( ClassLoader cl )\n {\n if( JreUtil.isJava8() )\n {\n return;\n }\n\n try\n {\n Class cls = Class.forName( \"jdk.internal.module.IllegalAccessLogger\", false, cl );\n Field logger = cls.getDeclaredField( \"logger\" );\n getUnsafe().putObjectVolatile( cls, getUnsafe().staticFieldOffset( logger ), null );\n }\n catch( Throwable ignore )\n {\n }\n }", "int executeSafely();", "private static boolean isUnsafeVelocity(Vector vel) {\n/* 448 */ double x = vel.getX();\n/* 449 */ double y = vel.getY();\n/* 450 */ double z = vel.getZ();\n/* */ \n/* 452 */ if (x > 4.0D || x < -4.0D || y > 4.0D || y < -4.0D || z > 4.0D || z < -4.0D) {\n/* 453 */ return true;\n/* */ }\n/* */ \n/* 456 */ return false;\n/* */ }", "private native String native_finalize();", "private SecurityConsts()\r\n\t{\r\n\r\n\t}", "public static void memBar(){\n \n }", "public static boolean canAccessFieldsDirectly(){\n return false; //TODO codavaj!!\n }", "public java.lang.Object run() throws java.lang.Exception {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: javax.crypto.JarVerifier.1.run():java.lang.Object, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: javax.crypto.JarVerifier.1.run():java.lang.Object\");\n }", "@android.support.annotation.RequiresApi(api = 23)\n /* Code decompiled incorrectly, please refer to instructions dump. */\n public final synchronized void b(boolean r11) {\n /*\n r10 = this;\n monitor-enter(r10)\n r8 = 1\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x004b }\n java.lang.Byte r2 = java.lang.Byte.valueOf(r11) // Catch:{ all -> 0x004b }\n r9 = 0\n r1[r9] = r2 // Catch:{ all -> 0x004b }\n com.meituan.robust.ChangeQuickRedirect r3 = f29525a // Catch:{ all -> 0x004b }\n r4 = 0\n r5 = 16804(0x41a4, float:2.3547E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x004b }\n java.lang.Class r2 = java.lang.Boolean.TYPE // Catch:{ all -> 0x004b }\n r6[r9] = r2 // Catch:{ all -> 0x004b }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x004b }\n r2 = r10\n boolean r1 = com.meituan.robust.PatchProxy.isSupport(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x004b }\n if (r1 == 0) goto L_0x003a\n java.lang.Object[] r1 = new java.lang.Object[r8] // Catch:{ all -> 0x004b }\n java.lang.Byte r0 = java.lang.Byte.valueOf(r11) // Catch:{ all -> 0x004b }\n r1[r9] = r0 // Catch:{ all -> 0x004b }\n com.meituan.robust.ChangeQuickRedirect r3 = f29525a // Catch:{ all -> 0x004b }\n r4 = 0\n r5 = 16804(0x41a4, float:2.3547E-41)\n java.lang.Class[] r6 = new java.lang.Class[r8] // Catch:{ all -> 0x004b }\n java.lang.Class r0 = java.lang.Boolean.TYPE // Catch:{ all -> 0x004b }\n r6[r9] = r0 // Catch:{ all -> 0x004b }\n java.lang.Class r7 = java.lang.Void.TYPE // Catch:{ all -> 0x004b }\n r2 = r10\n com.meituan.robust.PatchProxy.accessDispatch(r1, r2, r3, r4, r5, r6, r7) // Catch:{ all -> 0x004b }\n monitor-exit(r10)\n return\n L_0x003a:\n com.ss.android.medialib.camera.IESCameraInterface r1 = r10.f29527c // Catch:{ all -> 0x004b }\n boolean r1 = r1 instanceof com.ss.android.medialib.camera.IESHwCamera // Catch:{ all -> 0x004b }\n if (r1 == 0) goto L_0x0049\n com.ss.android.medialib.camera.IESCameraInterface r1 = r10.f29527c // Catch:{ all -> 0x004b }\n com.ss.android.medialib.camera.IESHwCamera r1 = (com.ss.android.medialib.camera.IESHwCamera) r1 // Catch:{ all -> 0x004b }\n r1.c((boolean) r11) // Catch:{ all -> 0x004b }\n r10.n = r11 // Catch:{ all -> 0x004b }\n L_0x0049:\n monitor-exit(r10)\n return\n L_0x004b:\n r0 = move-exception\n monitor-exit(r10)\n throw r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ss.android.medialib.camera.g.b(boolean):void\");\n }", "private static native long create_0(int mode);", "void m5768b() throws C0841b;", "public static void checkRequiredMethods(Class<Unsafe> clazz) throws NoSuchMethodException, SecurityException {\n clazz.getMethod(\"arrayBaseOffset\", Class.class);\n clazz.getMethod(\"getByte\", Object.class, Long.TYPE);\n clazz.getMethod(\"putByte\", Object.class, Long.TYPE, Byte.TYPE);\n clazz.getMethod(\"getLong\", Object.class, Long.TYPE);\n clazz.getMethod(\"objectFieldOffset\", Field.class);\n clazz.getMethod(\"getByte\", Long.TYPE);\n clazz.getMethod(\"getLong\", Object.class, Long.TYPE);\n clazz.getMethod(\"putByte\", Long.TYPE, Byte.TYPE);\n clazz.getMethod(\"getLong\", Long.TYPE);\n }", "public ByteBuffer[] nioBuffers()\r\n/* 715: */ {\r\n/* 716:724 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 717:725 */ return super.nioBuffers();\r\n/* 718: */ }", "@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }", "static void recordLeakNonRefCountingOperation(ResourceLeakTracker<ByteBuf> leak)\r\n/* 46: */ {\r\n/* 47: 63 */ if (!ACQUIRE_AND_RELEASE_ONLY) {\r\n/* 48: 64 */ leak.record();\r\n/* 49: */ }\r\n/* 50: */ }", "private static ByteBuffer createNativeByteBuffer(int length) {\n ByteBuffer bb = ByteBuffer.allocateDirect(length);\n // use the device hardware's native byte order\n bb.order(ByteOrder.nativeOrder());\n return bb;\n }", "private static native boolean read_0(long nativeObj, long image_nativeObj);", "private static Object m24226b() {\n try {\n return f18405b.newInstance(new Object[0]);\n } catch (Throwable e) {\n throw new RuntimeException(e);\n }\n }", "@External\r\n\t@ClientFunc\r\n\tpublic MetaVar __gc();", "@Override\n public final void run() {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 3: invokevirtual cd.I:()V\n // 6: getstatic u.Code:Lbn;\n // 9: invokeinterface bn.p:()Z\n // 14: ifne 43\n // 17: aload_0 \n // 18: monitorenter \n // 19: invokestatic com/opera/mini/android/bf.c:()Z\n // 22: ifne 62\n // 25: aload_0 \n // 26: iconst_0 \n // 27: invokestatic cg.Code:(Ljava/lang/Object;I)V\n // 30: getstatic u.Code:Lbn;\n // 33: invokeinterface bn.p:()Z\n // 38: ifeq 62\n // 41: aload_0 \n // 42: monitorexit \n // 43: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 46: ifnull 55\n // 49: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 52: invokevirtual com/opera/mini/android/k.g:()V\n // 55: invokestatic com/opera/mini/android/bf.B:()Lcd;\n // 58: invokevirtual cd.Z:()V\n // 61: return \n // 62: invokestatic com/opera/mini/android/bf.d:()Z\n // 65: pop \n // 66: invokestatic com/opera/mini/android/bf.e:()I\n // 69: istore_1 \n // 70: invokestatic com/opera/mini/android/bf.f:()I\n // 73: istore_2 \n // 74: invokestatic com/opera/mini/android/bf.g:()I\n // 77: istore_3 \n // 78: invokestatic com/opera/mini/android/bf.h:()I\n // 81: istore 4\n // 83: iconst_0 \n // 84: invokestatic com/opera/mini/android/bf.Code:(I)I\n // 87: pop \n // 88: aload_0 \n // 89: monitorexit \n // 90: aload_0 \n // 91: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 94: invokevirtual com/opera/mini/android/bf.getWidth:()I\n // 97: istore 5\n // 99: aload_0 \n // 100: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 103: invokevirtual com/opera/mini/android/bf.getHeight:()I\n // 106: istore 6\n // 108: iload 5\n // 110: ifle 6\n // 113: iload 6\n // 115: ifle 6\n // 118: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 121: ifnull 146\n // 124: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 127: invokevirtual android/graphics/Bitmap.getWidth:()I\n // 130: iload 5\n // 132: if_icmpne 146\n // 135: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 138: invokevirtual android/graphics/Bitmap.getHeight:()I\n // 141: iload 6\n // 143: if_icmpeq 209\n // 146: aconst_null \n // 147: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/k;)Lcom/opera/mini/android/k;\n // 150: pop \n // 151: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 154: ifnull 168\n // 157: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 160: invokevirtual android/graphics/Bitmap.recycle:()V\n // 163: aconst_null \n // 164: invokestatic com/opera/mini/android/bf.Code:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;\n // 167: pop \n // 168: iload 5\n // 170: iload 6\n // 172: invokestatic com/opera/mini/android/bg.Code:(II)Landroid/graphics/Bitmap;\n // 175: invokestatic com/opera/mini/android/bf.Code:(Landroid/graphics/Bitmap;)Landroid/graphics/Bitmap;\n // 178: pop \n // 179: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 182: ifnull 55\n // 185: aload_0 \n // 186: monitorenter \n // 187: invokestatic com/opera/mini/android/bf.j:()I\n // 190: pop \n // 191: invokestatic com/opera/mini/android/bf.k:()I\n // 194: pop \n // 195: iload 5\n // 197: invokestatic com/opera/mini/android/bf.Code:(I)I\n // 200: pop \n // 201: iload 6\n // 203: invokestatic com/opera/mini/android/bf.I:(I)I\n // 206: pop \n // 207: aload_0 \n // 208: monitorexit \n // 209: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 212: ifnonnull 242\n // 215: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 218: invokestatic com/opera/mini/android/k.I:(Landroid/graphics/Bitmap;)Lcom/opera/mini/android/k;\n // 221: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/k;)Lcom/opera/mini/android/k;\n // 224: pop \n // 225: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 228: iconst_1 \n // 229: invokevirtual com/opera/mini/android/k.Code:(Z)V\n // 232: aload_0 \n // 233: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 236: invokestatic com/opera/mini/android/bf.Code:(Lcom/opera/mini/android/bf;)Lcom/opera/mini/android/MiniView;\n // 239: invokevirtual com/opera/mini/android/MiniView.I:()V\n // 242: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 245: invokevirtual com/opera/mini/android/k.a:()Z\n // 248: ifeq 290\n // 251: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 254: iload_1 \n // 255: iload_2 \n // 256: iload_3 \n // 257: iload 4\n // 259: invokevirtual com/opera/mini/android/k.Code:(IIII)V\n // 262: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 265: iload_1 \n // 266: iload_2 \n // 267: iload_3 \n // 268: iload 4\n // 270: ldc 16777215\n // 272: invokevirtual com/opera/mini/android/k.Z:(IIIII)V\n // 275: getstatic com/opera/mini/android/Browser.Code:Lcom/opera/mini/android/a;\n // 278: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 281: invokevirtual com/opera/mini/android/a.Code:(Law;)V\n // 284: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 287: invokevirtual com/opera/mini/android/k.b:()V\n // 290: invokestatic com/opera/mini/android/bf.l:()Lcom/opera/mini/android/k;\n // 293: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 296: invokevirtual com/opera/mini/android/k.Code:(Landroid/graphics/Bitmap;)V\n // 299: aload_0 \n // 300: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 303: invokestatic com/opera/mini/android/bf.I:(Lcom/opera/mini/android/bf;)Landroid/view/SurfaceHolder;\n // 306: invokeinterface android/view/SurfaceHolder.lockCanvas:()Landroid/graphics/Canvas;\n // 311: astore 7\n // 313: aload 7\n // 315: ifnull 6\n // 318: aload 7\n // 320: invokestatic com/opera/mini/android/bf.i:()Landroid/graphics/Bitmap;\n // 323: fconst_0 \n // 324: fconst_0 \n // 325: aconst_null \n // 326: invokevirtual android/graphics/Canvas.drawBitmap:(Landroid/graphics/Bitmap;FFLandroid/graphics/Paint;)V\n // 329: aload_0 \n // 330: getfield com/opera/mini/android/bg.Code:Lcom/opera/mini/android/bf;\n // 333: invokestatic com/opera/mini/android/bf.I:(Lcom/opera/mini/android/bf;)Landroid/view/SurfaceHolder;\n // 336: aload 7\n // 338: invokeinterface android/view/SurfaceHolder.unlockCanvasAndPost:(Landroid/graphics/Canvas;)V\n // 343: goto 6\n // 346: astore 7\n // 348: invokestatic com/opera/mini/android/bf.B:()Lcd;\n // 351: invokevirtual cd.Z:()V\n // 354: aload 7\n // 356: athrow \n // 357: astore 7\n // 359: aload_0 \n // 360: monitorexit \n // 361: aload 7\n // 363: athrow \n // 364: astore 7\n // 366: aload_0 \n // 367: monitorexit \n // 368: aload 7\n // 370: athrow \n // Exceptions:\n // Try Handler\n // Start End Start End Type\n // ----- ----- ----- ----- ----\n // 6 19 346 357 Any\n // 19 43 357 364 Any\n // 43 55 346 357 Any\n // 62 90 357 364 Any\n // 90 108 346 357 Any\n // 118 146 346 357 Any\n // 146 168 346 357 Any\n // 168 187 346 357 Any\n // 187 209 364 371 Any\n // 209 242 346 357 Any\n // 242 290 346 357 Any\n // 290 313 346 357 Any\n // 318 343 346 357 Any\n // 359 364 346 357 Any\n // 366 371 346 357 Any\n // \n // The error that occurred was:\n // \n // java.lang.IndexOutOfBoundsException: Index: 163, Size: 163\n // at java.util.ArrayList.rangeCheck(ArrayList.java:659)\n // at java.util.ArrayList.get(ArrayList.java:435)\n // at com.strobel.decompiler.ast.AstBuilder.convertToAst(AstBuilder.java:3379)\n // at com.strobel.decompiler.ast.AstBuilder.build(AstBuilder.java:113)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:206)\n // at com.strobel.decompiler.languages.java.ast.AstMethodBodyBuilder.createMethodBody(AstMethodBodyBuilder.java:94)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethodBody(AstBuilder.java:840)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createMethod(AstBuilder.java:733)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addTypeMembers(AstBuilder.java:610)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeCore(AstBuilder.java:577)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createTypeNoCache(AstBuilder.java:193)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.createType(AstBuilder.java:160)\n // at com.strobel.decompiler.languages.java.ast.AstBuilder.addType(AstBuilder.java:135)\n // at com.strobel.decompiler.languages.java.JavaLanguage.buildAst(JavaLanguage.java:71)\n // at com.strobel.decompiler.languages.java.JavaLanguage.decompileType(JavaLanguage.java:59)\n // at com.strobel.decompiler.DecompilerDriver.decompileType(DecompilerDriver.java:333)\n // at com.strobel.decompiler.DecompilerDriver.decompileJar(DecompilerDriver.java:254)\n // at com.strobel.decompiler.DecompilerDriver.main(DecompilerDriver.java:144)\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }", "@DISPID(1611006056) //= 0x60060068. The runtime will prefer the VTID if present\n @VTID(131)\n boolean linkedExternalReferencesWarningAtCreation();", "private native void nRegister();", "public synchronized void mo28699e() {\n if (mo27566d()) {\n throw new PooledByteBuffer.C3959a();\n }\n }", "private boolean useWeakThreadLocals() {\n try {\n val property = System.getProperty(\"com.github.bingoohuang.mtcp.useWeakReferences\");\n if (property != null) { // undocumented manual override of WeakReference behavior\n return Boolean.parseBoolean(property);\n }\n\n return getClass().getClassLoader() != ClassLoader.getSystemClassLoader();\n } catch (SecurityException se) {\n return true;\n }\n }", "@C_FUNCTION\n public static native void syscall_membarrier();", "public interface CLibrary extends LibCAPI, Library {\n\n int AI_CANONNAME = 2;\n\n int UT_LINESIZE = 32;\n int UT_NAMESIZE = 32;\n int UT_HOSTSIZE = 256;\n int LOGIN_PROCESS = 6; // Session leader of a logged in user.\n int USER_PROCESS = 7; // Normal process.\n\n @FieldOrder({ \"sa_family\", \"sa_data\" })\n class Sockaddr extends Structure {\n public short sa_family;\n public byte[] sa_data = new byte[14];\n\n public static class ByReference extends Sockaddr implements Structure.ByReference {\n }\n }\n\n @FieldOrder({ \"ai_flags\", \"ai_family\", \"ai_socktype\", \"ai_protocol\", \"ai_addrlen\", \"ai_addr\", \"ai_canonname\",\n \"ai_next\" })\n class Addrinfo extends Structure {\n public int ai_flags;\n public int ai_family;\n public int ai_socktype;\n public int ai_protocol;\n public int ai_addrlen;\n public Sockaddr.ByReference ai_addr;\n public String ai_canonname;\n public ByReference ai_next;\n\n public static class ByReference extends Addrinfo implements Structure.ByReference {\n }\n\n public Addrinfo() {\n }\n\n public Addrinfo(Pointer p) {\n super(p);\n read();\n }\n }\n\n /*\n * Between macOS and FreeBSD there are multiple versions of some tcp/udp/ip\n * stats structures. Since we only need a few of the hundreds of fields, we can\n * improve performance by selectively reading the ints from the appropriate\n * offsets, which are consistent across the structure. These classes include the\n * common fields and offsets.\n */\n\n class BsdTcpstat {\n public int tcps_connattempt; // 0\n public int tcps_accepts; // 4\n public int tcps_drops; // 12\n public int tcps_conndrops; // 16\n public int tcps_sndpack; // 64\n public int tcps_sndrexmitpack; // 72\n public int tcps_rcvpack; // 104\n public int tcps_rcvbadsum; // 112\n public int tcps_rcvbadoff; // 116\n public int tcps_rcvmemdrop; // 120\n public int tcps_rcvshort; // 124\n }\n\n class BsdUdpstat {\n public int udps_ipackets; // 0\n public int udps_hdrops; // 4\n public int udps_badsum; // 8\n public int udps_badlen; // 12\n public int udps_opackets; // 36\n public int udps_noportmcast; // 48\n public int udps_rcv6_swcsum; // 64\n public int udps_snd6_swcsum; // 89\n }\n\n class BsdIpstat {\n public int ips_total; // 0\n public int ips_badsum; // 4\n public int ips_tooshort; // 8\n public int ips_toosmall; // 12\n public int ips_badhlen; // 16\n public int ips_badlen; // 20\n public int ips_delivered; // 56\n }\n\n class BsdIp6stat {\n public long ip6s_total; // 0\n public long ip6s_localout; // 88\n }\n\n /**\n * Returns the process ID of the calling process. The ID is guaranteed to be\n * unique and is useful for constructing temporary file names.\n *\n * @return the process ID of the calling process.\n */\n int getpid();\n\n /**\n * Given node and service, which identify an Internet host and a service,\n * getaddrinfo() returns one or more addrinfo structures, each of which contains\n * an Internet address that can be specified in a call to bind(2) or connect(2).\n *\n * @param node\n * a numerical network address or a network hostname, whose network\n * addresses are looked up and resolved.\n * @param service\n * sets the port in each returned address structure.\n * @param hints\n * specifies criteria for selecting the socket address structures\n * returned in the list pointed to by res.\n * @param res\n * returned address structure\n * @return 0 on success; sets errno on failure\n */\n int getaddrinfo(String node, String service, Addrinfo hints, PointerByReference res);\n\n /**\n * Frees the memory that was allocated for the dynamically allocated linked list\n * res.\n *\n * @param res\n * Pointer to linked list returned by getaddrinfo\n */\n void freeaddrinfo(Pointer res);\n\n /**\n * Translates getaddrinfo error codes to a human readable string, suitable for\n * error reporting.\n *\n * @param e\n * Error code from getaddrinfo\n * @return A human-readable version of the error code\n */\n String gai_strerror(int e);\n\n /**\n * Rewinds the file pointer to the beginning of the utmp file. It is generally a\n * good idea to call it before any of the other functions.\n */\n void setutxent();\n\n /**\n * Closes the utmp file. It should be called when the user code is done\n * accessing the file with the other functions.\n */\n void endutxent();\n}", "public static native PointerByReference OpenMM_AmoebaVdwForce_create();" ]
[ "0.83629423", "0.83534235", "0.815895", "0.80678904", "0.73616946", "0.692554", "0.6731847", "0.6082858", "0.5870311", "0.5616615", "0.5604604", "0.5487079", "0.54483455", "0.5427406", "0.527393", "0.52713174", "0.52694935", "0.5239426", "0.5213782", "0.5183362", "0.51049787", "0.5064358", "0.50627744", "0.50424796", "0.50369835", "0.50258595", "0.5015102", "0.5007386", "0.49981183", "0.499363", "0.4989977", "0.49690396", "0.4925066", "0.49232075", "0.4900428", "0.48950833", "0.48873964", "0.48858118", "0.48810273", "0.4874317", "0.48652735", "0.48430213", "0.48395395", "0.48314884", "0.4830332", "0.48218498", "0.48170078", "0.48143694", "0.4811253", "0.47975883", "0.47904077", "0.47714323", "0.47700837", "0.47688395", "0.47657445", "0.47632316", "0.47574177", "0.47560588", "0.4752002", "0.47463688", "0.4746318", "0.47388932", "0.4738592", "0.47304022", "0.47253147", "0.47226438", "0.47215763", "0.47184372", "0.47161466", "0.47140977", "0.47130275", "0.46895465", "0.46865803", "0.468564", "0.468506", "0.46847594", "0.46772358", "0.46745858", "0.46731567", "0.46711338", "0.46684378", "0.46654555", "0.46645322", "0.46603405", "0.46596074", "0.46584767", "0.4657362", "0.4652239", "0.4649118", "0.46486267", "0.4647212", "0.46461117", "0.4642389", "0.46411553", "0.4637604", "0.46361738", "0.46319354", "0.46292326", "0.4625617", "0.4616704", "0.4616078" ]
0.0
-1
Returns the "sessionCookie" string in SharedPreferences for the given context
public static String getCookie(Context pAppContext) { if (pAppContext == null) { return null; } return getSharedPrefsString(pAppContext, R.string.sessionCookie); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String getToken(Context context) {\r\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.shared_preferences), MODE_PRIVATE);\r\n return preferences.getString(context.getString(R.string.token), null);\r\n }", "private static SharedPreferences getSharedPrefs(final Context context) {\n final String prefsName = context.getString(R.string.sharedprefs_name);\n return context.getSharedPreferences(prefsName, Context.MODE_PRIVATE);\n }", "String getCookiePath()\n {\n return getApplicationContext();\n }", "private static SharedPreferences getSharedPreferences(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "public static final SharedPreferences get(Context context) {\r\n return context.getSharedPreferences(\"gcm\", Context.MODE_PRIVATE);\r\n }", "private static SharedPreferences getSharedPreference(Context context){\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "public String getCurrentIdentity(){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n if(mSharedPreference.contains(\"zzxxyz\")) {\n\n return mSharedPreference.getString(\"zzxxyz\", \"\");\n }\n else\n return \"\";\n}", "public static java.lang.String getDefaultSharedPreferencesName(android.content.Context context) { throw new RuntimeException(\"Stub!\"); }", "private SharedPreferences GetPreferences( Context context )\n\t{\n\t\treturn context.getSharedPreferences( CACHE_NAME, Context.MODE_PRIVATE );\n\t}", "private static SharedPreferences getSharedPreferences(Context context) {\n return context.getSharedPreferences(SMILE_PREFERENCES, Context.MODE_PRIVATE);\n }", "private static SharedPreferences getSharedPreferences() {\n Context ctx = AppUtils.getAppContext();\n return ctx.getSharedPreferences(\"pref_user_session_data\", Context.MODE_PRIVATE);\n }", "public static SharedPreferences getCommonSharedPrefs(Context context) {\r\n return context.getSharedPreferences(AppConstants.SP_COMMON, Context.MODE_MULTI_PROCESS);\r\n }", "public static SharedPreferences getSharedPreferences(Context ctx) {\n return ctx.getSharedPreferences(Const.SHARED_PREFERENCES_FILE_NAME, Context.MODE_PRIVATE);\n }", "public static String getGoogleCookie() {\n return GOOGLE_COOKIE;\n }", "public static String getAccessToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN, null);\n\t\t}", "public static String getSessionCookie(final Request request) {\n if (request.raw().getCookies() == null) {\n return null;\n }\n for (Cookie cookie : request.raw().getCookies()) {\n if (cookie.getName().equals(\"session\")) {\n return cookie.getValue();\n }\n }\n return null;\n }", "public static String getPrefStringData(Context context, String key) {\n try {\n SharedPreferences pref = context.getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n return pref.getString(key, \"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"\";\n }", "public static String getRole(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n return prefs.getString(\"ROLE\", \"nothing\");\n }", "public String getSeCookie() {\n return seCookie;\n }", "public static String getPreferencesString(final Context context,\n\t\t\tfinal String key) {\n\t\tString result;\n\t\ttry {\n\t\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t\t.getDefaultSharedPreferences(context);\n\t\t\tresult = sharedPreferences.getString(key, \"\");\n\t\t} catch (NullPointerException exception) {\n\t\t\tresult = null;\n\t\t}\n\t\treturn result;\n\t}", "public static String getSessionId(Context mContext) {\n Calendar aGMTCalendar = Calendar.getInstance(TimeZone.getTimeZone(\"GMT-0\"));\n return ReadCacheTool.getUId(mContext) + \"_\" + aGMTCalendar.getTimeInMillis();\n }", "public static boolean setCookie(Context pAppContext, String pNewCookie) {\n\t\t// Fail if either argument is null\n\t\tif (pAppContext == null || pNewCookie == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn setSharedPrefsString(pAppContext, R.string.sessionCookie,\n\t\t\t\tpNewCookie);\n\t}", "public static String getString(String key, Context context) {\n return getSharedPreferences(context).getString(key, \"\");\n }", "public static String getCurrentUserIdentifier(@NonNull Context context) {\n synchronized (userIdLocker) {\n SharedPreferences preferences = context.getSharedPreferences(SharedPrefs.PREFS_FILE, Context.MODE_PRIVATE);\n return preferences.getString(SharedPrefs.KEY_USER_IDENTIFIER, getInstallId());\n }\n }", "public static Pair<String, String> getLoginInfo(Context context) {\n SharedPreferences sharePreference = context.getSharedPreferences(preferenceName, Context.MODE_PRIVATE);\n byte[] emailRaw = Base64.decode(sharePreference.getString(KEY_EMAIL, \"\"), Base64.DEFAULT);\n byte[] pwdRaw = Base64.decode(sharePreference.getString(KEY_PWD, \"\"), Base64.DEFAULT);\n return new Pair<>(new String(emailRaw), new String(pwdRaw));\n }", "public static String getAppliedValue(Context context) {\n return Utilities.getDevicePrefs(context).getString(KEY_PREFERENCE, \"\");\n }", "public String getCookie(String name) {\n\t\treturn getCookie(name, null);\n\t}", "public String getCookie(String name) {\r\n return _cookies.get(name);\r\n }", "java.lang.String getSessionID();", "public abstract String getPreferences(String sessionId)\n\t\t\tthrows PreferencesException, SessionException;", "public static String getAccessTokenSecret(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_ACCESS_TOKEN_SECRET, null);\n\t\t}", "public static SharedPreferences getActiveUserSharedPreferences(\r\n\t\t\tContext context) {\r\n\t\tSharedPreferences result = null;\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tString activeUserId = prefs.getString(PreferenceKeys.ActiveUserId,\r\n\t\t\t\t\t\"\");\r\n\t\t\tif (!TextUtils.isEmpty(activeUserId)) {\r\n\t\t\t\tString userConfigFileName = getUserConfigFileName(context,\r\n\t\t\t\t\t\tactiveUserId);\r\n\t\t\t\tresult = context.getSharedPreferences(userConfigFileName,\r\n\t\t\t\t\t\tContext.MODE_PRIVATE);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn result;\r\n\t}", "public CharSequence getPooledStringForCookie(int cookie, int id) {\n return getApkAssets()[cookie - 1].getStringFromPool(id);\n }", "private static Cookie getCookie() {\n if (cookie == null) {\n synchronized (DefaultEntityManagerImpl.class) {\n if (cookie == null) {\n cookie = new Cookie(cookieName, getAppTokenId());\n }\n }\n }\n return cookie;\n }", "public String getSessionContext() {\n return this.SessionContext;\n }", "public static String getRequestTokenSecret(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN_SECRET, null);\n\t\t}", "public static String getOtherPlayer(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n return prefs.getString(\"OtherPlayer\", \"nothing\");\n }", "@DOMSupport(DomLevel.ONE)\r\n @Property String getCookie();", "public String getSessionID() {\n Object ref = sessionID_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sessionID_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getSessionID() {\n Object ref = sessionID_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sessionID_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }", "private void saveAsCurrentSession(Context context) {\n \t// Save the context\n \tthis.context = context;\n }", "public static String getColorCode(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context).\n getString(OPTION_COLOR_CODE, OPTION_COLOR_CODE_DEFAULT);\n }", "public String getSessionID() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sessionID_ = s;\n return s;\n }\n }", "public String getSessionID() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n sessionID_ = s;\n return s;\n }\n }", "String getSessionID();", "String getSessionID();", "public static synchronized Session getCurrentSession(Context context) {\n \tif (Session.currentSession == null) {\n Session.sessionFromCurrentSession(context);\n \t}\n\n \t\treturn Session.currentSession;\n }", "public MauiCookie getSessionCookie ()\n\t{\n\t\treturn new MauiCookie (\"Maui.HTTPSession\",\n\t\t\t\t\t\t\t sessionID,\n\t\t\t\t\t\t\t null,\n\t\t\t\t\t\t\t \"/\",\n\t\t\t\t\t\t\t null);\n\t}", "public static String getSetting(Context context, String key) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n return sp.getString(key, null);\n\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "public static Serializable getSerializable(Context context, String key) {\r\n\t\tif (sInstance !=null && sInstance.mSettings.containsKey(key)) {\r\n\t\t\treturn (Serializable) sInstance.mSettings.get(key);\r\n\t\t}\r\n\t\tSerializable val = null;\r\n\t\ttry {\r\n\t\t\tfinal String encodedValue = getPreferences(context).getString(key, null);\r\n\t\t\tif (encodedValue == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t\tval = (Serializable) Common.deserializeObject(Base64.decode(encodedValue.getBytes(), Base64.DEFAULT));\r\n\t\t} catch(ClassCastException e) {\r\n\t\t\tDebug.logException(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, val);\r\n\t\t}\r\n\t\t\r\n\t\treturn val;\r\n\t}", "public static String getSessionId(List<Cookie> cookies) {\n for (Cookie cookie : cookies) {\n if (cookie.getName().equals(COOKIE_NAME_SESSION)) {\n return cookie.getValue();\n }\n }\n return null;\n }", "public String getCookieInfo(Cookie cookie) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tsb.append(cookie.getName()).append(\"=\").append(cookie.getValue());\r\n\t\tif (cookie.getComment() != null)\r\n sb.append(\"; Comment=\").append(cookie.getComment());\r\n if (cookie.getDomain() != null)\r\n sb.append(\"; Domain=\").append(cookie.getDomain());\r\n if (cookie.getPath() != null)\r\n sb.append(\"; Path=\").append(cookie.getPath());\r\n if (cookie.getMaxAge() >= 0) {\r\n \tlong expireDate = cookie.getMaxAge() * 1000;\r\n \texpireDate += Calendar.getInstance().getTimeInMillis();\r\n \t SimpleDateFormat dateFormat = new SimpleDateFormat(\"EEE, dd MMM yyyy HH:mm:ss z\", Locale.US);\r\n \t dateFormat.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\r\n \t sb.append(\"; Expires=\").append(dateFormat.format(expireDate));\r\n }\r\n if (cookie.getSecure())\r\n \tsb.append(\"; Secure\");\r\n return sb.toString();\r\n\t}", "java.lang.String getSessionId();", "private String createCookies() {\n\n String bengLoginID = uid + \"\";\n String timeStr = MyApplication.getInstance().authorTime;\n ToastUtil.toast(timeStr + \"\");\n String cookes = MyApplication.getInstance().bengLoginId + \"; \" + MyApplication.getInstance().userHit + \"; \" + MyApplication.getInstance().authorID + \"; \" + timeStr + \"; \" + MyApplication.getInstance().phpSessid;\n ToastUtil.toast(cookes);\n return cookes;\n\n }", "public static String getUserId(Context context) {\r\n\t\tString userId = \"-1\";\r\n\r\n\t\tSharedPreferences pref = context.getSharedPreferences(\r\n\t\t\t\tUSER_ID_SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);\r\n\t\tif (pref.contains(USER_ID_KEY)) {\r\n\t\t\tuserId = pref.getString(USER_ID_KEY, userId);\r\n\t\t}\r\n\t\treturn userId;\r\n\t}", "public static Prefs get(Context context) {\n if (instance == null)\n instance = new Prefs(context);\n return instance;\n }", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "public static String getTaskName3(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n return prefs.getString(\"taskName3\", \"click to edit\");\n }", "private SharedPreferences getSharedPrefs() {\n return Freelancer.getContext().getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n }", "public static String getFromPrefs(Context context, String key,\n String defaultValue) {\n SharedPreferences sharedPrefs = getSettings();\n try {\n return sharedPrefs.getString(key, defaultValue);\n } catch (Exception e) {\n e.printStackTrace();\n return defaultValue;\n }\n }", "static synchronized SharedPreferences m45630a(Context context) {\n synchronized (C7529d.class) {\n if (Build.VERSION.SDK_INT >= 11) {\n f31839a = context.getSharedPreferences(\".tpush_mta\", 4);\n } else {\n f31839a = context.getSharedPreferences(\".tpush_mta\", 0);\n }\n if (f31839a == null) {\n f31839a = PreferenceManager.getDefaultSharedPreferences(context);\n }\n return f31839a;\n }\n }", "protected String getID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_ID, null);\n }", "public static SharedPreferences getSharedPrefs() {\n return App.getAppContext().getSharedPreferences(PREFS_LABEL, Context.MODE_PRIVATE);\n }", "public SessionCookie getSessionCookie(String sessionID) {\n\t\tSession session = getSession(sessionID);\n\t\treturn session.getCookie();\n\t}", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "@Override\r\n public void getCookie(String name)\r\n {\n\r\n }", "private static void sessionFromCurrentSession(final Context context) {\n\n \t// The session itself\n final Session newSession = Session.getInstance();\n \n // The service\n Service newService = new Service();\n newSession.setService(newService);\n\n // The shared preferences\n Preferences preferences = new Preferences(context);\n newSession.setPreferences(preferences);\n\n // The database\n RestaurantDBAdapter restaurantDBAdapter = new RestaurantDBAdapter(context);\n newSession.setRestaurantDBAdapter(restaurantDBAdapter);\n\n // The hashmap of all the restaurants\n HashMap<String, Restaurant> restaurants = restaurantDBAdapter.getAllRestaurants();\n newSession.setRestaurants(restaurants);\n\n //Save the current session\n Session.setCurrentSession(newSession);\n Session.currentSession.saveAsCurrentSession(context);\n }", "public static String readString(Context context, String key) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\treturn sp.getString(key, \"\");\n\t}", "public static void saveLoginInfo(Context context, String email, String password) {\n SharedPreferences.Editor editor = context.getSharedPreferences(preferenceName, Context.MODE_PRIVATE).edit();\n editor.putString(KEY_EMAIL, Base64.encodeToString(email.getBytes(), Base64.DEFAULT))\n .putString(KEY_PWD, Base64.encodeToString(password.getBytes(), Base64.DEFAULT))\n .apply();\n }", "public Session getSessionbyCookie(int cookie);", "String getSessionId();", "String getSessionId();", "String getSessionId();", "String getSessionId();", "private static SharedPreferences.Editor getEditor(Context context) {\n SharedPreferences preferences = getSharedPreferences(context);\n return preferences.edit();\n }", "public static User getLoggedUser(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"loggedUserPrefs\", 0);\n User user = (new Gson()).fromJson(prefs.getString(\"user\", null), User.class);\n return user;\n }", "public Session(Context context, String url, String cookie) {\n super();\n\n // Initialize parameters\n this.context = context;\n this.prefs = null;\n this.url = url;\n this.cookie = cookie;\n this.user = null;\n }", "public static String getTaskName2(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n return prefs.getString(\"taskName2\", \"click to edit\");\n }", "public String getUserID(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_ID, null);\n }", "protected String getJWTFromCookie(HttpServletRequest req) {\n String serializedJWT = null;\n Cookie[] cookies = req.getCookies();\n if (cookies != null) {\n for (Cookie cookie : cookies) {\n if (cookieName.equals(cookie.getName())) {\n LOG.info(cookieName\n + \" cookie has been found and is being processed\");\n serializedJWT = cookie.getValue();\n break;\n }\n }\n }\n return serializedJWT;\n }", "public String getCookie(String name, String defaultValue) {\n\t\tCookie cookie = getCookieObject(name);\n\t\treturn cookie != null ? cookie.getValue() : defaultValue;\n\t}", "public static String getRequestToken(Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\treturn prefs.getString(TWITTER_REQUEST_TOKEN, null);\n\t\t}", "public static String getTaskName4(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n return prefs.getString(\"taskName4\", \"click to edit\");\n }", "public static void saveLoginWhenFirst(Context context) {\n SharedPreferences.Editor editor = context.getSharedPreferences(SHARED_PREFERENCES_KEY, context.MODE_PRIVATE).edit();\n editor.putBoolean(IS_FIRST_TOKEN,false);\n editor.commit();\n }", "synchronized public String getSessionId()\n\t{\n\t\tif (userInfo != null)\n\t\t\treturn userInfo.getSessionID();\n\t\t\t\n\t\treturn null;\n\t}", "public static TwitterSession restore(Context context) \n {\n \tif (singleton != null) \n \t{\n \t\treturn singleton;\n \t}\n\n SharedPreferences prefs = context.getSharedPreferences(KEY, Context.MODE_PRIVATE);\n\n TwitterSession session = new TwitterSession();\n \n session.setToken(prefs.getString(TOKEN, null));\n session.setTokensecret(prefs.getString(TOKENSECRET, null));\n session.setRtoken(prefs.getString(R_TOKEN, null));\n session.setRtokensecret(prefs.getString(R_TOKENSECRET, null));\n session.setOauthverifier(prefs.getString(OAUTH_VERIFIER, null));\n \n \n singleton = session;\n return session;\n }", "public com.google.protobuf.ByteString\n getSessionIDBytes() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n sessionID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getSessionIDBytes() {\n Object ref = sessionID_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n sessionID_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getSessionID() {\n\t\treturn sessionId;\n\t}", "public static String getCookieHeaderName(int version) {\n\tif( dbg>0 ) log( (version==1) ? \"Set-Cookie2\" : \"Set-Cookie\");\n if (version == 1) {\n\t // RFC2109\n\t return \"Set-Cookie\";\n\t // XXX RFC2965 is not standard yet, and Set-Cookie2\n\t // is not supported by Netscape 4, 6, IE 3, 5 .\n\t // It is supported by Lynx, and there is hope \n\t //\t return \"Set-Cookie2\";\n } else {\n\t // Old Netscape\n\t return \"Set-Cookie\";\n }\n }", "private String getTopcatSessionId() {\r\n HttpServletRequest request = this.getThreadLocalRequest();\r\n HttpSession session = request.getSession();\r\n String sessionId = null;\r\n if (session.getAttribute(\"SESSION_ID\") == null) { // First time login\r\n try {\r\n sessionId = userManager.login();\r\n session.setAttribute(\"SESSION_ID\", sessionId);\r\n } catch (AuthenticationException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n } else {\r\n sessionId = (String) session.getAttribute(\"SESSION_ID\");\r\n }\r\n return sessionId;\r\n }", "public static String getTaskName1(Context context) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n return prefs.getString(\"taskName\", \"click to edit\");\n }", "public String getCartId(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, CARTID);\n\t}", "protected String getCourseID(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"ID\", sharedPref.getString(\"id\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_COURSE, null);\n }", "String getSessionKey(String sessionId) {\n return this.namespace + \"sessions:\" + sessionId;\n }", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "private String getCookieValue(HttpServletRequest request, String name) {\n Cookie[] cookies = request.getCookies();\n\n if (cookies != null) { //Stupid servlet API!\n for (Cookie cookie : cookies) {\n if (name.equals(cookie.getName())) {\n return cookie.getValue();\n }\n }\n }\n\n return \"\";\n }", "public static String getCurrentAccessToken() {\n if (StringUtils.isNotNull(cacheAccessToken))\n return cacheAccessToken;\n\n String accessToken = null;\n User user = getCurrentUser();\n if (user != null)\n accessToken = user.secret;\n if (accessToken != null)\n cacheAccessToken = accessToken;\n\n return cacheAccessToken;\n }", "protected String getName(){\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //Log.d(\"TYPE\", sharedPref.getString(\"accountType\", null));\n return sharedPref.getString(AppCSTR.ACCOUNT_NAME, null);\n }" ]
[ "0.66377497", "0.63749456", "0.62523687", "0.6195589", "0.60424423", "0.60420924", "0.5935473", "0.59057283", "0.5900811", "0.5848164", "0.58455265", "0.56802076", "0.56473005", "0.5607421", "0.559549", "0.5592728", "0.55611265", "0.55581695", "0.552941", "0.54964846", "0.5484861", "0.54757166", "0.54490036", "0.54290974", "0.54166543", "0.541139", "0.5395099", "0.5388987", "0.5379891", "0.5346868", "0.53209466", "0.531968", "0.5310912", "0.53048617", "0.53039795", "0.52845687", "0.52831393", "0.52570075", "0.5246302", "0.5246302", "0.524032", "0.52351093", "0.5232129", "0.5232129", "0.5222781", "0.5222781", "0.52226585", "0.5213704", "0.5204042", "0.5198045", "0.51737833", "0.51705265", "0.5154479", "0.514026", "0.5136247", "0.51301897", "0.5122383", "0.5115156", "0.5113682", "0.5102391", "0.5091872", "0.509012", "0.5086123", "0.50646615", "0.50607383", "0.5055386", "0.5051687", "0.5046895", "0.50412214", "0.5036227", "0.5029405", "0.50284123", "0.50284123", "0.50284123", "0.50284123", "0.5025748", "0.50104606", "0.5000038", "0.49964526", "0.49780104", "0.497712", "0.49559167", "0.4953346", "0.4944639", "0.49445152", "0.49419942", "0.49281225", "0.49161682", "0.49161682", "0.49107477", "0.49054205", "0.49019545", "0.4893371", "0.488107", "0.48718056", "0.48680663", "0.48624778", "0.48613912", "0.48584726", "0.48480064" ]
0.7978646
0
Sets the "sessionCookie" string the SharedPreferences for the given context to a given value
public static boolean setCookie(Context pAppContext, String pNewCookie) { // Fail if either argument is null if (pAppContext == null || pNewCookie == null) { return false; } return setSharedPrefsString(pAppContext, R.string.sessionCookie, pNewCookie); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "public static void setSetting(Context context, String key, String value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void setSharePreferenceValue(Context context, String prefId, String prefValue) {\n SharedPreferences pref = context.getSharedPreferences(PREFERENCES, PREFERENCE_MODE);\n SharedPreferences.Editor editor = pref.edit();\n\n editor.putString(prefId, prefValue);\n editor.commit();\n }", "@SuppressWarnings(\"deprecation\")\n @Override\n public native void set(String key, String value) /*-{\n $doc.cookie = @org.jboss.pressgang.belay.oauth2.gwt.client.OAuthCookieStoreImpl::COOKIE_PREFIX +\n encodeURIComponent(key) + '=' + encodeURIComponent(value);\n }-*/;", "public static void setOtherPlayer(String value, Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"OtherPlayer\", value);\n editor.commit();\n }", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public void putRoleValue(String key, String value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "public void setCookie(String name, String value) throws IOException {\r\n cookies.put(name, value);\r\n }", "public void setSessionId(String cookie) {\n\t\t\r\n\t}", "public static void setPrefStringData(Context context, String key, String value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putString(key, value);\n appInstallInfoEditor.apply();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void saveValueToSharedPreference(Context context, String fileKey, Integer mode, String key, @Nullable String value) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value).apply();\n }", "public static void SetPreferByString(Context context, String key,\n\t\t\tString value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putString(key, value);\n\t\teditor.commit();\n\t}", "private void saveAsCurrentSession(Context context) {\n \t// Save the context\n \tthis.context = context;\n }", "public static String getCookie(Context pAppContext) {\n\t\tif (pAppContext == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn getSharedPrefsString(pAppContext, R.string.sessionCookie);\n\t}", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "@Override\r\n\tpublic void setCookie(Date expirationDate, String nameAndValue, String path, String domain, boolean isSecure) {\n\t}", "public void setPreference(String key, String value) {\n\t SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(myContext);\n\t \n\t SharedPreferences.Editor editor = prefs.edit();\n\t editor.putString(key, value);\n\t editor.commit(); // important! Don't forget!\n\t}", "public void setCookie(\n @NonNull Uri uri, @NonNull String value, @NonNull IBooleanCallback callback) {\n ThreadCheck.ensureOnUiThread();\n try {\n mImpl.setCookie(uri.toString(), value, callback);\n } catch (RemoteException e) {\n throw new APICallException(e);\n }\n }", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public void setCurrentIdentity(String zzxxyz){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putString(\"zzxxyz\",zzxxyz);\n editor.commit();\n }", "public static void setSetting(Context context, String key, long value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putLong(key, value);\n editor.commit();\n }", "public static void setSetting(Context context, String key, boolean value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(key, value);\n editor.commit();\n\n }", "public static void setActiveUser(Context context, String userId) {\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(PreferenceKeys.ActiveUserId, userId);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public void setString(String key, String value) {\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void putString(String key, String value, Context context) {\n checkForNullKey(key);\n checkForNullValue(value);\n getSharedPreferences(context).edit().putString(key, value).apply();\n }", "public void setCartId(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, CARTID,value);\n\t}", "void setSessionId(String sessionId);", "public void saveLocalCookie(HttpServletResponse response,\r\n\t\tString ckName, String ckValue) {\r\n\t\tCookie ck = new Cookie(ckName, ckValue);\r\n\t\tck.setDomain(\".bccard.com\");\r\n\t\tck.setPath(\"/\");\r\n\t\tck.setMaxAge(60*60*24*365*10);\r\n\t\tresponse.addCookie(ck);\r\n\t}", "public void setContext(Context ctx) {\n\t\tprefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tupdateNextIdx();\n\t}", "public void setSession(Session value);", "private static void sessionFromCurrentSession(final Context context) {\n\n \t// The session itself\n final Session newSession = Session.getInstance();\n \n // The service\n Service newService = new Service();\n newSession.setService(newService);\n\n // The shared preferences\n Preferences preferences = new Preferences(context);\n newSession.setPreferences(preferences);\n\n // The database\n RestaurantDBAdapter restaurantDBAdapter = new RestaurantDBAdapter(context);\n newSession.setRestaurantDBAdapter(restaurantDBAdapter);\n\n // The hashmap of all the restaurants\n HashMap<String, Restaurant> restaurants = restaurantDBAdapter.getAllRestaurants();\n newSession.setRestaurants(restaurants);\n\n //Save the current session\n Session.setCurrentSession(newSession);\n Session.currentSession.saveAsCurrentSession(context);\n }", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "public Session(Context context, String url, String cookie) {\n super();\n\n // Initialize parameters\n this.context = context;\n this.prefs = null;\n this.url = url;\n this.cookie = cookie;\n this.user = null;\n }", "public void setAuthentication(){\n SharedPreferences settings = mContext.getSharedPreferences(\"UserData\", Context.MODE_PRIVATE);\n SharedPreferences.Editor preferencesEditor = settings.edit();\n preferencesEditor.putString(\"userid\", mUserId);\n preferencesEditor.putString(\"areaid\", mAreaId);\n preferencesEditor.commit();\n }", "public void createCookie(final String cookie);", "public static void savePreferences(Context context, String strKey, int intValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(strKey, intValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "public final void setValue(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String value)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Value.toString(), value);\r\n\t}", "public static void setAccessTokenSecret(String secret, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN_SECRET, secret);\n\t\t\tprefEditor.commit();\n\t\t}", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public S<T> setPref(String value, String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t SharedPreferences.Editor editor = settings.edit();\n\t editor.putString(key, value);\n\t editor.commit();\n\t return this;\n\t}", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "public final void addSessionCookie(Map<String, String> headers) {\n\t\tString[] projection = { CookieTable.COLUMN_ID,\n\t\t\t\tCookieTable.COLUMN_MOBILE, CookieTable.COLUMN_P };\n\t\tCursor cursor = getApplicationContext().getContentResolver().query(GeneralContentProvider.COOKIE_CONTENT_URI, projection, null,\n\t\t\t\tnull, null);\n\t\tif (cursor != null && cursor.moveToFirst()) {\n\t\t\tif (cursor.getCount() > 0) {\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tLong uid = (long) cursor.getInt(cursor.getColumnIndexOrThrow(CookieTable.COLUMN_ID));\n\t\t\t\tString mobile = cursor.getString(cursor.getColumnIndexOrThrow(CookieTable.COLUMN_MOBILE));\n\t\t\t\tString p = cursor.getString(cursor.getColumnIndexOrThrow(CookieTable.COLUMN_P));\n\t\t\t\tStringBuilder builder = new StringBuilder();\n\t\t\t\tbuilder.append(\"uid=\");\n\t\t\t\tbuilder.append(uid);\n\t\t\t\tbuilder.append(\"\\n\");\n\t\t\t\tbuilder.append(\"p=\");\n\t\t\t\tbuilder.append(p);\n\t\t\t\tbuilder.append(\"\\n\");\n\t\t\t\tif (mCookie_T != null) {\n\t\t\t\t\tbuilder.append(\"t=\");\n\t\t\t\t\tbuilder.append(mCookie_T);\n\t\t\t\t\tbuilder.append(\"\\n\");\n\t\t\t\t}\n\t\t\t\tbuilder.append(\"mobile=\");\n\t\t\t\tbuilder.append(mobile);\n\n\t\t\t\theaders.put(GlobalConstants.COOKIE_KEY, builder.toString());\n\t\t\t\tLogcat.d(TAG, headers.toString());\n\t\t\t} else {\n\t\t\t\tLogcat.d(TAG, \" < 000000000000000000\");\n\t\t\t}\n\t\t\t// always close the cursor\n\t\t\tcursor.close();\n\t\t}\n\t\t\n\t}", "public SessionController(Context context) {\n this.context = context;\n sharedPref = this.context.getSharedPreferences(PREFERENCE_FILE, Context.MODE_PRIVATE);\n spEditor = sharedPref.edit();\n }", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "public boolean save(Context context, AccessToken accessToken) \n {\n\n Editor editor = context.getSharedPreferences(KEY, Context.MODE_PRIVATE).edit();\n\n this.token = accessToken.getToken();\n this.tokensecret = accessToken.getTokenSecret();\n editor.putString(TOKEN, token);\n editor.putString(TOKENSECRET, tokensecret);\n \n\n if (editor.commit()) \n {\n singleton = this;\n return true;\n }\n return false;\n }", "public void setSessionContext(String SessionContext) {\n this.SessionContext = SessionContext;\n }", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public SPHandler(Context context){\n this.context = context;\n sharedPref = context.getSharedPreferences(\n prefName, Context.MODE_PRIVATE);\n\n }", "public static boolean setSharedPrefsString(Context pAppContext,\n\t\t\tString pStringName, String pStringValue) {\n\t\tif (pAppContext == null || pStringName == null || pStringValue == null) {\n\t\t\t// It is arguable if we will allow pStringValue to be null here or\n\t\t\t// if we\n\t\t\t// force the usage of SharedPrefs.remove()\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the shared preferences instance for our app\n\t\tString sharedPrefString = getResourceString(pAppContext,\n\t\t\t\tR.string.shared_preferences_filename);\n\n\t\t// Get the actual preferences\n\t\tSharedPreferences sharedPrefs = pAppContext.getSharedPreferences(\n\t\t\t\tsharedPrefString, Context.MODE_PRIVATE);\n\n\t\t// Start editing\n\t\tEditor editor = sharedPrefs.edit();\n\n\t\t// Change the value\n\t\teditor.putString(pStringName, pStringValue);\n\n\t\t// Commit the changes to the SharedPrefs\n\t\teditor.commit();\n\n\t\treturn true;\n\t}", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public static void save(String key, String value, String filename,\n Context context) {\n\n SharedPreferences sp = context.getSharedPreferences(filename, 0);\n SharedPreferences.Editor edit = sp.edit();\n edit.putString(key, value);\n edit.commit();\n\n }", "synchronized public static void putString(Context context, String key, String value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.putString(key, value);\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }", "public void setSession(String attName, Object value) {\n servletRequest.getSession(true).setAttribute(attName, value);\n }", "public static void saveLoginWhenFirst(Context context) {\n SharedPreferences.Editor editor = context.getSharedPreferences(SHARED_PREFERENCES_KEY, context.MODE_PRIVATE).edit();\n editor.putBoolean(IS_FIRST_TOKEN,false);\n editor.commit();\n }", "public static void setContextKey(WebRequest request, WebResponse response, Project project, String contextKey) {\n Cookie cookie = getContextCookie(request);\n Map<String, String> projectsToContexts = projectsToContexts(cookie);\n projectsToContexts.put(project.getKey(), contextKey);\n\n Set<String> pairs = Sets.newHashSet();\n for (Entry<String, String> entry : projectsToContexts.entrySet()) {\n pairs.add(entry.getKey() + \"=\" + entry.getValue());\n }\n\n cookie = new Cookie(CONTEXTS_COOKIE, Joiner.on('|').join(pairs));\n cookie.setPath(\"/\");\n cookie.setMaxAge(31556926); // one year in seconds\n response.addCookie(cookie);\n }", "public static void storeFacebookToken(String token, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putString(\"Facebook Token\", token);\n\t\teditor.commit();\n\t}", "public void buildCookie(Map<String,String> map){\n map.put(\"PHPSESSID\", cookie);\n }", "public void setSharedValue (String sharedKey, String sharedValue) {\n mSharedPreferences\n .edit()\n .putString(sharedKey, sharedValue)\n .apply();\n }", "public JsonResponse<?> addCookie(String name, String value) {\n return addCookie(new NewCookie(name, value));\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "public void setContext(String context) {\n\n Set<String> contextNames = ((AppiumDriver) getDriver()).getContextHandles();\n\n if (contextNames.contains(context)) {\n ((AppiumDriver) getDriver()).context(context);\n info(\"Context changed successfully\");\n } else {\n info(context + \"not found on this page\");\n }\n\n info(\"Current context\" + ((AppiumDriver) getDriver()).getContext());\n }", "public static void setPrefBooleanData(Context context, String key, boolean value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putBoolean(key, value);\n appInstallInfoEditor.apply();\n }", "synchronized public static void putSerializable(Context context, String key, Serializable value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\t\r\n\t\tString encodedValue = new String(Base64.encode(Common.serializeObject(value), Base64.DEFAULT));\r\n\r\n sPreferencesEditor.putString(key, encodedValue);\r\n\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "private void savePreferences(String key, String value) {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(c);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value);\n editor.apply();\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "public static void setPreference(String key, String value) {\n editor = sharedPreferences.edit();\n\n editor.putString(key, value);\n editor.apply();\n }", "private static SharedPreferences getSharedPreference(Context context){\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "public void setSessionIdLiteral(String newValue);", "void addCookie(HttpServletResponse response, Cookie cookie);", "void setSessionID(java.lang.String sessionID);", "public static void saveToSharedPreference(String key, String value) {\n\n appSharePreference.edit().putString(key.toString(), value.toString()).apply();\n }", "public static void setRequestTokenSecret(String secret, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN_SECRET, secret);\n\t\t\tprefEditor.commit();\n\t\t}", "private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }", "public static void setTaskName3(Context context, String taskName3) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName3\", taskName3);\n editor.commit();\n }", "public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }", "public void storePreferences(String userid, String token, JSONArray settings) throws JSONException {\n SharedPreferences sharedPreferences = getApplicationContext().getSharedPreferences(\"ca.gc.inspection.scoop\", Context.MODE_PRIVATE);\n\n JSONObject setting = settings.getJSONObject(0);\n Iterator<String> keys = setting.keys();\n while(keys.hasNext()){\n String settingKey = keys.next();\n if (settingKey.equals(useridStr)){ continue;}\n sharedPreferences.edit().putString(settingKey, setting.getString(settingKey)).apply();\n }\n\n // storing the token into shared preferences\n sharedPreferences.edit().putString(\"token\", token).apply();\n Config.token = token;\n\n // storing the user id into shared preferences\n sharedPreferences.edit().putString(useridStr, userid).apply();\n Config.currentUser = userid;\n\n // change activities once register is successful\n if(Config.token != null && Config.currentUser != null) registerSuccess();\n }", "public void setInt(String key, int value){\r\n SharedPreferences sp = getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "@Override\n public void addCookie(Cookie arg0) {\n\n }", "public static void storeToken(AccessToken token, Context cont)\n\t{\n\t\tSharedPreferences.Editor editor = cont.getSharedPreferences(\"StatPump\", 0).edit();\n\t\teditor.putString(\"Token\", token.getToken());\n\t\teditor.putString(\"Token Secret\", token.getTokenSecret());\n\t\teditor.commit();\n\t}", "public BladeController setCookie(String name, String value, int maxAgeInSeconds, String path, boolean isHttpOnly) {\n\t\treturn doSetCookie(name, value, maxAgeInSeconds, path, null, isHttpOnly);\n\t}", "public void writeToSharedPreference(int value){\n SharedPreferences sharedPreferences = getActivity().getPreferences(Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(\"NUMBER OF ITEMS\",value);\n editor.commit();\n\n }", "public BladeController setCookie(String name, String value, int maxAgeInSeconds, String path, String domain, boolean isHttpOnly) {\n\t\treturn doSetCookie(name, value, maxAgeInSeconds, path, domain, isHttpOnly);\n\t}", "@Override\n public void saveString(String key, String value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putString(key, checkNotNull(value));\n prefs.commit();\n }", "private static SharedPreferences getSharedPreferences(Context context) {\n return PreferenceManager.getDefaultSharedPreferences(context);\n }", "public static void setObject(HttpSession session, String key, Object obj) {\n session.setAttribute(key, obj);\n }", "public static void SaveCounter3(Context context) {\n prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", context.MODE_PRIVATE);\n prefs.edit().putInt(saveCounter3, SaveCounter3).commit();\n\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public boolean saveuser_details(String skey, String svalue){\n SharedPreferences sharedPreferences = mCtx.getSharedPreferences(user_details, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(skey, svalue);\n editor.apply();\n return true;\n }", "public void createCookie(final String cookie, final String options);", "public void part2(){\n Cookie c1 = new Cookie(\"uid\", \"2018\", 1800,false);\n Cookie c2 = new Cookie(\"PICK_KEY\", \"ahmd13ldsws8cw\",10800,true);\n Cookie c3 = new Cookie(\"REMEMBER_ME\",\"true\",10800,true);\n }", "public static void setStringValue(final String prefFile, final String key, final String value) {\n final SharedPreferences sharedPref = getSharedPreferences(prefFile);\n final SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(key, value);\n editor.apply();\n }", "private void savePreferences(String key, String value) {\n\t\tSharedPreferences sp = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tEditor edit = sp.edit();\n\t\tedit.putString(key, value);\n\t\tedit.commit();\n\t}" ]
[ "0.66143054", "0.64805824", "0.64343756", "0.6188803", "0.6108566", "0.60626197", "0.59827685", "0.5930201", "0.59094304", "0.5900715", "0.58769464", "0.58760184", "0.5819049", "0.5819049", "0.58189255", "0.5815629", "0.5812871", "0.57881904", "0.5762996", "0.5734808", "0.57245123", "0.5650315", "0.5643196", "0.5634175", "0.5630938", "0.5630931", "0.553922", "0.5518416", "0.5506141", "0.5460623", "0.5432435", "0.5396934", "0.53743714", "0.5342192", "0.53295094", "0.53260976", "0.53219944", "0.53196925", "0.5296221", "0.5289053", "0.52691984", "0.5264143", "0.5248606", "0.52459663", "0.52433795", "0.52301174", "0.5227805", "0.52206224", "0.5212809", "0.5202949", "0.518526", "0.5176171", "0.5174424", "0.5173972", "0.5170383", "0.5169264", "0.5159489", "0.51536626", "0.5153195", "0.5149995", "0.5148641", "0.5132276", "0.5112492", "0.51094484", "0.5101658", "0.51013273", "0.5089001", "0.5081833", "0.5079579", "0.50742227", "0.5070407", "0.5061558", "0.50609803", "0.5046143", "0.50459456", "0.5041333", "0.503975", "0.50194216", "0.5007997", "0.49948215", "0.4991728", "0.49908713", "0.49747676", "0.49700648", "0.49654484", "0.49642238", "0.49590582", "0.4957774", "0.49505797", "0.49498767", "0.49491984", "0.49484977", "0.4947987", "0.4939131", "0.49391285", "0.4934796", "0.49301776", "0.49185312", "0.49129534", "0.49103564" ]
0.6491435
1
Sets a boolean in the SharedPrefs for the given context
public static boolean setSharedPrefsBoolean(Context pAppContext, int pBooleanNameResourceId, boolean pBooleanValue) { // Convert the resource identity to a string String sharedPrefsStringName = getResourceString(pAppContext, pBooleanNameResourceId); return setSharedPrefsBoolean(pAppContext, sharedPrefsStringName, pBooleanValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setSetting(Context context, String key, boolean value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(key, value);\n editor.commit();\n\n }", "public static void putBoolean(Context context, String key, boolean value) {\n getPreferenceEditor(getSharePreferences(context)).putBoolean(key, value).apply();\n }", "public static void setPrefBooleanData(Context context, String key, boolean value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putBoolean(key, value);\n appInstallInfoEditor.apply();\n }", "public static void SetPreferByBoolean(Context context, String key,\n\t\t\tboolean value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putBoolean(key, value);\n\t\teditor.commit();\n\t}", "synchronized public static void putBoolean(Context context, String key, boolean value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.putBoolean(key, value);\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "public void putBooleanValue(String key, boolean value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN,Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putBoolean(key,value);\n editor.apply();\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final boolean value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putBoolean(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public void putBoolean(String key, boolean value){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n\n editor.putBoolean(key, value);\n\n editor.apply();\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final Boolean value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putBoolean(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "public static void writeBoolean(Context context, String fileName, String key, boolean value) {\n if (context == null)\n return;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n Editor editor = sharedPreferences.edit();\n editor.putBoolean(key, value);\n editor.apply();\n }", "@Override\n public void saveBoolean(String key, boolean value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putBoolean(key, value);\n prefs.commit();\n }", "public static void savePreferences(Context context, String strKey, Boolean blnValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(strKey, blnValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "private void setPreferences(String sw, boolean checked) {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(sw,checked);\n editor.apply();\n\n }", "public static void setBool(String aKey, boolean aValue) {\n getSharedPreferences().edit().putBoolean(aKey, aValue).apply();\n }", "public static void setPreference(String key, boolean value) {\n editor = sharedPreferences.edit();\n\n editor.putBoolean(key, value);\n editor.apply();\n }", "public void setisTripSaving(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripSaving\", value);\n\t\teditor.commit();\n\t}", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "public void setSAVETRIP(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"SAVETRIP\", value);\n\t\teditor.commit();\n\t}", "public synchronized boolean storeBoolean(String key, boolean value) {\n mEditor = mSharedPreferences.edit();\n mEditor.putBoolean(key, value);\n\n return mEditor.commit();\n }", "public abstract void setEnabled(Context context, boolean enabled);", "public static void savePreference(SharedPreferences prefs, String key, Boolean value) {\n Editor e = prefs.edit();\n e.putBoolean(key, value);\n e.commit();\n }", "public static void setBooleanValue(\n final String prefFile, final String key, final boolean value) {\n final SharedPreferences sharedPref = getSharedPreferences(prefFile);\n final SharedPreferences.Editor editor = sharedPref.edit();\n editor.putBoolean(key, value);\n editor.apply();\n }", "public void set_isTripDone(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripDone\", value);\n\t\teditor.commit();\n\t}", "public static boolean setSharedPrefsBoolean(Context pAppContext,\n\t\t\tString pBooleanName, boolean pBooleanValue) {\n\t\tif (pAppContext == null || pBooleanName == null) {\n\t\t\t// It is arguable if we will allow pStringValue to be null here or\n\t\t\t// if we\n\t\t\t// force the usage of SharedPrefs.remove()\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the shared preferences instance for our app\n\t\tString sharedPrefString = getResourceString(pAppContext,\n\t\t\t\tR.string.shared_preferences_filename);\n\n\t\t// Get the actual preferences\n\t\tSharedPreferences sharedPrefs = pAppContext.getSharedPreferences(\n\t\t\t\tsharedPrefString, Context.MODE_PRIVATE);\n\n\t\t// Start editing\n\t\tEditor editor = sharedPrefs.edit();\n\n\t\t// Change the value\n\t\teditor.putBoolean(pBooleanName, pBooleanValue);\n\n\t\t// Commit the changes to the SharedPrefs\n\t\teditor.commit();\n\n\t\treturn true;\n\t}", "public static void setSetting(Context context, String key, String value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "private void setSharedPreferences(boolean silentMode) {\n SharedPreferences settings = this.getSharedPreferences(\n CallRecorderConstants.LISTEN_ENABLED, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(\"silentMode\", silentMode);\n editor.commit();\n\n Intent myIntent = new Intent(context, CallRecorderService.class);\n myIntent.putExtra(\"commandType\",\n silentMode ? CallRecorderConstants.RECORDING_DISABLED\n : CallRecorderConstants.RECORDING_ENABLED);\n myIntent.putExtra(\"silentMode\", silentMode);\n if (context != null){\n Log.d(\"Context\",\"not null\");\n context.startService(myIntent);\n }\n\n }", "public void setContext(Context ctx) {\n\t\tprefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tupdateNextIdx();\n\t}", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "public static void set(String key, boolean val) {\n Editor e = prefs.edit();\n e.putBoolean(key, val);\n e.commit();\n }", "public void setTripStrated(boolean value) {\n\t\tLog.i(TAG, \"*************************************\");\n\t\tLog.i(TAG, \"Setting trip status to \" + value);\n\t\tLog.i(TAG, \"*************************************\");\n\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripStarted\", value);\n\t\teditor.commit();\n\t}", "public AppPreferences set(@NonNull String name, boolean value) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n SharedPreferences.Editor prefsEditor = prefs.edit();\n prefsEditor.putBoolean(name, value);\n prefsEditor.apply(); // or commit();\n return this;\n }", "public void setSharedValue (String sharedKey, boolean sharedValue) {\n mSharedPreferences\n .edit()\n .putBoolean(sharedKey, sharedValue)\n .apply();\n }", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "public static void setSharePreferenceValue(Context context, String prefId, String prefValue) {\n SharedPreferences pref = context.getSharedPreferences(PREFERENCES, PREFERENCE_MODE);\n SharedPreferences.Editor editor = pref.edit();\n\n editor.putString(prefId, prefValue);\n editor.commit();\n }", "public void setSharedPreferencesMode(int sharedPreferencesMode) { throw new RuntimeException(\"Stub!\"); }", "public static void m57038g(Context context) {\n AccountPreferenceHelper.putBoolean(context, R.string.c69, false);\n }", "public void setTutorial(boolean checked){\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(\"TUTORIAL_CHECKED\", checked);\n editor.commit();\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final Integer value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putInt(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "public static void save(String s, boolean flag){\n SharedPreferences prefs = cont.getSharedPreferences(\"PAFF_SETTINGS\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putBoolean(s,flag);\n editor.commit();\n }", "public void setIsLogin(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"Login\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isLogin\", value);\n\t\teditor.commit();\n\t}", "public void setisBackgroundTrip(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TripCheckBox\",\n\t\t\t\tcontext.MODE_WORLD_WRITEABLE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isbackgroundtrip\", value);\n\t\teditor.commit();\n\t}", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "void setBoolean(String key, boolean val);", "public void setUserLogStatus(boolean bValue){\n /*SharedPreferences sharedPreferences = _context.getSharedPreferences(APP_PREFERENCES, PRIVATE_MODE);\n SharedPreferences.Editor editor;\n editor = sharedPreferences.edit();*/\n editor.putBoolean(IS_LOGGED_IN, bValue);\n editor.apply();\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (bt_gravity.isChecked()) {\r\n\t\t\t\t\tgravityFlag = true;\r\n\t\t\t\t\tpreferences = getSharedPreferences(\"ZKY\", Context.MODE_PRIVATE);\r\n\t\t\t\t\tEditor editor = preferences.edit();\r\n\t\t\t\t\teditor.putBoolean(\"gravityFlag\", gravityFlag);\r\n\t\t\t\t\teditor.commit();\r\n\t\t\t\t\tToast.makeText(SetActivity.this, \"重力 开\", Toast.LENGTH_SHORT)\r\n\t\t\t\t\t\t\t.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tgravityFlag = false;\r\n\t\t\t\t\tpreferences = getSharedPreferences(\"ZKY\", Context.MODE_PRIVATE);\r\n\t\t\t\t\tEditor editor = preferences.edit();\r\n\t\t\t\t\teditor.putBoolean(\"gravityFlag\", gravityFlag);\r\n\t\t\t\t\teditor.commit();\r\n\t\t\t\t\tToast.makeText(SetActivity.this, \"重力 关\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\t\t\t}", "private void updateSeedsInfoStatus(String tDate, Boolean tTag){\n \tSharedPreferences.Editor editor = mSharedPref.edit();\n \teditor.putBoolean(tDate, tTag);\n \teditor.commit(); \t\n }", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (bt_music.isChecked()) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tmusicFlag = true;\r\n\t\t\t\t\tpreferences = getSharedPreferences(\"ZKY\", Context.MODE_PRIVATE);\r\n\t\t\t\t\tEditor editor = preferences.edit();\r\n\t\t\t\t\teditor.putBoolean(\"musicFlag\", musicFlag);\r\n\t\t\t\t\teditor.commit();\r\n\t\t\t\t\tToast.makeText(SetActivity.this, \"音乐 开\", Toast.LENGTH_SHORT)\r\n\t\t\t\t\t\t\t.show();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmusicFlag = false;\r\n\t\t\t\t\tpreferences = getSharedPreferences(\"ZKY\", Context.MODE_PRIVATE);\r\n\t\t\t\t\tEditor editor = preferences.edit();\r\n\t\t\t\t\teditor.putBoolean(\"musicFlag\", musicFlag);\r\n\t\t\t\t\teditor.commit();\r\n\t\t\t\t\tToast.makeText(SetActivity.this, \"音乐 关\",\r\n\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\t\t}\r\n\t\t\t}", "public static void setSetting(Context context, String key, long value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putLong(key, value);\n editor.commit();\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (key.equals(KEY_PREF_RUN_ON_START)) {\n CheckBoxPreference runOnStartPref = (CheckBoxPreference) findPreference(key);\n if(runOnStartPref.isChecked()) {\n requestPermission(getActivity(), PermissionsMapping.REBOOT_NOTIF);\n }\n } else if(key.equals(KEY_PREF_KEEP_SCREEN_ON)){\n CheckBoxPreference pref = (CheckBoxPreference) findPreference(key);\n if(pref.isChecked()) {\n getActivity().findViewById(R.id.main_layout).setKeepScreenOn(true);\n } else {\n getActivity().getParent().findViewById(R.id.main_layout).setKeepScreenOn(false);\n }\n }\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "private void saveSharedPrefs(String a, boolean b) {\n SharedPreferences.Editor editor = sp.edit();\n if (b) editor.putString(\"searchField\", a);\n else editor.putString(\"ingredientsField\", a);\n editor.commit();\n }", "public void setPreference(String key, String value) {\n\t SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(myContext);\n\t \n\t SharedPreferences.Editor editor = prefs.edit();\n\t editor.putString(key, value);\n\t editor.commit(); // important! Don't forget!\n\t}", "public void setTripPaused(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripPaused\", value);\n\t\teditor.commit();\n\t}", "public void writeBooleanPrefs(String prefName, boolean prefValue) {\n editor = sPrefs.edit();\n editor.putBoolean(prefName, prefValue);\n editor.apply();\n }", "@Override\n public void onClick(View v) {\n if (mGlobalSwitch != null)\n mGlobalSwitch.setChecked(true);\n else {\n getSharedPreferences(getString(R.string.pref_global), Context.MODE_PRIVATE).edit().putBoolean(getString(R.string.key_enabled), true).commit();\n SendEnabledState(SettingsActivity.this, true);\n }\n mSnackBarAddService.dismiss();\n mSnackBarAddService = null;\n }", "void set(boolean value);", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public static boolean setSharedPrefsString(Context pAppContext,\n\t\t\tString pStringName, String pStringValue) {\n\t\tif (pAppContext == null || pStringName == null || pStringValue == null) {\n\t\t\t// It is arguable if we will allow pStringValue to be null here or\n\t\t\t// if we\n\t\t\t// force the usage of SharedPrefs.remove()\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the shared preferences instance for our app\n\t\tString sharedPrefString = getResourceString(pAppContext,\n\t\t\t\tR.string.shared_preferences_filename);\n\n\t\t// Get the actual preferences\n\t\tSharedPreferences sharedPrefs = pAppContext.getSharedPreferences(\n\t\t\t\tsharedPrefString, Context.MODE_PRIVATE);\n\n\t\t// Start editing\n\t\tEditor editor = sharedPrefs.edit();\n\n\t\t// Change the value\n\t\teditor.putString(pStringName, pStringValue);\n\n\t\t// Commit the changes to the SharedPrefs\n\t\teditor.commit();\n\n\t\treturn true;\n\t}", "void setIsManaged(boolean isManaged);", "public void savingPreferences()\n {\n SharedPreferences sharedPreferences = getSharedPreferences(preferenceSaveInfo,MODE_PRIVATE);\n\n\n //tao doi tuong editer\n SharedPreferences.Editor editor = sharedPreferences.edit();\n String user = txtUserName.getText().toString();\n String pass = txtPassWord.getText().toString();\n\n boolean bchk = chkSave.isChecked();\n\n\n if(!bchk)\n {\n //xoa du lieu luu truoc do\n editor.clear();\n }\n else\n {\n editor.putString(\"user\",user);\n editor.putString(\"pass\",pass);\n editor.putBoolean(\"checked\",bchk);\n }\n\n editor.commit();\n\n\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "boolean setSettings(Settings sm);", "public static boolean isAppEnabled(Context context)\n {\n return SystemServices.getSharedPreferences(context).getBoolean(context.getString(R.string.enable_pref), context.getString(R.string.enable_default) == \"true\");\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void setOtherPlayer(String value, Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"OtherPlayer\", value);\n editor.commit();\n }", "void set(boolean on);", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tsilent.setChecked(false);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Vibration Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsilent.setChecked(true);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", false);\n\t\t\t\t\tmPrefsEditor.apply();\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Silent Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public void setBoton() {\n SharedPreferences preferences = getSharedPreferences(STRING_PREFERENCES,MODE_PRIVATE);\n preferences.edit().putBoolean(PREFERENCE_ESTADO_BUTTON_SESION,checkBox.isChecked()).apply();\n\n }", "protected void makePref(){\n //Creates a shared pref called MyPref and 0-> MODE_PRIVATE\n sharedPref = getSharedPreferences(AppCSTR.PREF_NAME, Context.MODE_PRIVATE);\n //so the pref can be edit\n edit = sharedPref.edit();\n}", "private static void storeActivation(Context context) {\n\t\t//securely store in shared preference\n\t\tSharedPreferences secureSettings = new SecurePreferences(context);\n\t\tString account = UserEmailFetcher.getEmail(context);\n\n\t\t//update preference\n\t\tSharedPreferences.Editor secureEdit = secureSettings.edit();\n\t\tsecureEdit.putBoolean(account + \"_paid\", true);\n\t\tsecureEdit.apply();\n\t}", "public static void SetPreferByString(Context context, String key,\n\t\t\tString value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putString(key, value);\n\t\teditor.commit();\n\t}", "@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked)\n\t\t\t\t{\n\t\t\t\t\tselect.setChecked(false);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", true);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Silent Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tselect.setChecked(true);\n\t\t\t\t\tmPrefsEditor.putBoolean(\"silent\", false);\n\t\t\t\t\tmPrefsEditor.apply();\n\t\t\t\t\tmPrefsEditor.putBoolean(\"vibration\", true);\n\t\t\t\t\tmPrefsEditor.apply();\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getApplicationContext(), \"Vibration Mode\", Toast.LENGTH_SHORT).show();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}", "public Prefs(Activity context){\n this.preferences = context.getSharedPreferences(prefContext, Context.MODE_PRIVATE);\n this.context = context;\n\n }", "public static Boolean getPrefBooleanData(Context context, String key) {\n try {\n SharedPreferences pref = context.getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n return pref.getBoolean(key, false);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "public void mo23013a(Context context) {\n this.f26122b = context.getSharedPreferences(\"com.judi.base.PREFERENCE_FILE_KEY\", 0);\n }", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "@Override\r\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n\t\t\t\tif (isChecked){\r\n\t\t\t\t\tsp.edit().putBoolean(\"theft\", true).commit();\r\n\t\t\t\t\tcb_set.setText(\"防盗保护开启\");\r\n\t\t\t\t}else{\r\n\t\t\t\t\tsp.edit().putBoolean(\"theft\", false).commit();\r\n\t\t\t\t\tcb_set.setText(\"防盗保护没有开启\");\r\n\t\t\t\t}\r\n\t\t\t}", "public void setIsTrack(boolean isTrack){\n this.isTrack = isTrack;\n }", "public synchronized void setMyGameStatus(boolean status)\n {\n \tgameStatus=status;\n }", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "private static boolean setUserId(Context context, String userId) {\r\n\t\tsetLastUpdateNow(context);\r\n\r\n\t\tSharedPreferences pref = context.getSharedPreferences(\r\n\t\t\t\tUSER_ID_SHARED_PREFERENCES_NAME, Context.MODE_PRIVATE);\r\n\r\n\t\tSharedPreferences.Editor editor = pref.edit();\r\n\t\teditor.putString(USER_ID_KEY, userId);\r\n\r\n\t\treturn editor.commit();\r\n\t}", "public static void saveLoginWhenFirst(Context context) {\n SharedPreferences.Editor editor = context.getSharedPreferences(SHARED_PREFERENCES_KEY, context.MODE_PRIVATE).edit();\n editor.putBoolean(IS_FIRST_TOKEN,false);\n editor.commit();\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString ac = accoun.getText().toString();\n\t\t\t\tString ps = pasd.getText().toString();\n\t\t\t\teditor = pref.edit();\n\t\t\t\tif(check.isChecked()){\n\t\t\t\t\teditor.putBoolean(\"ischeck\", true);\n\t\t\t\t\teditor.putString(\"account\", ac);\n\t\t\t\t\teditor.putString(\"password\", ps);\n\t\t\t\t}else{\n\t\t\t\t\teditor.clear();\n\t\t\t\t}\n\t\t\t\teditor.commit();\n\t\t\t}", "void setProtection(boolean value);", "public static boolean getBoolean(Context context, String key, boolean defValue) {\r\n\t\tif (sInstance !=null && sInstance.mSettings.containsKey(key)) {\r\n\t\t\treturn (Boolean) sInstance.mSettings.get(key);\r\n\t\t}\r\n\t\tboolean val = defValue;\r\n\t\ttry {\r\n\t\t\tval = getPreferences(context).getBoolean(key, defValue);\r\n\t\t} catch(ClassCastException e) {\r\n\t\t\tDebug.logException(e);\r\n\t\t}\r\n\t\t\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, val);\r\n\t\t}\r\n\t\t\r\n\t\treturn val;\r\n\t}", "public void putBoolean(String key, boolean value, boolean commit) {\r\n\t\tputBoolean(Global.getContext(), key, value, commit);\r\n\t}", "public void setExternallyManaged(java.lang.Boolean value);", "public void isTripAbandon(boolean value) {\n\t\tsharedPreferences = context.getSharedPreferences(\"TRIP\",\n\t\t\t\tcontext.MODE_PRIVATE);\n\t\tSharedPreferences.Editor editor = sharedPreferences.edit();\n\t\teditor.putBoolean(\"isTripAbandon\", value);\n\t\teditor.commit();\n\t}", "public void toggleState(Context context) {\n boolean state = getState(context);\n Settings.System.putInt(context.getContentResolver(), Settings.System.AIRPLANE_MODE_ON,\n state ? 0 : 1);\n // notify change\n Intent intent = new Intent(Intent.ACTION_AIRPLANE_MODE_CHANGED);\n intent.putExtra(\"state\", !state);\n context.sendBroadcast(intent);\n }", "public void setMusic(boolean checked) {\n\n SharedPreferences.Editor editor = mSharedPreferences.edit();\n editor.putBoolean(mContext.getString(R.string.music_checked), checked);\n editor.commit();\n }", "public static void savePreferences(Context context, String strKey, int intValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(strKey, intValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "@Override\n protected void onResume() {\n super.onResume();\n SharedPreferences preferences = getSharedPreferences(luuthongtin, MODE_PRIVATE);\n String username = preferences.getString(\"UserName\", \"\");\n String password = preferences.getString(\"PassWord\", \"\");\n Boolean save = preferences.getBoolean(\"Save\",false);\n if(save)\n {\n edtUserName.setText(username);\n edtPassword.setText(password);\n checkBox.setChecked(save);\n }\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "void setBoolean(boolean value);", "public static void setActiveUser(Context context, String userId) {\r\n\t\tSharedPreferences prefs = PreferenceManager\r\n\t\t\t\t.getDefaultSharedPreferences(context);\r\n\t\tif (prefs != null) {\r\n\t\t\tEditor editor = prefs.edit();\r\n\t\t\tif (editor != null) {\r\n\t\t\t\teditor.putString(PreferenceKeys.ActiveUserId, userId);\r\n\t\t\t}\r\n\r\n\t\t\teditor.commit();\r\n\t\t}\r\n\t}", "public void set_boolean(boolean param) {\n this.local_boolean = param;\n }" ]
[ "0.795464", "0.77862585", "0.7650687", "0.7484669", "0.73441094", "0.72765124", "0.7183628", "0.718027", "0.71211416", "0.7095026", "0.7021326", "0.6993276", "0.6875474", "0.68187416", "0.6585955", "0.65656066", "0.6463755", "0.6460333", "0.64553726", "0.64386284", "0.6430174", "0.6421067", "0.64059925", "0.63988084", "0.6376522", "0.6350132", "0.6330359", "0.6314172", "0.6274891", "0.62573826", "0.6252533", "0.6242185", "0.6209326", "0.6178387", "0.6167725", "0.61673206", "0.614949", "0.6148033", "0.6144256", "0.614067", "0.6116663", "0.6105158", "0.60928535", "0.60845697", "0.6082737", "0.60802037", "0.60642993", "0.601052", "0.59509206", "0.5944204", "0.5943912", "0.5941809", "0.59334135", "0.5925246", "0.59242976", "0.5903569", "0.589899", "0.5892963", "0.5847013", "0.5829106", "0.58270466", "0.5823182", "0.5822581", "0.58083814", "0.5794772", "0.57920045", "0.57858825", "0.57858825", "0.5782708", "0.57640463", "0.57520896", "0.5751659", "0.5742807", "0.573742", "0.5717635", "0.5715227", "0.57134694", "0.57004666", "0.56998193", "0.56849384", "0.56804514", "0.56661004", "0.56487536", "0.5646682", "0.5646211", "0.56449854", "0.5635619", "0.5634678", "0.5633436", "0.5621788", "0.56189346", "0.56154317", "0.5602796", "0.56023115", "0.5586458", "0.5585159", "0.55815554", "0.5576512", "0.55760044", "0.5572151" ]
0.59912205
48
Sets a string in the SharedPrefs for the given context
public static boolean setSharedPrefsBoolean(Context pAppContext, String pBooleanName, boolean pBooleanValue) { if (pAppContext == null || pBooleanName == null) { // It is arguable if we will allow pStringValue to be null here or // if we // force the usage of SharedPrefs.remove() return false; } // Get the shared preferences instance for our app String sharedPrefString = getResourceString(pAppContext, R.string.shared_preferences_filename); // Get the actual preferences SharedPreferences sharedPrefs = pAppContext.getSharedPreferences( sharedPrefString, Context.MODE_PRIVATE); // Start editing Editor editor = sharedPrefs.edit(); // Change the value editor.putBoolean(pBooleanName, pBooleanValue); // Commit the changes to the SharedPrefs editor.commit(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setPrefStringData(Context context, String key, String value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putString(key, value);\n appInstallInfoEditor.apply();\n }", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "public static void setSetting(Context context, String key, String value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void SetPreferByString(Context context, String key,\n\t\t\tString value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putString(key, value);\n\t\teditor.commit();\n\t}", "public void setString(String key, String value) {\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void putString(String key, String value, Context context) {\n checkForNullKey(key);\n checkForNullValue(value);\n getSharedPreferences(context).edit().putString(key, value).apply();\n }", "synchronized public static void putString(Context context, String key, String value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.putString(key, value);\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public static void setSharePreferenceValue(Context context, String prefId, String prefValue) {\n SharedPreferences pref = context.getSharedPreferences(PREFERENCES, PREFERENCE_MODE);\n SharedPreferences.Editor editor = pref.edit();\n\n editor.putString(prefId, prefValue);\n editor.commit();\n }", "public static void setOtherPlayer(String value, Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"OtherPlayer\", value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "public static void setString(String aKey, String aValue) {\n getSharedPreferences().edit().putString(aKey, aValue).apply();\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public void setPreference(String key, String value) {\n\t SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(myContext);\n\t \n\t SharedPreferences.Editor editor = prefs.edit();\n\t editor.putString(key, value);\n\t editor.commit(); // important! Don't forget!\n\t}", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "@Override\n public void saveString(String key, String value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putString(key, checkNotNull(value));\n prefs.commit();\n }", "public void setContext(Context ctx) {\n\t\tprefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tupdateNextIdx();\n\t}", "public static boolean setSharedPrefsString(Context pAppContext,\n\t\t\tString pStringName, String pStringValue) {\n\t\tif (pAppContext == null || pStringName == null || pStringValue == null) {\n\t\t\t// It is arguable if we will allow pStringValue to be null here or\n\t\t\t// if we\n\t\t\t// force the usage of SharedPrefs.remove()\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the shared preferences instance for our app\n\t\tString sharedPrefString = getResourceString(pAppContext,\n\t\t\t\tR.string.shared_preferences_filename);\n\n\t\t// Get the actual preferences\n\t\tSharedPreferences sharedPrefs = pAppContext.getSharedPreferences(\n\t\t\t\tsharedPrefString, Context.MODE_PRIVATE);\n\n\t\t// Start editing\n\t\tEditor editor = sharedPrefs.edit();\n\n\t\t// Change the value\n\t\teditor.putString(pStringName, pStringValue);\n\n\t\t// Commit the changes to the SharedPrefs\n\t\teditor.commit();\n\n\t\treturn true;\n\t}", "public void saveValueToSharedPreference(Context context, String fileKey, Integer mode, String key, @Nullable String value) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value).apply();\n }", "public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public static void setTaskName1(Context context, String taskName) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName\", taskName);\n editor.commit();\n }", "public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public static void setTaskName3(Context context, String taskName3) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName3\", taskName3);\n editor.commit();\n }", "public void setContext(String context) {\n\n Set<String> contextNames = ((AppiumDriver) getDriver()).getContextHandles();\n\n if (contextNames.contains(context)) {\n ((AppiumDriver) getDriver()).context(context);\n info(\"Context changed successfully\");\n } else {\n info(context + \"not found on this page\");\n }\n\n info(\"Current context\" + ((AppiumDriver) getDriver()).getContext());\n }", "public final void setValue(java.lang.String value)\r\n\t{\r\n\t\tsetValue(getContext(), value);\r\n\t}", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "public static void setTaskName2(Context context, String taskName2) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName2\", taskName2);\n editor.commit();\n }", "public void setStr(String key, String value) {\n PREF_EDITOR.putString(key, value);\n PREF_EDITOR.commit();\n }", "public void putRoleValue(String key, String value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public static void setTaskName4(Context context, String taskName4) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName4\", taskName4);\n editor.commit();\n }", "private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }", "public static void setStringValue(final String prefFile, final String key, final String value) {\n final SharedPreferences sharedPref = getSharedPreferences(prefFile);\n final SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }", "public static boolean setSharedPrefsString(Context pAppContext,\n\t\t\tint pStringNameResourceId, String pStringValue) {\n\t\t// Convert the resource identity to a string\n\t\tString sharedPrefsStringName = getResourceString(pAppContext,\n\t\t\t\tpStringNameResourceId);\n\n\t\treturn setSharedPrefsString(pAppContext, sharedPrefsStringName,\n\t\t\t\tpStringValue);\n\t}", "protected void set(String key, String value)\r\n\t{ this.preferences.put(key, value); }", "public static void savePreferences(Context context, String strKey, int intValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(strKey, intValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "public static void m45634b(Context context, String str, String str2) {\n String a = C7527b.m45601a(context, \"tpush_\" + str);\n SharedPreferences.Editor edit = m45630a(context).edit();\n edit.putString(a, str2);\n edit.commit();\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public void setUsername(String username) {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"username\", username);\n editor.commit(); \t\n }", "public final void setValue(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String value)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Value.toString(), value);\r\n\t}", "public static void setSetting(Context context, String key, boolean value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(key, value);\n editor.commit();\n\n }", "public static void setPuzzle(String puzzle,String Ansver, Context context) {\n\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"Puzzle\", puzzle);\n editor.putString(\"Ansver\", Ansver);\n editor.commit();\n }", "public static void setTwitterUsername(String username, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_USERNAME, username);\n\t\t\tprefEditor.commit();\n\t\t}", "public static void setContext(String key, String value) {\r\n scenarioContext.put(key, value);\r\n }", "public static void savePaguthiName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI, type);\n editor.apply();\n }", "public static void setSetting(Context context, String key, long value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putLong(key, value);\n editor.commit();\n }", "public void setContext(String context) {\r\n\t\tthis.context = context;\r\n\t}", "public static void setTwitterScreenname(String screenname, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_SCREENNAME, screenname);\n\t\t\tprefEditor.commit();\n\t\t}", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public S<T> setPref(String value, String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t SharedPreferences.Editor editor = settings.edit();\n\t editor.putString(key, value);\n\t editor.commit();\n\t return this;\n\t}", "public void setContext(String context) {\n\t\tthis.context = context;\n\t}", "public static void saveToSharedPreference(String key, String value) {\n\n appSharePreference.edit().putString(key.toString(), value.toString()).apply();\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "private void m2192d(String str) {\n this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).edit().putString(\"TOKEN\", str).apply();\n }", "private void storeKeyWord(String keyWord) {\n SharedPrefsUtils.setStringPreference(application.getApplicationContext(),\"KEY\",keyWord);\n }", "public void putContext(String key, String value) {\n context.get().put(key, value);\n }", "private void setSmsTimeStamp(Context context, String timeStamp) {\n SharedPreferences sp = context.getSharedPreferences(\"sms_time_stamp\", Context.MODE_PRIVATE);\n sp.edit().putString(\"sms_time_stamp\", timeStamp).commit(); \n }", "public abstract void set(T v, String context);", "public static void save(String key, String value, String filename,\n Context context) {\n\n SharedPreferences sp = context.getSharedPreferences(filename, 0);\n SharedPreferences.Editor edit = sp.edit();\n edit.putString(key, value);\n edit.commit();\n\n }", "public static void setPreference(String key, String value) {\n editor = sharedPreferences.edit();\n\n editor.putString(key, value);\n editor.apply();\n }", "public static void saveConstituencyName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENCY_NAME, type);\n editor.apply();\n }", "void setContext(Map<String, Object> context);", "public void putString(String key, String value, boolean commit) {\r\n\t\tputString(Global.getContext(), key, value, commit);\r\n\t}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public void setPersistentString(String key, String value);", "public void setContext(String context) {\n\t\tif (context.startsWith(\"/\")) {\n\t\t\tthis.context = context;\n\t\t}\n\t\telse {\n\t\t\tthis.context = \"/\" + context;\n\t\t}\n\t}", "public static boolean m20715OooO00o(Context context, String str, String str2) {\n SharedPreferences.Editor edit = context.getSharedPreferences(OooO00o, 0).edit();\n edit.putString(str, str2);\n return edit.commit();\n }", "void set_str(ThreadContext tc, RakudoObject classHandle, String Value);", "public static void savePreferences(Context context, String strKey, Boolean blnValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(strKey, blnValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "public static void saveUserConstituencyName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENCY_NAME, type);\n editor.apply();\n }", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public Builder setContext(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n context_ = value;\n onChanged();\n return this;\n }", "public void setAppLocalValue(String key, String value) {\n Log.v(TAG, \"setAppLocalValue\");\n mAppLocalValues.put(key, value);\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "public void writeStringPrefs(String prefName, String prefValue) {\n editor = sPrefs.edit();\n editor.putString(prefName, prefValue);\n editor.apply();\n }", "public void setInt(String key, int value){\r\n SharedPreferences sp = getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "public static void putBoolean(Context context, String key, boolean value) {\n getPreferenceEditor(getSharePreferences(context)).putBoolean(key, value).apply();\n }", "public static void setPrefBooleanData(Context context, String key, boolean value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putBoolean(key, value);\n appInstallInfoEditor.apply();\n }", "public void setCurrentIdentity(String zzxxyz){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putString(\"zzxxyz\",zzxxyz);\n editor.commit();\n }", "public static void setTwitterId(String id, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ID, id);\n\t\t\tprefEditor.commit();\n\t\t}", "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 }", "public void putStringData(String key, String value) {\n editor.putString(key, value);\n editor.apply();\n }", "public static void saveConstituentID(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENT_ID, type);\n editor.apply();\n }", "public void set(T v) {\n\t\tset(v, ModSettings.currentContext);\n\t}", "public static void setTaskName6(Context context, String taskName6) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName6\", taskName6);\n editor.commit();\n }", "public static void savePaguthiID(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI_ID, type);\n editor.apply();\n }", "public void setContext(String namespace, String key, String value) {\n if (context == null) {\n context = new HashMap<String, Map<String, String>>();\n }\n\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap == null) {\n namespaceMap = new HashMap<String, String>();\n context.put(namespace, namespaceMap);\n }\n\n namespaceMap.put(key, value);\n }", "public void setSharedValue (String sharedKey, String sharedValue) {\n mSharedPreferences\n .edit()\n .putString(sharedKey, sharedValue)\n .apply();\n }" ]
[ "0.7643051", "0.7543771", "0.7414805", "0.7322049", "0.72934365", "0.72327393", "0.71924514", "0.718181", "0.71346825", "0.7003543", "0.69725865", "0.6902486", "0.6902486", "0.680964", "0.6793557", "0.6659102", "0.661727", "0.6612261", "0.65764105", "0.6557974", "0.654436", "0.65308756", "0.65083635", "0.65012825", "0.64874524", "0.6472942", "0.64304364", "0.6418828", "0.6407153", "0.6403346", "0.63989943", "0.6393617", "0.6384478", "0.6377124", "0.6373597", "0.637253", "0.6318397", "0.6306322", "0.6284187", "0.6269473", "0.6269473", "0.6269473", "0.6242653", "0.62327784", "0.6199773", "0.6195179", "0.6170393", "0.6169442", "0.61614347", "0.6144825", "0.61336845", "0.6129596", "0.6067801", "0.6064452", "0.6064122", "0.6060278", "0.6036965", "0.60324436", "0.6022332", "0.6019958", "0.6010029", "0.600603", "0.6000852", "0.59915894", "0.5990515", "0.59802914", "0.59693176", "0.5957154", "0.5921313", "0.59090126", "0.59018934", "0.58973485", "0.5894005", "0.58889806", "0.5888027", "0.5885887", "0.5884678", "0.5879303", "0.58755434", "0.58712095", "0.58571774", "0.58461905", "0.5838283", "0.5812861", "0.58101577", "0.5792817", "0.579267", "0.578138", "0.5779856", "0.57690775", "0.5757061", "0.5751764", "0.57469046", "0.5746043", "0.5744178", "0.574217", "0.571991", "0.56942487", "0.5689292", "0.568263", "0.5680298" ]
0.0
-1
Sets a string in the SharedPrefs for the given context
public static boolean setSharedPrefsString(Context pAppContext, int pStringNameResourceId, String pStringValue) { // Convert the resource identity to a string String sharedPrefsStringName = getResourceString(pAppContext, pStringNameResourceId); return setSharedPrefsString(pAppContext, sharedPrefsStringName, pStringValue); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setPrefStringData(Context context, String key, String value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putString(key, value);\n appInstallInfoEditor.apply();\n }", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "public static void setSetting(Context context, String key, String value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void SetPreferByString(Context context, String key,\n\t\t\tString value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putString(key, value);\n\t\teditor.commit();\n\t}", "public void setString(String key, String value) {\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void putString(String key, String value, Context context) {\n checkForNullKey(key);\n checkForNullValue(value);\n getSharedPreferences(context).edit().putString(key, value).apply();\n }", "synchronized public static void putString(Context context, String key, String value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.putString(key, value);\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public static void setSharePreferenceValue(Context context, String prefId, String prefValue) {\n SharedPreferences pref = context.getSharedPreferences(PREFERENCES, PREFERENCE_MODE);\n SharedPreferences.Editor editor = pref.edit();\n\n editor.putString(prefId, prefValue);\n editor.commit();\n }", "public static void setOtherPlayer(String value, Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"OtherPlayer\", value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "public static void setString(String aKey, String aValue) {\n getSharedPreferences().edit().putString(aKey, aValue).apply();\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public void setPreference(String key, String value) {\n\t SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(myContext);\n\t \n\t SharedPreferences.Editor editor = prefs.edit();\n\t editor.putString(key, value);\n\t editor.commit(); // important! Don't forget!\n\t}", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "@Override\n public void saveString(String key, String value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putString(key, checkNotNull(value));\n prefs.commit();\n }", "public void setContext(Context ctx) {\n\t\tprefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tupdateNextIdx();\n\t}", "public static boolean setSharedPrefsString(Context pAppContext,\n\t\t\tString pStringName, String pStringValue) {\n\t\tif (pAppContext == null || pStringName == null || pStringValue == null) {\n\t\t\t// It is arguable if we will allow pStringValue to be null here or\n\t\t\t// if we\n\t\t\t// force the usage of SharedPrefs.remove()\n\t\t\treturn false;\n\t\t}\n\n\t\t// Get the shared preferences instance for our app\n\t\tString sharedPrefString = getResourceString(pAppContext,\n\t\t\t\tR.string.shared_preferences_filename);\n\n\t\t// Get the actual preferences\n\t\tSharedPreferences sharedPrefs = pAppContext.getSharedPreferences(\n\t\t\t\tsharedPrefString, Context.MODE_PRIVATE);\n\n\t\t// Start editing\n\t\tEditor editor = sharedPrefs.edit();\n\n\t\t// Change the value\n\t\teditor.putString(pStringName, pStringValue);\n\n\t\t// Commit the changes to the SharedPrefs\n\t\teditor.commit();\n\n\t\treturn true;\n\t}", "public void saveValueToSharedPreference(Context context, String fileKey, Integer mode, String key, @Nullable String value) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value).apply();\n }", "public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public static void setTaskName1(Context context, String taskName) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName\", taskName);\n editor.commit();\n }", "public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public static void setTaskName3(Context context, String taskName3) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName3\", taskName3);\n editor.commit();\n }", "public void setContext(String context) {\n\n Set<String> contextNames = ((AppiumDriver) getDriver()).getContextHandles();\n\n if (contextNames.contains(context)) {\n ((AppiumDriver) getDriver()).context(context);\n info(\"Context changed successfully\");\n } else {\n info(context + \"not found on this page\");\n }\n\n info(\"Current context\" + ((AppiumDriver) getDriver()).getContext());\n }", "public final void setValue(java.lang.String value)\r\n\t{\r\n\t\tsetValue(getContext(), value);\r\n\t}", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "public static void setTaskName2(Context context, String taskName2) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName2\", taskName2);\n editor.commit();\n }", "public void setStr(String key, String value) {\n PREF_EDITOR.putString(key, value);\n PREF_EDITOR.commit();\n }", "public void putRoleValue(String key, String value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public static void setTaskName4(Context context, String taskName4) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName4\", taskName4);\n editor.commit();\n }", "private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }", "public static void setStringValue(final String prefFile, final String key, final String value) {\n final SharedPreferences sharedPref = getSharedPreferences(prefFile);\n final SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }", "protected void set(String key, String value)\r\n\t{ this.preferences.put(key, value); }", "public static void savePreferences(Context context, String strKey, int intValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(strKey, intValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public static void m45634b(Context context, String str, String str2) {\n String a = C7527b.m45601a(context, \"tpush_\" + str);\n SharedPreferences.Editor edit = m45630a(context).edit();\n edit.putString(a, str2);\n edit.commit();\n }", "public void setUsername(String username) {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"username\", username);\n editor.commit(); \t\n }", "public final void setValue(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String value)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Value.toString(), value);\r\n\t}", "public static void setSetting(Context context, String key, boolean value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(key, value);\n editor.commit();\n\n }", "public static void setPuzzle(String puzzle,String Ansver, Context context) {\n\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"Puzzle\", puzzle);\n editor.putString(\"Ansver\", Ansver);\n editor.commit();\n }", "public static void setTwitterUsername(String username, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_USERNAME, username);\n\t\t\tprefEditor.commit();\n\t\t}", "public static void setContext(String key, String value) {\r\n scenarioContext.put(key, value);\r\n }", "public static void savePaguthiName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI, type);\n editor.apply();\n }", "public static void setSetting(Context context, String key, long value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putLong(key, value);\n editor.commit();\n }", "public void setContext(String context) {\r\n\t\tthis.context = context;\r\n\t}", "public static void setTwitterScreenname(String screenname, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_SCREENNAME, screenname);\n\t\t\tprefEditor.commit();\n\t\t}", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public S<T> setPref(String value, String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t SharedPreferences.Editor editor = settings.edit();\n\t editor.putString(key, value);\n\t editor.commit();\n\t return this;\n\t}", "public void setContext(String context) {\n\t\tthis.context = context;\n\t}", "public static void saveToSharedPreference(String key, String value) {\n\n appSharePreference.edit().putString(key.toString(), value.toString()).apply();\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "private void storeKeyWord(String keyWord) {\n SharedPrefsUtils.setStringPreference(application.getApplicationContext(),\"KEY\",keyWord);\n }", "private void m2192d(String str) {\n this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).edit().putString(\"TOKEN\", str).apply();\n }", "public void putContext(String key, String value) {\n context.get().put(key, value);\n }", "private void setSmsTimeStamp(Context context, String timeStamp) {\n SharedPreferences sp = context.getSharedPreferences(\"sms_time_stamp\", Context.MODE_PRIVATE);\n sp.edit().putString(\"sms_time_stamp\", timeStamp).commit(); \n }", "public abstract void set(T v, String context);", "public static void save(String key, String value, String filename,\n Context context) {\n\n SharedPreferences sp = context.getSharedPreferences(filename, 0);\n SharedPreferences.Editor edit = sp.edit();\n edit.putString(key, value);\n edit.commit();\n\n }", "public static void setPreference(String key, String value) {\n editor = sharedPreferences.edit();\n\n editor.putString(key, value);\n editor.apply();\n }", "public static void saveConstituencyName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENCY_NAME, type);\n editor.apply();\n }", "void setContext(Map<String, Object> context);", "public void putString(String key, String value, boolean commit) {\r\n\t\tputString(Global.getContext(), key, value, commit);\r\n\t}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public void setPersistentString(String key, String value);", "public void setContext(String context) {\n\t\tif (context.startsWith(\"/\")) {\n\t\t\tthis.context = context;\n\t\t}\n\t\telse {\n\t\t\tthis.context = \"/\" + context;\n\t\t}\n\t}", "public static boolean m20715OooO00o(Context context, String str, String str2) {\n SharedPreferences.Editor edit = context.getSharedPreferences(OooO00o, 0).edit();\n edit.putString(str, str2);\n return edit.commit();\n }", "void set_str(ThreadContext tc, RakudoObject classHandle, String Value);", "public static void savePreferences(Context context, String strKey, Boolean blnValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(strKey, blnValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "public static void saveUserConstituencyName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENCY_NAME, type);\n editor.apply();\n }", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public Builder setContext(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n context_ = value;\n onChanged();\n return this;\n }", "public void setAppLocalValue(String key, String value) {\n Log.v(TAG, \"setAppLocalValue\");\n mAppLocalValues.put(key, value);\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "public void writeStringPrefs(String prefName, String prefValue) {\n editor = sPrefs.edit();\n editor.putString(prefName, prefValue);\n editor.apply();\n }", "public void setInt(String key, int value){\r\n SharedPreferences sp = getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "public static void putBoolean(Context context, String key, boolean value) {\n getPreferenceEditor(getSharePreferences(context)).putBoolean(key, value).apply();\n }", "public static void setPrefBooleanData(Context context, String key, boolean value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putBoolean(key, value);\n appInstallInfoEditor.apply();\n }", "public void setCurrentIdentity(String zzxxyz){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putString(\"zzxxyz\",zzxxyz);\n editor.commit();\n }", "public static void setTwitterId(String id, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ID, id);\n\t\t\tprefEditor.commit();\n\t\t}", "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 }", "public void putStringData(String key, String value) {\n editor.putString(key, value);\n editor.apply();\n }", "public static void saveConstituentID(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENT_ID, type);\n editor.apply();\n }", "public void set(T v) {\n\t\tset(v, ModSettings.currentContext);\n\t}", "public static void setTaskName6(Context context, String taskName6) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName6\", taskName6);\n editor.commit();\n }", "public static void savePaguthiID(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI_ID, type);\n editor.apply();\n }", "public void setContext(String namespace, String key, String value) {\n if (context == null) {\n context = new HashMap<String, Map<String, String>>();\n }\n\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap == null) {\n namespaceMap = new HashMap<String, String>();\n context.put(namespace, namespaceMap);\n }\n\n namespaceMap.put(key, value);\n }", "public void setSharedValue (String sharedKey, String sharedValue) {\n mSharedPreferences\n .edit()\n .putString(sharedKey, sharedValue)\n .apply();\n }" ]
[ "0.7642844", "0.75441843", "0.7416204", "0.73226136", "0.7294058", "0.7231375", "0.71916324", "0.7181179", "0.7135139", "0.7004751", "0.6972463", "0.69044876", "0.69044876", "0.68094987", "0.6793291", "0.6660063", "0.66190267", "0.6614692", "0.6577168", "0.6557441", "0.6544191", "0.65325516", "0.65081036", "0.65009224", "0.6487486", "0.64727217", "0.6429789", "0.6418665", "0.64093745", "0.6402702", "0.63983464", "0.6393792", "0.63839966", "0.6376259", "0.6374265", "0.63733643", "0.63170874", "0.6306372", "0.6284497", "0.62684286", "0.62684286", "0.62684286", "0.6242511", "0.6201374", "0.61959", "0.6170796", "0.6168734", "0.61632806", "0.61432415", "0.6135003", "0.6131774", "0.6068541", "0.60656327", "0.6063719", "0.6062435", "0.6036133", "0.60325664", "0.6022769", "0.60214543", "0.6009205", "0.60073036", "0.6002884", "0.59912753", "0.59912574", "0.59806937", "0.59702367", "0.5957277", "0.5920886", "0.59113204", "0.59011143", "0.589819", "0.5893026", "0.5890195", "0.5888499", "0.5886003", "0.58830893", "0.58784324", "0.5875662", "0.5870643", "0.58584774", "0.58458245", "0.5839213", "0.5812156", "0.5811221", "0.57953244", "0.579283", "0.5784293", "0.57812613", "0.57688916", "0.57576424", "0.5753712", "0.5748291", "0.5746487", "0.57438916", "0.574214", "0.5721567", "0.5693907", "0.568951", "0.5683182", "0.5682436" ]
0.62328964
43
Sets a string in the SharedPrefs for the given context
public static boolean setSharedPrefsString(Context pAppContext, String pStringName, String pStringValue) { if (pAppContext == null || pStringName == null || pStringValue == null) { // It is arguable if we will allow pStringValue to be null here or // if we // force the usage of SharedPrefs.remove() return false; } // Get the shared preferences instance for our app String sharedPrefString = getResourceString(pAppContext, R.string.shared_preferences_filename); // Get the actual preferences SharedPreferences sharedPrefs = pAppContext.getSharedPreferences( sharedPrefString, Context.MODE_PRIVATE); // Start editing Editor editor = sharedPrefs.edit(); // Change the value editor.putString(pStringName, pStringValue); // Commit the changes to the SharedPrefs editor.commit(); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setPrefStringData(Context context, String key, String value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putString(key, value);\n appInstallInfoEditor.apply();\n }", "public static void setShared(Context context, String name, String value) {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(name, value);\n editor.commit();\n }", "public static void setSetting(Context context, String key, String value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void SetPreferByString(Context context, String key,\n\t\t\tString value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putString(key, value);\n\t\teditor.commit();\n\t}", "public void setString(String key, String value) {\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void putString(String key, String value, Context context) {\n checkForNullKey(key);\n checkForNullValue(value);\n getSharedPreferences(context).edit().putString(key, value).apply();\n }", "synchronized public static void putString(Context context, String key, String value, boolean commit) {\r\n\t\tensurePreferencesEditor(context);\r\n\t\tsPreferencesEditor.putString(key, value);\r\n\t\tif (commit) {\r\n\t\t\tsPreferencesEditor.commit();\r\n\t\t}\r\n\t\tif (sInstance != null) {\r\n\t\t\tsInstance.mSettings.put(key, value);\r\n\t\t}\r\n\t}", "public static void write(Context context, String key, String value) {\n\t\tSharedPreferences sp = context.getSharedPreferences(Constant.PRE_CSDN_APP, Context.MODE_PRIVATE);\n\t\tsp.edit().putString(key, value).commit();\n\t}", "public static void saveToPrefs(Context context,String key, String value) {\n SharedPreferences prefs = getSettings();\n final SharedPreferences.Editor editor = prefs.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public static void setSharePreferenceValue(Context context, String prefId, String prefValue) {\n SharedPreferences pref = context.getSharedPreferences(PREFERENCES, PREFERENCE_MODE);\n SharedPreferences.Editor editor = pref.edit();\n\n editor.putString(prefId, prefValue);\n editor.commit();\n }", "public static void setOtherPlayer(String value, Context context) {\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"OtherPlayer\", value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public void setPrefrence(String key, String value) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n SharedPreferences.Editor editor = prefrence.edit();\n editor.putString(key, value);\n editor.commit();\n }", "public static void savePreferences(Context context, String strKey, String strValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(strKey, strValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n\n }\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "public static void setString(String aKey, String aValue) {\n getSharedPreferences().edit().putString(aKey, aValue).apply();\n }", "public void setSharedPreference(Activity activity,String key,String value){\n SharedPreferences sharedPreferences=activity.getSharedPreferences(activity.getPackageName(), Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public void setPreference(String key, String value) {\n\t SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(myContext);\n\t \n\t SharedPreferences.Editor editor = prefs.edit();\n\t editor.putString(key, value);\n\t editor.commit(); // important! Don't forget!\n\t}", "public void writeSyncPreferences(String string){\n mSharedPreference = mContext.getSharedPreferences(mContext.getString(\n R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSharedPreference.edit();\n editor.putString(getCurrentIdentity(),string);\n editor.commit();\n }", "private void saveToken(Context context, String text) {\n android.content.SharedPreferences settings;\n android.content.SharedPreferences.Editor editor;\n \n settings = context.getSharedPreferences(\"PREFS_NAME\", Context.MODE_PRIVATE);\n editor = settings.edit();\n editor.putString(\"TOKEN\", text);\n editor.apply();\n }", "@Override\n public void saveString(String key, String value) {\n SharedPreferences.Editor prefs = mSharedPreferences.edit();\n prefs.putString(key, checkNotNull(value));\n prefs.commit();\n }", "public void setContext(Context ctx) {\n\t\tprefs = PreferenceManager.getDefaultSharedPreferences(ctx);\n\t\tupdateNextIdx();\n\t}", "public void saveValueToSharedPreference(Context context, String fileKey, Integer mode, String key, @Nullable String value) {\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileKey, mode);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(key, value).apply();\n }", "public void saveString(String key,String value)\n {\n preference.edit().putString(key,value).apply();\n }", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public static void setTaskName1(Context context, String taskName) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName\", taskName);\n editor.commit();\n }", "public void saveName(String name, Context context){\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n prefs.edit().putString(\"spillernavn\", name).apply();\n }", "public void setPreference(View v){\n SharedPreferences.Editor editor = settings.edit();\n String prefValue = cHelpers.getText(this, R.id.editText);\n editor.putString(\"key1\",prefValue);\n editor.commit();\n cHelpers.show_toast(this, \"Preference Saved\");\n }", "public static void setTaskName3(Context context, String taskName3) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName3\", taskName3);\n editor.commit();\n }", "public void setContext(String context) {\n\n Set<String> contextNames = ((AppiumDriver) getDriver()).getContextHandles();\n\n if (contextNames.contains(context)) {\n ((AppiumDriver) getDriver()).context(context);\n info(\"Context changed successfully\");\n } else {\n info(context + \"not found on this page\");\n }\n\n info(\"Current context\" + ((AppiumDriver) getDriver()).getContext());\n }", "public final void setValue(java.lang.String value)\r\n\t{\r\n\t\tsetValue(getContext(), value);\r\n\t}", "public SharePref(Context context) {\n sPrefs = context.getSharedPreferences(PREFS_NAME, Context.MODE_PRIVATE);\n }", "public void setStr(String key, String value) {\n PREF_EDITOR.putString(key, value);\n PREF_EDITOR.commit();\n }", "public static void setTaskName2(Context context, String taskName2) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName2\", taskName2);\n editor.commit();\n }", "public void putRoleValue(String key, String value){\n SharedPreferences sharedPreference = context.getSharedPreferences(LOGIN, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreference.edit();\n editor.putString(key,value);\n editor.apply();\n }", "public static void setTaskName4(Context context, String taskName4) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName4\", taskName4);\n editor.commit();\n }", "private static void writeStringValue(String path, String value){\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(path, value);\n editor.apply();\n }", "public static void setStringValue(final String prefFile, final String key, final String value) {\n final SharedPreferences sharedPref = getSharedPreferences(prefFile);\n final SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(key, value);\n editor.apply();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "public void setContext(String context) {\n this.context = context == null ? null : context.trim();\n }", "protected void saveUser(Context context, String text){\n\n mSharedPreferences = context.getSharedPreferences(USER_DETAILS_PREFS_NAME, Context.MODE_PRIVATE);\n editor = mSharedPreferences.edit();\n\n editor.putString(USER_DETAILS_PREFS_KEY, text);\n\n editor.commit();\n }", "public static boolean setSharedPrefsString(Context pAppContext,\n\t\t\tint pStringNameResourceId, String pStringValue) {\n\t\t// Convert the resource identity to a string\n\t\tString sharedPrefsStringName = getResourceString(pAppContext,\n\t\t\t\tpStringNameResourceId);\n\n\t\treturn setSharedPrefsString(pAppContext, sharedPrefsStringName,\n\t\t\t\tpStringValue);\n\t}", "protected void set(String key, String value)\r\n\t{ this.preferences.put(key, value); }", "public static void savePreferences(Context context, String strKey, int intValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putInt(strKey, intValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public static void m45634b(Context context, String str, String str2) {\n String a = C7527b.m45601a(context, \"tpush_\" + str);\n SharedPreferences.Editor edit = m45630a(context).edit();\n edit.putString(a, str2);\n edit.commit();\n }", "public void setUsername(String username) {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"username\", username);\n editor.commit(); \t\n }", "public final void setValue(com.mendix.systemwideinterfaces.core.IContext context, java.lang.String value)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Value.toString(), value);\r\n\t}", "public static void setSetting(Context context, String key, boolean value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(key, value);\n editor.commit();\n\n }", "public static void setPuzzle(String puzzle,String Ansver, Context context) {\n\n SharedPreferences prefs = context.getSharedPreferences(PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"Puzzle\", puzzle);\n editor.putString(\"Ansver\", Ansver);\n editor.commit();\n }", "public static void setTwitterUsername(String username, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_USERNAME, username);\n\t\t\tprefEditor.commit();\n\t\t}", "public static void setContext(String key, String value) {\r\n scenarioContext.put(key, value);\r\n }", "public static void savePaguthiName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI, type);\n editor.apply();\n }", "public static void setSetting(Context context, String key, long value) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sp.edit();\n editor.putLong(key, value);\n editor.commit();\n }", "public void setContext(String context) {\r\n\t\tthis.context = context;\r\n\t}", "public static void setTwitterScreenname(String screenname, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_SCREENNAME, screenname);\n\t\t\tprefEditor.commit();\n\t\t}", "public static void setRequestToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_REQUEST_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public S<T> setPref(String value, String key) {\n\t SharedPreferences settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t settings = activity.getSharedPreferences(PREFS_NAME, 0);\n\t SharedPreferences.Editor editor = settings.edit();\n\t editor.putString(key, value);\n\t editor.commit();\n\t return this;\n\t}", "public void setContext(String context) {\n\t\tthis.context = context;\n\t}", "public static void saveToSharedPreference(String key, String value) {\n\n appSharePreference.edit().putString(key.toString(), value.toString()).apply();\n }", "private void setValuesInSharedPrefernce() {\r\n\r\n\t\tmSharedPreferences_reg.edit().putString(\"ProfileImageString\", profileImageString).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"PseudoName\", psedoName).commit();\r\n\t\tmSharedPreferences_reg.edit().putString(\"Pseudodescription\", profiledescription).commit();\r\n\t}", "private void m2192d(String str) {\n this.f980b.m1158c().getSharedPreferences(\"com.facebook.login.AuthorizationClient.WebViewAuthHandler.TOKEN_STORE_KEY\", 0).edit().putString(\"TOKEN\", str).apply();\n }", "private void storeKeyWord(String keyWord) {\n SharedPrefsUtils.setStringPreference(application.getApplicationContext(),\"KEY\",keyWord);\n }", "public void putContext(String key, String value) {\n context.get().put(key, value);\n }", "private void setSmsTimeStamp(Context context, String timeStamp) {\n SharedPreferences sp = context.getSharedPreferences(\"sms_time_stamp\", Context.MODE_PRIVATE);\n sp.edit().putString(\"sms_time_stamp\", timeStamp).commit(); \n }", "public abstract void set(T v, String context);", "public static void save(String key, String value, String filename,\n Context context) {\n\n SharedPreferences sp = context.getSharedPreferences(filename, 0);\n SharedPreferences.Editor edit = sp.edit();\n edit.putString(key, value);\n edit.commit();\n\n }", "public static void setPreference(String key, String value) {\n editor = sharedPreferences.edit();\n\n editor.putString(key, value);\n editor.apply();\n }", "public static void saveConstituencyName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENCY_NAME, type);\n editor.apply();\n }", "void setContext(Map<String, Object> context);", "public void putString(String key, String value, boolean commit) {\r\n\t\tputString(Global.getContext(), key, value, commit);\r\n\t}", "public void setPersistentString(String key, String value);", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public void setContext(String context) {\n\t\tif (context.startsWith(\"/\")) {\n\t\t\tthis.context = context;\n\t\t}\n\t\telse {\n\t\t\tthis.context = \"/\" + context;\n\t\t}\n\t}", "public static boolean m20715OooO00o(Context context, String str, String str2) {\n SharedPreferences.Editor edit = context.getSharedPreferences(OooO00o, 0).edit();\n edit.putString(str, str2);\n return edit.commit();\n }", "void set_str(ThreadContext tc, RakudoObject classHandle, String Value);", "public static void savePreferences(Context context, String strKey, Boolean blnValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(strKey, blnValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "public static void saveUserConstituencyName(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENCY_NAME, type);\n editor.apply();\n }", "public static void setAccessToken(String token, Context context){\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ACCESS_TOKEN, token);\n\t\t\tprefEditor.commit();\n\t\t\t\n\t\t}", "public Builder setContext(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n context_ = value;\n onChanged();\n return this;\n }", "public void setAppLocalValue(String key, String value) {\n Log.v(TAG, \"setAppLocalValue\");\n mAppLocalValues.put(key, value);\n }", "public static boolean writePreferences(final Context context,\n\t\t\tfinal String key, final String value) {\n\t\tboolean result = false;\n\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tfinal Editor editor = sharedPreferences.edit();\n\t\tif (editor != null) {\n\t\t\teditor.putString(key, value);\n\t\t\teditor.commit();\n\t\t\tresult = true;\n\t\t}\n\n\t\treturn result;\n\t}", "public void saveInPreference(String name, String content) {\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tSharedPreferences.Editor editor = preferences.edit();\n\t\teditor.putString(name, content);\n\t\teditor.commit();\n\t}", "public void setActive(String key, int value){\r\n SharedPreferences sp = this.getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "public void writeStringPrefs(String prefName, String prefValue) {\n editor = sPrefs.edit();\n editor.putString(prefName, prefValue);\n editor.apply();\n }", "public void setInt(String key, int value){\r\n SharedPreferences sp = getActivity().getSharedPreferences(\"your_prefs\", Activity.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = sp.edit();\r\n editor.putInt(key, value); // key, string\r\n editor.apply();\r\n }", "protected void SavePreferences(String key, String value) {\n SharedPreferences data = PreferenceManager.getDefaultSharedPreferences(this);\n SharedPreferences.Editor editor = data.edit();\n editor.putString(key, value);\n editor.commit();\n\n\n }", "public static void putBoolean(Context context, String key, boolean value) {\n getPreferenceEditor(getSharePreferences(context)).putBoolean(key, value).apply();\n }", "public static void setPrefBooleanData(Context context, String key, boolean value) {\n SharedPreferences appInstallInfoSharedPref = context.\n getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n SharedPreferences.Editor appInstallInfoEditor = appInstallInfoSharedPref.edit();\n appInstallInfoEditor.putBoolean(key, value);\n appInstallInfoEditor.apply();\n }", "public void setCurrentIdentity(String zzxxyz){\n mSharedPreference = mContext.getSharedPreferences( mContext.getString(R.string.sharedpreferencesFileName),Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=mSharedPreference.edit();\n editor.putString(\"zzxxyz\",zzxxyz);\n editor.commit();\n }", "public static void setTwitterId(String id, Context context) {\n\t\t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);\n\t\t\tSharedPreferences.Editor prefEditor = prefs.edit();\n\t\t\tprefEditor.putString(TWITTER_ID, id);\n\t\t\tprefEditor.commit();\n\t\t}", "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 }", "public void putStringData(String key, String value) {\n editor.putString(key, value);\n editor.apply();\n }", "public static void saveConstituentID(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_CONSTITUENT_ID, type);\n editor.apply();\n }", "public void set(T v) {\n\t\tset(v, ModSettings.currentContext);\n\t}", "public static void setTaskName6(Context context, String taskName6) {\n SharedPreferences prefs = context.getSharedPreferences(\"com.mobile.counterappmobile\", 0);\n SharedPreferences.Editor editor = prefs.edit();\n editor.putString(\"taskName6\", taskName6);\n editor.commit();\n }", "public static void savePaguthiID(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.PAGUTHI_ID, type);\n editor.apply();\n }", "public void setContext(String namespace, String key, String value) {\n if (context == null) {\n context = new HashMap<String, Map<String, String>>();\n }\n\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap == null) {\n namespaceMap = new HashMap<String, String>();\n context.put(namespace, namespaceMap);\n }\n\n namespaceMap.put(key, value);\n }", "public void setSharedValue (String sharedKey, String sharedValue) {\n mSharedPreferences\n .edit()\n .putString(sharedKey, sharedValue)\n .apply();\n }" ]
[ "0.76428187", "0.7544289", "0.74160355", "0.7322859", "0.72951674", "0.7232091", "0.7192184", "0.71814966", "0.7134157", "0.7004901", "0.69712895", "0.690441", "0.690441", "0.6808672", "0.679368", "0.6661741", "0.6619375", "0.6614457", "0.6577379", "0.65572774", "0.65448475", "0.6530736", "0.6500949", "0.6487827", "0.6471193", "0.6429468", "0.6418202", "0.6409007", "0.64027405", "0.6398557", "0.6395541", "0.6381726", "0.6375898", "0.6375796", "0.6374289", "0.6317201", "0.63072556", "0.6285546", "0.62685263", "0.62685263", "0.62685263", "0.6241812", "0.6234122", "0.62013793", "0.6194913", "0.61699766", "0.6169417", "0.6163896", "0.6144549", "0.6134941", "0.61309695", "0.60686415", "0.60665876", "0.6063107", "0.60624534", "0.6035908", "0.6032932", "0.60229605", "0.6021722", "0.6008974", "0.6007704", "0.60027444", "0.59926534", "0.5991365", "0.5981316", "0.5970796", "0.59585994", "0.5920661", "0.59115595", "0.59007955", "0.58980614", "0.58948016", "0.5889372", "0.5888307", "0.5886384", "0.58826023", "0.588083", "0.58748215", "0.5870306", "0.58588016", "0.58463234", "0.583992", "0.58113486", "0.5810366", "0.57950777", "0.5792499", "0.57842726", "0.5780133", "0.57685804", "0.57572836", "0.5754737", "0.5747773", "0.5747102", "0.5745299", "0.5741728", "0.5721955", "0.5694385", "0.5688781", "0.5683856", "0.56836855" ]
0.65088904
22
This method allows passing resource identifiers instead of boolean literals as names of preferences to retrieve
public static boolean getSharedPrefsBoolean(Context pAppContext, int pResourceBooleanNameId) { // Convert the resource identity to a string String sharedPrefsBooleanName = getResourceString(pAppContext, pResourceBooleanNameId); return getSharedPrefsBoolean(pAppContext, sharedPrefsBooleanName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "io.dstore.values.BooleanValue getPredefinedValues();", "public static boolean GetPreferByBoolean(Context context, String key) {\n\t\tSharedPreferences mPrefer = PreferenceManager.getDefaultSharedPreferences(context);\n\t\treturn mPrefer.getBoolean(key, false);\n\t}", "public interface PreferenceHelper {\r\n // Preference Name\r\n String PREFERENCE_NAME = \"Embedded_Downloads_preference\";\r\n // Preference mode\r\n int PRIVATE_MODE = 0;\r\n String INITIAL_START = \"initial_start\";\r\n String WALLET_ADDRESS = \"wallet_address\";\r\n String WALLET_NAME = \"wallet_name\";\r\n String TRANSACTION_WALLET_ADDRESS = \"transaction_wallet_address\";\r\n String WALLET_POSITION =\"wallet_position\";\r\n String CALL_TRANSACTION_STATUS = \"call_transaction_status\";\r\n String CALL_INCOMING = \"call_incoming\";\r\n String CALL_OUTGOING = \"call_outgoing\";\r\n}", "Object getPreference(String prefKey, Object defaultValue);", "public void checkDefaults(){\n \t\tSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(Options.this);\n \t\tboolean defaultOn = prefs.getBoolean(\"checkbox_default\", true);\n \t\t//Toast.makeText(this, \"Default: \" + defaultOn, Toast.LENGTH_SHORT).show();\n \t\tif(defaultOn){\n \t\t\t//Code Here\n \t\t\ttry{\n \t\t\t\tPreferenceCategory aCategory = (PreferenceCategory)findPreference(\"category_appearance\");\n \t\t\t\tPreferenceScreen tScreen = (PreferenceScreen)findPreference(\"pref_screen_transactions\");\n \t\t\t\tPreferenceScreen aScreen = (PreferenceScreen)findPreference(\"pref_screen_accounts\");\n \t\t\t\taCategory.setSelectable(false);\n \t\t\t\taCategory.setEnabled(false);\n \t\t\t\ttScreen.setEnabled(false);\n \t\t\t\ttScreen.setSelectable(false);\n \t\t\t\taScreen.setEnabled(false);\n \t\t\t\taScreen.setSelectable(false);\n \t\t\t}\n \t\t\tcatch(Exception e){\n \t\t\t\tToast.makeText(Options.this, \"ERROR PREFERENCES\\n\" + e.toString(), Toast.LENGTH_LONG).show();\n \t\t\t}\n \t\t}\n \t\telse{\n \t\t\t//Code Here\n \t\t\ttry{\n \t\t\t\tPreferenceCategory aCategory = (PreferenceCategory)findPreference(\"category_appearance\");\n \t\t\t\tPreferenceScreen tScreen = (PreferenceScreen)findPreference(\"pref_screen_transactions\");\n \t\t\t\tPreferenceScreen aScreen = (PreferenceScreen)findPreference(\"pref_screen_accounts\");\n \t\t\t\taCategory.setSelectable(true);\n \t\t\t\taCategory.setEnabled(true);\n \t\t\t\ttScreen.setEnabled(true);\n \t\t\t\ttScreen.setSelectable(true);\n \t\t\t\taScreen.setEnabled(true);\n \t\t\t\taScreen.setSelectable(true);\n \t\t\t}\n \t\t\tcatch(Exception e){\n \t\t\t\tToast.makeText(Options.this, \"ERROR PREFERENCES\\n\" + e.toString(), Toast.LENGTH_LONG).show();\n \t\t\t}\n \t\t}\n \n \t}", "public interface GeneralPreferenceHelper {\n String PREF_USER_NAME = \"pref_name_user\";\n String PREF_ENABLE_SOCIAL = \"pref_social_recomendation\";\n}", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "protected abstract String getHintGivenSharedPreferencesKey();", "@Override\n public boolean getBoolean(String key, boolean defaultVal) {\n return mSharedPreferences.getBoolean(key, defaultVal);\n }", "protected void changePreferences(CheckBox preference, CheckBox[] preferenceButtons) {\n SharedPreferences preferences = getApplicationContext().getSharedPreferences(\"Preferences\", Context.MODE_PRIVATE);\n Editor prefEdit = preferences.edit();\n if (preference.isChecked()) {\n prefEdit.putBoolean(String.valueOf(preference.getId()), true).apply();\n } else {\n prefEdit.putBoolean(String.valueOf(preference.getId()), false).apply();\n }\n\n for (CheckBox preferenceButton : preferenceButtons) {\n if (preferences.getBoolean(String.valueOf(preferenceButton.getId()), false))\n return;\n }\n prefEdit.putBoolean(String.valueOf(preferenceButtons[1].getId()), true).apply();\n checkBoxIfInPreference(preferenceButtons[1]);\n }", "public boolean readBooleanPrefs(String prefName) {\n return sPrefs.getBoolean(prefName, false);\n }", "@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }", "private void showPreferenceSettings() {\n \tfor(PrefKeysE k: PrefKeysE.values()) {\n \t\tString key = k.getKey();\n \t\tboolean isFound = Tt.isPreferencePresent(key);\n \t\tint prtFlags = 0; //don't print from getPreference()\n// \t\tboolean valB;\n// \t\tint valI;\n// \t\tdouble valD;\n \t\tString valFoundStr = \"\";\n \t\tString prefix = String.format(\"%-40s: %-7s: found? %s, default \", key, k.getType().name(), (isFound ? \"Y\" : \"N\"));\n \t\tswitch(k.getType()) {\n \t\tcase BOOLEAN:\n \t\t\tboolean dfltB = k.getDefaultBoolean();\n \t\t\tvalFoundStr += dfltB;\n \t\t\tif(isFound) {\n \t\t\t\tboolean val = Tt.getPreference(k, dfltB, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase INT:\n \t\t\tint dfltI = k.getDefaultInt();\n \t\t\tvalFoundStr += dfltI;\n \t\t\tif(isFound) {\n \t\t\t\tint val = Tt.getPreference(k, dfltI, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase DOUBLE:\n \t\t\tdouble dfltD = k.getDefaultDouble();\n \t\t\tvalFoundStr = String.format(\"% 1.4f\", dfltD);\n \t\t\tif(isFound) {\n \t\t\t\tdouble val = Tt.getPreference(k, dfltD, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += String.format(\", current % 1.4f\", val);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase STRING:\n \t\t\tString dfltS = k.getDefaultString();\n\t\t\t\tvalFoundStr += \"'\" + dfltS + \"'\";\n \t\t\tif(isFound) {\n \t\t\t\tString val = Tt.getPreference(k, dfltS, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current '\" + val + \"'\";\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n\t\t\tP.println(prefix + valFoundStr);\n\n// \t\tif(k.getType().equals(PrefTypeE.BOOLEAN)) \n \t}\n }", "@Override // com.android.settings.core.InstrumentedPreferenceFragment, com.android.settings.dashboard.DashboardFragment\n public int getPreferenceScreenResId() {\n return C0019R$xml.feature_flags_settings;\n }", "protected void onPref(String name, String value){}", "public interface PrefsKey {\n\n String Ssid = \"Ssid\";\n String HotKeys = \"HotKeys\";\n String HistoryKeys = \"HistoryKeys\";\n String HistoryCooking = \"HistoryCooking\";\n\n String Guided = \"Guided\";\n}", "boolean getPausePreviewPref();", "private void getPreferences() {\n\n if(sharedpreferences.getBoolean(\"usaGPU\", true)) {\n mUtilizzoGPU.setChecked(true);\n }\n else{\n mUtilizzoGPU.setChecked(false);\n }\n\n }", "public static Boolean getPrefBooleanData(Context context, String key) {\n try {\n SharedPreferences pref = context.getSharedPreferences(APP_CONFIG_PREF, Context.MODE_PRIVATE);\n return pref.getBoolean(key, false);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }", "boolean getBoolean(String key, boolean defaultValue);", "public interface PreferencesHelper {\n\n boolean getNoImageState();\n\n void setNoImageState(boolean state);\n\n}", "public static void SetPreferByBoolean(Context context, String key,\n\t\t\tboolean value) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\tEditor editor = mPrefer.edit();\n\t\teditor.putBoolean(key, value);\n\t\teditor.commit();\n\t}", "private void updateButtonWithPreferences() {\n\t\tRadioButton c1 = (RadioButton)findViewById(R.id.ch_01Setting);\n\t\tRadioButton c2 = (RadioButton)findViewById(R.id.ch_02Setting);\n\t\tRadioButton c3 = (RadioButton)findViewById(R.id.ch_03Setting);\n\t\tRadioButton c4 = (RadioButton)findViewById(R.id.ch_04Setting);\n\t\tRadioButton c5 = (RadioButton)findViewById(R.id.ch_05Setting);\n\t\tRadioButton c6 = (RadioButton)findViewById(R.id.ch_06Setting);\n\t\tRadioButton c061 = (RadioButton)findViewById(R.id.ch_061Setting);\n\t\tRadioButton c7 = (RadioButton)findViewById(R.id.ch_07Setting);\n\t\tRadioButton c8 = (RadioButton)findViewById(R.id.ch_08Setting);\n\t\tRadioButton c9 = (RadioButton)findViewById(R.id.ch_09Setting);\n\t\tRadioButton c10 = (RadioButton)findViewById(R.id.ch_10Setting);\n\t\tRadioButton c11 = (RadioButton)findViewById(R.id.ch_11Setting);\n\t\tRadioButton c111 = (RadioButton)findViewById(R.id.ch_111Setting);\n\t\tRadioButton c12 = (RadioButton)findViewById(R.id.ch_12Setting);\n\t\tRadioButton c13 = (RadioButton)findViewById(R.id.ch_13Setting);\n\t\tRadioButton c131 = (RadioButton)findViewById(R.id.ch_131Setting);\n\t\tRadioButton c14 = (RadioButton)findViewById(R.id.ch_14Setting);\n\t\tRadioButton c15 = (RadioButton)findViewById(R.id.ch_15Setting);\n\t\tRadioButton c16 = (RadioButton)findViewById(R.id.ch_16Setting);\n\t\tRadioButton c17 = (RadioButton)findViewById(R.id.ch_17Setting);\n\t\tRadioButton c18 = (RadioButton)findViewById(R.id.ch_18Setting);\n\t\tRadioButton c19 = (RadioButton)findViewById(R.id.ch_19Setting);\n\t\tRadioButton c20 = (RadioButton)findViewById(R.id.ch_20Setting);\n\t\tRadioButton c21 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c22 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c23 = (RadioButton)findViewById(R.id.ch_23Setting);\n\t\tRadioButton c24 = (RadioButton)findViewById(R.id.ch_24Setting);\n\t\tRadioButton c25 = (RadioButton)findViewById(R.id.ch_25Setting);\n\t\tRadioButton c26 = (RadioButton)findViewById(R.id.ch_26Setting);\n\t\tRadioButton c27 = (RadioButton)findViewById(R.id.ch_27Setting);\n\t\tRadioButton c28 = (RadioButton)findViewById(R.id.ch_28Setting);\n\t\tRadioButton c29 = (RadioButton)findViewById(R.id.ch_29Setting);\n\t\tRadioButton c291 = (RadioButton)findViewById(R.id.ch_291Setting);\n\t\tRadioButton c30 = (RadioButton)findViewById(R.id.ch_30Setting);\n\t\tRadioButton c31 = (RadioButton)findViewById(R.id.ch_31Setting);\n\t\tRadioButton c32 = (RadioButton)findViewById(R.id.ch_32Setting);\n\t\tRadioButton c321 = (RadioButton)findViewById(R.id.ch_321Setting);\n\t\tRadioButton c322 = (RadioButton)findViewById(R.id.ch_322Setting);\n\t\t\n\t\tSharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0);\n\t\tint diff = settings.getInt(Constants.CHAPTER, Constants.CH_01);\n\t\t\n\t\tswitch (diff)\n\t\t{\n\t\tcase Constants.CH_01 : \n\t\t\tc1.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_02 : \n\t\t\tc2.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_03 :\n\t\t\tc3.toggle();\n\t\t\tbreak;\t\n\t\t\t\n\t\tcase Constants.CH_04 : \n\t\t\tc4.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_05 : \n\t\t\tc5.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_06 :\n\t\t\tc6.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_061 :\n\t\t\tc061.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_07 : \n\t\t\tc7.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_08 : \n\t\t\tc8.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_09 :\n\t\t\tc9.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_10 : \n\t\t\tc10.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_11 : \n\t\t\tc11.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_111 : \n\t\t\tc111.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_12 :\n\t\t\tc12.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_13 : \n\t\t\tc13.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_131 : \n\t\t\tc131.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_14 : \n\t\t\tc14.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_15 :\n\t\t\tc15.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_16 : \n\t\t\tc16.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_17 : \n\t\t\tc17.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_18 :\n\t\t\tc18.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_19 : \n\t\t\tc19.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_20 : \n\t\t\tc20.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_21 :\n\t\t\tc21.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_22 : \n\t\t\tc22.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_23 : \n\t\t\tc23.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_24 :\n\t\t\tc24.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_25 : \n\t\t\tc25.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_26 : \n\t\t\tc26.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_27 :\n\t\t\tc27.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_28 : \n\t\t\tc28.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_29 : \n\t\t\tc29.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_291 : \n\t\t\tc291.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_30 :\n\t\t\tc30.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_31 : \n\t\t\tc31.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_32 : \n\t\t\tc32.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_321 : \n\t\t\tc321.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_322 : \n\t\t\tc322.toggle();\n\t\t\tbreak;\n\t\t}\n\t}", "@Test\n public void testIsDeselectPluginsOnExecuteEnabled() {\n System.out.println(\"isDeselectPluginsOnExecuteEnabled\");\n final String preferenceKey = \"deselectPluginsOnExecute\";\n\n // Verify preference does not exist and also returns the correct default of false\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), false);\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n\n // verify preference is set correctly\n preferences.putBoolean(preferenceKey, true);\n assertEquals(preferences.getBoolean(preferenceKey, false), true);\n\n // Verify method call returns correct value\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), true);\n\n // put in a false value to check toggling, recheck\n preferences.putBoolean(preferenceKey, false);\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), false);\n assertEquals(preferences.getBoolean(preferenceKey, false), false);\n\n // Verify method call returns correct value\n assertEquals(DataAccessPreferenceUtilities.isDeselectPluginsOnExecuteEnabled(), false);\n\n }", "public static boolean getBooleanPref(String key) {\n\t\treturn prefs.getBoolean(key, false);\n\t}", "public static Boolean getBooleanPreference(String key) {\n return sharedPreferences.getBoolean(key, false);\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }", "public boolean getBoolean(@NonNull String name, boolean defaultValue) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n return prefs == null ? defaultValue : prefs.getBoolean(name, defaultValue);\n }", "private Map<String,Boolean> copyMapFromPreferenceStore(){\n \tMap<String,Boolean> preferences = new HashMap<String,Boolean>();\n \tIPreferenceStore store = EMFTextEditUIPlugin.getDefault().getPreferenceStore();\n \tpreferences.put(ResourcePackageGenerator.GENERATE_PRINTER_STUB_ONLY_NAME,store.getBoolean(ResourcePackageGenerator.GENERATE_PRINTER_STUB_ONLY_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_ANTLR_SPEC_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_ANTLR_SPEC_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_PRINTER_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_PRINTER_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_PROXY_RESOLVERS_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_PROXY_RESOLVERS_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVER_FACTORY_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVER_FACTORY_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVERS_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVERS_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TREE_ANALYSER_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TREE_ANALYSER_NAME));\n \treturn preferences;\n }", "String getPreference(String user, String preferenceName) throws OntimizeJEERuntimeException;", "private void readPreferences()\n {\n\n \tCheckBox myNotifyRing\t= (CheckBox) findViewById(R.id.CheckBoxNotifyRing);\n \tCheckBox myNotifyCharge\t= (CheckBox) findViewById(R.id.CheckBoxNotifyCharge);\n \tCheckBox myNotifySMS\t= (CheckBox) findViewById(R.id.CheckBoxNotifySMS);\n \tCheckBox myNotifyMail\t= (CheckBox) findViewById(R.id.CheckBoxNotifyMail);\n \tCheckBox myNotifyIM\t\t= (CheckBox) findViewById(R.id.CheckBoxNotifyIM);\n\n \tCheckBox myVibrateRing\t= (CheckBox) findViewById(R.id.CheckBoxVibrateRing);\n \tCheckBox myVibrateSMS\t= (CheckBox) findViewById(R.id.CheckBoxVibrateSMS);\n \tCheckBox myVibrateMail\t= (CheckBox) findViewById(R.id.CheckBoxVibrateMail);\n \tCheckBox myVibrateIM\t= (CheckBox) findViewById(R.id.CheckBoxVibrateIM);\n\n \tCheckBox mySoundRing\t= (CheckBox) findViewById(R.id.CheckBoxSoundRing);\n \tCheckBox mySoundSMS\t\t= (CheckBox) findViewById(R.id.CheckBoxSoundSMS);\n \tCheckBox mySoundMail\t= (CheckBox) findViewById(R.id.CheckBoxSoundMail);\n \tCheckBox mySoundIM\t\t= (CheckBox) findViewById(R.id.CheckBoxSoundIM);\n \t\n \tCheckBox myVibrateOff\t= (CheckBox) findViewById(R.id.CheckBoxVibrationOff);\n \tCheckBox mySoundOff\t= (CheckBox) findViewById(R.id.CheckBoxSoundOff);\n \t\n \tSpinner mySpinnerRing \t= (Spinner) findViewById(R.id.SpinnerRing);\n \tSpinner mySpinnerCharge = (Spinner) findViewById(R.id.SpinnerCharge);\n \tSpinner mySpinnerSMS \t= (Spinner) findViewById(R.id.SpinnerSMS);\n \tSpinner mySpinnerMail \t= (Spinner) findViewById(R.id.SpinnerMail);\n \tSpinner mySpinnerIM \t= (Spinner) findViewById(R.id.SpinnerIM);\n \tSpinner mySpinnerSleep \t= (Spinner) findViewById(R.id.SpinnerSleep);\n \t\n \tSpinner mySpinnerVFrom \t= (Spinner) findViewById(R.id.SpinnerVibrationOffFrom);\n \tSpinner mySpinnerVTo \t= (Spinner) findViewById(R.id.SpinnerVibrationOffTo);\n \tSpinner mySpinnerSFrom \t= (Spinner) findViewById(R.id.SpinnerSoundOffFrom);\n \tSpinner mySpinnerSTo \t= (Spinner) findViewById(R.id.SpinnerSoundOffTo);\n\n \t\n myNotifyRing.setChecked(m_myPrefs.getNotifyRing());\n myNotifyCharge.setChecked(m_myPrefs.getNotifyCharge());\n myNotifySMS.setChecked(m_myPrefs.getNotifySMS());\n myNotifyMail.setChecked(m_myPrefs.getNotifyMail());\n myNotifyIM.setChecked(m_myPrefs.getNotifyIM());\n \n myVibrateRing.setChecked(m_myPrefs.getVibrateRing());\n myVibrateSMS.setChecked(m_myPrefs.getVibrateSMS());\n myVibrateMail.setChecked(m_myPrefs.getVibrateMail());\n myVibrateIM.setChecked(m_myPrefs.getVibrateIM());\n\n mySoundRing.setChecked(m_myPrefs.getPlaySoundRing());\n mySoundSMS.setChecked(m_myPrefs.getPlaySoundSMS());\n mySoundMail.setChecked(m_myPrefs.getPlaySoundMail());\n mySoundIM.setChecked(m_myPrefs.getPlaySoundIM());\n\n mySpinnerRing.setSelection(m_myPrefs.getEffectRing());\n mySpinnerCharge.setSelection(m_myPrefs.getEffectCharge());\n mySpinnerSMS.setSelection(m_myPrefs.getEffectSMS());\n mySpinnerMail.setSelection(m_myPrefs.getEffectMail());\n mySpinnerIM.setSelection(m_myPrefs.getEffectIM());\n mySpinnerSleep.setSelection(m_myPrefs.getEffectSleep());\n \n // sounds\n m_strUriRing \t= m_myPrefs.getSoundRing();\t \n m_strUriSMS \t= m_myPrefs.getSoundSMS();\n m_strUriIM \t\t= m_myPrefs.getSoundIM();\n m_strUriMail\t= m_myPrefs.getSoundMail();\n \n // silence options\n myVibrateOff.setChecked(m_myPrefs.getVibrateOff());\n mySoundOff.setChecked(m_myPrefs.getSoundOff());\n \n mySpinnerVFrom.setSelection(m_myPrefs.getVibrateOffTimespan().getFromHours());\n mySpinnerVTo.setSelection(m_myPrefs.getVibrateOffTimespan().getToHours());\n mySpinnerSFrom.setSelection(m_myPrefs.getSoundOffTimespan().getFromHours());\n mySpinnerSTo.setSelection(m_myPrefs.getSoundOffTimespan().getToHours());\n\n }", "private ArrayList<Boolean> createBoolArrayList(String notificationPreferences){\n String[] genres = getResources().getStringArray(R.array.genre);\n ArrayList<Boolean> isCheckedArray = new ArrayList<>();\n String[] arrayNotificationPref = notificationPreferences.split(\",\");\n\n for (int i = 0; i < genres.length; i++){\n isCheckedArray.add(false);\n for (String curNotification: arrayNotificationPref) {\n if (genres[i].equals(curNotification)){\n isCheckedArray.set(i,true);\n }\n }\n }\n\n return isCheckedArray;\n }", "private void setPreferences(String sw, boolean checked) {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(sw,checked);\n editor.apply();\n\n }", "public BooleanVariable getBooleanVariable(String name) {\n return booleanVariableMap.get(name);\n }", "String getSceneModePref();", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public boolean getBoolean(String key) {\r\n try {\r\n String string = getString(key);\r\n return string.equalsIgnoreCase(\"true\") || string.equals(\"1\");\r\n }\r\n catch (MissingResourceException e) {\r\n return false;\r\n }\r\n }", "public boolean getBoolean(String name, boolean defaultValue)\n/* */ {\n/* 862 */ String value = getString(name);\n/* 863 */ if (value == null) {\n/* 864 */ return defaultValue;\n/* */ }\n/* 866 */ return (value.equals(\"1\")) || (value.toLowerCase().equals(\"true\"));\n/* */ }", "public Boolean getBoolean(String key, Boolean defaultValue);", "private boolean getBoolean(String paramString, boolean paramBoolean) {\n }", "public IPreferenceStore getPreferenceStore(String name);", "public boolean getBoolean(String key, boolean defaultValue);", "public interface HasCollectUserPreference\n {\n /**\n * not feedback\n */\n String NOT_FEEDBACK = \"0\";\n\n /**\n * Has feedback\n */\n String FEEDBACK = \"1\";\n }", "private String prefTag(String id) {\n\t\treturn preferenceTag + \"_\" + id;\n\t}", "public GallerySwitchPreference(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n mResources = context.getResources();\n }", "io.dstore.values.BooleanValueOrBuilder getPredefinedValuesOrBuilder();", "public boolean getBoolean(String name)\r\n {\r\n if( \"true\".equals(getString(name)) )\r\n return true;\r\n else\r\n return false;\r\n }", "public String prefsAutomaticallyCheck();", "public interface IContextPreferenceProvider {\n\n\t/**\n\t * Returns a specific storage. \n\t * @return\n\t */\n\tpublic IPreferenceStore getPreferenceStore(String name);\n\t\n}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }", "private void getPrefStatus() {\n Log.i(TAG, \"getPrefStatus()\");\n mPref = getSharedPreferences(PREF_NAME, Context.MODE_WORLD_READABLE\n | Context.MODE_WORLD_WRITEABLE);\n mHasGotPref = true;\n for (int i = SPEED_DIAL_MIN; i < SPEED_DIAL_MAX + 1; ++i) {\n mPrefNumState[i] = mPref.getString(String.valueOf(i), \"\");\n mPrefMarkState[i] = mPref.getInt(String.valueOf(offset(i)), -1);\n }\n }", "@Override\n public void onClick(View v) {\n SharedPreferences.Editor prefsEditor = settingsPreferences.edit();\n if (settingsPreferences.getBoolean(TAG_SOUND_NOTIFICATION, false)) {\n prefsEditor.putBoolean(TAG_SOUND_NOTIFICATION, false);\n cbSoundNotify.setImageResource(R.drawable.check2);\n } else {\n prefsEditor.putBoolean(TAG_SOUND_NOTIFICATION, true);\n cbSoundNotify.setImageResource(R.drawable.check0);\n }\n prefsEditor.commit();\n }", "public static boolean getBooleanSetting(Context context, String key, boolean defaultValue) {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);\n return sp.getBoolean(key, defaultValue);\n\n }", "public static Boolean getPreferencesBoolean(final Context context,\n\t\t\tfinal String key) {\n\t\tBoolean result;\n\t\ttry {\n\t\t\tfinal SharedPreferences sharedPreferences = PreferenceManager\n\t\t\t\t\t.getDefaultSharedPreferences(context);\n\n\t\t\tresult = sharedPreferences.getBoolean(key, false);\n\t\t} catch (Exception exception) {\n\t\t\tresult = false;\n\t\t}\n\t\treturn result;\n\t}", "@Override\r\n \tpublic void onCreate() {\r\n \t\tsuper.onCreate();\r\n \t\t// keep a copy of resources for later use in application\r\n \t\tres = getResources();\r\n \t\t// read preferences\r\n \t\treadPreferences();\r\n \t}", "public Boolean getBooleanData(String key) {\n return pref.getBoolean(key, Boolean.FALSE);\n }", "private void getAutonomousPrefs() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(hardwareMap.appContext);\n alliance = preferences.getString(\"AllianceColor\", \"error\");\n frontBack = preferences.getString(\"FrontBack\", \"error\");\n getPartnerGlyph = preferences.getBoolean(\"PickupAllianceGlyph\", false);\n getPitGlyph = preferences.getBoolean(\"PickupPitGlyph\", false);\n }", "boolean isEnabled(String key);", "public Literal getLiteralBoolean(Boolean literalData);", "private void loadSettings(){\n SharedPreferences sharedPreferences = getActivity().getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);\n notificationSwtich = sharedPreferences.getBoolean(SWITCH, false);\n reminderOnOff.setChecked(notificationSwtich);\n }", "public String configureOptionsMenu() {\n SharedPreferences settings = context.getSharedPreferences(PREFS, 0);\n boolean shuffle = settings.getBoolean(\"shuffle\", true);\n String buttonText = \"Hello\";\n \n if (shuffle) {\n buttonText = \" Off \";\n } else {\n buttonText = \" On \";\n }\n \n return buttonText;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v =inflater.inflate(R.layout.configuration_fragment, container, false);\n\n\n Switch interruptor=(Switch)v.findViewById(R.id.cinemaModeConfiguration);\n\n Switch interruptor2=(Switch)v.findViewById(R.id.lightModeConfiguration);\n\n SharedPreferences datos=((MainActivity) getActivity()).getDatos();\n boolean preferencias=datos.getBoolean(\"CinemaMode\",false);\n interruptor.setChecked(preferencias);\n\n\n\n boolean preferenciasLuz = datos.getBoolean(\"LightMode\",false);\n interruptor2.setChecked(preferenciasLuz);\n\n\n return v;\n }", "private static boolean loadSharedPreferencesFromFile(File src) {\n\t\tboolean res = false;\n\t\tObjectInputStream input = null;\n\t\ttry {\n\t\t\tinput = new ObjectInputStream(new FileInputStream(src));\n\t\t\tEditor prefEdit = PreferenceManager.getDefaultSharedPreferences(mContext).edit();\n\t\t\tprefEdit.clear();\n\t\t\t// first object is preferences\n\t\t\tMap<String, ?> entries = (Map<String, ?>) input.readObject();\n\t\t\t\t\n\t\t\tfor (Entry<String, ?> entry : entries.entrySet()) {\n\t\t\t\tObject v = entry.getValue();\n\t\t\t\tString key = entry.getKey();\n\t\n\t\t\t\tif (v instanceof Boolean)\n\t\t\t\t\tprefEdit.putBoolean(key, ((Boolean) v).booleanValue());\n\t\t\t\telse if (v instanceof Float)\n\t\t\t\t\tprefEdit.putFloat(key, ((Float) v).floatValue());\n\t\t\t\telse if (v instanceof Integer)\n\t\t\t\t\tprefEdit.putInt(key, ((Integer) v).intValue());\n\t\t\t\telse if (v instanceof Long)\n\t\t\t\t\tprefEdit.putLong(key, ((Long) v).longValue());\n\t\t\t\telse if (v instanceof String)\n\t\t\t\t\tprefEdit.putString(key, ((String) v));\n\t\t\t}\n\t\t\tprefEdit.commit();\n\t\n\t\t\t// second object is admin options\n\t\t\tEditor adminEdit = mContext.getSharedPreferences(AdminPreferencesActivity.ADMIN_PREFERENCES, 0).edit();\n\t\t\tadminEdit.clear();\n\t\t\t// first object is preferences\n\t\t\tMap<String, ?> adminEntries = (Map<String, ?>) input.readObject();\n\t\t\tfor (Entry<String, ?> entry : adminEntries.entrySet()) {\n\t\t\t\tObject v = entry.getValue();\n\t\t\t\tString key = entry.getKey();\n\t\n\t\t\t\tif (v instanceof Boolean)\n\t\t\t\t\tadminEdit.putBoolean(key, ((Boolean) v).booleanValue());\n\t\t\t\telse if (v instanceof Float)\n\t\t\t\t\tadminEdit.putFloat(key, ((Float) v).floatValue());\n\t\t\t\telse if (v instanceof Integer)\n\t\t\t\t\tadminEdit.putInt(key, ((Integer) v).intValue());\n\t\t\t\telse if (v instanceof Long)\n\t\t\t\t\tadminEdit.putLong(key, ((Long) v).longValue());\n\t\t\t\telse if (v instanceof String)\n\t\t\t\t\tadminEdit.putString(key, ((String) v));\n\t\t\t}\n\t\t\tadminEdit.commit();\n\t\n\t\t\tLog.i(t, \"Loaded hashmap settings into preferences\");\n\t\t\tres = true;\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (input != null) {\n\t\t\t\t\tinput.close();\n\t\t\t\t}\n\t\t\t} catch (IOException ex) {\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}", "@Test\n public void testSetDeselectPluginsOnExecute() {\n System.out.println(\"setDeselectPluginsOnExecute\");\n\n final String preferenceKey = \"deselectPluginsOnExecute\";\n\n boolean expValue = false;\n\n // Verify preference does not exist and also returns the correct default of false\n assertEquals(preferences.getBoolean(preferenceKey, false), expValue);\n DataAccessPreferenceUtilities.setDeselectPluginsOnExecute(expValue);\n assertEquals(preferences.getBoolean(preferenceKey, false), expValue);\n\n // Test setting true value\n expValue = true;\n DataAccessPreferenceUtilities.setDeselectPluginsOnExecute(expValue);\n assertEquals(preferences.getBoolean(preferenceKey, false), expValue);\n\n // Test toggling\n expValue = false;\n DataAccessPreferenceUtilities.setDeselectPluginsOnExecute(expValue);\n assertEquals(preferences.getBoolean(preferenceKey, false), expValue);\n }", "public void putBoolean(ResourceLocation name, boolean value) {\n data.putBoolean(name.toString(), value);\n }", "String getRepeatPref();", "private static boolean m57037f(Context context) {\n return AccountPreferenceHelper.getBoolean(context, R.string.c69, true);\n }", "public boolean getBoolean(String key)\r\n {\r\n debug(\"getBoolean(\" + key + \") - retrieving Key...\");\r\n String valueSz = null;\r\n try\r\n {\r\n valueSz = getResourceBundle().getString(key);\r\n }\r\n catch (MissingResourceException e)\r\n {\r\n System.out.println(\"java.util.MissingResourceException: \" + \"Couldn't find value for: \" + key);\r\n }\r\n if (valueSz == null)\r\n {\r\n valueSz = \"Could not find resource: \" + key + \" \";\r\n }\r\n boolean value = new Boolean(valueSz).booleanValue();\r\n debug(\"getBoolean(\" + key + \") - value ==> \" + value);\r\n debug(\"getBoolean(\" + key + \") - retrieving Key...Done\");\r\n return value;\r\n }", "public void showPreference(View v){\n String prefvalue = settings.getString(\"key1\",\"Not Found\");\n cHelpers.show_toast(this,\"key1 was \"+prefvalue);\n }", "public void addPreferencesFromResource(int preferencesResId, @Nonnull Context themeContext) {\n\t\ttry {\n\t\t\tMethod m = PreferenceManager.class.getDeclaredMethod(\"inflateFromResource\", Context.class, int.class, PreferenceScreen.class);\n\t\t\tm.setAccessible(true);\n\t\t\tfinal PreferenceScreen preferenceScreen = (PreferenceScreen) m.invoke(preferenceManager, themeContext, preferencesResId, getPreferenceScreen());\n\t\t\tif (preferenceScreen != null) {\n\t\t\t\tsetPreferenceScreen(preferenceScreen);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "@DrawableRes\n public static int getFlagDrawableResId(String country) {\n switch (country) {\n\n case \"ly\": //libya\n return R.drawable.flag_libya;\n\n default:\n return R.drawable.flag_libya;\n }\n }", "public boolean getBoolean(String name)\n/* */ {\n/* 845 */ return getBoolean(name, false);\n/* */ }", "boolean getShutterSoundPref();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n /* I'm using SharedPreferences as a simple way to store key value sets\n */\n SharedPreferences sharedPref = getActivity().getSharedPreferences(\"mesprefs\", Context.MODE_PRIVATE);\n final SharedPreferences.Editor editor = sharedPref.edit();\n\n\n // Set the dialog title\n builder.setTitle(\"My Preferences\")\n // Specify the list array, the items to be selected by default (null for none),\n // and the listener through which to receive callbacks when items are selected\n .setMultiChoiceItems(R.array.prefs_array, null,\n new DialogInterface.OnMultiChoiceClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which,\n boolean isChecked) {\n if (isChecked) {\n // If the user checked the item, add it to the selected items\n mSelectedItems.add(which);\n } else if (mSelectedItems.contains(which)) {\n // Else, if the item is already in the array, remove it\n mSelectedItems.remove(Integer.valueOf(which));\n }\n }\n })\n // Set the action buttons\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK, so save the mSelectedItems results somewhere\n // or return them to the component that opened the dialo\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n\n\n\n return builder.create();\n\n }", "public static void savePreferences(Context context, String strKey, Boolean blnValue) {\n try {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(strKey, blnValue);\n editor.commit();\n } catch (Exception e) {\n e.toString();\n }\n }", "private void checkPreferences() {\n final Editor editor = AppUtils.getInstance().pPrefs.edit();\n boolean changed = false;\n if (AppUtils.getInstance().pPrefs.getString(Api.PREF_MODE, \"\").length() == 0) {\n editor.putString(Api.PREF_MODE, Api.MODE_WHITELIST);\n changed = true;\n }\n if (changed)\n editor.commit();\n }", "boolean getFaceDetectionPref();", "private void configureTextViewAccordingToPreference() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mActivity);\n String area = preferences.getString(\"area\", \"sq ft\");\n String currency = preferences.getString(\"currency\", \"$\");\n\n if (area.equals(\"sq ft\"))\n mBinding.searchSurfaceTxt.setText(R.string.surface_sqft);\n else\n mBinding.searchSurfaceTxt.setText(R.string.surface_m2);\n\n if (currency.equals(\"$\"))\n mBinding.searchPriceTxt.setText(R.string.price_dollars);\n else\n mBinding.searchPriceTxt.setText(R.string.price_euros);\n }", "public static boolean getBoolForKey(String key)\n\t{\n\t\treturn PreferencesModel.instance().getUserBoolPref(key, false);\n\t}", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.settings_main);\n\n Preference orderBy = findPreference(getString(R.string.settings_order_by_key));\n bindPreferenceSummaryToValue(orderBy);\n\n Preference filterByCompany = findPreference(getString(R.string.settings_filter_by_company_key));\n bindPreferenceSummaryToValue(filterByCompany);\n\n Preference filterBySection = findPreference(getString(R.string.settings_filter_by_section_key));\n bindPreferenceSummaryToValue(filterBySection);\n }", "boolean hasPredefinedValues();", "private static boolean isInPrefs( String FileName , Preferences pref ){\n\n int nSavedFiles = SharedData.getintProperty( \"NSavedFiles\",\"\"+NSavedFiles);\n for( int i = 0 ; i< nSavedFiles ; i++ )\n\n if( pref.get( \"File\" + i , NO_SUCH_FILE ).equalsIgnoreCase( FileName ) )\n return true;\n\n return false;\n }", "public\n boolean getProperty_boolean(String key)\n {\n if (key == null)\n return false;\n\n String val = getProperty(key);\n\n if (val == null)\n return false;\n\n boolean ret_boolean = false;\n if (val.equalsIgnoreCase(\"ON\") ||\n val.equalsIgnoreCase(\"YES\") ||\n val.equalsIgnoreCase(\"TRUE\"))\n {\n ret_boolean = true;\n }\n else\n if (val.equalsIgnoreCase(\"OFF\") ||\n val.equalsIgnoreCase(\"NO\") ||\n val.equalsIgnoreCase(\"FALSE\"))\n {\n ret_boolean = false;\n }\n\n return ret_boolean;\n }", "public void setIsPrimary(boolean isPrimary);", "public String getFromPreference(String variable_name) {\n\t\tString preference_return;\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tpreference_return = preferences.getString(variable_name, \"\");\n\n\t\treturn preference_return;\n\t}", "private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }", "public String getPreference(DataPreferenceEnum key)\n {\n return (preferencesHashMap.get(key));\n }", "protected abstract IPreferenceStore getPreferenceStore();", "private void loadSettingsFromSharedPreferencesDeviceAndResourcees() {\n this.mTouchCapture = (TouchCapture)this.mActivity.getCommonSettings().get(CommonSettingKey.TOUCH_CAPTURE);\n this.mPrefs = this.mActivity.getSharedPreferences(\"com.sonyericsson.android.camera.shared_preferences\", 0);\n int n = this.mCameraDevice.getCameraId();\n switch (n) {\n case 0: {\n this.mVideoFocusMode = FocusMode.FACE_DETECTION;\n break;\n }\n case 1: {\n this.mVideoFocusMode = FocusMode.FIXED;\n }\n }\n this.mAutoReviewSetting = this.mActivity.isOneShotPhotoSecure() ? AutoReview.OFF : FastCapturingCameraUtils.loadParameter(this.mPrefs, 1, n, ParameterKey.AUTO_REVIEW, AutoReview.OFF);\n if (this.mVideoAutoReviewSetting == null) {\n this.mVideoAutoReviewSetting = FastCapturingCameraUtils.loadParameter(this.mPrefs, 2, n, ParameterKey.VIDEO_AUTO_REVIEW, VideoAutoReview.OFF);\n }\n if (n == 0) {\n this.mPhotoSelfTimerSetting = SelfTimer.OFF;\n return;\n }\n this.mPhotoSelfTimerSetting = FastCapturingCameraUtils.loadParameter(this.mPrefs, 1, n, ParameterKey.SELF_TIMER, SelfTimer.OFF);\n }", "public static Boolean getBoolean(String param, Boolean defval){\n\t\t\t\t\n\t\tBoolean returnValue = defval;\n\t\ttry{\n\t\t\treturnValue = pref().getBoolean(param, defval);\n\t\t\n\t\t}catch(Exception e){\n\t\t\treturnValue = defval;\n\t\t\t}\t\t\t\n\t\t\n\t\treturn returnValue;\n\t}", "public abstract SharedPreferences getStateSettings();", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Load the preferences from an XML resource\n addPreferencesFromResource(R.xml.preferences);\n\n wifi = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI);\n wifiData = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI_DATA);\n data = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_DATA);\n\n wifi.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n data.setChecked(false);\n wifi.setChecked(true);\n }\n return true;\n }\n });\n\n wifiData.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifi.setChecked(false);\n data.setChecked(false);\n wifiData.setChecked(true);\n }\n return true;\n }\n });\n\n data.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n wifi.setChecked(false);\n data.setChecked(true);\n }\n return true;\n }\n });\n\n Preference button = findPreference(KEY_PREF_UPDATE);\n button.setSummary(getString(R.string.current_version) + \" \" + ApplicationController.VERSION);\n\n button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n UpdateController.getInstance(getActivity()).checkVersion();\n return true;\n }\n });\n }", "public final void getBoolean(String name, boolean defaultValue, int resolveID, int rejectID) {\n getBooleanImpl(name, defaultValue, ResolverFactory.createBasicResolver(this, resolveID, rejectID));\n }", "String getFlashPref();", "public static boolean readBooleanNormal(Context context, String fileName, String key) {\n if (context == null) return false;\n SharedPreferences sharedPreferences = context.getSharedPreferences(fileName, Context.MODE_PRIVATE);\n return sharedPreferences.getBoolean(key, false);\n }", "public static final boolean getBooleanParam(Map<String,String> params, String key, boolean def) {\n\t\ttry {\n\t\t\tString val = params.get(key);\n\t\t\tif(val==null || (!\"true\".equals(val) && !\"false\".equals(val))) return def;\n\t\t\treturn Boolean.parseBoolean(val);\n\t\t} catch (Exception e) {\n\t\t\treturn def;\n\t\t}\n\t}", "private static boolean replaceable(ResourceProperties p)\n\t{\n\t\tboolean rv = true;\n\n\t\tif (p.getPropertyFormatted (ResourceProperties.PROP_IS_COLLECTION).equals (Boolean.TRUE.toString()))\n\t\t{\n\t\t\trv = false;\n\t\t}\n\t\telse if (p.getProperty (ResourceProperties.PROP_CONTENT_TYPE).equals (ResourceProperties.TYPE_URL))\n\t\t{\n\t\t\trv = false;\n\t\t}\n\t\tString displayName = p.getPropertyFormatted (ResourceProperties.PROP_DISPLAY_NAME);\n\t\tif (displayName.indexOf(SHORTCUT_STRING) != -1)\n\t\t{\n\t\t\trv = false;\n\t\t}\n\n\t\treturn rv;\n\n\t}", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.preferences, rootKey);\n\n Preference themePreference = findPreference(\"dark_theme\");\n if(themePreference != null) {\n themePreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n mainActivity.toggleTheme((boolean) newValue);\n return true;\n }\n });\n }\n }", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.pref_filters, rootKey);\n }", "private void setButtons(){\n cancelButton = findViewById(R.id.memory_theme_cancel);\n saveButton = findViewById(R.id.memory_theme_save);\n\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setSound.startButtonNoise(MemoryThemeActivity.this);\n finish();\n }\n });\n\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n final SharedPreferences.Editor editor = sp.edit();\n\n saveButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n setSound.startButtonNoise(MemoryThemeActivity.this);\n editor.putInt(PreferenceKeys.MEMORY_THEME, saveTheme);\n editor.putInt(PreferenceKeys.MEMORY_THEME_COLOR, color);\n editor.putInt(PreferenceKeys.MEMORY_THEME_BOARDER, boarder);\n editor.putInt(PreferenceKeys.MEMORY_THEME_STYE, style);\n editor.apply();\n Intent intent = new Intent(MemoryThemeActivity.this, MemoryActivity.class);\n startActivity(intent);\n }\n });\n }" ]
[ "0.5828776", "0.58287084", "0.5722213", "0.5699058", "0.5603334", "0.553961", "0.55338895", "0.550918", "0.5503169", "0.5439246", "0.5391722", "0.5354792", "0.5342816", "0.5341258", "0.5312798", "0.52936333", "0.527813", "0.5247384", "0.5243968", "0.5233342", "0.522189", "0.5200063", "0.5190359", "0.51883787", "0.51748985", "0.5172411", "0.51646435", "0.5148294", "0.51330614", "0.513273", "0.51306903", "0.5101129", "0.509426", "0.5086632", "0.50831497", "0.50743234", "0.5070712", "0.507067", "0.50578254", "0.50494903", "0.50468534", "0.50466657", "0.5027634", "0.50250846", "0.5016721", "0.5000819", "0.4998361", "0.4995591", "0.49833587", "0.49774456", "0.4974632", "0.49679586", "0.49605367", "0.49583444", "0.49422893", "0.4932275", "0.4928838", "0.4928802", "0.4928276", "0.4919428", "0.4902578", "0.48859662", "0.48802534", "0.4872133", "0.48626593", "0.4843044", "0.4840648", "0.4838421", "0.4838263", "0.4835904", "0.48353162", "0.48302668", "0.48299998", "0.48281395", "0.48277956", "0.48268563", "0.4813441", "0.48112866", "0.48035488", "0.4783595", "0.47772044", "0.47769406", "0.47750512", "0.47634962", "0.47600308", "0.47598302", "0.47575048", "0.4756752", "0.4749191", "0.47440097", "0.4743494", "0.4742365", "0.47393245", "0.47352102", "0.4722989", "0.47209707", "0.47185528", "0.47181588", "0.47173554", "0.4717125" ]
0.5315311
14
This method allows passing resource identifiers instead of string literals as names of preferences to retrieve
public static String getSharedPrefsString(Context pAppContext, int pResourceStringNameId) { // Convert the resource identity to a string String sharedPrefsStringName = getResourceString(pAppContext, pResourceStringNameId); return getSharedPrefsString(pAppContext, sharedPrefsStringName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract String getHintGivenSharedPreferencesKey();", "private String prefTag(String id) {\n\t\treturn preferenceTag + \"_\" + id;\n\t}", "Object getPreference(String prefKey, Object defaultValue);", "@JavascriptInterface\n public String getPreference(String name) {\n Log.d(TAG, \"getPreference: \" + name);\n return preferences.getString(name, \"\");\n }", "String getResourceID();", "public interface PrefsKey {\n\n String Ssid = \"Ssid\";\n String HotKeys = \"HotKeys\";\n String HistoryKeys = \"HistoryKeys\";\n String HistoryCooking = \"HistoryCooking\";\n\n String Guided = \"Guided\";\n}", "public void addPreferencesFromResource(int preferencesResId, @Nonnull Context themeContext) {\n\t\ttry {\n\t\t\tMethod m = PreferenceManager.class.getDeclaredMethod(\"inflateFromResource\", Context.class, int.class, PreferenceScreen.class);\n\t\t\tm.setAccessible(true);\n\t\t\tfinal PreferenceScreen preferenceScreen = (PreferenceScreen) m.invoke(preferenceManager, themeContext, preferencesResId, getPreferenceScreen());\n\t\t\tif (preferenceScreen != null) {\n\t\t\t\tsetPreferenceScreen(preferenceScreen);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "protected void onPref(String name, String value){}", "public IPreferenceStore getPreferenceStore(String name);", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "public interface PreferenceHelper {\r\n // Preference Name\r\n String PREFERENCE_NAME = \"Embedded_Downloads_preference\";\r\n // Preference mode\r\n int PRIVATE_MODE = 0;\r\n String INITIAL_START = \"initial_start\";\r\n String WALLET_ADDRESS = \"wallet_address\";\r\n String WALLET_NAME = \"wallet_name\";\r\n String TRANSACTION_WALLET_ADDRESS = \"transaction_wallet_address\";\r\n String WALLET_POSITION =\"wallet_position\";\r\n String CALL_TRANSACTION_STATUS = \"call_transaction_status\";\r\n String CALL_INCOMING = \"call_incoming\";\r\n String CALL_OUTGOING = \"call_outgoing\";\r\n}", "String getPreference(String user, String preferenceName) throws OntimizeJEERuntimeException;", "@Override\r\n \tpublic void onCreate() {\r\n \t\tsuper.onCreate();\r\n \t\t// keep a copy of resources for later use in application\r\n \t\tres = getResources();\r\n \t\t// read preferences\r\n \t\treadPreferences();\r\n \t}", "public interface IContextPreferenceProvider {\n\n\t/**\n\t * Returns a specific storage. \n\t * @return\n\t */\n\tpublic IPreferenceStore getPreferenceStore(String name);\n\t\n}", "public GallerySwitchPreference(Context context, AttributeSet attrs) {\n super(context, attrs);\n\n mResources = context.getResources();\n }", "public String getFromPreference(String variable_name) {\n\t\tString preference_return;\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tpreference_return = preferences.getString(variable_name, \"\");\n\n\t\treturn preference_return;\n\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }", "public static int getResId(@NonNull String name) {\n Integer resId = map.get(name);\n if(resId != null) return resId;\n else return R.drawable.ic_help_circle;\n }", "public static int getResourceByName(Context context, String resource_name) {\n\n String final_name = resource_name.toLowerCase().equals(\"bangalore\") ? \"bengaluru\" : resource_name.replace(\" \", \"_\").toLowerCase();\n\n return context.getResources().getIdentifier(final_name, \"drawable\", context.getPackageName());\n }", "private void getPreferences(RoutingContext routingContext) {\n String id = routingContext.request().getParam(\"deviceid\");\n \n if (id == null) {\n routingContext.response().setStatusCode(400).end();\n return;\n }\n\n Preferences preferences = dataAccessor.getPrimaryIndex().get(id);\n \n if (preferences == null) {\n routingContext.response().setStatusCode(404).end();\n return;\n }\n \n logger.debug(preferences.toString());\n \n response(routingContext, 200, preferences);\n\n }", "public static int getThemeResourceId(String prefThemeColor, String prefThemeVariant) {\n switch (prefThemeColor) {\n case THEME_COLOR_YELLOW:\n switch (prefThemeVariant) {\n case THEME_VARIANT_LIGHT:\n return R.style.Theme_Kore_Yellow_Light;\n case THEME_VARIANT_DARK:\n return R.style.Theme_Kore_Yellow_Dark;\n default:\n return R.style.Theme_Kore_Yellow_Auto;\n }\n case THEME_COLOR_PURPLE:\n switch (prefThemeVariant) {\n case THEME_VARIANT_LIGHT:\n return R.style.Theme_Kore_Purple_Light;\n case THEME_VARIANT_DARK:\n return R.style.Theme_Kore_Purple_Dark;\n default:\n return R.style.Theme_Kore_Purple_Auto;\n }\n case THEME_COLOR_GREEN:\n switch (prefThemeVariant) {\n case THEME_VARIANT_LIGHT:\n return R.style.Theme_Kore_Green_Light;\n case THEME_VARIANT_DARK:\n return R.style.Theme_Kore_Green_Dark;\n default:\n return R.style.Theme_Kore_Green_Auto;\n }\n default: // \"kore\" and \"system_colors\" share this\n switch (prefThemeVariant) {\n case THEME_VARIANT_LIGHT:\n return R.style.Theme_Kore_Default_Light;\n case THEME_VARIANT_DARK:\n return R.style.Theme_Kore_Default_Dark;\n default:\n return R.style.Theme_Kore_Default_Auto;\n }\n }\n }", "public interface GeneralPreferenceHelper {\n String PREF_USER_NAME = \"pref_name_user\";\n String PREF_ENABLE_SOCIAL = \"pref_social_recomendation\";\n}", "String getRepeatPref();", "@Override\n public Dialog onCreateDialog(Bundle savedInstanceState) {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n\n /* I'm using SharedPreferences as a simple way to store key value sets\n */\n SharedPreferences sharedPref = getActivity().getSharedPreferences(\"mesprefs\", Context.MODE_PRIVATE);\n final SharedPreferences.Editor editor = sharedPref.edit();\n\n\n // Set the dialog title\n builder.setTitle(\"My Preferences\")\n // Specify the list array, the items to be selected by default (null for none),\n // and the listener through which to receive callbacks when items are selected\n .setMultiChoiceItems(R.array.prefs_array, null,\n new DialogInterface.OnMultiChoiceClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which,\n boolean isChecked) {\n if (isChecked) {\n // If the user checked the item, add it to the selected items\n mSelectedItems.add(which);\n } else if (mSelectedItems.contains(which)) {\n // Else, if the item is already in the array, remove it\n mSelectedItems.remove(Integer.valueOf(which));\n }\n }\n })\n // Set the action buttons\n .setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK, so save the mSelectedItems results somewhere\n // or return them to the component that opened the dialo\n Iterator ite = mSelectedItems.listIterator();\n while(ite.hasNext()) {\n\n int pref_int = ((Integer )(ite.next())).intValue();\n switch (pref_int){\n case 0 :\n editor.putString(getString(R.string.pref_1), getString(R.string.pref_1));\n Log.i(\"info\", \"Preference 1\");\n break;\n case 1 :\n editor.putString(getString(R.string.pref_2), getString(R.string.pref_2));\n Log.i(\"info\", \"Preference 2\");\n break;\n case 2 :\n editor.putString(getString(R.string.pref_3), getString(R.string.pref_3));\n Log.i(\"info\", \"Preference 3\");\n break;\n\n }\n }\n editor.commit();\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n\n\n\n return builder.create();\n\n }", "public XmlParserPref(Context cont, String name) {\n\t\tcontext = cont;\n\t\tprefEdit = PreferenceManager.getDefaultSharedPreferences(context).edit();\n\t\tprofileName = name;\n\t}", "public String getStringResourceById(int resourceId) {\n \treturn mContext.getResources().getString(resourceId);\n }", "public interface IStringPrefIDable extends IStringable {\r\n\r\n \r\n public String getSelectorKeyPrefID();\r\n}", "@Override // com.android.settings.core.InstrumentedPreferenceFragment, com.android.settings.dashboard.DashboardFragment\n public int getPreferenceScreenResId() {\n return C0019R$xml.configure_notification_settings;\n }", "void setResourceID(String resourceID);", "private void showPreferenceSettings() {\n \tfor(PrefKeysE k: PrefKeysE.values()) {\n \t\tString key = k.getKey();\n \t\tboolean isFound = Tt.isPreferencePresent(key);\n \t\tint prtFlags = 0; //don't print from getPreference()\n// \t\tboolean valB;\n// \t\tint valI;\n// \t\tdouble valD;\n \t\tString valFoundStr = \"\";\n \t\tString prefix = String.format(\"%-40s: %-7s: found? %s, default \", key, k.getType().name(), (isFound ? \"Y\" : \"N\"));\n \t\tswitch(k.getType()) {\n \t\tcase BOOLEAN:\n \t\t\tboolean dfltB = k.getDefaultBoolean();\n \t\t\tvalFoundStr += dfltB;\n \t\t\tif(isFound) {\n \t\t\t\tboolean val = Tt.getPreference(k, dfltB, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase INT:\n \t\t\tint dfltI = k.getDefaultInt();\n \t\t\tvalFoundStr += dfltI;\n \t\t\tif(isFound) {\n \t\t\t\tint val = Tt.getPreference(k, dfltI, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current \" + val;\n \t\t\t}\n \t\t\tbreak;\n \t\tcase DOUBLE:\n \t\t\tdouble dfltD = k.getDefaultDouble();\n \t\t\tvalFoundStr = String.format(\"% 1.4f\", dfltD);\n \t\t\tif(isFound) {\n \t\t\t\tdouble val = Tt.getPreference(k, dfltD, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += String.format(\", current % 1.4f\", val);\n \t\t\t}\n \t\t\tbreak;\n \t\tcase STRING:\n \t\t\tString dfltS = k.getDefaultString();\n\t\t\t\tvalFoundStr += \"'\" + dfltS + \"'\";\n \t\t\tif(isFound) {\n \t\t\t\tString val = Tt.getPreference(k, dfltS, prtFlags, PrefCreateE.DO_NOT_CREATE);\n \t\t\t\tvalFoundStr += \", current '\" + val + \"'\";\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n\t\t\tP.println(prefix + valFoundStr);\n\n// \t\tif(k.getType().equals(PrefTypeE.BOOLEAN)) \n \t}\n }", "public static String GetPreferByString(Context context, String key) {\n\t\tSharedPreferences mPrefer = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(context);\n\t\treturn mPrefer.getString(key, \"\");\n\t}", "@Override // com.android.settings.core.InstrumentedPreferenceFragment, com.android.settings.dashboard.DashboardFragment\n public int getPreferenceScreenResId() {\n return C0019R$xml.feature_flags_settings;\n }", "public int getIdAssignedByR(Context pContext, String pIdString)\n\t{\n\t Resources resources = pContext.getResources();\n\t String packageName = pContext.getPackageName();\n\n\t // Determine the result and return it\n\t int result = resources.getIdentifier(pIdString, \"id\", packageName);\n\t return result;\n\t}", "public String getString(int id) {\n return context.getResources().getString(id);\n }", "public String getPreference(DataPreferenceEnum key)\n {\n return (preferencesHashMap.get(key));\n }", "protected abstract IPreferenceStore getPreferenceStore();", "int getResourceId();", "String getSettingByKey(String key);", "public String getPrefsAutoLoadDescription();", "@Override\n \tpublic void onClick(DialogInterface dialog, int which) {\n myPref.setSummary(items[which]);\n switch(which)\n {\n case 0:\n editor.putInt(\"Theme\",R.style.AppThemeRed);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 1:\n editor.putInt(\"Theme\",R.style.AppThemeBlue);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 2:\n editor.putInt(\"Theme\",R.style.AppThemePurple);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 3:\n editor.putInt(\"Theme\",R.style.AppThemeGreen);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 4:\n editor.putInt(\"Theme\",R.style.AppThemeOrange);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 5:\n editor.putInt(\"Theme\",R.style.AppThemeGrey);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n }\n\n \t}", "public static interface Prefs{\n /**\n * The key-value pair stores the name of the file\n */\n public static final String FILE_NAME = \"game_preferences\";\n\n /**\n * The key that stores the field name: the best score\n */\n public static final String KEY_BEST_SCORE = \"best_score\";\n }", "private void updateButtonWithPreferences() {\n\t\tRadioButton c1 = (RadioButton)findViewById(R.id.ch_01Setting);\n\t\tRadioButton c2 = (RadioButton)findViewById(R.id.ch_02Setting);\n\t\tRadioButton c3 = (RadioButton)findViewById(R.id.ch_03Setting);\n\t\tRadioButton c4 = (RadioButton)findViewById(R.id.ch_04Setting);\n\t\tRadioButton c5 = (RadioButton)findViewById(R.id.ch_05Setting);\n\t\tRadioButton c6 = (RadioButton)findViewById(R.id.ch_06Setting);\n\t\tRadioButton c061 = (RadioButton)findViewById(R.id.ch_061Setting);\n\t\tRadioButton c7 = (RadioButton)findViewById(R.id.ch_07Setting);\n\t\tRadioButton c8 = (RadioButton)findViewById(R.id.ch_08Setting);\n\t\tRadioButton c9 = (RadioButton)findViewById(R.id.ch_09Setting);\n\t\tRadioButton c10 = (RadioButton)findViewById(R.id.ch_10Setting);\n\t\tRadioButton c11 = (RadioButton)findViewById(R.id.ch_11Setting);\n\t\tRadioButton c111 = (RadioButton)findViewById(R.id.ch_111Setting);\n\t\tRadioButton c12 = (RadioButton)findViewById(R.id.ch_12Setting);\n\t\tRadioButton c13 = (RadioButton)findViewById(R.id.ch_13Setting);\n\t\tRadioButton c131 = (RadioButton)findViewById(R.id.ch_131Setting);\n\t\tRadioButton c14 = (RadioButton)findViewById(R.id.ch_14Setting);\n\t\tRadioButton c15 = (RadioButton)findViewById(R.id.ch_15Setting);\n\t\tRadioButton c16 = (RadioButton)findViewById(R.id.ch_16Setting);\n\t\tRadioButton c17 = (RadioButton)findViewById(R.id.ch_17Setting);\n\t\tRadioButton c18 = (RadioButton)findViewById(R.id.ch_18Setting);\n\t\tRadioButton c19 = (RadioButton)findViewById(R.id.ch_19Setting);\n\t\tRadioButton c20 = (RadioButton)findViewById(R.id.ch_20Setting);\n\t\tRadioButton c21 = (RadioButton)findViewById(R.id.ch_21Setting);\n\t\tRadioButton c22 = (RadioButton)findViewById(R.id.ch_22Setting);\n\t\tRadioButton c23 = (RadioButton)findViewById(R.id.ch_23Setting);\n\t\tRadioButton c24 = (RadioButton)findViewById(R.id.ch_24Setting);\n\t\tRadioButton c25 = (RadioButton)findViewById(R.id.ch_25Setting);\n\t\tRadioButton c26 = (RadioButton)findViewById(R.id.ch_26Setting);\n\t\tRadioButton c27 = (RadioButton)findViewById(R.id.ch_27Setting);\n\t\tRadioButton c28 = (RadioButton)findViewById(R.id.ch_28Setting);\n\t\tRadioButton c29 = (RadioButton)findViewById(R.id.ch_29Setting);\n\t\tRadioButton c291 = (RadioButton)findViewById(R.id.ch_291Setting);\n\t\tRadioButton c30 = (RadioButton)findViewById(R.id.ch_30Setting);\n\t\tRadioButton c31 = (RadioButton)findViewById(R.id.ch_31Setting);\n\t\tRadioButton c32 = (RadioButton)findViewById(R.id.ch_32Setting);\n\t\tRadioButton c321 = (RadioButton)findViewById(R.id.ch_321Setting);\n\t\tRadioButton c322 = (RadioButton)findViewById(R.id.ch_322Setting);\n\t\t\n\t\tSharedPreferences settings = getSharedPreferences(Constants.SETTINGS, 0);\n\t\tint diff = settings.getInt(Constants.CHAPTER, Constants.CH_01);\n\t\t\n\t\tswitch (diff)\n\t\t{\n\t\tcase Constants.CH_01 : \n\t\t\tc1.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_02 : \n\t\t\tc2.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_03 :\n\t\t\tc3.toggle();\n\t\t\tbreak;\t\n\t\t\t\n\t\tcase Constants.CH_04 : \n\t\t\tc4.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_05 : \n\t\t\tc5.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_06 :\n\t\t\tc6.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_061 :\n\t\t\tc061.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_07 : \n\t\t\tc7.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_08 : \n\t\t\tc8.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_09 :\n\t\t\tc9.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_10 : \n\t\t\tc10.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_11 : \n\t\t\tc11.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_111 : \n\t\t\tc111.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_12 :\n\t\t\tc12.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_13 : \n\t\t\tc13.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_131 : \n\t\t\tc131.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_14 : \n\t\t\tc14.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_15 :\n\t\t\tc15.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_16 : \n\t\t\tc16.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_17 : \n\t\t\tc17.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_18 :\n\t\t\tc18.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_19 : \n\t\t\tc19.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_20 : \n\t\t\tc20.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_21 :\n\t\t\tc21.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_22 : \n\t\t\tc22.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_23 : \n\t\t\tc23.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_24 :\n\t\t\tc24.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_25 : \n\t\t\tc25.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_26 : \n\t\t\tc26.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_27 :\n\t\t\tc27.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_28 : \n\t\t\tc28.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_29 : \n\t\t\tc29.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_291 : \n\t\t\tc291.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_30 :\n\t\t\tc30.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_31 : \n\t\t\tc31.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_32 : \n\t\t\tc32.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_321 : \n\t\t\tc321.toggle();\n\t\t\tbreak;\n\t\t\t\n\t\tcase Constants.CH_322 : \n\t\t\tc322.toggle();\n\t\t\tbreak;\n\t\t}\n\t}", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "public void saveString(int prefKey, String value) {\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(getResources().getString(prefKey), value);\n editor.apply();\n }", "public static int getResourceByString( Context context, String resourceType, String name ) {\n int resource = 0;\n\n try {\n resource = context.getResources()\n .getIdentifier( name, resourceType, context.getPackageName() );\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n\n return resource;\n }", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.preferences, rootKey);\n }", "public String getResourceId();", "private void setStrings(){\n ip = context.getResources().getString(R.string.ip);\n port = context.getResources().getString(R.string.port);\n dbName = context.getResources().getString(R.string.db_name);\n user = context.getResources().getString(R.string.masterUser);\n pass = context.getResources().getString(R.string.masterPass);\n }", "public void onLaunchPreferenceActivitySelected(Context context);", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.settings_main);\n\n Preference orderBy = findPreference(getString(R.string.settings_order_by_key));\n bindPreferenceSummaryToValue(orderBy);\n\n Preference filterByCompany = findPreference(getString(R.string.settings_filter_by_company_key));\n bindPreferenceSummaryToValue(filterByCompany);\n\n Preference filterBySection = findPreference(getString(R.string.settings_filter_by_section_key));\n bindPreferenceSummaryToValue(filterBySection);\n }", "void setResourceId(int value);", "public String getPrefrence(String key) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n String data = prefrence.getString(key, \"\");\n return data;\n }", "public String getPrefrence(String key) {\n SharedPreferences prefrence = context.getSharedPreferences(\n context.getString(R.string.app_name), 0);\n String data = prefrence.getString(key, \"\");\n return data;\n }", "public abstract int getTitleResId();", "public static ReadShellPreference valueOf(final String name) {\n\n Assertions.voidNotNull(\"Name\", name);\n\n String nameToCheck = name.toLowerCase();\n\n if (nameToCheck.equals(PRIMARY.getName().toLowerCase())) {\n return PRIMARY;\n }\n if (nameToCheck.equals(SECONDARY.getName().toLowerCase())) {\n return SECONDARY;\n }\n if (nameToCheck.equals(SECONDARY_PREFERRED.getName().toLowerCase())) {\n return SECONDARY_PREFERRED;\n }\n if (nameToCheck.equals(PRIMARY_PREFERRED.getName().toLowerCase())) {\n return PRIMARY_PREFERRED;\n }\n if (nameToCheck.equals(NEAREST.getName().toLowerCase())) {\n return NEAREST;\n }\n\n throw new IllegalArgumentException(\"No match for read preference of \" + name);\n }", "public void showPreference(View v){\n String prefvalue = settings.getString(\"key1\",\"Not Found\");\n cHelpers.show_toast(this,\"key1 was \"+prefvalue);\n }", "@Override\n public void addPreferenceAndUpdateWidget(Context context, Pastry pastry) {\n IngredientSharedPreference.setIngredientListPreference(context, pastry.getIngredientsList());\n IngredientSharedPreference.setRecipeNamePreference(pastry.getName(), context);\n updateWidget(context);\n\n }", "@VisibleForTesting\n int getResourceId() {\n int resId = getResources().getIdentifier(\n REGULATORY_INFO_RESOURCE, \"drawable\", getPackageName());\n\n // When hardware sku property exists, use regulatory_info_<sku> resource if valid.\n final String sku = getSku();\n if (!TextUtils.isEmpty(sku)) {\n String regulatory_info_res = REGULATORY_INFO_RESOURCE + \"_\" + sku.toLowerCase();\n int id = getResources().getIdentifier(\n regulatory_info_res, \"drawable\", getPackageName());\n if (id != 0) {\n resId = id;\n }\n }\n\n // When hardware coo property exists, use regulatory_info_<sku>_<coo> resource if valid.\n final String coo = getCoo();\n if (!TextUtils.isEmpty(coo) && !TextUtils.isEmpty(sku)) {\n final String regulatory_info_coo_res =\n REGULATORY_INFO_RESOURCE + \"_\" + sku.toLowerCase() + \"_\" + coo.toLowerCase();\n final int id = getResources().getIdentifier(\n regulatory_info_coo_res, \"drawable\", getPackageName());\n if (id != 0) {\n resId = id;\n }\n }\n return resId;\n }", "public String getPreference(String key) {\n return prefs.get(key, null);\n }", "@Override // com.android.settings.core.InstrumentedPreferenceFragment, com.android.settings.dashboard.DashboardFragment\n public int getPreferenceScreenResId() {\n return C0019R$xml.wifi_configure_settings;\n }", "public static String getResourceString(String key) {\n \t\tResourceBundle bundle = XSDEditorPlugin.getDefault().getResourceBundle();\n \t\ttry {\n \t\t\treturn (bundle != null) ? bundle.getString(key) : key;\n \t\t} catch (MissingResourceException e) {\n \t\t\treturn key;\n \t\t}\n \t}", "TrackerPrefs loadTrackerPrefs(final Integer id);", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.pref_filters, rootKey);\n }", "protected abstract int getIdResourcesOfToolbar();", "String getFlashPref();", "public interface IPreferenceInteractor {\n\n /**\n * Get the current selected theme\n *\n * @return The theme selected by the user\n */\n String getTheme();\n\n /**\n * Get the current selected language code\n *\n * @return The language code of the current selected language\n */\n String getLanguage();\n\n /**\n * Get the current selected volume\n *\n * @return The volume (0-100) selected by the user\n */\n int getVolume();\n\n /**\n * Add/Update a preference\n *\n * @param pref The preference to add/update\n */\n void updatePreference(IPreference pref);\n\n /**\n * Gets a preference with the given key\n *\n * @param prefKey The key of the preference\n * @param defaultValue The default value in case value does not exist\n * @return The value of the preference\n */\n Object getPreference(String prefKey, Object defaultValue);\n\n /**\n * Add/Update a list of preferences\n *\n * @param prefs The preferences to add/update\n */\n void updatePreferences(List<IPreference> prefs);\n}", "String resource(@SuppressWarnings(\"rawtypes\") Map params);", "@Override\n public void onCreate(Bundle savedInstanceState) {\n\t\t\n super.onCreate(savedInstanceState);\n setContentView(R.layout.dlg_preferences);\n m_myPrefs = Preferences.getInstance(this);\n \n // setup handler for Ok button\n Button btnOk = (Button) findViewById(R.id.ButtonOK);\n btnOk.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t savePreferences();\n\t setResult(RESULT_OK);\n\t finish();\n }\n });\n // setup handler for the Cancel button\n Button btnCancel = (Button) findViewById(R.id.ButtonCancel);\n btnCancel.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t setResult(RESULT_CANCELED);\n \t finish();\n }\n });\n\n // setup handler for sound picker buttons\n Button btnPickRing = (Button) findViewById(R.id.ButtonPickRing);\n btnPickRing.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_RING);\n }\n });\n\n Button btnPickSMS = (Button) findViewById(R.id.ButtonPickSMS);\n btnPickSMS.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_SMS);\n }\n });\n\n Button btnPickIM = (Button) findViewById(R.id.ButtonPickIM);\n btnPickIM.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_IM);\n }\n });\n \n Button btnPickMail = (Button) findViewById(R.id.ButtonPickMail);\n btnPickMail.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n\t Intent intentBrowseFiles = new Intent(RingtoneManager.ACTION_RINGTONE_PICKER);\n\t PreferencesAct.this.startActivityForResult(intentBrowseFiles, PICK_FILE_MAIL);\n }\n });\n\n \n // setup handler for test buttons\n Button btnTestRing = (Button) findViewById(R.id.ButtonTestRing);\n btnTestRing.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerRing);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateRing);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundRing);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriRing);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n Button btnTestCharge = (Button) findViewById(R.id.ButtonTestCharge);\n btnTestCharge.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerCharge);\n \t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION);\n }\n });\n Button btnTestSMS = (Button) findViewById(R.id.ButtonTestSMS);\n btnTestSMS.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerSMS);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateSMS);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundSMS);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriSMS);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n \n Button btnTestMail = (Button) findViewById(R.id.ButtonTestMail);\n btnTestMail.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerMail);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateMail);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundMail);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriMail);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n \n Button btnTestIM = (Button) findViewById(R.id.ButtonTestIM);\n btnTestIM.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerIM);\n \t CheckBox myCheckVibrate\t= (CheckBox) findViewById(R.id.CheckBoxVibrateIM);\n \t CheckBox myCheckSound\t= (CheckBox) findViewById(R.id.CheckBoxSoundIM);\n \t if (myCheckSound.isChecked())\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), m_strUriIM);\n \t }\n \t else\n \t {\n \t\t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION, myCheckVibrate.isChecked(), \"\");\n \t }\n }\n });\n \n Button btnTestSleep = (Button) findViewById(R.id.ButtonTestSleep);\n btnTestSleep.setOnClickListener(new View.OnClickListener() {\n public void onClick(View arg0) {\n \t Spinner mySpinner \t= (Spinner) findViewById(R.id.SpinnerSleep);\n \t EffectsFassade.getInstance().playEffect(PreferencesAct.this, mySpinner.getSelectedItemPosition(), PLAY_DURATION);\n }\n });\n\n Spinner mySpinRing = (Spinner) findViewById(R.id.SpinnerRing);\n ArrayAdapter myAdapterRing = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterRing.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinRing.setAdapter(myAdapterRing);\n\n Spinner mySpinCharge = (Spinner) findViewById(R.id.SpinnerCharge);\n ArrayAdapter myAdapterCharge = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterCharge.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinCharge.setAdapter(myAdapterCharge);\n\n Spinner mySpinSMS = (Spinner) findViewById(R.id.SpinnerSMS);\n ArrayAdapter myAdapterSMS = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterSMS.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSMS.setAdapter(myAdapterSMS);\n\n Spinner mySpinMail = (Spinner) findViewById(R.id.SpinnerMail);\n ArrayAdapter myAdapterMail = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterMail.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinMail.setAdapter(myAdapterMail);\n\n Spinner mySpinIM = (Spinner) findViewById(R.id.SpinnerIM);\n ArrayAdapter myAdapterIM = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterIM.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinIM.setAdapter(myAdapterIM);\n\n Spinner mySpinSleep = (Spinner) findViewById(R.id.SpinnerSleep);\n ArrayAdapter myAdapterSleep = ArrayAdapter.createFromResource(\n this, m_myPrefs.getEffectEnumId(), android.R.layout.simple_spinner_item);\n myAdapterSleep.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSleep.setAdapter(myAdapterSleep);\n \n Spinner mySpinVibrateOffFrom = (Spinner) findViewById(R.id.SpinnerVibrationOffFrom);\n ArrayAdapter myAdapterVibrateOffFrom = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterVibrateOffFrom.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinVibrateOffFrom.setAdapter(myAdapterVibrateOffFrom);\n\n Spinner mySpinVibrateOffTo = (Spinner) findViewById(R.id.SpinnerVibrationOffTo);\n ArrayAdapter myAdapterVibrateOffTo = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterVibrateOffTo.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinVibrateOffTo.setAdapter(myAdapterVibrateOffTo);\n\n Spinner mySpinSoundOffFrom = (Spinner) findViewById(R.id.SpinnerSoundOffFrom);\n ArrayAdapter myAdapterSoundOffFrom = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterSoundOffFrom.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSoundOffFrom.setAdapter(myAdapterSoundOffFrom);\n\n Spinner mySpinSoundOffTo = (Spinner) findViewById(R.id.SpinnerSoundOffTo);\n ArrayAdapter myAdapterSoundOffTo = ArrayAdapter.createFromResource(\n this, R.array.times, android.R.layout.simple_spinner_item);\n myAdapterSoundOffTo.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n mySpinSoundOffTo.setAdapter(myAdapterSoundOffTo);\n \n readPreferences();\n }", "private void configureTextViewAccordingToPreference() {\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(mActivity);\n String area = preferences.getString(\"area\", \"sq ft\");\n String currency = preferences.getString(\"currency\", \"$\");\n\n if (area.equals(\"sq ft\"))\n mBinding.searchSurfaceTxt.setText(R.string.surface_sqft);\n else\n mBinding.searchSurfaceTxt.setText(R.string.surface_m2);\n\n if (currency.equals(\"$\"))\n mBinding.searchPriceTxt.setText(R.string.price_dollars);\n else\n mBinding.searchPriceTxt.setText(R.string.price_euros);\n }", "private void setupSimplePreferencesScreen() {\n\n addPreferencesFromResource(R.xml.pref_weight);\n\n final Activity activity = getActivity();\n\n CustomPreferenceCategory fakeHeader = new CustomPreferenceCategory(activity);\n fakeHeader = new CustomPreferenceCategory(activity);\n fakeHeader.setTitle(R.string.pref_header_about);\n getPreferenceScreen().addPreference(fakeHeader);\n addPreferencesFromResource(R.xml.pref_about);\n\n // Bind the summaries of EditText/List/Dialog/Ringtone preferences to\n // their values. When their values change, their summaries are updated\n // to reflect the new value, per the Android Design guidelines.\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_units_key)));\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_plate_style_key)));\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_bar_weight_key)));\n bindPreferenceSummaryToValue(findPreference(getResources().getString(R.string.pref_formula_key)));\n\n Preference aboutButton = (Preference)findPreference(getString(R.string.pref_about_button));\n aboutButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n AboutDialog aboutDialog = new AboutDialog();\n aboutDialog.show(getFragmentManager(), \"AboutDialog\");\n return true;\n }\n });\n\n Preference rateButton = (Preference)findPreference(getString(R.string.pref_rate_button));\n rateButton .setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n Uri uri = Uri.parse(\"market://details?id=\" + activity.getPackageName());\n Intent goToMarket = new Intent(Intent.ACTION_VIEW, uri);\n try {\n startActivity(goToMarket);\n } catch (ActivityNotFoundException e) {\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://play.google.com/store/apps/details?id=\" + activity.getPackageName())));\n }\n return true;\n }\n });\n\n final RepCheckPreferenceFragment repCheckPreferenceFragment = this;\n\n Preference resetButton = (Preference)findPreference(getString(R.string.pref_reset_button));\n resetButton.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n DialogFragment saveAsNewDialog = ConfirmResetDialog.newInstance(new ResetResponseHandler(repCheckPreferenceFragment));\n saveAsNewDialog.show(activity.getFragmentManager(), \"RenameSetDialog\");\n return true;\n }\n });\n }", "public MyPreference(Context context, AttributeSet attrs) {\r\n super(context, attrs);\r\n this.context = context;\r\n// setWidgetLayoutResource(R.layout.preference_widget_mypreference);\r\n }", "private String getResourceName(String resourceId)\n/* */ {\n/* 1165 */ HashMap<String, String> managedObject = (HashMap)this.managedObjectVsResourceIdMap.get(resourceId);\n/* 1166 */ StringBuffer toReturn = new StringBuffer();\n/* 1167 */ String type = (String)managedObject.get(\"TYPE\");\n/* 1168 */ if ((!\"HAI\".equals(type)) && (!this.monitors.contains(resourceId)))\n/* */ {\n/* 1170 */ toReturn.append(\"\\\"\").append(getParentResourceDisplayname(resourceId)).append(\"\\\"\").append(\",\");\n/* */ }\n/* 1172 */ else if ((!\"HAI\".equals(type)) && (this.monitors.contains(resourceId)))\n/* */ {\n/* 1174 */ toReturn.append(\",\");\n/* */ }\n/* 1176 */ toReturn.append(\"\\\"\").append((String)managedObject.get(\"DISPLAYNAME\")).append(\"\\\"\");\n/* 1177 */ return toReturn.toString();\n/* */ }", "String getString(String bundleKey);", "protected abstract ID getResourceId(T resource);", "public static SharedPreferences getSharedPreferences(@NonNull Context ctx, String preferName) {\n if (processFlag.get() == 0) {\n Bundle bundle = ctx.getContentResolver().call(PreferenceUtil.URI, PreferenceUtil.METHOD_QUERY_PID, \"\", null);\n int pid = 0;\n if (bundle != null) {\n pid = bundle.getInt(PreferenceUtil.KEY_VALUES);\n }\n //Can not get the pid, something wrong!\n if (pid == 0) {\n return getFromLocalProcess(ctx, preferName);\n }\n processFlag.set(Process.myPid() == pid ? 1 : -1);\n return getSharedPreferences(ctx, preferName);\n } else if (processFlag.get() > 0) {\n return getFromLocalProcess(ctx, preferName);\n } else {\n return getFromRemoteProcess(ctx, preferName);\n }\n }", "private String getUserStringPref(String key, String defaultVal)\n\t{\n\t\treturn mVDH.getUserStringPreference(key, defaultVal, PreferencesModel.class);\n\t}", "@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.action_settings) {\r\n if(item.getTitle().equals(\"Add to Favorites\")) {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n\r\n String value1 = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor1.putString(id_fav, value1);\r\n editor1.commit();\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n String value = url_fav + \" \" + name_fav + \" \" + type_fav;\r\n\r\n\r\n editor.putString(id_fav, value);\r\n editor.commit();\r\n }\r\n\r\n Toast.makeText(getApplicationContext(), \"Added to Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n else\r\n {\r\n SharedPreferences commonpreferences = getSharedPreferences(\"Common\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor1 = commonpreferences.edit();\r\n editor1.remove(id_fav);\r\n editor1.commit();\r\n\r\n if (type_fav.equals(\"Users\")) {\r\n SharedPreferences userpreferences = getSharedPreferences(\"Users\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = userpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Pages\")) {\r\n SharedPreferences pagepreferences = getSharedPreferences(\"Pages\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = pagepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Events\")) {\r\n SharedPreferences eventpreferences = getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = eventpreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Places\")) {\r\n SharedPreferences placepreferences = getSharedPreferences(\"Places\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = placepreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n } else if (type_fav.equals(\"Groups\")) {\r\n SharedPreferences grouppreferences = getSharedPreferences(\"Groups\", Context.MODE_PRIVATE);\r\n SharedPreferences.Editor editor = grouppreferences.edit();\r\n\r\n editor.remove(id_fav);\r\n editor.commit();\r\n }\r\n\r\n\r\n Toast.makeText(getApplicationContext(), \"Removed from Favorites\", Toast.LENGTH_LONG).show();\r\n }\r\n //SharedPreferences.Editor editor = sharedpreferences.edit();\r\n //editor.putString(\"Name\", \"Rachit\");\r\n //SharedPreferences events=getSharedPreferences(\"Events\", Context.MODE_PRIVATE);\r\n //String l=\"-1\";\r\n //String value=events.getString(id_fav,l);\r\n //editor.commit();\r\n return true;\r\n }\r\n else if (id == R.id.share) {\r\n if (ShareDialog.canShow(ShareLinkContent.class)) {\r\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\r\n .setContentUrl(Uri.parse(\"http://developers.facebook.com/android\"))\r\n .build();\r\n shareDialog.show(linkContent);\r\n }\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tloadPref();\n\t}", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "public static void setUpGenres(Context context){\n SharedPreferences mSetting = context.getSharedPreferences(StaticVars.GENRE_SHARED_PREFERENCES,Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = mSetting.edit();\n //putting genre name and its id on shikimori\n\n\n editor.putInt(\"Drama\",8);\n editor.putInt(\"Драма\",8);\n editor.putInt(\"Game\",11);\n editor.putInt(\"Игры\",11);\n editor.putInt(\"Psychological\",40);\n editor.putInt(\"Психологическое\",40);\n editor.putInt(\"Adventure\",2);\n editor.putInt(\"Приключения\",2);\n editor.putInt(\"Music\",19);\n editor.putInt(\"Музыка\",19);\n editor.putInt(\"Action\",1);\n editor.putInt(\"Экшен\",1);\n editor.putInt(\"Comedy\",4);\n editor.putInt(\"Комедия\",4);\n editor.putInt(\"Demons\",6);\n editor.putInt(\"Демоны\",6);\n editor.putInt(\"Police\",39);\n editor.putInt(\"Полиция\",39);\n editor.putInt(\"Space\",29);\n editor.putInt(\"Космос\",29);\n editor.putInt(\"Ecchi\",9);\n editor.putInt(\"Этти\",9);\n editor.putInt(\"Fantasy\",10);\n editor.putInt(\"Фэнтези\",10);\n editor.putInt(\"Historical\",13);\n editor.putInt(\"Исторический\",13);\n editor.putInt(\"Horror\",14);\n editor.putInt(\"Ужасы\",14);\n editor.putInt(\"Magic\",16);\n editor.putInt(\"Магия\",16);\n editor.putInt(\"Mecha\",18);\n editor.putInt(\"Меха\",18);\n editor.putInt(\"Parody\",20);\n editor.putInt(\"Пародия\",20);\n editor.putInt(\"Samurai\",21);\n editor.putInt(\"Самураи\",21);\n editor.putInt(\"Romance\",22);\n editor.putInt(\"Романтика\",22);\n editor.putInt(\"School\",23);\n editor.putInt(\"Школа\",23);\n editor.putInt(\"Shoujo\",25);\n editor.putInt(\"Сёдзе\",25);\n editor.putInt(\"Shounen\",27);\n editor.putInt(\"Сёнен\",27);\n editor.putInt(\"Shounen Ai\",28);\n editor.putInt(\"Сёнен Ай\",28);\n editor.putInt(\"Sports\",30);\n editor.putInt(\"Спорт\",30);\n editor.putInt(\"Vampire\",32);\n editor.putInt(\"Вампиры\",32);\n editor.putInt(\"Harem\",35);\n editor.putInt(\"Гарем\",35);\n editor.putInt(\"Slice of Life\",36);\n editor.putInt(\"Повседневность\",36);\n editor.putInt(\"Seinen\",42);\n editor.putInt(\"Сейнен\",42);\n editor.putInt(\"Josei\",43);\n editor.putInt(\"Дзёсей\",43);\n editor.putInt(\"Supernatural\",37);\n editor.putInt(\"Сверхъестественное\",37);\n editor.putInt(\"Thriller\",41);\n editor.putInt(\"Триллер\",41);\n editor.putInt(\"Shoujo Ai\",26);\n editor.putInt(\"Сёдзе Ай\",26);\n editor.putInt(\"Sci-Fi\",24);\n editor.putInt(\"Фантастика\",24);\n editor.putInt(\"Super Power\",31);\n editor.putInt(\"Супер сила\",31);\n editor.putInt(\"Military\",38);\n editor.putInt(\"Военное\",38);\n editor.putInt(\"Mystery\",7);\n editor.putInt(\"Детектив\",7);\n editor.putInt(\"Kids\",15);\n editor.putInt(\"Детское\",15);\n editor.putInt(\"Cars\",3);\n editor.putInt(\"Машины\",3);\n editor.putInt(\"Martial Arts\",17);\n editor.putInt(\"Боевые искусства\",17);\n editor.putInt(\"Dementia\",5);\n editor.putInt(\"Безумие\",5);\n\n editor.apply();\n\n\n\n }", "private void loadDefaultValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n e.getKey().setText(Pref.getDefault(this, e.getValue()));\n }\n }", "@SuppressWarnings(\"deprecation\")\n\tprivate void setupSimplePreferencesScreen() {\n\t\tif (!isSimplePreferences(this)) {\n\t\t\treturn;\n\t\t}\n\n\t\taddPreferencesFromResource(R.xml.pref_blank);\n\n\t\t// Add 'filters' preferences.\n\t\tPreferenceCategory fakeHeader = new PreferenceCategory(this);\n\n\t\t// Add 'appearance' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.appearance);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_appearance);\n\n\t\t// Add 'text color' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.text_color);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_textcolor);\n\n\t\t// Add 'info' preferences.\n\t\tfakeHeader = new PreferenceCategory(this);\n\t\tfakeHeader.setTitle(R.string.information);\n\t\tgetPreferenceScreen().addPreference(fakeHeader);\n\t\taddPreferencesFromResource(R.xml.pref_info);\n\n\t\t// Add others\n\t\tsetupOpenSourceInfoPreference(this, findPreference(getString(R.string.pref_info_open_source)));\n\t\tsetupVersionPref(this, findPreference(getString(R.string.pref_version)));\n\n\t}", "private void savePreferenceData(String role){\n if (getIntent()!=null){\n SharedPreferences preferences = getSharedPreferences(detailPreference, MODE_PRIVATE);\n SharedPreferences.Editor editor = preferences.edit();\n editor.putString(preferenceKey, role);\n editor.apply();\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.framework_setting);\n SharedPreferences sharedPreferences = this.getPreferenceManager().getSharedPreferences();\n String preference_smartbar_default_type = getResources().getString(R.string.preference_smartbar_default_type);\n final ListPreference listPreference = (ListPreference) findPreference(preference_smartbar_default_type);\n //修改Smartbar类型\n String smart_type = sharedPreferences.getString(preference_smartbar_default_type, null);\n int index = listPreference.findIndexOfValue(String.valueOf(smart_type));\n if (index != -1) {\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n }\n if (listPreference != null) {\n listPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n int index = listPreference.findIndexOfValue(newValue.toString());\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n return true;\n }\n });\n }\n }", "private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }", "public interface Resource {\r\n\r\n // Resource Names for HistoryView\r\n public static final String HIS_PREV_BUTTON_LABEL = \"history.prev.label\";\r\n public static final String HIS_PREV_BUTTON_TOOLTIP = \"history.prev.tooltip\";\r\n public static final String HIS_PREVCONTEXT_BUTTON_LABEL = \"history.prevcontext.label\";\r\n public static final String HIS_PREVCONTEXT_BUTTON_TOOLTIP = \"history.prevcontext.tooltip\";\r\n public static final String HIS_NEWCONTEXT_BUTTON_LABEL = \"history.newcontext.label\";\r\n public static final String HIS_NEWCONTEXT_BUTTON_TOOLTIP = \"history.newcontext.tooltip\";\r\n public static final String HIS_CLEARPREVCONTEXTS_BUTTON_LABEL = \"history.clear-previous-contexts.label\";\r\n public static final String HIS_CLEARPREVCONTEXTS_BUTTON_TOOLTIP = \"history.clear-previous-contexts.tooltip\";\r\n public static final String HIS_SIZE_LABEL = \"history.size.label\";\r\n public static final String HIS_SIZE_NONE = \"history.size.none\";\r\n public static final String HIS_BUTTON_LABEL = \"history.history.label\";\r\n public static final String HIS_BUTTON_TOOLTIP = \"history.history.tooltip\";\r\n public static final String HIS_TOOLTIP = \"history.tooltip\";\r\n public final static String HIS_HELP_ID = \"history.helpID\";\r\n public static final String HIS_NO_HISTORY_TEXT = \"history.nohistory.text\";\r\n public static final String HIS_ICON = \"resources/History16.gif\";\r\n\r\n public static final String HIST_SUMMARY_SIZE_TXT = \"historySummary.text.size\";\r\n public static final String HIST_SUMMARY_CLEARED_TXT = \"historySummary.text.cleared\";\r\n public static final String HIST_SUMMARY_BACK_TXT = \"historySummary.text.back\";\r\n public static final String HIST_SUMMARY_FORW_TXT = \"historySummary.text.forward\";\r\n public static final String HIST_SUMMARY_POS_TXT = \"historySummary.text.position\";\r\n public static final String HIST_SUMMARY_REM_TXT = \"historySummary.text.removed\";\r\n public static final String HIST_SUMMARY_NP_TXT = \"historySummary.text.newPath\";\r\n}", "public HLSAppSharedPreferences(Context context, String strName) {\n\n mContext = context;\n mPreference = context.getSharedPreferences(strName, Activity.MODE_PRIVATE);\n mEditor = mPreference.edit();\n }", "public String getPreference(String key) {\n return preferences.get(key).value;\n }", "public Dialog onCreateDialogSingleChoice() {\n AlertDialog.Builder builder = new AlertDialog.Builder(context);\n \t//Source of the data in the DIalog\n \t\n\n \t// Set the dialog title\n \tbuilder.setTitle(R.string.dtitle)\n \t// Specify the list array, the items to be selected by default (null for none),\n \t// and the listener through which to receive callbacks when items are selected\n \t.setSingleChoiceItems(items, choice, new DialogInterface.OnClickListener() {\n\n \t@Override\n \tpublic void onClick(DialogInterface dialog, int which) {\n \t// TODO Auto-generated method stub\n myPref.setSummary(items[which]);\n switch(which)\n {\n case 0:\n editor.putInt(\"Theme\",R.style.AppThemeRed);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 1:\n editor.putInt(\"Theme\",R.style.AppThemeBlue);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 2:\n editor.putInt(\"Theme\",R.style.AppThemePurple);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 3:\n editor.putInt(\"Theme\",R.style.AppThemeGreen);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 4:\n editor.putInt(\"Theme\",R.style.AppThemeOrange);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n case 5:\n editor.putInt(\"Theme\",R.style.AppThemeGrey);\n editor.putInt(\"Choice\",which);\n editor.commit();\n break;\n }\n\n \t}\n \t})\n\n \t// Set the action buttons\n \t.setPositiveButton(R.string.dok, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK, so save the result somewhere\n // or return them to the component that opened the dialog\n //Preferences.restart();\n //theme = sharedPreferences.getInt(\"Theme\", R.style.AppThemeRed);\n startActivity(new Intent(context, Preferences.class));\n }\n })\n \t.setNegativeButton(R.string.dcancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n\n \treturn builder.create();\n \t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\taddPreferencesFromResource(net.zhuoweizhang.mcpelauncher.R.xml.preferences);\n\t\ttexturePackPreference = findPreference(\"zz_texture_pack\");\n\t\tif (texturePackPreference != null) texturePackPreference.setOnPreferenceClickListener(this);\n\t\ttexturePackEnablePreference = findPreference(\"zz_texture_pack_enable\");\n\t\tif (texturePackEnablePreference != null) texturePackEnablePreference.setOnPreferenceClickListener(this);\n\t\ttexturePackDemoPreference = findPreference(\"zz_texture_pack_demo\");\n\t\tif (texturePackDemoPreference != null) texturePackDemoPreference.setOnPreferenceClickListener(this);\n\t\tmanagePatchesPreference = findPreference(\"zz_manage_patches\");\n\t\tmanagePatchesPreference.setOnPreferenceClickListener(this);\n\t\tsafeModePreference = findPreference(\"zz_safe_mode\");\n\t\tsafeModePreference.setOnPreferenceClickListener(this);\n\t\taboutPreference = findPreference(\"zz_about\");\n\t\taboutPreference.setOnPreferenceClickListener(this);\n\t\tgetProPreference = findPreference(\"zz_get_pro\");\n\t\tif (getProPreference != null) getProPreference.setOnPreferenceClickListener(this);\n\t\tloadNativeAddonsPreference = findPreference(\"zz_load_native_addons\");\n\t\tif (loadNativeAddonsPreference != null) loadNativeAddonsPreference.setOnPreferenceClickListener(this);\n\t\textractOriginalTexturesPreference = findPreference(\"zz_extract_original_textures\");\n\t\tif (extractOriginalTexturesPreference != null) {\n\t\t\textractOriginalTexturesPreference.setOnPreferenceClickListener(this);\n\t\t\tif (Build.VERSION.SDK_INT < 16 /*Build.VERSION_CODES.JELLY_BEAN*/) { //MCPE original textures not accessible on Jelly Bean\n\t\t\t\tgetPreferenceScreen().removePreference(extractOriginalTexturesPreference);\n\t\t\t}\n\t\t}\n\t\tskinPreference = findPreference(\"zz_skin\");\n\t\tif (skinPreference != null) skinPreference.setOnPreferenceClickListener(this);\n\t\tmanageAddonsPreference = findPreference(\"zz_manage_addons\");\n\t\tif (manageAddonsPreference != null) manageAddonsPreference.setOnPreferenceClickListener(this);\n\t}", "protected abstract IEditorPreferences getPreferences();", "@Override\n public String getString(String key, String defaultVal) {\n return mSharedPreferences.getString(key, defaultVal);\n }", "private void getPrefs() {\n SharedPreferences prefs = PreferenceManager\n .getDefaultSharedPreferences(getBaseContext());\n \n int size = prefs.getInt(\"textsizePref\", 20);\n int color = Integer.valueOf(prefs.getString(\"textcolorPref\", \"7f070006\"),16);\n int bakcolor = Integer.valueOf(prefs.getString(\"backgroundcolorPref\", \"1\"));\n int font = Integer.valueOf(prefs.getString(\"fontPref\", \"1\"));\n mQuoteTxt.setTextColor(getResources().getColor(color));\n \n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n Editor editor = sp.edit();\n switch (bakcolor) {\n case 1: \t\n \tmScrollview.setBackgroundColor(getResources().getColor(R.color.white));\n \tif (color == 1) {\n \t\tmQuoteTxt.setTextColor(getResources().getColor(R.color.black));\n \t\teditor.putString(\"textcolorPref\", \"2\");\n \t} \t\t\n \tmHeader.setTextColor(getResources().getColor(R.color.black));\n \tbreak;\n case 2:\n \tmScrollview.setBackgroundColor(getResources().getColor(R.color.black));\n \tif (color == 2) {\n \t\tmQuoteTxt.setTextColor(getResources().getColor(R.color.white));\n \t\teditor.putString(\"textcolorPref\", \"1\");\n \t} \t\t\n \tmHeader.setTextColor(getResources().getColor(R.color.white));\n break;\n } \n editor.commit();\n switch (font) {\n case 1:\n \tmQuoteTxt.setTypeface(Typeface.DEFAULT);\n \tbreak;\n case 2:\n \tmQuoteTxt.setTypeface(Typeface.SANS_SERIF);\n \tbreak;\n case 3:\n \tmQuoteTxt.setTypeface(Typeface.SERIF);\n \tbreak;\n case 4:\n \tmQuoteTxt.setTypeface(Typeface.MONOSPACE);\n \tbreak;\n }\n mQuoteTxt.setTextSize((float) size);\n \n }", "public interface ResourceAdapter {\n\n public enum Item {\n INPUT_SAME_AS_OUTPUT_ERROR,\n AUTO_KEY_SELECTION_ERROR,\n LOADING_CERTIFICATE_AND_KEY,\n PARSING_CENTRAL_DIRECTORY,\n GENERATING_MANIFEST,\n GENERATING_SIGNATURE_FILE,\n GENERATING_SIGNATURE_BLOCK,\n COPYING_ZIP_ENTRY\n };\n\n public String getString( Item item, Object... args);\n}", "@Api(1.0)\n @Nullable\n public String getPreferenceId() {\n return mPreferencesId;\n }", "public void setColorSchemeResources(@ColorRes int... colorResIds) {\n swipeRefreshLayout.setColorSchemeResources(colorResIds);\n }", "private void loadSettings() {\n // set theme\n SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);\n String themeId = preferences.getString(\"theme\", \"\");\n if (themeId.equals(\"light\")) {\n setTheme(R.style.ThemeLightReadMode);\n Log.d(TAG, \"switch to light theme \" + themeId);\n }\n else /*if (themeId.equals(\"dark\"))*/ {\n setTheme(R.style.ThemeDarkReadMode);\n Log.d(TAG, \"switch to dark theme \" + themeId);\n }\n }", "public int getImageResource() {\n switch (id) {\n case 0: return R.drawable.aatrox_square_0;\n case 1: return R.drawable.ahri_square_0;\n case 2: return R.drawable.akali_square_0;\n case 3: return R.drawable.alistar_square_0;\n case 4: return R.drawable.amumu_square_0;\n case 5: return R.drawable.anivia_square_0;\n case 6: return R.drawable.annie_square_0;\n case 7: return R.drawable.ashe_square_0;\n case 8: return R.drawable.azir_square_0;\n case 9: return R.drawable.bard_square_0;\n case 10: return R.drawable.blitzcrank_square_0;\n case 11: return R.drawable.brand_square_0;\n case 12: return R.drawable.braum_square_0;\n case 13: return R.drawable.caitlyn_square_0;\n case 14: return R.drawable.cassiopeia_square_0;\n case 15: return R.drawable.chogath_square_0;\n case 16: return R.drawable.corki_square_0;\n case 17: return R.drawable.darius_square_0;\n case 18: return R.drawable.diana_square_0;\n case 19: return R.drawable.draven_square_0;\n case 20: return R.drawable.drmundo_square_0;\n default:\n return R.drawable.fizz_square_0;\n }\n }", "private static final String getStringPreference(String key, String defValue) {\n final SharedPreferences settings = DemoApp.getSharedPreferences();\n return settings.getString(key, defValue);\n }" ]
[ "0.606936", "0.58681124", "0.57357526", "0.56694585", "0.55774236", "0.5543293", "0.55100864", "0.5490212", "0.54842764", "0.54636055", "0.54156685", "0.54150856", "0.53483295", "0.53286195", "0.5324749", "0.5297082", "0.52717626", "0.5269856", "0.5228262", "0.5216671", "0.5212872", "0.5207847", "0.5205509", "0.51890117", "0.51633555", "0.5138725", "0.5130586", "0.5127082", "0.5118021", "0.5105584", "0.51001644", "0.509565", "0.50719917", "0.50499743", "0.50497776", "0.5045999", "0.5031043", "0.5000228", "0.49998647", "0.4964503", "0.4959427", "0.49528304", "0.49497935", "0.49329597", "0.4913327", "0.49093303", "0.49026638", "0.4900992", "0.48942932", "0.48837838", "0.48754352", "0.4873071", "0.48531967", "0.48531967", "0.48527467", "0.483496", "0.48220724", "0.48171067", "0.48169616", "0.4809766", "0.48042545", "0.47958896", "0.47942415", "0.4787415", "0.4785162", "0.47797117", "0.47774538", "0.47763786", "0.476716", "0.47654697", "0.4764122", "0.47623605", "0.47606608", "0.47524497", "0.475103", "0.4750643", "0.4721261", "0.47151017", "0.47149402", "0.47072098", "0.4705598", "0.47013345", "0.46987277", "0.46912688", "0.4683467", "0.46830592", "0.46818224", "0.46726155", "0.46711463", "0.467086", "0.46701533", "0.46690583", "0.46532252", "0.46495092", "0.4647752", "0.46467003", "0.46459675", "0.4644362", "0.46426436", "0.46356237" ]
0.4652306
93
Returns the value of the resource string identified by the resource ID in the context the given context
public static String getResourceString(Context pAppContext, int pResourceId) { return pAppContext.getString(pResourceId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getString(Context context,int resID){\n\t\treturn context.getResources().getString(resID);\n\t}", "public String getStringResourceById(int resourceId) {\n \treturn mContext.getResources().getString(resourceId);\n }", "public static String getStringInRcse(int resourceId) {\n Resources resource = null;\n String string = null;\n try {\n resource =\n AndroidFactory.getApplicationContext().getPackageManager()\n .getResourcesForApplication(CoreApplication.APP_NAME);\n } catch (android.content.pm.PackageManager.NameNotFoundException e) {\n e.printStackTrace();\n }\n if (null != resource) {\n string = resource.getString(resourceId);\n } else {\n Logger.e(TAG, \"getStringInRcse(), resource is null!\");\n }\n return string;\n }", "public String getString(int id) {\n return context.getResources().getString(id);\n }", "public static String getString(Context context, String name)\n\t{\n\t\treturn context.getResources().getString(RR.getStringId(name));\n\t}", "public CharSequence getResourceText(int resId) {\n synchronized (this) {\n TypedValue outValue = this.mValue;\n if (!getResourceValue(resId, 0, outValue, true)) {\n return null;\n }\n CharSequence coerceToString = outValue.coerceToString();\n return coerceToString;\n }\n }", "public static int getResourceByString( Context context, String resourceType, String name ) {\n int resource = 0;\n\n try {\n resource = context.getResources()\n .getIdentifier( name, resourceType, context.getPackageName() );\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n\n return resource;\n }", "public static String getStringByRId(int R_ID) {\n return App.getAppContext().getResources().getString(R_ID);\n }", "public String _s(int res_id) {\n\t\treturn mContext.getResources().getString(res_id);\n\t}", "CharSequence getResourceText(int ident) {\n\t\tTypedValue tmpValue = mValue;\n\t\tint block = loadResourceValue(ident, tmpValue, true);\n\t\tif (block >= 0) {\n\t\t\tif (tmpValue.type == TypedValue.TYPE_STRING) {\n\t\t\t\treturn mStringBlocks[block].get(tmpValue.data);\n\t\t\t}\n\t\t\treturn tmpValue.coerceToString();\n\t\t}\n\t\treturn null;\n\t}", "public final String getResourceId(\n ExecutionContext context,\n ExecutionScript script) throws InterruptedException, IOException {\n return resourceId;\n }", "public String getResourceName(int resId) {\n String nativeGetResourceName;\n synchronized (this) {\n ensureValidLocked();\n nativeGetResourceName = nativeGetResourceName(this.mObject, resId);\n }\n return nativeGetResourceName;\n }", "public final static int findResourceIdInContext(Context context, String resourceName, String resourceType) {\n\t\tString packageName = context.getPackageName();\n\t\treturn context.getResources().getIdentifier(resourceName, resourceType, packageName);\n\t}", "private String getResourceName(String resourceId)\n/* */ {\n/* 1165 */ HashMap<String, String> managedObject = (HashMap)this.managedObjectVsResourceIdMap.get(resourceId);\n/* 1166 */ StringBuffer toReturn = new StringBuffer();\n/* 1167 */ String type = (String)managedObject.get(\"TYPE\");\n/* 1168 */ if ((!\"HAI\".equals(type)) && (!this.monitors.contains(resourceId)))\n/* */ {\n/* 1170 */ toReturn.append(\"\\\"\").append(getParentResourceDisplayname(resourceId)).append(\"\\\"\").append(\",\");\n/* */ }\n/* 1172 */ else if ((!\"HAI\".equals(type)) && (this.monitors.contains(resourceId)))\n/* */ {\n/* 1174 */ toReturn.append(\",\");\n/* */ }\n/* 1176 */ toReturn.append(\"\\\"\").append((String)managedObject.get(\"DISPLAYNAME\")).append(\"\\\"\");\n/* 1177 */ return toReturn.toString();\n/* */ }", "String getResourceID();", "public static String getRawResource(Context context, int resource) {\n String res = null;\n InputStream is = context.getResources().openRawResource(resource);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n byte[] b = new byte[1];\n try {\n while (is.read(b) != -1) {\n baos.write(b);\n }\n ;\n res = baos.toString();\n is.close();\n baos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return res;\n }", "public String getString(@NonNull int stringId) {\n return getResources().getString(stringId);\n }", "private static String getString( final String id ) {\n return Util.getString(I18N_PREFIX + id);\n }", "protected abstract ID getResourceId(T resource);", "public String getResourceId();", "public String valueOfStringId(IProject project, String xmlFileWsPath, String stringId) {\n Map<String, String> cache = getResIdsForFile(project, xmlFileWsPath);\n return cache.get(stringId);\n }", "public String getContextString();", "public String getResourceId() {\n return this.resourceId;\n }", "public String getResourceId() {\n return this.resourceId;\n }", "public String getStringResource(LocaleResource resource){\n\t\tContext c = ConnectedApp.getContextStatic();\n\t\tswitch(resource){\t\t\n\t\tcase support_contact:\n default:\n\t\t\tint resId= c.getResources().getIdentifier(resource.toString()+\"_\"+ getCountryCode().toLowerCase(Locale.US), \"string\",\n\t\t\t\t\tc.getPackageName());\n\t\t\treturn c.getString(resId);\n\t\t}\n\t\t//return null;\n\t}", "public String resourceId() {\n return this.resourceId;\n }", "public String resourceId() {\n return this.resourceId;\n }", "public String resourceId() {\n return this.resourceId;\n }", "public String resourceId() {\n return this.resourceId;\n }", "public String resourceId() {\n return this.resourceId;\n }", "public int getIdAssignedByR(Context pContext, String pIdString)\n\t{\n\t Resources resources = pContext.getResources();\n\t String packageName = pContext.getPackageName();\n\n\t // Determine the result and return it\n\t int result = resources.getIdentifier(pIdString, \"id\", packageName);\n\t return result;\n\t}", "public static String readConfigValue(Context context, String key) {\n Resources resources = context.getResources();\n try {\n InputStream inputStream = resources.openRawResource(R.raw.config);\n Properties properties = new Properties();\n properties.load(inputStream);\n return properties.getProperty(key);\n } catch (Exception e) {\n e.printStackTrace();\n }\n return \"\";\n }", "public String getResourceID() {\n\t\treturn resourceID;\n\t}", "public String getResourceId() {\n return resourceId;\n }", "int getResourceId();", "public String getString( String key )\n {\n String translation = key;\n\n if ( specificResourceBundle != null )\n {\n try\n {\n translation = specificResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n if ( translation.equals( key ) && globalResourceBundle != null )\n {\n try\n {\n translation = globalResourceBundle.getString( key );\n }\n catch ( MissingResourceException ignored )\n {\n }\n }\n\n return translation;\n }", "public String getString(String abc) {\n\n int resID = getResources().getIdentifier(abc, \"string\", getPackageName());\n\n return getResources().getString(resID);\n }", "public String getResourceId() {\r\n\t\treturn resourceId;\r\n\t}", "String resourceGuid();", "java.lang.String getContext();", "public String getResourceId() {\n\t\treturn resourceId;\n\t}", "public String getResourceId() {\n\t\treturn resourceId;\n\t}", "protected static String m94909a(Context context, int i) {\n return context.getResources().getString(i);\n }", "public abstract Object getValue(ELContext context);", "public static int getResourceByName(Context context, String resource_name) {\n\n String final_name = resource_name.toLowerCase().equals(\"bangalore\") ? \"bengaluru\" : resource_name.replace(\" \", \"_\").toLowerCase();\n\n return context.getResources().getIdentifier(final_name, \"drawable\", context.getPackageName());\n }", "public abstract Promise<JsonValue, ResourceException> getRelationshipValueForResource(Context context, \n String resourceId);", "public abstract T get(String context);", "public static synchronized String m21406i(Context context) {\n String string;\n synchronized (C5191i.class) {\n try {\n string = context.getResources().getString(context.getPackageManager().getPackageInfo(context.getPackageName(), 0).applicationInfo.labelRes);\n } catch (Throwable th) {\n C5205o.m21464a(th);\n return \"\";\n }\n }\n return string;\n }", "protected String getResourceString (String key)\n {\n try {\n if (_bundle != null) {\n return _bundle.getString(key);\n }\n \n } catch (MissingResourceException mre) {\n Log.warning(\"Missing translation message \" +\n \"[bundle=\" + _path + \", key=\" + key + \"].\");\n }\n return null;\n }", "String getContextId();", "public static String getContext(String key){\r\n return String.valueOf(scenarioContext.get(key));\r\n }", "public static String getExtraString(Activity context, String key) {\n \tString param = \"\";\n \tBundle bundle = context.getIntent().getExtras();\n \tif(bundle!=null){\n \t\tparam = bundle.getString(key);\n \t}\n \treturn param;\n\t}", "public String getResourceId() {\n return this.ResourceId;\n }", "Value get(ExecutionContext context, String propertyName);", "String getResourceName();", "public Integer getResourceId() {\n return resourceId;\n }", "public static String getFileFromRaw(Context context, int resId) {\n if (context == null) {\n return null;\n }\n\n StringBuilder s = new StringBuilder();\n try {\n InputStreamReader in = new InputStreamReader(context.getResources().openRawResource(resId));\n BufferedReader br = new BufferedReader(in);\n String line;\n while ((line = br.readLine()) != null) {\n s.append(line);\n }\n return s.toString();\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }", "public String get (String key)\n {\n // if this string is tainted, we don't translate it, instead we\n // simply remove the taint character and return it to the caller\n if (key.startsWith(TAINT_CHAR)) {\n return key.substring(1);\n }\n \n String msg = getResourceString(key);\n return (msg != null) ? msg : key;\n }", "public String getDescription(Context context)\n\t\t{\n\t\t\tif (descriptionId == 0)\n\t\t\t\treturn null;\n\n\t\t\treturn context.getString(descriptionId);\n\t\t}", "java.lang.String getStringId();", "java.lang.String getStringId();", "public String getString(String key)\r\n {\r\n debug(\"getString(\" + key + \") - retrieving Key...\");\r\n String value = null;\r\n try\r\n {\r\n value = getResourceBundle().getString(key);\r\n }\r\n catch (MissingResourceException e)\r\n {\r\n System.out.println(\"java.util.MissingResourceException: \" + \"Couldn't find value for: \" + key);\r\n }\r\n if (value == null)\r\n {\r\n value = \"Could not find resource: \" + key + \" \";\r\n }\r\n debug(\"getString(\" + key + \") - value ==> \" + value);\r\n debug(\"getString(\" + key + \") - retrieving Key...Done\");\r\n return value;\r\n }", "public final static String get(int datasetID) {\n\t\t\tString strValue = PROPERTIES.getProperty(datasetID+\"\");\n\t\t\t//log.info(\"GET dataset name : \"+datasetID+\"=\"+strValue);\n\t\t\treturn strValue;\n\t\t}", "public static String getResourceString(String key) {\n ResourceBundle bundle = IvyPlugin.getDefault().getResourceBundle();\n try {\n return (bundle != null) ? bundle.getString(key) : key;\n } catch (MissingResourceException e) {\n return key;\n }\n }", "void setResourceID(String resourceID);", "public CharSequence getResourceBagText(int resId, int bagEntryId) {\n synchronized (this) {\n ensureValidLocked();\n TypedValue outValue = this.mValue;\n int cookie = nativeGetResourceBagValue(this.mObject, resId, bagEntryId, outValue);\n if (cookie <= 0) {\n return null;\n }\n outValue.changingConfigurations = ActivityInfo.activityInfoConfigNativeToJava(outValue.changingConfigurations);\n if (outValue.type == 3) {\n CharSequence result = this.mApkAssets[cookie - 1].getStringFromPool(outValue.data);\n if (hasRes()) {\n CharSequence rt = getTextForDBid(result);\n if (rt != null) {\n result = rt;\n }\n }\n } else {\n CharSequence result2 = outValue.coerceToString();\n return result2;\n }\n }\n }", "protected static String lookup(ComponentContext context, String property) {\n if (context.getBundleContext().getProperty(property) != null) {\n return context.getBundleContext().getProperty(property);\n }\n\n if (context.getProperties().get(property) != null) {\n return context.getProperties().get(property).toString();\n }\n return null;\n }", "private String getLocalId(ShibbolethResolutionContext resolutionContext)\n\t\t\tthrows AttributeResolutionException {\n\n\t\tlog.info(\"gets local ID ...\");\n\n\t\tString[] ids = getSourceAttributeId().split(SEPARATOR);\n\n\t\tStringBuffer localIdValue = new StringBuffer();\n\t\tfor (int i = 0; i < ids.length; i++) {\n\n\t\t\tCollection<Object> sourceIdValues = getValuesFromAllDependencies(\n\t\t\t\t\tresolutionContext, ids[i]);\n\t\t\tif (sourceIdValues == null || sourceIdValues.isEmpty()) {\n\t\t\t\tlog\n\t\t\t\t\t\t.error(\n\t\t\t\t\t\t\t\t\"Source attribute {} for connector {} provide no values\",\n\t\t\t\t\t\t\t\tgetSourceAttributeId(), getId());\n\t\t\t\tthrow new AttributeResolutionException(\"Source attribute \"\n\t\t\t\t\t\t+ getSourceAttributeId() + \" for connector \" + getId()\n\t\t\t\t\t\t+ \" provided no values\");\n\t\t\t}\n\n\t\t\tif (sourceIdValues.size() > 1) {\n\t\t\t\tlog\n\t\t\t\t\t\t.warn(\n\t\t\t\t\t\t\t\t\"Source attribute {} for connector {} has more than one value, only the first value is used\",\n\t\t\t\t\t\t\t\tgetSourceAttributeId(), getId());\n\t\t\t}\n\t\t\tlocalIdValue.append(sourceIdValues.iterator().next().toString());\n\t\t}\n\t\tlog.info(\"local ID: \" + localIdValue.toString());\n\n\t\treturn localIdValue.toString();\n\t}", "public static String getStringAttribute(Context context, AttributeSet attrs, String namespace, String attribute, String defaultValue)\n \t{\n \t\tint resId = attrs.getAttributeResourceValue(namespace, attribute, -1);\n \t\tString value;\n \n \t\tif(resId == -1)\n \t\t\tvalue = attrs.getAttributeValue(namespace, attribute);\n \t\telse\n \t\t\tvalue = context.getString(resId);\n \n \t\treturn value == null ? defaultValue : value;\n \t}", "public String getContext(String namespace, String key) {\n String value = null;\n Map<String, String> namespaceMap = context.get(namespace);\n if (namespaceMap != null) {\n value = namespaceMap.get(key);\n }\n return value;\n }", "private String getCorrelationIdFromTask(String TaskContext) {\n String msgContext = TaskContext.substring(TaskContext.indexOf(\":\") + 1);\n logger.debug(String.format(\"msgContext: %s\", msgContext));\n Map msgMap = JSONObjectUtil.toObject(msgContext, LinkedHashMap.class);\n return (String) msgMap.get(ID);\n }", "String getText(int id);", "public String getString(String key) {\n\t\tif (RESOURCE_BUNDLE == null) {\n\t\t\tthrow new IllegalStateException(\"RESOURCE BUNDLE not yet initialized.\");\n\t\t}\n\t\ttry {\n\t\t\treturn RESOURCE_BUNDLE.getString(key);\n\t\t} catch (MissingResourceException e) {\n\t\t\tif (bundles != null) {\n\t\t\t\t// look in added bundles\n\t\t\t\tfor (int i = 0; i < bundles.size(); i++) {\n\t\t\t\t\tResourceBundle bundle = bundles.get(i);\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn bundle.getString(key);\n\t\t\t\t\t} catch (MissingResourceException mre) {\n\t\t\t\t\t\t// resource not found\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// key unkown\n\t\t\treturn '!' + key + '!';\n\t\t}\n\t}", "public String getAttributeValue(int id) {\n Attribute attr = super.findById(id, false);\n if (attr != null ) {\n return attr.getValue();\n } else {\n return \"unknown attribute\";\n }\n }", "public static String getResourceString(String key)\n {\n ResourceBundle bundle = XMLPlugin.getDefault().getResourceBundle();\n\n try\n {\n return bundle.getString(key);\n }\n catch (MissingResourceException e)\n {\n return key;\n }\n }", "public String get(Resource r) {\n String id = map.get(r);\n if (id == null) map.put(r, id = \"ID-\" + (map.size() + 10000));\n return id;\n }", "public static String getResourceString(String key) {\n \t\tResourceBundle bundle = XSDEditorPlugin.getDefault().getResourceBundle();\n \t\ttry {\n \t\t\treturn (bundle != null) ? bundle.getString(key) : key;\n \t\t} catch (MissingResourceException e) {\n \t\t\treturn key;\n \t\t}\n \t}", "public static Resource getConsoleResource(BeanContext context) {\n SlingHttpServletRequest request = context.getRequest();\n ResourceResolver resolver = request.getResourceResolver();\n String path = null;\n // use the resource set by a probably executed 'defineObjects' tag (supports including components)\n Resource resource = context.getAttribute(\"resource\", Resource.class);\n if (resource == null) {\n resource = request.getResource();\n }\n if (resource != null) {\n path = resource.getPath();\n }\n // use the suffix as the resource path if the resource is not defined or references a servlet\n if (StringUtils.isBlank(path) || path.startsWith(\"/bin/\")) {\n RequestPathInfo requestPathInfo = request.getRequestPathInfo();\n path = XSS.filter(requestPathInfo.getSuffix());\n resource = null;\n }\n if (resource == null && StringUtils.isNotBlank(path)) {\n resource = resolver.getResource(path);\n }\n if (resource == null) {\n // fallback to the root node if the servlet request has no suffix\n resource = resolver.getResource(\"/\");\n }\n return resource;\n }", "final CharSequence getResourceBagText(int ident, int bagEntryId) {\n synchronized (this) {\n TypedValue tmpValue = mValue;\n int block = loadResourceBagValue(ident, bagEntryId, tmpValue, true);\n if (block >= 0) {\n if (tmpValue.type == TypedValue.TYPE_STRING) {\n return mStringBlocks[block].get(tmpValue.data);\n }\n return tmpValue.coerceToString();\n }\n }\n return null;\n }", "abstract public String asString(final A resource);", "protected abstract ResourceValue getLayoutResource(BridgeContext context);", "public static int getColorStringResource(Color color) {\n \t\tswitch (color) {\n \t\tcase RED:\n \t\t\treturn R.string.red;\n \t\tcase BLUE:\n \t\t\treturn R.string.blue;\n \t\tcase GREEN:\n \t\t\treturn R.string.green;\n \t\tcase ORANGE:\n \t\t\treturn R.string.orange;\n \t\tdefault:\n \t\t\treturn R.string.nostring;\n \t\t}\n \t}", "String getString(String bundleKey);", "protected String getLocalId(ShibbolethResolutionContext resolutionContext) throws AttributeResolutionException {\n Collection<Object> sourceIdValues = getValuesFromAllDependencies(resolutionContext, getPidSourceAttributeId());\n if (sourceIdValues == null || sourceIdValues.isEmpty()) {\n log.error(\"Source attribute {} for connector {} provide no values\", getPidSourceAttributeId(), getId());\n throw new AttributeResolutionException(\"Source attribute \" + getPidSourceAttributeId() + \" for connector \"\n + getId() + \" provided no values\");\n }\n\n if (sourceIdValues.size() > 1) {\n log.warn(\"Source attribute {} for connector {} has more than one value, only the first value is used\",\n getPidSourceAttributeId(), getId());\n }\n\n return sourceIdValues.iterator().next().toString();\n }", "public static String getResourceString(String key) {\r\n\t\tResourceBundle bundle = APLDebugCorePlugin.getDefault().getResourceBundle();\r\n\t\ttry {\r\n\t\t\treturn (bundle != null) ? bundle.getString(key) : key;\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn key;\r\n\t\t}\r\n\t}", "public String getString(String key, String defValue) {\r\n\t\treturn getString(Global.getContext(), key, defValue);\r\n\t}", "@Override\r\n\tpublic String getInitialValue(IDirectEditingContext context) {\n\t\tPictogramElement pe = context.getPictogramElement();\r\n\t\tif( PropertyUtil.isResourceTypeNameShape(pe) ) {\r\n\t\t\tResourceType rt = (ResourceType) getBusinessObjectForPictogramElement(pe);\r\n \t\t\treturn rt.getName();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public static String getValue(String key){\n\t\tResourceBundle rb = ResourceBundle.getBundle(\"message\");\n\t\tString value = rb.getString(key);\n\t\treturn value;\n\t}", "public String getResourceId2Sql()\r\n \t{\r\n \t\treturn \"select RESOURCE_ID from CONTENT_RESOURCE_BODY_BINARY where (RESOURCE_ID = ?)\";\r\n \t}", "public static String getSharedPrefsString(Context pAppContext,\n\t\t\tint pResourceStringNameId) {\n\t\t// Convert the resource identity to a string\n\t\tString sharedPrefsStringName = getResourceString(pAppContext,\n\t\t\t\tpResourceStringNameId);\n\n\t\treturn getSharedPrefsString(pAppContext, sharedPrefsStringName);\n\t}", "public ResourceType getResourceType(final String id);", "public java.lang.String getContext() {\n java.lang.Object ref = context_;\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 context_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getStringFromID(int ID) {\n return String.format(getString(ID));\n }", "protected String getTitle(Context context) {\n if (this.titleResource != 0) {\n return context.getString(this.titleResource);\n } else {\n return this.title;\n }\n }", "protected String getString(String key) {\r\n\t\ttry {\r\n\t\t\tResourceBundle bundle = ResourceBundle.getBundle(bundleName);\r\n\t\t\treturn bundle.getString(key);\r\n\t\t} catch (MissingResourceException e) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public static String getStringValue(Resource r, Property p) {\n return getStringValue(r, p, null);\n }", "public String getLocalizedString( String name ) {\n\t\tString outString = \"\";\r\n\t\tint id = getResources().getIdentifier( name, \"string\", getPackageName() );\r\n\t\tif ( id == 0 )\r\n\t\t{\r\n\t\t\t// 0 is not a valid resource id\r\n\t\t\tLog.v(\"VrLocale\", name + \" is not a valid resource id!!\" );\r\n\t\t\treturn outString;\r\n\t\t} \r\n\t\tif ( id != 0 ) \r\n\t\t{\r\n\t\t\toutString = getResources().getText( id ).toString();\r\n\t\t\t//Log.v(\"VrLocale\", \"getLocalizedString resolved \" + name + \" to \" + outString);\r\n\t\t}\r\n\t\treturn outString;\r\n\t}", "public String getResourceName();", "public String getString(String key, Object s1) {\n return MessageFormat.format(Platform.getResourceBundle(getBundle()).getString(key), new Object[]{s1});\n }", "static private String getRawString(String key) {\n try {\n return _resources.getString(key);\n } catch (MissingResourceException mre) {\n return \"Missing resource for: \" + key;\n }\n }" ]
[ "0.7355492", "0.69432455", "0.6864549", "0.68542737", "0.6730518", "0.6518599", "0.6465926", "0.64405614", "0.64249885", "0.6335351", "0.6274864", "0.61476207", "0.61468625", "0.6097805", "0.608601", "0.6063267", "0.6039857", "0.6024733", "0.60074633", "0.5946676", "0.5920869", "0.59078854", "0.59077436", "0.59077436", "0.59041065", "0.5852184", "0.5852184", "0.5852184", "0.5852184", "0.5852184", "0.5836469", "0.582617", "0.58065236", "0.5786501", "0.5758394", "0.57513046", "0.5749914", "0.5733233", "0.57277584", "0.57043415", "0.5686225", "0.5686225", "0.5666999", "0.566447", "0.56457627", "0.5643133", "0.56249225", "0.55948037", "0.5584141", "0.55826765", "0.55715835", "0.55616915", "0.55156964", "0.55134016", "0.5512958", "0.55006623", "0.5500168", "0.54909617", "0.5465838", "0.5439409", "0.5439409", "0.5439289", "0.5432214", "0.54149693", "0.5404783", "0.5400514", "0.538851", "0.53858274", "0.535864", "0.5350882", "0.5345266", "0.5340043", "0.53321296", "0.5331653", "0.53313756", "0.5322264", "0.5315931", "0.5307908", "0.5302947", "0.52949363", "0.5292721", "0.5287556", "0.5286878", "0.5281914", "0.5254995", "0.52509695", "0.5249364", "0.5245202", "0.5240119", "0.5234252", "0.52337337", "0.5226681", "0.52236575", "0.5211008", "0.52098507", "0.52067083", "0.52050346", "0.5197031", "0.51946175", "0.5189585" ]
0.6448858
7
Returns the password has using a special salt
public static String getPasswordHash(String username, String password) { // Setup the password encoding arguments final String salt = "09234j234kj!@#213lk$#$)(*)DFSDFL##$"; final String passwordAndSalt = username + password + salt; // Encode the password with base64 and salt String encodedPassword = null; try { // Choose SHA-512 MessageDigest md = MessageDigest.getInstance("SHA-512"); // Prepare the digest md.update(passwordAndSalt.getBytes("UTF-8")); // Retrieve the encoded password string encodedPassword = new String(Hex.encodeHex(md.digest())); } catch (Exception e) { Log.e("LoginHistory", e.getMessage()); } return encodedPassword; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String generateHashFromPassword(String password, byte[] salt);", "String hashPassword(String salt, String password);", "public String getPasswordSalt() {\r\n return passwordSalt;\r\n }", "public String getSalt()\n {\n return base64Encode(salt);\n }", "public static String getPassHash(String password, String salt) {\n String algorithm = \"PBKDF2WithHmacSHA1\";\n int derivedKeyLength = 160; // for SHA1\n int iterations = 20000; // NIST specifies 10000\n\n byte[] saltBytes = Base64.getDecoder().decode(salt);\n KeySpec spec = new PBEKeySpec(password.toCharArray(), saltBytes, iterations, derivedKeyLength);\n\n SecretKeyFactory f = null;\n try {\n f = SecretKeyFactory.getInstance(algorithm);\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n byte[] encBytes = null;\n try {\n encBytes = f.generateSecret(spec).getEncoded();\n } catch (InvalidKeySpecException e) {\n e.printStackTrace();\n }\n return Base64.getEncoder().encodeToString(encBytes);\n }", "private static String getSalt() {\n\t\tSecureRandom gen = new SecureRandom();\n\t\tbyte[] salt = new byte[32];\n\t\tgen.nextBytes(salt);\n\t\treturn DatatypeConverter.printBase64Binary(salt);\n\t}", "public String getSalt() {\n return salt;\n }", "public String getSalt() {\n return salt;\n }", "public String getSalt() {\n return salt;\n }", "public String getSalt() {\n return salt;\n }", "private String hashAndSalt(String password, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException {\n String hashedPassword = hash(password, salt);\n return Base64.encodeBase64String(salt) + hashedPassword;\n }", "private String hashPass(String password, String salt)\r\n {\r\n String oldpass = (password + salt);\r\n String hashedPass = null;\r\n StringBuilder sb = new StringBuilder();\r\n\r\n try\r\n {\r\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\r\n md.update(oldpass.getBytes(\"UTF-8\"));\r\n\r\n byte[] hash = md.digest();\r\n\r\n for (int i = 0; i < hash.length; i++)\r\n {\r\n sb.append(Integer.toString((hash[i] & 0xff) + 0x100, 16).substring(1));\r\n }\r\n\r\n hashedPass = sb.toString();\r\n }\r\n catch (NoSuchAlgorithmException | UnsupportedEncodingException ex)\r\n {\r\n Logger.getLogger(AuthModel.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return hashedPass;\r\n }", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "public static byte[] getSalt()\r\n/* 111: */ {\r\n/* 112: */ try\r\n/* 113: */ {\r\n/* 114:105 */ return getPropertyBytes(\"salt\");\r\n/* 115: */ }\r\n/* 116: */ catch (Exception e)\r\n/* 117: */ {\r\n/* 118:107 */ log.log(Level.WARNING, \"Error getting salt: \" + e.getLocalizedMessage());\r\n/* 119: */ }\r\n/* 120:109 */ return new byte[0];\r\n/* 121: */ }", "private static byte[] hashPassword(String password, byte[] salt) throws Exception\n {\n byte[] hash = null;\n \n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update(salt);\n hash = md.digest(password.getBytes(\"UTF-8\"));\n }\n catch (NoSuchAlgorithmException e)\n {\n e.printStackTrace();\n }\n return hash;\n }", "String getUserPasswordHash();", "public String getSalt() {\n return mSalt;\n }", "String getSaltedHash();", "public byte[] getSalt() {\n return salt;\n }", "public String getSalt() {\n\t\treturn salt;\n\t}", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getPassword();", "String getUserPassword();", "private String createSalt()\r\n {\r\n SecureRandom random = new SecureRandom();\r\n byte bytes[] = new byte[20];\r\n random.nextBytes(bytes);\r\n StringBuilder sb = new StringBuilder();\r\n\r\n for (int i = 0; i < bytes.length; i++)\r\n {\r\n sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\r\n }\r\n\r\n String salt = sb.toString();\r\n return salt;\r\n }", "private byte[] getRandomSalt() {\n\t\tbyte[] randomSalt = new byte[SALT_LENGTH];\n\t\tSecureRandom secureRandom = new SecureRandom();\n\t\tsecureRandom.nextBytes(randomSalt);\n\t\treturn randomSalt;\n\t}", "public java.lang.String getPassword();", "String password();", "public byte[] getSalt() {\n\t\treturn salt;\n\t}", "public static String getSaltedHash(String password) throws Exception {\n byte[] salt = SecureRandom.getInstance(\"SHA1PRNG\").generateSeed(saltLen);\n // store the salt with the password\n return Base64.encodeToString(salt, Base64.NO_WRAP) + \"$\" + hash(password, salt);\n }", "static String getSaltString() {\n String SALTCHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\n StringBuilder salt = new StringBuilder();\n Random rnd = new Random();\n while (salt.length() < 18) { // length of the random string.\n int index = (int) (rnd.nextFloat() * SALTCHARS.length());\n salt.append(SALTCHARS.charAt(index));\n }\n String saltStr = salt.toString();\n return saltStr;\n }", "String getTemporaryPassword();", "public byte[] getSalt() {\n return mSalt;\n }", "private static String hash(String password, byte[] salt) throws Exception {\n if (password == null || password.length() == 0)\n throw new IllegalArgumentException(\"Empty passwords are not supported.\");\n SecretKeyFactory f = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n SecretKey key = f.generateSecret(new PBEKeySpec(\n password.toCharArray(), salt, iterations, desiredKeyLen));\n return Base64.encodeBase64String(key.getEncoded());\n }", "private static String hash(String password, byte[] salt) throws Exception {\n if (password == null || password.length() == 0) {\n throw new IllegalArgumentException(\"Empty passwords are not supported.\");\n }\n SecretKeyFactory f = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n SecretKey key = f.generateSecret(new PBEKeySpec(password.toCharArray(), salt, iterations, desiredKeyLen)\n );\n return Base64.encodeToString(key.getEncoded(), Base64.NO_WRAP);\n }", "java.lang.String getSaltData();", "private static byte[] getSalt() throws NoSuchAlgorithmException\n {\n SecureRandom sr = SecureRandom.getInstance(prngAlgo);\n //Create array for salt\n byte[] salt = new byte[16];\n //Get a random salt\n sr.nextBytes(salt);\n //return salt\n return salt;\n }", "public String generateSalt()\r\n\t{\r\n\t\tfinal Random r = new SecureRandom();\r\n\t\tbyte[] byteSalt = new byte[32];\r\n\t\tr.nextBytes(byteSalt);\r\n\t\tsalt = DatatypeConverter.printBase64Binary(byteSalt);\r\n\r\n\t\treturn salt;\r\n\t}", "public static String hashPassword(String userPassword, String salt) {\n String result = null;\n try {\n MessageDigest md = MessageDigest.getInstance(\"SHA-256\");\n md.update((userPassword + salt).getBytes());\n byte[] bytesResult = md.digest();\n result = String.format(\"%064x\", new BigInteger(1, bytesResult));\n } catch (NoSuchAlgorithmException ex) {\n\n }\n return result;\n }", "public String getPassword();", "public String getPassword();", "Password getPsw();", "private static String getSalt() throws NoSuchAlgorithmException, NoSuchProviderException {\n String salt = null;\n\n SecureRandom sr = SecureRandom.getInstance(\"SHA1PRNG\");\n byte[] bytes = new byte[16];\n //Get a random salt\n sr.nextBytes(bytes);\n\n StringBuilder sb = new StringBuilder();\n for(int i=0; i< bytes.length ;i++)\n {\n sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\n }\n //Get salt in hex format\n salt = sb.toString();\n\n return salt;\n }", "private static byte[] generateSalt() {\n byte[] salt = new byte[Constants.CIPHER_SALT_LENGTH];\n SecureRandom rand = new SecureRandom();\n rand.nextBytes(salt);\n return salt;\n }", "private byte[] scryptDeriveKey(byte[] password, byte[] salt) {\n byte[] key = new byte[32];\n Stodium.checkStatus(Sodium.crypto_pwhash_scryptsalsa208sha256_ll(password, password.length, salt, salt.length, 512, 256, 1, key, key.length));\n return key;\n }", "public void setSalt(String salt) {\n this.salt = salt;\n }", "private static String saltedSha256(String password, String salt) throws Exception {\n\t\treturn sha256(password + salt);\n\t}", "@Override\n\tpublic byte[] getSalt(String username) throws NoSuchAlgorithmException {\n\t\tSecureRandom sr = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\t// Create array for salt\n\t\tbyte[] salt = username.getBytes();\n\t\tif (salt.length < 16) {\n\t\t\tbyte[] temp = new byte[16];\n\n\t\t\tfor (int i = 0; i < salt.length; i++) {\n\t\t\t\ttemp[i] = salt[i];\n\t\t\t}\n\t\t\tsalt = temp;\n\t\t}\n\t\t// Get a random salt\n\t\tsr.nextBytes(salt);\n\t\t// return salt\n\t\treturn salt;\n\t}", "private static byte[] getSalt() throws NoSuchAlgorithmException {\n\n SecureRandom sr = SecureRandom.getInstance(\"SHA1PRNG\");\n byte[] salt = new byte[16];\n sr.nextBytes(salt);\n return salt;\n }", "public String getPassword() {\r\n \t\treturn properties.getProperty(KEY_PASSWORD);\r\n \t}", "public static String getDynamicSalt() {\n\t\treturn RandomStringUtils.randomAlphanumeric(8);\n\t}", "public final byte[] getEncryptedPassword(String password, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException \n\t{\n\t\tString algorithm = \"PBKDF2WithHmacSHA1\";\n\t\t//SH1 generate 160 bit hashes, so here is what makes sense.\n\t\tint derivedKeyLength = 160;\n\t\tint iteration = 20000;\n\t\tKeySpec spec = new PBEKeySpec(password.toCharArray(),salt, iteration, derivedKeyLength);\n\t\tSecretKeyFactory f = SecretKeyFactory.getInstance(algorithm);\n\t\treturn f.generateSecret(spec).getEncoded();\n\t}", "public static String getHash(String password, String salt) throws NoSuchAlgorithmException {\n MessageDigest md = MessageDigest.getInstance(\"SHA-512\");\n\n String topSecret = salt + password + salt;\n\n byte[] bytes = md.digest(topSecret.getBytes());\n\n return getHex(bytes);\n }", "public static String getNewSalt() {\n // Don't use Random!\n SecureRandom random = null;\n try {\n random = SecureRandom.getInstance(\"SHA1PRNG\");\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n\n // NIST recommends minimum 4 bytes. We use 8.\n byte[] salt = new byte[8];\n random.nextBytes(salt);\n return Base64.getEncoder().encodeToString(salt);\n }", "public static String encryptPassword(String password, byte[] salt) throws Exception {\n String encryptedPassword = generateStrongPassword(password, salt);\n return encryptedPassword;\n }", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "@Override\r\n\tpublic String hashFunction(String saltedPass) throws NoSuchAlgorithmException\r\n\t{\r\n\t\tMessageDigest digest = MessageDigest.getInstance(\"SHA-256\");\r\n\t\tbyte[] byteHash = digest.digest(saltedPass.getBytes(StandardCharsets.UTF_8));\r\n\t\thash = DatatypeConverter.printBase64Binary(byteHash);\r\n\t\treturn hash;\r\n\t}", "public String hashPassword(String plainTextPassword);", "protected String hashPassword(String passwordToHash, String salt) {\n\t\tString hash = null;\n\t try {\n\t MessageDigest md = MessageDigest.getInstance(\"SHA-512\");\n\t md.update(salt.getBytes(\"UTF-8\"));\n\t byte[] bytes = md.digest(passwordToHash.getBytes(\"UTF-8\"));\n\t StringBuilder sb = new StringBuilder();\n\t for (int i = 0; i < bytes.length ; ++i){\n\t sb.append(Integer.toString((bytes[i] & 0xff) + 0x100, 16).substring(1));\n\t }\n\t hash = sb.toString();\n\t } \n\t catch (NoSuchAlgorithmException e){\n\t e.printStackTrace();\n\t } catch (UnsupportedEncodingException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t return hash;\n\t}", "public byte[] getHash(int iterationNb, String password, byte[] salt) throws NoSuchAlgorithmException, UnsupportedEncodingException {\n MessageDigest digest = MessageDigest.getInstance(\"SHA-1\");\n digest.reset();\n digest.update(salt);\n byte[] input = digest.digest(password.getBytes(\"UTF-8\"));\n for (int i = 0; i < iterationNb; i++) {\n digest.reset();\n input = digest.digest(input);\n }\n return input;\n }", "String hashPassword(String password);", "protected static String generateSaltString() {\n Random rng = new Random();\n byte[] saltBytes = new byte[32];\n rng.nextBytes(saltBytes);\n return bytesToString(saltBytes);\n }", "public static byte[] getEncryptedPassword(String password, byte[] salt) throws NoSuchAlgorithmException, InvalidKeySpecException {\r\n\t\tKeySpec spec = new PBEKeySpec(password.toCharArray(), salt, ITERATIONS, DERIVED_KEY_LENGTH);\r\n\t\tSecretKeyFactory f = SecretKeyFactory.getInstance(ALGORITHM);\r\n\t\treturn f.generateSecret(spec).getEncoded();\r\n\t}", "public byte[] getEncryptedPassword(String password, byte[] salt)\n\t\t\t throws NoSuchAlgorithmException, InvalidKeySpecException {\n\t\t\t String algorithm = \"PBKDF2WithHmacSHA1\";\n\t\t\t // SHA-1 generates 160 bit hashes, so that's what makes sense here\n\t\t\t int derivedKeyLength = 160;\n\t\t\t // Pick an iteration count that works for you. The NIST recommends at\n\t\t\t // least 1,000 iterations:\n\t\t\t // http://csrc.nist.gov/publications/nistpubs/800-132/nist-sp800-132.pdf\n\t\t\t // iOS 4.x reportedly uses 10,000:\n\t\t\t // http://blog.crackpassword.com/2010/09/smartphone-forensics-cracking-blackberry-backup-passwords/\n\t\t\t int iterations = 20000;\n\n\t\t\t KeySpec spec = new PBEKeySpec(password.toCharArray(), salt, iterations, derivedKeyLength);\n\n\t\t\t SecretKeyFactory f = SecretKeyFactory.getInstance(algorithm);\n\n\t\t\t return f.generateSecret(spec).getEncoded();\n\t\t\t }", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "com.google.protobuf.ByteString\n getPasswordBytes();", "public static String getSalt() throws NoSuchAlgorithmException {\n SecureRandom sr = new SecureRandom();\n //Create array for salt\n byte[] salt = new byte[128];\n //Get a random salt\n sr.nextBytes(salt);\n //return salt\n return toHex(salt);\n }", "public String encode( String password );", "public byte[] hash(char[] password, byte[] salt) {\n PBEKeySpec spec = new PBEKeySpec(password, salt, ITERATIONS, KEY_LENGTH);\n Arrays.fill(password, Character.MIN_VALUE);\n try {\n SecretKeyFactory skf = SecretKeyFactory.getInstance(\"PBKDF2WithHmacSHA1\");\n return skf.generateSecret(spec).getEncoded();\n } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {\n throw new AssertionError(\"Error while hashing a password: \" + e.getMessage(), e);\n } finally {\n spec.clearPassword();\n }\n }", "public static String hashPassword(String password){\n String salt = BCrypt.gensalt(12);\n String hashed_password = BCrypt.hashpw(password,salt);\n return hashed_password;\n }", "public byte[] generateSalt()\n\t{\n\t\tSecureRandom sr = new SecureRandom();\n\t\tbyte[] ret = new byte[256];\n\t\tsr.nextBytes(ret);\n\t\treturn ret;\n\t}", "public static String generatePass(){\r\n \r\n String password = new Random().ints(10, 33, 122).collect(StringBuilder::new,\r\n StringBuilder::appendCodePoint, StringBuilder::append)\r\n .toString();\r\n return password;\r\n\r\n }", "public static byte[] SaltHashPwd(String username, String password) throws Exception\n\t{\n\t\tbyte[] user;\n\t\tbyte[] salt = new byte[16];\n\t\t\n\t\tbyte[] passwordHash;\n\t\tbyte[] fixedLengthPasswordHash = new byte[30];\n\t\t\n\t\t//assign value to all the parameters\n\t\tByteBuffer userBytes = ByteBuffer.allocate(100);\n\t\tuserBytes.put(username.getBytes());\n\t\tuser = userBytes.array();\n\t\trd.nextBytes(salt);\n\t\n\t\t\n\t\t\n\t\tAes aes = new Aes(Utility.pwdEncryptKey);\n\t\tbyte[] saltedPwd = Utility.concat2byte(salt, password.getBytes());\t\t\n\t\tpasswordHash = aes.hmac.getmac(saltedPwd);\n\t\tfixedLengthPasswordHash = Arrays.copyOf(passwordHash, fixedLengthPasswordHash.length);\n\t\t\n//\t\tSystem.out.println(\"truncate hashpassword= \" +fixedLengthPasswordHash+ \", length= \"+ fixedLengthPasswordHash.length);\n\t\t\n\t\tbyte[] entryByte = Utility.concat3byte(user, salt, fixedLengthPasswordHash);\n\t\t\t\n\t\n//\t\tSystem.out.println(\"Before encrypt length: \"+entryByte.length);\n\t\t//System.out.println(\"Before encrypt: \"+ Utility.ByteToString(entryByte));\n\t\treturn entryByte;\n\t\t//return aes.encrypt(entryByte);\n\t\t\n\t}", "private final byte[] generateSalt() throws NoSuchAlgorithmException {\n\t\tSecureRandom random = SecureRandom.getInstance(\"SHA1PRNG\");\n\t\tbyte[] salt = new byte[8];\n\t\trandom.nextBytes(salt);\n\t\treturn salt;\n\t}", "@Override\n public com.google.protobuf.ByteString\n getSaltedHashBytes() {\n Object ref = saltedHash_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n saltedHash_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public static byte[] generateSecrets(final byte[] password, byte[] salt) {\n // generate salts\n Random random = new Random();\n random.nextBytes(salt);\n // generate secret\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"SHA-1\");\n byte[] buffer = new byte[salt.length + password.length];\n System.arraycopy(password, 0, buffer, 0, password.length);\n System.arraycopy(salt, 0, buffer, password.length, salt.length);\n return md.digest(buffer);\n } catch (NoSuchAlgorithmException e) {\n throw new Error(e);\n }\n }", "@Override\n\tpublic String getPassword() {\n\t\treturn this.senha;\n\t}", "@Override\n\tpublic String getPassword() {\n\t\treturn this.senha;\n\t}", "String getNewPassword();", "public char[] getPassword();", "public String getPassword()\r\n/* 21: */ {\r\n/* 22:38 */ return this.password;\r\n/* 23: */ }", "public String getHashPassword() { \n return this.hashPassword; \n }" ]
[ "0.77557987", "0.7746473", "0.754562", "0.74813366", "0.7350255", "0.73480695", "0.73269355", "0.73269355", "0.73269355", "0.73269355", "0.73158157", "0.7177938", "0.7174952", "0.7174952", "0.7174952", "0.7174952", "0.7174952", "0.7174952", "0.7174952", "0.7170881", "0.7153867", "0.7149997", "0.7138507", "0.71123606", "0.7111091", "0.7107266", "0.70612556", "0.70612556", "0.70612556", "0.70612556", "0.70612556", "0.70612556", "0.70612556", "0.70612556", "0.70612556", "0.699586", "0.6990471", "0.6952044", "0.6945723", "0.69226813", "0.6916827", "0.6876377", "0.6874539", "0.68417263", "0.6834294", "0.68241996", "0.68216586", "0.6814315", "0.6811433", "0.6806778", "0.6778039", "0.67756164", "0.67756164", "0.6731882", "0.67275083", "0.67119515", "0.67088115", "0.6707045", "0.6682407", "0.66707665", "0.66550523", "0.66388005", "0.66093075", "0.6609117", "0.6587049", "0.6570187", "0.6559157", "0.65580004", "0.65580004", "0.6556601", "0.65520847", "0.65457064", "0.653777", "0.6533647", "0.65300924", "0.65236497", "0.6508458", "0.65054375", "0.6495317", "0.6495317", "0.6495317", "0.6495317", "0.6495317", "0.6495317", "0.6495317", "0.6476846", "0.6468044", "0.6465771", "0.645968", "0.645508", "0.6444641", "0.6426339", "0.64052397", "0.63976514", "0.63943326", "0.639121", "0.639121", "0.6390859", "0.63759345", "0.6357037", "0.63498545" ]
0.0
-1
Defines methods that need to be implemented by validation listeners.
public interface InputValidationListener { /** * Called when the command that has been entered is illegal. * * @param reason The reason that the command is illegal */ void illegalCommand(final String reason); /** * Called when the command that has been entered is legal. * * @since 0.6 */ void legalCommand(); /** * Called when the text or command that has been entered will be wrapped onto multiple lines. * * @param count The number of lines that the text will be sent as */ void wrappedText(final int count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FormValidationListener {\n public void onValid();\n public void onInvalid(String msg);\n}", "@Override\r\n public void addValidListener(ValidListener l) {\n\r\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "@Override\n public void customValidation() {\n }", "public interface validator {\n //what are the minimum requirements\n //what we need for our methods\n\n //write down the methods/processes that are in common\n //define the methods\n\n public boolean isValid();\n public String errorMessage();\n\n\n}", "private void setValidators() {\n getUtils().addNoNumbers(getOriginTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getDestinationTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getCollectionPlaceTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getDeliveryPlaceTxt(), getValidatorTxt());\n getUtils().eurosListener(getTravelValueTxt(), getValidatorTxt());\n getUtils().eurosListener(getMoneyforDriverTxt(), getValidatorTxt());\n getUtils().eurosListener(getCustomsTxt(), getValidatorTxt());\n getUtils().eurosListener(getOtherExpensesTxt(), getValidatorTxt());\n getUtils().eurosListener(getShippingExpensesTxt(), getValidatorTxt());\n //No listenerValidator for distance because, finally it is a string\n// getUtils().distanceListener(getDistanceTxt(), getValidatorTxt());\n getUtils().dateValidator(getDateTxt(), getValidatorTxt());\n getUtils().timeListener(getArriveHourTxt(), getValidatorTxt());\n getUtils().timeListener(getExitHourTxt(), getValidatorTxt());\n getUtils().timeListener(getProvidedHourTxt(), getValidatorTxt());\n\n }", "public interface Validable {\n /**\n * @param levelOfSecurityBroken - 0,1,2,3,4 levels of security\n */\n void onValidationSuccess(int levelOfSecurityBroken);\n\n /**\n * when validation in progress, if user goes with invalid path, this method is invoked\n */\n void onValidationFailed();\n\n void onSequenceRestart();\n\n}", "public interface ValidationResponseListener {\n\n void isValid();\n}", "protected void validate() {\n // no implementation.\n }", "public interface Validator {\r\n\r\n\t/**\r\n\t * Advice que valida la modificacion de un Activo fijo\r\n\t */\r\n\tvoid validateActivoUpdate(Activo activo);\r\n\r\n\t/**\r\n\t * Advice que valida la creacion de un Activo fijo\r\n\t */\r\n\tvoid validateActivoCreate(Activo activo);\r\n\t\r\n}", "@Override\r\n public void validate() {\n\r\n }", "@Override\r\n public void validate() {\r\n }", "@Override\r\n\tprotected void validate() {\n\t}", "@Override\n\tpublic void validate() {\n\t}", "@Override\n\tpublic void validate()\n\t{\n\n\t}", "@Override\r\n\tpublic void Validate() {\n\r\n\t}", "public void validate() {}", "public interface Validatable {\r\n void validate( ) throws ValidationException;\r\n}", "public interface InvalidInputListener extends EventListener {\n /**\n * Fired when the status is updated.\n *\n * @param invalid if true we have some invalid input fields in the UI.\n */\n void statusUpdate(boolean invalid);\n}", "public interface IValidationHandler {\n\n\t/**\n\t * Returns the validation module definition\n\t * @return module definition\n\t */\n\tpublic ValidationModule getModuleDefinition();\n\n /**\n * Validates the content with given validator\n * @param inputs\n * @return\n */\n public TestStepReportType validate(List<Configuration> configurations, Map<String, DataType> inputs);\n\n}", "@Override\r\n\tpublic void validate() {\n\t\t\r\n\t}", "public interface IValidator\n{\n /**\n * \n * @return the validator bean name\n */\n String getValidatorBeanName( );\n\n /**\n * \n * @return the validator display name\n */\n String getValidatorDisplayName( );\n\n /**\n * @param control\n * The control to build model\n * @return the HTML to display\n */\n String getDisplayHtml( Control control );\n\n /**\n * \n * @return the list of available entrytype for this validator\n */\n List<String> getListAvailableEntryType( );\n\n /**\n * @param questionResponse\n * The response to control\n * @param control\n * The control to verify\n * @return boolean that indicate the validation result\n */\n boolean validate( FormQuestionResponse questionResponse, Control control );\n\n /**\n * @param questionResponse\n * The List response to control\n * @param control\n * The control to verify\n * @return boolean that indicate the validation result\n */\n boolean validate( List<FormQuestionResponse> questionResponse, Control control );\n\n /**\n * Only the content of the function should be returned. The parameter names are in FormsConstants, JS_PARAMETER_INPUT_VALUE and JS_PARAMETER_CONTROL_VALUE\n * \n * @return the javascript validation code for Conditional display control\n * \n */\n String getJavascriptValidation( );\n\n /**\n * @param control\n * The control\n * @return the control value needed for javascript\n */\n String getJavascriptControlValue( Control control );\n\n}", "public interface MessageHandler{\n\t/**\n\t * Receive notification of a recoverable error.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void error(ValidationType type, String validationName, String content);\n\t\n\t/**\n\t * Receive notification of a non-recoverable error.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void fatalError(ValidationType type, String validationName, String content);\n\n\t/**\n\t * Receive notification of a warning.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void warning(ValidationType type, String validationName, String content);\n\t\n\t/**\n\t * Receive notification of a note.\n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void note(ValidationType type, String validationName, String content);\n\t\n\t/**\n\t * Receive notification of a tip. It can be a tip for bug fix. \n\t * @param type Format of validation rules.\n\t * @param validationName Name of the validation.\n\t * @param content Content of notification. \n\t */\n\tpublic void tip(ValidationType type, String validationName, String content);\n}", "protected void validate() {\n // no op\n }", "void onValidationFailed();", "@Override\n\tpublic void validate(Object arg0, Errors arg1) {\n\n\t}", "@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}", "public DefaultValidationAnnotationHandlerRegistry() {\n\n // class annotation handlers\n registerClassHandler(new ExpressionClassValidationAnnotationHandler());\n registerClassHandler(new ExpressionsClassValidationAnnotationHandler());\n registerClassHandler(new ValidatorClassValidationAnnotationHandler());\n registerClassHandler(new ValidatorsClassValidationAnnotationHandler());\n registerClassHandler(new ValidatorReferenceClassValidationAnnotationHandler());\n\n // method annotation handlers\n registerMethodHandler(new ValidationMethodAnnotationHandler());\n\n // property annotation handlers\n registerPropertyHandler(new CascadeValidationAnnotationHandler());\n registerPropertyHandler(new EmailValidationAnnotationHandler());\n registerPropertyHandler(new DateInTheFutureValidationAnnotationHandler());\n registerPropertyHandler(new DateInThePastValidationAnnotationHandler());\n registerPropertyHandler(new LengthValidationAnnotationHandler());\n registerPropertyHandler(new NotBlankValidationAnnotationHandler());\n registerPropertyHandler(new NotEmptyValidationAnnotationHandler());\n registerPropertyHandler(new NotNullValidationAnnotationHandler());\n registerPropertyHandler(new RangeValidationAnnotationHandler());\n registerPropertyHandler(new RegExpValidationAnnotationHandler());\n registerPropertyHandler(new SizeValidationAnnotationHandler());\n registerPropertyHandler(new ExpressionPropertyValidationAnnotationHandler());\n registerPropertyHandler(new ExpressionsPropertyValidationAnnotationHandler());\n registerPropertyHandler(new ConditionReferenceValidationAnnotationHandler());\n\n if (LibraryUtils.JODA_TIME_IN_CLASSPATH) {\n registerPropertyHandler(new InstantInTheFutureValidationAnnotationHandler());\n registerPropertyHandler(new InstantInThePastValidationAnnotationHandler());\n }\n\n }", "public interface OnValidateResponseListener {\n\t\tOnValidateResponseListener STUB = new OnValidateResponseListener() {\n\t\t\t@Override\n\t\t\tpublic boolean isResponseExecuted(HttpUtils.HttpResult httpResult) {\n\t\t\t\treturn httpResult != null && httpResult.getCode() == HttpUtils.HttpResult.OK;\n\t\t\t}\n\t\t};\n\n\t\tboolean isResponseExecuted(HttpUtils.HttpResult httpResult);\n\t}", "@Override\n\tpublic void validate(Object target, Errors errors) {\n\t\t\n\t}", "public interface Editable {\n\n void createValidationPatterns();\n void setUpButtonListeners();\n}", "public interface ValidatorService {\n\n /**\n * Valiadtion\n *\n * @param ruleSetCode - rule set code (named set of services and rules)\n * Can only be null when validate object contains xml message then\n * data parser select module automatically based on namespace and root element name\n * @param target - object for check\n * @return result of validation\n */\n ValidationResult validate(String ruleSetCode, ValidateObject target);\n\n /**\n * Check that rule with business code can by run\n *\n * @param businessRuleCode\n * @param onDay -\n * @return\n */\n boolean canIRun(String businessRuleCode, LocalDate onDay);\n}", "private void setupEventListeners(){\n\t\t//Check boxes.k\n\t\tchkVisible.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setVisible(chkVisible.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkEnabled.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setEnabled(chkEnabled.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkLocked.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setLocked(chkLocked.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\tchkRequired.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\t((QuestionDef)propertiesObj).setRequired(chkRequired.getValue() == true);\n\t\t\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t\t\t}\n\t\t});\n\n\t\t//Text boxes.\n\t\ttxtDefaultValue.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tif(checkDefaultValueAgainstQuestionType()){\n\t\t\t\t\tupdateDefaultValue();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\ttxtDefaultValue.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tif(checkDefaultValueAgainstQuestionType()){\n\t\t\t\t\tupdateDefaultValue();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tWindow.alert(LocaleText.get(\"invalidDefaultValueForQuestionType\"));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtHelpText.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateHelpText();\n\t\t\t}\n\t\t});\n\t\ttxtHelpText.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateHelpText();\n\t\t\t}\n\t\t});\n\n\t\ttxtHelpText.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tint keyCode = event.getNativeKeyCode();\n\t\t\t\tif(keyCode == KeyCodes.KEY_ENTER || keyCode == KeyCodes.KEY_DOWN)\n\t\t\t\t\tcbDataType.setFocus(true);\n\t\t\t\telse if(keyCode == KeyCodes.KEY_UP){\n\t\t\t\t\ttxtText.setFocus(true);\n\t\t\t\t\ttxtText.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateBinding();\n\t\t\t}\n\t\t});\n\t\ttxtBinding.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tString s = txtBinding.getText();\n\n\t\t\t\ts = s.replace(\"%\", \"\");\n\t\t\t\ts = s.replace(\"(\", \"\");\n\t\t\t\ts = s.replace(\"!\", \"\");\n\t\t\t\ts = s.replace(\"&\", \"\");\n\t\t\t\t//s = s.replace(\".\", \"\"); //Looks like this is an allowed character in xml node names.\n\t\t\t\ts = s.replace(\"'\", \"\");\n\t\t\t\ts = s.replace(\"\\\"\", \"\");\n\t\t\t\ts = s.replace(\"$\", \"\");\n\t\t\t\ts = s.replace(\"#\", \"\");\n\n\t\t\t\ttxtBinding.setText(s);\n\t\t\t\tupdateBinding();\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tif(event.getNativeKeyCode() == KeyCodes.KEY_UP){\n\t\t\t\t\tif(cbDataType.isEnabled())\n\t\t\t\t\t\tcbDataType.setFocus(true);\n\t\t\t\t\telse{\n\t\t\t\t\t\ttxtText.setFocus(true);\n\t\t\t\t\t\ttxtText.selectAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtBinding.addKeyPressHandler(new KeyPressHandler(){\n\t\t\tpublic void onKeyPress(KeyPressEvent event) {\n\t\t\t\tif(propertiesObj instanceof PageDef){\n\t\t\t\t\tif(!Character.isDigit(event.getCharCode())){\n\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(propertiesObj instanceof FormDef || propertiesObj instanceof QuestionDef){\n\t\t\t\t\tif(((TextBox) event.getSource()).getCursorPos() == 0){\n\t\t\t\t\t\tif(!isAllowedXmlNodeNameStartChar(event.getCharCode())){\n\t\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(!isAllowedXmlNodeNameChar(event.getCharCode())){\n\t\t\t\t\t\t((TextBox) event.getSource()).cancelKey(); \n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t} //else OptionDef varname can be anything\n\t\t\t}\n\t\t});\n\n\t\ttxtText.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tString orgText = getSelObjetOriginalText();\n\t\t\t\tupdateText();\n\t\t\t\tupdateSelObjBinding(orgText);\n\t\t\t}\n\t\t});\n\t\ttxtText.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tString orgText = getSelObjetOriginalText();\n\t\t\t\tupdateText();\n\t\t\t\tupdateSelObjBinding(orgText);\n\t\t\t}\n\t\t});\n\n\t\ttxtText.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tif(event.getNativeKeyCode() == KeyCodes.KEY_ENTER || event.getNativeKeyCode() == KeyCodes.KEY_DOWN){\n\t\t\t\t\tif(txtHelpText.isEnabled())\n\t\t\t\t\t\ttxtHelpText.setFocus(true);\n\t\t\t\t\telse{\n\t\t\t\t\t\ttxtBinding.setFocus(true);\n\t\t\t\t\t\ttxtBinding.selectAll();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttxtDescTemplate.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateDescTemplate();\n\t\t\t}\n\t\t});\n\t\ttxtDescTemplate.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateDescTemplate();\n\t\t\t}\n\t\t});\n\n\t\ttxtCalculation.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateCalculation();\n\t\t\t}\n\t\t});\n\t\ttxtCalculation.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateCalculation();\n\t\t\t}\n\t\t});\n\n\t\t//Combo boxes\n\t\tcbDataType.addClickHandler(new ClickHandler(){\n\t\t\tpublic void onClick(ClickEvent event){\n\t\t\t\tupdateDataType();\n\t\t\t}\n\t\t});\n\t\tcbDataType.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateDataType();\n\t\t\t}\n\t\t});\n\t\tcbDataType.addKeyDownHandler(new KeyDownHandler(){\n\t\t\tpublic void onKeyDown(KeyDownEvent event) {\n\t\t\t\tint keyCode = event.getNativeEvent().getKeyCode();\n\t\t\t\tif(keyCode == KeyCodes.KEY_ENTER || keyCode == KeyCodes.KEY_DOWN){\n\t\t\t\t\ttxtBinding.setFocus(true);\n\t\t\t\t\ttxtBinding.selectAll();\n\t\t\t\t}\n\t\t\t\telse if(keyCode == KeyCodes.KEY_UP){\n\t\t\t\t\ttxtHelpText.setFocus(true);\n\t\t\t\t\ttxtHelpText.selectAll();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\ttxtFormKey.addChangeHandler(new ChangeHandler(){\n\t\t\tpublic void onChange(ChangeEvent event){\n\t\t\t\tupdateFormKey();\n\t\t\t}\n\t\t});\n\t\ttxtFormKey.addKeyUpHandler(new KeyUpHandler(){\n\t\t\tpublic void onKeyUp(KeyUpEvent event) {\n\t\t\t\tupdateFormKey();\n\t\t\t}\n\t\t});\n\t}", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "@Override\r\n public void removeValidListener(ValidListener l) {\n\r\n }", "public void validate() throws ValidationException {\r\n/* 522 */ Validator validator = new Validator();\r\n/* 523 */ validator.validate(this);\r\n/* */ }", "@Override\n\tpublic void validate(Object target, Errors errors) {\n\t\t\n\t\t\n\t}", "@Override\r\n protected void initializeRules(List<AbstractValidationCheck> rules) {\n\r\n }", "public interface IValidator {\n\n /**\n * Based on what is required to be validated,\n *\n * @param response The REST response returns JSONElement.\n * @return By default, return false. Implementations returns true, if this matches expectation.\n */\n default boolean checkJsonResp(JsonElement response) {\n return false;\n }\n\n /**\n * Based on what is required to be validated,\n *\n * @param object On querying the db returns an object of the required class.\n * @return By default, return false. Implementations returns true, if this matches expectation.\n */\n default boolean checkDbObj(Object object) {\n return false;\n }\n}", "@Override\n\tpublic void selfValidate() {\n\t\t\n\t}", "public ValidatorStandardSubsetBroad() {\n super();\n addErrorKey(ERROR_KEY1);\n addValidatorErrorListener(new DefaultErrorListener(), ERROR_KEY1);\n addErrorKey(ERROR_KEY2);\n addValidatorErrorListener(new DefaultErrorListener(), ERROR_KEY2); \n }", "private ValidationUtils() {}", "public void addListeners()\n {\n nameEdit.addTextChangedListener(new TextWatcher()\n {\n @Override\n public void afterTextChanged(Editable arg0)\n {\n boolean isEmpty = nameEdit.getText().toString().isEmpty();\n acceptButton.setEnabled(!isEmpty);\n }\n\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after){}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n });\n\n numStandsEdit.addTextChangedListener(new TextWatcher()\n {\n @Override\n public void afterTextChanged(Editable s)\n {\n acceptButton.setEnabled(checkNumber());\n }\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {}\n });\n }", "@Override\n\tpublic void register(EValidatorRegistrar registrar) {\n\t}", "@Override\n public void addListener(InvalidationListener listener) {\n }", "private void addListeners()\n {\n // Enable LDAP Checkbox\n addDirtyListener( enableLdapCheckbox );\n addSelectionListener( enableLdapCheckbox, enableLdapCheckboxListener );\n\n // LDAP Port Text\n addDirtyListener( ldapPortText );\n addModifyListener( ldapPortText, ldapPortTextListener );\n\n // LDAP Address Text\n addDirtyListener( ldapAddressText );\n addModifyListener( ldapAddressText, ldapAddressTextListener );\n\n // LDAP nbThreads Text\n addDirtyListener( ldapNbThreadsText );\n addModifyListener( ldapNbThreadsText, ldapNbThreadsTextListener );\n\n // LDAP BackLogSize Text\n addDirtyListener( ldapBackLogSizeText );\n addModifyListener( ldapBackLogSizeText, ldapBackLogSizeTextListener );\n\n // Enable LDAPS Checkbox\n addDirtyListener( enableLdapsCheckbox );\n addSelectionListener( enableLdapsCheckbox, enableLdapsCheckboxListener );\n\n // LDAPS Address Text\n addDirtyListener( ldapsAddressText );\n addModifyListener( ldapsAddressText, ldapsAddressTextListener );\n\n // LDAPS Port Text\n addDirtyListener( ldapsPortText );\n addModifyListener( ldapsPortText, ldapsPortTextListener );\n\n // LDAPS nbThreads Text\n addDirtyListener( ldapsNbThreadsText );\n addModifyListener( ldapsNbThreadsText, ldapsNbThreadsTextListener );\n\n // LDAPS BackLogSize Text\n addDirtyListener( ldapsBackLogSizeText );\n addModifyListener( ldapsBackLogSizeText, ldapsBackLogSizeTextListener );\n \n // Enable wantClientAuth Checkbox\n addDirtyListener( wantClientAuthCheckbox );\n addSelectionListener( wantClientAuthCheckbox, wantClientAuthListener );\n\n // Enable needClientAuth Checkbox\n addDirtyListener( needClientAuthCheckbox );\n addSelectionListener( needClientAuthCheckbox, needClientAuthListener );\n\n // Auth Mechanisms Simple Checkbox\n addDirtyListener( authMechSimpleCheckbox );\n addSelectionListener( authMechSimpleCheckbox, authMechSimpleCheckboxListener );\n\n // Auth Mechanisms GSSAPI Checkbox\n addDirtyListener( authMechGssapiCheckbox );\n addSelectionListener( authMechGssapiCheckbox, authMechGssapiCheckboxListener );\n\n // Auth Mechanisms CRAM-MD5 Checkbox\n addDirtyListener( authMechCramMd5Checkbox );\n addSelectionListener( authMechCramMd5Checkbox, authMechCramMd5CheckboxListener );\n\n // Auth Mechanisms DIGEST-MD5 Checkbox\n addDirtyListener( authMechDigestMd5Checkbox );\n addSelectionListener( authMechDigestMd5Checkbox, authMechDigestMd5CheckboxListener );\n\n // Auth Mechanisms NTLM Checkbox\n addDirtyListener( authMechNtlmCheckbox );\n addSelectionListener( authMechNtlmCheckbox, authMechNtlmCheckboxListener );\n\n // Auth Mechanisms NTLM Text\n addDirtyListener( authMechNtlmText );\n addModifyListener( authMechNtlmText, authMechNtlmTextListener );\n\n // Auth Mechanisms GSS SPNEGO Checkbox\n addDirtyListener( authMechGssSpnegoCheckbox );\n addSelectionListener( authMechGssSpnegoCheckbox, authMechGssSpnegoCheckboxListener );\n addModifyListener( authMechGssSpnegoText, authMechGssSpnegoTextListener );\n\n // Auth Mechanisms GSS SPNEGO Text\n addDirtyListener( authMechGssSpnegoText );\n addModifyListener( authMechGssSpnegoText, authMechGssSpnegoTextListener );\n\n // Keystore File Text\n addDirtyListener( keystoreFileText );\n addModifyListener( keystoreFileText, keystoreFileTextListener );\n\n // Keystore File Browse Button\n addSelectionListener( keystoreFileBrowseButton, keystoreFileBrowseButtonSelectionListener );\n\n // Password Text\n addDirtyListener( keystorePasswordText );\n addModifyListener( keystorePasswordText, keystorePasswordTextListener );\n\n // Show Password Checkbox\n addSelectionListener( showPasswordCheckbox, showPasswordCheckboxSelectionListener );\n\n // SASL Host Text\n addDirtyListener( saslHostText );\n addModifyListener( saslHostText, saslHostTextListener );\n\n // SASL Principal Text\n addDirtyListener( saslPrincipalText );\n addModifyListener( saslPrincipalText, saslPrincipalTextListener );\n\n // SASL Seach Base Dn Text\n addDirtyListener( saslSearchBaseDnText );\n addModifyListener( saslSearchBaseDnText, saslSearchBaseDnTextListener );\n\n // SASL Realms Table Viewer\n addSelectionChangedListener( saslRealmsTableViewer, saslRealmsTableViewerSelectionChangedListener );\n addDoubleClickListener( saslRealmsTableViewer, saslRealmsTableViewerDoubleClickListener );\n addSelectionListener( editSaslRealmsButton, editSaslRealmsButtonListener );\n addSelectionListener( addSaslRealmsButton, addSaslRealmsButtonListener );\n addSelectionListener( deleteSaslRealmsButton, deleteSaslRealmsButtonListener );\n\n // Max Time Limit Text\n addDirtyListener( maxTimeLimitText );\n addModifyListener( maxTimeLimitText, maxTimeLimitTextListener );\n\n // Max Size Limit Text\n addDirtyListener( maxSizeLimitText );\n addModifyListener( maxSizeLimitText, maxSizeLimitTextListener );\n\n // Max PDU Size Text\n addDirtyListener( maxPduSizeText );\n addModifyListener( maxPduSizeText, maxPduSizeTextListener );\n\n // Enable TLS Checkbox\n addDirtyListener( enableTlsCheckbox );\n addSelectionListener( enableTlsCheckbox, enableTlsCheckboxListener );\n\n // Hashing Password Checkbox\n addDirtyListener( enableServerSidePasswordHashingCheckbox );\n addSelectionListener( enableServerSidePasswordHashingCheckbox, enableServerSidePasswordHashingCheckboxListener );\n\n // Hashing Method Combo Viewer\n addDirtyListener( hashingMethodComboViewer );\n addSelectionChangedListener( hashingMethodComboViewer, hashingMethodComboViewerListener );\n\n // Advanced SSL Cipher Suites\n ciphersSuiteTableViewer.addCheckStateListener( ciphersSuiteTableViewerListener );\n\n // Advanced SSL Enabled Protocols\n // Enable sslv3 Checkbox\n addDirtyListener( sslv3Checkbox );\n addSelectionListener( sslv3Checkbox, sslv3CheckboxListener );\n\n // Enable tlsv1 Checkbox\n addDirtyListener( tlsv1_0Checkbox );\n addSelectionListener( tlsv1_0Checkbox, tlsv1_0CheckboxListener );\n\n // Enable tlsv1.1 Checkbox\n addDirtyListener( tlsv1_1Checkbox );\n addSelectionListener( tlsv1_1Checkbox, tlsv1_1CheckboxListener );\n\n // Enable tlsv1.2 Checkbox\n addDirtyListener( tlsv1_2Checkbox );\n addSelectionListener( tlsv1_2Checkbox, tlsv1_2CheckboxListener );\n\n // Replication Pinger Sleep\n addDirtyListener( replicationPingerSleepText );\n addModifyListener( replicationPingerSleepText, replicationPingerSleepTextListener );\n\n // Disk Synchronization Delay\n addDirtyListener( diskSynchronizationDelayText );\n addModifyListener( diskSynchronizationDelayText, diskSynchronizationDelayTextListener );\n }", "public abstract void validate(List<String> validationMessages);", "public interface FormValidator {\r\n\r\n /**\r\n * Performs on-the-fly validation of the form field 'name'.\r\n *\r\n * @param value This parameter receives the value that the user has typed.\r\n * @return Indicates the outcome of the validation. This is sent to the\r\n * browser.\r\n */\r\n default FormValidation doCheckArtifactId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set an ArtifactId!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckGroupId(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation.error(\"Please set a GroupId!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckVersion(@QueryParameter String value) {\r\n if (value.length() == 0)\r\n return FormValidation\r\n .error(\"Please set a Version for your artifact!\");\r\n return FormValidation.ok();\r\n }\r\n\r\n default FormValidation doCheckStagingRepository(\r\n @QueryParameter String value) {\r\n return checkURI(value);\r\n }\r\n\r\n default FormValidation doCheckReleaseRepository(\r\n @QueryParameter String value) {\r\n return checkURI(value);\r\n }\r\n\r\n /**\r\n * This method checks originally the URL if it is valid. On the way to\r\n * support tokens this behavior is build out. It will be reactivated\r\n * after a general refactoring for better token macro support.\r\n * <p>\r\n * TODO implment a URL validation which works with token macro plugin\r\n *\r\n * @param value\r\n * @return\r\n */\r\n default FormValidation checkURI(String value) {\r\n if (value.length() == 0) {\r\n return FormValidation\r\n .error(\"Please set an URL for the staging repository!\");\r\n }\r\n return FormValidation.ok();\r\n }\r\n\r\n /**\r\n * Generates LisBoxModel for available Repository systems\r\n *\r\n * @return available Promoters as ListBoxModel\r\n */\r\n default ListBoxModel doFillPromoterClassItems() {\r\n ListBoxModel promoterModel = new ListBoxModel();\r\n for (Promotor promotor : Jenkins.getInstance()\r\n .getExtensionList(Promotor.class)) {\r\n promoterModel.add(promotor.getDescriptor().getDisplayName(), promotor\r\n .getClass().getCanonicalName());\r\n }\r\n\r\n return promoterModel;\r\n }\r\n\r\n}", "void setInputVerification() {\r\n\t\tlistenerForOnlyDigitsInput(tfphone);\r\n\t\tlistenerForOnlyDigitsInput(tfIDNumber);\r\n\t\tlistenerForOnlyDigitsInput(tfCreditCard1);\r\n\t\tlistenerForOnlyDigitsInput(tfCreditCard2);\r\n\t\tlistenerForOnlyDigitsInput(tfCreditCard3);\r\n\t\tlistenerForOnlyDigitsInput(tfCreditCard4);\r\n\t}", "public interface ValidationCheck extends Configurable {\n\n /**\n * Validates the concept.\n *\n * @param concept the concept\n * @return the validation result\n */\n public ValidationResult validate(Concept concept);\n\n /**\n * Validates the descriptor.\n *\n * @param descriptor the descriptor\n * @return the validation result\n */\n public ValidationResult validate(Descriptor descriptor);\n\n /**\n * Validates the code.\n *\n * @param code the code\n * @return the validation result\n */\n public ValidationResult validate(Code code);\n\n /**\n * Validates the atom.\n *\n * @param atom the atom\n * @return the validation result\n */\n public ValidationResult validate(Atom atom);\n\n /**\n * Validates the concept merge.\n *\n * @param concept1 the concept1\n * @param concept2 the concept2\n * @return the validation result\n */\n public ValidationResult validateMerge(Concept concept1,\n Concept concept2);\n\n}", "public abstract void registerListeners();", "public interface ValidationAnnotationHandlersBundle {\n\n /**\n * Returns all associated property validation annotation handlers.\n *\n * @return All associated property validation annotation handlers.\n */\n Collection<PropertyValidationAnnotationHandler> getPropertyHandlers();\n\n /**\n * Returns all associated class validation annotation handlers.\n *\n * @return All associated class validation annotation handlers.\n */\n Collection<ClassValidationAnnotationHandler> getClassHandlers();\n \n}", "public interface VLabAnsByContragentListener\n// extends+ \n\n// extends- \n{\n /**\n * Invoked just before inserting a VLabAnsByContragentBean record into the database.\n *\n * @param pObject the VLabAnsByContragentBean that is about to be inserted\n */\n public void beforeInsert(VLabAnsByContragentBean pObject) throws SQLException;\n\n\n /**\n * Invoked just after a VLabAnsByContragentBean record is inserted in the database.\n *\n * @param pObject the VLabAnsByContragentBean that was just inserted\n */\n public void afterInsert(VLabAnsByContragentBean pObject) throws SQLException;\n\n\n /**\n * Invoked just before updating a VLabAnsByContragentBean record in the database.\n *\n * @param pObject the VLabAnsByContragentBean that is about to be updated\n */\n public void beforeUpdate(VLabAnsByContragentBean pObject) throws SQLException;\n\n\n /**\n * Invoked just after updating a VLabAnsByContragentBean record in the database.\n *\n * @param pObject the VLabAnsByContragentBean that was just updated\n */\n public void afterUpdate(VLabAnsByContragentBean pObject) throws SQLException;\n\n\n// class+ \n\n// class- \n}", "public interface RecordValidator_2_IF extends HomeHealthRecordValidatorIF{\n \n /**\n * adds a Item validator to the list of validators\n * @param itemValidator \n */\n void add(RecordItemValidatorIF itemValidator);\n\n /**\n * returns a non-mutable list of the item validator\n * @return \n */\n List<RecordItemValidatorIF> getItemValidators();\n\n /**\n * removes an item validator from this validation\n * @param itemValidator \n */\n void remove(RecordItemValidatorIF itemValidator);\n \n}", "void validate() throws ValidationException;", "public abstract boolean validate();", "public interface IValidatingView {\r\n\r\n\t/**\r\n\t * Sets the validator to the view\r\n\t * \r\n\t * @param validator\r\n\t * - validator to be set\r\n\t * @param fieldDisplayName\r\n\t * - a name of the field to be displayed in the error message\r\n\t */\r\n\tpublic void setValidator(IViewValidator validator, String fieldDisplayName);\r\n\r\n\t/**\r\n\t * Checks whether the value of the view is valid or not\r\n\t * \r\n\t * @return <b>true</b> - valid, <b>false</b> - not valid\r\n\t */\r\n\tpublic boolean isValid();\r\n\r\n\t/**\r\n\t * Shows a validation error sign if the view is not valid\r\n\t */\r\n\tpublic void flagOrUnflagValidationError(boolean validationMode);\r\n\r\n}", "public interface ValidationConstants {\n\n public int VALIDATION_FIELD_EMPTY = 1;\n public int VALIDATION_FIELD_INVALID = 2;\n\n /*** Regex ***/\n String REGEX_EMAIL_VALID = \"^[A-Z0-9a-z\\\\._%+-]+@([A-Za-z0-9-]+\\\\.)+[A-Za-z]{2,4}$\";\n\n}", "public interface IValidationHelper extends StateRestorer {\n\n\t/**\n\t * Initialization of the objects needed for the validation process.\n\t *\n\t * @throws HDIVException if there is an initialization error.\n\t */\n\tvoid init();\n\n\t/**\n\t * Checks if the values of the parameters received in the request <code>request</code> are valid. These values are valid if and only if\n\t * the noneditable parameters haven't been modified.<br>\n\t *\n\t * @param context request context\n\t * @return {@link ValidatorHelperResult} with true value If all the parameter values of the request <code>request</code> pass the the\n\t * HDIV validation. False, otherwise.\n\t * @throws HDIVException If the request doesn't pass the HDIV validation an exception is thrown explaining the cause of the error.\n\t */\n\tValidatorHelperResult validate(ValidationContext context);\n\n\t/**\n\t * It is called in the pre-processing stage of each user request.\n\t *\n\t * @param request HTTP servlet request\n\t */\n\tvoid startPage(RequestContextHolder request);\n\n\t/**\n\t * It is called in the post-processing stage of each user request.\n\t *\n\t * @param request HTTP servlet request\n\t */\n\tvoid endPage(RequestContextHolder request);\n\n\t/**\n\t * Internal Hdiv request\n\t * @param request HTTP servlet request\n\t * @param response HTTP servlet response\n\t * @return true if internal\n\t */\n\tboolean isInternal(HttpServletRequest request, HttpServletResponse response);\n\n\t/**\n\t * Find internal errors\n\t * @param t\n\t * @param target\n\t * @return\n\t */\n\tList<ValidatorError> findCustomErrors(final Throwable t, String target);\n\n\t/**\n\t * Check whether all the errors are legal\n\t * @param errors\n\t * @return\n\t */\n\tboolean areErrorsLegal(List<ValidatorError> errors);\n\n\tboolean processEditableValidationErrors(final RequestContextHolder request, final List<ValidatorError> errors);\n\n}", "public abstract void validate () throws ModelValidationException;", "@Override\r\n\tprotected void setListeners() {\n\t\t\r\n\t}", "void validate();", "void validate();", "public interface IElementValidator {\n\n /**\n * This method is called by the agency to validate a user's input on a configuration form.\n * @param toValidate The string from the user's input to the component that is to be validated\n * @return Empty string if valid, error message if not valid\n */\n String validate(String toValidate);\n}", "private void validateMethods () throws ModelValidationException\n\t\t\t{\n\t\t\t\tModel model = getModel();\n\t\t\t\tObject equalsMethod = getNonObjectMethod(keyClassName, \n\t\t\t\t\t\"equals\", Model.getEqualsArgs()); //NOI18N\n\t\t\t\tObject hashCodeMethod = getNonObjectMethod(keyClassName, \n\t\t\t\t\t\"hashCode\", Model.NO_ARGS); //NOI18N\n\n\t\t\t\t// check equals method\n\t\t\t\tif (!matchesMethod(equalsMethod, Modifier.PUBLIC,\n\t\t\t\t\t0, \"boolean\")) //NOI18N\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_equals\", //NOI18N\n\t\t\t\t\t\tkeyClassName, getClassName()));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// check hashCode method\n\t\t\t\tif (!matchesMethod(hashCodeMethod, Modifier.PUBLIC,\n\t\t\t\t\t0, \"int\")) //NOI18N\n\t\t\t\t{\n\t\t\t\t\tthrow new ModelValidationException(keyClass,\n\t\t\t\t\t\tI18NHelper.getMessage(getMessages(), \n\t\t\t\t\t\t\"util.validation.key_class_hashcode\", //NOI18N\n\t\t\t\t\t\tkeyClassName, getClassName()));\n\t\t\t\t}\n\t\t\t}", "@Override\r\n\tprotected void attachListeners() {\n\t\t\r\n\t}", "public interface Validator\n{\n void assertEqual(Object expected, Object actual, String successMessage, String failureMessage) throws IOException;\n\n void assertNotEqual(Object expected, Object actual, String successMessage, String failureMessage) throws IOException;\n\n void assertNotEmpty(Collection collection, String successMessage, String failureMessage) throws IOException;\n\n void assertEmpty(Collection collection, String successMessage, String failureMessage) throws IOException;\n}", "public interface DevicelabtestListener\n// extends+ \n\n// extends- \n{\n /**\n * Invoked just before inserting a DevicelabtestBean record into the database.\n *\n * @param pObject the DevicelabtestBean that is about to be inserted\n */\n public void beforeInsert(DevicelabtestBean pObject) throws SQLException;\n\n\n /**\n * Invoked just after a DevicelabtestBean record is inserted in the database.\n *\n * @param pObject the DevicelabtestBean that was just inserted\n */\n public void afterInsert(DevicelabtestBean pObject) throws SQLException;\n\n\n /**\n * Invoked just before updating a DevicelabtestBean record in the database.\n *\n * @param pObject the DevicelabtestBean that is about to be updated\n */\n public void beforeUpdate(DevicelabtestBean pObject) throws SQLException;\n\n\n /**\n * Invoked just after updating a DevicelabtestBean record in the database.\n *\n * @param pObject the DevicelabtestBean that was just updated\n */\n public void afterUpdate(DevicelabtestBean pObject) throws SQLException;\n\n\n// class+ \n\n// class- \n}", "public interface Validateable {\n\n Validator validator = Validation.buildDefaultValidatorFactory().getValidator();\n\n default void validate(Validateable v) throws BeanValidationException {\n Set<ConstraintViolation<Validateable>> constraintViolations = validator.validate(v);\n if (constraintViolations.size() != 0) {\n StringBuilder sb = new StringBuilder();\n constraintViolations.forEach(cons -> sb.append(cons.getPropertyPath()).append(cons.getMessage()).append(','));\n throw new BeanValidationException(sb.toString());\n }\n }\n\n void validate();\n}", "public interface Listener {}", "@Override\n\tprotected void validate(Controller c) {\n\n\t}", "public interface ErrorListener {\n void unexpectedType(String description);\n\n interface DeletionTaskErrorListener {\n void deletingNonExistingTask();\n }\n\n interface DeletionActionErrorListener {\n void deletingUnavailableAction();\n }\n\n interface DeletionInputErrorListener {\n void deletingUnavailableInput();\n }\n\n interface AdditionErrorListener {\n void addingTaskWithUnavailableInput(String inputName);\n }\n}", "public interface Validate {\n public abstract void validate(String s) throws InvalidException;\n}", "public interface RoomstatusListener\n// extends+ \n\n// extends- \n\n{\n /**\n * Invoked just before inserting a RoomstatusBean record into the database.\n *\n * @param pObject the RoomstatusBean that is about to be inserted\n */\n public void beforeInsert(RoomstatusBean pObject) throws SQLException;\n\n\n /**\n * Invoked just after a RoomstatusBean record is inserted in the database.\n *\n * @param pObject the RoomstatusBean that was just inserted\n */\n public void afterInsert(RoomstatusBean pObject) throws SQLException;\n\n\n /**\n * Invoked just before updating a RoomstatusBean record in the database.\n *\n * @param pObject the RoomstatusBean that is about to be updated\n */\n public void beforeUpdate(RoomstatusBean pObject) throws SQLException;\n\n\n /**\n * Invoked just after updating a RoomstatusBean record in the database.\n *\n * @param pObject the RoomstatusBean that was just updated\n */\n public void afterUpdate(RoomstatusBean pObject) throws SQLException;\n\n\n// class+ \n\n// class- \n\n}", "public interface IValidator {\n\n\tvoid validate(Version version);\n\t\n\tboolean matchProblems(Problem validationErrorA, Problem validationErrorB);\n\t\n\tEObject getContextElement(Problem validationError);\n}", "void addValidator(IValidator validator);", "public interface Listener {\n}", "public interface Listener {\n}", "public interface MoppetConstraint<EventType> {\n\n /**\n * checks if the requirements to validate this constraint are satisfied which means e.g. the event happened on a certain component and the system is in a certainstate\n *\n * @return true if valdiation can occur\n */\n public boolean check(EventType event);\n\n /**\n * validate this constraint. which means that code is executed that checks a constraint and corrects it if possible\n *\n * @param event\n */\n public void repair(EventType event);\n}", "private FunctionParametersValidator() {}", "public interface IRegModel extends BaseModel {\n void sendValidateRequest(ValidateRequest validateRequest, OnRequestResponse<ValidateResponse> onRequestResponse);\n\n void sendRegRequest(RegRequest regRequest, OnRequestResponse<RegResponse> onRequestResponse);\n\n void sendValiadateConfirmRequest(RegRequest regRequest, OnRequestResponse<ValidateResponse> onRequestResponse);\n}", "public abstract void\n bypassValidation_();", "protected abstract boolean isValidate();", "void registerListeners();", "public interface Validation {\n\n\tboolean isValidTrade(TradeDetail tradeDetail) throws TradeStoreException;\n\n}", "@Override\r\n public boolean validate() {\n return true;\r\n }", "public void setListener(JFXTextField field, int type) {\n if (type == 1) {\n NumberValidator numValidator = new NumberValidator();\n santa_List.add(numValidator);\n field.getValidators().add(numValidator);\n numValidator.setMessage(\"Enter a number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 2) {\n RegexValidator regexValidator = new RegexValidator();\n santa_List.add(regexValidator);\n regexValidator.setRegexPattern(\"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$\");\n field.getValidators().add(regexValidator);\n regexValidator.setMessage(\"Enter your name!\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 3) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\".+\\\\@.+\\\\..+\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid email\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 4) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\D?(\\\\d{3})\\\\D?\\\\D?(\\\\d{3})\\\\D?(\\\\d{4})$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid phone number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 5) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\d{2}$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter the last two digits of the year\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 6) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^[0-9]+(\\\\.[0-9][0-9]*)?$\"); // Doesn't account for decimals\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid pH\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 7) {\n RegexValidator validRepId = new RegexValidator();\n santa_List.add(validRepId);\n validRepId.setRegexPattern(\"^[a-zA-Z0-9]{0,16}$\"); // Doesn't account for decimals\n field.getValidators().add(validRepId);\n validRepId.setMessage(\"Enter a valid rep id\");\n }\n if (type == 8) {\n RegexValidator validSerial = new RegexValidator();\n santa_List.add(validSerial);\n validSerial.setRegexPattern(\"^\\\\d{4}$\");\n field.getValidators().add(validSerial);\n validSerial.setMessage(\"The serial number must be at most four digits\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n\n field.focusedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if (!newValue) {\n field.validate();\n\n boolean t = true;\n for (ValidatorBase vb : santa_List) {\n t = t && !vb.getHasErrors();\n// System.out.println(vb.getHasErrors());\n }\n\n if (t) {\n// System.out.println(\"Fields has no errors\");\n SendApp.setOpacity(1);\n SendApp.setDisable(false);\n } else {\n// System.out.println(\"Fields has errors\");\n SendApp.setDisable(true);\n SendApp.setOpacity(0.5);\n\n }\n }\n }\n });\n }", "void calculateValidationRequirement() {\n this.elementRequiringJSR303Validation = Util.hasValidation(this.type);\n\n // Check for JSR 303 or @OnValidate annotations in default group\n if (Util.requiresDefaultValidation(this.type)) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any simple index uniqueness constraints\n if (!this.uniqueConstraintFields.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n\n // Check for any composite index uniqueness constraints\n if (!this.uniqueConstraintCompositeIndexes.isEmpty()) {\n this.requiresDefaultValidation = true;\n return;\n }\n }", "public static interface _cls9\n{\n\n public abstract void onEbayError(List list);\n\n public abstract void onRemindersError();\n\n public abstract void updateMsgRemindersCounts(UserActivitySummary useractivitysummary);\n}", "protected void installListeners() {\n\n\t}", "@Override\n\tpublic void validation() throws EditorException\n\t{\n\t}", "public interface OnVerificationCodeListener {\n\n void onSuccess();\n\n void onEmptyContent();\n}", "protected void installListeners() {\n }", "protected void installListeners() {\n }", "protected void setupListeners() {\n\t\t\n\t\tloginBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\tSession session = theController.validateUser(usernameField.getText(), passwordField.getText());\n\t\t\t\tif(session != null) {\n\t\t\t\t\ttheController.login();\n\t\t\t\t} else {\n\t\t\t\t\tlblInvalid.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnRegister.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.register();\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnGuide.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent click) {\n\t\t\t\ttheController.viewGuide();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "public interface NDCRequestValidator<N>\n{\n\t/**\n\t * Validate a generic ndcRequest through a list of validators\n\t *\n\t * @param ndcRequest\n\t * \t\tthe NDC Request object that needs to be validated\n\t * @param errorsType\n\t * \t\tthe errors in the validation process\n\t */\n\tvoid validate(N ndcRequest, ErrorsType errorsType);\n\n\t/**\n\t * Creates an error object base on the information provided by the validator\n\t *\n\t * @param errorsType\n\t * \t\tthe object containing a list of errors\n\t * @param shortText\n\t * \t\tthe error short description\n\t */\n\tdefault void addError(final ErrorsType errorsType, final String shortText)\n\t{\n\t\tfinal ErrorType errorType = new ErrorType();\n\t\tif (StringUtils.length(shortText) > NdcwebservicesConstants.SHORT_TEXT_MAX_CHARACTERS)\n\t\t{\n\t\t\terrorType.setShortText(shortText.substring(0, NdcwebservicesConstants.SHORT_TEXT_MAX_CHARACTERS - 1));\n\t\t}\n\t\telse\n\t\t{\n\t\t\terrorType.setShortText(shortText);\n\t\t}\n\t\terrorsType.getError().add(errorType);\n\t}\n\n\t/**\n\t * Gets sanitize error message.\n\t *\n\t * @param error\n\t * \t\tthe error\n\t *\n\t * @return the sanitize error message\n\t */\n\tdefault String getSanitizeErrorMessage(final String error)\n\t{\n\t\treturn error.substring(error.indexOf(':') + 1);\n\t}\n}", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "public interface Validator {\n\n void validate(Entity entity) throws CommonException;\n}", "@Pointcut(\"target(scriptsengine.uploadengine.validations.interfaces.IWBValidator)\")\n\tpublic void WBValidatorInterface()\n\t{\n\n\t}" ]
[ "0.73677987", "0.72633225", "0.70616156", "0.70616156", "0.70616156", "0.68897194", "0.6715001", "0.6685925", "0.6682062", "0.6661237", "0.65978986", "0.6562766", "0.644559", "0.64082235", "0.6403", "0.63862526", "0.62932384", "0.6280052", "0.6266532", "0.6233911", "0.62299144", "0.62276375", "0.6196598", "0.61821514", "0.61678576", "0.6151735", "0.61342263", "0.6096165", "0.60878444", "0.607956", "0.6066224", "0.60129106", "0.6003376", "0.59974605", "0.5993742", "0.59873194", "0.59808666", "0.5979392", "0.5977792", "0.59645194", "0.593322", "0.59293777", "0.5924713", "0.59168565", "0.59043556", "0.5894193", "0.5889462", "0.58482", "0.5847056", "0.5838678", "0.58269846", "0.58263373", "0.58197266", "0.5810106", "0.5803469", "0.5799426", "0.5783368", "0.5782908", "0.5780464", "0.5762281", "0.5746743", "0.57398725", "0.57348347", "0.57348347", "0.57211816", "0.571157", "0.56963795", "0.56948197", "0.5683671", "0.56726265", "0.5668281", "0.5651191", "0.56354195", "0.56345475", "0.56325895", "0.5624453", "0.56231844", "0.5620674", "0.5620674", "0.56171083", "0.5611962", "0.5610469", "0.56076866", "0.56069314", "0.5599021", "0.5598139", "0.55923015", "0.5589566", "0.5586263", "0.5583861", "0.5573201", "0.5572825", "0.5566537", "0.5561486", "0.5561486", "0.5555676", "0.55535734", "0.55493605", "0.55368644", "0.55350864" ]
0.67771465
6
Called when the command that has been entered is illegal.
void illegalCommand(final String reason);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void invalidInput() {\n\t\tout.println(\"Command not recognized. Please try again.\");\n\t}", "public static void handleInvalidCommandException() {\n System.out.println(\"\\tSorry sir, I do not recognise this command.\");\n Help.execute();\n Duke.jarvis.printDivider();\n }", "protected void handleOther(final boolean invalidCmd) {\r\n\t\t// do nothing\r\n\t}", "@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }", "@Override\r\n public void playGame() {\r\n printInvalidCommandMessage();\r\n }", "@Override\r\n public void mainGameLoop() {\r\n printInvalidCommandMessage();\r\n }", "public static void printErrorForInvalidCommand(String userInput) {\n System.out.println(\"Aw man! I am unable to \" + userInput + \" yet! Please specify a different function! :D\");\n }", "public void invalid() {\r\n\t\tSystem.out.println(\"Please enter a valid input\");\r\n\t}", "protected void onUnknownCommand(final int command) {\r\n\t\tthrow new CometException(\"Unknown command recieved from server, command: \" + command);\r\n\t}", "void legalCommand();", "public InvalidCommandException() {\n // Call the superclass with a general message for all commands\n super(\"The command given is not valid\");\n }", "public BadCommandException(String cmd){\n super(cmd);\n }", "@Override\n public void do_command(String option) throws IllegalArgumentException {\n if (!option.equals(\"Me\")) {\n throw new IllegalArgumentException(\"Invalid command. Try again!\");\n }\n }", "void invalid() {\n\t\tSystem.out.println(\"falsche Eingabe...\");\n\t}", "public InvalidCommandException(String command) {\n super(command + \" is not a valid command\");\n }", "UnknownCommand(String bogusCommand)\n {\n this.bogusCommand = bogusCommand; \n }", "private void processCommand()\n {\n String vInput = this.aEntryField.getText();\n this.aEntryField.setText(\"\");\n\n this.aEngine.interpretCommand( vInput );\n }", "private CommandResult executeInvalidCommand(Command userCommand) {\n return new CommandResult(userCommand, CommandResult.EXECUTION_FAIL, CommandResult.INVALID_COMMAND);\n }", "@Test\n public void whenClientEntersIllegalCommandThenWarningIsThrownToConsole() throws IOException {\n String cmdPrompt = \"CURRENT FOLDER: C:\\\\projects\\\\vgrigoryev\\\\chapter_010 > \";\n\n this.testClientInput(\n Joiner.on(LN).join(\n \"\",\n \"\",\n \"\",\n \"\"\n ),\n\n String.format(\"%1$s%2$sThe command is illegal%3$s%4$s%5$s\",\n cmdPrompt,\n LN,\n LN,\n cmdPrompt,\n LN),\n Joiner.on(LN).join(\n \"some illegal command\",\n \"EXIT\"\n ),\n NetFileManagerClientTest.CONSOLE_OUTPUT_STUB\n );\n }", "public InvalidCommand() {\n this.errorMessage = EMPTY_STRING;\n }", "void processGUIInput(String cmd){\n try{\n debugWriter.write(cmd);\n debugWriter.flush();\n //}\n }catch(IOException e){\n //Eat it\n e.printStackTrace();\n //throw new InvalidInteractionsException();\n }\n }", "private void invalidMove(){\n setMsgText(\"That's a invalid move\");\n playSound(WRONG_SOUND);\n }", "@Override\r\n\tpublic final void showCommandError(String command, String message) {\n\t}", "private void assertCommandFailure(String inputCommand, String expectedMessage) {\n WhatsLeft expectedWhatsLeft = new WhatsLeft(model.getWhatsLeft());\n List<ReadOnlyEvent> expectedShownList = new ArrayList<>(model.getFilteredEventList());\n assertCommandBehavior(true, inputCommand, expectedMessage, expectedWhatsLeft, expectedShownList);\n }", "public InvalidCommandException() {\n super(EXCEPTION_INVALID_COMMAND_MESSAGE);\n }", "@Override\n\tpublic void validateCommand(CommandRequest commandRequest) throws ValidationException {\n\t\tlogger.trace(\"Enter validateCommand\");\n\t\tif (commandRequest.getLineInput().length() < (currentCommand.getKey().length() + 2)) {\n\t\t\tthrow new ValidationException(\"Invalid Input\");\n\t\t}\n\t\t\n\t\tString[] inputs = commandRequest.getLineInput().split(\" \");\n\t\tif (inputs.length < 2) {\n\t\t\tthrow new ValidationException(\"Insufficient Input Command for : \" + currentCommand.name() + \n\t\t\t\tcommandRequest.getLineInput());\n\t\t}\n\t\t\n\t\tInteger leaveSlotNumber = null;\n\t\t\n\t\ttry {\n\t\t\tleaveSlotNumber = Integer.parseInt(inputs[1]);\n\t\t} catch (NumberFormatException exception) {\n\t\t\tthrow new ValidationException(\"Invalid Leave Slot Number \", exception);\n\t\t}\n\t\t\n\t\tif (leaveSlotNumber < 1) {\n\t\t\tthrow new ValidationException(\"Invalid Leave Slot Number : \" + leaveSlotNumber);\n\t\t}\n\t\n\t\tcommandRequest.setCommand(Command.LEAVE);\n\t\tcommandRequest.setDataInput(String.valueOf(leaveSlotNumber));\n\t\tlogger.trace(\"Exit validateCommand\");\n\t}", "private void handleCommandEntered(String input) {\n try {\n commandExecutor.execute(input);\n commandTextField.commitAndFlush();\n } catch (CommandException | ParseException | UnmappedPanelException e) {\n setStyleToIndicateCommandFailure();\n }\n }", "public void invalidMovePrompt() {\n\t\tinvalidPrompted = true;\n\t\tSystem.out.println(\"Invalid move. Please try again\");\n\t}", "@Override\n\tpublic void OnFailCommand() {\n\t\tSoundManage.playSound(failSound);\n\t\tsuper.OnFailCommand();\n\t}", "@Test(expected = InvalidCommandException.class)\n public void testInvalidCommand() {\n interpreterInstance.interpret(\"notacommand argumentshere\");\n }", "public EmptyCommandException() {\n super(\"Input is empty! Please enter something into the chat\");\n }", "public void illegalMove(){\r\n //Taken care of in view?\n \t//throw new RuntimeException(\"this is a illegal move\");\r\n }", "@Override\r\n public void mapshow()\r\n {\r\n printInvalidCommandMessage();\r\n }", "protected void checkCommand(String com) throws IllegalArgumentException {\n if (com.length() != PushCacheProtocol.COMMAND_LEN) {\n throw new IllegalArgumentException(\"Command \\\"\" + com + \"\\\" is wrong length\");\n }\n if (com.charAt(3) != '\\0') {\n throw new IllegalArgumentException(\"Command \\\"\" + com + \"\\\" is not null terminated\");\n }\n }", "private void extractCommand() throws IllegalCommandException {\n if (userInput.contentEquals(COMMAND_WORD_BYE)) {\n commandType = CommandType.BYE;\n } else if (userInput.startsWith(COMMAND_WORD_LIST)) {\n commandType = CommandType.LIST;\n } else if (userInput.startsWith(COMMAND_WORD_DONE)) {\n commandType = CommandType.DONE;\n } else if (userInput.startsWith(COMMAND_WORD_TODO)) {\n commandType = CommandType.TODO;\n } else if (userInput.startsWith(COMMAND_WORD_DEADLINE)) {\n commandType = CommandType.DEADLINE;\n } else if (userInput.startsWith(COMMAND_WORD_EVENT)) {\n commandType = CommandType.EVENT;\n } else if (userInput.startsWith(COMMAND_WORD_DELETE)) {\n commandType = CommandType.DELETE;\n } else if (userInput.startsWith(COMMAND_WORD_FIND)) {\n commandType = CommandType.FIND;\n } else if (userInput.contentEquals(COMMAND_WORD_HELP)) {\n commandType = CommandType.HELP;\n } else {\n throw new IllegalCommandException();\n }\n }", "public void noSuchCommand() {\n }", "@Override\r\n\tpublic String execute(String request) {\n\t\treturn response = \"The command is invalid\";\r\n\r\n\t}", "public synchronized void sendInvalid() {\r\n\t\tbeginMessage();\r\n\t\tsend(ServerConst.ANS + ServerConst.ANS_INVALID);\r\n\t\tendMessage();\r\n\t}", "public void onCooldownError(CommandEvent e);", "public String getValidCommand(String msg) {\n String enteredCmd = getCommand(msg);\n while (enteredCmd.isEmpty()||isSpecialCharacter(enteredCmd)) {\n enteredCmd = getCommand(ANSI_RED+\"Not a valid input. Please enter again\"+ANSI_RESET);\n }\n return enteredCmd;\n }", "abstract protected void cancelCommands();", "private static void exitAsInvalidInput() {\n\t\tSystem.out.println(\n\t\t\t\t\"You have entered invalid input. Exiting the system now.\");\n\t\tSystem.exit(0);\n\t}", "@RequiresLock(\"SeaLock\")\r\n protected void deponentInvalidAction(Drop invalidDeponent) {\r\n invalidate();\r\n }", "public void outOfCombat() {\n\t\tScanner OoCInput = new Scanner(System.in);\n\t\tint in = OoCInput.nextInt();\n\t\tSystem.out.println(\"It seems to be clear for a moment.\\nWhat would you like to do?\");\n\t\tSystem.out.println(\"Press 1 to move on to the next room.\\nPress 2 to scan the room for Treasures.\\nPress 3 to rest for a minute (Stamina Regen)\\nPress 4 to Drink a potion\");\n\t\t//blanket if preventing faulty input\n\t\tif (in == 1 || in == 2 || in == 3 || in == 4) {\n\t\t\tif (in == 1) {\n\t\t\t\tPlayer.moveForward();\n\t\t\t}\n\t\t\tif (in == 2) {\n\t\t\t\tPlayer.Scan();\n\t\t\t}\n\t\t\tif (in == 3) {\n\t\t\t\tPlayer.Rest();\n\t\t\t}\n\t\t\tif (in == 4) {\n\t\t\t\tPlayer.drinkPotion();\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Invalid Input. Please try again.\");\n\t\t}\n\t}", "private static void no(final Command cmd, final Session session) {\n try {\n session.execute(cmd);\n fail(\"Command was supposed to fail.\");\n } catch(final IOException ex) {\n Util.debug(ex);\n }\n }", "public static void badUsage(Command command, String message) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"bad usage\").replace(\"%command%\", message);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "@Test\n\t//Test for invalid command\n\tpublic void testForInvalidCommand() {\n\t\t\t\n\t\t//-d option present but no delimiter given\n\t\tString command1 = \"paste -d a.txt\";\n\t\t\n\t\tpasteTool = new PASTETool();\n\t\t\n\t\tString actual = pasteTool.execute(workingDirectory, command1);\n\t\tString expected = \"Invalid Command\";\n\t\t\t\n\t\tassertEquals(expected, actual);\n\t\tassertEquals(pasteTool.getStatusCode(),-1);\n\t}", "private void validCharachter() throws DisallowedCharachter {\n if (!test.equals(\"X\") && !test.equals(\"O\")) {\n throw (new DisallowedCharachter());\n }\n }", "private void manageDeniedPacket(MeetingPacket packet) {\n Console.comment(\"=> Denied packet from \" + packet.getSourceAddress()) ;\n\n if(this.callbackOnDenied != null) {\n this.callbackOnDenied.denied() ;\n }\n }", "public void testUnrecognizedCommand() throws Exception {\n CommandHandler commandHandler = new AbstractStubCommandHandler() {\n public void handleCommand(Command command, Session session, InvocationRecord invocationRecord) {\n session.sendReply(502, \"Unsupported\");\n commandHandled = true;\n }\n };\n // Register the UNSUPPORTED command handler instead of the command that will be sent. So when we\n // send the regular command, it will trigger the handling for unsupported/unrecognized commands.\n commandToRegister = CommandNames.UNSUPPORTED;\n runCommandAndVerifyOutput(commandHandler, \"502 Unsupported\");\n }", "@When(\"^user enters an invalid \\\"([^\\\"]*)\\\"$\")\n public void userEntersAnInvalid(String arg0, DataTable args) throws Throwable {\n }", "@Override\n\tpublic void onUndoNotPossible() {\n\n\t}", "public void onPermissionError(CommandEvent e);", "@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}", "private void assertCommandException(String inputCommand, String expectedMessage) {\n assertCommandFailure(inputCommand, CommandException.class, expectedMessage);\n }", "@Override\npublic boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) {\n\treturn false;\n}", "public InvalidCommandException(String message) {\n super(message);\n }", "protected boolean onExecute(String command)\n {\n return false;\n }", "public void onCmd(String cmd) \n {\n \tString split[] = cmd.split(\" \");\n \tif (split.length <= 1)\n \t{\n \t\tacm(\"No command was typed. Use \\\"help\\\" for a list of commands\");\n \t\treturn;\n \t}\n \telse\n \t{\n \t\tfor (ICommand command : commands)\n \t\t{\n \t\t\tif (command.getCommand().equalsIgnoreCase(split[1]))\n \t\t\t{\n \t\t\t\tcommand.onCmd(split);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\tacm(\"\\\"\" + split[1] + \"\\\" Unknown command. Use \\\"help\\\" for a list of commands\");\n \t}\n }", "@Override\r\n public void EditMap() throws Exception {\r\n printInvalidCommandMessage();\r\n }", "public void setInvalid();", "protected boolean processIllegalMove(String moveString, String reason){return false;}", "public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }", "@RequiresLock(\"SeaLock\")\r\n protected void dependentInvalidAction() {\r\n // by default do nothing\r\n }", "private void checkUserInput() {\n }", "public void receivedInvalidMoveMessage();", "@Override\r\n\tpublic boolean validCommand(CommandStack stack) {\r\n\t\treturn true;\r\n\t}", "private void invalidTry(){\n setButtons(false);\n setMsgText(\"There are 2 players in game, you cannot join in now.\");\n }", "private void processInput(String command) {\r\n\r\n if (command.equals(\"1\")) {\r\n displayListings();\r\n } else if (command.equals(\"2\")) {\r\n listYourCar();\r\n } else if (command.equals(\"3\")) {\r\n removeYourCar(user);\r\n } else if (command.equals(\"4\")) {\r\n checkIfWon();\r\n } else if (command.equals(\"5\")) {\r\n saveCarListings();\r\n } else if (command.equals(\"6\")) {\r\n exitApp = true;\r\n } else {\r\n System.out.println(\"Invalid selection\");\r\n }\r\n }", "private void isCommandInstance() throws SystemException {\r\n\t\tif (commandInstance != null) return;\r\n\t\tif (commandResponder != null) SystemException.softwareProblem(\"This was not a command instance. There is a bug. Either the super for the command is not well formed or it called a method it shouldn't.\");\r\n\t\tinstantiateCommand();\r\n\t}", "@Override\r\n\tpublic void command() {\n\t\tSystem.out.println(\"CommandAttack Process\");\r\n\t}", "public static void unknownPlayer(Command command, String player) {\n\t\tString str = command.getSender().getAsMention() + \",\\n\";\n\t\t\n\t\tstr += ConfigManager.getMessage(\"unknown player\").replace(\"%player%\", player);\n\t\tcommand.getChannel().sendMessage(str).complete();\n\t}", "protected void handleInvalidSelection(org.eclipse.jface.viewers.ISelection selection, org.eclipse.jface.viewers.ISelection newSelection) {\n\t}", "public InvalidCommand(String errorMessage) {\n this.errorMessage = errorMessage;\n }", "public static void handleInvalidTaskException() {\n System.out.println(\"\\tSorry sir, no such task was found in the list.\");\n Duke.jarvis.printDivider();\n }", "public void testParseCommands_Fail1() throws Exception {\r\n target = new DistributionScriptParserImpl();\r\n try {\r\n target.parseCommands(null, new DistributionScript(), LogManager.getLog(\"test_parse_commands\"));\r\n fail(\"IllegalArgumentException is expected.\");\r\n } catch (IllegalArgumentException e) {\r\n // good\r\n }\r\n }", "void issueCommand(String cmd, StringBuilder output)\n\t{\n\t\tByteArrayOutputStream ba = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(ba);\n\n\t\t// temporarily re-wire i/o to catch all output\n\t\tPrintStream oldOut = m_out;\n\t\tPrintStream oldErr = m_err;\n\n\t\tm_out = ps;\n\t\tm_err = ps;\n\t\ttry\n\t\t{\n\t\t\tsetCurrentLine(cmd);\n\t\t\tprocessLine();\n\t\t}\n\t\tcatch(AmbiguousException ae)\n\t\t{\n\t\t\t// we already put up a warning for the user\n\t\t}\n\t\tcatch(IllegalStateException ise)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"illegalStateException\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(IllegalMonitorStateException ime)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandNotValidUntilPlayerSuspended\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NoSuchElementException nse)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSuchElementException\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(SocketException se)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"socketErrorMessage\", se.getMessage()); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"problemWithConnection\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"unexpectedErrorWithStackTrace\")); //$NON-NLS-1$\n\t\t\tif (Trace.error)\n\t\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// flush the stream and then send its contents to our string buffer\n\t\tps.flush();\n\t\toutput.append( ba.toString() );\n\n\t\tm_err = oldErr;\n\t\tm_out = oldOut;\n\t}", "private void printErrorMenu() {\n System.out.println(\"Invalid input. Please check inputs and try again.\");\n }", "private void assertCommandFailure(String inputCommand, Class<? extends Throwable> expectedException,\n String expectedMessage) {\n Model expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\n assertCommandFailure(inputCommand, expectedException, expectedMessage, expectedModel);\n }", "private Token scanIllegalCharacter() {\n buffer.add(c);\n Token tok = new Token(buffer.toString(), TokenType.ILLEGAL, new Pair<>(in.line(), in.pos()));\n buffer.flush();\n c = in.read();\n return tok;\n }", "protected boolean ValidateCommand()\n {\n //Create a new ArrayList object and add the valid commands\n ArrayList<String> validCommands = new ArrayList<>();\n validCommands.add(\"^\");\n validCommands.add(\"$\");\n validCommands.add(\"-\");\n validCommands.add(\"+\");\n validCommands.add(\"a\");\n validCommands.add(\"t\");\n validCommands.add(\"d\");\n validCommands.add(\"l\");\n validCommands.add(\"n\");\n validCommands.add(\"p\");\n validCommands.add(\"q\");\n validCommands.add(\"w\");\n validCommands.add(\"x\");\n validCommands.add(\"=\");\n validCommands.add(\"#\");\n validCommands.add(\"c\");\n validCommands.add(\"v\");\n validCommands.add(\"s\");\n validCommands.add(\"b\");\n \n //Check if the inserted command is valid\n return validCommands.contains(this.Command);\n }", "public void handleCommand(String command);", "private void setStyleToIndicateCommandFailure() {\n //override style and disable syntax highlighting\n commandTextField.overrideStyle(ERROR_STYLE_CLASS);\n }", "public void InvalidMove();", "private void processCommand(String command) {\n if (command.equals(\"1\")) {\n insertItem();\n } else if (command.equals(\"2\")) {\n removeItem();\n } else if (command.equals(\"3\")) {\n viewList();\n } else if (command.equals(\"4\")) {\n saveToDoList();\n } else if (command.equals(\"5\")) {\n loadToDoList();\n } else {\n System.out.println(\"Selection not valid...\");\n }\n }", "public void disableSuggestionsAndSyntaxHighlightingFor(String command) {\n commandTextField.removeSupport(command);\n }", "public void missingInput() throws BadDescriptionException {\n //check 1\n if (!current_state.containsAll(next_state)) {\n throw new BadDescriptionException();\n }\n }", "public void check_not_in_allowed_statement(boolean on){\r\n this.e_not_in_allowed_statement = on;\r\n }", "public void onCommand(Session session) {\n /**\n * VRFY is not safe.\n */\n String responseString = \"502 VRFY command is disabled\";\n session.writeResponse(responseString);\n }", "public InvalidOptionChoice(String message) { super(message); }", "public static void invalidSetCommandPrinter() {\n System.out.println(line);\n System.out.println(INVALID_FORMAT_MSG);\n System.out.println(SET_FORMAT_MSG);\n System.out.println(line);\n }", "public void handleCommand() {\n\t\tif (Client.isLoggedIn() == false)\n\t\t\treturn;\n\t\t\n\t\tClientUser user = Client.getUserByName(argument);\n\t\tif (user == Client.getThisUser()) {\n\t\t\tSystem.err.println(\"Trying to remove this user? This should never happen!\");\n\t\t}\n\t\tif (user != null) {\n\t\t\tClient.removeUser(user);\n\t\t\tClient.getMainWindow().getMainChatPanel().displayInfo(user.getName() + \" has logged off!\");\n\t\t} else {\n\t\t\tSystem.err.println(\"cquit used with a non-exisitng username!\");\n\t\t}\n\t}", "@Override\n public boolean keyDown(int arg0) {\n return false;\n }", "public static String invalidInput() {\n return \"Invalid input!\";\n }", "private void processCommand(Command command) {\n // Switch construct\n System.out.println(); // formatting\n CommandWord commandWord = command.getCommandWord();\n switch (commandWord) {\n case ATTACK:\n System.out.println(\"You attack the monster!\");\n\n // calculate the damage this enemy will do\n int playerDifferenceHit = player.getMaxHit() - player.getMinHit(); // 5 - 3 = 2. \n int playerMinimumDamage = randomize.getRandomDamage(playerDifferenceHit); // returns 1-3\n int damage = playerDifferenceHit + playerMinimumDamage; // add the minimum damage, to random hit damage.\n\n System.out.println(\"You deal \" +damage+ \" damage!\");\n enemy.removeHealth(damage);\n\n enemyturn(); // let the enemy attack\n break;\n\n case EAT: // reach out to the main game again, then parse the command as usual\n int tempHealth = player.getHealth();\n eatItem(command);\n\n if (tempHealth == player.getHealth()) {\n // The player failed to eat something. Decrease the round\n round--;\n } else {\n // The player succesfully ate and recovered some HP.\n enemyturn(); // let the enemy attack\n }\n break;\n\n case INSPECT:\n System.out.println(\"You have a good look at the enemy:\");\n System.out.println(enemy.getDescription() + \" The enemy has \" + enemy.getHealth() + \" health left.\");\n System.out.println(\"You have a good look at yourself:\");\n System.out.println(\"You have \" + player.getHealth() + \" health left.\");\n round--;\n break;\n\n case RUN:\n System.out.println(\"You try to run...\");\n int canRun = randomize.getRandomNumber(4); // gets back 1 -4\n if (canRun == 4) {\n System.out.println(\".. but fail!\");\n enemyturn(); // let the enemy attack\n } else {\n System.out.println(\".. and succeed!\");\n succeededrun = true;\n }\n break;\n\n default:\n System.out.println(\"That option does not exist! Please try again.\");\n System.out.println(\"Your battle options are: Attack, Eat, Inspect, Run\");\n System.out.println(\"\");\n round--;\n break;\n }\n }", "@When(\"^I enter a invalid password$\")\n\tpublic void i_enter_a_invalid_password() throws Throwable {\n\t\tthrow new PendingException();\n\t}", "public static void userInputError(int input) //users inputs option that is out of bounds\n\t{\n\t\tSystem.out.println(\"ERROR: Selection Out Of Bounds! \\nOption \" + input + \" Does Not Exist\"); //error message\n\t\tSystem.out.println(\"Press 'Enter' To try Again\"); // prompt to try again\n\t}", "public void invalidMove() {\n JOptionPane.showMessageDialog(frame, \"Invalid move\", \"Invalid move\", JOptionPane.ERROR_MESSAGE);\n }", "private static void notPossible () {\r\n\t\tSystem.out.println(\"This operation is not possible\");\r\n\t}", "private void assertParseException(String inputCommand, String expectedMessage) {\n assertCommandFailure(inputCommand, ParseException.class, expectedMessage);\n }" ]
[ "0.78259087", "0.7397395", "0.7260397", "0.6860477", "0.6808543", "0.67020285", "0.6695715", "0.65811056", "0.6397667", "0.6386715", "0.63177484", "0.63093144", "0.6278109", "0.62395567", "0.62176645", "0.61512226", "0.6146746", "0.6145931", "0.6105964", "0.6080088", "0.60359424", "0.60211873", "0.6020173", "0.5998896", "0.598877", "0.59782594", "0.5956958", "0.59381557", "0.590358", "0.5877474", "0.5857463", "0.58571297", "0.5853593", "0.58358985", "0.58205694", "0.5811161", "0.58023995", "0.5791178", "0.57856065", "0.5760406", "0.57588685", "0.57336676", "0.57335246", "0.5729461", "0.5712144", "0.57101", "0.5654281", "0.5647957", "0.5647453", "0.5624879", "0.56221664", "0.5617118", "0.5591052", "0.5572413", "0.55597013", "0.55579484", "0.5539898", "0.5533333", "0.5533077", "0.55007625", "0.5492816", "0.54804254", "0.5478441", "0.5474556", "0.54578847", "0.54549277", "0.5439604", "0.54356426", "0.5435177", "0.5433287", "0.54217863", "0.5411293", "0.5409586", "0.5405524", "0.53954375", "0.53923523", "0.53876877", "0.5383465", "0.5371853", "0.5369445", "0.5365756", "0.5339239", "0.5337755", "0.5335263", "0.53347975", "0.53263384", "0.53255296", "0.531869", "0.53069896", "0.5304752", "0.5303916", "0.53012574", "0.52981466", "0.5282063", "0.52817947", "0.52807", "0.52746975", "0.52720964", "0.52693987", "0.52621585" ]
0.77497023
1
Called when the command that has been entered is legal.
void legalCommand();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void execute()\r\n {\r\n printInvalidCommandMessage();\r\n }", "private void processCommand()\n {\n String vInput = this.aEntryField.getText();\n this.aEntryField.setText(\"\");\n\n this.aEngine.interpretCommand( vInput );\n }", "private void handleCommandEntered(String input) {\n try {\n commandExecutor.execute(input);\n commandTextField.commitAndFlush();\n } catch (CommandException | ParseException | UnmappedPanelException e) {\n setStyleToIndicateCommandFailure();\n }\n }", "public final void invalidInput() {\n\t\tout.println(\"Command not recognized. Please try again.\");\n\t}", "public static void handleInvalidCommandException() {\n System.out.println(\"\\tSorry sir, I do not recognise this command.\");\n Help.execute();\n Duke.jarvis.printDivider();\n }", "@Override\r\n public void playGame() {\r\n printInvalidCommandMessage();\r\n }", "void processGUIInput(String cmd){\n try{\n debugWriter.write(cmd);\n debugWriter.flush();\n //}\n }catch(IOException e){\n //Eat it\n e.printStackTrace();\n //throw new InvalidInteractionsException();\n }\n }", "@Override\r\n public void mainGameLoop() {\r\n printInvalidCommandMessage();\r\n }", "protected void handleOther(final boolean invalidCmd) {\r\n\t\t// do nothing\r\n\t}", "@Override\n public void do_command(String option) throws IllegalArgumentException {\n if (!option.equals(\"Me\")) {\n throw new IllegalArgumentException(\"Invalid command. Try again!\");\n }\n }", "@Override\r\n\tpublic void command() {\n\t\tSystem.out.println(\"CommandAttack Process\");\r\n\t}", "@Override\n\tpublic void processCommand(JMVCommandEvent arg0) {\n\t}", "public void handleCommand(String command);", "private void processInput(String command) {\r\n\r\n if (command.equals(\"1\")) {\r\n displayListings();\r\n } else if (command.equals(\"2\")) {\r\n listYourCar();\r\n } else if (command.equals(\"3\")) {\r\n removeYourCar(user);\r\n } else if (command.equals(\"4\")) {\r\n checkIfWon();\r\n } else if (command.equals(\"5\")) {\r\n saveCarListings();\r\n } else if (command.equals(\"6\")) {\r\n exitApp = true;\r\n } else {\r\n System.out.println(\"Invalid selection\");\r\n }\r\n }", "public void onCmd(String cmd) \n {\n \tString split[] = cmd.split(\" \");\n \tif (split.length <= 1)\n \t{\n \t\tacm(\"No command was typed. Use \\\"help\\\" for a list of commands\");\n \t\treturn;\n \t}\n \telse\n \t{\n \t\tfor (ICommand command : commands)\n \t\t{\n \t\t\tif (command.getCommand().equalsIgnoreCase(split[1]))\n \t\t\t{\n \t\t\t\tcommand.onCmd(split);\n \t\t\t\treturn;\n \t\t\t}\n \t\t}\n \t\tacm(\"\\\"\" + split[1] + \"\\\" Unknown command. Use \\\"help\\\" for a list of commands\");\n \t}\n }", "public void analyzeCommand(String cmd)\n {\n commandEntered(cmd);\n }", "@Override\r\n\tpublic boolean validCommand(CommandStack stack) {\r\n\t\treturn true;\r\n\t}", "public void runCommand() \n throws CommandException, CommandValidationException\n { \n String domainName = null;\n try { \n setLoggerLevel();\n domainName = getDomainName();\n changeMasterPassword(domainName);\n CLILogger.getInstance().printDetailMessage(getLocalizedString(\"DomainPasswordChanged\",\n new Object[] {domainName})); \n } catch (Exception e) {\n displayExceptionMessage(e);\n }\n }", "public void commandAction(Command cmd, Displayable source) {\n if (cmd == CMD_OK) {\n midlet.textEditorDone(textField.getString());\n } else if (cmd == CMD_CANCEL) {\n midlet.textEditorDone(null);\n } else {\n // Functionality to handle for unexpected commands may be added here...\n }\n }", "@Override\n\tpublic boolean isCommandAuthorized(){\n\t\treturn true;\n\t}", "private void extractCommand() throws IllegalCommandException {\n if (userInput.contentEquals(COMMAND_WORD_BYE)) {\n commandType = CommandType.BYE;\n } else if (userInput.startsWith(COMMAND_WORD_LIST)) {\n commandType = CommandType.LIST;\n } else if (userInput.startsWith(COMMAND_WORD_DONE)) {\n commandType = CommandType.DONE;\n } else if (userInput.startsWith(COMMAND_WORD_TODO)) {\n commandType = CommandType.TODO;\n } else if (userInput.startsWith(COMMAND_WORD_DEADLINE)) {\n commandType = CommandType.DEADLINE;\n } else if (userInput.startsWith(COMMAND_WORD_EVENT)) {\n commandType = CommandType.EVENT;\n } else if (userInput.startsWith(COMMAND_WORD_DELETE)) {\n commandType = CommandType.DELETE;\n } else if (userInput.startsWith(COMMAND_WORD_FIND)) {\n commandType = CommandType.FIND;\n } else if (userInput.contentEquals(COMMAND_WORD_HELP)) {\n commandType = CommandType.HELP;\n } else {\n throw new IllegalCommandException();\n }\n }", "@Override\n public boolean acceptCommand(String command) {\n LockInterface.setLocked(getContext(),command.startsWith(\"Locked\"));\n\n return true;\n }", "@Override\n\tpublic void setCommand(String cmd) {\n\t\t\n\t}", "@Override\n\tpublic void validateCommand(CommandRequest commandRequest) throws ValidationException {\n\t\tlogger.trace(\"Enter validateCommand\");\n\t\tif (commandRequest.getLineInput().length() < (currentCommand.getKey().length() + 2)) {\n\t\t\tthrow new ValidationException(\"Invalid Input\");\n\t\t}\n\t\t\n\t\tString[] inputs = commandRequest.getLineInput().split(\" \");\n\t\tif (inputs.length < 2) {\n\t\t\tthrow new ValidationException(\"Insufficient Input Command for : \" + currentCommand.name() + \n\t\t\t\tcommandRequest.getLineInput());\n\t\t}\n\t\t\n\t\tInteger leaveSlotNumber = null;\n\t\t\n\t\ttry {\n\t\t\tleaveSlotNumber = Integer.parseInt(inputs[1]);\n\t\t} catch (NumberFormatException exception) {\n\t\t\tthrow new ValidationException(\"Invalid Leave Slot Number \", exception);\n\t\t}\n\t\t\n\t\tif (leaveSlotNumber < 1) {\n\t\t\tthrow new ValidationException(\"Invalid Leave Slot Number : \" + leaveSlotNumber);\n\t\t}\n\t\n\t\tcommandRequest.setCommand(Command.LEAVE);\n\t\tcommandRequest.setDataInput(String.valueOf(leaveSlotNumber));\n\t\tlogger.trace(\"Exit validateCommand\");\n\t}", "void illegalCommand(final String reason);", "private void processCommand(String command) {\n switch (command) {\n case \"reserve\":\n doReserve();\n break;\n case \"view\":\n doView();\n break;\n case \"deposit\":\n doDeposit();\n break;\n }\n }", "private void processCommand(String command) {\n if (command.equals(\"1\")) {\n insertItem();\n } else if (command.equals(\"2\")) {\n removeItem();\n } else if (command.equals(\"3\")) {\n viewList();\n } else if (command.equals(\"4\")) {\n saveToDoList();\n } else if (command.equals(\"5\")) {\n loadToDoList();\n } else {\n System.out.println(\"Selection not valid...\");\n }\n }", "@Override\r\n public void handleCommand(CommandEvent event) {\n if(event.getArgs().length < 2){\r\n event.reply(\"Please specify: Course Code, Course Name\");\r\n return;\r\n }\r\n // Check if Admin\r\n if(!event.getMember().hasPermission(Permission.ADMINISTRATOR)) {\r\n event.reply(\"You must me an Admin to run this command.\");\r\n event.reactFailure();\r\n return;\r\n }\r\n\r\n // TODO: Add record to 'courses'\r\n // Short Name\r\n // Long Name\r\n // Self Enroll (Default: False)\r\n\r\n\r\n }", "public void processCommand() {\n if (cam != null) {\n // No commands if no draw canvas to retrieve them from!\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_UP) || StdDraw.isKeyPressed(KeyEvent.VK_UP))\n this.setR(this.getR().minus(this.getFacingVector().times(1e8)));\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_DOWN) || StdDraw.isKeyPressed(KeyEvent.VK_DOWN)) \n this.setR(this.getR().plus(this.getFacingVector().times(1e8)));\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_LEFT) || StdDraw.isKeyPressed(KeyEvent.VK_LEFT)) \n this.rot += FOV_INCREMENT;\n if (this.cam.getDr().isKeyPressed(KeyEvent.VK_RIGHT) || StdDraw.isKeyPressed(KeyEvent.VK_RIGHT)) \n this.rot -= FOV_INCREMENT; \n }\n }", "private boolean promptCommand() {}", "protected void processCommand(String command) throws EmptyException {\n if (command.equals(\"a\")) {\n doAddTask();\n } else if (command.equals(\"r\")) {\n doRemoveTask();\n } else if (command.equals(\"p\")) {\n doViewList();\n } else if (command.equals(\"m\")) {\n //doMarkComplete();\n } else if (command.equals(\"n\")) {\n doCount();\n } else if (command.equals(\"s\")) {\n doSave();\n } else if (command.equals(\"c\")) {\n doClear();\n } else {\n System.out.println(\"Selection not valid...\");\n }\n }", "public abstract void onCommand(MessageEvent context) throws Exception;", "@Override\r\n public void execute(Command command) {\n\r\n }", "public void\n\t\t\thandleCommand(/*@ non_null */ String command);", "protected boolean ValidateCommand()\n {\n //Create a new ArrayList object and add the valid commands\n ArrayList<String> validCommands = new ArrayList<>();\n validCommands.add(\"^\");\n validCommands.add(\"$\");\n validCommands.add(\"-\");\n validCommands.add(\"+\");\n validCommands.add(\"a\");\n validCommands.add(\"t\");\n validCommands.add(\"d\");\n validCommands.add(\"l\");\n validCommands.add(\"n\");\n validCommands.add(\"p\");\n validCommands.add(\"q\");\n validCommands.add(\"w\");\n validCommands.add(\"x\");\n validCommands.add(\"=\");\n validCommands.add(\"#\");\n validCommands.add(\"c\");\n validCommands.add(\"v\");\n validCommands.add(\"s\");\n validCommands.add(\"b\");\n \n //Check if the inserted command is valid\n return validCommands.contains(this.Command);\n }", "@Override\n public void initDefaultCommand() {\n setDefaultCommand(new ValidTarget());\n }", "@FXML\n\tpublic void onProcessCommand() {\n\t\tString command = prompt.getText().trim();\n\t\tif (!command.isEmpty()) {\n\t\t\t// Print what the user entered to the screen\n\t\t\tscreen.appendText(\"> \" + command + \"\\n\");\n\t\t\tswitch (command) {\n\t\t\t\tcase \"clear\":\n\t\t\t\t\tscreen.clear();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t// Print the output of the commandName\n\t\t\t\t\tscreen.appendText(commandDispatch.processCommand(command) + \"\\n\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Clear the prompt - ready for new input\n\t\t\tprompt.clear();\n\t\t}\n\t}", "private void commandCheck() {\n\t\t//add user command\n\t\tif(cmd.getText().toLowerCase().equals(\"adduser\")) {\n\t\t\t/*\n\t\t\t * permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\t * There will be more user level commands added in version 2, like changing rename to allow a\n\t\t\t * user to rename themselves, but not any other user. Admins can still rename all users.\n\t\t\t */\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\taddUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//delete user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"deluser\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdelUser();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t};\n\t\t}\n\t\t//rename user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"rename\")) {\n\t\t\t//permissions check: if user is an admin, allow the user o chose a user to rename.\n\t\t\t//If not, allow the user to rename themselves only.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\trename(ALL);\n\t\t\t}\n\t\t\telse {\n\t\t\t\trename(SELF);\n\t\t\t}\n\t\t}\n\t\t//promote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"promote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tpromote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//demote user command\n\t\telse if(cmd.getText().toLowerCase().equals(\"demote\")) {\n\t\t\t//permissions check: if user is an admin, proceed. If not, error with a permission error.\n\t\t\tif(type.equals(\"admin\")) {\n\t\t\t\tdemote();\n\t\t\t}\n\t\t\telse {\n\t\t\t\terror(PERMISSIONS);\n\t\t\t}\n\t\t}\n\t\t//the rest of the commands are user level, no permission checking\n\t\telse if(cmd.getText().toLowerCase().equals(\"ccprocess\")) {\n\t\t\tccprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"cprocess\")) {\n\t\t\tcprocess();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opentill\")) {\n\t\t\topenTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"closetill\")) {\n\t\t\tcloseTill();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"opendrawer\")) {\n\t\t\topenDrawer();\n\t\t}\n\t\telse if(cmd.getText().toLowerCase().equals(\"sale\")) {\n\t\t\tsale();\n\t\t}\n\t\t//if the command that was entered does not match any command, return an error.\n\t\telse {\n\t\t\terror(CMD_NOT_FOUND);\n\t\t}\n\t}", "public void toCheckIn(String newCommand){\n if(this.serveOrNot == false){\n this.println(\"Please serve first!\");\n }\n else{\n String bookNumbers = newCommand.substring(7).trim();\n if (bookNumbers.length() == 0){\n this.println(\"Please enter the book number to check in!\");\n }\n else{\n String[] bookNumberList = bookNumbers.split(\",\");\n //check see if the numberlist is out of range or not, if everything is correct, within the checkNum function, we implement checkIn\n checkNum(bookNumberList, true);\n } \n //this.println(printPatronInfo());\n }\n \n }", "UnknownCommand(String bogusCommand)\n {\n this.bogusCommand = bogusCommand; \n }", "private void checkUserInput() {\n }", "@Override\r\n public void getInput() { \r\n \r\n String command;\r\n Scanner inFile = new Scanner(System.in);\r\n \r\n do {\r\n \r\n this.display();\r\n \r\n command = inFile.nextLine();\r\n command = command.trim().toUpperCase();\r\n \r\n switch (command) {\r\n case \"B\":\r\n this.helpMenuControl.displayBoardHelp();\r\n break;\r\n case \"C\":\r\n this.helpMenuControl.displayComputerPlayerHelp();\r\n break;\r\n case \"G\":\r\n this.helpMenuControl.displayGameHelp();\r\n break; \r\n case \"Q\": \r\n break;\r\n default: \r\n new Connect4Error().displayError(\"Invalid command. Please enter a valid command.\");\r\n }\r\n } while (!command.equals(\"Q\")); \r\n }", "private void askUser()\n { \n System.out.println(\"What is your command?\");\n\n String command = scanner.nextLine();\n commandPrompt(command);\n }", "private void acceptCommands() {\n\t\tScanner input = new Scanner(System.in);\n\t\tInteractiveCommandParser commandParser = new InteractiveCommandParser(\n\t\t\t\tinput, this);\n\t\tcommandParser.readCommands(); // blocking command reader\n\t}", "@Override\n public void dealWithCommand(MessageReceivedEvent event) {\n List<String> contentSplit = new ArrayList<>(Arrays.asList(event.getMessage().getContentStripped().split(\" \")));\n\n // remove the command part of the message\n contentSplit.remove(0);\n boolean isXpDesired = DetermineArguments.determineIsXpDesired(contentSplit);\n boolean isCollection = DetermineArguments.determineIsCollection(contentSplit);\n long timeToSpend = DetermineArguments.determineTimeToSpend(contentSplit, event.getTextChannel());\n int classLevel = DetermineArguments.determineClassLevel(contentSplit, event.getTextChannel());\n long amountDesired = DetermineArguments.determineAmountDesired(contentSplit, event.getTextChannel());\n\n // be done if something bad was found\n if (timeToSpend == -2 || classLevel == -2 || amountDesired == -2)\n return;\n\n if (contentSplit.isEmpty()) {\n // user did not specify what player they want\n event.getChannel().sendMessage(\"Specify what player you want to analyze.\").queue();\n return;\n }\n String username = contentSplit.get(0);\n WynncraftPlayer player = GetPlayerStats.get(username);\n if (player == null) {\n event.getChannel().sendMessage(\"Either the api is down, or '\" + username + \"' is not a player.\").queue();\n return;\n }\n\n // tell the user we're working on the answer\n event.getMessage().addReaction(\"\\uD83D\\uDEE0\").queue();\n\n List<String> classNames = new ArrayList<>();\n for (WynncraftClass playerClass : player.classes) {\n classNames.add(playerClass.name);\n }\n ChoiceArguments choiceArguments = new ChoiceArguments(\n isXpDesired, isCollection, timeToSpend, amountDesired, classLevel, classNames, player, true);\n\n\n long xpDesiredGivenPerc = 0;\n long emeraldDesiredGivenPerc = 0;\n for (WynncraftClass wynncraftClass : player.classes)\n for (Quest quest : wynncraftClass.questsNotCompleted) {\n if (quest.levelMinimum <= (classLevel == -1 ? wynncraftClass.combatLevel : classLevel)) {\n xpDesiredGivenPerc += quest.xp;\n emeraldDesiredGivenPerc += quest.emerald;\n }\n }\n xpDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n emeraldDesiredGivenPerc *= GetAnswers.DEFAULT_PERCENTAGE_AMOUNT;\n\n FinalQuestOptionsAll finalQuestOptionsAll = GetAnswers.getAllFullAnswers(player, choiceArguments);\n String spreadsheetId = SheetsWrite.writeSheet(finalQuestOptionsAll, event.getAuthor().getIdLong(), player.name, true);\n if (spreadsheetId == null) return;\n new QuestRecommendationMessagePlayer(spreadsheetId, finalQuestOptionsAll, event.getChannel(), choiceArguments, xpDesiredGivenPerc, emeraldDesiredGivenPerc);\n\n event.getMessage().removeReaction(\"\\uD83D\\uDEE0\", DiscordBot.client.getSelfUser()).queue();\n }", "protected void checkCommand(String com) throws IllegalArgumentException {\n if (com.length() != PushCacheProtocol.COMMAND_LEN) {\n throw new IllegalArgumentException(\"Command \\\"\" + com + \"\\\" is wrong length\");\n }\n if (com.charAt(3) != '\\0') {\n throw new IllegalArgumentException(\"Command \\\"\" + com + \"\\\" is not null terminated\");\n }\n }", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "@Override\n\tpublic void onCommand(CommandSender sender, String[] args) {\n\t\t\n\t}", "private void isCommandInstance() throws SystemException {\r\n\t\tif (commandInstance != null) return;\r\n\t\tif (commandResponder != null) SystemException.softwareProblem(\"This was not a command instance. There is a bug. Either the super for the command is not well formed or it called a method it shouldn't.\");\r\n\t\tinstantiateCommand();\r\n\t}", "public abstract void setCommand(String cmd);", "private Command() {\n initFields();\n }", "private static void OnSpace(Object sender, ExecutedRoutedEventArgs e)\r\n {\r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource))\r\n { \r\n return; \r\n }\r\n\r\n // If this event is our Cicero TextStore composition, we always handles through ITextStore::SetText.\r\n if (This.TextStore != null && This.TextStore.IsComposing)\r\n {\r\n return; \r\n }\r\n\r\n if (This.ImmComposition != null && This.ImmComposition.IsComposition) \r\n {\r\n return; \r\n }\r\n\r\n // Consider event handled\r\n e.Handled = true; \r\n\r\n if (This.TextView != null) \r\n { \r\n This.TextView.ThrottleBackgroundTasksForUserInput();\r\n } \r\n\r\n ScheduleInput(This, new TextInputItem(This, \" \", /*isInsertKeyToggled:*/!This._OvertypeMode));\r\n }", "private void registerCommands() {\n }", "public override void Do()\r\n { \r\n if (TextEditor.UiScope == null)\r\n { \r\n // We dont want to process the input item if the editor has already been detached from its UiScope. \r\n return;\r\n } \r\n\r\n DoTextInput(TextEditor, _text, _isInsertKeyToggled, /*acceptControlCharacters:*/false);\r\n }", "public void commandListener(KeyEvent event) {\n\t\tKeyCode code = event.getCode();\n\t\tif(code == KeyCode.ENTER) {\n\t\t\tinputBar.setText((\"entered:\" + inputBar.getText()));\n\t\t}\n\t}", "public abstract void doCommand(String command);", "@Override\n public void recordCommandExecution(String commandInputString) {\n\n }", "private static void command() {\n Scanner reader = new Scanner(System.in);\n System.out.print(\"Write action (buy, fill, take):\\n> \");\n String input = reader.next();\n\n switch (input) {\n case \"buy\" :\n buy();\n break;\n case \"fill\" :\n fill();\n break;\n case \"take\" :\n take();\n break;\n default:\n System.out.println(\"not accepted command\");\n }\n }", "private void processCommand(Command command) {\n // Switch construct\n System.out.println(); // formatting\n CommandWord commandWord = command.getCommandWord();\n switch (commandWord) {\n case ATTACK:\n System.out.println(\"You attack the monster!\");\n\n // calculate the damage this enemy will do\n int playerDifferenceHit = player.getMaxHit() - player.getMinHit(); // 5 - 3 = 2. \n int playerMinimumDamage = randomize.getRandomDamage(playerDifferenceHit); // returns 1-3\n int damage = playerDifferenceHit + playerMinimumDamage; // add the minimum damage, to random hit damage.\n\n System.out.println(\"You deal \" +damage+ \" damage!\");\n enemy.removeHealth(damage);\n\n enemyturn(); // let the enemy attack\n break;\n\n case EAT: // reach out to the main game again, then parse the command as usual\n int tempHealth = player.getHealth();\n eatItem(command);\n\n if (tempHealth == player.getHealth()) {\n // The player failed to eat something. Decrease the round\n round--;\n } else {\n // The player succesfully ate and recovered some HP.\n enemyturn(); // let the enemy attack\n }\n break;\n\n case INSPECT:\n System.out.println(\"You have a good look at the enemy:\");\n System.out.println(enemy.getDescription() + \" The enemy has \" + enemy.getHealth() + \" health left.\");\n System.out.println(\"You have a good look at yourself:\");\n System.out.println(\"You have \" + player.getHealth() + \" health left.\");\n round--;\n break;\n\n case RUN:\n System.out.println(\"You try to run...\");\n int canRun = randomize.getRandomNumber(4); // gets back 1 -4\n if (canRun == 4) {\n System.out.println(\".. but fail!\");\n enemyturn(); // let the enemy attack\n } else {\n System.out.println(\".. and succeed!\");\n succeededrun = true;\n }\n break;\n\n default:\n System.out.println(\"That option does not exist! Please try again.\");\n System.out.println(\"Your battle options are: Attack, Eat, Inspect, Run\");\n System.out.println(\"\");\n round--;\n break;\n }\n }", "private void command(){\n out.println(\"Enter command: \");\n String comInput = in.nextLine();\n\n if (comInput.toLowerCase().equals(\"vote\")) {\n voteCommand();\n }else if (comInput.toLowerCase().equals(\"trade\")){\n tradeCommand();\n }else if (comInput.toLowerCase().equals(\"next\")){\n out.println(waitPrint());\n await();\n// nextRound();\n }else if(comInput.toLowerCase().equals(\"logout\")){\n// login = false;\n logout();\n }\n }", "private void DoCommand(String command) {\n if (command.equals(\"单点校正\")) {\n CheckControlPtnCal_Dialog tempDialog = new CheckControlPtnCal_Dialog();\n tempDialog.SetCallback(this.pCallback);\n tempDialog.ShowDialog();\n }\n }", "public override void Do() \r\n {\r\n if (TextEditor.UiScope == null) \r\n { \r\n // We dont want to process the input item if the editor has already been detached from its UiScope.\r\n return; \r\n }\r\n\r\n // Delegate the work to specific handlers.\r\n switch (_key) \r\n {\r\n case Key.RightShift: \r\n // Only support RTL flow direction in case of having the installed \r\n // bidi input language.\r\n if (TextSelection.IsBidiInputLanguageInstalled() == true) \r\n {\r\n TextEditorTyping.OnFlowDirectionCommand(TextEditor, _key);\r\n }\r\n break; \r\n case Key.LeftShift:\r\n TextEditorTyping.OnFlowDirectionCommand(TextEditor, _key); \r\n break; \r\n\r\n default: \r\n Invariant.Assert(false, \"Unexpected key value!\");\r\n break;\r\n }\r\n }", "@Override\r\n public void mapshow()\r\n {\r\n printInvalidCommandMessage();\r\n }", "@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}", "public void doCommand(String input) {\r\n\r\n if (input == null || input.isEmpty()) {\r\n return;\r\n }\r\n\r\n Command command = parseCommand(input);\r\n\r\n if (!activated && !isPlaceCommand(command)) {\r\n return;\r\n }\r\n command.execute(this);\r\n }", "public void noSuchCommand() {\n }", "protected boolean onExecute(String command)\n {\n return false;\n }", "ACommand CheckCommand(String NameCommand);", "@Override\npublic boolean onCommand(CommandSender arg0, Command arg1, String arg2, String[] arg3) {\n\treturn false;\n}", "public String getValidCommand(String msg) {\n String enteredCmd = getCommand(msg);\n while (enteredCmd.isEmpty()||isSpecialCharacter(enteredCmd)) {\n enteredCmd = getCommand(ANSI_RED+\"Not a valid input. Please enter again\"+ANSI_RESET);\n }\n return enteredCmd;\n }", "public boolean processCommand(Command command) \n {\n wantToQuit = false;\n String commandWord = command.getCommandWord();\n String commandWord2 = command.getSecondWord();\n \n \n if(enemyPresent == true)\n {\n sewers.removeItem(rope); \n if(command.isUnknown()) {\n System.out.println(\"Now is not the time. How would you like to attack, with weapon, laser, fire or shrink?\");\n return false;\n } \n else if(commandWord.equals(\"fire\")){\n int enemyHealth;\n setRand(); \n int damage;\n \n damage = player.useFire();\n currentRoom.setEnemyHealth(damage);\n \n int damageDone = damage;\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with fire spell! Fire level increased!\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n else{\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n }\n \n else if(commandWord.equals(\"freeze\")){\n int enemyHealth;\n setRand(); \n int damage;\n \n damage = player.useFreeze();\n currentRoom.setEnemyHealth(damage);\n \n int damageDone = damage;\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with fire spell! Freeze level increased!\" + \"\\n\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n else{\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n } \n \n else if(commandWord.equals(\"laser\")){\n int enemyHealth;\n setRand(); \n int damage;\n \n damage = player.useLaser();\n currentRoom.setEnemyHealth(damage);\n \n int damageDone = damage;\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with fire spell! Laser level increased!\" + \"\\n\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n \n else\n {\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n }\n \n \n else if(commandWord.equals(\"weapon\")){\n \n \n int enemyHealth;\n setRand();\n \n currentRoom.setEnemyHealth(player.getAttackDamage());\n \n int damageDone = player.getAttackDamage();\n \n if(currentRoom.getEnemyHealth() < 0){\n enemyHealth = 0; \n }\n else {\n enemyHealth = currentRoom.getEnemyHealth(); \n }\n \n System.out.println(\"\\n\" + damageDone + \" damage done to enemy with \" + player.getWeaponName() + \"!\");\n \n System.out.println(\"Enemy health at \" + enemyHealth + \"!\");\n \n if(currentRoom.getEnemyHealth() > 0)\n {\n int playerHealth;\n player.setHealth(currentRoom.getEnemyDamage());\n \n checkHealth();\n \n if(player.getHealth() < 0)\n {\n playerHealth = 0;\n }\n else{\n playerHealth = player.getHealth();\n }\n \n System.out.println(currentRoom.getEnemyDamage() + \" damage taken! \" + \"Health at \" + playerHealth + \"!\" + \"\\n\");\n \n }\n }\n\n else if(commandWord.equals(\"ai\")){\n \n\n if (commandWord2.equals(\"one\"))\n {\n startAi(1);\n }\n else if (commandWord2.equals(\"two\"))\n {\n startAi(2);\n }\n else if (commandWord2.equals(\"three\"))\n {\n startAi(3);\n }\n else if (commandWord2.equals(\"four\"))\n {\n startAi(4);\n }\n else if (commandWord2.equals(\"five\"))\n {\n startAi(5);\n }\n else if (commandWord2.equals(\"six\"))\n {\n startAi(6);\n }\n else if (commandWord2.equals(\"seven\"))\n {\n startAi(7);\n }\n else if (commandWord2.equals(\"eight\"))\n {\n startAi(8);\n }\n else if (commandWord2.equals(\"nine\"))\n {\n startAi(9);\n }\n else if (commandWord2.equals(\"ten\"))\n {\n startAi(10);\n }\n else if (commandWord2.equals(\"eleven\"))\n {\n startAi(11);\n }\n else if(commandWord2.equals(\"all\"))\n {\n startAi(12);\n }\n else\n {\n System.out.println(\"I don't know what you mean...\");\n return false; \n }\n \n }\n else if(commandWord.equals(\"flee\")){\n setRand();\n if(rand <= 8)\n {\n System.out.println(\"Pity, you've been snatched by the monster and killed.\" + \"\\n\");\n alive = false;\n }\n else{\n System.out.println(\"You got away!\");\n enemyPresent = false;\n currentRoom.removeEnemy(); \n }\n }\n \n else if (commandWord.equals(\"use\")){\n useItem(command); \n }\n \n else{\n System.out.println(\"Now is not the time. How would you like to attack, with weapon, laser, fire, shrink, or flee?\"); \n }\n \n if(currentRoom.getEnemyHealth() <= 0)\n {\n System.out.println(\"Enemy vanquished!\" + \"\\n\");\n enemyPresent = false;\n currentRoom.removeEnemy();\n }\n \n \n }\n \n else\n {\n if(command.isUnknown()) {\n System.out.println(\"I don't know what you mean...\");\n return false;\n }\n if (commandWord.equals(\"help\")) {\n printHelp();\n }\n else if(commandWord.equals(\"ai\")){\n \n\n if (commandWord2.equals(\"one\"))\n {\n startAi(1);\n }\n else if (commandWord2.equals(\"two\"))\n {\n startAi(2);\n }\n else if (commandWord2.equals(\"three\"))\n {\n startAi(3);\n }\n else if (commandWord2.equals(\"four\"))\n {\n startAi(4);\n }\n else if (commandWord2.equals(\"five\"))\n {\n startAi(5);\n }\n else if (commandWord2.equals(\"six\"))\n {\n startAi(6);\n }\n else if (commandWord2.equals(\"seven\"))\n {\n startAi(7);\n }\n else if (commandWord2.equals(\"eight\"))\n {\n startAi(8);\n }\n else if (commandWord2.equals(\"nine\"))\n {\n startAi(9);\n }\n else if (commandWord2.equals(\"ten\"))\n {\n startAi(10);\n }\n else if (commandWord2.equals(\"eleven\"))\n {\n startAi(11);\n }\n else if(commandWord2.equals(\"all\"))\n {\n startAi(12);\n }\n else\n {\n System.out.println(\"I don't know what you mean...\");\n return false; \n }\n \n }\n else if (commandWord.equals(\"go\")) {\n goRoom(command);\n }\n \n else if (commandWord.equals(\"take\")){\n player.pickUpWeapon(command);\n player.pickUpItem(command);\n }\n else if(commandWord.equals(\"health\")){\n System.out.println(\"Health is at: \" + player.getHealth());\n }\n else if(commandWord.equals(\"drop\"))\n {\n player.dropWeapon(command);\n }\n else if(commandWord.equals(\"boss\"))\n {\n currentRoom = throneRoomEntrance; \n }\n else if (commandWord.equals(\"use\")){\n useItem(command); \n }\n else if (commandWord.equals(\"open\")){\n openChest(command);\n }\n else if (commandWord.equals(\"quit\")) {\n wantToQuit = quit(command);\n }\n else if (commandWord.equals(\"inventory\")){\n player.printInventory();\n }\n else if (commandWord.equals(\"name\")){\n Scanner reader = new Scanner(System.in);\n System.out.println(\"Enter a name: \");\n name = reader.next();\n player.setName(name);\n reader.close();\n System.out.println(\"New name is: \" + name);\n player.getName();\n \n }\n }\n \n return wantToQuit;\n }", "@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 }", "private static void OnQueryStatusNYI(Object target, CanExecuteRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(target); \r\n\r\n if (This == null) \r\n {\r\n return;\r\n }\r\n\r\n args.CanExecute = true;\r\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tcheckInput();\r\n\t\t\t}", "@Override\n\tpublic void handleInput() {\n\t\t\n\t}", "OwnDesire.Acting formOwnDesireWithActingCommand(DesireKey desireKey);", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tenterField.setEditable(editable);\t//将文本域置为可编辑的状态\r\n\t\t\t}", "private boolean processCommand(Command command)//Method was given\n {\n if(command.isUnknown())\n {\n System.out.println(\"I don't know what you mean...\");\n return false;\n }\n\n String commandWord = command.getCommandWord();\n if (commandWord.equals(\"help\"))\n printHelp();\n else if (commandWord.equals(\"go\"))\n goRoom(command);\n else if (commandWord.equals(\"talk\"))\n talkToCharacter(currentRoom);\n else if (commandWord.equals(\"grab\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Grab what?\");\n }\n else\n {\n grabItem(secondWord);\n }\n }\n else if (commandWord.equals(\"eat\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Eat what?\");\n }\n else\n {\n eatItem(secondWord);\n }\n }\n else if (commandWord.equals(\"inventory\")) \n player.getInventory();\n else if (commandWord.equals(\"drop\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Drop what?\");\n }\n else\n {\n dropItem(secondWord);\n }\n }\n else if (commandWord.equals(\"inspect\"))\n {\n secondWord = command.getSecondWord();\n if (secondWord == null)\n {\n System.out.println(\"Inspect what?\");\n }\n else\n {\n inspectItem(secondWord);\n }\n }\n else if (commandWord.equals(\"quit\"))\n {\n if(command.hasSecondWord())\n System.out.println(\"Quit what?\");\n else\n return true; // signal that we want to quit\n }\n else if (commandWord.equals(\"look\"))\n {\n System.out.println(currentRoom.longDescription());\n }\n return false;\n }", "public boolean isValidCommand(String cmd) {\r\n\t\tboolean isValidCmd = false;\r\n\t\tList validOtherCmd = Arrays.asList(\"MOVE\", \"LEFT\", \"RIGHT\", \"REPORT\");\r\n\r\n\t\tif (validOtherCmd.contains(cmd.toUpperCase())) {\r\n\t\t\tisValidCmd = true;\r\n\t\t}\r\n\r\n\t\tif (isValidPlaceCommand(cmd)) {\r\n\t\t\tisValidCmd = true;\r\n\t\t}\r\n\t\treturn isValidCmd;\r\n\t}", "void commandStarted(Command c);", "void parseCommand(String command){\n\t\tif(command!=null && command.length()>0){\n\t\t\tif(!subMenuFlag){\n\t\t\t\tmainMenuCommand(command);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tsubMenuCommand(command);\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"Please enter a valid command.\");\n\t\t}\n\t}", "public void takeUserInput() {\n\t\t\r\n\t}", "@Override\r\n\tpublic String execute(String request) {\n\t\treturn response = \"The command is invalid\";\r\n\r\n\t}", "public void verifyKey(VerifyEvent event)\r\n {\r\n try\r\n {\r\n // no other listeners should respond to this event\r\n event.doit = false;\r\n\r\n // the state mask indicates what modifier keys (such as CTRL) were being\r\n // pressed when the character was pressed\r\n\r\n // the digit should be pressed without any modifier keys\r\n if (event.stateMask == SWT.NONE && Character.isDigit(event.character))\r\n {\r\n // get the digit input\r\n int input = Character.getNumericValue(event.character);\r\n\r\n // get the text selection\r\n ISelection selection = editor.getSelectionProvider().getSelection();\r\n\r\n if (selection != null && selection instanceof ITextSelection)\r\n {\r\n ITextSelection textSelection = (ITextSelection) selection;\r\n\r\n IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());\r\n\r\n // if one or more characters are highlighted, do nothing\r\n if (textSelection.getLength() == 0 && document != null)\r\n {\r\n\r\n // retrieve the region describing the word containing\r\n // the caret\r\n try\r\n {\r\n \tIRegion region = DocumentHelper.getRegionExpandedBoth(document, textSelection.getOffset());\r\n\r\n // generate the insertion string\r\n String insertionText = \" \" + document.get(region.getOffset(), region.getLength());\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < input; i++)\r\n {\r\n sb.append(insertionText);\r\n }\r\n\r\n // insert the string\r\n document.replace(region.getOffset() + region.getLength(), 0, sb.toString());\r\n } catch (BadLocationException e)\r\n {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n }\r\n }\r\n }\r\n } finally\r\n {\r\n\r\n uninstall();\r\n }\r\n }", "public void processCommand(String command, MessageReceivedEvent event){\n command = command.toLowerCase();\n String[] parsing = command.split(\" \");\n switch(parsing[1]){\n case \"new\":\n validateNewCraftEntry(parsing, event);\n break;\n case \"list\":\n generateCraftingList(event);\n break;\n case \"help\":\n showHelp(event);\n break;\n case \"listall\":\n listall(event);\n break;\n case \"cancel\":\n cancelCraft(event);\n break;\n }\n }", "protected void execute() {\n\t\tif (!isSafe) {\n\t\t\tRobot.wrist.motionMagicControl();\n\t\t\t\n\t\t}\n\t}", "public static void handleCommand(Player player) {\n // Check if the player has the permission\n if(!player.hasPermission(\"advent.use\")) {\n player.sendMessage(StaticMessages.NO_COMMAND_PERMISSIONS);\n return;\n }\n\n // Return help menu\n player.sendMessage(StaticMessages.HELP_TITLE);\n player.sendMessage(StaticMessages.HELP_HELP_CMD);\n player.sendMessage(StaticMessages.HELP_INFO_CMD);\n\n if(player.hasPermission(\"advent.admin\")) {\n player.sendMessage(StaticMessages.HELP_ADMIN_CMD);\n player.sendMessage(StaticMessages.HELP_SET_CMD);\n player.sendMessage(StaticMessages.HELP_LOAD_CMD);\n }\n }", "protected void onUnknownCommand(final int command) {\r\n\t\tthrow new CometException(\"Unknown command recieved from server, command: \" + command);\r\n\t}", "@Override\r\n\tprotected void beforeSendCommands(String cmds) {\n\r\n\t}", "@Override\n\tpublic boolean onCommand(CommandSender sender, Command command, String label, String[] args)\n\t{\n\t\tif ((sender instanceof Player && !allowPlayer) || (!(sender instanceof Player) && !allowConsole))\n\t\t{\n\t\t\tsender.sendMessage(ChatUtility.getSettings().nickMessage + \"You can't do that from here\");\n\t\t\treturn false;\n\t\t}\n\t\tif (permission == null || sender.hasPermission(permission))\n\t\t\tonInvoked(sender, args);\n\t\telse\n\t\t\tsender.sendMessage(ChatUtility.getSettings().nickMessage + \"You don't have permission to do this\");\n\t\treturn true;\n\t}", "public void beforeInput() {\n }", "public void beforeInput() {\n }", "public abstract boolean doCommand() throws Exception;", "public abstract Menu execute(String commandKey);", "public InvalidCommandException() {\n // Call the superclass with a general message for all commands\n super(\"The command given is not valid\");\n }", "@Override\npublic boolean hasCommands() {\n\treturn false;\n}", "@Override\n public CommandResult execute(String userInput) throws DukeException {\n Command c;\n if (EditorManager.isActive()) {\n logger.log(Level.INFO, \"editing...\");\n c = EditorManager.edit(userInput);\n } else {\n try {\n c = Parser.parseComplexCommand(userInput);\n conversationManager.clearContext();\n } catch (ChronologyAfterPresentException | ChronologyBeforePresentException\n | ChronologyInconsistentException | ApiException e) {\n throw e;\n } catch (ParseException e) {\n c = getCommandFromConversationManager(userInput);\n }\n }\n return (CommandResult) c.execute(model);\n }", "public boolean isCommandValid(Character character, String command)\n\n {\n\n \n\n if(command.length() > 4 && isKill(command))\n { \n HandleKill(character, command);\n return true;\n }\n if(isPossess(command))\n {\n HandlePossess(character);\n return true;\n }\n if(isDontPossess(command))\n {\n HandleDontPossess(character);\n return true;\n }\n if(isJump(command))\n\n {\n\n HandleJump();\n\n return true;\n\n }\n\n if(isSit(command))\n\n {\n\n HandleSit();\n\n return true;\n\n }\n\n if(isSing(command))\n\n {\n\n HandleSing();\n\n return true;\n\n }\n\n if(isDance(command))\n\n {\n\n HandleDance();\n\n return true;\n\n }\n\n if(isDirections(command))\n\n {\n\n HandleDirections(character.currentArea);\n\n return true;\n\n }\n\n if(isExit(command))\n\n {\n\n HandleExit();\n\n return true;\n\n }\n \n if(isHeal(command))\n\n {\n\n HandleHeal(character);\n\n return true;\n\n }\n\n if(isStats(command))\n\n {\n\n HandleStats(character);\n\n return true;\n\n }\n\n \n\n switch(character.currentArea.paths)\n\n {\n\n case Constants.North:\n\n if(isNorth(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.South:\n\n if(isSouth(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.East:\n\n if(isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.West:\n\n if(isWest(command))\n\n return true;\n\n else\n\n return false;\n\n \n\n case Constants.NorthAndSouth:\n\n if(isNorth(command) || isSouth(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthAndEast:\n\n if(isNorth(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthAndWest:\n\n if(isNorth(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.SouthAndEast:\n\n if(isSouth(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.SouthAndWest:\n\n if(isSouth(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.EastAndWest:\n\n if(isEast(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n \n\n case Constants.NorthSouthAndEast:\n\n if(isNorth(command) || isSouth(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthSouthAndWest:\n\n if(isNorth(command) || isSouth(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.NorthEastAndWest:\n\n if(isNorth(command) || isEast(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n case Constants.SouthEastAndWest:\n\n if(isSouth(command) || isEast(command) || isWest(command))\n\n return true;\n\n else\n\n return false;\n\n \n\n case Constants.NorthSouthEastAndWest:\n\n if(isNorth(command) || isSouth(command) || isWest(command) || isEast(command))\n\n return true;\n\n else\n\n return false;\n\n default:\n\n break;\n\n \n\n }\n\n \n character.canPossess = false;\n return false;\n\n \n\n }", "void issueCommand(String cmd, StringBuilder output)\n\t{\n\t\tByteArrayOutputStream ba = new ByteArrayOutputStream();\n\t\tPrintStream ps = new PrintStream(ba);\n\n\t\t// temporarily re-wire i/o to catch all output\n\t\tPrintStream oldOut = m_out;\n\t\tPrintStream oldErr = m_err;\n\n\t\tm_out = ps;\n\t\tm_err = ps;\n\t\ttry\n\t\t{\n\t\t\tsetCurrentLine(cmd);\n\t\t\tprocessLine();\n\t\t}\n\t\tcatch(AmbiguousException ae)\n\t\t{\n\t\t\t// we already put up a warning for the user\n\t\t}\n\t\tcatch(IllegalStateException ise)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"illegalStateException\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(IllegalMonitorStateException ime)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"commandNotValidUntilPlayerSuspended\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(NoSuchElementException nse)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noSuchElementException\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(SocketException se)\n\t\t{\n\t\t\tMap<String, Object> args = new HashMap<String, Object>();\n\t\t\targs.put(\"socketErrorMessage\", se.getMessage()); //$NON-NLS-1$\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"problemWithConnection\", args)); //$NON-NLS-1$\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"unexpectedErrorWithStackTrace\")); //$NON-NLS-1$\n\t\t\tif (Trace.error)\n\t\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// flush the stream and then send its contents to our string buffer\n\t\tps.flush();\n\t\toutput.append( ba.toString() );\n\n\t\tm_err = oldErr;\n\t\tm_out = oldOut;\n\t}", "private void showMenu() {\n\t Scanner sc = new Scanner(System.in);\n\t Arguments argument = Arguments.INVALID;\n\t System.out.println(\"Enter command of your choice in the correct format\");\n\t do\n\t {\n\t \tString command = sc.nextLine();\n\t \tString[] arguments = command.split(\" +\");\n\t \targument = validateAndReturnType(arguments);\n\t \tswitch(argument) {\n\t\t \tcase INCREASE:\n\t\t \t\tincrease(arguments);\n\t\t \t\tbreak;\n\t\t \tcase REDUCE:\n\t\t \t\treduce(arguments);\n\t\t \t\tbreak;\n\t\t\t\tcase COUNT:\n\t\t\t\t\tcount(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase INRANGE:\n\t\t\t\t\tinRange(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase NEXT:\n\t\t\t\t\tnext(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase PREVIOUS:\n\t\t\t\t\tprevious(arguments);\n\t\t\t\t\tbreak;\n\t\t\t\tcase QUIT:\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\tcase INVALID:\n\t\t\t\t\tSystem.out.println(\"Please enter a valid command\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tSystem.out.println(\"Invalid command. Enter a command in the correct format\");\n\t \t}\n\t } while(argument != Arguments.QUIT);\n\t}" ]
[ "0.68796325", "0.67813927", "0.6566642", "0.6562761", "0.6390201", "0.6361727", "0.6343888", "0.6288626", "0.6227571", "0.62251306", "0.61901516", "0.61433315", "0.61120486", "0.61071885", "0.6082623", "0.6067267", "0.606582", "0.6052343", "0.6048262", "0.60339725", "0.60150415", "0.6009984", "0.6009486", "0.59464616", "0.5929588", "0.59258986", "0.5925869", "0.5900183", "0.58995825", "0.58809984", "0.58787596", "0.5875444", "0.58326656", "0.5825415", "0.5810624", "0.5809352", "0.58043724", "0.57845193", "0.5771971", "0.5770817", "0.5744585", "0.573263", "0.5729261", "0.57197446", "0.5714861", "0.5708257", "0.5700156", "0.5700156", "0.5700087", "0.56917167", "0.56688213", "0.5664995", "0.5662538", "0.56578624", "0.56563807", "0.5654313", "0.5648563", "0.564667", "0.56399393", "0.5631546", "0.56304675", "0.56266963", "0.5621403", "0.5619474", "0.5617397", "0.5616889", "0.5594357", "0.55825484", "0.55779684", "0.557405", "0.5560956", "0.55575013", "0.555057", "0.55485255", "0.554591", "0.55416155", "0.5541524", "0.55359983", "0.55295545", "0.5521976", "0.5519732", "0.5518493", "0.55154663", "0.55134904", "0.55123216", "0.55118746", "0.5503941", "0.55033565", "0.55010194", "0.5500871", "0.55001426", "0.55001426", "0.5493654", "0.549223", "0.54906845", "0.548811", "0.5484241", "0.54807884", "0.54798275", "0.54765886" ]
0.75816727
0
Called when the text or command that has been entered will be wrapped onto multiple lines.
void wrappedText(final int count);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void wrapText() {\r\n if (atEnd()) {\r\n setPosition(0);\r\n updateMatcher();\r\n }\r\n }", "private static boolean HandleEnterBreakForPlainText(TextEditor This)\r\n { \r\n boolean wasSelectionChanged = true;\r\n\r\n // Filter Environment.NewLine based on TextBox.MaxLength \r\n String filteredText = This._FilterText(Environment.NewLine, This.Selection);\r\n\r\n if (filteredText != String.Empty)\r\n {\r\n This.Selection.Text = Environment.NewLine;\r\n } \r\n else\r\n { \r\n // Do not update selection if Environment.NewLine can not fit in. \r\n wasSelectionChanged = false;\r\n } \r\n\r\n return wasSelectionChanged;\r\n }", "private void cmdMultiLine() {\n fMultiLineMode = true;\n }", "void rewrap() {\n if (isShowing()) {\n runWithoutMovingTheVisibleArea(new Runnable() {\n public void run() {\n revalidateLineWrappings();\n }\n });\n }\n }", "private static boolean HandleEnterBreakForRichText(TextEditor This, ICommand command)\r\n { \r\n boolean wasSelectionChanged = true;\r\n\r\n // Save current inline settings to continue on the next paragraph\r\n ((TextSelection)This.Selection).SpringloadCurrentFormatting(); \r\n\r\n if (!This.Selection.IsEmpty) \r\n { \r\n // Delete selected content\r\n This.Selection.Text = String.Empty; \r\n }\r\n\r\n if (HandleEnterBreakWhenStructuralBoundaryIsCrossed(This, command))\r\n { \r\n // We are crossing structural boundary and\r\n // selection was updated if HandleEnterBreakWhenStructuralBoundaryIsCrossed returned true \r\n } \r\n else\r\n { \r\n TextPointer newEnd = ((TextSelection)This.Selection).End;\r\n\r\n if (command == EditingCommands.EnterParagraphBreak)\r\n { \r\n if (newEnd.HasNonMergeableInlineAncestor && !TextPointerBase.IsPositionAtNonMergeableInlineBoundary(newEnd))\r\n { \r\n // Selection end is in the middle of a hyperlink element, enter is a no-op. \r\n wasSelectionChanged = false;\r\n } \r\n else\r\n {\r\n newEnd = TextRangeEdit.InsertParagraphBreak(newEnd, /*moveIntoSecondParagraph*/true);\r\n } \r\n }\r\n else if (command == EditingCommands.EnterLineBreak) \r\n { \r\n newEnd = newEnd.InsertLineBreak();\r\n } \r\n\r\n if (wasSelectionChanged)\r\n {\r\n This.Selection.Select(newEnd, newEnd); \r\n }\r\n } \r\n\r\n return wasSelectionChanged;\r\n }", "private void newline() {}", "public boolean isTextboxWrapLine()\n {\n return isWrapLine;\n }", "@Action\n public void addWrappedText() {\n if (Math.random() < .33) {\n addWrappedTextEndChar();\n } else if (Math.random() < .5) {\n addWrappedTextRandom();\n } else {\n addWrappedTextSmall();\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tenterField.setEditable(editable);\t//将文本域置为可编辑的状态\r\n\t\t\t}", "private void handleCommandEntered(String input) {\n try {\n commandExecutor.execute(input);\n commandTextField.commitAndFlush();\n } catch (CommandException | ParseException | UnmappedPanelException e) {\n setStyleToIndicateCommandFailure();\n }\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttextArea.setText(textArea.getText()+\"\\n\"+s);\n\t\t\t}", "private void wrap_long_words() {\n\t\tif ( printing_status() ) {\n\t\t\treturn;\n\t\t}\n\n\t\tString cur = _current_word.toString();\n\t\tif ( _platform_io.size_text( cur ) >= _wrap_column ) {\n\t\t\t// print out the first bit:\n\t\t\tString trim = cur;\n\t\t\twhile ( _platform_io.size_text( trim ) >= _wrap_column ) {\n\t\t\t\ttrim = trim.substring( 0, trim.length() - 1 );\n\t\t\t}\n\n\t\t\t_platform_io.print_text( trim );\n\t\t\tinc_line();\n\n\t\t\t// then truncate the rest:\n\t\t\tString tail = cur.substring( trim.length() );\n\n\t\t\tif ( _current_word.length() == _wrap_column ) // wrapped exactly?\n\t\t\t{\n\t\t\t\t_last_printed = '\\n';\n\t\t\t}\n\n\t\t\t_current_word = new StringBuffer( tail );\n\t\t}\n\t}", "private static void OnQueryStatusEnterBreak(Object sender, CanExecuteRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly) \r\n {\r\n args.ContinueRouting = true; \r\n return;\r\n }\r\n\r\n if (This.Selection.IsTableCellRange || !This.AcceptsReturn) \r\n {\r\n args.ContinueRouting = true; \r\n return; \r\n }\r\n\r\n args.CanExecute = true;\r\n }", "public void newLine() {\n\t\tcommandLine.append(\"\\n\");\n\t}", "@Override\n public void verbatim_()\n {\n getListener().onVerbatim(this.accumulatedText.toString(), true, Collections.<String, String>emptyMap());\n this.accumulatedText.setLength(0);\n this.isInVerbatim = false;\n }", "@Override\n public void keyTyped(KeyEvent e) {\n if (e.getKeyChar() == '\\n') {\n recordNotifier.changeRecord(currentRow, column, getText());\n }\n }", "public void newLine() {\n text.append(\"\\n\");\n }", "private static void OnSpace(Object sender, ExecutedRoutedEventArgs e)\r\n {\r\n TextEditor This = TextEditor._GetTextEditor(sender);\r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly || !This._IsSourceInScope(e.OriginalSource))\r\n { \r\n return; \r\n }\r\n\r\n // If this event is our Cicero TextStore composition, we always handles through ITextStore::SetText.\r\n if (This.TextStore != null && This.TextStore.IsComposing)\r\n {\r\n return; \r\n }\r\n\r\n if (This.ImmComposition != null && This.ImmComposition.IsComposition) \r\n {\r\n return; \r\n }\r\n\r\n // Consider event handled\r\n e.Handled = true; \r\n\r\n if (This.TextView != null) \r\n { \r\n This.TextView.ThrottleBackgroundTasksForUserInput();\r\n } \r\n\r\n ScheduleInput(This, new TextInputItem(This, \" \", /*isInsertKeyToggled:*/!This._OvertypeMode));\r\n }", "private void handleInput() {\n\n // Get the input string and check if its not empty\n String text = textInput.getText().toString();\n if (text.equals(\"\\n\")) {\n textInput.setText(\"\");\n return;\n }\n // remove empty line\n if (text.length() >= 2 && text.endsWith(\"\\n\")) text = text.substring(0, text.length() - 1);\n\n if (TextUtils.isEmpty(text)) return;\n textInput.setText(\"\");\n\n myGame.onInputString(text);\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}", "protected void enterText(InputHandler input)\n\t{\n\t\tif (clearCharBuffer)\n\t\t{\n\t\t\tinput.consumeLastTypedChar();\n\t\t\tclearCharBuffer = false;\n\t\t}\n\t\tchar c = input.consumeLastTypedChar();\n\t\tif (c == '\\b')\n\t\t{\n\t\t\t// Remove a character if the key was backspace\n\t\t\tremoveChar();\n\t\t}\n\t\telse if (c == '\\n')\n\t\t{\n\t\t\t// Call the enter method if the enter key was pressed\n\t\t\tenterPressed();\n\t\t}\n\t\telse if (c != 0)\n\t\t{\n\t\t\t// Add a character to the text field\n\t\t\tputChar(c);\n\t\t}\n\t}", "protected void beginEnterText()\n\t{\n\t\tdisplayingCaret = true;\n\t\ttext.appendText(\"|\");\n\t\tcaretBlinkTime = 0;\n\t\tclearCharBuffer = true;\n\t}", "public void newLine()\n {\n rst += NEW_LINE;\n }", "@Override\r\n\t\t\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\t\t\tif (event.fText.indexOf('\\r') != -1 || event.fText.indexOf('\\n') != -1) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tITypedRegion partition = event.fDocument.getPartition(event.fOffset);\r\n\t\t\t\t\t\t\tif (partition instanceof IOConsolePartition) {\r\n\t\t\t\t\t\t\t\tIOConsolePartition p = (IOConsolePartition) partition;\r\n\t\t\t\t\t\t\t\t// check if that is user input\r\n\t\t\t\t\t\t\t\tif (p.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {\r\n\t\t\t\t\t\t\t\t\tif (event.fText.length() <= 2) {\r\n\t\t\t\t\t\t\t\t\t\tfinal String inputFound = p.getString();\r\n\t\t\t\t\t\t\t\t\t\tfConsoleInterpreter.postRIDECommand(inputFound);\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (BadLocationException e) {\r\n\t\t\t\t\t\t\tLog.log(IStatus.ERROR, \"Error in RIDE console Listener.\", e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tcallback.onOneLineEdited(s.toString());\n\t\t\t}", "public override void Do()\r\n { \r\n if (TextEditor.UiScope == null)\r\n { \r\n // We dont want to process the input item if the editor has already been detached from its UiScope. \r\n return;\r\n } \r\n\r\n DoTextInput(TextEditor, _text, _isInsertKeyToggled, /*acceptControlCharacters:*/false);\r\n }", "public static void multiLineWithEscape()\r\n {\n System.out.print(\"Hello! \\nHello! \\nHello!\\n\\n\");\r\n }", "public void update() {\r\n if (parseStyle == ParseStyle.CHARACTER) {\r\n wrapText();\r\n int begin = getPosition();\r\n int end = getPosition() + 1;\r\n setCurrentItem(new TextItem(begin, end, getText().substring(begin,\r\n end)));\r\n setPosition(end);\r\n } else if (parseStyle == ParseStyle.WORD) {\r\n if (matcher == null) {\r\n return;\r\n }\r\n wrapText();\r\n boolean matchFound = findNextToken();\r\n if (matchFound) {\r\n selectCurrentToken();\r\n } else {\r\n // No match found. Go back to the beginning of the text area\r\n // and select the first token found\r\n setPosition(0);\r\n updateMatcher();\r\n // Having wrapped to the beginning select the next token, if\r\n // there is one.\r\n if (findNextToken()) {\r\n selectCurrentToken();\r\n }\r\n }\r\n }\r\n\r\n }", "private void processCommand()\n {\n String vInput = this.aEntryField.getText();\n this.aEntryField.setText(\"\");\n\n this.aEngine.interpretCommand( vInput );\n }", "public interface InputValidationListener {\n\n /**\n * Called when the command that has been entered is illegal.\n *\n * @param reason The reason that the command is illegal\n */\n void illegalCommand(final String reason);\n\n /**\n * Called when the command that has been entered is legal.\n *\n * @since 0.6\n */\n void legalCommand();\n\n /**\n * Called when the text or command that has been entered will be wrapped onto multiple lines.\n *\n * @param count The number of lines that the text will be sent as\n */\n void wrappedText(final int count);\n\n}", "@Override\n public void afterTextChanged(Editable s) {\n outputBasedOnText(s);\n }", "@Override\n protected void setMultiline(boolean multiline) {\n }", "private void lineBreak()\n\t{\n\t\tlog += String.format(\"%n\");\n\t\tfor(int i = 0; i < 25; i++)\n\t\t\tlog += \"-\";\n\t\tlog += String.format(\"%n\");\n\t}", "private void clickEnter(){\n\t\tString commandInput = textInput.getText();\n\t\tString feedback;\n\n\t\tif (commandIsClear(commandInput)) {\n\t\t\tusedCommands.addFirst(commandInput);\n\t\t\tclearLinkedDisplay();\n\n\t\t} else {\n\t\t\tif (commandInput.trim().isEmpty()) {\n\t\t\t\tfeedback = \"Empty command\";\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\tusedCommands.addFirst(commandInput);\n\t\t\t\t\tParser parser = new Parser(commandInput);\n\t\t\t\t\tTask currentTask = parser.parseInput();\n\t\t\t\t\t\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.EXIT) {\n\t\t\t\t\t\tWindow frame = findWindow(widgetPanel);\n\t\t\t\t\t\tframe.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n\t\t\t\t\t\tframe.dispose();\n\t\t\t\t\t}\n\t\t\t\t\tif (currentTask.getOpCode() == OPCODE.HELP) {\n\t\t\t\t\t\tfeedback = currentTask.getHelpMessage();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tfeedback = GUIAbstract.getLogic().executeTask(currentTask);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tfeedback = e.getMessage();\n\t\t\t\t}\n\t\t\t}\n\t\t\tlinkedDisplay.displayFeedback(feedback);\n\t\t\tfor (TasksWidget widget : linkedOptionalDisplays) {\n\t\t\t\twidget.doActionOnClick();\n\t\t\t}\n\t\t}\n\t\tclearTextInput();\n\t}", "public override void Do() \r\n {\r\n if (TextEditor.UiScope == null) \r\n { \r\n // We dont want to process the input item if the editor has already been detached from its UiScope.\r\n return; \r\n }\r\n\r\n // Delegate the work to specific handlers.\r\n switch (_key) \r\n {\r\n case Key.RightShift: \r\n // Only support RTL flow direction in case of having the installed \r\n // bidi input language.\r\n if (TextSelection.IsBidiInputLanguageInstalled() == true) \r\n {\r\n TextEditorTyping.OnFlowDirectionCommand(TextEditor, _key);\r\n }\r\n break; \r\n case Key.LeftShift:\r\n TextEditorTyping.OnFlowDirectionCommand(TextEditor, _key); \r\n break; \r\n\r\n default: \r\n Invariant.Assert(false, \"Unexpected key value!\");\r\n break;\r\n }\r\n }", "@Override\r\n\t\t\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\t\t\tif (event.fText.indexOf('\\r') != -1 || event.fText.indexOf('\\n') != -1) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tITypedRegion partition = event.fDocument.getPartition(event.fOffset);\r\n\t\t\t\t\t\t\tif (partition instanceof IOConsolePartition) {\r\n\t\t\t\t\t\t\t\tIOConsolePartition p = (IOConsolePartition) partition;\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t// check if that is user input\r\n\t\t\t\t\t\t\t\tif (p.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {\r\n\t\t\t\t\t\t\t\t\tif (event.fText.length() <= 2) {\r\n\t\t\t\t\t\t\t\t\t\tfinal String inputFound = p.getString();\r\n\t\t\t\t\t\t\t\t\t\tWriteRIDE(\"PROC_TYPE: \" + inputFound);\r\n//\t\t\t\t\t\t\t\t\t\tfor (IConsoleInputListener listener : partcipants) {\r\n//\t\t\t\t\t\t\t\t\t\t\tlistener.newLineReceived(inputFound, target);\r\n//\t\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\tLog.log(IStatus.ERROR, \"Error listen input for process console\", e);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}", "@Override\r\n\t\t\tpublic void documentAboutToBeChanged(DocumentEvent event) {\n\t\t\t\tif (event.fText.indexOf('\\r') != -1 || event.fText.indexOf('\\n') != -1) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tITypedRegion partition = event.fDocument.getPartition(event.fOffset);\r\n\t\t\t\t\t\tif (partition instanceof IOConsolePartition) {\r\n\t\t\t\t\t\t\tIOConsolePartition p = (IOConsolePartition) partition;\r\n\t\t\t\t\t\t\t// check if that is user input\r\n\t\t\t\t\t\t\tif (p.getType().equals(IOConsolePartition.INPUT_PARTITION_TYPE)) {\r\n\t\t\t\t\t\t\t\tif (event.fText.length() <= 2) {\r\n\t\t\t\t\t\t\t\t\tfinal String inputFound = p.getString();\r\n\t\t\t\t\t\t\t\t\tif (inputFound.length() > 0)\r\n\t\t\t\t\t\t\t\t\t\tfConsoleInterpreter.postSessionPrompt(inputFound);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (BadLocationException e) {\r\n\t\t\t\t\t\tLog.log(IStatus.ERROR, \"Error in RIDE console Listener.\", e);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}", "public void input_entered() {\n\t\t_last_column = 0;\n\t\t_last_line = 0;\n\t\t_last_printed = '\\n';\n\t}", "private final static void pulsaEnter() {\n\t\tSystem.out.println();\n\t\tSystem.out.println(\"\\nPulsa Enter para continuar...\");\n\t\tkb.nextLine();\n\t}", "public void commandListener(KeyEvent event) {\n\t\tKeyCode code = event.getCode();\n\t\tif(code == KeyCode.ENTER) {\n\t\t\tinputBar.setText((\"entered:\" + inputBar.getText()));\n\t\t}\n\t}", "public abstract void newLine();", "public void run() {\n\t\tsetupReadline();\n\n\t\tif (Options.cmdFilename != null) {\n\t\t\tcmdOpen(Options.cmdFilename);\n\t\t} else {\n\t\t\tLog.verbose(\"Enter `help' for a list of available commands.\");\n\t\t\t\n\t\t\tif (Options.doPLUGIN) {\n\t\t\t\tLog.verbose(\"Enter `plugins' for a list of available plugin commands.\");\n\t\t\t}\n\t\t}\n\n while (!fFinished) {\n Thread.yield();\n Log.resetOutputFlag();\n\n String line = \"\";\n\n // get current readline (may be e.g. console or file)\n fReadline = fReadlineStack.getCurrentReadline();\n try {\n if (fMultiLineMode) {\n while (true) {\n // use special prompt to emphasize multi-line input\n String oneLine = fReadline.readline(CONTINUE_PROMPT);\n // end of input or a single dot terminates the input\n // loop\n if (oneLine == null || oneLine.equals(\".\"))\n break;\n line += oneLine + Options.LINE_SEPARATOR;\n }\n fMultiLineMode = false;\n } else {\n line = fReadline.readline(PROMPT);\n }\n } catch (IOException ex) {\n Log.error(\"Cannot read line: \" + ex.getMessage());\n }\n if (line != null) {\n \tif (!fReadline.doEcho())\n \t\tUSEWriter.getInstance().protocol(line);\n \t\n processLineSafely(line);\n } else {\n fFinished = fReadlineStack.popCurrentReadline();\n setFileClosed();\n \n if (fFinished && Options.quiet)\n processLineSafely(\"check\");\n }\n }\n cmdExit();\n }", "public void treat()\n\t{\n\t\tstroked();\n\t}", "protected abstract boolean isMultiLine();", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t}", "@Override\n public void paste() {\n //if the cursor position is not at the start of a new line add the new line symbol before the pasted text\n if (!(keywordTextArea.getDocument().getLength()==0) && !keywordTextArea.getText().endsWith(\"\\n\")) {\n keywordTextArea.append(System.getProperty(\"line.separator\"));\n }\n keywordTextArea.setCaretPosition(keywordTextArea.getDocument().getLength());\n super.paste(); \n }", "public void processAddLine() {\n AppTextColorEnterDialogSingleton dialog = AppTextColorEnterDialogSingleton.getSingleton();\n\n // POP UP THE DIALOG\n dialog.show(\"Add Metro Line\", \"Enter Name and Color of the Metro Line:\", Color.web(\"#cccc33\"));\n\n // IF THE USER SAID YES\n if (dialog.getSelection()) {\n // CHANGE THE CURSOR\n Scene scene = app.getGUI().getPrimaryScene();\n scene.setCursor(Cursor.CROSSHAIR);\n \n // CHANGE THE STATE\n dataManager.setState(mmmState.ADD_LINE_MODE);\n }\n }", "private static boolean HandleEnterBreakWhenStructuralBoundaryIsCrossed(TextEditor This, ICommand command) \r\n {\r\n Invariant.Assert(This.Selection.Start is TextPointer); \r\n TextPointer position = (TextPointer)This.Selection.Start;\r\n\r\n boolean structuralBoundaryIsCrossed = true;\r\n\r\n if (TextPointerBase.IsAtRowEnd(position))\r\n { \r\n // For both ParagraphBreak and LineBreak commands, insert a new row after the current one \r\n TextRange range = ((TextSelection)This.Selection).InsertRows(+1);\r\n This.Selection.SetCaretToPosition(range.Start, LogicalDirection.Forward, /*allowStopAtLineEnd:*/false, /*allowStopNearSpace:*/false); \r\n }\r\n else if (This.Selection.IsEmpty &&\r\n (TextPointerBase.IsInEmptyListItem(position) || IsAtListItemChildStart(position, true /* emptyChildOnly */)) &&\r\n command == EditingCommands.EnterParagraphBreak) \r\n {\r\n // Unindent the list by one level. \r\n TextEditorLists.DecreaseIndentation(This); \r\n }\r\n else if (TextPointerBase.IsBeforeFirstTable(position) || \r\n TextPointerBase.IsAtBlockUIContainerStart(position))\r\n {\r\n // Calling EnsureInsertionPosition has the effect of inserting a paragraph BEFORE the table or BlockUIContainer/Table.\r\n // In this case, we do not want to move selection end to the paragraph just created. \r\n\r\n TextRangeEditTables.EnsureInsertionPosition(position); \r\n } \r\n else if (TextPointerBase.IsAtBlockUIContainerEnd(position))\r\n { \r\n // Calling EnsureInsertionPosition has the effect of inserting a paragraph AFTER the BlockUIContainer.\r\n // Update selection end to position in the following paragraph.\r\n\r\n TextPointer newEnd = TextRangeEditTables.EnsureInsertionPosition(position); \r\n This.Selection.Select(newEnd, newEnd);\r\n } \r\n else \r\n {\r\n structuralBoundaryIsCrossed = false; \r\n }\r\n\r\n return structuralBoundaryIsCrossed;\r\n }", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\n\t\t\t}", "protected void stopEnterText()\n\t{ if (text.getText().length() > 0) text.setText(text.getText().substring(0, text.getText().length() - 1)); }", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "@Override\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t\t}", "static Interaction prints(String... lines) {\n return (input, output) -> {\n for (String line : lines) {\n output.append(line).append('\\n');\n }\n };\n }", "private void makeLines(LayoutContext lc) {\n //String s = new String(text);\n boolean isLastLine = false;\n int tries = 0;\n int curWidth, wordWidth, lineStart, wordEnd, wordStart, newWidth, textLen, beg, maxM2, spaceW;\n curWidth = lineStart = wordEnd = beg = 0;\n char[] text = this.text;\n textLen = text.length;\n maxM2 = textLen - 2;\n spaceW = fm.charWidth(' ');\n boolean glue = false;\n\n do {\n beg = wordEnd;\n\n // find next word\n for (wordStart = beg;; wordStart++) {\n if (wordStart >= textLen) // trailing blanks?\n {\n if (tries > 0) // guich@tc114_81\n {\n lc.disjoin();\n addLine(lineStart, wordEnd, false, lc, false);\n tries = 0;\n }\n wordEnd = wordStart;\n isLastLine = true;\n break;\n }\n if (text[wordStart] != ' ') // is this the first non-space char?\n {\n wordEnd = wordStart;\n do {\n if (++wordEnd >= textLen) {\n isLastLine = true;\n break;\n }\n } while (text[wordEnd] != ' ' && text[wordEnd] != '/'); // loop until the next space/slash char\n // use slashes as word delimiters (useful for URL addresses).\n if (maxM2 > wordEnd && text[wordEnd] == '/' && text[wordEnd + 1] != '/') {\n wordEnd++;\n }\n break;\n }\n }\n if (!lc.atStart() && wordStart > 0 && text[wordStart - 1] == ' ') {\n wordStart--;\n }\n wordWidth = fm.stringWidth(text, wordStart, wordEnd - wordStart);\n if (curWidth == 0) {\n lineStart = beg = wordStart; // no spaces at start of a line\n newWidth = wordWidth;\n } else {\n newWidth = curWidth + wordWidth;\n }\n\n if (lc.x + newWidth <= lc.maxWidth) {\n curWidth = newWidth + spaceW;\n } else // split: line length now exceeds the maximum allowed\n {\n //if (text[wordStart] == ' ') {wordStart++; wordWidth -= spaceW;}\n if (curWidth > 0) {\n // At here, wordStart and wordEnd refer to the word that overflows. So, we have to stop at the previous word\n wordEnd = wordStart;\n if (text[wordEnd - 1] == ' ') {\n wordEnd--;\n }\n if (DEBUG) {\n Vm.debug(\"1. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\": \" + curWidth + \" \" + isLastLine);\n }\n addLine(lineStart, wordEnd, true, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else if (!lc.atStart()) // case of \"this is a text at the end <b>oftheline</b>\" -> oftheline will overflow the screen\n {\n if (++tries == 2) {\n break;\n }\n if (DEBUG) {\n Vm.debug(\"2 \" + isLastLine);\n }\n // Nothing was gathered in, but the current line has characters left by a previous TextSpan. This occurs only once.\n addLine(0, 0, false, lc, glue);\n curWidth = 0;\n isLastLine = false; // must recompute the last line, since there's at least a word left.\n } else {\n // Rare case where we both have nothing gathered in, and the physical line is empty. Had this not been made, then we\n // woud have generated an extra-line at the top of the block.\n if (DEBUG) {\n Vm.debug(\"3. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + '\"');\n }\n if (lineStart != wordEnd) {\n addLine(lineStart, wordEnd, true, lc, glue);\n }\n }\n glue = true;\n }\n } while (!isLastLine);\n\n if (wordEnd != lineStart) {\n //curWidth = fm.stringWidth(text, lineStart, wordEnd-lineStart);\n boolean split = lc.x + curWidth > lc.maxWidth && style.hasInitialValues() && style.isDisjoint;\n if (DEBUG) {\n Vm.debug(\"4. \\\"\" + new String(text, lineStart, wordEnd - lineStart) + \"\\\" \" + split);\n }\n addLine(lineStart, wordEnd, split, lc, glue);\n }\n }", "public void setWrapStatements(boolean isWrap)\n {\n _isWrapStatements = isWrap;\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\t\t\t\t\r\n\t\t\t}", "private static void ScheduleInput(TextEditor This, InputItem item)\r\n { \r\n if (!This.AcceptsRichContent || IsMouseInputPending(This)) \r\n {\r\n // We have to do the work now, or we'll get out of synch. \r\n TextEditorTyping._FlushPendingInputItems(This);\r\n item.Do();\r\n }\r\n else \r\n {\r\n TextEditorThreadLocalStore threadLocalStore; \r\n\r\n threadLocalStore = TextEditor._ThreadLocalStore;\r\n\r\n if (threadLocalStore.PendingInputItems == null)\r\n {\r\n threadLocalStore.PendingInputItems = new ArrayList(1);\r\n Dispatcher.CurrentDispatcher.BeginInvoke(DispatcherPriority.Background, new DispatcherOperationCallback(BackgroundInputCallback), This); \r\n }\r\n\r\n threadLocalStore.PendingInputItems.Add(item); \r\n }\r\n }", "@Override\n\t\tpublic void afterTextChanged(Editable arg0) {\n\n\t\t}", "@Override\r\npublic void keyTyped(KeyEvent e) {\n\tif(e.getKeyCode()==KeyEvent.VK_ENTER) {\r\n\t\tinput.setEditable(true);\r\n\t}\r\n}", "@Override\n protected boolean handleTick() {\n var entry = this.entries.poll();\n if (entry == null) {\n // no more questions - stop the animation\n return true;\n }\n\n var runningThread = Thread.currentThread();\n var answerType = entry.answerType();\n // write the recommendation if given\n if (answerType.recommendation() != null) {\n this.console.commandInputValue(answerType.recommendation());\n }\n // check for possible answers\n if (!answerType.possibleAnswers().isEmpty()) {\n // register the tab complete\n this.console.addTabCompleteHandler(\n this.handlerId,\n new ConsoleAnswerTabCompleteHandler(answerType.possibleAnswers()));\n // set the answers in the console history\n this.console.commandHistory(answerType.possibleAnswers());\n\n // collect the possible answers to one string\n var answers = I18n.trans(\"ca-question-list-possible-answers-list\",\n String.join(\", \", answerType.possibleAnswers()));\n // write the answers to the console\n for (var line : this.updateCursor(\"&r\" + entry.question().get() + \" &r> &e\" + answers)) {\n super.console().forceWriteLine(line);\n }\n } else {\n // clear the history\n this.console.commandHistory(null);\n // just write the question into the console\n for (var line : this.updateCursor(\"&r\" + entry.question().get())) {\n super.console().forceWriteLine(line);\n }\n }\n\n // add the command handler which handles the input\n this.console.addCommandHandler(this.handlerId, new ConsoleInputHandler() {\n @Override\n public void handleInput(@NonNull String line) {\n try {\n // check if the input was handled - wait for the response if not\n if (ConsoleSetupAnimation.this.handleInput(answerType, entry, line)) {\n // remove the handlers\n ConsoleSetupAnimation.this.console.removeCommandHandler(ConsoleSetupAnimation.this.handlerId);\n ConsoleSetupAnimation.this.console.removeTabCompleteHandler(ConsoleSetupAnimation.this.handlerId);\n // notify the monitor\n LockSupport.unpark(runningThread);\n }\n } catch (InterruptedException exception) {\n Thread.currentThread().interrupt(); // reset the interrupted state of the thread\n throw new RuntimeException(\"Console thread got interrupted during handling of response input\", exception);\n }\n }\n });\n\n // Wait for the handler to process\n LockSupport.park();\n return false;\n }", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable arg0) {\n\r\n\t\t\t}", "@Override\n \t \t public void afterTextChanged(Editable s) {\n\n \t \t }", "@Override\n\t\t\t\t\t\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}", "private void applyOnLines(Function<String, String> func) {\r\n\t\tJTextArea editor = getSelectedTextArea();\r\n\t\tDocument doc = editor.getDocument();\r\n\t\t\r\n\t\tint offset = Math.min(editor.getCaret().getDot(), editor.getCaret().getMark());\r\n\t\tint start = 0;\r\n\t\tint end = 0;\r\n\t\tint len = Math.abs(editor.getCaret().getDot() - editor.getCaret().getMark());;\r\n\t\ttry {\r\n\t\t\tint lineS = editor.getLineOfOffset(offset);\r\n\t\t\tint lineE = editor.getLineOfOffset(offset+len);\r\n\t\t\tstart = editor.getLineStartOffset(lineS);\r\n\t\t\tend = editor.getLineEndOffset(lineE);\r\n\t\t\tlen = end - start;\r\n\t\t} catch (BadLocationException ignorable) {\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString text = doc.getText(start, len);\r\n\t\t\ttext = func.apply(text);\r\n\t\t\tdoc.remove(start, len);\r\n\t\t\tdoc.insertString(start, text, null);\r\n\t\t} catch (BadLocationException ignorable) {\r\n\t\t\tthrow new RuntimeException();\r\n\t\t}\r\n\t}", "private void lineCheck(int linesToAdd) {\n\n\t\tTermio terminal = new Termio();\n\n\t\tif (lineCount >= maxLinesDisplayed) {\n\n\t\t\tlineCount = 0;\n\t\t\tSystem.out.print(\"\\n*** Press Enter To Continue ***\");\n\t\t\tterminal.keyboardReadChar();\n\n\t\t} else {\n\n\t\t\tlineCount += linesToAdd;\n\n\t\t} // if\n\n\t}", "public void addEnterOverride(JTextArea textArea) {\r\n\t\ttextArea.getInputMap().put(KeyStroke.getKeyStroke(\"ENTER\"), \"Text Submit\");\r\n\t\ttextArea.getInputMap().put(KeyStroke.getKeyStroke(\"shift ENTER\"), \"insert-break\");\r\n\t\ttextArea.getActionMap().put(\"Text Submit\", new AbstractAction() {\r\n \t\t\tprivate static final long\tserialVersionUID\t= 1L;\r\n \t\t\t@Override\r\n \t\t\tpublic void actionPerformed(ActionEvent e) {\r\n \t\t\t\tsubmitText();\r\n \t\t\t}\r\n \t\t} );\r\n \t}", "public void newLine()\n\t{\n\t\toutput.append(\"\\n\");\n\t}", "@Override\r\n public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n sendFocusToJail();\r\n\r\n return false;\r\n }", "private void append(String text) {\n // Reset counter if starts with a newline. only from formats above, not in natural text\n if (text.startsWith(\"\\n\")) {\n mWidth = 0;\n }\n\n // Don't accumulate long runs of empty spaces\n if (text.equals(\" \") && (mAccum.length() == 0 || StringUtil.in(\n mAccum.substring(mAccum.length() - 1), \" \", \"\\n\"))) {\n return;\n }\n\n // Won't fit, needs to wrap\n if (text.length() + mWidth > mMaxWidth) {\n String[] words = text.split(\"\\\\s+\");\n\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n boolean last = i == words.length - 1;\n\n // Insert a space if not the last word\n if (!last) {\n word = word + \" \";\n }\n\n // Wrap and reset counter\n if (word.length() + mWidth > mMaxWidth) {\n mAccum.append(\"\\n\").append(word);\n mWidth = word.length();\n } else {\n mAccum.append(word);\n mWidth += word.length();\n }\n }\n } else {\n // Fits as is, without need to wrap text\n mAccum.append(text);\n mWidth += text.length();\n }\n }", "protected void enterPressed()\n\t{\n\t\t// Call the enter method if the enter key was pressed\n\t\tif (showCaret)\n\t\t\tonSubmit(text.getText().substring(0, text.getText().length() - 1));\n\t\telse onSubmit(text.getText());\n\t}", "void showNewLine(String lineNumber, String directionId);", "@Override\n public void afterTextChanged(Editable p1) {\n }", "@Override\n public void afterTextChanged(Editable p1) {\n }", "public void addNotify() {\n super.addNotify();\n generateLineWrappings();\n }", "private void updateText()\n\t{\n\t\tlong longResult;\t\t//holds the value of result casted to type long\n\t\tif(result % 1 == 0)\n\t\t{\n\t\t\tlongResult = (long)result;\n\t\t\tupdateText += longResult;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tupdateText += result;\n\t\t}\n\t\tentry.setText (\"\");\n\t\tentry.setText (updateText);\n\t\tupdateText = \"\";\n\t\tentry.grabFocus();\n\t}", "public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\tuserText.setEditable(tof);\n\t\t\t}", "@Override\n public void afterTextChanged(Editable s) {}", "@Override\n public void afterTextChanged(Editable arg0) {\n\n }", "public void onOutputLineAdded(Window window, OutputLine line) {\n\t\t\t\n\t\t\tlinesLayout.addLine(line);\n\t\t}", "@Override\r\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tcheckInput();\r\n\t\t\t}", "@Override\n\t\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n public void run()\n {\n int input;\n while(handler.isRunning())\n {\n UIUtils.drawBox(' ', 1, 42, 20, 3);\n UIUtils.drawWindowAt(20, 2, 1, 42);\n \n //TODO: Possibly change to a strategy pattern to allow\n // for different kinds of input\n input = reader.readInt(\"ENTER\", -Integer.MAX_VALUE, Integer.MAX_VALUE, INPUT_POS);\n input--;\n this.handler.input(input);\n }\n }", "public void keyPressed(KeyEvent e) {\r\n\r\n\t\tif(e == null || e.getKeyCode()==KeyEvent.VK_ENTER){\r\n\t\t\t//System.out.println(\"keypressed: Enter\");\r\n\t\t\tif (!input.getText().equals(\"\")) {\r\n\t\t\t\tinput.setEditable(false);\r\n\t\t\t\tquote[1] = Long.toString(System.currentTimeMillis());\r\n\t\t\t\tquote[0]=input.getText();\r\n\r\n\t\t\t\tinput.setText(\"\");\r\n\t\t\t\tquote[0] = quote[0].trim();\r\n\t\t\t\taddText(\"> \"+quote[0]+\"\\n\");\r\n\t\t\t\t\r\n\t\t\t\tmDispatcher.newInput(quote);\r\n\t\t\t}else{\r\n\t\t\t\tinput.setEditable(false);\r\n\t\t\t\tinput.setText(\"\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "void onLine(Terminal terminal, String line);", "@Override\r\n\tpublic void afterTextChanged(Editable arg0) {\n\r\n\t}", "@Override\n public void afterTextChanged(Editable charSequence) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }", "@Override\n public void afterTextChanged(Editable arg0) {\n }" ]
[ "0.66179717", "0.66149676", "0.6552133", "0.6132734", "0.60642856", "0.58712274", "0.5826606", "0.5747339", "0.5674595", "0.56674093", "0.55721813", "0.5544076", "0.5509815", "0.5509063", "0.5491005", "0.54901457", "0.5488344", "0.5407929", "0.53902984", "0.53668916", "0.5360578", "0.5346254", "0.53315073", "0.5318406", "0.5311826", "0.5308845", "0.530884", "0.52997726", "0.5280121", "0.52775836", "0.5256932", "0.5246676", "0.5241382", "0.5207473", "0.520294", "0.51924515", "0.5188823", "0.5182931", "0.5144647", "0.5144286", "0.51383865", "0.51356804", "0.5123238", "0.51185924", "0.51180524", "0.51180524", "0.51180524", "0.51180524", "0.5099179", "0.5093645", "0.50864094", "0.50763625", "0.50763625", "0.50763625", "0.5069057", "0.50644195", "0.50644195", "0.50644195", "0.50644195", "0.50623465", "0.50611246", "0.50570214", "0.50514275", "0.5041626", "0.50135857", "0.5012472", "0.5007309", "0.49971262", "0.4989036", "0.49871582", "0.49858332", "0.4984823", "0.49736986", "0.49567997", "0.49555627", "0.49555126", "0.4952456", "0.49517617", "0.49509957", "0.49509957", "0.49480385", "0.49444008", "0.49427968", "0.49403545", "0.49329937", "0.4928235", "0.49278504", "0.4926741", "0.4926741", "0.4926077", "0.49237636", "0.4923279", "0.49226567", "0.4917228", "0.49127004", "0.49127004", "0.49127004", "0.49127004", "0.49127004", "0.49127004" ]
0.5407777
18
sendet 4x4 Matrix an glsl
public void sendUniformMat4f(Matrix4f mat) { setMatFloatBuffer(mat.getMatrix()); GL4 gl = (GL4) GLContext.getCurrentGL(); gl.glUniformMatrix4fv(uniformID,1,true,matBuffer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic vec4 get4(String ponits) {\n\t\treturn null;\r\n\t}", "private float a(int paramInt, boolean paramBoolean)\r\n/* 161: */ {\r\n/* 162:172 */ float f1 = paramInt % 16 * 8;\r\n/* 163:173 */ float f2 = paramInt / 16 * 8;\r\n/* 164:174 */ float f3 = paramBoolean ? 1.0F : 0.0F;\r\n/* 165: */ \r\n/* 166:176 */ this.h.a(this.g);\r\n/* 167: */ \r\n/* 168:178 */ float f4 = this.d[paramInt] - 0.01F;\r\n/* 169: */ \r\n/* 170:180 */ GL11.glBegin(5);\r\n/* 171:181 */ GL11.glTexCoord2f(f1 / 128.0F, f2 / 128.0F);\r\n/* 172:182 */ GL11.glVertex3f(this.i + f3, this.j, 0.0F);\r\n/* 173:183 */ GL11.glTexCoord2f(f1 / 128.0F, (f2 + 7.99F) / 128.0F);\r\n/* 174:184 */ GL11.glVertex3f(this.i - f3, this.j + 7.99F, 0.0F);\r\n/* 175:185 */ GL11.glTexCoord2f((f1 + f4 - 1.0F) / 128.0F, f2 / 128.0F);\r\n/* 176:186 */ GL11.glVertex3f(this.i + f4 - 1.0F + f3, this.j, 0.0F);\r\n/* 177:187 */ GL11.glTexCoord2f((f1 + f4 - 1.0F) / 128.0F, (f2 + 7.99F) / 128.0F);\r\n/* 178:188 */ GL11.glVertex3f(this.i + f4 - 1.0F - f3, this.j + 7.99F, 0.0F);\r\n/* 179:189 */ GL11.glEnd();\r\n/* 180: */ \r\n/* 181:191 */ return this.d[paramInt];\r\n/* 182: */ }", "public Matrix4f() {\n setIdentity();\n }", "public PMVMatrix(boolean useBackingArray) {\n projectFloat = new ProjectFloat();\n \n // I Identity\n // T Texture\n // P Projection\n // Mv ModelView\n // Mvi Modelview-Inverse\n // Mvit Modelview-Inverse-Transpose\n if(useBackingArray) {\n matrixBufferArray = new float[6*16];\n matrixBuffer = null;\n // matrixBuffer = FloatBuffer.wrap(new float[12*16]);\n } else {\n matrixBufferArray = null;\n matrixBuffer = Buffers.newDirectByteBuffer(6*16 * Buffers.SIZEOF_FLOAT);\n matrixBuffer.mark();\n }\n \n matrixIdent = slice2Float(matrixBuffer, matrixBufferArray, 0*16, 1*16); // I\n matrixTex = slice2Float(matrixBuffer, matrixBufferArray, 1*16, 1*16); // T\n matrixPMvMvit = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 4*16); // P + Mv + Mvi + Mvit \n matrixPMvMvi = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 3*16); // P + Mv + Mvi\n matrixPMv = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 2*16); // P + Mv\n matrixP = slice2Float(matrixBuffer, matrixBufferArray, 2*16, 1*16); // P\n matrixMv = slice2Float(matrixBuffer, matrixBufferArray, 3*16, 1*16); // Mv\n matrixMvi = slice2Float(matrixBuffer, matrixBufferArray, 4*16, 1*16); // Mvi\n matrixMvit = slice2Float(matrixBuffer, matrixBufferArray, 5*16, 1*16); // Mvit\n \n if(null != matrixBuffer) {\n matrixBuffer.reset();\n } \n ProjectFloat.gluMakeIdentityf(matrixIdent);\n \n vec3f = new float[3];\n matrixMult = new float[16];\n matrixTrans = new float[16];\n matrixRot = new float[16];\n matrixScale = new float[16];\n matrixOrtho = new float[16];\n matrixFrustum = new float[16];\n ProjectFloat.gluMakeIdentityf(matrixTrans, 0);\n ProjectFloat.gluMakeIdentityf(matrixRot, 0);\n ProjectFloat.gluMakeIdentityf(matrixScale, 0);\n ProjectFloat.gluMakeIdentityf(matrixOrtho, 0);\n ProjectFloat.gluMakeZero(matrixFrustum, 0);\n \n matrixPStack = new ArrayList<float[]>();\n matrixMvStack= new ArrayList<float[]>();\n \n // default values and mode\n glMatrixMode(GL_PROJECTION);\n glLoadIdentity();\n glMatrixMode(GL_MODELVIEW);\n glLoadIdentity();\n glMatrixMode(GL.GL_TEXTURE);\n glLoadIdentity();\n setDirty();\n update();\n }", "public void sendUniformMat4fTransposed(Matrix4f mat)\n {\n setMatFloatBuffer(mat.getMatrix());\n GL4 gl = (GL4) GLContext.getCurrentGL();\n gl.glUniformMatrix4fv(uniformID,1,false,matBuffer);\n }", "void glUniformMatrix4fv(int location, int count, boolean transpose,\n float[] value, int offset);", "public float[] convertShader() {\r\n\t\tfloat[] w = new float[16];\r\n\t\t\r\n\t\tw[0] = m[0][0]; w[1] = m[0][1]; w[2] = m[0][2]; w[3] = m[0][3];\r\n\t\tw[4] = m[1][0]; w[5] = m[1][1]; w[6] = m[1][2]; w[7] = m[1][3];\r\n\t\tw[8] = m[2][0]; w[9] = m[2][1]; w[10] = m[2][2]; w[11] = m[2][3];\r\n\t\tw[12] = m[3][0]; w[13] = m[3][1]; w[14] = m[3][2]; w[15] = m[3][3];\r\n\t\t\t\t\r\n\t\treturn w;\r\n\r\n\t}", "Matrix4f getModelMatrix();", "float[] getViewMatrix();", "abstract public Matrix4fc getViewMatrix();", "private static void buildSquare(Matrix4f matrix, BufferBuilder builder, int x1, int x2, int y1, int y2, int z, float u1, float u2, float v1, float v2) {\n builder.pos(matrix, x1, y2, z).tex(u1, v2).endVertex();\n builder.pos(matrix, x2, y2, z).tex(u2, v2).endVertex();\n builder.pos(matrix, x2, y1, z).tex(u2, v1).endVertex();\n builder.pos(matrix, x1, y1, z).tex(u1, v1).endVertex();\n }", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public void doRender(EntityNinjastar ninjastar, double transX, double transY, double transZ, float param5, float dir){\n GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);\n GlStateManager.pushMatrix();\n\n GlStateManager.translate((float) transX, (float) transY, (float) transZ);\n\n //moved\n GlStateManager.enableRescaleNormal();\n float scale = 0.75F;\n GlStateManager.scale(scale, scale, scale);\n\n GlStateManager.rotate(ninjastar.prevRotationYaw + (ninjastar.rotationYaw - ninjastar.prevRotationYaw) * dir - 90.0F, 0.0F, 1.0F, 0.0F);\n GlStateManager.rotate(ninjastar.getRandomTilt(), 1.0F, 0.0F, 0.0F);\n\n //moved\n bindEntityTexture(ninjastar);\n\n Tessellator tessellator = Tessellator.getInstance();\n WorldRenderer worldRenderer = tessellator.getWorldRenderer();\n\n// GlStateManager.enableRescaleNormal();\n\n// float scale = 0.05F;\n// GlStateManager.scale(scale, scale, scale);\n\n GL11.glNormal3f(0.0F, 0.0F, scale);\n\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n GlStateManager.rotate(100.0F, 1.0F, 0.0F, 0.0F);\n worldRenderer.startDrawingQuads();\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 0);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 1, 1);\n worldRenderer.addVertexWithUV(-2.0D, -2.0D, 0.0D, 0, 1);\n tessellator.draw();\n\n //added\n this.renderItemNinjastar.renderItemModel(this.func_177082_d(ninjastar));\n\n GlStateManager.disableRescaleNormal();\n GlStateManager.popMatrix();\n\n super.doRender(ninjastar, transX, transY, transZ, param5, dir);\n\n }", "float[] getProjectionMatrix();", "private void drawsegment_gouraud_texture32\n (\n float leftadd,\n float rghtadd,\n int ytop,\n int ybottom\n ) {\n \n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop*=SCREEN_WIDTH;\n ybottom*=SCREEN_WIDTH;\n //int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int red;\n int grn;\n int blu;\n int al;\n \n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = (iu & 0xFFFF) >> 9;\n int ivi = (iv & 0xFFFF) >> 9;\n \n // get texture pixels\n int pix0 = m_texture[ofs];\n int pix1 = m_texture[ofs + 1];\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int pix2 = m_texture[ofs];\n int pix3 = m_texture[ofs + 1];\n \n // red\n int red0 = (pix0 & 0xFF0000);\n int red2 = (pix2 & 0xFF0000);\n int up = red0 + ((((pix1 & 0xFF0000) - red0) * iui) >> 7);\n int dn = red2 + ((((pix3 & 0xFF0000) - red2) * iui) >> 7);\n red = (up + (((dn-up) * ivi) >> 7)) >> 16;\n \n // grn\n red0 = (pix0 & 0xFF00);\n red2 = (pix2 & 0xFF00);\n up = red0 + ((((pix1 & 0xFF00) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF00) - red2) * iui) >> 7);\n grn = (up + (((dn-up) * ivi) >> 7)) >> 8;\n \n // blu\n red0 = (pix0 & 0xFF);\n red2 = (pix2 & 0xFF);\n up = red0 + ((((pix1 & 0xFF) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF) - red2) * iui) >> 7);\n blu = up + (((dn-up) * ivi) >> 7);\n \n // alpha\n pix0>>>=24;\n pix2>>>=24;\n up = pix0 + ((((pix1 >>> 24) - pix0) * iui) >> 7);\n dn = pix2 + ((((pix3 >>> 24) - pix2) * iui) >> 7);\n al = up + (((dn-up) * ivi) >> 7);\n } else {\n // get texture pixel color\n blu = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)];\n al = (blu >>> 24);\n red = (blu & 0xFF0000) >> 16;\n grn = (blu & 0xFF00) >> 8;\n blu = blu & 0xFF;\n }\n \n // multiply with gouraud color\n red = (red * ir) >>> 8; // 0x00FF????\n grn = (grn * ig) >>> 16; // 0x0000FF??\n blu = (blu * ib) >>> 24; // 0x000000FF\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n //\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al) >> 8)) & 0xFF);\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n zleft+=zleftadd;\n }\n }", "public void onSurfaceChanged(GL10 glUnused, int width, int height) {\n\t\tGLES20.glViewport(0, 0, width, height);\n\t\tLog.d(\"ShelXle.Droid Screen Size\", width + \" \" + height);\n\t\tpixh = height;\n\t\tpixw = width;\n\t\tfpsscal = 350.0f / Math.min(width, height);\n\t\tfpsMat[0] = -fpsscal;\n\t\tfpsMat[12] = 1.0f - fpsscal;\n\t\tfpsMat3[0] = -fpsscal*1.24f;\n\t\tfpsMat3[12] = 1.0f - fpsscal*1.24f;\n\n\t\tfpsMat4[0] = -fpsscal*1.26f;\n\t\tfpsMat4[12] = 1.0f - fpsscal*1.26f;\n\t\tfpsMat2[0] = -0.25f * fpsscal;\n\t\tLog.d(\"ShelXle.Droid FPS text scaling \", fpsscal + \" \");\n\t\tfloat ratio = (float) width / height;\n\t\tfloat fh = (float) Math.tan(29.0 / 360.0 * 3.14159265358979) * 5.0f;\n\t\tfloat fw = fh * ratio;\n\t\tMatrix.frustumM(proj, 0, -fw, fw, -fh, fh, 5.0f, 800.0f);\n\t\tMatrix.setLookAtM(mv, 0, 0.0f, 200f, 0f, 0f, 0.0f, 0.0f, 0.0f, 00f, 1f);\n\t\tMatrix.multiplyMM(pmv1, 0, proj, 0, mv, 0);\n\t\tSystem.arraycopy(pmv1, 0, proj, 0, 16);\n\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t/*\n\t\t * if (f!=null){ f.write(proj); f.write(proj);\n\t\t * \n\t\t * }\n\t\t */\n\t\t// Matrix.setIdentityM(proj,0);\n\t\t// Matrix.perspectiveM(proj, 0, 29.0f,ratio,5.0f,800.0f);\n\n\t}", "public void invertFastEqual()\r\n\t{\r\n\t\tE3DMatrix4x4F scratchMatrix = new E3DMatrix4x4F();\r\n\t\t\r\n//\t\tscratchMatrix.matrix4x4[0][0] = scratchMatrix.matrix4x4[]\r\n\t\tscratchMatrix.matrix4x4[0][1] = matrix4x4[1][0];\r\n\t\tscratchMatrix.matrix4x4[0][2] = matrix4x4[2][0];\r\n\t\tscratchMatrix.matrix4x4[1][0] = matrix4x4[0][1];\r\n//\t\tscratchMatrix.matrix4x4[1][1] = \r\n\t\tscratchMatrix.matrix4x4[1][2] = matrix4x4[2][1];\r\n\t\tscratchMatrix.matrix4x4[2][0] = matrix4x4[0][2];\r\n\t\tscratchMatrix.matrix4x4[2][1] = matrix4x4[1][2];\r\n//\t\tscratchMatrix.matrix4x4[2][2] =\r\n\t\t\r\n\t\tmatrix4x4[0][1] = scratchMatrix.matrix4x4[0][1];\r\n\t\tmatrix4x4[0][2] = scratchMatrix.matrix4x4[0][2];\r\n\t\tmatrix4x4[1][0] = scratchMatrix.matrix4x4[1][0];\r\n\t\tmatrix4x4[1][2] = scratchMatrix.matrix4x4[1][2];\r\n\t\tmatrix4x4[2][0] = scratchMatrix.matrix4x4[2][0];\r\n\t\tmatrix4x4[2][1] = scratchMatrix.matrix4x4[2][1];\r\n\t}", "void glUniform4fv(int location, int count, float[] v, int offset);", "private void drawsegment_gouraud_texture8(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try\n {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n \n // get RGB colors\n int red = ir & 0xFF0000;\n int grn = (ig >> 8) & 0xFF00;\n int blu = (ib >> 16);\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n m_pixels[xstart] = 0xFF000000 |\n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n \n // write stencil\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n \n }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n \n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n zleft+=zleftadd;\n }\n }", "private float a(char paramChar, boolean paramBoolean)\r\n/* 198: */ {\r\n/* 199:207 */ if (this.e[paramChar] == 0) {\r\n/* 200:208 */ return 0.0F;\r\n/* 201: */ }\r\n/* 202:211 */ int i1 = paramChar / 'Ā';\r\n/* 203: */ \r\n/* 204:213 */ b(i1);\r\n/* 205: */ \r\n/* 206: */ \r\n/* 207:216 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 208: */ \r\n/* 209:218 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 210: */ \r\n/* 211:220 */ float f1 = i2;\r\n/* 212:221 */ float f2 = i3 + 1;\r\n/* 213: */ \r\n/* 214:223 */ float f3 = paramChar % '\\020' * 16 + f1;\r\n/* 215:224 */ float f4 = (paramChar & 0xFF) / '\\020' * 16;\r\n/* 216:225 */ float f5 = f2 - f1 - 0.02F;\r\n/* 217:226 */ float f6 = paramBoolean ? 1.0F : 0.0F;\r\n/* 218: */ \r\n/* 219:228 */ GL11.glBegin(5);\r\n/* 220:229 */ GL11.glTexCoord2f(f3 / 256.0F, f4 / 256.0F);\r\n/* 221:230 */ GL11.glVertex3f(this.i + f6, this.j, 0.0F);\r\n/* 222:231 */ GL11.glTexCoord2f(f3 / 256.0F, (f4 + 15.98F) / 256.0F);\r\n/* 223:232 */ GL11.glVertex3f(this.i - f6, this.j + 7.99F, 0.0F);\r\n/* 224:233 */ GL11.glTexCoord2f((f3 + f5) / 256.0F, f4 / 256.0F);\r\n/* 225:234 */ GL11.glVertex3f(this.i + f5 / 2.0F + f6, this.j, 0.0F);\r\n/* 226:235 */ GL11.glTexCoord2f((f3 + f5) / 256.0F, (f4 + 15.98F) / 256.0F);\r\n/* 227:236 */ GL11.glVertex3f(this.i + f5 / 2.0F - f6, this.j + 7.99F, 0.0F);\r\n/* 228:237 */ GL11.glEnd();\r\n/* 229: */ \r\n/* 230:239 */ return (f2 - f1) / 2.0F + 1.0F;\r\n/* 231: */ }", "public void onSurfaceChanged(GL10 glUnused, int width, int height)\n {\n GLES20.glViewport(0, 0, width, height);\n float ratio = (float) width / height;\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n }", "private void drawsegment_texture8(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) { \n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n // if the matrix inversion screwed up, revert to normal rendering \n // (something is degenerate)\n accurateMode = false; \n }\n }\n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n \n int red = m_fill & 0xFF0000;\n int grn = m_fill & 0xFF00;\n int blu = m_fill & 0xFF;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode && goingIn) {\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU;\n iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else {\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ; xstart < xend; xstart++ ) {\n if (accurateMode) {\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else {\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n // try-catch just in case pixel offset it out of range\n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n \n int br = m_pixels[xstart];\n int bg = (br & 0xFF00);\n int bb = (br & 0xFF);\n br = (br & 0xFF0000);\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n }\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n zleft+=zleftadd;\n }\n }", "private void drawsegment_gouraud_texture24(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n m_zbuffer[xstart] = iz;\n \n int red;\n int grn;\n int blu;\n \n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = (iu & 0xFFFF) >> 9;\n int ivi = (iv & 0xFFFF) >> 9;\n \n // get texture pixels\n int pix0 = m_texture[ofs];\n int pix1 = m_texture[ofs + 1];\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int pix2 = m_texture[ofs];\n int pix3 = m_texture[ofs + 1];\n \n // red\n int red0 = (pix0 & 0xFF0000);\n int red2 = (pix2 & 0xFF0000);\n int up = red0 + ((((pix1 & 0xFF0000) - red0) * iui) >> 7);\n int dn = red2 + ((((pix3 & 0xFF0000) - red2) * iui) >> 7);\n red = up + (((dn-up) * ivi) >> 7);\n \n // grn\n red0 = (pix0 & 0xFF00);\n red2 = (pix2 & 0xFF00);\n up = red0 + ((((pix1 & 0xFF00) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF00) - red2) * iui) >> 7);\n grn = up + (((dn-up) * ivi) >> 7);\n \n // blu\n red0 = (pix0 & 0xFF);\n red2 = (pix2 & 0xFF);\n up = red0 + ((((pix1 & 0xFF) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF) - red2) * iui) >> 7);\n blu = up + (((dn-up) * ivi) >> 7);\n } else {\n // get texture pixel color\n blu = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)];\n red = (blu & 0xFF0000);\n grn = (blu & 0xFF00);\n blu = blu & 0xFF;\n }\n \n //\n int r = (ir >> 16);\n int g = (ig >> 16);\n // oops, namespace collision with accurate \n // texture vector b...sorry [ewjordan]\n int bb2 = (ib >> 16); \n \n m_pixels[xstart] = 0xFF000000 | \n ((((red * r) & 0xFF000000) | ((grn * g) & 0xFF0000) | (blu * bb2)) >> 8);\n // m_stencil[xstart] = p;\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n \n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n zleft+=zleftadd;\n }\n }", "public abstract Vector4fc mulProject(IMatrix4f mat);", "public void drawMainRotor(float[] mvpMatrix)\n\t{\n GLES20.glUseProgram(chopperProgram);\n int error = GLES20.glGetError();\n if (error != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper -- drawMainRotor: Use Program Error: \" + error);\n }\n\n // get handle to vertex shader's vPosition member\n mPositionHandle = GLES20.glGetAttribLocation(chopperProgram, \"vPosition\");\n if (mPositionHandle < 0)\n {\n System.out.println(\"StigChopper -- rotors: Failed to get mPositionHandle\");\n }\n\n // get handle to shape's transformation matrix\n mMVPMatrixHandle = GLES20.glGetUniformLocation(chopperProgram, \"uMVPMatrix\");\n\n // Enable a handle to the cube vertices\n GLES20.glEnableVertexAttribArray(mPositionHandle);\n\n // Prepare the cube coordinate data\n GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false,\n\t\t\t\t\t\t\t\t\t vertexStride, mainRotorVertexBuffer);\n\n // get handle to vertex shader's vColor member\n if (vertexColor)\n {\n mColorHandle = GLES20.glGetAttribLocation(chopperProgram, \"vColor\");\n if (mColorHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get vColor\");\n }\n GLES20.glEnableVertexAttribArray(mColorHandle);\n\n GLES20.glVertexAttribPointer(mColorHandle, COLORS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false, colorStride, triColBuffer);\n }\n else\n {\n mColorHandle = GLES20.glGetUniformLocation(chopperProgram, \"vColor\");\n\t\t\tGLES20.glUniform4f(mColorHandle,1.0f,1.0f,0.0f,0.7f);\n }\n\n // Pass the projection and view transformation to the shader\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);\n\n\t\tGLES20.glLineWidth(lineWidth);\n GLES20.glDrawElements(GLES20.GL_LINES, mainRotorDrawListBuffer.capacity(),\n\t\t\t\t\t\t\t GLES20.GL_UNSIGNED_INT, mainRotorDrawListBuffer);\n int drawError = GLES20.glGetError();\n if (drawError != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper: Rotor Draw Elements Error: \" + drawError + \", color: \" + vertexColor + \", text: \" + textures);\n }\n\n // Disable vertex array\n GLES20.glDisableVertexAttribArray(mPositionHandle);\n if (vertexColor)\n {\n GLES20.glDisableVertexAttribArray(mColorHandle);\n }\n\t}", "@Override\r\n protected Matrix4f genViewMatrix() {\r\n\r\n // refreshes the position\r\n position = calcPosition();\r\n\r\n // calculate the camera's coordinate system\r\n Vector3f[] coordSys = genCoordSystem(position.subtract(center));\r\n Vector3f right, up, forward;\r\n forward = coordSys[0];\r\n right = coordSys[1];\r\n up = coordSys[2];\r\n\r\n // we move the world, not the camera\r\n Vector3f position = this.position.negate();\r\n\r\n return genViewMatrix(forward, right, up, position);\r\n }", "private void drawsegment_gouraud_texture8_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) {\n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n // if the matrix inversion screwed up, \n // revert to normal rendering (something is degenerate)\n accurateMode = false; \n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n try {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n al0 = (al0 * (ia >> 16)) >> 8;\n \n // get RGB colors\n int red = ir & 0xFF0000;\n int grn = (ig >> 8) & 0xFF00;\n int blu = (ib >> 16);\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n \n // write stencil\n // m_stencil[xstart] = p;\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }", "float[] getMVPMatrix();", "private void drawsegment_gouraud_texture32_alpha\n (\n float leftadd,\n float rghtadd,\n int ytop,\n int ybottom\n ) {\n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ;xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n // get texture pixel color\n try {\n //if (iz < m_zbuffer[xstart]) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) { // [fry 041114]\n //m_zbuffer[xstart] = iz;\n \n // blend\n int al = ia >> 16;\n \n int red;\n int grn;\n int blu;\n \n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = (iu & 0xFFFF) >> 9;\n int ivi = (iv & 0xFFFF) >> 9;\n \n // get texture pixels\n int pix0 = m_texture[ofs];\n int pix1 = m_texture[ofs + 1];\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int pix2 = m_texture[ofs];\n int pix3 = m_texture[ofs + 1];\n \n // red\n int red0 = (pix0 & 0xFF0000);\n int red2 = (pix2 & 0xFF0000);\n int up = red0 + ((((pix1 & 0xFF0000) - red0) * iui) >> 7);\n int dn = red2 + ((((pix3 & 0xFF0000) - red2) * iui) >> 7);\n red = (up + (((dn-up) * ivi) >> 7)) >> 16;\n \n // grn\n red0 = (pix0 & 0xFF00);\n red2 = (pix2 & 0xFF00);\n up = red0 + ((((pix1 & 0xFF00) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF00) - red2) * iui) >> 7);\n grn = (up + (((dn-up) * ivi) >> 7)) >> 8;\n \n // blu\n red0 = (pix0 & 0xFF);\n red2 = (pix2 & 0xFF);\n up = red0 + ((((pix1 & 0xFF) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF) - red2) * iui) >> 7);\n blu = up + (((dn-up) * ivi) >> 7);\n \n // alpha\n pix0>>>=24;\n pix2>>>=24;\n up = pix0 + ((((pix1 >>> 24) - pix0) * iui) >> 7);\n dn = pix2 + ((((pix3 >>> 24) - pix2) * iui) >> 7);\n al = al * (up + (((dn-up) * ivi) >> 7)) >> 8;\n } else {\n blu = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)];\n al = al * (blu >>> 24) >> 8;\n red = (blu & 0xFF0000) >> 16; // 0 - 255\n grn = (blu & 0xFF00) >> 8; // 0 - 255\n blu = (blu & 0xFF); // 0 - 255\n }\n \n // multiply with gouraud color\n red = (red * ir) >>> 8; // 0x00FF????\n grn = (grn * ig) >>> 16; // 0x0000FF??\n blu = (blu * ib) >>> 24; // 0x000000FF\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n //\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n } catch (Exception e) { }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }", "private void drawStatic() {\n Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mModelMatrix, 0);\n\n // Pass in the modelview matrix.\n GLES20.glUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // This multiplies the modelview matrix by the projection matrix, and stores the result in the MVP matrix\n // (which now contains model * view * projection).\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Pass in the light position in eye space.\n GLES20.glUniform3f(mLightPosHandle, mLightPosInEyeSpace[0], mLightPosInEyeSpace[1], mLightPosInEyeSpace[2]);\n }", "static public void init() {\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=MeshFrame.HEIGHT; i>=HeightScale;i-=HeightScale){\r\n\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\r\n\t\t\tfor (int j = 0; j <= MeshFrame.WIDTH; j+=WidthScale) {\r\n\t\t\t\tGL11.glVertex3f(j, i, 0);\r\n\t\t\t\tGL11.glVertex3f(j, i-HeightScale, 0);\r\n\t\t\t}\r\n\t\t\tGL11.glEnd();\r\n\t\t\t\r\n\t\t}\t\t\r\n\t\t\r\n\t}", "protected void applyMatrices () {\n combinedMatrix.set(projectionMatrix).mul(transformMatrix);\n getShader().setUniformMatrix(\"u_projTrans\", combinedMatrix);\n }", "public void d() {\n super.d();\n int glGetUniformLocation = GLES20.glGetUniformLocation(this.x, \"target\");\n GLES20.glActiveTexture(33984);\n GLES20.glBindTexture(3553, this.f1221a);\n GLES20.glUniform1i(glGetUniformLocation, 0);\n int glGetUniformLocation2 = GLES20.glGetUniformLocation(this.x, \"source\");\n GLES20.glActiveTexture(33985);\n GLES20.glBindTexture(3553, this.f1222b);\n GLES20.glUniform1i(glGetUniformLocation2, 1);\n int glGetUniformLocation3 = GLES20.glGetUniformLocation(this.x, \"field\");\n GLES20.glActiveTexture(33986);\n GLES20.glBindTexture(3553, this.c);\n GLES20.glUniform1i(glGetUniformLocation3, 2);\n int glGetUniformLocation4 = GLES20.glGetUniformLocation(this.x, \"source_size\");\n float[] fArr = this.d;\n GLES20.glUniform2f(glGetUniformLocation4, fArr[0], fArr[1]);\n int glGetUniformLocation5 = GLES20.glGetUniformLocation(this.x, \"target_size\");\n float[] fArr2 = this.e;\n GLES20.glUniform2f(glGetUniformLocation5, fArr2[0], fArr2[1]);\n int glGetUniformLocation6 = GLES20.glGetUniformLocation(this.x, \"field_size\");\n float[] fArr3 = this.f;\n GLES20.glUniform2f(glGetUniformLocation6, fArr3[0], fArr3[1]);\n int glGetUniformLocation7 = GLES20.glGetUniformLocation(this.x, \"full_size\");\n float[] fArr4 = this.g;\n GLES20.glUniform2f(glGetUniformLocation7, fArr4[0], fArr4[1]);\n GLES20.glUniform1f(GLES20.glGetUniformLocation(this.x, \"jump\"), this.h);\n GLES20.glUniformMatrix4fv(GLES20.glGetUniformLocation(this.x, \"region\"), 1, false, this.i, 0);\n }", "public void draw(float[] mvpMatrix, int note) {\n GLES30.glUseProgram(mProgram);\n MyGLRenderer.checkGlError(\"glUseProgram\");\n\n // get handle to vertex shader's vPosition member\n mPositionHandle = GLES30.glGetAttribLocation(mProgram, \"vPosition\");\n\n // Enable a handle to the triangle vertices\n GLES30.glEnableVertexAttribArray(mPositionHandle);\n\n // Prepare the triangle coordinate data\n //Matrix.multiplyMV(vertexBuffer, 0, scaleMatrix, 0, vertexBuffer, 0);\n GLES30.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,\n GLES30.GL_FLOAT, false,\n vertexStride, vertexBuffer);\n \n // get handle to fragment shader's vColor member\n //mColorHandle = GLES30.glGetUniformLocation(mProgram, \"vColor\");\n\n mTextureUniformHandle = GLES30.glGetUniformLocation(mProgram, \"u_Texture\");\n mTextureCoordinateHandle = GLES30.glGetAttribLocation(mProgram, \"a_TexCoordinate\");\n \n // Set the active texture unit to texture unit 1. (0 reserved for FBO?)\n GLES30.glActiveTexture(GLES30.GL_TEXTURE0);\n \n // Bind the texture to this unit.\n GLES30.glBindTexture(GLES30.GL_TEXTURE_2D, mTextureDataHandles[note]);\n \n // Tell the texture uniform sampler to use this texture in the shader by binding to texture unit 0.\n GLES30.glUniform1i(mTextureUniformHandle, 0);\n \n // Set color for drawing the triangle\n //GLES30.glUniform4fv(mColorHandle, 1, color, 0);\n\n // Pass in the texture coordinate information\n mCubeTextureCoordinates.position(0);\n GLES30.glVertexAttribPointer(mTextureCoordinateHandle, mTextureCoordinateDataSize, GLES30.GL_FLOAT, false, \n \t\t0, mCubeTextureCoordinates);\n \n GLES30.glEnableVertexAttribArray(mTextureCoordinateHandle);\n \n \n // get handle to shape's transformation matrix\n mMVPMatrixHandle = GLES30.glGetUniformLocation(mProgram, \"uMVPMatrix\");\n MyGLRenderer.checkGlError(\"glGetUniformLocation\");\n\n // Apply the projection and view transformation\n GLES30.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);\n MyGLRenderer.checkGlError(\"glUniformMatrix4fv\");\n\n // Draw the square\n GLES30.glDrawElements(GLES30.GL_TRIANGLES, drawOrder.length,\n GLES30.GL_UNSIGNED_SHORT, drawListBuffer);\n\n // Disable vertex array\n GLES30.glDisableVertexAttribArray(mPositionHandle);\n }", "public abstract Vector4fc set(float x, float y, float z, float w);", "void fillMatrixFromQuaternion(DoubleBuffer matrix, double m_x, double m_y, double m_z, double m_w)\n\t{\t\t\n\t\t// First row\n\t\tmatrix.put(1.0 - 2.0 * ( m_y * m_y + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_x * m_y + m_z * m_w));\n\t\tmatrix.put(2.0 * (m_x * m_z - m_y * m_w));\n\t\tmatrix.put(0.0);\n\t\t\n\t\t// Second row\n\t\tmatrix.put(2.0 * ( m_x * m_y - m_z * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_z * m_z ));\n\t\tmatrix.put(2.0 * (m_z * m_y + m_x * m_w ));\n\t\tmatrix.put(0.0);\n\n\t\t// Third row\n\t\tmatrix.put(2.0 * ( m_x * m_z + m_y * m_w ));\n\t\tmatrix.put(2.0 * ( m_y * m_z - m_x * m_w ));\n\t\tmatrix.put(1.0 - 2.0 * ( m_x * m_x + m_y * m_y ));\n\t\tmatrix.put(0.0);\n\n\t\t// Fourth row\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(0.0);\n\t\tmatrix.put(1.0);\n\t\t\n\t\tmatrix.flip();\n\t}", "public TransformationMatrix() {\n\t\ta11 = 1; a12 = 0; a13 = 0; a14 = 0;\n\t\ta21 = 0; a22 = 1; a23 = 0; a24 = 0;\n\t\ta31 = 0; a32 = 0; a33 = 1; a34 = 0;\n\t}", "public abstract Vector4fc mul(float x, float y, float z, float w);", "@Override\n public void reshape(ViewPort vp, int w, int h) {\n Texture2D redTexture = new Texture2D(w, h, Format.RGBA8); // color texture\n Texture2D greenTexture = new Texture2D(w, h, Format.Luminance8); // monochrome texture\n Texture2D blueTexture = new Texture2D(w, h, Format.Luminance8); // monochrome texture\n Texture2D rgbTexture = new Texture2D(w, h, Format.RGBA8); // color texture\n\n fb = new FrameBuffer(w, h, 1);\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(redTexture)); // location 0\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(greenTexture)); // location 1\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(blueTexture)); // location 2\n fb.addColorTarget(FrameBuffer.FrameBufferTarget.newTarget(rgbTexture)); // location 3\n fb.setMultiTarget(true);\n\n display1.setTexture(assetManager, rgbTexture, false);\n display2.setTexture(assetManager, redTexture, false);\n display3.setTexture(assetManager, greenTexture, false);\n display4.setTexture(assetManager, blueTexture, false);\n\n display1.setPosition(0, 0); // lower-left quadrant\n display1.setWidth(w / 2f);\n display1.setHeight(h / 2f);\n\n display2.setPosition(0, h / 2f); // upper-left quadrant\n display2.setWidth(w / 2f);\n display2.setHeight(h / 2f);\n\n display3.setPosition(w / 2f, h / 2f); // upper-right quadrant\n display3.setWidth(w / 2f);\n display3.setHeight(h / 2f);\n\n display4.setPosition(w / 2f, 0f); // lower-right quadrant\n display4.setWidth(w / 2f);\n display4.setHeight(h / 2f);\n\n guiNode.updateGeometricState();\n initialized = true;\n }", "private static SbVec4f\nmultVecMatrix4(final SbMatrix m, final SbVec4f v)\n//\n////////////////////////////////////////////////////////////////////////\n{\n int i;\n final SbVec4f v2 = new SbVec4f();\n\n for (i = 0; i < 4; i++)\n v2.getValueRead()[i] = (v.getValueRead()[0] * m.getValue()[0][i] +\n v.getValueRead()[1] * m.getValue()[1][i] +\n v.getValueRead()[2] * m.getValue()[2][i] +\n v.getValueRead()[3] * m.getValue()[3][i]);\n\n return v2;\n}", "private void drawsegment_texture8_alpha(float leftadd,\n float rghtadd,\n int ytop,\n int ybottom) { \n // Accurate texture mode added - comments stripped from dupe code, \n // see drawsegment_texture24() for details\n \n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode) {\n // see if the precomputation goes well, if so finish the setup\n if (precomputeAccurateTexturing()) { \n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else {\n // if the matrix inversion screwed up, \n // revert to normal rendering (something is degenerate)\n accurateMode = false; \n }\n }\n ytop*=SCREEN_WIDTH;\n ybottom*=SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float iaf = iaadd;\n \n int red = m_fill & 0xFF0000;\n int grn = m_fill & 0xFF00;\n int blu = m_fill & 0xFF;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n \n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n \n for ( ; xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n // try-catch just in case pixel offset it out of range\n try\n {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) {\n //m_zbuffer[xstart] = iz;\n \n int al0;\n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = iu & 0xFFFF;\n al0 = m_texture[ofs] & 0xFF;\n int al1 = m_texture[ofs + 1] & 0xFF;\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int al2 = m_texture[ofs] & 0xFF;\n int al3 = m_texture[ofs + 1] & 0xFF;\n al0 = al0 + (((al1-al0) * iui) >> 16);\n al2 = al2 + (((al3-al2) * iui) >> 16);\n al0 = al0 + (((al2-al0) * (iv & 0xFFFF)) >> 16);\n } else {\n al0 = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)] & 0xFF;\n }\n al0 = (al0 * (ia >> 16)) >> 8;\n \n int br = m_pixels[xstart];\n int bg = (br & 0xFF00);\n int bb = (br & 0xFF);\n br = (br & 0xFF0000);\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al0) >> 8)) & 0xFF0000) | \n ((bg + (((grn - bg) * al0) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al0) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n }\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n iz+=izadd;\n ia+=iaadd;\n }\n ypixel++;//accurate mode\n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n zleft+=zleftadd;\n aleft+=aleftadd;\n }\n }", "private void prepareProjection(Drawable drawable) {\n Matrix4f viewMatrix = new Matrix4f();\n\n Matrix4f modelMatrix = new Matrix4f();\n\n// Translate camera\n org.lwjgl.util.vector.Matrix4f.translate(this.camera.getPosition(), viewMatrix, viewMatrix);\n\n// Scale, translate and rotate model\n Vector3f modelAngle = drawable.getModelAngle();\n Matrix4f.scale(drawable.getModelScale(), modelMatrix, modelMatrix);\n Matrix4f.translate(drawable.getPosition(), modelMatrix, modelMatrix);\n Matrix4f.rotate(MathUtil.degreesToRadians(modelAngle.z), new Vector3f(0, 0, 1),\n modelMatrix, modelMatrix);\n Matrix4f.rotate(MathUtil.degreesToRadians(modelAngle.y), new Vector3f(0, 1, 0),\n modelMatrix, modelMatrix);\n Matrix4f.rotate(MathUtil.degreesToRadians(modelAngle.x), new Vector3f(1, 0, 0),\n modelMatrix, modelMatrix);\n// Upload matrices to the uniform variables\n GL20.glUseProgram(shaderProgram.getGlProgramId());\n this.camera.getProjectionMatrix().store(matrix44Buffer);\n matrix44Buffer.flip();\n\n /// http://lwjgl.org/wiki/index.php?title=The_Quad_with_Projection,_View_and_Model_matrices\n GL20.glUniformMatrix4(projectionMatrixLocation, false, matrix44Buffer);\n viewMatrix.store(matrix44Buffer);\n matrix44Buffer.flip();\n GL20.glUniformMatrix4(viewMatrixLocation, false, matrix44Buffer);\n modelMatrix.store(matrix44Buffer);\n matrix44Buffer.flip();\n GL20.glUniformMatrix4(modelMatrixLocation, false, matrix44Buffer);\n GL20.glUseProgram(0);\n this.exitOnGLError(\"logicCycle\");\n }", "public static void glMultMatrixf(FloatBuffer left, FloatBuffer right, FloatBuffer result) {\n final int leftPosition = left.position();\n final int rightPosition = right.position();\n final int resultPosition = result.position();\n result.put(resultPosition + 0,\n (left.get(leftPosition + 0) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 3)));\n result.put(resultPosition + 4,\n (left.get(leftPosition + 0) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 7)));\n result.put(resultPosition + 8,\n (left.get(leftPosition + 0) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 11)));\n result.put(resultPosition + 12,\n (left.get(leftPosition + 0) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 4) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 8) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 12) * right.get(rightPosition + 15)));\n\n result.put(resultPosition + 1,\n (left.get(leftPosition + 1) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 3)));\n result.put(resultPosition + 5,\n (left.get(leftPosition + 1) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 7)));\n result.put(resultPosition + 9,\n (left.get(leftPosition + 1) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 11)));\n result.put(resultPosition + 13,\n (left.get(leftPosition + 1) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 5) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 9) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 13) * right.get(rightPosition + 15)));\n\n result.put(resultPosition + 2,\n (left.get(leftPosition + 2) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 3)));\n result.put(resultPosition + 6,\n (left.get(leftPosition + 2) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 7)));\n result.put(resultPosition + 10,\n (left.get(leftPosition + 2) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 11)));\n result.put(resultPosition + 14,\n (left.get(leftPosition + 2) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 6) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 10) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 14) * right.get(rightPosition + 15)));\n\n result.put(resultPosition + 3,\n (left.get(leftPosition + 3) * right.get(rightPosition + 0))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 1))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 2))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 3)));\n result.put(resultPosition + 7,\n (left.get(leftPosition + 3) * right.get(rightPosition + 4))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 5))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 6))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 7)));\n result.put(resultPosition + 11,\n (left.get(leftPosition + 3) * right.get(rightPosition + 8))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 9))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 10))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 11)));\n result.put(resultPosition + 15,\n (left.get(leftPosition + 3) * right.get(rightPosition + 12))\n + (left.get(leftPosition + 7) * right.get(rightPosition + 13))\n + (left.get(leftPosition + 11) * right.get(rightPosition + 14))\n + (left.get(leftPosition + 15) * right.get(rightPosition + 15)));\n }", "public void drawTriangles(float[] mvpMatrix)\n\t{\n // Add program to OpenGL ES environment\n //GLES20.glUseProgram(mTriProgram);\n GLES20.glUseProgram(chopperProgram);\n int error = GLES20.glGetError();\n if (error != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper: Use Tri Program Error: \" + error);\n }\n\n // get handle to vertex shader's vPosition member\n mPositionHandle = GLES20.glGetAttribLocation(chopperProgram, \"vPosition\");\n if (mPositionHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get mPositionHandle\");\n }\n\n // get handle to shape's transformation matrix\n mMVPMatrixHandle = GLES20.glGetUniformLocation(chopperProgram, \"uMVPMatrix\");\n\n // Pass the projection and view transformation to the shader\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);\n\n // Enable a handle to the cube vertices\n GLES20.glEnableVertexAttribArray(mPositionHandle);\n\n // Prepare the cube coordinate data\n GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false,\n\t\t\t\t\t\t\t\t\t vertexStride, triVertexBuffer);\n\n // get handle to vertex shader's vColor member\n if (vertexColor)\n {\n mColorHandle = GLES20.glGetAttribLocation(chopperProgram, \"vColor\");\n if (mColorHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get vColor\");\n }\n GLES20.glEnableVertexAttribArray(mColorHandle);\n\n GLES20.glVertexAttribPointer(mColorHandle, COLORS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false, colorStride, triColBuffer);\n }\n else\n {\n mColorHandle = GLES20.glGetUniformLocation(chopperProgram, \"vColor\");\n\t\t\tGLES20.glUniform4f(mColorHandle,color[0],color[1],color[2],color[3]);\n }\n\n if (StigChopper.textures)\n {\n mTextureUniformHandle = GLES20.glGetUniformLocation(chopperProgram, \"u_texture\");\n if (mTextureUniformHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get texture uniform\");\n }\n\n mTextureCoordinateHandle = GLES20.glGetAttribLocation(chopperProgram, \"a_texCoordinate\");\n if (mTextureCoordinateHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get texture coordinates.\");\n }\n GLES20.glEnableVertexAttribArray(mTextureCoordinateHandle);\n\n // Prepare the uv coordinate data.\n GLES20.glVertexAttribPointer(mTextureCoordinateHandle, 2,\n\t\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false, 8, triUvBuffer);\n\n // Set the active texture unit to texture unit 0.\n GLES20.glActiveTexture(GLES20.GL_TEXTURE0);\n\n // Bind the texture to this unit.\n GLES20.glBindTexture(GLES20.GL_TEXTURE_2D, -1);\n\n\t\t\t// Tell the texture uniform sampler to use this texture in the shader by binding to texture unit 0.\n\t\t\tGLES20.glUniform1i(mTextureUniformHandle, 0);\n }\n\n GLES20.glDrawElements(GLES20.GL_TRIANGLES, triDrawListBuffer.capacity(),\n\t\t\t\t\t\t\t GLES20.GL_UNSIGNED_INT, triDrawListBuffer);\n int drawError = GLES20.glGetError();\n if (drawError != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper:Triangle Draw Elements Error: \" + drawError + \", color: \" + vertexColor + \", text: \" + textures);\n }\n\n if (StigChopper.textures)\n {\n // Disable texture array\n GLES20.glDisableVertexAttribArray(mTextureCoordinateHandle);\n }\n\n // Disable vertex array\n GLES20.glDisableVertexAttribArray(mPositionHandle);\n if (vertexColor)\n {\n GLES20.glDisableVertexAttribArray(mColorHandle);\n }\n\t}", "public Matrix4f getWorldMatrix() {\n\n\t\t// First identity\n\t\tmTranformation.identity();\n\n\t\t// Translate\n\t\tmTranformation.translate(position);\n\n\t\t// Rotate object at the center of the texture\n\t\tfloat x = 0.5f * mWidth;\n\t\tfloat y = 0.5f * mHeight;\n\n\t\t// Do rotating\n\t\tmTranformation.translate(new Vector3f(x, y, 0));\n\t\tmTranformation.rotateZ((float) Math.toRadians(rotation.z));\n\t\tmTranformation.translate(new Vector3f(-x, -y, 0));\n\n\t\t// mTranformation.scale(scale, scale, 1);\n\t\tmTranformation.scaleAround(scale, x, y, 0);\n\n\t\treturn mTranformation;\n\t}", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n \n float ratio = (float) width / height;\n /*\n mWidth = width;\n mHeight = height;\n */\n \n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n /*\n Near / far clipping planes, in terms of units away from the camera\n Cannot be negative or 0, should not be close to 0\n */\n //Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n Matrix.frustumM(mProjMatrix, 0, -ratio, ratio, -1, 1, 0.5f, 21);\n \n }", "public abstract Matrix4f getCameraMatrix();", "private void drawsegment_gouraud_texture24_alpha\n (\n float leftadd,\n float rghtadd,\n int ytop,\n int ybottom\n ) {\n \n //Accurate texture mode added - comments stripped from dupe code, see drawsegment_texture24() for details\n int ypixel = ytop;\n int lastRowStart = m_texture.length - TEX_WIDTH - 2;\n boolean accurateMode = parent.hints[ENABLE_ACCURATE_TEXTURES];\n float screenx = 0; float screeny = 0; float screenz = 0;\n float a = 0; float b = 0; float c = 0;\n int linearInterpPower = TEX_INTERP_POWER;\n int linearInterpLength = 1 << linearInterpPower;\n if (accurateMode){\n if(precomputeAccurateTexturing()){ //see if the precomputation goes well, if so finish the setup\n newax *= linearInterpLength;\n newbx *= linearInterpLength;\n newcx *= linearInterpLength;\n screenz = nearPlaneDepth;\n firstSegment = false;\n } else{\n accurateMode = false; //if the matrix inversion screwed up, revert to normal rendering (something is degenerate)\n }\n }\n \n ytop *= SCREEN_WIDTH;\n ybottom *= SCREEN_WIDTH;\n // int p = m_index;\n \n float iuf = iuadd;\n float ivf = ivadd;\n float irf = iradd;\n float igf = igadd;\n float ibf = ibadd;\n float iaf = iaadd;\n \n while (ytop < ybottom) {\n int xstart = (int) (xleft + PIXEL_CENTER);\n if (xstart < 0)\n xstart = 0;\n \n int xpixel = xstart;//accurate mode\n \n int xend = (int) (xrght + PIXEL_CENTER);\n if (xend > SCREEN_WIDTH)\n xend = SCREEN_WIDTH;\n float xdiff = (xstart + PIXEL_CENTER) - xleft;\n \n int iu = (int) (iuf * xdiff + uleft);\n int iv = (int) (ivf * xdiff + vleft);\n int ir = (int) (irf * xdiff + rleft);\n int ig = (int) (igf * xdiff + gleft);\n int ib = (int) (ibf * xdiff + bleft);\n int ia = (int) (iaf * xdiff + aleft);\n float iz = izadd * xdiff + zleft;\n \n xstart+=ytop;\n xend+=ytop;\n \n if (accurateMode){\n screenx = xmult*(xpixel+.5f-(SCREEN_WIDTH/2.0f));\n screeny = ymult*(ypixel+.5f-(SCREEN_HEIGHT/2.0f));\n a = screenx*ax+screeny*ay+screenz*az;\n b = screenx*bx+screeny*by+screenz*bz;\n c = screenx*cx+screeny*cy+screenz*cz;\n }\n boolean goingIn = ( (newcx > 0) == (c > 0) )?false:true;\n int interpCounter = 0;\n int deltaU = 0; int deltaV = 0;\n float fu = 0; float fv = 0;\n float oldfu = 0; float oldfv = 0;\n \n if (accurateMode&&goingIn){\n int rightOffset = (xend-xstart-1)%linearInterpLength;\n int leftOffset = linearInterpLength-rightOffset;\n float rightOffset2 = rightOffset / ((float)linearInterpLength);\n float leftOffset2 = leftOffset / ((float)linearInterpLength);\n interpCounter = leftOffset;\n float ao = a-leftOffset2*newax;\n float bo = b-leftOffset2*newbx;\n float co = c-leftOffset2*newcx;\n float oneoverc = 65536.0f/co;\n oldfu = (ao*oneoverc); oldfv = (bo*oneoverc);\n a += rightOffset2*newax;\n b += rightOffset2*newbx;\n c += rightOffset2*newcx;\n oneoverc = 65536.0f/c;\n fu = a*oneoverc; fv = b*oneoverc;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n iu = ( (int)oldfu )+(leftOffset-1)*deltaU; iv = ( (int)oldfv )+(leftOffset-1)*deltaV; //another \"off-by-one\" hack\n } else{\n float preoneoverc = 65536.0f/c;\n fu = (a*preoneoverc);\n fv = (b*preoneoverc);\n }\n \n for ( ;xstart < xend; xstart++ ) {\n if(accurateMode){\n if (interpCounter == linearInterpLength) interpCounter = 0;\n if (interpCounter == 0){\n a += newax;\n b += newbx;\n c += newcx;\n float oneoverc = 65536.0f/c;\n oldfu = fu; oldfv = fv;\n fu = (a*oneoverc); fv = (b*oneoverc);\n iu = (int)oldfu; iv = (int)oldfv;\n deltaU = ((int)(fu - oldfu)) >> linearInterpPower;\n deltaV = ((int)(fv - oldfv)) >> linearInterpPower;\n } else{\n iu += deltaU;\n iv += deltaV;\n }\n interpCounter++;\n }\n \n // get texture pixel color\n try\n {\n //if (iz < m_zbuffer[xstart]) {\n if (noDepthTest || (iz <= m_zbuffer[xstart])) { // [fry 041114]\n //m_zbuffer[xstart] = iz;\n \n // blend\n int al = ia >> 16;\n \n int red;\n int grn;\n int blu;\n \n if (m_bilinear) {\n int ofs = (iv >> 16) * TEX_WIDTH + (iu >> 16);\n int iui = (iu & 0xFFFF) >> 9;\n int ivi = (iv & 0xFFFF) >> 9;\n \n // get texture pixels\n int pix0 = m_texture[ofs];\n int pix1 = m_texture[ofs + 1];\n if (ofs < lastRowStart) ofs+=TEX_WIDTH;\n int pix2 = m_texture[ofs];\n int pix3 = m_texture[ofs + 1];\n \n // red\n int red0 = (pix0 & 0xFF0000);\n int red2 = (pix2 & 0xFF0000);\n int up = red0 + ((((pix1 & 0xFF0000) - red0) * iui) >> 7);\n int dn = red2 + ((((pix3 & 0xFF0000) - red2) * iui) >> 7);\n red = (up + (((dn-up) * ivi) >> 7)) >> 16;\n \n // grn\n red0 = (pix0 & 0xFF00);\n red2 = (pix2 & 0xFF00);\n up = red0 + ((((pix1 & 0xFF00) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF00) - red2) * iui) >> 7);\n grn = (up + (((dn-up) * ivi) >> 7)) >> 8;\n \n // blu\n red0 = (pix0 & 0xFF);\n red2 = (pix2 & 0xFF);\n up = red0 + ((((pix1 & 0xFF) - red0) * iui) >> 7);\n dn = red2 + ((((pix3 & 0xFF) - red2) * iui) >> 7);\n blu = up + (((dn-up) * ivi) >> 7);\n } else {\n blu = m_texture[(iv >> 16) * TEX_WIDTH + (iu >> 16)];\n red = (blu & 0xFF0000) >> 16; // 0 - 255\n grn = (blu & 0xFF00) >> 8; // 0 - 255\n blu = (blu & 0xFF); // 0 - 255\n }\n \n // multiply with gouraud color\n red = (red * ir) >>> 8; // 0x00FF????\n grn = (grn * ig) >>> 16; // 0x0000FF??\n blu = (blu * ib) >>> 24; // 0x000000FF\n \n // get buffer pixels\n int bb = m_pixels[xstart];\n int br = (bb & 0xFF0000); // 0x00FF0000\n int bg = (bb & 0xFF00); // 0x0000FF00\n bb = (bb & 0xFF); // 0x000000FF\n \n //\n m_pixels[xstart] = 0xFF000000 | \n ((br + (((red - br) * al) >> 8)) & 0xFF0000) |\n ((bg + (((grn - bg) * al) >> 8)) & 0xFF00) | \n ((bb + (((blu - bb) * al) >> 8)) & 0xFF);\n // m_stencil[xstart] = p;\n }\n }\n catch (Exception e) {\n }\n \n //\n xpixel++;//accurate mode\n if (!accurateMode){\n iu+=iuadd;\n iv+=ivadd;\n }\n ir+=iradd;\n ig+=igadd;\n ib+=ibadd;\n ia+=iaadd;\n iz+=izadd;\n }\n \n ypixel++;//accurate mode\n \n ytop+=SCREEN_WIDTH;\n xleft+=leftadd;\n xrght+=rghtadd;\n uleft+=uleftadd;\n vleft+=vleftadd;\n rleft+=rleftadd;\n gleft+=gleftadd;\n bleft+=bleftadd;\n aleft+=aleftadd;\n zleft+=zleftadd;\n }\n }", "private void arretes_fY(){\n\t\tthis.cube[49] = this.cube[46]; \n\t\tthis.cube[46] = this.cube[48];\n\t\tthis.cube[48] = this.cube[52];\n\t\tthis.cube[52] = this.cube[50];\n\t\tthis.cube[50] = this.cube[49];\n\t}", "public void drawTailRotor(float[] mvpMatrix)\n\t{\n GLES20.glUseProgram(chopperProgram);\n int error = GLES20.glGetError();\n if (error != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper -- rotors: Use Program Error: \" + error);\n }\n\n // get handle to vertex shader's vPosition member\n mPositionHandle = GLES20.glGetAttribLocation(chopperProgram, \"vPosition\");\n if (mPositionHandle < 0)\n {\n System.out.println(\"StigChopper -- rotors: Failed to get mPositionHandle\");\n }\n\n // get handle to shape's transformation matrix\n mMVPMatrixHandle = GLES20.glGetUniformLocation(chopperProgram, \"uMVPMatrix\");\n\n // Enable a handle to the cube vertices\n GLES20.glEnableVertexAttribArray(mPositionHandle);\n\n // Prepare the cube coordinate data\n GLES20.glVertexAttribPointer(mPositionHandle, COORDS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false,\n\t\t\t\t\t\t\t\t\t vertexStride, tailRotorVertexBuffer);\n\n // get handle to vertex shader's vColor member\n if (vertexColor)\n {\n mColorHandle = GLES20.glGetAttribLocation(chopperProgram, \"vColor\");\n if (mColorHandle < 0)\n {\n System.out.println(\"StigChopper: Failed to get vColor\");\n }\n GLES20.glEnableVertexAttribArray(mColorHandle);\n\n GLES20.glVertexAttribPointer(mColorHandle, COLORS_PER_VERTEX,\n\t\t\t\t\t\t\t\t\t\t GLES20.GL_FLOAT, false, colorStride, triColBuffer);\n }\n else\n {\n mColorHandle = GLES20.glGetUniformLocation(chopperProgram, \"vColor\");\n\t\t\tGLES20.glUniform4f(mColorHandle,1.0f,1.0f,0.0f,0.6f);\n }\n\n // Pass the projection and view transformation to the shader\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mvpMatrix, 0);\n\n\t\tGLES20.glLineWidth(lineWidth);\n GLES20.glDrawElements(GLES20.GL_LINES, tailRotorDrawListBuffer.capacity(),\n\t\t\t\t\t\t\t GLES20.GL_UNSIGNED_INT, tailRotorDrawListBuffer);\n int drawError = GLES20.glGetError();\n if (drawError != GLES20.GL_NO_ERROR)\n {\n System.out.println(\"StigChopper: Rotor Draw Elements Error: \" + drawError + \", color: \" + vertexColor + \", text: \" + textures);\n }\n\n // Disable vertex array\n GLES20.glDisableVertexAttribArray(mPositionHandle);\n if (vertexColor)\n {\n GLES20.glDisableVertexAttribArray(mColorHandle);\n }\n\t}", "private void drawDynamic() {\n GLES20.glUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // This multiplies the modelview matrix by the projection matrix, and stores the result in the MVP matrix\n // (which now contains model * view * projection).\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n\n // Pass in the combined matrix.\n GLES20.glUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Pass in the light position in eye space.\n GLES20.glUniform3f(mLightPosHandle, mLightPosInEyeSpace[0], mLightPosInEyeSpace[1], mLightPosInEyeSpace[2]);\n }", "public abstract Vector4fc mul(IMatrix4f mat);", "@Override\n\t\tpublic void render()\n\t\t{\n\t\t\tif(color.alpha() > 0)\n\t\t\t{\n\t\t\t\tbind();\n\t\t\t\tGL11.glBindTexture(GL11.GL_TEXTURE_2D, 0);\n\t\t\t\tGL11.glBegin(GL11.GL_TRIANGLE_STRIP);\n\t\t\t\t\tfloat screenWidth = WindowManager.controller().width();\n\t\t\t\t\tfloat screenHeight = WindowManager.controller().height();\n\t\t\t\t\tGL11.glVertex2f(0, 0);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, 0);\n\t\t\t\t\tGL11.glVertex2f(0, screenHeight);\n\t\t\t\t\tGL11.glVertex2f(screenWidth, screenHeight);\n\t\t\t\tGL11.glEnd();\n\t\t\t\trelease();\n\t\t\t}\n\t\t}", "public void display(GLAutoDrawable drawable){\n GL4 gl = (GL4) GLContext.getCurrentGL();\n \n gl.glClear(GL_DEPTH_BUFFER_BIT);\n \n // not needed if bkg is black\n float bkg[] = { 1.0f, 1.0f, 1.0f, 1.0f };\n FloatBuffer bkgBuffer = Buffers.newDirectFloatBuffer(bkg);\n gl.glClearBufferfv(GL_COLOR, 0, bkgBuffer);\n\n \n gl.glUseProgram(rendering_program); // loads program from init with the two shaders\n \n // define perspective matrix \n //perspective\n float aspect = (float) myCanvas.getWidth()/(float) myCanvas.getHeight();\n Matrix3D pMat = this.perspectiveMethod(60.0f, aspect, 0.1f, 100.0f);\t\t//for persective projection /zentrische Projektion\n Matrix3D oMat = this.orthographicMethod(1.0f, -1.0f, 1.0f, -1.0f, 0.1f, 100.0f); //for orthographic projection\n \n \n //copy perspective and MV matricies to corressponding uniform variables\n int mv_loc = gl.glGetUniformLocation(rendering_program, \"mv_matrix\");\n int proj_loc = gl.glGetUniformLocation(rendering_program, \"proj_matrix\");\n \n //build view matrix\n Matrix3D vMat = new Matrix3D();\n vMat.translate(-cameraX, -cameraY, -cameraZ);\n \n //build model matrix\n Matrix3D mMat = new Matrix3D(); //for right now we dont do anything (rotate, translate etc.) in with the mMat in this project\n\n Matrix3D mvMat = new Matrix3D();\n mvMat.concatenate(vMat);\t\t\t//first view matrix \n mvMat.concatenate(mMat);\t\t\t//second we put the model matrix on it (A * B)\n \n\n //plug the mvMat and pMat into the shader uniform variables \n gl.glUniformMatrix4fv(mv_loc, 1, false, mvMat.getFloatValues(),0);\n gl.glUniformMatrix4fv(proj_loc, 1, false, pMat.getFloatValues(),0);\n \n \n //be sure to bind the vbo before assigning the attribute pointer\n gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[0]); \n // now set the \"location = 0\" info in the shaders to the point info from vbo[0]\n gl.glVertexAttribPointer(0, 3, GL_FLOAT, false, 0, 0);\n gl.glEnableVertexAttribArray(0);\n \n gl.glBindBuffer(GL_ARRAY_BUFFER, vbo[1]);\n gl.glVertexAttribPointer(1, 3, GL_FLOAT, false, 0, 0);\n gl.glEnableVertexAttribArray(1);\n \n gl.glLineWidth(10.0f);\n \n gl.glEnable(GL_DEPTH_TEST);\n gl.glDrawArrays(GL_LINES, 0, 4);\n\n }", "@Override\n public void onDrawFrame(GL10 unused) {\n GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT);\n GLES20.glClearColor(Player.colorBG[0], Player.colorBG[1], Player.colorBG[2], 1.0f);\n // Set the camera position (View matrix)\n Matrix.setLookAtM(mViewMatrix, 0, 0, 0, -3, 0f, 0f, 0f, 0f, 1.0f, 0.0f);\n\n // Calculate the projection and view transformation\n Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mViewMatrix, 0);\n\n Matrix.translateM(mMVPMatrix, 0, getScreenWidth()/2, -getScreenHeight()/2, 0); // apply translation\n Matrix.scaleM(mMVPMatrix,0,scaler,scaler,scaler);\n mSquare.draw(mMVPMatrix,Player.colorP1);\n mHat.draw(mMVPMatrix);\n\n robe.draw(mMVPMatrix, Robe.LEFT_ROBE);\n p1Eye.draw(mMVPMatrix, Circle.FACE_RIGHT, true, true);\n\n Matrix.multiplyMM(mMVPMatrix2, 0, mProjectionMatrix, 0, mViewMatrix, 0);\n Matrix.translateM(mMVPMatrix2, 0, -getScreenWidth()/2, -getScreenHeight()/2, 0);\n Matrix.scaleM(mMVPMatrix2,0,scaler,scaler,scaler);\n mSquare2.draw(mMVPMatrix2,Player.colorP2);\n mHat2.draw(mMVPMatrix2);\n\n robe2.draw(mMVPMatrix2, Robe.RIGHT_ROBE);\n p2Eye.draw(mMVPMatrix2, Circle.FACE_LEFT, true, true);\n }", "private void aretes_aW(){\n\t\tthis.cube[4] = this.cube[16]; \n\t\tthis.cube[16] = this.cube[23];\n\t\tthis.cube[23] = this.cube[37];\n\t\tthis.cube[37] = this.cube[30];\n\t\tthis.cube[30] = this.cube[4];\n\t}", "protected void initTransforms() {\n for (int i = 0; i < cornerCount; i++) {\n int index = cornerOffset + i;\n identityVertexMatrix[index] = new idx3d_Matrix();\n }\n\n // 0:urf\n identityVertexMatrix[cornerOffset + 0].rotate(0, -HALF_PI, 0);\n // 1:dfr\n identityVertexMatrix[cornerOffset + 1].rotate(0, 0, PI);\n // 2:ubr\n identityVertexMatrix[cornerOffset + 2].rotate(0, PI, 0);\n // 3:drb\n identityVertexMatrix[cornerOffset + 3].rotate(0, 0, PI);\n identityVertexMatrix[cornerOffset + 3].rotate(0, -HALF_PI, 0);\n // 4:ulb\n identityVertexMatrix[cornerOffset + 4].rotate(0, HALF_PI, 0);\n // 5:dbl\n identityVertexMatrix[cornerOffset + 5].rotate(PI, 0, 0);\n // 6:ufl\n //--no transformation---\n // 7:dlf\n identityVertexMatrix[cornerOffset + 7].rotate(0, HALF_PI, 0);\n identityVertexMatrix[cornerOffset + 7].rotate(PI, 0, 0);\n //\n // We can clone the normalmatrix here form the vertex matrix, because\n // the vertex matrix consists of rotations only.\n for (int i = 0; i < cornerCount; i++) {\n identityNormalMatrix[i] = identityVertexMatrix[i].getClone();\n }\n\n /**\n * Edges\n */\n // Move all edge parts to front up (fu) and then rotate them in place\n for (int i = 0; i < edgeCount; i++) {\n int index = edgeOffset + i;\n idx3d_Matrix vt = new idx3d_Matrix();\n idx3d_Matrix nt = new idx3d_Matrix();\n identityVertexMatrix[index] = vt;\n identityNormalMatrix[index] = nt;\n // The vertex matrix is the same as the normal matrix, but with\n // an additional shift, which is made before the rotation.\n if (i >= 12) {\n switch ((i - 12) % 24) {\n case 12:\n case 13:\n case 2:\n case 3:\n case 4:\n case 17:\n case 6:\n case 19:\n case 20:\n case 21:\n case 10:\n case 11:\n vt.shift(PART_LENGTH*((i+12)/24), 0f, 0f);\n break;\n default:\n vt.shift(-PART_LENGTH*((i+12)/24), 0f, 0f);\n break;\n }\n }\n // Now we do the rotation with the normal matrix only\n switch (i % 12) {\n case 0: // ur\n nt.rotate(0, HALF_PI, 0f);\n nt.rotate(0, 0, HALF_PI);\n break;\n case 1: // rf\n nt.rotate(0, -HALF_PI, 0);\n nt.rotate(HALF_PI, 0, 0);\n break;\n case 2: // dr\n nt.rotate(0, -HALF_PI, HALF_PI);\n break;\n case 3: // bu\n nt.rotate(0, PI, 0);\n break;\n case 4: // rb\n nt.rotate(0, 0, HALF_PI);\n nt.rotate(0, -HALF_PI, 0);\n break;\n case 5: // bd\n nt.rotate(PI, 0, 0);\n break;\n case 6: // ul\n nt.rotate(-HALF_PI, -HALF_PI, 0);\n break;\n case 7: // lb\n nt.rotate(0, 0, -HALF_PI);\n nt.rotate(0, HALF_PI, 0);\n break;\n case 8: // dl\n nt.rotate(HALF_PI, HALF_PI, 0);\n break;\n case 9: // fu\n //--no transformation--\n break;\n case 10: // lf\n nt.rotate(0, 0, HALF_PI);\n nt.rotate(0, HALF_PI, 0);\n break;\n case 11: // fd\n nt.rotate(0, 0, PI);\n break;\n }\n // Finally, we concatenate the rotation to the vertex matrix\n vt.transform(nt);\n }\n /* Sides\n */\n // Move all side parts to the front side and rotate them into place\n for (int i = 0; i < sideCount; i++) {\n int index = sideOffset + i;\n idx3d_Matrix vt = new idx3d_Matrix();\n idx3d_Matrix nt = new idx3d_Matrix();\n identityVertexMatrix[index] = vt;\n identityNormalMatrix[index] = nt;\n // The vertex matrix is the same as the normal matrix, but with\n // an additional shift, which is made before the rotation.\n switch (i / 6) {\n // central part\n case 0 :\n // vt.shift(0, 0, 0);\n break;\n // inner ring\n case 1:\n vt.shift(-PART_LENGTH, -PART_LENGTH, 0);\n break;\n case 2:\n vt.shift(-PART_LENGTH, PART_LENGTH, 0);\n break;\n case 3:\n vt.shift(PART_LENGTH, PART_LENGTH, 0);\n break;\n case 4:\n vt.shift(PART_LENGTH, -PART_LENGTH, 0);\n break;\n case 5:\n vt.shift(0, -PART_LENGTH, 0);\n break;\n case 6:\n vt.shift(-PART_LENGTH, 0, 0);\n break;\n case 7:\n vt.shift(0, PART_LENGTH, 0);\n break;\n case 8:\n vt.shift(PART_LENGTH, 0, 0);\n break;\n // outer ring corners\n /*\n * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n * | .0 | .2 | .3 | .1 |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |75 |129|81 |105|57 | | |62 |140|92 |116|68 | | |66 |144|96 |120|72 | | |59 |137|89 |113|65 | |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |123|27 |33 | 9 |135| | |110|14 |44 |20 |146| | |114|18 |48 |24 |126| | |107|11 |41 |17 |143| |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | .3|99 |51 | 3 |39 |87 |.1 | .1|86 |38 | 2 |50 |98 |.3 | .2|90 |42 | 0 |30 |78 |.0 | .0|83 |35 | 5 |47 |95 |.2 |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |147|21 |45 |15 |111| | |134| 8 |32 |26 |122| | |138|12 |36 | 6 |102| | |131|29 |53 |23 |119| |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | |69 |117|93 |141|63 | | |56 |104|80 |128|74 | | |60 |108|84 |132|54 | | |77 |125|101|149|71 | |\n * + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ + +---+---+---+---+---+ +\n * | .2 | .0 | .1 | .3 |\n * +---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+\n */\n case 9:\n vt.shift(-2f*PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n case 10:\n vt.shift(-2f*PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 11:\n vt.shift(2f*PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 12:\n vt.shift(2f*PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n // outer ring central edges\n case 13:\n vt.shift(0, -2f*PART_LENGTH, 0);\n break;\n case 14:\n vt.shift(-2f*PART_LENGTH, 0, 0);\n break;\n case 15:\n vt.shift(0, 2f*PART_LENGTH, 0);\n break;\n case 16:\n vt.shift(2f*PART_LENGTH, 0, 0);\n break;\n // outer ring clockwise shifted edges\n case 17:\n vt.shift(-PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n case 18:\n vt.shift(-2f*PART_LENGTH, PART_LENGTH, 0);\n break;\n case 19:\n vt.shift(PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 20:\n vt.shift(2f*PART_LENGTH, -PART_LENGTH, 0);\n break;\n // outer ring counter-clockwise shifted edges\n case 21:\n vt.shift(PART_LENGTH, -2f*PART_LENGTH, 0);\n break;\n case 22:\n vt.shift(-2f*PART_LENGTH, -PART_LENGTH, 0);\n break;\n case 23:\n vt.shift(-PART_LENGTH, 2f*PART_LENGTH, 0);\n break;\n case 24:\n vt.shift(2f*PART_LENGTH, PART_LENGTH, 0);\n break;\n\n }\n\n switch (i % 6) {\n case 0 : // r\n nt.rotate(0f, 0f, -HALF_PI);\n nt.rotate(0f, -HALF_PI, 0f);\n break;\n case 1 : // u\n nt.rotate(0f, 0f, HALF_PI);\n nt.rotate(-HALF_PI, 0f, 0f);\n break;\n case 2 : // f\n //--no transformation--\n break;\n case 3 : // l\n nt.rotate(0f, 0f, PI);\n nt.rotate(0f, HALF_PI, 0f);\n break;\n case 4 : // d\n nt.rotate(0f, 0f, PI);\n nt.rotate(HALF_PI, 0f, 0f);\n break;\n case 5 : // b\n nt.rotate(0f, 0f, HALF_PI);\n nt.rotate(0f, PI, 0f);\n break;\n }\n // Finally, we concatenate the rotation to the vertex matrix\n vt.transform(nt);\n }\n\n\n // Center part\n identityVertexMatrix[centerOffset] = new idx3d_Matrix();\n identityNormalMatrix[centerOffset] = new idx3d_Matrix();\n\n // copy all vertex locationTransforms into the normal locationTransforms.\n // create the locationTransforms\n for (int i = 0; i < partCount; i++) {\n\n locationTransforms[i] = new idx3d_Group();\n locationTransforms[i].matrix.set(identityVertexMatrix[i]);\n locationTransforms[i].normalmatrix.set(identityNormalMatrix[i]);\n\n explosionTransforms[i] = new idx3d_Group();\n explosionTransforms[i].addChild(parts[i]);\n locationTransforms[i].addChild(explosionTransforms[i]);\n }\n }", "public static Texture getCh4(){\n //set a linear filter to clean image\n ch4.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear);\n //return image\n return ch4;\n }", "public abstract Vector4fc zero();", "public static Vector4 up()\n {\n return new Vector4(0,1,0,0);\n }", "private native void convertToLum( short[] data, int w, int h );", "public static void init() {\n // init quad VAO\n vao = glGenVertexArrays();\n glBindVertexArray(vao);\n int positionVbo = glGenBuffers();\n FloatBuffer fb = BufferUtils.createFloatBuffer(2 * 4);\n fb.put(0.0f).put(0.0f);\n fb.put(1.0f).put(0.0f);\n fb.put(1.0f).put(1.0f);\n fb.put(0.0f).put(1.0f);\n fb.flip();\n glBindBuffer(GL_ARRAY_BUFFER, positionVbo);\n glBufferData(GL_ARRAY_BUFFER, fb, GL_STATIC_DRAW);\n glVertexAttribPointer(Main.shader.inPositionLoc, 2, GL_FLOAT, false, 0, 0L);\n glEnableVertexAttribArray(Main.shader.inPositionLoc);\n glBindBuffer(GL_ARRAY_BUFFER, 0);\n glBindVertexArray(0);\n \n // init texture\n IntBuffer width = BufferUtils.createIntBuffer(1);\n IntBuffer height = BufferUtils.createIntBuffer(1);\n IntBuffer components = BufferUtils.createIntBuffer(1);\n byte[] dataArr = Main.loadResource(\"resources/font DF.png\");\n ByteBuffer data = BufferUtils.createByteBuffer(dataArr.length);\n data.put(dataArr).rewind();\n data = Objects.requireNonNull(stbi_load_from_memory(data, width, height, components, 1));\n int imgWidth = width.get();\n int imgHeight = height.get();\n charWidth = imgWidth / 16;\n charHeight = imgHeight / 16;\n \n texture = glGenTextures();\n glBindTexture(GL_TEXTURE_2D, texture);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);\n glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);\n glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, imgWidth, imgHeight, 0, GL_RED, GL_UNSIGNED_BYTE, data);\n stbi_image_free(data);\n \n // set texScale uniform\n glUniform2f(Main.shader.texScaleLoc, 1/16f, 1/16f);\n }", "public Matrix4rad() {\r\n\t\tthis(false);\r\n\t}", "public void initIdentity() \r\n\t{\r\n\t\tm[0][0] = 1.0f; m[0][1] = 0.0f; m[0][2] = 0.0f; m[0][3] = 0.0f;\r\n\t\tm[1][0] = 0.0f; m[1][1] = 1.0f; m[1][2] = 0.0f; m[1][3] = 0.0f;\r\n\t\tm[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = 1.0f; m[2][3] = 0.0f;\r\n\t\tm[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 0.0f; m[3][3] = 1.0f;\r\n\t}", "public void perspProjMatrix(PerspInfo p) {\r\n\t\t// First calculate the aspect ratio\r\n\t\tfloat ar = (float)p.Width / (float)p.Height;\r\n\t\t// Calculate the z range\r\n\t\tfloat zRange = p.zNear - p.zFar;\r\n\t\t// Find tan of half the field of view\r\n\t\tfloat tanHalfFOV = (float) Math.tan(Math.toRadians(p.FOV / 2.0));\r\n\r\n\t\t// Finally create a matrix from these values\r\n\t\tm[0][0] = 1.0f/(tanHalfFOV * ar); m[0][1] = 0.0f; m[0][2] = 0.0f; \t\t\t\tm[0][3] = 0.0f;\r\n\t m[1][0] = 0.0f; m[1][1] = 1.0f/tanHalfFOV; m[1][2] = 0.0f; \t\t\t\tm[1][3] = 0.0f;\r\n\t m[2][0] = 0.0f; m[2][1] = 0.0f; m[2][2] = (-p.zNear - p.zFar)/zRange ; \tm[2][3] = 2f * p.zFar * (p.zNear / zRange);\r\n\t m[3][0] = 0.0f; m[3][1] = 0.0f; m[3][2] = 1.0f; \t\t\t\t\t\t\tm[3][3] = 0.0f;\r\n\r\n\t}", "float[] getModelMatrix();", "public OpenGLMatrix createMatrix(float x, float y, float z, float u, float v, float w) {\n return OpenGLMatrix.translation(x, y, z).\n multiplied(Orientation.getRotationMatrix(\n AxesReference.EXTRINSIC, AxesOrder.XYZ, AngleUnit.DEGREES, u, v, w));\n }", "public void build_buffers(float[] color /*RGBA*/) {\n int i;\n int offset = 0;\n final float[] vertexData = new float[\n mVertices.size() / 3\n * STRIDE_IN_FLOATS];\n\n float vx, vy, vz;\n\n /*\n * loop to generate vertices.\n */\n for (i = 0; i < mVertices.size(); i += 3) {\n\n vertexData[offset++] = mVertices.get(i + 0);\n vertexData[offset++] = mVertices.get(i + 1);\n vertexData[offset++] = mVertices.get(i + 2);\n\n vertexData[offset++] = 0.0f; // set normal to zero for now\n vertexData[offset++] = 0.0f;\n vertexData[offset++] = 0.0f;\n\n if (mHaveMaterialColor) {\n vertexData[offset++] = mColors.get(i + 0);\n vertexData[offset++] = mColors.get(i + 1);\n vertexData[offset++] = mColors.get(i + 2);\n vertexData[offset++] = 1.0f; // TODO: unwire the alpha?\n } else {\n // color value\n vertexData[offset++] = color[0];\n vertexData[offset++] = color[1];\n vertexData[offset++] = color[2];\n vertexData[offset++] = color[3];\n }\n }\n\n // calculate the normal,\n // set it in the packed VBO.\n // If current normal is non-zero, average it with previous value.\n\n int v1i, v2i, v3i;\n for (i = 0; i < mIndices.size(); i += 3) {\n v1i = mIndices.get(i + 0) - 1;\n v2i = mIndices.get(i + 1) - 1;\n v3i = mIndices.get(i + 2) - 1;\n\n v1[0] = mVertices.get(v1i * 3 + 0);\n v1[1] = mVertices.get(v1i * 3 + 1);\n v1[2] = mVertices.get(v1i * 3 + 2);\n\n v2[0] = mVertices.get(v2i * 3 + 0);\n v2[1] = mVertices.get(v2i * 3 + 1);\n v2[2] = mVertices.get(v2i * 3 + 2);\n\n v3[0] = mVertices.get(v3i * 3 + 0);\n v3[1] = mVertices.get(v3i * 3 + 1);\n v3[2] = mVertices.get(v3i * 3 + 2);\n\n n = XYZ.getNormal(v1, v2, v3);\n\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v1i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v2i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 0] = n[0] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 1] = n[1] * NORMAL_BRIGHTNESS_FACTOR;\n vertexData[v3i * STRIDE_IN_FLOATS + 3 + 2] = n[2] * NORMAL_BRIGHTNESS_FACTOR;\n\n }\n\n /*\n * debug - print out list of formated vertex data\n */\n// for (i = 0; i < vertexData.length; i+= STRIDE_IN_FLOATS) {\n// vx = vertexData[i + 0];\n// vy = vertexData[i + 1];\n// vz = vertexData[i + 2];\n// String svx = String.format(\"%6.2f\", vx);\n// String svy = String.format(\"%6.2f\", vy);\n// String svz = String.format(\"%6.2f\", vz);\n//\n// Log.w(\"data \", i + \" x y z \"\n// + svx + \" \" + svy + \" \" + svz + \" and color = \"\n// + vertexData[i + 6] + \" \" + vertexData[i + 7] + \" \" + vertexData[i + 8]);\n// }\n\n final FloatBuffer vertexDataBuffer = ByteBuffer\n .allocateDirect(vertexData.length * BYTES_PER_FLOAT)\n .order(ByteOrder.nativeOrder())\n .asFloatBuffer();\n vertexDataBuffer.put(vertexData).position(0);\n\n if (vbo[0] > 0) {\n GLES20.glDeleteBuffers(1, vbo, 0);\n }\n GLES20.glGenBuffers(1, vbo, 0);\n\n if (vbo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, vbo[0]);\n GLES20.glBufferData(GLES20.GL_ARRAY_BUFFER, vertexDataBuffer.capacity() * BYTES_PER_FLOAT,\n vertexDataBuffer, GLES20.GL_STATIC_DRAW);\n\n // GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n\n /*\n * create the buffer for the indices\n */\n offset = 0;\n int x;\n final short[] indexData = new short[mIndices.size()];\n for (x = 0; x < mIndices.size(); x++) {\n\n short index = mIndices.get(x).shortValue();\n indexData[offset++] = --index;\n }\n mTriangleIndexCount = indexData.length;\n\n /*\n * debug - print out list of formated vertex data\n */\n// short ix, iy, iz;\n// for (i = 0; i < indexData.length; i += 3) {\n// ix = indexData[i + 0];\n// iy = indexData[i + 1];\n// iz = indexData[i + 2];\n//\n// Log.w(\"data \", i + \" i1 i2 i3 \"\n// + ix + \" \" + iy + \" \" + iz );\n// }\n\n final ShortBuffer indexDataBuffer = ByteBuffer\n .allocateDirect(indexData.length * BYTES_PER_SHORT).order(ByteOrder.nativeOrder())\n .asShortBuffer();\n indexDataBuffer.put(indexData).position(0);\n\n if (ibo[0] > 0) {\n GLES20.glDeleteBuffers(1, ibo, 0);\n }\n GLES20.glGenBuffers(1, ibo, 0);\n if (ibo[0] > 0) {\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, ibo[0]);\n GLES20.glBufferData(GLES20.GL_ELEMENT_ARRAY_BUFFER,\n indexDataBuffer.capacity()\n * BYTES_PER_SHORT, indexDataBuffer, GLES20.GL_STATIC_DRAW);\n GLES20.glBindBuffer(GLES20.GL_ELEMENT_ARRAY_BUFFER, 0);\n GLES20.glBindBuffer(GLES20.GL_ARRAY_BUFFER, 0);\n } else {\n // errorHandler.handleError(ErrorHandler.ErrorType.BUFFER_CREATION_ERROR, \"glGenBuffers\");\n throw new RuntimeException(\"error on buffer gen\");\n }\n }", "public void drawBale() {\n\t\tvertexData.position(0);\n\t\tglVertexAttribPointer(mPositionHandle, POSITION_COMPONENT_COUNT,\n\t\t\t\tGL_FLOAT, false, 0, vertexData);\n\n\t\tglEnableVertexAttribArray(mPositionHandle);\n\n\t\t// Pass in the color information\n\t\tcolorData.position(0);\n\t\tglVertexAttribPointer(mColorHandle, COLOR_COMPONENT_COUNT,\n\t\t\t\tGL_FLOAT, false, 0, colorData);\n\n\t\tglEnableVertexAttribArray(mColorHandle);\n\t\t\n\t\t// Pass in the texture coordinate information\n textureData.position(0);\n GLES20.glVertexAttribPointer(mTextureCoordHandle, TEXTURE_COMPONENT_COUNT, GLES20.GL_FLOAT, false, \n \t\t0, textureData);\n \n GLES20.glEnableVertexAttribArray(mTextureCoordHandle);\n\n\t\t// This multiplies the view matrix by the model matrix, and stores the\n\t\t// result in the MVP matrix\n\t\t// (which currently contains model * view).\n\t\tmultiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mModelMatrix, 0);\n\n\t\t// Pass in the modelview matrix.\n\t\tglUniformMatrix4fv(mMVMatrixHandle, 1, false, mMVPMatrix, 0);\n\n\t\t// This multiplies the modelview matrix by the projection matrix, and\n\t\t// stores the result in the MVP matrix\n\t\t// (which now contains model * view * projection).\n\t\tMatrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n\n\t\t// Pass in the combined matrix.\n\t\tglUniformMatrix4fv(mMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n\t\t// Draw the cube.\n\t\tglDrawArrays(GL_TRIANGLES, 0, 60);\n\t\tglDrawArrays(GL_TRIANGLE_FAN, 60, 12);\n\t\tglDrawArrays(GL_TRIANGLE_FAN, 72, 12);\n\t}", "void glClear(int mask);", "public void invertNormals() {\n mCubeNormalData = new float[]\n {\n // Front face\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n 0.0f, 0.0f, -1.0f,\n // Right face\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n -1.0f, 0.0f, 0.0f,\n // Back face\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f,\n // Left face\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n 1.0f, 0.0f, 0.0f,\n // Top face\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n 0.0f, -1.0f, 0.0f,\n // Bottom face\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f,\n 0.0f, 1.0f, 0.0f\n };\n mCubeNormals.put(mCubeNormalData).position(0);\n\n }", "private Matrix4f getProjectionNormalized(int w, int h) {\n Matrix4f m1 = new Matrix4f();\n Matrix4f m2 = new Matrix4f();\n\n if(w > h) {\n float aspect = ((float)w) / h;\n m1.loadFrustum(-aspect,aspect, -1,1, 1,100);\n } else {\n float aspect = ((float)h) / w;\n m1.loadFrustum(-1,1, -aspect,aspect, 1,100);\n }\n\n m2.loadRotate(180, 0, 1, 0);\n m1.loadMultiply(m1, m2);\n\n m2.loadScale(-2, 2, 1);\n m1.loadMultiply(m1, m2);\n\n m2.loadTranslate(0, 0, 2);\n m1.loadMultiply(m1, m2);\n return m1;\n }", "private void renderSkybox(int p_73971_1_, int p_73971_2_, float p_73971_3_) {\n\t\tthis.mc.getFramebuffer().unbindFramebuffer();\n\t\tGlStateManager.viewport(0, 0, 256, 256);\n\t\tthis.drawPanorama(p_73971_1_, p_73971_2_, p_73971_3_);\n\t\tthis.rotateSkybox();\n\t\tthis.mc.getFramebuffer().bindFramebuffer(true);\n\t\tGlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight);\n\t\tTessellator var4 = Tessellator.getInstance();\n\t\tWorldRenderer var5 = var4.getWorldRenderer();\n\t\tvar5.startDrawingQuads();\n\t\tfloat var6 = this.width > this.height ? 120.0F / (float) this.width : 120.0F / (float) this.height;\n\t\tfloat var7 = (float) this.height * var6 / 256.0F;\n\t\tfloat var8 = (float) this.width * var6 / 256.0F;\n\t\tvar5.func_178960_a(1.0F, 1.0F, 1.0F, 1.0F);\n\t\tint var9 = this.width;\n\t\tint var10 = this.height;\n\t\tvar5.addVertexWithUV(0.0D, (double) var10, (double) this.zLevel, (double) (0.5F - var7),\n\t\t\t\t(double) (0.5F + var8));\n\t\tvar5.addVertexWithUV((double) var9, (double) var10, (double) this.zLevel, (double) (0.5F - var7),\n\t\t\t\t(double) (0.5F - var8));\n\t\tvar5.addVertexWithUV((double) var9, 0.0D, (double) this.zLevel, (double) (0.5F + var7), (double) (0.5F - var8));\n\t\tvar5.addVertexWithUV(0.0D, 0.0D, (double) this.zLevel, (double) (0.5F + var7), (double) (0.5F + var8));\n\t\tvar4.draw();\n\t}", "static void wing(GL2 gl){\n gl.glPushMatrix();\n gl.glScaled(2.5, 0.1, 1);\n gl.glTranslated(0.5, 0, 0.5);\n cube(gl,1);\n gl.glPopMatrix();\n gl.glPushMatrix();\n gl.glTranslated(2.5, 0, 0);\n cannon(gl);\n gl.glPopMatrix();\n }", "public Matrix4f(Vector4f col1, Vector4f col2, Vector4f col3, Vector4f col4) {\n m00 = col1.x;\n m10 = col1.y;\n m20 = col1.z;\n m30 = col1.w;\n\n m01 = col2.x;\n m11 = col2.y;\n m21 = col2.z;\n m31 = col2.w;\n\n m02 = col3.x;\n m12 = col3.y;\n m22 = col3.z;\n m32 = col3.w;\n\n m03 = col4.x;\n m13 = col4.y;\n m23 = col4.z;\n m33 = col4.w;\n }", "@Override\n \tpublic void draw() {\n \n \t\tGL11.glPushMatrix();\n \t\t\n \t\tGL11.glTranslatef(super.getX(), super.getY(), 0);\n \t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\tMain.BLANK_TEXTURE.bind();\n \t\tGL11.glBegin(GL11.GL_QUADS);\n \t\t{\n \t\t\t\n \t\t\tGL11.glColor3f(1.0f, 0.0f, 0.0f);\n \t\t\tGL11.glVertex2f(0, 0); // top left\n \t\t\tGL11.glVertex2f(0, Main.gridSize); // bottom left\n \t\t\tGL11.glVertex2f(Main.gridSize, Main.gridSize); // bottom right\n \t\t\tGL11.glVertex2f(Main.gridSize, 0); // top right\n \t\t\t\n \t\t\t\n \t\t\tif (isRight()) {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 12);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 3);\n \t\t\t\tGL11.glVertex2f(Main.gridSize-6, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 9);\n \t\t\t\tGL11.glVertex2f(Main.gridSize, 3);\n \t\t\t\t\n \t\t\t} else {\n \t\t\t\tGL11.glColor3f(1.0f, 1.0f, 1.0f);\n \t\t\t\tGL11.glVertex2f(0, 0);\n \t\t\t\tGL11.glVertex2f(0, 12);\n \t\t\t\tGL11.glVertex2f(12, 12);\n \t\t\t\tGL11.glVertex2f(12, 0);\n \t\t\t\t\n \t\t\t\tGL11.glColor3f(0.0f, 0.0f, 0.0f);\n \t\t\t\tGL11.glVertex2f(0, 3);\n \t\t\t\tGL11.glVertex2f(0, 9);\n \t\t\t\tGL11.glVertex2f(4, 9);\n \t\t\t\tGL11.glVertex2f(4, 3);\n \t\t\t}\n \t\t\t\n \t\t}\n \t\tGL11.glEnd();\n \n \t\tGL11.glPopMatrix();\n \t\t\n \t}", "@Override\n public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {\n GL2 gl = drawable.getGL().getGL2(); // get the OpenGL 2 graphics context\n \n if (height == 0) height = 1; // prevent divide by zero\n float aspect = (float)width / height;\n \n \n gl.glViewport(0, 0, width, height);\n \n gl.glClearDepth(1.0f);\n gl.glEnable(GL.GL_DEPTH_TEST);\n gl.glDepthFunc(GL.GL_LEQUAL);\n gl.glShadeModel(GL.GL_LINE_SMOOTH);\n gl.glHint(GL2.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);\n\n gl.glEnable(GL2.GL_DEPTH_TEST);\n gl.glEnable(GL2.GL_NORMALIZE);\n gl.glEnable(GL2.GL_LIGHTING);\n gl.glEnable(GL2.GL_LIGHT0);\n gl.glEnable(GL2.GL_COLOR_MATERIAL);\n \n gl.glMatrixMode(GL2.GL_PROJECTION); \n gl.glLoadIdentity(); \n glu.gluPerspective(60.0, aspect, 0.1, 1000.0); \n\n float []lightPos={-40,100,40,0};\n float ambient[] = {0.1f, 0.1f, 0.1f,1.0f} ;\n float diffuse[] = {0.5f, 0.5f, 0.5f,1.0f} ;\n float spec[] = {0.0f, 0.0f, 0.0f,1.0f};\n float emiss[] = {0.0f, 0.0f, 0.0f,2.0f}; \n \tgl.glColorMaterial(GL2.GL_FRONT, GL2.GL_AMBIENT_AND_DIFFUSE);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_POSITION, lightPos,0);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_AMBIENT, ambient,0);\n \tgl.glLightfv(GL2.GL_LIGHT0, GL2.GL_DIFFUSE, diffuse,0);\n \n gl.glMatrixMode(GL2.GL_MODELVIEW);\n gl.glLoadIdentity(); // reset\n OneTriangle.setup(gl, width, height);\n }", "public abstract Vector4fc mul(IMatrix4x3f mat);", "public void addFragmentShader(String fileName);", "@Override\n public void onSurfaceChanged(GL10 gl, int width, int height) {\n Log.i(\"kike\", \"onSurfaceChanged\");\n GLES20.glViewport(0, 0, width, height);\n GLES20.glClearColor(0, 0, 0, 1);\n generateSquare();\n }", "void applyRotationMatrix() {\n for (int i = 0; i < coors.length; i++) {\n for (int j = 0; j < coors[i].length; j++) {\n newCoors[i][j] = coors[i][0] * R[j][0] + coors[i][1] * R[j][1] + coors[i][2] * R[j][2];\n }\n // add perspective\n float scale = map(Math.abs(newCoors[i][2]), 0, (float) (halfSize * Math.sqrt(3)), 1, 1.5f);\n if (newCoors[i][2] < 0) {\n scale = 2f - scale;\n }\n for (int j = 0; j < 2; j++) {\n newCoors[i][j] *= scale;\n }\n }\n // to R2\n // just dont use Z\n setPathAndAlpha();\n }", "public static Vector4 forward()\n {\n return new Vector4(0,0,1,0);\n }", "public void pushModelMatrix()\r\n\t{\r\n\t\tgl.glMatrixMode(GL_MODELVIEW);\r\n\t\tgl.glPushMatrix();\r\n\t}", "private void rotateSkybox() {\n\t\tthis.mc.getTextureManager().bindTexture(this.field_110351_G);\n\t\tGL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MIN_FILTER, GL11.GL_LINEAR);\n\t\tGL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL11.GL_TEXTURE_MAG_FILTER, GL11.GL_LINEAR);\n\t\tGL11.glCopyTexSubImage2D(GL11.GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);\n\t\tGlStateManager.enableBlend();\n\t\tGlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);\n\t\tGlStateManager.colorMask(true, true, true, false);\n\t\tTessellator var2 = Tessellator.getInstance();\n\t\tWorldRenderer var3 = var2.getWorldRenderer();\n\t\tvar3.startDrawingQuads();\n\t\tGlStateManager.disableAlpha();\n\t\tbyte var4 = 3;\n\n\t\tvar2.draw();\n\t\tGlStateManager.enableAlpha();\n\t\tGlStateManager.colorMask(true, true, true, true);\n\t}", "public void previewOglRender();", "@Override\n public void onSurfaceChanged(GL10 unused, int width, int height) {\n GLES20.glViewport(0, 0, width, height);\n\n float ratio = (float) width / height;\n\n // this projection matrix is applied to object coordinates\n // in the onDrawFrame() method\n Matrix.frustumM(mProjectionMatrix, 0, -ratio, ratio, -1, 1, 3, 7);\n\n }", "@Override\n\tpublic void render() {\n\t\tgl.glEnableClientState(GL2.GL_VERTEX_ARRAY);\n\t\tgl.glEnableClientState(GL2.GL_TEXTURE_COORD_ARRAY);\n\t\tgl.glEnableClientState(GL2.GL_NORMAL_ARRAY);\n\t\tfloat posx = startxPos;\n\t\tint[] vboIds;\n\t\tfor(int i=0;i<nbWidth;i++) {\n//\t\t\tindexBuffer = cacheBands.getDataLocalIndex(i); // mapIndexBands[i]\n//\t\t\tindexBuffer.rewind();\n\t\t\tvboIds = cacheBands.getDataLocalIndex(i);\n\t\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboIds[1]);\n\t\t\tgl.glVertexPointer(3, GL.GL_FLOAT, 0, 0);\n\t\t\tgl.glBindBuffer(GL2.GL_ARRAY_BUFFER, vboIds[2]);\n\t\t\tgl.glTexCoordPointer(2, GL.GL_FLOAT, 0, 0);\n\t\t\tgl.glBindBuffer(GL.GL_ARRAY_BUFFER, vboIds[3]);\n\t\t\tgl.glNormalPointer(GL.GL_FLOAT, 0, 0);\n\n\t\t\t\n\t\t\tgl.glPushMatrix();\n\t\t\tgl.glTranslatef(posx, startyPos,0);\n\t\t\t//gl.glCallList(cacheBands.getDataLocalIndex(i));\n\t // gl.glDrawElements(GL2.GL_QUADS, indices.capacity(), GL.GL_UNSIGNED_SHORT, 0);\n\t gl.glDrawArrays(GL2.GL_QUADS, 0, vboIds[0]); \n\t\t\tgl.glPopMatrix();\n\t\t\tposx+=blockWidth;\n\t\t}\n\t\t// unbind vbo\n\t\tgl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);\n\t\tgl.glDisableClientState(GL2.GL_NORMAL_ARRAY);\n gl.glDisableClientState(GL2.GL_TEXTURE_COORD_ARRAY);\n gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);\n\n\t}", "private void arretes_fW(){\n\t\tthis.cube[4] = this.cube[1]; \n\t\tthis.cube[1] = this.cube[3];\n\t\tthis.cube[3] = this.cube[7];\n\t\tthis.cube[7] = this.cube[5];\n\t\tthis.cube[5] = this.cube[4];\n\t}", "@Override\n public void onSurfaceCreated(GL10 gl, EGLConfig config) {\n GLES20.glClearColor(0.15f, 0.15f, 0.15f, 0.15f);\n\n // Position the eye behind the origin.\n final float eyeX = 0.0f;\n final float eyeY = 0.0f;\n final float eyeZ = 1.5f;\n\n // We are looking toward the distance\n final float lookX = 0.0f;\n final float lookY = 0.0f;\n final float lookZ = -5.0f;\n\n // Set our up vector. This is where our head would be pointing were we holding the camera.\n final float upX = 0.0f;\n final float upY = 1.0f;\n final float upZ = 0.0f;\n\n Matrix.setLookAtM(mViewMatrix, 0, eyeX, eyeY, eyeZ, lookX,\n lookY, lookZ, upX, upY, upZ);\n\n String fragmentShader = \"precision mediump float; \\n\"\n // This is the color from the vertex shader interpolated across the\n + \"varying vec4 v_Color; \\n\"\n // triangle per fragment.\n + \"void main() \\n\"\n + \"{ \\n\"\n + \" gl_FragColor = v_Color; \\n\"\n + \"} \\n\";\n String vertexShader = \"uniform mat4 u_MVPMatrix; \\n\"\n // Per-vertex position information we will pass in.\n + \"attribute vec4 a_Position; \\n\"\n\n // Per-vertex color information we will pass in.\n + \"attribute vec4 a_Color; \\n\"\n\n // This will be passed into the fragment shader.\n + \"varying vec4 v_Color; \\n\"\n\n + \"void main() \\n\"\n + \"{ \\n\"\n\n // Pass the color through to the fragment shader.\n + \" v_Color = a_Color; \\n\"\n\n // gl_Position is a special variable used to store the final position.\n // Multiply the vertex by the matrix to get the final point in\n // normalized screen coordinates.\n + \" gl_Position = u_MVPMatrix \\n\"\n + \" * a_Position; \\n\"\n + \"} \\n\";\n\n program = new GLProgram(vertexShader, fragmentShader);\n\n String positionVariableName = \"a_Position\";\n program.declareAttribute(positionVariableName);\n\n String colorVariableName = \"a_Color\";\n program.declareAttribute(colorVariableName);\n\n program.declareUniform(U_MVP_MATRIX);\n\n // Tell OpenGL to use this program when rendering.\n program.activate();\n\n // This triangle is red, green, and blue.\n final float[] triangle1VerticesData = {\n // X, Y, Z,\n // R, G, B, A\n -0.5f, -0.25f, 0.0f,\n 0.5f, -0.25f, 0.0f,\n 0.0f, 0.559016994f, 0.0f,\n };\n\n final float[] triangleColorData = {\n 1.0f, 0.0f, 0.0f, 1.0f,\n 0.0f, 1.0f, 0.0f, 1.0f,\n 0.0f, 0.0f, 1.0f, 1.0f,\n };\n\n VertexArray mTriangleVertices = new VertexArray(triangle1VerticesData,\n program.getVariableHandle(positionVariableName), true);\n /*\n Store our model data in a float buffer.\n */\n ColorArray mTriangleColors = new ColorArray(triangleColorData,\n program.getVariableHandle(colorVariableName), true);\n\n positionVbo = new VertexBufferObject(mTriangleVertices);\n colorVbo = new VertexBufferObject(mTriangleColors);\n }", "public final native Mat4 inverse() /*-{\n return $wnd.mat4.inverse(this, $wnd.mat4.create());\n }-*/;", "protected void sendMatrices(Matrix4f matrix, String uniformName) {\n\n //Create the uniformLocation\n int uniformLocation = glGetUniformLocation(programID, uniformName);\n\n //Create the buffer and buffer the data to it\n float[] array = new float[16];\n FloatBuffer buffer = BufferUtils.createFloatBuffer(16);\n matrix.get(array);\n buffer.put(array).flip();\n glUniformMatrix4fv(uniformLocation, false, buffer);\n }", "@Override\r\n\tpublic void draw(GL10 gl) {\n\r\n\t gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);\t\t\t// Clear The Screen And The Depth Buffer\r\n\t gl.glLoadIdentity();\t\t\t\t\t\t\t\t\t\t\t// Reset The Modelview Matrix\r\n//\t gl.glTranslatef(0.0f, 0.0f, -10.0f);\t\t\t\t\t\t\t\t// Translate 20 Units Into The Screen\r\n\r\n\t spin += 0.05f;\t\t\t\t\t\t\t\t\t\t\t\t// Increase Spin\r\n\t \r\n\t gl.glRotatef(spin, 0, 1, 0);\r\n\r\n\t gl.glPushMatrix();\r\n\t gl.glTranslatef(-1.0f, 0, 0);\r\n\t \r\n\t drawSquare(gl);\r\n\t gl.glPopMatrix();\r\n\t \r\n//\t gl.glPushMatrix();\r\n//\t gl.glTranslatef(1.0f, 0, 0);\r\n//\t gl.glBindTexture(GL10.GL_TEXTURE_2D, texture[1].texID[0]);\r\n//\t drawSquare(gl);\r\n//\t gl.glPopMatrix();\r\n\t}", "Parallelogram(){\n length = width = height = 0;\n }", "private void setMToIdentity()\n\t\t{\n\t\t\tfor(rowNumber = 0; rowNumber < 4; rowNumber++)\n\t\t\t\tfor(int column = 0; column < 4; column++)\n\t\t\t\t{\n\t\t\t\t\tif(rowNumber == column)\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 0;\n\t\t\t\t}\n\t\t\ttransform = new Transform3D(mElements);\n\t\t\trowNumber = 0;\n\t\t}", "Landscape(int scl_, int w_, int h_) {\n scl = scl_;\n w = w_;\n h = h_;\n cols = w/scl;\n rows = h/scl;\n z = new float[cols][rows];\n }", "public abstract Vector4fc rotateX(float angle);", "@Test\n public void testMatrixIdentityOk() throws Exception {\n final String program = \"#version 300 es\\n\"\n + \"precision highp float;\\n\"\n + \"void main() {\"\n + \" mat2 m;\"\n + \" m;\"\n + \"}\";\n for (int i = 0; i < 20; i++) {\n final TranslationUnit tu = ParseHelper.parse(program);\n IdentityMutationFinder identityMutationFinder = new IdentityMutationFinder(tu,\n new RandomWrapper(i), GenerationParams.small(ShaderKind.FRAGMENT, false, false));\n identityMutationFinder.findMutations().forEach(Expr2ExprMutation::apply);\n new StandardVisitor() {\n @Override\n public void visitFunctionCallExpr(FunctionCallExpr functionCallExpr) {\n super.visitFunctionCallExpr(functionCallExpr);\n if (!functionCallExpr.getCallee().equals(Constants.GLF_IDENTITY)) {\n return;\n }\n if (!(functionCallExpr.getArgs().get(0) instanceof VariableIdentifierExpr)) {\n return;\n }\n if (!(((VariableIdentifierExpr) functionCallExpr.getArgs().get(0)).getName()\n .equals(\"m\"))) {\n return;\n }\n if (!(functionCallExpr.getArgs().get(1) instanceof BinaryExpr)) {\n return;\n }\n final BinaryExpr binaryExpr = (BinaryExpr) functionCallExpr.getArgs().get(1);\n if (!Arrays.asList(BinOp.DIV, BinOp.MUL).contains(binaryExpr.getOp())) {\n return;\n }\n if (!(binaryExpr.getRhs() instanceof TypeConstructorExpr)) {\n return;\n }\n final TypeConstructorExpr typeConstructorExpr = (TypeConstructorExpr) binaryExpr.getRhs();\n if (!typeConstructorExpr.getTypename().equals(BasicType.MAT2X2.toString())) {\n return;\n }\n if (binaryExpr.getOp() == BinOp.MUL) {\n // In the case of MUL we should be multiplying by the identity matrix.\n // The identity matrix should only have one arg, and if it is a literal it should be\n // 1.0.\n assertTrue(typeConstructorExpr.getNumArgs() == 1);\n if (typeConstructorExpr.getArg(0) instanceof FloatConstantExpr) {\n assertEquals(\"1.0\", ((FloatConstantExpr) typeConstructorExpr.getArg(0)).getValue());\n }\n } else {\n // In the case of DIV we should be multiplying by a matrix of all 1.0s.\n assertEquals(binaryExpr.getOp(), BinOp.DIV);\n assertTrue(typeConstructorExpr.getNumArgs() == 4);\n for (int i = 0; i < 4; i++) {\n if (typeConstructorExpr.getArg(i) instanceof FloatConstantExpr) {\n assertEquals(\"1.0\", ((FloatConstantExpr) typeConstructorExpr.getArg(i)).getValue());\n }\n }\n }\n }\n }.visit(tu);\n }\n }", "public void onSurfaceCreated(GL10 glUnused, EGLConfig config) {\n\t\tGLES20.glBlendFunc(GLES20.GL_SRC_ALPHA, GLES20.GL_ONE_MINUS_SRC_ALPHA);\n\t\tmVertexShader = RawResourceReader.readTextFileFromRawResource(mContext,\n\t\t\t\tde.moliso.shelxle.R.raw.atoms_vetrex_shader);\n\t\tmFragmentShader = RawResourceReader.readTextFileFromRawResource(\n\t\t\t\tmContext, de.moliso.shelxle.R.raw.atoms_fragment_shader);\n\n\t\tmProgram = createProgram(mVertexShader, mFragmentShader);\n\t\tif (mProgram == 0) {\n\t\t\treturn;\n\t\t}\n\t\ttry{\n\t\t\tversionName = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), 0).versionName;\n\t\t}catch (NameNotFoundException e){\n\t\t\t//wurst\n\t\t}\n\t\ttexturH = GLES20.glGetUniformLocation(mProgram, \"text\");\n\t\tellipsoidH = GLES20.glGetUniformLocation(mProgram, \"eli\");\n\t\tlichtH = GLES20.glGetUniformLocation(mProgram, \"lighting\");\n\n\t\tvertexAttr1 = GLES20.glGetAttribLocation(mProgram, \"vertex\");\n\n\t\tnormalAttr1 = GLES20.glGetAttribLocation(mProgram, \"normal\");\n\t\tmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"matrix\");\n\t\tinvmatrixUniform1 = GLES20.glGetUniformLocation(mProgram, \"invmatrix\");\n\t\tcolorUniform1 = GLES20.glGetUniformLocation(mProgram, \"col\");\n\n\t\tmTextureLoc = GLES20.glGetUniformLocation(mProgram, \"textureSampler\");\n\t\tMatrix.setIdentityM(mv, 0);\n\t\tMatrix.scaleM(mv, 0, 9.0f, 9.0f, 9.0f);\n\n\t\t// Matrix.setLookAtM(mVMatrix, 0, 0, 0, -5, 0f, 0f, 0f, 0f, 1.0f, 0.0f);\n\n\t}", "private static int[][] transpose4(int[][] grid) {\r\n int[][] transposed = new int[4][4];\r\n for (int i = 0; i < 4; i++) {\r\n for (int j = 0; j < 4; j++) {\r\n transposed[j][i] = grid[i][j];\r\n }\r\n }\r\n return transposed;\r\n }", "public Vector4d() {\n\t\t// intentionally left empty\n\t}" ]
[ "0.6155426", "0.6129309", "0.5995644", "0.5876177", "0.58640283", "0.5840484", "0.5813383", "0.5798799", "0.5781035", "0.57597613", "0.5571733", "0.5560866", "0.5555222", "0.55386406", "0.5523425", "0.55049783", "0.5498897", "0.5491453", "0.54835725", "0.5475021", "0.547434", "0.5441204", "0.53994226", "0.5371425", "0.53577995", "0.5341048", "0.5328882", "0.53270745", "0.5319753", "0.5313433", "0.53087634", "0.5298388", "0.52751976", "0.524698", "0.5233513", "0.5228822", "0.5219798", "0.52156013", "0.5214904", "0.5207684", "0.5185842", "0.51668996", "0.51666105", "0.515804", "0.51578647", "0.51371014", "0.5131061", "0.51259565", "0.512577", "0.51108426", "0.5103387", "0.5096064", "0.5091796", "0.50861937", "0.508546", "0.5084337", "0.50771165", "0.5060235", "0.5059873", "0.5058039", "0.5049903", "0.50493604", "0.5048733", "0.50401354", "0.5038209", "0.5033933", "0.5031359", "0.50135624", "0.5005636", "0.50054306", "0.49974862", "0.4994973", "0.4994701", "0.49899155", "0.49882224", "0.4987126", "0.49798393", "0.49782696", "0.49781963", "0.4970665", "0.49701813", "0.49672034", "0.4957864", "0.49563247", "0.49556196", "0.49534926", "0.4940161", "0.49369007", "0.49325922", "0.49201068", "0.49129644", "0.4910573", "0.49015793", "0.48993507", "0.489763", "0.48933953", "0.48882127", "0.48872602", "0.48872298", "0.48813936" ]
0.57251585
10
Matrix nicht transponiert von row major nach column major ( die inverse von column majaor = row major)
public void sendUniformMat4fTransposed(Matrix4f mat) { setMatFloatBuffer(mat.getMatrix()); GL4 gl = (GL4) GLContext.getCurrentGL(); gl.glUniformMatrix4fv(uniformID,1,false,matBuffer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "public Matrix inverse(){\r\n \tint n = this.nrow;\r\n \tif(n!=this.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = this.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \t\treturn invmat;\r\n \t}", "Matrix inverse(Matrix m){\r\n Matrix mtemp = new Matrix(m.M);\r\n Matrix miden = new Matrix(m.rows,m.cols);\r\n miden = miden.identity();\r\n for(int i=0;i<mtemp.rows-1;i++){\r\n for(int j=i+1; j<mtemp.rows; j++){\r\n if(mtemp.M[i][i]<mtemp.M[j][i]){\r\n swapRow(mtemp,i,j);\r\n swapRow(miden,i,j);\r\n }\r\n }\r\n for(int k=i+1; k<mtemp.rows; k++){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=0;j<mtemp.cols;j++){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n for(int i=mtemp.rows-1;i>0;i--){\r\n for(int k=i-1; k>-1; k--){\r\n double ratio = mtemp.M[k][i]/mtemp.M[i][i];\r\n for(int j=mtemp.cols-1;j>-1;j--){\r\n mtemp.M[k][j] -= ratio*mtemp.M[i][j];\r\n miden.M[k][j] -= ratio*miden.M[i][j];\r\n }\r\n\r\n }\r\n\r\n }\r\n \r\n\r\n for(int i=0; i<mtemp.rows; i++){\r\n for(int j=0; j<mtemp.cols; j++){\r\n miden.M[i][j] /= mtemp.M[i][i];\r\n }\r\n }\r\n return miden;\r\n\r\n }", "Matrix<T> getTransposed();", "public org.apache.spark.mllib.linalg.Matrix toLocalMatrix () { throw new RuntimeException(); }", "Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }", "public static double[][] matrixInversion(double[][] a) {\r\n\t\t// Code for this function and the functions it calls was adapted from\r\n\t\t// http://mrbool.com/how-to-use-java-for-performing-matrix-operations/26800\r\n\t\t\r\n\t\treturn (divideBy(transpose(cofactor(a)), determinant(a)));\r\n\t}", "public Matrix inverse() throws JPARSECException {\n return solve(identity(m,m));\n }", "public Matrix asMatrix() {\n Matrix result;\n try {\n result = new Matrix(COMPONENTS, 1);\n asMatrix(result);\n } catch (final WrongSizeException ignore) {\n // never happens\n result = null;\n }\n return result;\n }", "public static Matrix inverse(Matrix amat){\r\n \tint n = amat.nrow;\r\n \tif(n!=amat.ncol)throw new IllegalArgumentException(\"Matrix is not square\");\r\n \tdouble[] col = new double[n];\r\n \tdouble[] xvec = new double[n];\r\n \tMatrix invmat = new Matrix(n, n);\r\n \tdouble[][] invarray = invmat.getArrayReference();\r\n \tMatrix ludmat;\r\n\r\n\t \tludmat = amat.luDecomp();\r\n \tfor(int j=0; j<n; j++){\r\n \t\tfor(int i=0; i<n; i++)col[i]=0.0D;\r\n \t\tcol[j]=1.0;\r\n \t\txvec=ludmat.luBackSub(col);\r\n \t\tfor(int i=0; i<n; i++)invarray[i][j]=xvec[i];\r\n \t}\r\n \treturn invmat;\r\n \t}", "@Test\n public void testIdentity() {\n final double junk[] = new double[Matrix33d.LENGTH];\n for (int i = 0; i < Matrix33d.LENGTH; i++) {\n junk[i] = 1089.1451D;\n }\n final Matrix33d m = new Matrix33d();\n m.setA(junk);\n\n m.identity();\n final double a[] = m.getA();\n for (int i = 0; i < a.length; i++) {\n if (i == 0 || i == 4 || i == 8) {\n assertEquals(a[i], 1D);\n } else {\n assertEquals(a[i], 0D);\n }\n }\n }", "public Matrix inverse() {\n\t\tMatrix a = copy();\n\t\tif (a.M != a.N) {\n\t\t\tthrow new RuntimeException(\"This matrix is not square!\");\n\t\t}\n\t\tMatrix i = identity(a.N);\n\t\tMatrix ai = a.augment(i);\n\t\tai = ai.specialrref();\n\t\tMatrix[] split = ai.split(a.N);\n\t\tif (split[0].equals(i)) {\n\t\t\treturn split[1];\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"This matrix is not invertible!\");\n\t\t}\n\t}", "public boolean isSingularMatrix() {\r\n try {\r\n return this.getDeterminant() == 0;\r\n } catch (InvalidMoveException e) {\r\n return false;\r\n }\r\n }", "public Matrix opposite(){\r\n \tMatrix opp = Matrix.copy(this);\r\n \tfor(int i=0; i<this.nrow; i++){\r\n \t\tfor(int j=0; j<this.ncol; j++){\r\n \t\topp.matrix[i][j]=-this.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn opp;\r\n \t}", "Matrix InverseT()\n {\n Matrix ad = new Matrix( y.cross(z), z.cross(x), x.cross(y) );\n float inv_det = 1.0f / ( x.dot( ad.x ) );\n ad.timesEqual( inv_det );\n return ad;\n }", "private static int[][] rotateMartix(int[][] matrix) {\n for(int i=0;i<matrix.length;i++) {\n for(int j=i;j< matrix.length;j++) {\n int tmp=matrix[i][j];\n matrix[i][j]=matrix[j][i];\n matrix[j][i]=tmp;\n }\n }\n //swap columns\n for(int i=0;i<matrix.length;i++){\n int low = 0;\n int high = matrix.length-1;\n\n while(low < high)\n {\n int temp = matrix[i][low];\n matrix[i][low] = matrix[i][high];\n matrix[i][high] = temp;\n\n low++;\n high--;\n }\n }\n return matrix;\n }", "public void nullifyMatrix(int[][] mat) {\r\n //extra space\r\n boolean rows[] = new boolean[mat[0].length];\r\n boolean columns[] = new boolean[mat.length];\r\n \r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n rows[i] = true;\r\n columns[j] = true;\r\n }\r\n } \r\n }\r\n \r\n //Nullify rows\r\n for(int i=0; i<rows.length; i++) {\r\n if(rows[i])\r\n helperNullifyRow(mat, i);\r\n }\r\n //Nullify columns\r\n for(int i=0; i<columns.length; i++) {\r\n if(columns[i])\r\n helperNullifyColumn(mat,i);\r\n }\r\n printMat(mat);\r\n }", "public Matrix xMatrixTranspose(){\n if(!this.pcaDone)this.pca();\n double denom = this.nItems;\n if(!super.nFactorOption)denom -= 1.0;\n Matrix mat = dataMinusMeansTranspose.times(1.0/Math.sqrt(denom));\n return mat;\n }", "public org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix toIndexedRowMatrix () { throw new RuntimeException(); }", "public static void flipHorizontalAxis(int[][] matrix) {\n for(int i = matrix.length - 1; i >= matrix.length/2; i-- ){\n for(int j = 0; j < matrix[i].length; j++){\n int temp = matrix[i][j];\n matrix[i][j] = matrix[(matrix.length - 1) - i][j];\n matrix[(matrix.length - 1) - i][j] = temp;\n }\n }\n}", "public static double [][] inv(double [][] a) {\n int N = a.length;\n double [] col = new double[N];\n int [] indx = new int[N];\n double [][] y = new double[N][N];\n \n double d = ludcmp(a, indx);\n for (int j=0; j<N; j++ ) {\n for (int i=0; i<N; i++) \n col[i] = 0.0;\n col[j] = 1.0;\n lubksb(a, indx, col);\n for (int i=0; i<N; i++)\n y[i][j] = col[i];\n }\n return y; \n }", "private static void changeFirstRowAndColumn(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++) {\n if(matrix[i][j]==0){\n matrix[i][0]=0;\n matrix[0][j]=0;\n }\n }\n }\n }", "public void SetMatrixToIdentity() {\n \n\t/*\n\tinputs--\n\t*/\n\t\n\t/*\n\toutputs--\n\t*/\n\t\n\tthis.mat_f_m[0][0] = 1;\t this.mat_f_m[0][1] = 0;\tthis.mat_f_m[0][2] = 0;\t this.mat_f_m[0][3] = 0;\n\tthis.mat_f_m[1][0] = 0;\t this.mat_f_m[1][1] = 1;\tthis.mat_f_m[1][2] = 0;\t this.mat_f_m[1][3] = 0;\n\tthis.mat_f_m[2][0] = 0;\t this.mat_f_m[2][1] = 0;\tthis.mat_f_m[2][2] = 1;\t this.mat_f_m[2][3] = 0;\n\tthis.mat_f_m[3][0] = 0;\t this.mat_f_m[3][1] = 0;\tthis.mat_f_m[3][2] = 0;\t this.mat_f_m[3][3] = 1;\t\n \n }", "public static Matrix opposite(Matrix amat){\r\n \tMatrix opp = Matrix.copy(amat);\r\n \tfor(int i=0; i<amat.nrow; i++){\r\n \t\tfor(int j=0; j<amat.ncol; j++){\r\n \t\topp.matrix[i][j]=-amat.matrix[i][j];\r\n \t\t}\r\n \t}\r\n \treturn opp;\r\n \t}", "public Matrix transpose(){\r\n \tMatrix tmat = new Matrix(this.ncol, this.nrow);\r\n \tdouble[][] tarray = tmat.getArrayReference();\r\n \tfor(int i=0; i<this.ncol; i++){\r\n \t\tfor(int j=0; j<this.nrow; j++){\r\n \t\ttarray[i][j]=this.matrix[j][i];\r\n \t\t}\r\n \t}\r\n \treturn tmat;\r\n \t}", "public org.apache.spark.mllib.linalg.distributed.BlockMatrix transpose () { throw new RuntimeException(); }", "public void phitransposeMatrix()\n {\n double [][] martixtranspose;\n martixtranspose = new double[1][x + 1];\n int i = 0;\n while (i <= x) {\n martixtranspose[0][i] = Math.pow(arraylistofprices.size(), i);\n\n i++;\n }\n phiT = new Matrix(martixtranspose);\n }", "public static void main( String[] args ) {\n\tMatrix first = new Matrix();\n\tSystem.out.println(first);\n\tSystem.out.println(first.size());\n\tfirst.set(1,1,5);\n\tSystem.out.println(first.get(1,1)); //5\n\tSystem.out.println(first.isEmpty(1,1)); //false\n\tSystem.out.println(first.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tMatrix second = new Matrix(2);\n\tSystem.out.println(second);\n\tSystem.out.println(second.size());\n\tsecond.set(1,1,5);\n\tSystem.out.println(second.get(1,1)); //5\n\tSystem.out.println(second.isEmpty(1,1)); //false\n\tSystem.out.println(second.isEmpty(0,0)); //true\n\tSystem.out.println();\n\n\tSystem.out.println(first.equals(second)); //true\n\n\tfirst.swapColumns(0,1);\n\tSystem.out.println(first);\n\tfirst.swapRows(0,1);\n\tSystem.out.println(first);\n\n\tSystem.out.println(first.isFull()); //false\n\t/*\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setRow(0,first.getCol(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getRow(0));\n\tSystem.out.println(first.setCol(0,first.getRow(0)));\n\tSystem.out.println(first);\n\t//System.out.println(first.getCol(0));\n\t*/\n\tfirst.set(1,0,6);\n\tfirst.set(1,1,7);\n\tfirst.set(0,1,8);\n\tSystem.out.println(first);\n\tfirst.transpose();\n\tSystem.out.println(first);\n\tSystem.out.println(first.contains(6)); //true\n\n }", "@Test\n public void testJamaProblem() throws IOException {\n\n Primitive64Store problematic = Primitive64Store.FACTORY\n .rows(new double[][] { { 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1 }, { 0, 0, 0, 1, 0 }, { 1, 1, 0, 0, 1 }, { 1, 0, 1, 0, 1 } });\n\n CaseEigenvalue.doVerifyGeneral(problematic);\n }", "public int[][] updateMatrix(int[][] matrix) {\n for(int i = 0; i < matrix.length; i++) {\n for(int j = 0; j < matrix[0].length; j++) {\n if(matrix[i][j] == 0) continue;\n matrix[i][j] = 10; // You can use any integer bigger than 1 except Integer.MAX_VALUE, overflow.\n if(i > 0) matrix[i][j] = Math.min(matrix[i - 1][j] + 1, matrix[i][j]);\n if(j > 0) matrix[i][j] = Math.min(matrix[i][j - 1] + 1, matrix[i][j]);\n }\n }\n\n for(int i = matrix.length - 1; i >= 0; i--) {\n for(int j = matrix[0].length - 1; j >= 0; j--) {\n if(i < matrix.length - 1) matrix[i][j] = Math.min(matrix[i + 1][j] + 1, matrix[i][j]);\n if(j < matrix[0].length - 1) matrix[i][j] = Math.min(matrix[i][j + 1] + 1, matrix[i][j]);\n }\n }\n return matrix;\n }", "abstract public Matrix4fc getViewMatrix();", "public final int[][] getPrimitiveMatrix() {\r\n return primitiveMatrix;\r\n }", "public static boolean rotateMatrix(int[][] matrix) {\n if (matrix.length == 0 || matrix.length != matrix[0].length) {\n return false;\n }\n int n = matrix.length;\n\n for (int layer = 0; layer < n / 2; layer++) {\n int first = layer;\n int last = n - 1 - layer;\n\n for (int i = first; i < last; i++) {\n int offset = i - first;\n int top = matrix[first][i]; //Save top\n\n //left -> top\n matrix[first][i] = matrix[last - offset][first];\n\n //bottom -> left\n matrix[last - offset][first] = matrix[last][last - offset];\n\n //right -> bottom\n matrix[last][last - offset] = matrix[i][last];\n\n //top -> right\n matrix[i][last] = top; //right <- saved top\n }\n }\n return true;\n }", "public static boolean rotate(int[][] matrix) {\n\t\tif (matrix.length == 0 || matrix.length != matrix[0].length)\n\t\t\treturn false; // Not a square\n\t\tint n = matrix.length;\n\n\t\tfor (int layer = 0; layer < n / 2; layer++) {\n\t\t\tint first = layer;\n\t\t\tint last = n - layer - 1;\n\t\t\tfor (int i = first; i < last; i++) {\n\t\t\t\tint offset = i - first;\n\t\t\t\tint top = matrix[first][i]; // save top\n\t\t\t\t// left -> top\n\t\t\t\tmatrix[first][i] = matrix[last - offset][first];\n\t\t\t\t// bottom -> left\n\t\t\t\tmatrix[last - offset][first] = matrix[last][last - offset];\n\n\t\t\t\t// right -> bottom\n\t\t\t\tmatrix[last][last - offset] = matrix[i][last];\n\n\t\t\t\t// top -> right\n\t\t\t\tmatrix[i][last] = top; // right <- saved top\n\t\t\t\t\n\t\t\t\t// top = [first][i]\n\t\t\t\t// [first][i] = [last - offset][first]\n\t\t\t\t// [last - offset][first] = [last][last - offset]\n\t\t\t\t// [last][last - offset] = [i][last]\n\t\t\t\t// [i][last] = top\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "public Matrix getTranspose() {\r\n double[][] jadi = new double[matrix[0].length][matrix.length];\r\n for (int i = 0; i < jadi.length; i++) {\r\n for (int j = 0; j < jadi[0].length; j++) {\r\n jadi[i][j] = matrix[j][i];\r\n }\r\n }\r\n return new Matrix(jadi);\r\n }", "protected AbstractMatrix3D vRowFlip() {\n\tif (rows>0) {\n\t\trowZero += (rows-1)*rowStride;\n\t\trowStride = -rowStride;\n\t\tthis.isNoView = false;\n\t}\n\treturn this;\n}", "public static void assertUnitaryMatrix(final RealMatrix m){\n final RealMatrix mInv = new QRDecomposition(m).getSolver().getInverse();\n final RealMatrix mT = m.transpose();\n\n for (int i = 0; i < mInv.getRowDimension(); i ++) {\n for (int j = 0; j < mInv.getColumnDimension(); j ++) {\n Assert.assertEquals(mInv.getEntry(i, j), mT.getEntry(i, j), 1e-7);\n }\n }\n }", "public interface IMatrix {\n\n\tpublic int getRowsCount();\n\tpublic int getColsCount();\n\tpublic double get(int numberOne, int numberTwo);\n\tpublic IMatrix set(int numberOne, int numberTwo, double numberThree);\n\tpublic IMatrix copy();\n\tpublic IMatrix newInstance(int numberOne, int numberTwo);\n\tpublic IMatrix nTranspose(boolean trans);\n\tpublic IMatrix add(IMatrix matrix) throws OperationNotSupportedException;\n\tpublic IMatrix nAdd(IMatrix matrix) throws OperationNotSupportedException;\n\tpublic IMatrix sub(IMatrix matrix) throws OperationNotSupportedException;\n\tpublic IMatrix nSub(IMatrix matrix) throws OperationNotSupportedException;\n\tpublic IMatrix nMultiply(IMatrix matrix) throws OperationNotSupportedException;\n\tpublic double determinant() throws OperationNotSupportedException;\n\tpublic IMatrix subMatrix(int numberOne, int numberTwo, boolean subM);\n\tpublic IMatrix nInvert() throws OperationNotSupportedException;\n\tpublic double[][] toArray();\n\tpublic IVector toVector(boolean toVect) throws OperationNotSupportedException;\n\tpublic IMatrix scalarMultiply(double value);\n\tpublic IMatrix nScalarMultiply(double value);\n\t\n}", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public void invertFastEqual()\r\n\t{\r\n\t\tE3DMatrix4x4F scratchMatrix = new E3DMatrix4x4F();\r\n\t\t\r\n//\t\tscratchMatrix.matrix4x4[0][0] = scratchMatrix.matrix4x4[]\r\n\t\tscratchMatrix.matrix4x4[0][1] = matrix4x4[1][0];\r\n\t\tscratchMatrix.matrix4x4[0][2] = matrix4x4[2][0];\r\n\t\tscratchMatrix.matrix4x4[1][0] = matrix4x4[0][1];\r\n//\t\tscratchMatrix.matrix4x4[1][1] = \r\n\t\tscratchMatrix.matrix4x4[1][2] = matrix4x4[2][1];\r\n\t\tscratchMatrix.matrix4x4[2][0] = matrix4x4[0][2];\r\n\t\tscratchMatrix.matrix4x4[2][1] = matrix4x4[1][2];\r\n//\t\tscratchMatrix.matrix4x4[2][2] =\r\n\t\t\r\n\t\tmatrix4x4[0][1] = scratchMatrix.matrix4x4[0][1];\r\n\t\tmatrix4x4[0][2] = scratchMatrix.matrix4x4[0][2];\r\n\t\tmatrix4x4[1][0] = scratchMatrix.matrix4x4[1][0];\r\n\t\tmatrix4x4[1][2] = scratchMatrix.matrix4x4[1][2];\r\n\t\tmatrix4x4[2][0] = scratchMatrix.matrix4x4[2][0];\r\n\t\tmatrix4x4[2][1] = scratchMatrix.matrix4x4[2][1];\r\n\t}", "private void setMToIdentity()\n\t\t{\n\t\t\tfor(rowNumber = 0; rowNumber < 4; rowNumber++)\n\t\t\t\tfor(int column = 0; column < 4; column++)\n\t\t\t\t{\n\t\t\t\t\tif(rowNumber == column)\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\tmElements[rowNumber*4 + column] = 0;\n\t\t\t\t}\n\t\t\ttransform = new Transform3D(mElements);\n\t\t\trowNumber = 0;\n\t\t}", "private DoubleMatrix invertCholesky(DoubleMatrix matrix) {\n int numOfRows = matrix.rows;\n double sum;\n int i, j, k;\n // ______ Compute inv(L) store in lower of A ______\n for (i = 0; i < numOfRows; ++i) {\n matrix.put(i, i, 1. / matrix.get(i, i));\n for (j = i + 1; j < numOfRows; ++j) {\n sum = 0.;\n for (k = i; k < j; ++k) {\n sum -= matrix.get(j, k) * matrix.get(k, i);\n }\n matrix.put(j, i, sum / matrix.get(j, j));\n }\n }\n // ______ Compute inv(A)=inv(LtL) store in lower of A ______\n for (i = 0; i < numOfRows; ++i) {\n for (j = i; j < numOfRows; ++j) {\n sum = 0.;\n for (k = j; k < numOfRows; ++k) {\n sum += matrix.get(k, i) * matrix.get(k, j); // transpose\n }\n matrix.put(j, i, sum);\n }\n }\n return matrix;\n }", "@Test\n public void testProblemFoundInTheWild() {\n\n Primitive64Store matrix = Primitive64Store.FACTORY.rows(new double[][] { { 1, 0, 0 }, { 0.01, 0, -1 }, { 0.01, 1, 0 } });\n\n CaseEigenvalue.doVerifyGeneral(matrix);\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}", "private void imprimirMatriz(int[][] m) {\n\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tSystem.out.println(\"M[\" + i + \"][\" + j + \"] = \" + m[i][j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t}", "public void nullifyMatrixEfficient(int[][] mat) {\r\n boolean hasRow=false, hasCol=false;\r\n //checking first row and colmun about having any zero so later we can nullify it\r\n for (int i=0;i<mat[0].length;i++ ) {\r\n if(mat[0][i] == 0) {\r\n hasRow = true;\r\n break;\r\n }\r\n }\r\n for (int i=0;i<mat.length;i++ ) {\r\n if(mat[i][0] == 0) {\r\n hasCol = true;\r\n break;\r\n }\r\n }\r\n //checking zeros existance and marking their coresponding first row and col to zero\r\n for (int i=0;i<mat.length ;i++ ) {\r\n for (int j=0; j<mat[0].length;j++ ) {\r\n if(mat[i][j] == 0) {\r\n mat[0][j] = 0;\r\n mat[i][0] = 0;\r\n }\r\n }\r\n }\r\n //nullify all columns with first element is zero\r\n for(int i=0; i<mat[0].length; i++) {\r\n if(mat[0][i] == 0)\r\n helperNullifyColumn(mat, i);\r\n }\r\n \r\n //nullify all rows with first element is zero\r\n for(int i=0; i<mat.length; i++) {\r\n if(mat[i][0] == 0)\r\n helperNullifyRow(mat, i);\r\n }\r\n printMat(mat);\r\n }", "public Matrix inverse() {\n int n = L.getNrows();\n Matrix inv = Matrix.identity(n);\n solve(inv);\n return inv;\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 Complex[][] solveLinearEquation(Complex[][] matrix, int numofrows){\n for(int i = 0; i < numofrows; i++){\n printarr(matrix);\n Row row = new Row();\n matrix = row.rowManipulation(matrix, i);\n }\n //backSubstitution\n if(Matrix.str.equals(\"\")) {\n for (int i = numofrows - 1; i > 0; i--) {\n //System.out.println(Arrays.deepToString(matrix));\n matrix = backSub(matrix, i);\n }\n if(Row.columnSwaps.size() != 0){\n matrix = Row.swapback(matrix);\n }\n }\n Matrix.checkSolutions(matrix);\n return matrix;\n }", "public static Matrix getLowerMatrix(Matrix A) {\n\t\tint size = A.getColumnDimension();\n\t\t\n\t\tdouble[][] l = new double[size][size];\n\t\t\n\t\tfor(int i = 0; i<size; i++){\n\t\t\tfor(int j=0; j < size; j++){\n\t\t\t\tif(j<i) l[i][j] = A.get(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tMatrix L = new Matrix(l);\n\t\n\t\treturn L;\n\t}", "static void update(int[][] matrix){\n\t\tboolean rowFlag = false;\n\t\tboolean colFlag = false;\n\t\tint n = matrix.length;\n int m = matrix[0].length;\n for(int i=0;i<n;i++){\n for(int j=0;j<m;j++){\n if(i==0 && matrix[i][j]==0){\n rowFlag =true;\n }\n if(j==0 && matrix[i][j]==0){\n colFlag = true;\n }\n if(matrix[i][j]==0){\n matrix[0][j] = 0;\n matrix[i][0] = 0;\n }\n }\n }\n for(int i=1;i<n;i++){\n for(int j=1;j<m;j++){\n if(matrix[i][0]==0||matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n if(rowFlag){\n for(int i=0;i<m;i++){\n matrix[0][i] =0 ;\n }\n }\n if(colFlag){\n for(int j=0;j<n;j++){\n matrix[j][0] = 0;\n }\n }\n\n\t}", "public double[][] getIdentityNegativeMatrix(int size) {\n\t\tdouble[][] identityMatrix = new double[size][size];\n\t\tfor (int i = 0; i < size; i++) {\n\t\t\tfor (int j = 0; j < size; j++) {\n\t\t\t\tif (i == j) {\n\t\t\t\t\tidentityMatrix[i][j] = -1.;\n\t\t\t\t} else {\n\t\t\t\t\tidentityMatrix[i][j] = 0.;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn identityMatrix;\n\t}", "public boolean checkmatorder()\n\t{\n\t\torderflag=false;\n\t\tif(height<width)\n\t\t{\n\t\t\tmatrix=new double[height][width];\n\t\t\torderflag=true;\n\t\t}\n\t\telse if(height>=width)\n\t\t{\n\t\t\tmatrix=new double[width][height];\n\t\t}\t\n\t\treturn orderflag;\n\t}", "public Matrix transpose() {\n\t\tMatrix a = copy();\n\t\tComplexNumber[][] values = new ComplexNumber[a.N][];\n\t\tfor (int col = 0; col < a.N; col++) {\n\t\t\tvalues[col] = new ComplexNumber[a.M];\n\t\t\tfor (int row = 0; row < a.M; row++) {\n\t\t\t\tvalues[col][row] = a.ROWS[row][col]; \t\n\t\t\t}\n\t\t}\n\t\treturn new Matrix(values);\n\t}", "@Test\n public void testCreateTranspose1(){\n double[][] a = new double[1][1];\n a[0][0] = Math.random();\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }", "private static void rotate(int[][] matrix) {\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = i; j < matrix[0].length; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[j][i];//转置,第i行变成第i列\r\n\t\t\t\tmatrix[j][i] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < matrix.length; i++) {\r\n\t\t\tfor (int j = 0; j < matrix.length / 2; j++) {\r\n\t\t\t\tint temp = 0;\r\n\t\t\t\ttemp = matrix[i][j];\r\n\t\t\t\tmatrix[i][j] = matrix[i][matrix.length - 1 - j];\r\n\t\t\t\tmatrix[i][matrix.length - 1 - j] = temp;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public int[][] getMatrix(){\n\t\treturn matrix;\n\t}", "@Test\n public void testSetMatrixColumn() {\n final Matrix33d mBase = getMatrix();\n final Matrix33d m = getMatrix();\n final Vector3d v = new Vector3d(D10, D11, D12);\n\n m.setMatrixColumn(v, 1);\n for (int i = 0; i < m.getA().length; i++) {\n if (i > 2 && i < 6) {\n // compare the row set to the vector values\n int vectorIndex = i - 3;\n assertEquals(m.getA()[i], v.a[vectorIndex]);\n } else {\n assertEquals(m.getA()[i], mBase.getA()[i]);\n }\n }\n }", "public TransformationMatrix() {\n\t\ta11 = 1; a12 = 0; a13 = 0; a14 = 0;\n\t\ta21 = 0; a22 = 1; a23 = 0; a24 = 0;\n\t\ta31 = 0; a32 = 0; a33 = 1; a34 = 0;\n\t}", "public interface Matrix extends Entity{\n\tboolean isNull(int row, int column);\n\tvoid setNull(int row, int column);\n\tScalar getRowLabel(int row);\n\tScalar getColumnLabel(int column);\n\tScalar get(int row, int column);\n\tVector getRowLabels();\n\tVector getColumnLabels();\n\tboolean hasRowLabel();\n\tboolean hasColumnLabel();\n\tClass<?> getElementClass();\n}", "public Matrix ref() {\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn m;\n\t}", "public void compararMatrix(Estado_q es1, Estado_q es2, int filest,short tam,int tamañoEsta){\n if(es1.isFinal()==es2.isFinal()){\n //contador para vecto de alfabeto o transiciones\n int con=0;\n //si son inidistinguibles los estados, se insertan en la matriz sus estados destinos respecto a transiciones\n for(int cont=1;cont<=(int)tam;cont++){\n matrix[filest][cont].setEst1(es1.getTransiçaosE(con));\n matrix[filest][cont].setEst2(es2.getTransiçaosE(con)); \n con++;\n }\n //comparamos en la misma fila y distintas columnas, si hay alguna pareja igual a la original, para revisarla\n //pareja original es la de la columna 0, de donde se obtuvieron los estados de las columnas insertadas\n for(int k=1;k<=(int)tam;k++){\n if((matrix[filest][k].getEst1().getNombre()==es1.getNombre())&&(matrix[filest][k].getEst2().getNombre()\n ==es2.getNombre())){\n matrix[filest][k].setRevisado(true);\n }\n }\n //se setea verdadera la revision de la posicion donde estabamos\n matrix[filest][0].setRevisado(true);\n \n //terminado de insertar todos los estados es una fila(for de arriba), se lee la matrix a buscar nuevos estados sin revisar\n //para colocarlos una posicion mas abajo\n for(int fil=0;fil<=tamañoEsta;fil++){\n for(int col=0;col<=(int)tam;col++){\n \n //se busca en la matriz alguna pareja de estados que sea igual a la original para marcarla revisada\n if((matrix[fil][col]!=null)&&(matrix[fil][col].getEst1().getNombre()==es1.getNombre())&&\n (matrix[fil][col].getEst2().getNombre())==es2.getNombre()){\n matrix[fil][col].setRevisado(true);\n }\n \n //si la casilla no esta revisada\n if((matrix[fil][col].isRevisado()==false)&&(matrix[fil][col]!=null)){\n \n //vamos a buscar si no esta esta posicion ya verificada\n for(int row=0;row<=tamañoEsta;row++){\n for(int cols=0;cols<=(int)tam;cols++){\n if((matrix[fil][col].getEst1().getNombre()==matrix[row][cols].getEst1().getNombre())&&\n (matrix[fil][col].getEst2().getNombre()==matrix[row][cols].getEst2().getNombre())\n &&(matrix[row][cols].isRevisado()==true)){\n matrix[fil][col].setRevisado(true);\n }\n }\n }\n if((matrix[fil][col].isRevisado()==false)&&(matrix[fil][col]!=null)){\n \n //si la siguiente fila esta nula\n if(matrix[fil+1][0]==null){\n //se inerta la casilla con sus estados en una fila abajo\n matrix[fil+1][0].setEst1(matrix[fil][col].getEst1());\n matrix[fil+1][0].setEst2(matrix[fil][col].getEst2());\n tamañoEsta++;\n //se vuelve a llamar al metodo, para volver a verificar desde la columna e estados si son inidistinguibles\n compararMatrix(matrix[fil][col].getEst1(),matrix[fil][col].getEst2(),filest+1,tam,tamañoEsta);\n\n }\n else\n {\n matrix[col][0].setEst1(matrix[fil][col].getEst1());\n matrix[col][0].setEst2(matrix[fil][col].getEst2());\n //se vuelve a llamar al metodo, para volver a verificar desde la columna e estados si son inidistinguibles\n compararMatrix(matrix[fil][col].getEst1(),matrix[fil][col].getEst2(),filest+1,tam,tamañoEsta);\n\n }\n }\n }\n } \n }\n System.out.print(\"SI son equivalentes\");\n \n }\n else\n System.out.print(\"NO son equivalentes\");\n \n \n }", "@Test\n public void foo2()\n {\n double[][] entries = new double[][]{\n {1.000, 0.001}};\n \n DMatrixRMaj matrixJ = new DMatrixRMaj(entries);\n \n int numRows = matrixJ.getNumRows();\n int numColumns = matrixJ.getNumCols();\n boolean needU = true;\n boolean needV = true;\n boolean compact = false;\n \n SingularValueDecomposition_F64<DMatrixRMaj> svd = DecompositionFactory_DDRM.svd(numRows, numColumns, needU, needV, compact);\n svd.decompose(matrixJ);\n \n double[] singularValues = svd.getSingularValues();\n DMatrixRMaj matrixU = new DMatrixRMaj(numRows, numRows);\n DMatrixRMaj matrixW = new DMatrixRMaj(numRows, numColumns);\n DMatrixRMaj matrixVTranspose = new DMatrixRMaj(numColumns, numColumns);\n \n boolean transposeU = false;\n boolean transposeV = true;\n svd.getU(matrixU, transposeU);\n svd.getV(matrixVTranspose, transposeV);\n svd.getW(matrixW);\n \n System.out.println(\"matrixJ = \" + matrixJ);\n System.out.println(\"matrixU = \" + matrixU);\n System.out.println(\"matrixW = \" + matrixW);\n System.out.println(\"matrixV = \" + matrixVTranspose);\n \n DMatrixRMaj matrixJReconstructed = reconstructMatrix(matrixU, matrixW, matrixVTranspose);\n System.out.println(\"matrixJReconstructed = \" + matrixJReconstructed);\n\n MatrixTestTools.assertMatrixEquals(matrixJ, matrixJReconstructed, 1e-7);\n \n DMatrixRMaj matrixJTranspose = new DMatrixRMaj(matrixJ);\n CommonOps_DDRM.transpose(matrixJTranspose);\n \n DMatrixRMaj matrixJJTranspose = new DMatrixRMaj(matrixJ.getNumRows(), matrixJ.getNumRows());\n CommonOps_DDRM.mult(matrixJ, matrixJTranspose, matrixJJTranspose);\n \n DMatrixRMaj matrixJJTransposeInverse = new DMatrixRMaj(matrixJJTranspose);\n CommonOps_DDRM.invert(matrixJJTransposeInverse);\n \n\n DMatrixRMaj jPlus = new DMatrixRMaj(matrixJ.getNumCols(), matrixJ.getNumRows());\n CommonOps_DDRM.mult(matrixJTranspose, matrixJJTransposeInverse, jPlus);\n\n System.out.println(\"jPlus = \" + jPlus);\n\n \n DMatrixRMaj jPlusJ = new DMatrixRMaj(jPlus.getNumRows(), matrixJ.getNumCols());\n CommonOps_DDRM.mult(jPlus, matrixJ, jPlusJ);\n \n System.out.println(\"jPlusJ = \" + jPlusJ);\n \n DMatrixRMaj identity = CommonOps_DDRM.identity(jPlusJ.getNumRows());\n DMatrixRMaj matrixQ = new DMatrixRMaj(identity.getNumRows(), identity.getNumCols());\n \n CommonOps_DDRM.subtract(identity, jPlusJ, matrixQ);\n System.out.println(\"matrixQ = \" + matrixQ);\n\n\n }", "private static ArrayList<ArrayList<Integer>> transposeMatrix(ArrayList<ArrayList<Integer>> matrix){\r\n\t\tint numRows = matrix.size();\r\n\t\tint numCols = matrix.get(0).size();\r\n\t\tArrayList<ArrayList<Integer>> newMat = new ArrayList<ArrayList<Integer>>();\r\n\t\t//Put this in second for-loop to not have to loop twice?\r\n\t\tfor(int i = 0; i < numCols; i++) newMat.add(new ArrayList<Integer>());\r\n\t\tfor(int i = 0; i < numRows; i++){\r\n\t\t\tfor (int j = 0; j < numCols; j++){\r\n\t\t\t\tnewMat.get(j).add(matrix.get(i).get(j));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn newMat;\r\n\t}", "public void rotateMatrix(int[][] matrix) {\n\n int length = matrix[0].length;\n // Rotate each layer of the NxN matrix starting with the outermost one first\n for(int layer = 0;layer < length/2; layer ++) {\n\n for(int i = layer; i < length - 1 - layer;i++) {\n int topLeft = matrix[layer][i];\n\n // topLeft = bottomLeft\n matrix[layer][i] = matrix[length - 1 - layer - i][layer];\n\n // bottomLeft = bottomRight\n matrix[length - 1 - layer - i][layer] = matrix[length - 1 - layer][length - 1 - layer - i];\n\n //bottomRight = topRight\n matrix[length - 1 - layer][length - 1 - layer - i] = matrix[i][length - 1 - layer];\n\n //topRight = topLeft\n matrix[i][length - 1 - layer] = topLeft;\n }\n }\n }", "public static ECMatrix _translateToECMatrix(short[][] puzzle) {\r\n\t\t\r\n\t\tint nonEmpty = countNonEmptyBoxes(puzzle);\r\n\t\t\r\n\t\tSudokuModel model = new SudokuModel(puzzle);\r\n\t\t\r\n\t\tint columnLength = nonEmpty+((81-nonEmpty)*9);\r\n\t\tshort[][] spareMatrix = new short[columnLength][324];\r\n\t\tString[] rowIds = new String[columnLength];\r\n\r\n\t\tint rowNumber = 0;\r\n\t\t\r\n\t\t\r\n\t\tfor(int y = 0; y < puzzle.length; y++){\r\n\t\t\tfor(int x = 0; x < puzzle[0].length;x++){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tshort puzzleValue = (short) (puzzle[y][x]-(1));\r\n\r\n\t\t\t\tif(puzzleValue==-1){\r\n\t\t\t\t\r\n\t\t\t\t\trowNumber = _addPossibleValues(rowNumber,y,x,spareMatrix,rowIds,model);\r\n\t\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\trowNumber = _addRestrictions(rowNumber,y,x,puzzleValue,spareMatrix,rowIds);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\tECMatrix retVal = new ECMatrix(spareMatrix,rowIds);\r\n\t\treturn retVal;\r\n\t}", "Matrix mult(Matrix M){\n if(this.getSize() != M.getSize()){\n throw new RuntimeException(\"Matrix\");\n\n } \n int newMatrixSize = this.getSize();\n Matrix newM = M.transpose();\n Matrix resultMatrix = new Matrix(newMatrixSize);\n double resultMatrix_Entry = 0;\n for(int i = 1; i <= newMatrixSize; i++){\n for(int j = 1; j<= newMatrixSize; j++){\n List itRow_A = this.rows[i - 1];\n List itRow_B = newM.rows[j-1];\n itRow_A.moveFront();\n itRow_B.moveFront();\n while((itRow_A.index() != -1) && (itRow_B.index() != -1)){\n Entry c_A = (Entry)itRow_A.get();\n Entry c_B = (Entry) itRow_B.get();\n if(c_A.column == c_B.column){\n resultMatrix_Entry += (c_A.value)*(c_B.value);\n itRow_A.moveNext();\n itRow_B.moveNext();\n\n } else if(c_A.column > c_B.column){\n itRow_B.moveNext();\n\n }else{\n itRow_A.moveNext();\n }\n\n }\n resultMatrix.changeEntry(i, j, resultMatrix_Entry);\n resultMatrix_Entry = 0;\n }\n }\n return resultMatrix;\n\n }", "public static void flipHorizontalAxis(int[][] matrix){\n\n int beginIndex = 0;\n int endIndex = (matrix.length - 1);\n int[] begin = matrix[beginIndex];\n int[] end = matrix[endIndex];\n int[] temp;\n\n\n while(endIndex > beginIndex){\n //swap the arrays with a temp variable\n temp = Arrays.copyOf(begin, begin.length);\n begin = Arrays.copyOf(end, end.length);\n end = Arrays.copyOf(temp, temp.length);\n\n //update the new arrays in the matrix\n matrix[beginIndex] = begin;\n matrix[endIndex] = end;\n\n //update the new indexes\n beginIndex++;\n endIndex--;\n\n //move begin and end to the next set to be swapped\n begin = matrix[beginIndex];\n end = matrix[endIndex];\n }\n\n }", "public static Matrix identityMatrix(int nrow){\r\n \tMatrix u = new Matrix(nrow, nrow);\r\n \tfor(int i=0; i<nrow; i++){\r\n \t\tu.matrix[i][i]=1.0;\r\n \t}\r\n \treturn u;\r\n \t}", "public int[][] getMatriuSolucio() {\n\t\treturn null;\n\t}", "public boolean compMatrix(Matrix m1, Matrix m2) {\n if (m1.getRowDimension() != m2.getRowDimension() || m1.getColumnDimension() != m2.getColumnDimension()) {\n return false;\n } else {\n for (int i = 0; i < m1.getRowDimension(); i++) {\n for (int j = 0; j < m1.getColumnDimension(); j++) {\n if (m1.get(i, j) != m2.get(i, j)) {\n return false;\n }\n }\n }\n }\n return true;\n }", "private static void rotateMatrix(int[][] matrix) {\n\n\t\t// Assume: the elements are integer, and are unique values so that the result\n\t\t// can be tested for correctness.\n\t\t// Question: are the dimensions square? i.e. row and column count are the same?\n\t\t// Assume Yes.\n\t\t// Question: Which direction should the array be rotated - Assume clockwise\n\n\t\t// Iterate from counter min to max - 1\n\t\t// Copy top row first cell into a temp variable.\n\t\t// Copy each corner into the next corner. Use temp variable to fill the last\n\t\t// corner\n\t\t// Decrement counter and perform for next set of cells\n\t\t// Repeat for inner layers.\n\n\t\t// Bounding Co-ordinates: matrix[min][min], matrix[min, max], matrix[max, max],\n\t\t// matrix[max, min]\n\t\t// Initially: min = 0, max = N-1 (i.e. 0 based array positions)\n\t\t// pos = min\n\t\t// While pos < max\n\t\t// temp = matrix[min][pos]\n\t\t// matrix[min][pos] = matrix[max - pos + min][min]\n\t\t// matrix[max - pos + min][min] = matrix[max][max - pos + min]\n\t\t// matrix[max][max - pos + min] = matrix[pos][max]\n\t\t// matrix[pos][max] = temp\n\t\t// Increment pos\n\t\t// Increment min and decrement max\n\t\t// Break when min >= max\n\t\t// For even N, the last grid will be a 2 X 2 matrix, for odd N, the last grid\n\t\t// will be a single cell\n\n\t\t// T.C. N/2 iterations of the while loop (for even N)\n\t\t// T.C. = (N - 1) + (N-3) + .. 1\n\t\t// [first calls executes 5 for loops, each N-1 times. last call executes 2*2\n\t\t// matrix. i.e. N-1 = 1]\n\t\t// = (N-1 + N-3 + .. + 1) = (N-1 + N-3 + ... + N-(N-1))\n\t\t// = (N*N/2 - (1 + 3 + .. + N-1))\n\t\t// Sum of n even no.s = n(n+1)\n\t\t// Sum of n odd no.s = N(N+1)/2 - n(n+1). Where N = Max of odd no. + 1\n\t\t// T.C. = (N*N/2 - (N(N+1)/2 - N/2 * (N/2 + 1)))\n\t\t// = ( N*N/2 - (N*N/2 + N/2 - N*N/4 - N/2)) = (N*N/4)\n\t\t// T.C = O(N*N), this is the best possible T.C as each element needs to be\n\t\t// visited once.\n\t\t// S.C. O(1)\n\n\t\tif (matrix == null || matrix.length == 0)\n\t\t\treturn;\n\n\t\tif (matrix.length != matrix[0].length)\n\t\t\tthrow new NotASquareMatrixException(\"Not a square matrix. Cannot be rotated in place.\");\n\n\t\tint min = 0;\n\t\tint max = matrix.length - 1;\n\t\tprint(matrix);\n\n\t\twhile (min < max) {\n\t\t\trotateCellsInALayer(matrix, min, max);\n\t\t\tprint(matrix);\n\t\t\tmin++;\n\t\t\tmax--;\n\t\t}\n\t}", "public void testRotationMatrix() {\n\n u = 1;\n RotationMatrix rM = new RotationMatrix(a, b, c, u, v, w, theta);\n // This should be the identity matrix\n double[][] m = rM.getMatrix();\n for(int i=0; i<m.length; i++) {\n for(int j=0; j<m.length; j++) {\n if(j==i) {\n assertEquals(m[i][j], 1, TOLERANCE);\n } else {\n assertEquals(m[i][j], 0, TOLERANCE);\n }\n }\n }\n }", "@Override\n public Matrix like(int rows, int columns) {\n return new PivotedMatrix(base.like(rows, columns));\n }", "static int[][] inverse(int A[][]) \n { \n int inverse[][] = new int[4][4];\n // Find determinant of A[][] \n int det = determinant(A, N)%26; \n System.out.println(det);\n if (det == 0) \n { \n System.out.print(\"Singular matrix, can't find its inverse\"); \n return null; \n } \n \n // Find adjoint \n int [][]adj = new int[N][N]; \n adjoint(A, adj); \n \n // Find Inverse using formula \"inverse(A) = adj(A)/det(A)\" \n for (int i = 0; i < N; i++) \n for (int j = 0; j < N; j++) {\n inverse[i][j] = adj[i][j]/det; \n inverse[i][j] = inverse[i][j]%26;\n System.out.print(inverse[i][j]);\n }\n return inverse; \n }", "public static void test() {\n // create M-by-N matrix that doesn't have full rank\n int M = 8, N = 5;\n Matrix B = Matrix.random(5, 3);\n Matrix A = Matrix.random(M, N).times(B).times(B.transpose());\n System.out.print(\"A = \");\n A.print(9, 6);\n\n // compute the singular vallue decomposition\n System.out.println(\"A = U S V^T\");\n System.out.println();\n SingularValueDecomposition s = A.svd();\n System.out.print(\"U = \");\n Matrix U = s.getU();\n U.print(9, 6);\n System.out.print(\"Sigma = \");\n Matrix S = s.getS();\n S.print(9, 6);\n System.out.print(\"V = \");\n Matrix V = s.getV();\n V.print(9, 6);\n System.out.println(\"rank = \" + s.rank());\n System.out.println(\"condition number = \" + s.cond());\n System.out.println(\"2-norm = \" + s.norm2());\n\n // print out singular values\n System.out.print(\"singular values = \");\n Matrix svalues = new Matrix(s.getSingularValues(), 1);\n svalues.print(9, 6);\n\n\t\t Matrix C = U.times(S).times(V.transpose());\n\t\t C.print(9, 6);\n\n\t\t Matrix D = A.transpose();\n\t\t D.print(9, 6);\n\n\t\t Matrix E = D.times(A);\n\t\t E.print(9, 6);\n }", "@Nonnull\n public Matrix getU ()\n {\n final Matrix aNewMatrix = new Matrix (m_nCols, m_nCols);\n final double [] [] aNewArray = aNewMatrix.internalGetArray ();\n for (int nRow = 0; nRow < m_nCols; nRow++)\n {\n final double [] aSrcRow = m_aLU[nRow];\n final double [] aDstRow = aNewArray[nRow];\n for (int nCol = 0; nCol < m_nCols; nCol++)\n if (nRow <= nCol)\n aDstRow[nCol] = aSrcRow[nCol];\n else\n aDstRow[nCol] = 0.0;\n }\n return aNewMatrix;\n }", "public int[][] getAdjacencyMatrix();", "public Matrix rref() {\n\t\tMatrix m = ref();\n\t\tint pivotRow = m.M - 1;\n\t\tArrayList<Integer> pivotColumns = m.pivotColumns();\n\t\tCollections.reverse(pivotColumns);\n\t\tfor (int i = 0; i < pivotColumns.size(); i++) {\n\t\t\tint pivotCol = pivotColumns.get(i);\n\t\t\twhile (pivotRow >= 0 && m.ROWS[pivotRow][pivotCol].equals(new ComplexNumber(0))) {\n\t\t\t\tpivotRow--;\n\t\t\t}\n\t\t\tfor (int upperRow = pivotRow - 1; upperRow > -1; upperRow--) {\n\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\tComplexNumber factor2 = m.ROWS[upperRow][pivotCol];\n\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][pivotCol];\n\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\tm = m.rowAdd(upperRow, pivotRow, weight);\n\t\t\t}\n\t\t\tpivotRow--;\n\t\t}\n\t\treturn m;\n\t}", "Matrix4f getModelMatrix();", "public int[][] getMat() {\n // Note: java has no return read-only so we won't return matrix;\n // b\\c that would expose internal representation. Instead we will\n // copy each row into a new matrix, and return that.\n return Helper.cloneMatrix(matrix);\n }", "public Matrix transpose() {\n Matrix A = new Matrix(N, M);\n for (int i = 0; i < M; i++)\n for (int j = 0; j < N; j++)\n A.data[j][i] = this.data[i][j];\n return A;\n }", "static void rotate(int[][] matrix) {\n int n = matrix.length;\n for (int i = 0; i < (n + 1) / 2; i++) {\n for (int j = 0; j < n / 2; j++) {\n int temp = matrix[n - 1 - j][i];\n matrix[n - 1 - j][i] = matrix[n - 1 - i][n - j - 1];\n matrix[n - 1 - i][n - j - 1] = matrix[j][n - 1 - i];\n matrix[j][n - 1 - i] = matrix[i][j];\n matrix[i][j] = temp;\n }\n }\n }", "private void getProperBaseMatrix(Matrix matrix) \r\n {\r\n \tif(mViewWidth == 0)\r\n \t\treturn;\r\n \t\r\n \tfloat w = mRoBitmap.getWidth();\r\n \tfloat h = mRoBitmap.getHeight();\r\n \t\r\n matrix.reset();\r\n // We limit up-scaling to 3x otherwise the result may look bad if it's\r\n // a small icon.\r\n float widthScale = (float)((float)mViewWidth / w);//Math.min((float)((float)mViewWidth / w), 3.0f);\r\n float heightScale = (float)((float)mViewHeight / h);//Math.min((float)((float)mViewHeight / h), 3.0f);\r\n float scale = Math.max(widthScale, heightScale);\r\n \r\n matrix.postConcat(mRoBitmap.getRotateMatrix());\r\n matrix.postScale(scale, scale);\r\n\r\n matrix.postTranslate(\r\n (mViewWidth - w * scale) / 2F,\r\n (mViewHeight - h * scale) / 2F);\r\n }", "public boolean ident() {\n clear();\n for (int i = 0; i < 4; i++) {\n double[] toAdd = new double[4];\n for (int j = 0; j < 4; j++) {\n if (j == i) {\n toAdd[j] = 1;\n } else {\n toAdd[j] = 0;\n }\n }\n mat.add(toAdd);\n }\n maxCols = mat.size();\n return true;\n }", "public static Matrix getUpperMatrix(Matrix A) {\n\t\tint size = A.getColumnDimension();\n\t\t\n\t\tdouble[][] u = new double[size][size];\n\t\t\n\t\tfor(int i = 0; i<size; i++){\n\t\t\tfor(int j=0; j < size; j++){\n\t\t\t\tif(j>i) u[i][j] = A.get(i, j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tMatrix U = new Matrix(u);\n\t\t\n\t\treturn U;\n\t}", "public void testCompact()\n {\n System.out.println(\"compact\");\n \n\n AbstractSparseMatrix m1 = (AbstractSparseMatrix) this.createRandom();\n m1.setElement(0,0, 0.0);\n Matrix m2 = m1.clone();\n assertEquals( m1, m2 );\n \n m1.compact();\n \n assertEquals( m1, m2 );\n \n }", "@Test\n public void testCreateTranspose2(){\n double[][] a = new double[5][5];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }", "static void setFirstColumnToZero(int[][] matrix,int numberOfRows){\n for(int i=0;i<numberOfRows;i++){\n matrix[i][0]=0;\n }\n }", "private static void changeSubMatrix(int[][] matrix,MatrixSize matrixSize){\n for(int i=1;i<matrixSize.numberOfRows;i++){\n for(int j=1;j<matrixSize.numberOfColumns;j++){\n if(matrix[i][0]==0 || matrix[0][j]==0){\n matrix[i][j]=0;\n }\n }\n }\n }", "Matrix sub(Matrix m){\n if(m.cols != this.cols || m.rows != this.rows) throw new RuntimeException(String.format(\"Wrong dimensions\"));\n Matrix matrix_to_return = new Matrix(m.rows, m.cols);\n for(int i=0; i<m.rows * m.cols; i++){\n matrix_to_return.data[i] = this.data[i] - m.data[i];\n }\n return matrix_to_return;\n }", "@Test\n public void testCreateTranspose3(){\n double[][] a = new double[4][2];\n for(int i = 0 ; i < a.length ; i++){\n for(int j = 0 ; j < a[0].length ; j++){\n a[i][j] = Math.random();\n }\n }\n double[][] newA = HarderArrayProblems.createTranspose(a);\n checkTranspose(a, newA);\n }", "public static void testMulRecStrassen() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.strassen(m1, m2);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public MatrixArray minor(int col){\t\t\r\n\t\tint newN = this.N - 1;\r\n\t\tint[][] matrix = new int[newN][newN];\r\n\t\t\r\n\t\tint i2 = 0;\r\n\t\tfor(int i = 1; i < this.N; i++){\t\t\t\t\t\t\r\n\t\t\tint j2 = 0;\r\n\t\t\tfor (int j = 0; j < this.N; j++){\r\n\t\t\t\tif (j == col) continue;\t\t\t\t\r\n\t\t\t\tmatrix[i2][j2] = this.MA[i][j];\r\n\t\t\t\tj2++;\r\n\t\t\t}\r\n\t\t\ti2++;\r\n\t\t}\t\t\r\n\t\treturn new MatrixArray(matrix);\r\n\t}", "public boolean isVector() {\n return mat.getNumRows() == 1 || mat.getNumCols() == 1;\n }", "public boolean rotate(int[][] matrix) {\n int n = matrix.length;\n if(n == 0 || n != matrix[0].length){\n return false;\n }\n for(int layer = 0; layer < n/2; layer++){\n int first = layer;\n int last = n - 1 - layer;\n \n for(int i = first; i < last; i++){\n int offset = i - first;\n int temp = matrix[first][i];\n //Left -> Top\n matrix[first][i] = matrix[last - offset][first];\n //Bottom -> Left\n matrix[last - offset][first] = matrix[last][last-offset];\n //Right -> Bottom\n matrix[last][last-offset] = matrix[i][last];\n //Top -> Right\n matrix[i][last] = temp;\n }\n \n }\n \n printMatrix(matrix);\n return true;\n }", "public E[][] getMatrix() {\r\n\t\t@SuppressWarnings(\"unchecked\")\r\n\t\tE[][] matrix = (E[][]) new Object[mColumnCount][mRowCount];\r\n\t\tfor(int i=0; i<mColumnCount; i++)\r\n\t\t\tfor(int j=0; j<mRowCount; j++)\r\n\t\t\t\tmatrix[i][j] = getFromArray(i, j);\r\n\t\treturn matrix;\r\n\t}", "Matrix(BigInteger[][] matrix) {\n this.nrOfRows = matrix.length;\n this.nrOfCols = matrix[0].length;\n this.inner = matrix;\n }", "public double[][] convert_img_mat()\n\t{\n\t\tif(orderflag)\n\t\t{\n\t\t\tputpixel_1();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//rotate the image and get the pixels as usual form\t\n \t\tputpixel_2();\n\t\t}\n\treturn matrix;\n\t}", "public Matrix rotate90Degree() {\n\t\tMatrix rotatedMatrix = new Matrix(this.getHeight(), this.getWidth());\n\t\tfor(int i = 0; i < this.getWidth(); i++) {\n\t\t\tfor(int j = 0; j < this.getHeight(); j++) {\n\t\t\t\trotatedMatrix.setElement(j, (this.getWidth() -1) - i, data[i][j]);\n\t\t\t}\n\t\t}\n\t\tthis.show();\n\t\trotatedMatrix.show();\n\t\treturn rotatedMatrix;\n\t}" ]
[ "0.63443303", "0.6239527", "0.6174155", "0.61727405", "0.6110002", "0.60591346", "0.59317267", "0.5927466", "0.58685595", "0.5836477", "0.5812778", "0.57915795", "0.5766151", "0.575346", "0.5744706", "0.56538934", "0.5636562", "0.5620222", "0.5586087", "0.5579978", "0.55714124", "0.55595136", "0.5545692", "0.5543007", "0.5530774", "0.552903", "0.55247", "0.55133194", "0.55110884", "0.5480442", "0.5460496", "0.54560846", "0.5442699", "0.54400223", "0.5438151", "0.54338115", "0.54315895", "0.54022", "0.53916794", "0.53892565", "0.5385841", "0.538526", "0.5384471", "0.53818476", "0.53791314", "0.53754157", "0.53651", "0.53594536", "0.53591883", "0.5358842", "0.53489673", "0.53486514", "0.534635", "0.53421175", "0.533913", "0.53231794", "0.5322821", "0.53155977", "0.5302756", "0.5299978", "0.52969074", "0.52898574", "0.5288137", "0.52849543", "0.52818185", "0.52800065", "0.5274661", "0.52700204", "0.5269204", "0.5267332", "0.52556986", "0.52528036", "0.5244326", "0.5243348", "0.52391154", "0.52349865", "0.52317953", "0.5212002", "0.5209814", "0.52093494", "0.52078813", "0.52062124", "0.5196997", "0.5194078", "0.5192347", "0.5185357", "0.5181783", "0.5173023", "0.5171971", "0.5171636", "0.5169684", "0.516225", "0.5160441", "0.51588345", "0.51561934", "0.5155138", "0.51491517", "0.5148982", "0.5139111", "0.5136752", "0.5128512" ]
0.0
-1
Downloads a file from a URL
public void downloadFile(String fileURL, String saveDir) throws IOException { URL url = new URL(fileURL); HttpURLConnection httpConn = (HttpURLConnection) url.openConnection(); int responseCode = httpConn.getResponseCode(); // always check HTTP response code first if (responseCode == HttpURLConnection.HTTP_OK) { String fileName = ""; String disposition = httpConn.getHeaderField("Content-Disposition"); String contentType = httpConn.getContentType(); int contentLength = httpConn.getContentLength(); if (disposition != null) { // extracts file name from header field int index = disposition.indexOf("filename="); if (index > 0) { fileName = disposition.substring(index + 10, disposition.length() - 1); } } else { // extracts file name from URL fileName = fileURL.substring(fileURL.lastIndexOf("/") + 1, fileURL.length()); } System.out.println("Content-Type = " + contentType); System.out.println("Content-Disposition = " + disposition); System.out.println("Content-Length = " + contentLength); System.out.println("fileName = " + fileName); // opens input stream from the HTTP connection InputStream inputStream = httpConn.getInputStream(); String saveFilePath = saveDir + File.separator + fileName; // opens an output stream to save into file FileOutputStream outputStream = new FileOutputStream(saveFilePath); int bytesRead = -1; byte[] buffer = new byte[BUFFER_SIZE]; int progress = 0; while ((bytesRead = inputStream.read(buffer)) != -1) { outputStream.write(buffer, 0, bytesRead); progress += bytesRead; setChanged(); notifyObservers((int) ((progress * 100) / contentLength)); } outputStream.close(); inputStream.close(); System.out.println("File downloaded"); } else { System.out.println("No file to download. Server replied HTTP code: " + responseCode); } httpConn.disconnect(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String download(String path) throws IOException;", "private String downloadFile(String url) throws Exception {\n StringBuilder builder = new StringBuilder();\n \n URL u = new URL(url);\n URLConnection conn = u.openConnection();\n BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()));\n String line;\n while ((line = rd.readLine()) != null) {\n builder.append(line);\n }\n \n return builder.toString();\n }", "void downloadingFile(String path);", "public static void downloadFileFromUrl(String fileName, String fileUrl)\n throws MalformedURLException, IOException {\n System.out.println(\"opening connection\");\n URL url = new URL(fileUrl);\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n httpURLConnection.setRequestMethod(\"GET\");\n httpURLConnection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.0.13) Gecko/2009073021 Firefox/3.0.13\");\n httpURLConnection.connect();\n InputStream inputStream = url.openStream();\n FileOutputStream fileOutputStream = new FileOutputStream(new File(fileName));\n\n System.out.println(\"Downloading from URL and writing to file...\");\n\n int length = -1;\n byte[] buffer = new byte[1024];\n while ((length = inputStream.read(buffer)) > -1) {\n fileOutputStream.write(buffer, 0, length);\n }\n fileOutputStream.close();\n inputStream.close();\n\n System.out.println(\"File downloaded\");\n }", "public static void httpDownload(String url, FileOutputStream file) throws Exception {\r\n \t\tDefaultHttpClient client = new DefaultHttpClient();\r\n \t\tHttpResponse response = client.execute(new HttpGet(url));\r\n \t\tif(response.getStatusLine().getStatusCode() < 400){\r\n \t\t\tBufferedOutputStream writer = null;\r\n \t\t\tBufferedInputStream reader = null;\r\n \t\t\ttry {\r\n \t\t\t\twriter = new BufferedOutputStream(file);\r\n \t\t\t\treader = new BufferedInputStream(response.getEntity().getContent());\r\n \r\n \t\t\t\tbyte[] buffer = new byte[BUF_SIZE];\r\n \t\t\t\tint bytesRead = reader.read(buffer);\r\n \r\n \t\t\t\twhile (bytesRead > 0) {\r\n \t\t\t\t\twriter.write(buffer, 0, bytesRead);\r\n \t\t\t\t\tbytesRead = reader.read(buffer);\r\n \t\t\t\t}\r\n \t\t\t} finally {\r\n \t\t\t\tif (writer != null) {\r\n \t\t\t\t\twriter.close();\r\n \t\t\t\t}\r\n \t\t\t\tif (reader != null) {\r\n \t\t\t\t\treader.close();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}", "private void DownloadFile(String url){\n ContentManager contentManager = ContentManager.getInstance();\n String fileName = contentManager.getCurrentPlayingSongTitle().trim();\n fileName = TextUtil.removeAccent(fileName);\n fileName += url.substring(url.length()-4, url.length());\n final FileDownloadWorker fileDownloadWorker = new FileDownloadWorker(getContext(), true, this);\n fileDownloadWorker\n .setDialogMessage(getContext().getString(R.string.wait_downloading))\n .setHorizontalProgressbar()\n .setDialogCancelCallback(getContext().getString(R.string.hide), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n fileDownloadWorker.showNotificationProgress();\n }\n });\n fileDownloadWorker.execute(url, fileName);\n }", "private String downloadURL(String url) {\n\t\ttry {\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpGet request = new HttpGet(url);\n\t\t\t// Get the response\n\t\t\tResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t\t\tString response_str = client.execute(request, responseHandler);\n\t\t\treturn response_str;\n\n\t\t\t// Makes sure that the InputStream is closed after the app is\n\t\t\t// finished using it.\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"WL\", \"Error\");\n\t\t\te.printStackTrace();\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "private int DownloadFile(URL url) {\n try {\n //---simulate taking some time to download a file---\n thread.sleep(5000);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n return 100;\n }", "public static void downloadUrl(URL url, String localFilename) throws IOException {\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n URLConnection urlConnection = url.openConnection();\n\n is = urlConnection.getInputStream();\n fos = new FileOutputStream(localFilename);\n\n byte[] buffer = new byte[4096];\n int len;\n\n while ((len = is.read(buffer)) > 0) {\n fos.write(buffer, 0, len);\n }\n } finally {\n try {\n if (is != null) {\n is.close();\n }\n } finally {\n if (fos != null) {\n fos.close();\n }\n }\n }\n }", "public static void httpDownload(String url, String destFile) throws Exception {\r\n \t\tFileOutputStream out = null;\r\n \t\ttry {\r\n \t\t\tout = new FileOutputStream(destFile);\r\n \t\t\thttpDownload(url, out);\r\n \r\n \t\t} finally {\r\n \t\t\tif (out != null) {\r\n \t\t\t\tout.close();\r\n \t\t\t}\r\n \t\t}\r\n \t}", "static String download(String fileURL, String destinationDirectory, String downloadedFileName) throws IOException {\n URL url = new URL(fileURL);\r\n InputStream is = url.openStream();\r\n // Stream to the destionation file\r\n FileOutputStream fos;\r\n if (destinationDirectory == null) {// save to working folder\r\n fos = new FileOutputStream(downloadedFileName);\r\n } else {\r\n fos = new FileOutputStream(destinationDirectory + \"/\" + downloadedFileName);\r\n }\r\n // Read bytes from URL to the local file\r\n byte[] buffer = new byte[4096];\r\n int bytesRead = 0;\r\n\r\n System.out.print(\"Downloading \" + downloadedFileName);\r\n while ((bytesRead = is.read(buffer)) != -1) {\r\n System.out.print(\".\"); // Progress bar :)\r\n fos.write(buffer, 0, bytesRead);\r\n }\r\n System.out.println(\"done!\");\r\n\r\n // Close destination stream\r\n fos.close();\r\n // Close URL stream\r\n is.close();\r\n return downloadedFileName;\r\n }", "public void download(URL url, File location, HttpDownloadListener dl)\n\tthrows CanceledDownloadException, IOException {\n\tHttpResponse hr = _httpRequest.doGetRequest(url);\n\tdownload(hr, location, dl);\n }", "public static void download(URL url, File file) throws IOException {\n\t\tif (!file.getParentFile().exists())\n\t\t\tfile.getParentFile().mkdir();\n\t\tif (file.exists())\n\t\t\tfile.delete();\n\t\tfile.createNewFile();\n\t\tint size = url.openConnection().getContentLength();\n\t\tUtil.info(\"Downloading \" + file.getName() + \" (\" + size / 1024 + \"kb) ...\");\n\t\tInputStream in = url.openStream();\n\t\tOutputStream out = new BufferedOutputStream(new FileOutputStream(file));\n\t\tbyte[] buffer = new byte[1024];\n\t\tint len, downloaded = 0, msgs = 0;\n\t\tfinal long start = System.currentTimeMillis();\n\t\twhile ((len = in.read(buffer)) >= 0) {\n\t\t\tout.write(buffer, 0, len);\n\t\t\tdownloaded += len;\n\t\t\tif ((int)((System.currentTimeMillis() - start) / 500) > msgs) {\n\t\t\t\tUtil.info((int)((double)downloaded / (double)size * 100d) + \"%\");\n\t\t\t\tmsgs++;\n\t\t\t}\n\t\t}\n\t\tin.close();\n\t\tout.close();\n\t\tUtil.info(\"Download finished\");\n\t}", "private void dowloadFile(String dir, String file, String webPage) throws IOException {\n\t\tURL url = new URL(webPage);\n\t\tURLConnection connection = url.openConnection();\n\t\tconnection.connect();\n\t\tInputStream input = new BufferedInputStream(url.openStream());\n\t\tFile f = new File(dir, file);\n\t\tif (f.exists()) f.delete();\n\t\tf.getParentFile().mkdirs();\n\t\tFileOutputStream output = new FileOutputStream(f);\n\t\tbyte data[] = new byte[1024];\n\t\tint n;\n\t\twhile ((n = input.read(data)) != -1) {\n\t\t\toutput.write(data, 0, n);\n\t\t}\n\t\toutput.flush();\n\t\toutput.close();\n\t\tinput.close();\n\t}", "public static String getFile(String url) {\n final String USER_AGENT = \"Mozilla/5.0\";\n\n StringBuilder response = null;\n try {\n URL obj = new URL(url);\n HttpURLConnection con = (HttpURLConnection) obj.openConnection();\n\n // request method\n con.setRequestMethod(\"GET\");\n\n //add request header\n con.setRequestProperty(\"User-Agent\", USER_AGENT);\n\n int responseCode = con.getResponseCode();\n System.out.println(\"Sending 'GET' request to URL : \" + url);\n System.out.println(\"Response Code : \" + responseCode);\n\n BufferedReader in = new BufferedReader(\n new InputStreamReader(con.getInputStream()));\n response = new StringBuilder();\n\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n response.append(inputLine).append(\"\\n\");\n }\n in.close();\n return response.toString();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return \"\";\n }", "public void download() {\n \n try {\n \n downloading = true;\n \n input = link.openStream(); \n output = new FileOutputStream(localFile);\n \n while ((bytes = input.read()) != -1) { // as long as there are bytes they will be copied to the local machine // enquanto houver bytes eles serao copiados para maquina local\n\n output.write(bytes);\n\n System.out.println(\"Tamanho: \" + sizeInMegaBytes(localFile) + \" MB\");\n\n }\n \n downloading = false;\n JOptionPane.showMessageDialog(null, \"Download do arquivo: \"+ localFile.getName() +\" Finalizado\");\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(Downloader.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Downloader.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private String downloadURL(String myurl) {\n\t\ttry {\n\t\t\tHttpClient client = new DefaultHttpClient();\n\t\t\tHttpGet request = new HttpGet(myurl);\n\t\t\t// Get the response\n\t\t\tResponseHandler<String> responseHandler = new BasicResponseHandler();\n\t\t\tString response_str = client.execute(request, responseHandler);\n\t\t\treturn response_str;\n\n\t\t\t// Makes sure that the InputStream is closed after the app is\n\t\t\t// finished using it.\n\t\t} catch (IOException e) {\n\t\t\tLog.d(\"WL\", \"Error\");\n\t\t\treturn \"Error\";\n\t\t}\n\t}", "@Test\n public void downloadTest() throws ApiException {\n Integer devid = null;\n String path = null;\n File response = api.download(devid, path);\n\n // TODO: test validations\n }", "public static String downloadFileFromURL(Context mContext, String urlLinkToDownloadFrom, String downloadedFileName) {\n int count;\n try {\n URL url = new URL(urlLinkToDownloadFrom);\n URLConnection connection = url.openConnection();\n connection.connect();\n InputStream input = new BufferedInputStream(url.openStream(), 8192);\n String newFileLocation = mContext.getExternalFilesDir(null).toString() + \"/\" + downloadedFileName;\n writeLog(LOG_LEVEL.INFO, \"File downloaded at: \" + newFileLocation);\n OutputStream output = new FileOutputStream(newFileLocation);\n byte[] data = new byte[1024];\n while ((count = input.read(data)) != -1) {\n output.write(data, 0, count);\n }\n output.flush();\n output.close();\n input.close();\n hideProgressDialog();\n return newFileLocation;\n } catch (Exception e) {\n writeLog(LOG_LEVEL.ERROR, e.getMessage());\n hideProgressDialog();\n return null;\n }\n }", "public String getSourceDownloadUrl();", "public static byte[] download(String url, byte[] data) {\n\t\treturn download(url, data, null, 0);\n\t}", "public void download(URL link, File localFile) {\n\n try {\n downloading = true;\n \n input = link.openStream();\n output = new FileOutputStream(localFile);\n\n while ((bytes = input.read()) != -1) {\n\n output.write(bytes);\n\n System.out.println(\"Tamanho: \" + sizeInMegaBytes(localFile) + \" MB\");\n\n }\n \n downloading = false;\n JOptionPane.showMessageDialog(null, \"Download do arquivo: \"+ localFile.getName() +\" Finalizado\");\n \n } catch (FileNotFoundException ex) {\n Logger.getLogger(Downloader.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(Downloader.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static File saveURLtoFile(URL url) throws URISyntaxException, IOException {\n\n /* The URL is validated */\n url.toURI();\n\n ReadableByteChannel rbc = Channels.newChannel(url.openStream());\n FileOutputStream fos = new FileOutputStream(SAVED_FILE_PATH);\n fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);\n fos.close();\n\n logger.info(\"URL's content retrieved and save at \" + SAVED_FILE_PATH);\n return new File(SAVED_FILE_PATH);\n }", "String wget(String url);", "@Streaming\n @GET\n Call<ResponseBody> downloadFileWithDynamicUrlSync(@Url String fileUrl);", "public void download(String url,File targetFile)throws Exception{\n\t\tdownload(url, targetFile,60*10);\n\t}", "private static String downloadUrl(String downloadUrl) throws IOException {\n URL url = new URL(downloadUrl);\n\n HttpURLConnection httpURLConnection= (HttpURLConnection) url.openConnection();\n httpURLConnection.connect();\n\n InputStream urlInputStream = httpURLConnection.getInputStream();\n BufferedReader museumDataReader = new BufferedReader(new InputStreamReader(urlInputStream));\n\n StringBuilder museumDataBuilder = new StringBuilder();\n String line = \"\";\n \n while( (line = museumDataReader.readLine()) != null ) {\n museumDataBuilder.append(line);\n }\n\n String museumData = museumDataBuilder.toString();\n museumDataReader.close();\n\n return museumData;\n }", "public static String downloadFile(String fileURL, String saveDir)\n throws IOException {\n String filePath = \"\";\n URL url = new URL(fileURL);\n HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();\n int responseCode = httpConn.getResponseCode();\n\n // always check HTTP response code first\n if (responseCode == HttpURLConnection.HTTP_OK) {\n String fileName = \"\";\n String disposition = httpConn.getHeaderField(\"Content-Disposition\");\n String contentType = httpConn.getContentType();\n int contentLength = httpConn.getContentLength();\n\n if (disposition != null) {\n // extracts file name from header field\n int index = disposition.indexOf(\"filename=\");\n if (index > 0) {\n fileName = disposition.substring(index + 10,\n disposition.length() - 1);\n }\n } else {\n // extracts file name from URL\n fileName = fileURL.substring(fileURL.lastIndexOf(\"/\") + 1,\n fileURL.length());\n }\n\n System.out.println(\"Content-Type = \" + contentType);\n System.out.println(\"Content-Disposition = \" + disposition);\n System.out.println(\"Content-Length = \" + contentLength);\n System.out.println(\"fileName = \" + fileName);\n\n // opens input stream from the HTTP connection\n InputStream inputStream = httpConn.getInputStream();\n String saveFilePath = saveDir + File.separator + fileName;\n File f = new File(saveFilePath);\n if (!f.exists())\n f.createNewFile();\n // opens an output stream to save into file\n FileOutputStream outputStream = new FileOutputStream(saveFilePath);\n\n int bytesRead = -1;\n byte[] buffer = new byte[BUFFER_SIZE];\n while ((bytesRead = inputStream.read(buffer)) != -1) {\n outputStream.write(buffer, 0, bytesRead);\n }\n\n outputStream.close();\n inputStream.close();\n\n System.out.println(\"File downloaded\");\n filePath = saveFilePath;\n } else {\n System.out.println(\"No file to download. Server replied HTTP code: \" + responseCode);\n }\n httpConn.disconnect();\n return filePath;\n }", "public static java.io.File tryGet(String url) {\n\n java.io.File file = new java.io.File(url);\n if(file.exists() && !file.isDirectory()) {\n\n return file;\n }\n\n return null;\n }", "public static String getFileFromUrl(final String url) {\n\t\treturn url.substring(url.lastIndexOf('/') + 1);\n\t}", "@GET(\"/resource/example.zip\")\n Call<ResponseBody> downloadFileWithFixedUrl();", "public void getObject(String url) throws UrlCacheException {\n\n\t\tHost host = new Host(url);\n\n\t\tboolean fileExists = checkCatalogForFile(url);\n\n\t\tbeginDownloadStream(host.getHostName(), host.getPort(), host.getConcatPath(), host.getFileName(), fileExists);\n\t}", "public File loadFile(String coverUrl, File file) {\r\n\r\n\t\t//File file = new File(filePath);\r\n\t\ttry {\r\n\t\t\t// set the download URL, a url that points to a file on the internet\r\n\t\t\t// this is the file to be downloaded\r\n\t\t\tURL url = new URL(coverUrl);\r\n\r\n\t\t\t// create the new connection\r\n\t\t\tHttpURLConnection urlConnection = (HttpURLConnection) url\r\n\t\t\t\t\t.openConnection();\r\n\r\n\t\t\t// set up some things on the connection\r\n\t\t\turlConnection.setRequestMethod(\"GET\");\r\n\t\t\turlConnection.setDoOutput(true);\r\n\r\n\t\t\t// and connect!\r\n\t\t\turlConnection.connect();\r\n\r\n\t\t\t// this will be used to write the downloaded data into the file we\r\n\t\t\t// created\r\n\t\t\tFileOutputStream fileOutput = new FileOutputStream(file);\r\n\r\n\t\t\t// this will be used in reading the data from the internet\r\n\t\t\tInputStream inputStream = urlConnection.getInputStream();\r\n\t\t\t\r\n\t\t\t //create a buffer...\r\n\t byte[] buffer = new byte[1024];\r\n\t int bufferLength = 0; //used to store a temporary size of the buffer\r\n\r\n\t //now, read through the input buffer and write the contents to the file\r\n\t while ( (bufferLength = inputStream.read(buffer)) > 0 ) {\r\n\t //add the data in the buffer to the file in the file output stream (the file on the sd card\r\n\t fileOutput.write(buffer, 0, bufferLength);\r\n\t }\r\n\t //close the output stream when done\r\n\t fileOutput.close();\r\n\t inputStream.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t} finally {\r\n\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "public static void downloadUrlToPath(String url2, String path) {\n BufferedInputStream bInput = null;\n BufferedOutputStream bOutput = null;\n try {\n HttpURLConnection conn = null;\n URL url = new URL(url2);\n conn = (HttpURLConnection) url.openConnection();\n bInput = getBufferedInput(conn);\n bOutput = getBufferedOutput(path);\n byte[] buffer = new byte[1024];\n int cnt;\n while ((cnt = bInput.read(buffer)) != -1) {\n bOutput.write(buffer, 0, cnt);\n }\n bOutput.flush();\n if (conn != null) {\n conn.disconnect();\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (bInput != null)\n bInput.close();\n if (bOutput != null)\n bOutput.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "public static String download(String url) {\n String[] command = { \"curl\", \"-L\", \"-X\", \"GET\", url };\n\n ProcessBuilder process = new ProcessBuilder(command);\n Process p;\n try {\n p = process.start();\n BufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n StringBuilder builder = new StringBuilder();\n String line = null;\n while ((line = reader.readLine()) != null) {\n builder.append(line);\n builder.append(System.getProperty(\"line.separator\"));\n }\n String result = builder.toString();\n //System.out.print(result);\n return result;\n\n } catch (IOException e) {\n System.out.print(\"error\");\n logger.error(\"Error downloading metadata.json\");\n return null;\n }\n }", "private void startDownload(String url) {\n\t\t\turl = \"http://www.it.com.cn/dghome/img/2009/06/23/17/090623_tv_tf2_13h.jpg\";\r\n\t\t\t//String url = \"http://down.mumayi.com/41052/mbaidu\";\r\n\t\t\tUri srcUri = Uri.parse(url);\r\n\t\t\tDownloadManager.Request request = new Request(srcUri);\r\n\t\t\trequest.setDestinationInExternalPublicDir(\r\n\t\t\t\tEnvironment.DIRECTORY_DOWNLOADS, \"/\");\r\n\t\t\trequest.setDescription(\"正在下载\");\r\n\t\t\t DownloadManager mDownloadManager = new DownloadManager(activity.getContentResolver(),\r\n\t\t\t\t\t activity.getPackageName());\r\n\t\t\tmDownloadManager.enqueue(request);\r\n\t\t }", "public static DownloadResponse Download(String url)\n\t\t\tthrows MalformedURLException, IOException {\n\t\tStringBuffer response = new StringBuffer();\n\n\t\tHttpURLConnection con = (HttpURLConnection) (new URL(url))\n\t\t\t\t.openConnection();\n\n\t\t// optional default is GET\n\t\tcon.setRequestMethod(\"GET\");\n\n\t\t// add request header. Required. Otherwise would lead to 404 Error,\n\t\tcon.setRequestProperty(\"X-Requested-With\", \"XMLHttpRequest\");\n\n\t\tint responseCode = con.getResponseCode();\n\t\tif (responseCode != 200)\n\t\t\tthrow new IllegalStateException(\"Response Code: \" + responseCode);\n\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\tcon.getInputStream()));\n\n\t\tString inputLine;\n\n\t\twhile ((inputLine = in.readLine()) != null) {\n\t\t\tresponse.append(inputLine + \"\\n\");\n\t\t}\n\t\tin.close();\n\t\t\t\t\n\t\tDownloadResponse r = new DownloadResponse();\n\t\tr.setHtml(response.toString());\n\t\tr.setUrl(con.getURL().toString());\n\n\t\treturn r;\n\t}", "public File getFile(String url){\n String filename=String.valueOf(url.hashCode());\n //Another possible solution (thanks to grantland)\n //String filename = URLEncoder.encode(url);\n File f = new File(cacheDir, filename);\n return f;\n \n }", "@SuppressLint(\"NewApi\")\r\n\tprivate void downloadFile() {\n\t\tLog.d(TAG, \"In fuction downloadFile()\");\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy\");\r\n \tCalendar cal = Calendar.getInstance();\r\n \tString programmaNameUnderscore = mName.replace(\" \", \"_\");\r\n \tprogrammaNameUnderscore = programmaNameUnderscore.replace(\",\",\"\");\r\n \tString fileName = programmaNameUnderscore + \"_\" + dateFormat.format(cal.getTime())+\".mp3\";\r\n \t\r\n \t\r\n\t\tRequest request = new Request(Uri.parse(mDownloadUrl));\r\n\t\trequest.setDescription(mName);\r\n \t// in order for this if to run, you must use the android 3.2 to compile your app\r\n \tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\r\n \t request.allowScanningByMediaScanner();\r\n \t request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\r\n \t}\r\n \trequest.setDestinationInExternalPublicDir(Environment.DIRECTORY_MUSIC, getString(R.string.download_subdir_test) + File.separator + fileName);\r\n\t}", "private String downloadUrl(String strUrl) throws IOException{\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try{\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while( ( line = br.readLine()) != null){\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n }catch(Exception e){\n e.printStackTrace();\n }finally{\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private String downloadUrl(String myUrl) throws IOException {\n InputStream is = null;\n\n try {\n URL url = new URL(myUrl);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the QUERY\n conn.connect();\n //int response = conn.getResponseCode();\n //Log.d(\"JSON\", \"The response is: \" + response);\n is = conn.getInputStream();\n\n // Convert the InputStream into a string\n return readIt(is);\n\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "private String downloadUrl(String strUrl) throws IOException{\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try{\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while( ( line = br.readLine()) != null){\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n }catch(Exception e){\n System.out.println(\"Exception while downloading url \"+e.toString());\n }finally{\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private String downloadUrl(String strUrl) throws IOException{\r\n String data = \"\";\r\n InputStream iStream = null;\r\n HttpURLConnection urlConnection = null;\r\n try{\r\n URL url = new URL(strUrl);\r\n\r\n // Creating an http connection to communicate with url\r\n urlConnection = (HttpURLConnection) url.openConnection();\r\n\r\n // Connecting to url\r\n urlConnection.connect();\r\n\r\n // Reading data from url\r\n iStream = urlConnection.getInputStream();\r\n\r\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\r\n\r\n StringBuffer sb = new StringBuffer();\r\n\r\n String line = \"\";\r\n while( ( line = br.readLine()) != null){\r\n sb.append(line);\r\n }\r\n\r\n data = sb.toString();\r\n\r\n br.close();\r\n\r\n }catch(Exception e){\r\n Log.d(\"Exception:downloading\", e.toString());\r\n }finally{\r\n iStream.close();\r\n urlConnection.disconnect();\r\n }\r\n return data;\r\n }", "void download(SearchResult result, String downloadPath);", "private Drawable downloadFile(String fileUrl)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tInputStream is = (InputStream) new URL(fileUrl).getContent();\r\n\t\t\tDrawable d = Drawable.createFromStream(is, \"src\");\r\n\t\t\treturn d;\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "public void DownloadFromUrl(String imageURL, String fileName) {\n\t\tfinal String PATH = \"/data/data/org.draijer.nvkf/\";\n\t\t\n\t\ttry {\n\t\t\tURL url = new URL(imageURL); //you can write here any link\n\t\t\tFile file = new File(PATH+fileName);\n\t\t \n\t\t\tlong startTime = System.currentTimeMillis();\n\t\t\tLog.d(\"ImageManager\", \"download begining\");\n\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\n\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\" + fileName);\n\t\t\n\t\t\t/* Open a connection to that URL. */\n\t\t\tURLConnection ucon = url.openConnection();\n\t\t \n\t\t\t/*\n\t\t\t * Define InputStreams to read from the URLConnection.\n\t\t\t */\n\t\t\tBufferedInputStream bis = null;\n\t\t\ttry {\n\t\t\t\tInputStream is = ucon.getInputStream();\n\t\t\t\tbis = new BufferedInputStream(is);\n\t\t\t} catch (Exception e) {\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t\t}\t\t\t\n\t\t\t\n\t\t\t/*\n\t\t\t * Read bytes to the Buffer until there is nothing more to read(-1).\n\t\t\t */\n\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\n\t\t\ttry {\n\t\t\t\tint current = 0;\n\t\t\t\twhile ((current = bis.read()) != -1) {\n\t\t\t\t baf.append((byte) current);\n\t\t\t\t}\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\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t\t}\n\t\t\t\n\t\t\t/* Convert the Bytes read to a String. */\n\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\tfos.write(baf.toByteArray());\n\t\t\tfos.close();\n\t\t\tLog.d(\"ImageManager\", \"download ready in \"+ ((System.currentTimeMillis() - startTime) / 1000) + \" sec\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\n\t\t}\n\t}", "@Override\n public boolean downloadFile(final String url, String fileID,\n final String path) {\n DownloadFileRequest request = RequestFactory.makeDownloadFileRequest(\n fileID, \".wig\");\n\n System.out.println(\"Test: \" + fileID);\n conn.sendRequest(request, userID, \"text/plain\");\n Gson gson = new Gson();\n DownloadFileResponse response = gson.fromJson(conn.getResponseBody(),\n DownloadFileResponse.class);\n System.out.println(conn.getResponseBody());\n final DownloadHandler handler = new DownloadHandler(\"pvt\", \"pvt\");\n new Thread(new Runnable() {\n @Override\n public void run() {\n handler.download(url, path);\n }\n }).start();\n\n System.out.println(\"Test\");\n return true;\n }", "void fileDownloaded(String path);", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n } catch (Exception e) {\n //Log.d(\"Exception while downloading url\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n\n return data;\n }", "public Bitmap download(String url){\n \tSystem.out.println(url);\n \t//url = \"http://140.115.113.164:8080/wardrobe/wardrobedata/pic/15b0cfe6f85d45b9b09d6cc4f8d139b749f1c58c4c8e4ec6982d843116b70aca-R.PNG\";\n \tBitmap bitmap = null;\n \tbitmap = downloadBitmap(url);\n \tif(bitmap == null)\n \tSystem.out.print(\"bitmap is null!!\");\n \taddBitmapToCache(url, bitmap);\n \treturn bitmap;\n }", "public void downloadFile(final String fileUri, final String filePath) {\n\n new Thread(() -> {\n try {\n URL url = new URL(parseUrl(fileUri));\n URLConnection urlConnection = url.openConnection();\n InputStream inputStream = urlConnection.getInputStream();\n\n String filename = new File(filePath).getName();\n\n int count = 0;\n byte[] buffer = new byte[1024];\n\n File fileDir = new File(filePath).getParentFile();\n\n if (!fileDir.exists()) {\n fileDir.mkdirs();\n }\n\n File downloadFile = new File(fileDir + File.separator + filename);\n\n //Ensure that we do not always download existing files\n if (downloadFile.exists()) {\n return;\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(downloadFile);\n\n while ((count = inputStream.read(buffer)) != -1) {\n fileOutputStream.write(buffer, 0, count);\n }\n\n fileOutputStream.close();\n\n\n } catch (MalformedURLException e) {\n\n e.printStackTrace();\n\n\n } catch (IOException e) {\n\n e.printStackTrace();\n\n\n }\n }).start();\n\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n } catch (Exception e) {\n //Log.d(\"Exception while downloading url\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private String download(final String url) {\n driver.get(url);\n\n // wait until button is visible\n WebDriverWait waitForDownloadButton = new WebDriverWait(driver, Duration.ofSeconds(30));\n WebElement downloadButton = waitForDownloadButton.until(\n ExpectedConditions.visibilityOfElementLocated(By.id(WHOLE_FORM_BUTTON_ID)));\n\n downloadButton.click();\n\n Wait<String> waitFowDownload = new FluentWait<String>(downloadFilepath)\n .withTimeout(Duration.ofSeconds(120))\n .pollingEvery(Duration.ofMillis(500));\n\n String fileContent = waitFowDownload.until(new Function<String, String>() {\n public String apply(final String downloadPath) {\n assert downloadPath.equals(downloadFilepath);\n File folder = new File(downloadPath);\n\n if (!folder.exists()) {\n // folder does not exist yet -> wait\n return null;\n }\n\n for (File file : folder.listFiles()) {\n if (file.getName().contains(\".Html\") && !file.getName().contains(\".crdownload\")) {\n try {\n String fileContent = new String(Files.readAllBytes(Paths.get(file.getPath())));\n file.delete();\n folder.delete();\n return fileContent;\n } catch (IOException e) {\n logger.error(\"Unable to read file contents.\", e);\n throw new UnrecoverableException(\"Unable to read file contents\", e);\n }\n }\n }\n\n // folder does not contain the HTML file yet -> wait\n return null;\n }\n });\n\n return fileContent;\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try{\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while( ( line = br.readLine()) != null){\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n }catch(Exception e){\n //Log.d(\"Exception while downloading url\", e.toString());\n }finally{\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "public File get( String url, String suffix ) throws MojoExecutionException\n {\n if ( m_wagon == null )\n {\n m_log.error( \"must be connected first!\" );\n return null;\n }\n\n File file = null;\n try\n {\n file = File.createTempFile( String.valueOf( System.currentTimeMillis() ), suffix );\n }\n catch ( IOException e )\n {\n throw new MojoExecutionException( \"I/O problem\", e );\n }\n\n try\n {\n m_wagon.get( url, file );\n }\n catch ( TransferFailedException e )\n {\n file.delete(); // cleanup on failure\n throw new MojoExecutionException( \"Transfer failed\", e );\n }\n catch ( AuthorizationException e )\n {\n file.delete(); // cleanup on failure\n throw new MojoExecutionException( \"Authorization failed\", e );\n }\n catch ( ResourceDoesNotExistException e )\n {\n file.delete(); // return non-existent file\n }\n\n return file;\n }", "private String downloadUrl(String strUrl) throws IOException {\n\t\tString data = \"\";\n\t\tInputStream iStream = null;\n\t\tHttpURLConnection urlConnection = null;\n\t\ttry {\n\t\t\tURL url = new URL(strUrl);\n\n\t\t\t// Creating an http connection to communicate with url\n\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\n\t\t\t// Connecting to url\n\t\t\turlConnection.connect();\n\n\t\t\t// Reading data from url\n\t\t\tiStream = urlConnection.getInputStream();\n\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tiStream));\n\n\t\t\tStringBuffer sb = new StringBuffer();\n\n\t\t\tString line = \"\";\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tsb.append(line);\n\t\t\t}\n\n\t\t\tdata = sb.toString();\n\n\t\t\tbr.close();\n\n\t\t} catch (Exception e) {\n\t\t\tLog.d(\"Exception while downloading url\", e.toString());\n\t\t} finally {\n\t\t\tiStream.close();\n\t\t\turlConnection.disconnect();\n\t\t}\n\t\treturn data;\n\t}", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try{\n URL url = new URL(strUrl);\n\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while( ( line = br.readLine()) != null){\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n }catch(Exception e){\n Log.d(\"Exception while downloading url\", e.toString());\n }finally{\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "public static boolean downloadFile(String url, String destination) throws Exception {\n BufferedInputStream bi = null;\n BufferedOutputStream bo = null;\n File destfile;\n byte BUFFER[] = new byte[100];\n java.net.URL fileurl;\n URLConnection conn;\n fileurl = new java.net.URL(url);\n conn = fileurl.openConnection();\n long fullsize = conn.getContentLength();\n long onepercent = fullsize / 100;\n MessageFrame.setTotalDownloadSize(fullsize);\n bi = new BufferedInputStream(conn.getInputStream());\n destfile = new File(destination);\n if (!destfile.createNewFile()) {\n destfile.delete();\n destfile.createNewFile();\n }\n bo = new BufferedOutputStream(new FileOutputStream(destfile));\n int read = 0;\n int sum = 0;\n long i = 0;\n while ((read = bi.read(BUFFER)) != -1) {\n bo.write(BUFFER, 0, read);\n sum += read;\n i += read;\n if (i > onepercent) {\n i = 0;\n MessageFrame.setDownloadProgress(sum);\n }\n }\n bi.close();\n bo.close();\n MessageFrame.setDownloadProgress(fullsize);\n return true;\n }", "public Blob downloadFile(String inKey, String inFileName);", "private String downloadUrl(String strUrl) throws IOException{\r\n\t String data = \"\";\r\n\t InputStream iStream = null;\r\n\t HttpURLConnection urlConnection = null;\r\n\t try{\r\n\t URL url = new URL(strUrl);\r\n\t \r\n\t // Creating an http connection to communicate with url\r\n\t urlConnection = (HttpURLConnection) url.openConnection();\r\n\t \r\n\t // Connecting to url\r\n\t urlConnection.connect();\r\n\t \r\n\t // Reading data from url\r\n\t iStream = urlConnection.getInputStream();\r\n\t \r\n\t BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\r\n\t \r\n\t StringBuffer sb = new StringBuffer();\r\n\t \r\n\t String line = \"\";\r\n\t while( ( line = br.readLine()) != null){\r\n\t sb.append(line);\r\n\t }\r\n\t \r\n\t data = sb.toString();\r\n\t \r\n\t br.close();\r\n\t \r\n\t }catch(Exception e){\r\n\t Log.d(\"Exception while downloading url\", e.toString());\r\n\t }finally{\r\n\t iStream.close();\r\n\t urlConnection.disconnect();\r\n\t }\r\n\t return data;\r\n\t }", "@SuppressLint(\"LongLogTag\")\n private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n } catch (Exception e) {\n Toast.makeText(getActivity(), \"Exception while downloading url\" + e.toString(), Toast.LENGTH_SHORT).show();\n Log.d(\"Exception while downloading url\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n\n return data;\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n // Connecting to url\n urlConnection.connect();\n // Reading data from url\n iStream = urlConnection.getInputStream();\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n StringBuffer sb = new StringBuffer();\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n data = sb.toString();\n Log.d(\"downloadUrl\", data.toString());\n br.close();\n } catch (Exception e) {\n Log.d(\"Exception\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "public static void downloadFile(String uri, String fileName) {\n\n\t\ttry (BufferedInputStream in = new BufferedInputStream(new URL(uri).openStream());\n\t\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(fileName)) {\n\t\t\tIOUtils.copy(in, fileOutputStream);\n\t\t\tin.close();\n\t\t\tfileOutputStream.flush();\n\t\t\tfileOutputStream.close();\n\t\t} catch (Exception e) {\n\t\t\tlog.fatal(\"Failed while downloaidng the file\", e);\n\t\t}\n\t}", "private String downloadUrl(String strUrl) throws IOException\n\t{\n\t\tString data = \"\";\n\t\tInputStream iStream = null;\n\t\tHttpURLConnection urlConnection = null;\n\t\ttry\n\t\t{\n\t\t\tURL url = new URL(strUrl);\n\n\t\t\t// Creating an http connection to communicate with url\n\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\n\t\t\t// Connecting to url\n\t\t\turlConnection.connect();\n\n\t\t\t// Reading data from url\n\t\t\tiStream = urlConnection.getInputStream();\n\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n\t\t\tStringBuffer sb = new StringBuffer();\n\n\t\t\tString line = \"\";\n\t\t\twhile ((line = br.readLine()) != null)\n\t\t\t{\n\t\t\t\tsb.append(line);\n\t\t\t}\n\n\t\t\tdata = sb.toString();\n\n\t\t\tbr.close();\n\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tLog.d(\"Exception while downloading url\", e.toString());\n\t\t} finally\n\t\t{\n\t\t\tiStream.close();\n\t\t\turlConnection.disconnect();\n\t\t}\n\t\treturn data;\n\t}", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n Log.d(\"downloadUrl\", data.toString());\n br.close();\n\n } catch (Exception e) {\n Log.d(\"Exception\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n Log.d(\"downloadUrl\", data.toString());\n br.close();\n\n } catch (Exception e) {\n Log.d(\"Exception\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n // Creating an http connection to communicate with url\n urlConnection = (HttpURLConnection) url.openConnection();\n\n // Connecting to url\n urlConnection.connect();\n\n // Reading data from url\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n// Log.e(\"downloadUrl\", data.toString());\n br.close();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n\t\tURL url = new URL(urlString);\n\t\tHttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t\tconn.setReadTimeout(10000 /* milliseconds */);\n\t\tconn.setConnectTimeout(15000 /* milliseconds */);\n\t\tconn.setRequestMethod(\"GET\");\n\t\tconn.setDoInput(true);\n\t\t// Starts the query\n\t\tconn.connect();\n\t\tInputStream stream = conn.getInputStream();\n\n\t\treturn stream;\n\t}", "public static String downloadContent(String url) throws IOException {\n URL website = new URL(url);\n URLConnection connection = website.openConnection();\n BufferedReader in = new BufferedReader(\n new InputStreamReader(\n connection.getInputStream()));\n\n StringBuilder response = new StringBuilder();\n String inputLine;\n\n while ((inputLine = in.readLine()) != null)\n response.append(inputLine);\n\n in.close();\n\n return response.toString();\n }", "public Bitmap downloadFile(String fileUrl) {\n\t\tif (null == fileUrl)\n\t\t\treturn null;\n\n\t\tURL myFileUrl = null;\n\n\t\ttry {\n\t\t\tmyFileUrl = new URL(fileUrl);\n\n\t\t\tHttpURLConnection conn = (HttpURLConnection) myFileUrl\n\t\t\t\t\t.openConnection();\n\t\t\tconn.setDoInput(true);\n\t\t\tconn.connect();\n\n\t\t\treturn BitmapFactory.decodeStream(conn.getInputStream());\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "URL getStreamURL() throws IOException;", "@SuppressLint(\"NewApi\")\n\t\tpublic S<T> download(String url){\n\t\t \n\t\t// declare the dialog as a member field of your activity\n\t\t\t String fileName = url.substring( url.lastIndexOf('/')+1, url.length() );\n\n\t\t\t \n\t\t \n\t\t //if(!service){\n\t\t\t // instantiate it within the onCreate method\n\t\t\t mProgressDialog = new ProgressDialog(activity);\n\t\t\t mProgressDialog.setMessage(\"Downloading ...\");\n\t\t\t mProgressDialog.setIndeterminate(true);\n\t\t\t mProgressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);\n\t\t\t mProgressDialog.setCancelable(true);\n\t\t\t \n\t\t\t mProgressDialog.show(); \n\t\t\t Intent intent = new Intent(activity, DownloadService.class);\n\t\t\t intent.putExtra(\"url\", url);\n\t\t\t intent.putExtra(\"filename\", fileName);\n\t\t\t intent.putExtra(\"receiver\", new DownloadReceiver(new Handler()));\n\t\t\t activity.startService(intent);\n\t\t\t \n\t\t return this;\n\t }", "private String downloadUrl(String strUrl) throws IOException{\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try{\n URL url = new URL(strUrl); \n urlConnection = (HttpURLConnection) url.openConnection(); \n urlConnection.connect(); \n iStream = urlConnection.getInputStream();\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n StringBuffer sb = new StringBuffer();\n String line = \"\";\n while( ( line = br.readLine()) != null){\n sb.append(line);\n }\n data = sb.toString();\n br.close();\n\n }catch(Exception e){\n Log.d(\"Exception while downloading url\", e.toString());\n }finally{\n iStream.close();\n urlConnection.disconnect();\n }\n\n return data;\n }", "public void download() {\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n //conn.setReadTimeout(10000 /* milliseconds */);\n // conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n conn.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 ( compatible ) \");\n conn.setRequestProperty(\"Accept\", \"*/*\");\n // Starts the query\n conn.connect();\n\n return conn.getInputStream();\n }", "@Override\r\n protected String doInBackground(String... f_url) {\r\n int count;\r\n try {\r\n String root = Environment.getExternalStorageDirectory().toString();\r\n\r\n System.out.println(\"Downloading\");\r\n URL url = new URL(f_url[0]);\r\n\r\n URLConnection conection = url.openConnection();\r\n conection.connect();\r\n // getting file length\r\n int lenghtOfFile = conection.getContentLength();\r\n\r\n // input stream to read file - with 8k buffer\r\n InputStream input = new BufferedInputStream(url.openStream(), 8192);\r\n\r\n // Output stream to write file\r\n\r\n OutputStream output = new FileOutputStream(root+\"/downloadedfile.jpg\");\r\n byte data[] = new byte[1024];\r\n\r\n long total = 0;\r\n while ((count = input.read(data)) != -1) {\r\n total += count;\r\n\r\n // writing data to file\r\n output.write(data, 0, count);\r\n\r\n }\r\n\r\n // flushing output\r\n output.flush();\r\n\r\n // closing streams\r\n output.close();\r\n input.close();\r\n\r\n } catch (Exception e) {\r\n Log.e(\"Error: \", e.getMessage());\r\n }\r\n\r\n return null;\r\n }", "private void downloadLibrary(String fileName) throws Exception {\n File f = new File(fileName);\n if (f.exists()) {\n f.delete();\n }\n FileOutputStream fos = new FileOutputStream(f);\n\n if (m_applet.libURL==null) {\n throw new Exception(\"Library URL is null\");\n }\n\n URL u = new URL(m_applet.libURL);\n HttpURLConnection huc = (HttpURLConnection) u.openConnection();\n huc.setRequestMethod(\"GET\");\n huc.connect();\n InputStream is = huc.getInputStream();\n int code = huc.getResponseCode();\n int stotal = 0;\n if (code >= 200 && code < 300) {\n byte[] buf = new byte[2400];\n int l = 0;\n while ((l = is.read(buf))>0) {\n fos.write(buf,0,l);\n stotal += l;\n }\n }\n fos.close();\n huc.disconnect();\nSystem.err.println(\"Downloaded \" + stotal + \" bytes, saved as \" + fileName);\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n \tSystem.out.println(\"Inside downloadURL\");\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n \n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n InputStream stream = conn.getInputStream();\n return stream;\n }", "public byte[] loadFromURL(String url) throws IOException {\r\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n \r\n URL u = new URL(url);\r\n HttpURLConnection con = (HttpURLConnection) u.openConnection();\r\n //con.setDoInput(false);\r\n con.setDoOutput(true);\r\n con.setRequestMethod(\"GET\");\r\n con.connect();\r\n \r\n InputStream is = con.getInputStream();\r\n int r;\r\n byte[] buffer = new byte[8000];\r\n while ((r = is.read(buffer)) >= 0) {\r\n if (r == 0) continue;\r\n baos.write(buffer, 0, r);\r\n }\r\n is.close();\r\n return baos.toByteArray();\r\n }", "private String downloadUrl(String myurl) throws IOException {\n InputStream is = null;\n // Only display the first 500 characters of the retrieved\n // web page content.\n int len = 500;\n\n try {\n URL url = new URL(myurl);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000); /* milliseconds */\n conn.setConnectTimeout(15000);/* milliseconds */\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n int response = conn.getResponseCode();\n Log.d(\"network\", \"The response is: \" + response);\n is = conn.getInputStream();\n\n // Convert the InputStream into a string\n String contentAsString = convertStreamToString(is);\n return contentAsString;\n\n // Makes sure that the InputStream is closed after the app is\n // finished using it.\n } finally {\n if (is != null) {\n is.close();\n }\n }\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n\t URL url = new URL(urlString);\n\t HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n\t conn.setReadTimeout(10000 /* milliseconds */);\n\t conn.setConnectTimeout(15000 /* milliseconds */);\n\t conn.setRequestMethod(\"GET\");\n\t conn.setDoInput(true);\n\t // Starts the query\n\t conn.connect();\n\t return conn.getInputStream();\n\t}", "private String get_url() {\n File file = new File(url);\n return file.getAbsolutePath();\n }", "public void testDownloadFile(){\n final String url = \"http://www.zebrai.cn/login/picture/getCaptcha\";\n new Thread(new Runnable() {\n @Override\n public void run() {\n downloadFile(url);\n }\n }).start();\n\n }", "public java.lang.CharSequence download(java.lang.String appId, java.lang.String url, long duration, java.lang.String folder) throws android.os.RemoteException;", "private void downloadFile(URL source, File localDirectory, String localFileName, boolean griffin)\n throws SocketException {\n\n if (griffin) {\n try {\n downloadFileFromGriffin(source, localDirectory, localFileName);\n } catch (IOException ex) {\n downloadFileFromMentor(source, localDirectory, localFileName);\n }\n } else {\n downloadFileFromMentor(source, localDirectory, localFileName);\n }\n\n }", "public void downloadFile() {\n String path = images.get(viewPager.getCurrentItem()).getFilePath();\n String uRl = \"https://image.tmdb.org/t/p/w500\" + path;\n String name = path.substring(1, 5);\n File direct = new File(Environment.getExternalStorageDirectory().getAbsolutePath() + \"/Cinemato\");\n if (!direct.exists()) {\n direct.mkdirs();\n }\n DownloadManager mgr = (DownloadManager) Objects.requireNonNull(getContext())\n .getSystemService(Context.DOWNLOAD_SERVICE);\n Uri downloadUri = Uri.parse(uRl);\n DownloadManager.Request request = new DownloadManager.Request(\n downloadUri);\n request.setAllowedNetworkTypes(\n DownloadManager.Request.NETWORK_WIFI\n | DownloadManager.Request.NETWORK_MOBILE)\n .setAllowedOverRoaming(false).setTitle(name)\n .setDescription(\"Saved images from Cinemato\")\n .setDestinationInExternalPublicDir(Environment.DIRECTORY_PICTURES + \"/Cinemato\", name + \".jpg\");\n assert mgr != null;\n mgr.enqueue(request);\n // Open Download Manager to view File progress\n Toast.makeText(getContext(), \"Downloading...\", Toast.LENGTH_LONG).show();\n startActivity(new Intent(DownloadManager.ACTION_VIEW_DOWNLOADS));\n }", "private String downloadFile(String theTicker) throws MalformedURLException, IOException\r\n {\r\n String preUrl = \"http://chart.finance.yahoo.com/table.csv?s=\" + theTicker + \"&a=3&b=12&c=1996&d=0&e=31&f=2017&g=d&ignore=.csv\";\r\n String fileLocString = \"StockFiles\\\\\" + theTicker + \".csv\";\r\n\r\n File currentFile = new File (fileLocString); // creates the file object to be used two lines down\r\n URL currentUrl = new URL (preUrl); //creates a url to use on next line\r\n FileUtils.copyURLToFile(currentUrl, currentFile); //actually downloads the file\r\n \r\n \r\n return fileLocString;\r\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(10000 /* milliseconds */);\n conn.setConnectTimeout(15000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n }", "URL toURL() throws IOException;", "File downloadExtension(DownloadExtensionRequest request);", "private String downloadFile(String strURL, int index, boolean delete)\n {\n int npos = strURL.lastIndexOf('/');\n if (npos == strURL.length()-1) { \n \tm_ErrorCode = 1;\n return null;\n }\n\n String filename = strURL.substring(npos+1);\n try {\n // setup streams to download and write to file\n String outputFilePath = Update.pathSD + filename;\n File fSettingsZip = new File(outputFilePath);\n if (fSettingsZip.exists()) { // todo: do we want this configurable?\n //m_logWriter.write(\"Deleting old file: \"+outputFilePath+\"\\n\");\n \tif (!delete)\n \t\treturn outputFilePath;\n \t\n \tfSettingsZip.delete();\n \t//return outputFilePath;\n }\n\n publishProgress(PROGRESS_DOWNLOAD, (int)(0.5 * index));\n //m_logWriter.write(\"Trying URL: \"+strURL+\", filename: \"+filename+\"\\n\");\n //m_logWriter.flush();\n URL url = new URL(strURL);\n HttpURLConnection conn = (HttpURLConnection)url.openConnection();\n conn.setRequestProperty(\"User-Agent\", \"Mozilla/5.0(Linux; U; Android 2.2; en-gb; LG-P500 Build/FRF91) AppleWebKit/533.0 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1\");\n conn.connect();\n\n mContentLength = conn.getContentLength();\n\n InputStream is = new BufferedInputStream(url.openStream(), 8192);\n OutputStream os = new BufferedOutputStream(new FileOutputStream(outputFilePath));\n byte data[] = new byte[1024];\n mTotalRead = 0;\n int read=0;\n //while ((read = is.read(data)) != -1)\n while (true) {\n if (isCancelled()) {\n outputFilePath = null;\n m_ErrorCode = 2;\n break;\n }\n \n if (m_DownloadStop)\n \tcontinue;\n \n if ((read = is.read(data)) == -1)\n \tbreak;\n\n mTotalRead += read;\n\n // progress if we know the content length\n if (mContentLength > 0)\n publishProgress(PROGRESS_DOWNLOAD, (int)(0.5 * (index + mTotalRead*100/mContentLength)));\n \tmPrecent = (int)mTotalRead*100 / mContentLength;\n // write to file\n os.write(data, 0, read);\n }\n\n // close and get ready to bail\n os.flush();\n os.close();\n is.close();\n filename = outputFilePath;\n }\n catch(Exception e) {\n filename = null;\n m_ErrorCode = 3;\n }\n\n return filename;\n }", "public Blob downloadFile(String inKey, File inDestFile);", "private String downloadUrl(String strUrl) throws IOException {\n // Khoi tao du lieu tra ve\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n // Khoi tao url\n URL url = new URL(strUrl);\n // Mo ket noi url\n urlConnection = (HttpURLConnection) url.openConnection();\n // Ket noi url\n urlConnection.connect();\n // Lay ket qua tra ve\n iStream = urlConnection.getInputStream();\n // Doc ket qua tra ve\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n // Khoi tao buffer luu ket qua tra ve\n StringBuffer sb = new StringBuffer();\n // Doc tung dong tra ve\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n // Luu du lieu sau khi doc\n data = sb.toString();\n // Dong buffer\n br.close();\n } catch (Exception e) {\n // Neu bi loi thi log ra loi\n e.printStackTrace();\n } finally {\n // Dong stream va ket noi url\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }", "private void downloadApk(String url) {\n if (UpdateHelper.CheckForSDCard.isSDCardPresent()) {\n\n //check if app has permission to write to the external storage.\n if (EasyPermissions.hasPermissions(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n new DownloadFileHelper(MainActivity.this).execute(url);\n\n } else {\n //If permission is not present request for it.\n EasyPermissions.requestPermissions(MainActivity.this, getString(R.string.write_file), WRITE_REQUEST_CODE, Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n\n }\n }", "@GET\n @Path(\"/download/{filename}\")\n public Response downloadFile(\n \t\t@PathParam(\"filename\") final String filename){\n\t\tFtpsFileList.download(filename);\n return Response.status(200).entity(filename + \" download to D://test/ success!\").build();\n }", "public static void finalActivity(String fileName, String URL){\n\t\tDocument doc = null;\n\t\ttry {\n\t\t\tSystem.out.println(\"Connecting to URL...\");\n\t\t\t\n\t\t\tdoc = Jsoup.connect(URL)\n\t\t\t\t\t.userAgent(\"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:49.0) Gecko/20100101 Firefox/49.0\")\n\t\t\t\t\t.ignoreHttpErrors(true)\n\t\t\t\t\t.ignoreContentType(true)\n\t\t\t\t\t.maxBodySize(0)\n\t\t\t\t\t.timeout(100000)\n\t\t\t\t\t.get();\n\t\t\t\n\t\t\tSystem.out.println(\"Successfully connected!\");\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"ERROR: Unable to connect to website.\");\n\t\t}\n\t\t\n\t\t//boolean to see if download failed\n\t\tboolean success = false;\n\t\t\n\t\t//Will go through each element trying to download song.\n\t\tSystem.out.println(\"Organizing songs in best order...\");\n\t\tElements songs = FetchSong.fetchBestSongOrder(doc, fileName);\n\t\tSystem.out.println(\"Organized songs...\");\n\t\tfor(Element x : songs){\n\t\t\t\n\t\t\ttry{\n\t\t\t\tSystem.out.println(\"Attempting to download from element: \" + FetchSong.specifySong(x));\n\t\t\t\tFetchSong.downloadSong(FetchSong.fetchSong(FetchSong.fetchSongURL(x)), fileName);\n\t\t\t\t\n\t\t\t\tsuccess = true;\n\t\t\t\tbreak;\n\t\t\t} catch (UnknownHostException e){\n\t\t\t\tSystem.err.println(\"ERROR: Link is either expired or invalid. Trying another link...\");\n\t\t\t} catch (IOException e){\n\t\t\t\t//Empty because it will already be handled\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(success)\n\t\t\tSystem.out.println(\"SUCCESS: SONG DOWNLOADED - \" + fileName);\n\t\telse\n\t\t\tSystem.err.println(\"ERROR: None of the links for [\" + fileName + \"] were valid.\");\n\t}", "public static String readFileFromURL(Context mContext, String urlLink, String fileName) {\n if (fileName == null || fileName.trim().equalsIgnoreCase(\"\")) {\n fileName = \"Dummy.spd\";\n }\n try {\n String newFileLocation = downloadFileFromURL(mContext, urlLink, fileName);\n StringBuilder sb = new StringBuilder();\n File myObj = new File(newFileLocation);\n Scanner myReader = new Scanner(myObj);\n while (myReader.hasNextLine()) {\n String readData = myReader.nextLine();\n sb.append(readData);\n sb.append(\"\\n\");\n }\n myReader.close();\n hideProgressDialog();\n return sb.toString();\n } catch (Exception e) {\n writeLog(LOG_LEVEL.ERROR, e.getMessage());\n hideProgressDialog();\n }\n return null;\n }", "public static boolean downloadFileByUrl(String url, String savePath, String saveFile) throws IOException {\n\n try {\n savePath = formatDirectoryPath(savePath);\n return downloadFileByUrl(url, savePath + saveFile);\n } catch (Exception ex) {\n throw ex;\n }\n }", "private InputStream downloadUrl(String urlString) throws IOException {\n URL url = new URL(urlString);\n HttpURLConnection conn = (HttpURLConnection) url.openConnection();\n conn.setReadTimeout(100000 /* milliseconds */);\n conn.setConnectTimeout(150000 /* milliseconds */);\n conn.setRequestMethod(\"GET\");\n conn.setDoInput(true);\n // Starts the query\n conn.connect();\n return conn.getInputStream();\n\n }", "private String downloadUrl(String strUrl) throws IOException {\n String data = \"\";\n InputStream iStream = null;\n HttpURLConnection urlConnection = null;\n try {\n URL url = new URL(strUrl);\n\n urlConnection = (HttpURLConnection) url.openConnection();\n\n urlConnection.connect();\n\n iStream = urlConnection.getInputStream();\n\n BufferedReader br = new BufferedReader(new InputStreamReader(iStream));\n\n StringBuffer sb = new StringBuffer();\n\n String line = \"\";\n while ((line = br.readLine()) != null) {\n sb.append(line);\n }\n\n data = sb.toString();\n\n br.close();\n\n } catch (Exception e) {\n FirebaseCrashlytics.getInstance().recordException(e);\n Log.d(\"Exception\", e.toString());\n } finally {\n iStream.close();\n urlConnection.disconnect();\n }\n return data;\n }" ]
[ "0.78106034", "0.7785092", "0.75326455", "0.71529764", "0.7118574", "0.7086989", "0.70553774", "0.69817096", "0.6979288", "0.6946859", "0.69177467", "0.6879436", "0.68734425", "0.68372047", "0.6814567", "0.68041337", "0.67914176", "0.6769337", "0.6647246", "0.66017973", "0.6587289", "0.65867865", "0.6569348", "0.65683144", "0.656649", "0.6556173", "0.6546282", "0.6518214", "0.6500836", "0.6485031", "0.6470151", "0.63937986", "0.63817894", "0.63810295", "0.6366316", "0.6364145", "0.6363934", "0.6355411", "0.6351006", "0.6339728", "0.63304585", "0.63098735", "0.62895304", "0.6283181", "0.6270473", "0.6260493", "0.62590975", "0.6254555", "0.6243859", "0.62410444", "0.6231406", "0.62058717", "0.6198086", "0.6195868", "0.6184814", "0.61476874", "0.6144307", "0.61346227", "0.612836", "0.61267287", "0.61230487", "0.61149085", "0.6112418", "0.6108166", "0.61054426", "0.61054426", "0.6102211", "0.6100905", "0.60956115", "0.6095112", "0.60948247", "0.6071297", "0.6069105", "0.6069069", "0.60653096", "0.6048735", "0.6047143", "0.6045916", "0.6043227", "0.6042568", "0.60364956", "0.60304844", "0.6026482", "0.6022572", "0.60217255", "0.6014293", "0.5993616", "0.5990847", "0.59890956", "0.5988931", "0.5983867", "0.59838647", "0.5979985", "0.5979919", "0.59724295", "0.5959506", "0.595343", "0.5945651", "0.5934542", "0.59160644" ]
0.6383121
32
/ Complete the 'gradingStudents' function below. The function is expected to return an INTEGER_ARRAY. The function accepts INTEGER_ARRAY grades as parameter.
public static List<Integer> gradingStudents(List<Integer> grades) { // Write your code here for (int i = 0; i < grades.size(); i++) { Integer grade = grades.get(i); if (grade > 37 && grade % 5 > 2) { grades.set(i, grade + 5 - grade % 5); } } return grades; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Integer> gradingStudents(List<Integer> grades) {\n List<Integer> updatedGrades = new ArrayList<Integer>();\n \n for (int i = 0; i < grades.size(); i++) {\n int grade = grades.get(i);\n \n if ((grade >= 38) && (grade % 5 >= 3)) {\n grade += (5 - (grade % 5));\n }\n \n updatedGrades.add(grade);\n }\n \n return updatedGrades;\n }", "public static List<Integer> gradingStudents(List<Integer> grades) {\n\t\t int test=0;\n\t\t int p=0;\n\t\t \n\t\t for(int grade: grades) {\n\t\t\t\n\t\t\t if(((grade/5)+1)*5-grade<3 && grade>=38 ) {\n\t\t\t test = (grade/5+1)*5;\n\t\t\t\t \n\t\t\t }else {\n\t\t\t\t test=grade;\n\t\t\t }\n\t\t\t \n\t\t }\n\t\t \n\t\t System.out.println(\"test \"+test );\n\t\t \treturn new ArrayList();\n\t\t }", "public GradeBook(String courseName, int[][] grades){\n this.courseName = courseName;\n this.grades = grades;\n }", "public double getAverageGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100.\");\n }\n double sumOfGrades = 0.0;\n double averageGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n sumOfGrades += grades[studentId];\n }\n averageGrade = sumOfGrades / NUMBER_OF_STUDENTS;\n return averageGrade;\n }", "public double getPercentageOfStudentsPassed(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100\");\n }\n \n int currentGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n double numberOfStudentsPassed = 0;\n double percentageOfStudentsPassed;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n currentGrade = grades[studentId];\n \n if (currentGrade >= 40) {\n numberOfStudentsPassed += 1;\n }\n }\n percentageOfStudentsPassed = (numberOfStudentsPassed / NUMBER_OF_STUDENTS) * 100;\n return percentageOfStudentsPassed;\n }", "private ArrayList<ViewGradeListItem> get_grades(int selected_course_id){\n ArrayList<ViewGradeListItem> grades = new ArrayList<ViewGradeListItem>();\n\n List<GradeCategory> categories = AppDatabase.getAppDatabase(ViewGradeListActivity.this).\n gradeCategoryDAO().getCategoriesByCourseID(selected_course_id);\n\n List<Grade> grade_list = AppDatabase.getAppDatabase(ViewGradeListActivity.this).\n gradeDAO().getGradesByCourseIDAndUserID(selected_course_id, user_id);\n\n\n Map<Integer, Integer> grades_map = new HashMap<Integer, Integer>();\n\n for (Grade g: grade_list){\n grades_map.put(g.getAssignmentID(), g.getScore());\n }\n\n ArrayList<Pair<Float, Float>> grade_scores = new ArrayList<>();\n float max_weight = 0;\n\n for (GradeCategory c: categories){\n ViewGradeListItem cat = new ViewGradeListItem(true, c.getTitle(), c.getCategoryID(), -1, null);\n grades.add(cat);\n\n int max_category_score = 0;\n int earned_category_score = 0;\n\n List<Assignment> assignments = AppDatabase.getAppDatabase(ViewGradeListActivity.this).\n assignmentDAO().getAssignmentsByCategory(c.getCategoryID());\n\n for (Assignment a: assignments){\n int a_max = a.getMaxScore();\n max_category_score += a_max;\n\n Integer a_earned = grades_map.get(a.getAssignmentID());\n\n Float earned_percentage = null;\n if (a_earned == null){\n a_earned = 0;\n } else {\n earned_percentage = utils.calculate_percentage(a_earned, a_max);\n }\n grades.add(new ViewGradeListItem(false, a.getAssTitle(), a.getCategoryID(), a.getAssignmentID(), earned_percentage));\n\n earned_category_score += a_earned;\n }\n float category_percentage = utils.calculate_percentage(earned_category_score, max_category_score);\n cat.set_grade(category_percentage);\n\n max_weight += c.getWeight();\n grade_scores.add(Pair.create(c.getWeight(), category_percentage));\n\n }\n\n Float total_percentage = null;\n if (max_weight != 0){\n total_percentage = 0f;\n for (Pair<Float, Float> s: grade_scores){\n total_percentage += (s.first/max_weight) * s.second;\n }\n }\n\n grades.add(new ViewGradeListItem(true, \"Total\", -1, -1, total_percentage));\n return grades;\n }", "private void populateGradesArray() {\r\n\r\n for (int i = 0; i < numberOfCourses; i++)\r\n letterGrades[i] = convertNumericToLetter(marks[i]);\r\n }", "public double getAverageGrade(){\n double totalGrade = 0;\n double averageGrade = 0;\n // for loop to iterate over the array\n for(int i = 0; i<students.size(); i++){\n totalGrade += students.get(i).getGrades();\n } // end for\n \n averageGrade = totalGrade / students.size();\n return averageGrade;\n }", "@Test \n\tpublic void TestStudentGPA() throws PersonException{\n\t\tArrayList<Enrollment> EnrolledStudents = new ArrayList<Enrollment>();\n\t\tfor (int i = 0; i < Students.size(); i++){\n\t\t\tStudent student = Students.get(i);\n\t\t\tfor (int j = 0; j < Sections.size(); j++){\n\t\t\t\tSection section = Sections.get(j);\n\t\t\t\tEnrollment enrolled = new Enrollment(student.getStudentID(),section.getSectionID());\n\t\t\t\tenrolled.setGrade((i*10)); // Assumes each student gets a consistent grade in every section! (Otherwise average GPAs would be a bit tougher)\n\t\t\t\tEnrolledStudents.add(enrolled);\n\t\t\t}\n\t\t}\n\t\t\n\t\tArrayList<Double> StudentsGPA = new ArrayList<Double>();\n\t\tfor (int i = 0; i < EnrolledStudents.size(); i+=6) {\n\t\t\t\tif (EnrolledStudents.get(i).getGrade() >= 90)\n\t\t\t\t\tStudentsGPA.add(4.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 80)\n\t\t\t\t\tStudentsGPA.add(3.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 70)\n\t\t\t\t\tStudentsGPA.add(3.33);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 60)\n\t\t\t\t\tStudentsGPA.add(3.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 50)\n\t\t\t\t\tStudentsGPA.add(2.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 40)\n\t\t\t\t\tStudentsGPA.add(2.33);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 30)\n\t\t\t\t\tStudentsGPA.add(2.0);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 20)\n\t\t\t\t\tStudentsGPA.add(1.66);\n\t\t\t\telse if (EnrolledStudents.get(i).getGrade() >= 10)\n\t\t\t\t\tStudentsGPA.add(1.33);\n\t\t\t\telse \n\t\t\t\t\tStudentsGPA.add(1.0);\n\t\t}\n\t\tassertTrue(StudentsGPA.get(0) == 1.0);\n\t\tassertTrue(StudentsGPA.get(1) == 1.33);\n\t\tassertTrue(StudentsGPA.get(2) == 1.66);\n\t\tassertTrue(StudentsGPA.get(3) == 2.0);\n\t\tassertTrue(StudentsGPA.get(4) == 2.33);\n\t\tassertTrue(StudentsGPA.get(5) == 2.66);\n\t\tassertTrue(StudentsGPA.get(6) == 3.0);\n\t\tassertTrue(StudentsGPA.get(7) == 3.33);\n\t\tassertTrue(StudentsGPA.get(8) == 3.66);\n\t\tassertTrue(StudentsGPA.get(9) == 4.0);\n\t\t\n\t\tArrayList<Double> CoursesGPA = new ArrayList<Double>();\n\t\tdouble count = 0;\n\t\tfor (int i = 0; i < EnrolledStudents.size(); i+=6){\n\t\t\tcount += EnrolledStudents.get(i).getGrade();\n\t\t}\n\t\tif (count == 450){ // Again, assumes a simple case (average grade = 45 -> average GPA = 2.497)\n\t\t\tCoursesGPA.add(2.497);\n\t\t}\n\t\tassertTrue(CoursesGPA.get(0) == 2.497);\n\t\t\n\t}", "Student[] getStudents(){\n\t\treturn enrolled.toArray(new Student[enrolled.size()]);\n\t}", "String grade(int marks);", "public static Object[] question4(Student student1, Student student2)\r\n {\r\n \r\n int student1HighestGrade = 0;\r\n double student1total = 0;\r\n double student2total = 0;\r\n int student2HighestGrade = 0; \r\n double student1AverageGrade = 0;\r\n double student2AverageGrade = 0; \r\n Student bestAverageGradeStudent = student1;\r\n Student bestHighGradeStudent = student2; \r\n \r\n // Your code goes Here:\r\n for(int i = 0; i < 8; i++)\r\n {\r\n if(student1HighestGrade < student1.getExamScore(i))\r\n {\r\n \r\n student1HighestGrade = student1.getExamScore(i);\r\n }\r\n \r\n if(student2HighestGrade < student2.getExamScore(i))\r\n {\r\n student2HighestGrade = student2.getExamScore(i);\r\n }\r\n \r\n }\r\n if (bestHighGradeStudent == student2)\r\n {\r\n bestHighGradeStudent = student2;\r\n }\r\n else \r\n {\r\n bestAverageGradeStudent = student1;\r\n }\r\n \r\n \r\n \r\n \r\n for(int c = 0;c < 8; c++)\r\n {\r\n student1total += student1.getExamScore(c);\r\n }\r\n student1AverageGrade = student1total/8;\r\n \r\n for(int d = 0; d < 8; d++)\r\n {\r\n student2total += student2.getExamScore(d);\r\n }\r\n student2AverageGrade = student2total/8;\r\n \r\n \r\n \r\n \r\n // Necessary for Unit Test \r\n return new Object[] {student1HighestGrade, student2HighestGrade, student1AverageGrade, student2AverageGrade, bestHighGradeStudent, bestAverageGradeStudent}; \r\n }", "public GradeBook(String couseName, int[] gradesArray) {\n this.couseName = couseName; //inicializa courseName\n this.grades = gradesArray; // niveis de armanzenamento.\n }", "void generateGradeCard(String studentId);", "public String[] getGradeRanges() {\n\t\tString t = doc.get(getFieldId(\"gradeRange\", metadataFormat)).trim();\n\t\tString[] vals;\n\t\tif (t == null || t.length() == 0) {\n\t\t\treturn null;\n\t\t}\n\t\treturn t.split(\"\\\\+\");\n\t}", "public void addGrade(int grade){\n //array list has a method to add().\n this.grades.add(grade);\n }", "public int getGrade();", "public GradeInfo[] getGradeInfo() {\n return gradeInfo;\n }", "public double getStudentGrade() \n {\n Set<String> cc = courses.keySet();\n for (String c: cc) \n {\n if (courses.get(c).getActive() == false) \n {\n return courses.get(c).getGrade(); \n }\n }\n return 0; \n }", "public static int[] getStat() {\n\t\t\n\t\tint[] grades = new int[students.size()];\n\t\tfor(int i=0;i<students.size();i++) {\n\t\t\tgrades[i] = students.get(i).getGrade().getRawGrade();\n\t\t\t\n\t\t}\n\t\tArrays.sort(grades);\n\t\tint median = 0;\n\t\tif((int)grades.length/2 == grades.length/2.0)\n\t\t\tmedian = grades[grades.length/2];\n\t\telse\n\t\t\tmedian = (grades[grades.length/2] + grades[grades.length/2 + 1])/2;\n\t\tint [] ret = {grades[0], grades[grades.length-1], grades[grades.length/4], grades[3*grades.length/4], median};\n\t\treturn ret;\n\t}", "public static ArrayList<Grade> getGradeList() {\n ArrayList<Grade> result = new ArrayList<>();\n\n int index = 0;\n for(ArrayList<Grade> list: grades) {\n for(Grade grade: list) {\n index = 0;\n if(result.size() > 0) {\n while (index < result.size() && grade.getGotDate().after(result.get(index).getGotDate())) {\n index++;\n }\n }\n result.add(index, grade);\n }\n }\n\n return result;\n }", "public void testCreateExamGrades() {\n double grades[] = new double[10];\n \n for (int i = 0; i < 10; i++) {\n grades[i] = 100 - i;\n }\n \n ExamGrades g = new ExamGrades(grades);\n\n assertEquals(100.0, g.grades[0]);\n assertEquals(91.0, g.grades[9]); \n }", "public static void main(String[] args) {\n Scanner input = new Scanner(System.in);//declare scanner and have it accenpt user input\n System.out.println(\"Enter in 15 student grades.\");//prompt user to enter 15 grades\n int[] Grades = new int[15];//create single dimensional array\n int grade1 = 0;//start at zero\n int grade2 = 0;//start at zero\n for(int i = 0; i<15; i++){//begin outer for loop\n Boolean isGood = false;//declare boolean\n do{\n Grades[i] = input.nextInt();//the grade is equal to the integer entered by the user\n while(Grades[i]>100){//condition mmust be satisfied or will print error\n System.out.println(\"The Integer you input was over 100!\");\n Grades[i] = input.nextInt();//Prompt again for user input\n }\n while(Grades[i]<0){//condition mmust be satisfied or will print error\n System.out.println(\"The Integer you input was under 0!\");\n Grades[i] = input.nextInt();//Prompt again for user input\n }if(i != 0){\n while(Grades[i]<= Grades[i-1]){//condition mmust be satisfied or will print error\n System.out.println(\"The Integer you input was not greater than the last!\");\n Grades[i] = input.nextInt();//Prompt again for user input\n }\n }else{\n isGood = true;\n }\n \n }while(Grades[i]>100 || Grades[i]<0 && isGood);//begin while loop for set conditions\n }\n for(int x = 0; x<15; x++){\n System.out.print(Grades[x] + \" \");\n }\n System.out.println(\"Enter a grade to search for\");\n grade1 = input.nextInt();//Enter the grade you are searching for\n BinarySearch(Grades, grade1);\n \n System.out.println(\"Scrambled\");//notify when the array has been scrambled\n if(ScrambleArray(Grades)){\n System.out.println(\"Scrambled\");\n }\n System.out.println(\"Enter a grade to search for\");\n grade2 = input.nextInt();//Enter the grade you are searching for\n int indexForLinear = LinearSearch(Grades, grade2);\n if(indexForLinear == -1){\n System.out.println(grade2 + \" was not found in \" + indexForLinear + \" iterations\");//print number of iterations it took\n }\n if(indexForLinear != -1){\n System.out.println(grade2 + \" was found in \" + indexForLinear + \" iterations\");//print number of iterations it took\n }\n }", "public AttachmentStudent(String name,String[] courses,double[] grades) {\n super(name,courses);\n this.average = gradeAverage(grades);\n }", "public void outputGrades(){\n System.out.println(\"The grades are: \\n\");\n \n //gera a saida da nota de cada aluno\n for (int student = 0; student < grades.length; student++) {\n System.out.printf(\"Student %2d: %3d\\n\", student + 1, grades[ student ]);\n }\n }", "@GET\n @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public Response getStudentGrades(@QueryParam(\"courseName\") String courseName, @QueryParam(\"value\") String value, @QueryParam(\"valueRelation\") String valueRelation) {\n System.out.println(\"Grades/\" + index);\n // getting student by it's index\n StudentService studentService = new StudentService();\n Student searchedStudent = studentService.getStudent(index);\n\n List<Grade> grades = searchedStudent.getGrades();\n\n // filtering by course\n if (courseName != null) {\n grades = grades.stream().filter(gr -> gr.getCourse().getName().equals(courseName)).collect(Collectors.toList());\n }\n\n // filtering by grade's value\n if (value != null && valueRelation != null) {\n switch (valueRelation.toLowerCase()) {\n case \"grater\":\n // TODO - is String for value needed, maybe Float?\n grades = grades.stream().filter(gr -> gr.getGradeValue() > Float.valueOf(value).floatValue()).collect(Collectors.toList());\n break;\n case \"lower\":\n // TODO - is String for value needed, maybe Float?\n grades = grades.stream().filter(gr -> gr.getGradeValue() < Float.valueOf(value).floatValue()).collect(Collectors.toList());\n break;\n }\n }\n\n // creating list of student's grades\n GenericEntity<List<Grade>> entity = new GenericEntity<List<Grade>>(Lists.newArrayList(grades)) {\n };\n System.out.println(grades);\n // creating xml response\n return Response.status(Response.Status.OK).entity(entity).build();\n }", "public static void main(String[] args) throws IOException {\n\n\n\n BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n\n int gradesCount = Integer.parseInt(bufferedReader.readLine().trim());\n\n List<Integer> grades = IntStream.range(0, gradesCount).mapToObj(i -> {\n try {\n return bufferedReader.readLine().replaceAll(\"\\\\s+$\", \"\");\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n })\n .map(String::trim)\n .map(Integer::parseInt)\n .collect(toList());\n\n List<Integer> result = Result.gradingStudents(grades);\n\n bufferedReader.close();\n System.out.println(result.stream()\n .map(Object::toString)\n .collect(joining(\"\\n\"))\n + \"\\n\");\n }", "public void setGradeInfo(GradeInfo[] gradeInfo) {\n this.gradeInfo = gradeInfo;\n }", "protected List<Double> extractRowGrades(HSSFRow gradeRow, int skillColumnEndIndex) {\r\n List<Double> grades = new ArrayList<Double>(skillColumnEndIndex - skillColumnStartIndex);\r\n for (int columnIndex = skillColumnStartIndex; columnIndex < skillColumnEndIndex; columnIndex++) {\r\n HSSFCell gradeCell = gradeRow.getCell(columnIndex);\r\n Double grade = getCellValueAsDouble(gradeCell);\r\n grades.add(grade);\r\n logger.trace(\"Note: \" + grade);\r\n }\r\n return grades;\r\n }", "public static void main(String[] args){\n Scanner myScanner=new Scanner(System.in); // create a Scanner constructor\n System.out.println(\"Enter 15 ints for final grades in CSE2: \"); \n int[] grade=new int[15]; // create a int array to represent students' grades\n for(int i=0;i<grade.length;i++){ \n grade[i]=input(0); //call input method to test for the valid of input\n if(i==0){continue;}\n else if(grade[i]==grade[i-1]){\n System.out.println(\"ERROR: Please input a inequal number to the last one.\"); \n // if the input is equal to last one,then call the input method again\n grade[i]=input(0);}\n }\n System.out.print(\"Here are the array that you input: \");\n printArray(grade); // call the printArray method\n sortedArray(grade); // call the sortedArray method to rearrange array in order\n System.out.print(\"\\n\");\n System.out.println(\"Sorted: \");\n printArray(grade);// call the printArray method\n System.out.print(\"\\n\");\n System.out.print(\"Enter a grade to search for: \");// prompt the user for inputting a search key\n int key=myScanner.nextInt();\n linearSearch(grade,key); // call the linearSearch method\n System.out.println(\"Scrambled: \");\n scrambledArray(grade);// call the scrambled method\n printArray(grade);// call the printArray method\n System.out.print(\"\\n\");\n System.out.print(\"Enter a grade to search for: \");// prompt the user for inputting a another search key\n int key1=myScanner.nextInt();\n linearSearch(grade,key1);// call the linearSearch method\n \n }", "@POST\n @Consumes({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public Response addStudentGrades(Grade grade) {\n System.out.println(\"POST\");\n System.out.println(grade);\n\n StudentService studentService = new StudentService();\n Student searchedStudent = studentService.getStudent(index);\n\n System.out.println(searchedStudent);\n CourseService courseService = new CourseService();\n\n IdGeneratorService generator = new IdGeneratorService();\n grade.setId(generator.generateGradeId());\n grade.setStudentIndex(searchedStudent.getIndex());\n searchedStudent.addGrade(grade);\n System.out.println(searchedStudent);\n studentService.updateStudent(searchedStudent);\n\n System.out.println(searchedStudent);\n System.out.println(grade);\n String result = \"Student grade \" + grade + \" added!\\n\";\n\n // creating response\n return Response.status(Response.Status.CREATED).header(\"Location\", \"students/\" + searchedStudent.getIndex() + \"/grades/\" + grade.getId()).entity(result).build();\n }", "public boolean isValid(int[] grades) throws ArithmeticException {\n if ((grades == null) || (grades.length == 0)) {\n throw new ArithmeticException(\"There is no grade available.\");\n }\n \n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n \n if ((grades[studentId] < 0) || (grades[studentId] > 100)) {\n return false;\n }\n }\n \n return true;\n }", "public double getGrade(int index) {\r\n\r\n\t\tif (index >= 0 && index <= 2 ){\r\n\t\t\treturn grades[index];\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"Index must be positive and less than 3\");\r\n\t\t\treturn index;\r\n\t\t}\t\t\r\n\r\n\t}", "public void setGrade(int grade){ ///update com.company.students grade\n this.grade = grade;\n }", "public String[] getStudents() {\n\t\treturn students;\n\t}", "public int getMaximumGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100\");\n }\n \n int maxGrade = 0;\n int currentGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n currentGrade = grades[studentId];\n if (currentGrade > maxGrade) {\n maxGrade = currentGrade;\n }\n }\n return maxGrade;\n }", "public static void changeGrade(Student[] student,int studentID,ExamGrade examGrade){\n int count=0; //there is count int because of finding given student id have or not\n for(int i=0;i<student.length;i++){\n if(student[i].getStudentID()==studentID){\n student[i].setExamGrade(examGrade);\n ++count;\n }\n }\n\n if(count==0){//if caunt do not equal 0,it says that the given student id is in the array\n System.out.println(\"No such student\");\n }\n }", "@Override\n\tpublic StuGrade listStuGrade(StuGrade grade) {\n\t\treturn null;\n\t}", "public Map<Student,Character> getGradeBook(){\n Map<Student,Character> map = new HashMap<>();\n Student[] array = getStudentsByScore();\n Character grade = ' ';\n\n int rankCounter = 1;\n double tempS = array[0].getAverageExamScore();\n map.put(array[0],giveGrade(0));\n\n for(int i=1; i<students.size(); i++){\n\n if(tempS == array[i].getAverageExamScore()) {\n grade = giveGrade(rankCounter-1);\n }else{\n grade = giveGrade(i);\n tempS = array[i].getAverageExamScore();\n rankCounter++;\n }\n map.put(array[i],grade);\n }\n\n return map;\n }", "public static List<Student> getAllStudents(){\r\n Student student1 = new Student(\"Dowlath\",2,3.6,\"male\", Arrays.asList(\"Swim\",\"BasketBall\",\"VolleyBall\"),11);\r\n Student student2 = new Student(\"Bhavya\",2,3.8,\"female\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),12);\r\n\r\n\r\n /* 3rd Grade Students */\r\n Student student3 = new Student(\"Priya\",3,4.0,\"female\", Arrays.asList(\"Swim\",\"BasketBall\",\"Aerobics\"),10);\r\n Student student4 = new Student(\"Arsh\",3,3.9,\"male\",Arrays.asList(\"Swim\",\"Gymnastics\",\"soccer\"),9);\r\n\r\n\r\n /* 4th Grade Students */\r\n Student student5 = new Student(\"Sowmiya\",4,3.5,\"female\", Arrays.asList(\"Swim\",\"Dancing\",\"FootBall\"),15);\r\n Student student6 = new Student(\"Ariz\",4,3.9,\"male\",Arrays.asList(\"Swim\",\"BasketBall\",\"BaseBall\",\"FootBall\"),14);\r\n\r\n List<Student> students = Arrays.asList(student1,student2,student3,student4,student5,student6);\r\n return students;\r\n }", "public int[] countGrades(int[] grades) {\n int[] gradeFrequencies = new int[11];\n for (int grade : grades) {\n gradeFrequencies[grade]++;\n }\n return gradeFrequencies;\n }", "public int getMinimumGrade(int[] grades) throws ArithmeticException {\n \n if (!isValid(grades)) {\n throw new ArithmeticException(\"Grade should have value between 0 to 100\");\n }\n \n int minGrade = 100;\n int currentGrade;\n final int NUMBER_OF_STUDENTS = grades.length;\n \n for (int studentId = 0; studentId < NUMBER_OF_STUDENTS; studentId++) {\n currentGrade = grades[studentId];\n \n if (currentGrade < minGrade) {\n minGrade = currentGrade;\n }\n }\n \n return minGrade;\n }", "public void grade() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// grade Method initialized\t\t\t\t\t\t\t\t\t\t\t\t\r\n System.out.print(\"Average Marks of a Student is \"+ average+\" and \");\t\t\t\t\t\t\t\t\t\t\t// This will print out the argument and ends the line\r\n if(average>81)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// if loop expression, to check the condition\r\n {System.out.print(\"Grade is A : Pass\");}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE A\r\n else if(average>=61 && average<=80)\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.print(\"Grade is B : Pass\");}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE B\r\n else if (average>41 && average<=60)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.print(\"Grade is C : Pass\");}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE C\r\n else if (average>21 && average <=40)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.println(\"Grade is D : Fail\"); }\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// then print GRADE D\r\n else if (average<20)\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// nested else if loop expression, to check the condition\r\n {System.out.println(\"Fail\"); }\t}", "public List<OrgTO> getGradeForTeacherUsersAcsi(List<OrgTO> teachers) throws Exception {\r\n\t\tStringBuffer allNodes = new StringBuffer();\r\n\t\tStringBuffer allJasperOrgIds = new StringBuffer();\r\n\t\tboolean firstRec = false;\r\n\t\tfor(OrgTO t : teachers) {\r\n\t\t\tif(firstRec) {\r\n\t\t\t\tallNodes.append(\",\");\r\n\t\t\t\tallJasperOrgIds.append(\",\");\r\n\t\t\t}\r\n\t\t\tfirstRec = true;\r\n\t\t\tallNodes.append(t.getOrgNodeId());\r\n\t\t\tallJasperOrgIds.append(t.getJasperOrgId());\r\n\t\t}\r\n\t\t//logger.info(\"nodes\"+allNodes);\r\n\t\tList<OrgTO> allGrades = null;\r\n\t\tList<UserTO> allStudents = null;\r\n\t\tList<UserTO> students = null;\r\n\t\tif(allNodes.toString() != null && allNodes.toString().length() > 0) {\r\n\t\t\tlogger.info(\"Fetching grades for teachers\");\r\n\t\t\t//allGrades = getGrades(allNodes.toString());\r\n\t\t\tallGrades = getGradesAcsi(allJasperOrgIds.toString());\r\n\t\t\t\r\n\t\t\tlogger.info(\"Fetching students for teachers\");\r\n\t\t\tallStudents = getStudentsAcsi(allNodes.toString());\r\n\t\t\r\n\t\t\tfor(OrgTO tech : teachers) {\r\n\t\t\t\tfor(OrgTO grade : allGrades) {\r\n\t\t\t\t\tif(tech.getJasperOrgId() != null && tech.getJasperOrgId().equals(grade.getJasperOrgId())) {\r\n\t\t\t\t\t\ttech.setGrade(grade.getGrade());\r\n\t\t\t\t\t\ttech.setGradeSeq(grade.getGradeSeq());\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\tstudents = new ArrayList<UserTO>();\r\n\t\t\t\tfor(UserTO student : allStudents) {\r\n\t\t\t\t\tif(tech.getOrgNodeId() != null && tech.getOrgNodeId().equals(student.getOrgNodeId())) {\r\n\t\t\t\t\t\tstudents.add(student);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\ttech.setUsers(students);\r\n\t\t\t}\r\n\t\t}\r\n\t\tlogger.info(\"Returning \" + teachers.size() + \" Grades for Teacher Users\");\r\n\t\treturn teachers;\r\n\t}", "public static Double calculateAverageGrade(List<Student> students) {\n return -1.;\n }", "@Override\r\n\tpublic Student[] getStudents() {\n\t\treturn this.students;\r\n\t}", "public float calculateGrade() {\r\n\t\t// Creating variables for correct answers, total questions and the grade itself.\r\n\t\tint correct = 0;\r\n\t\tint total = correctAnswers.size();\r\n\t\tfloat grade = 0;\r\n\t\t// Loop that goes around the list with user's answers and correct answers.\r\n\t\tfor (int i = 0; i < correctAnswers.size(); i++) {\r\n\t\t\t// Creating variable result which compare the elements from the two list index\r\n\t\t\t// by index.\r\n\t\t\tint result = (userAnswers.get(i).compareTo(correctAnswers.get(i)));\r\n\t\t\t// Condition that increments the variable correct with one every time when there\r\n\t\t\t// is match between the lists' elements by index.\r\n\t\t\tif (result == 0) {\r\n\t\t\t\tcorrect++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Calculating the grade of the student.\r\n\t\tgrade = (float) ((double) correct / total * 100);\r\n\t\treturn grade;\r\n\t}", "public ArrayList getStudents();", "public ArrayList<Grading> getGradingList(){\n \n ArrayList<Grading> gradingList = new ArrayList<Grading>();\n \n String select1 = \"select * from Gradings\";\n \n try{\n \n ps=dbc.con.prepareStatement(select1);\n rs=ps.executeQuery();\n Grading grading;\n while(rs.next()){\n \n grading = new Grading(rs.getString(\"studentId\"),rs.getString(\"firstName\"),rs.getString(\"course\"),rs.getString(\"examType\"),rs.getString(\"grade\"),rs.getString(\"date1\"));\n gradingList.add(grading);\n }\n \n }\n catch(Exception e){}\n return gradingList;\n }", "private static Student[] makeStudents() {\n\t\treturn null;\n\t}", "public void setGrade(int grade)\n {\n this.grade = grade;\n }", "Grade grade(\n final Student student) {\n ////\n return Optional.of(student).map(grades::get).orElseThrow(() -> new NoSuchElementException(student.toString()));\n }", "public void setGrade(int grade) {\n this.grade = grade;\n }", "public void setGrade(int grade) {\n this.grade = grade;\n }", "public void setGrade(int grade) {\n this.grade = grade;\n }", "public void setGrade(int grade) {\n this.grade = grade;\n }", "public static void print_average_grade(String studentID) {\n Integer StuID = Integer.parseInt(studentID);\n double sum = 0;\n\n for (Integer grade : roster.get(StuID - 1).getGrades())\n sum = sum + grade;\n\n double avg = sum / roster.get(StuID - 1).getGrades().length;\n System.out.printf(roster.get(StuID - 1).getFirstName() + \" \" + roster.get(StuID - 1).getLastName() + \": \" + \"%.1f\\n\", avg);\n //System.out.printf(\"%.1f\\n\", avg);\n }", "public void setGrade(String grade) {\n this.grade = grade;\n }", "public List<Integer> createArray(RedBlackTree.Node<Grade> n) {\r\n List<Integer> result = new ArrayList<>();\r\n\r\n if (n.leftChild != null) {\r\n result.addAll(createArray(n.leftChild));\r\n }\r\n\r\n if (n.rightChild != null) {\r\n result.addAll(createArray(n.rightChild));\r\n }\r\n\r\n result.add(n.data.getGrade());\r\n\r\n return result;\r\n\r\n }", "@Override\r\n\tpublic OaJybChronicle GetgradeStudent(int student_id) {\n\t\treturn oaJybChronicleMapper.GetgradeStudent(student_id);\r\n\t}", "private String updateGrade(String[] letterGrade) {\n return (String) this.displayOptionsPanel(\"Choose grade:\", letterGrade);\n }", "public static List<Student> studentGpa() {\n\t\t\nList<Student> stuGpa = StudentDataBase.getAllStudents().stream().filter(j->j.getGpa()>=3.9).collect(Collectors.toList());\n\t\treturn stuGpa;\n\t}", "public Grade grade() {\n ////\n return Grade.average(grades.values());\n }", "@Test\r\n\tpublic void fromNumGradeTest(){\r\n\t\tint[] testNumGrade = { -1, 0, 34,36,41,42,45,47,51,53,55,58,60,63,65,68,71,74,77, 100 };\r\n\t\tint expectedValue = 20;\r\n\t\tfor(int i=0;i<testNumGrade.length;i++){\r\n\t\t\tassertEquals(expectedValue,PointGrade.fromNumGrade(testNumGrade[i]).getPoints());\r\n\t\t\texpectedValue--;\r\n\t\t}\r\n\t}", "public int getGrade() { return grade; }", "public static void main(String[] args)\n {\n Scanner inputScanner = new Scanner(System.in);\n \n \n System.out.print(\"Enter the number of marks: \");\n int noOfStudents = inputScanner.nextInt();\n if (noOfStudents <= 0)\n {\n System.out.println(\"This is an incorrect input\");\n }// If\n else \n {\n //Skip past the end of that line\n inputScanner.nextLine();\n\n //Names are stored in a different array\n Student[] students = new Student[noOfStudents];\n\n //Obtain the grades from the input\n for (int studentIndex = 0; studentIndex < noOfStudents; studentIndex++)\n {\n System.out.print(\"Enter Name of Student \" + (studentIndex + 1)\n + \" : \");\n String studentName = inputScanner.nextLine();\n \n System.out.print(\"Enter mark #\" + (studentIndex + 1) + \" for \"\n + studentName + \": \");\n int studentGrade = inputScanner.nextInt();\n //Skip past that line\n inputScanner.nextLine();\n students[studentIndex] = new Student(studentName, studentGrade);\n }//For \n\n //Now compute the sum of the grades\n int sumOfGrades = 0;\n for (Student names : students)\n {\n sumOfGrades += names.getGrade();\n }//For\n\n //Calculate the mean, then minimum and maximum using array sort\n double meanGrades = sumOfGrades / (double)noOfStudents; \n sort(students);\n \n //Produce the results\n System.out.println();\n System.out.println(\"The mean mark is: \" + meanGrades);\n System.out.println(\"The minimum mark is: \" \n + students[0].getGrade());\n System.out.println(\"The maximum mark is: \"\n + students[students.length-1].getGrade());\n System.out.println();\n \n \n //Prints above the For loop because we don't want it to repeat\n System.out.println(\"Person and Score | Difference From Mean\");\n \n for (Student names : students)\n {\n double differenceMean = (double)names.getGrade() - meanGrades;\n System.out.printf(names.toString());\n System.out.println(\" | \" + differenceMean);\n }// For\n }//Else\n }", "public boolean obtainAGrade(String courseCode, int score) {\n for(int i = 0; i < transcripts.length; i++){\n if(transcripts[i] != null){\n // checking if the given course code equal to transcripts[i]'s code and the course does not have a grade in it\n if (transcripts[i].getCode().equalsIgnoreCase(courseCode) && transcripts[i].getGrade() == null){\n //System.out.println(\"transcripts[i].getCode() = \" + transcripts[i].getCode());\n //System.out.println(\"courseCode = \" + courseCode);\n // setting the course grade\n this.setCourseGrade(transcripts[i],score);\n \n return true;\n }\n }\n }\n return false;\n \n }", "public static void printArray(int[] grades){\n int arraylength=grades.length;//find length of input array\n for (int i=0; i<=arraylength-1;i++){\n //print out elements\n System.out.print(grades[i]+\" \");\n }\n System.out.println();//print new lnie\n }", "public void setGrade (double grade){\n this.grade = grade;\n }", "public static void main(String[] args) {\n ExamGrade eg1=new ExamGrade(60, 90);\n ExamGrade eg2=new ExamGrade(20, 60);\n ExamGrade eg3=new ExamGrade(55, 85);\n //instances of student \n Student s1=new Student(\"Barış\", \"Arslan\", \"male\", 3.4, \"CMPE\",eg1);\n Student s2=new Student(\"Fırat\", \"Arslan\", \"male\", 2.5, \"CMPE\", eg1);\n Student s3=new Student(\"ali\", \"mehmet\", \"male\", 1.0, \"EEN\", eg3);\n Student s4=new Student(\"ayşe\", \"pek\", \"female\", 3.0, \"EEN\", eg2);\n Student s5=new Student(\"kai\", \"pek\", \"male\", 3.1, \"TK\", eg2);\n\n Student[] a={s5,s3,s2,s1,s4}; //array for test \n Student[] b=generatedStudent(4); //describing genereted values to b because of testing\n show(b); //instance of show method\n findMinMax(b); //instance of findMinMax method\n \n System.out.println(search(a,118101));//instance of search method\n System.out.println(s2);//these control changeGrade before working method\n changeGrade(a, 118102, eg3);//instance of changeGrade method\n System.out.println(s2);//these control changeGrade after working method\n meanGPA(a);//instance of meanGPA \n }", "public static void findMinMax(Student[] student){\n int minMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find min value of midterm because I describe first index of midterm value in array\n int maxMidterm=student[0].getExamGrade().getMidtermExamGrade();//this is first step to find max value of midterm because I describe first index of midterm value in array\n int minFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find min value of final because I describe first index of final value in array\n int maxFinal=student[0].getExamGrade().getFinalExamGrade();//this is first step to find max value of final because I describe first index of final value in array\n\n for(int i=0;i<student.length;i++){\n if(student[i].getExamGrade().getMidtermExamGrade()<minMidterm){ // this condution find min value of midterm until this step \n minMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getMidtermExamGrade()>maxMidterm){// this condution find max value of midterm until this step \n maxMidterm=student[i].getExamGrade().getMidtermExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()<minFinal){// this condution find min value of final until this step \n minFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n if(student[i].getExamGrade().getFinalExamGrade()>maxFinal){// this condution find max value of final until this step \n maxFinal=student[i].getExamGrade().getFinalExamGrade();\n }\n }\n\n System.out.println(\"Maximum Midterm Exam Grade: \"+maxMidterm+\" Minumum Midterm Exam Grade: \"+minMidterm);\n System.out.println(\"Maximum Final Exam Grade: \"+maxFinal+\" Minumum Final Exam Grade: \"+minFinal);\n }", "public double getGradeAverage() {\n int gradesTotal = 0;\n for (int grade : grades) {\n gradesTotal += grade;\n }\n return gradesTotal / grades.size();\n }", "public void setGradeName(String gradeName) {\n this.gradeName = gradeName;\n }", "@Override\n\tpublic List<AASTranscriptSemester> getAASTranscriptSemester(String stuId, String acaYear, String semesterId) {\n\t\tList<AASTranscriptSemester> arr = new ArrayList<>();\n\t\tPreparedStatement statement = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tconn = oConnection.getOracleConnection();\n\t\t\t//If semesterId == 4, it means it's SPRING semester, we have to change it into 1 because numYears variable bellow \n\t\t\t//which is the concatenation between academic year and semester Id (Ex: 20184, 20173,...) cannot be\n\t\t\t//like 20181, 20171, 20151, etc. it has to be like 20184, 20174, 20154, etc. \n\t\t\tif (semesterId.equals(\"4\"))\n\t\t\t\tsemesterId = \"1\";\n\t\t\tString numYear = acaYear + semesterId;\n\t\t\tString sql = \n\t\t\t\t\t\"select id_student,semester_name,aca_year,semester,term_gpa_aas,cum_gpa_aas\"+ \n\t\t\t\t\t\" from v_cum_gpa_aas\"+ \n\t\t\t\t\t\" where id_student = ?\" +\n\t\t\t\t\t\" and num_semester_year < ?\"+\n\t\t\t\t\t\" order by num_semester_year\"; \n\t\t\tstatement = conn.prepareStatement(sql);\n\t\t\tstatement.setString(1, stuId);\n\t\t\tstatement.setString(2, numYear);\n\t\t\trs = statement.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\tarr.add(new AASTranscriptSemester(rs.getString(\"id_student\"),rs.getString(\"semester_name\"),rs.getString(\"aca_year\")\n\t\t\t\t\t\t, rs.getString(\"semester\"), rs.getDouble(\"term_gpa_aas\"), rs.getDouble(\"cum_gpa_aas\")));\n\t\t\t}\n\t\t\trs.close();\n\t\t\tstatement.close();\n\t\t\tconn.close();\n\t\t\treturn arr;\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t\tif (statement != null)\n\t\t\t\t\tstatement.close();\n\t\t\t\tif (conn != null)\n\t\t\t\t\tconn.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private static void grading(String name, String level, int subjects, int totalQuiz){\n int tempScore, grade = 0;\n\n for (int i = 0; i < totalQuiz; i++) {\n System.out.print(\"Nilai kuis \" + (i + 1) + \": \");\n tempScore = scanner.nextInt();\n while (tempScore < 0 || tempScore > 100) {\n System.out.println(\"\\nMasukan respon yang valid (0 <= Nilai <= 100)\");\n\n System.out.print(\"Nilai kuis \" + (i + 1) + \": \");\n tempScore = scanner.nextInt();\n }\n grade += tempScore;\n }\n grade /= totalQuiz;\n\n System.out.println(\"\\n=============================\");\n System.out.println(\"= Data Siswa =\");\n System.out.println(\"=============================\");\n\n System.out.println(\"Nama: \" + name);\n System.out.println(\"Kelas: \" + level);\n System.out.println(\"Mata Pelajaran: \" + subjectList[subjects - 1]);\n System.out.println(\"Nilai akhir anda: \" + grade);\n if (grade >= 80 && grade <= 100) {\n System.out.println(\"Grade: \" + gradeList[0]);\n } else if (grade >= 70 && grade < 80) {\n System.out.println(\"Grade: \" + gradeList[1]);\n } else if (grade >= 50 && grade < 70) {\n System.out.println(\"Grade: \" + gradeList[2]);\n } else {\n System.out.println(\"Grade: \" + gradeList[3]);\n }\n\n //todo: make a new loop method\n System.out.println(\"\\n===============================================\");\n System.out.println(\"Apakah anda ingin menambahkan data baru? (y/n): \");\n String loops = scanner.next();\n if (loops.equalsIgnoreCase(\"y\")) {\n dataInput();\n } else if (loops.equalsIgnoreCase(\"n\")) {\n System.out.println(\"Proses Selesai. Terima kasih!\");\n System.exit(-1);\n } else {\n System.out.println(\"Mohon maaf respon anda tidak dapat diproses. Silahkan coba lagi\");\n System.exit(-1);\n }\n }", "public static String getGrade(SalaryGrade[] salaryGrades, int salary) {\n\t\treturn null;\n\t}", "public int getGrade() {\n return grade;\n }", "private String[] extraStudentGrades(String record) throws noGradesException{\n\t\tString grades = record.substring(record.indexOf(':') + 1);\n\t\tif (grades.trim().equals(\"\")){\n\t\t\tthrow new noGradesException(\"There are no grades for this student!\");\n\t\t} \n\t\tString[] parsedGrades = grades.trim().split(\"\\\\s+\");\n\t\treturn parsedGrades;\n\t}", "@GET\n @Path(\"/{id}\")\n @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n public Response getStudentGrade(@PathParam(\"id\") int id) {\n // getting student by it's index\n StudentService studentService = new StudentService();\n Student searchedStudent = studentService.getStudent(index);\n\n // checking if student exists\n if (searchedStudent == null) {\n return Response.status(Response.Status.NOT_FOUND).entity(\"Student not found\").build();\n }\n\n // getting student's grade by it's id\n Grade searchedGrade = searchedStudent.getGradeById(id);\n\n // checking if student's grade exists\n if (searchedGrade == null) {\n return Response.status(Response.Status.NOT_FOUND).entity(\"Grade not found\").build();\n }\n\n // creating xml response\n return Response.status(Response.Status.OK).entity(searchedGrade).build();\n }", "public static ArrayList<StudentGrade> getGradesbyRubric(ArrayList<Rubric> rubric , String rubricName)\n{\n ArrayList<StudentGrade> grades = null;\n for(Rubric search: rubric)\n {\n if(search.getRubricName().equalsIgnoreCase(rubricName))\n {\n \n grades= search.getGrades();\n }\n\n }\n return grades; \n}", "public double getHighestGrade(){\n double highestGrade = 0;\n for (int i = 0; i<students.size(); i++){\n if (students.get(i).getGrades()> highestGrade)\n highestGrade = students.get(i).getGrades();\n }// end for\n return highestGrade;\n }", "public void outputGrades() {\n System.out.printf(\"The grades are:%n%n\");\n\n // generates output grades each student\n for (int student =0; student < grades.length; student++)\n System.out.printf(\"Student %2d: %3d%n\", student + 1, grades[student]);\n }", "public int[] scanGrades(String filepath) {\n Scanner scanner = null;\n try {\n scanner = new Scanner(new File(filepath));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n ArrayList<Integer> grades = new ArrayList<Integer>();\n while (scanner.hasNextInt()) {\n grades.add(scanner.nextInt());\n }\n int[] gradeArray = new int[grades.size()];\n for (int i = 0; i < grades.size(); i++) {\n gradeArray[i] = grades.get(i);\n }\n return gradeArray;\n }", "private void _generateAGradudateStudent(int index) {\n int n;\n ArrayList list;\n String id;\n\n id = _getId(CS_C_GRADSTUD, index);\n writer_.startSection(CS_C_GRADSTUD, id);\n _generateAStudent_a(CS_C_GRADSTUD, index, id);\n n = _getRandomFromRange(GRADSTUD_COURSE_MIN, GRADSTUD_COURSE_MAX);\n list = _getRandomList(n, 0, gradCourses_.size() - 1);\n for (int i = 0; i < list.size(); i++) {\n CourseInfo info = (CourseInfo) gradCourses_.get( ( (Integer) list.get(i)).\n intValue());\n writer_.addProperty(CS_P_TAKECOURSE,\n _getId(CS_C_GRADCOURSE, info.globalIndex), true);\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#takesCourse\", _getId(CS_C_GRADCOURSE, info.globalIndex), true);\t \t \t \t \n }\n }\n writer_.addProperty(CS_P_UNDERGRADFROM, CS_C_UNIV,\n _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM)));\n if(globalVersionTrigger){\t \t \n \t writer_log.addPropertyInstance(id, ontology+\"#undergraduateDegreeFrom\", _getId(CS_C_UNIV, random_.nextInt(UNIV_NUM)), true);\t \t \t \t \n }\n if (0 == random_.nextInt(R_GRADSTUD_ADVISOR)) {\n \tString ad = _selectAdvisor();\n \twriter_.addProperty(CS_P_ADVISOR, _selectAdvisor(), true);\n\t if(globalVersionTrigger){\t \t \n\t \t writer_log.addPropertyInstance(id, ontology+\"#advisor\", ad, true);\t \t \t \t \n\t }\n \n }\n \n _assignGraduateStudentPublications(id, GRADSTUD_PUB_MIN, GRADSTUD_PUB_MAX);\n writer_.endSection(CS_C_GRADSTUD);\n }", "public static Student[] generatedStudent(int x){\n String gender;\n Student[] student=new Student[x];//we create array and we describe count of item by given number\n for(int i=0; i < student.length; i++){\n double GPA = Math.random()*4;//it helps you to create random double value between 0 to 4 for gpa\n int midterm= (int)(Math.random()*100);//it helps to create random integer value between 0 to 100 for midterm exam grade\n int finalGra= (int)(Math.random()*100);//it helps to create random integer value between 0 to 100 for final exam grade\n int preGender=(int)(Math.random()*2);//it helps to create random integer value between 0 to 1 for gender because when it is equal 1,it transformes to male else it transformes to female\n if(preGender==1){\n gender=\"male\";\n } \n else{\n gender=\"female\";\n }\n ExamGrade e1=new ExamGrade(midterm, finalGra);//we create exam grade to add student instructere\n student[i] = new Student(\"barış\", \"arslan\", gender, GPA, \"CMPE\", e1);\n }\n return student;\n }", "public void setExamGradeId(int examGradeId) {\n this.examGradeId = examGradeId;\n }", "public void addCourseGrade(String course, int grade) {\n courses[numCourses] = course;\n grades[numCourses] = grade;\n ++numCourses;\n }", "public void addGrade(int grade) {\n this.grades.add(grade);\n }", "public String DisplayStudentsGPA()\n\t{\t\n\t\tString studentList= \"\";\n\t\tint i=1; //iterates the leading number for each student on the list\n\t\tfor(Student b : classRoll) //loops through classRoll adding students to the list\n\t\t{\n\t\t\tstudentList += i + \". \" + b.getStrNameFirst ( ) + \" \" + b.getStrNameLast ( ) + \" \" + b.getfGPA ( ) +\"\\n\";\n\t\t\ti++;\n\t\t}\n\t\treturn studentList= getCourseName() +\"\\n\" + getCourseNumber()+\"\\n\" + getInstructor()+ \"\\n\" + studentList;\n\t}", "private void viewGradeCard(int studentId)\n\t{\n\t\t\n\t\t\n\t\tList<StudentGrade> grade_card=null;\n\t\ttry \n\t\t{\n\t\t\tgrade_card = registrationInterface.viewGradeCard(studentId);\n\t\t} \n\t\tcatch (SQLException e) \n\t\t{\n\n\t\t\tlogger.info(e.getMessage());\n\t\t}\n\t\t\n\t\tlogger.info(String.format(\"%-20s %-20s %-20s\",\"COURSE CODE\", \"COURSE NAME\", \"GRADE\"));\n\t\t\n\t\tif(grade_card.isEmpty())\n\t\t{\n\t\t\tlogger.info(\"You haven't registered for any course\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(StudentGrade obj : grade_card)\n\t\t{\n\t\t\tlogger.info(String.format(\"%-20s %-20s %-20s\",obj.getCourseCode(), obj.getCourseName(),obj.getGrade()));\n\t\t}\n\t}", "public Student(String myname, int myid , double[] theGradeArray){ \r\n\r\n\t\tname = myname;\r\n\t\tid = myid;\r\n\t\tgrades = theGradeArray;\r\n\t\t\r\n\t// use the static variable from StudentArray Class to keep count of the number of student object\r\n\t\tnumberOfStudents++;\r\n\t}", "private void assignIntoGrade() {\n }", "@Test\n\tpublic void testAssignGrade() {\n\t\tthis.admin.createClass(\"Class1\", 2017, \"Instructor1\", 20);\n\t\tthis.instructor.addHomework(\"Instructor1\", \"Class1\", 2017, \"HW1\");\n\t\tthis.student.submitHomework(\"Student1\", \"HW1\", \"Solution\", \"Class1\", 2017);\n\t\tthis.instructor.assignGrade(\"Instructor1\", \"Class1\", 2017, \"HW1\", \"Student1\", 90);\n\t\tInteger grade = this.instructor.getGrade(\"Class1\", 2017, \"HW1\", \"Student1\");\n\t\tassertTrue(grade.equals(new Integer(90)));\n\t}", "public int getExamGradeId() {\n return examGradeId;\n }", "public List<OrgTO> getGradesAcsi(String jasperOrgIds) throws Exception {\r\n\t\tConnection conn = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\t\tResultSet rs = null;\r\n\t\tList<OrgTO> allGrades = new ArrayList<OrgTO>();\r\n\t\tOrgTO grades = null;\r\n\t\ttry {\r\n\t\t\tconn = driver.connect(DATA_SOURCE, null);\r\n\t\t\t/*String query = \"SELECT DISTINCT grade.grade_name, FACT.ORG_NODEID \" + \r\n\t\t\t\t\t\t\t \"FROM SUBTEST_SCORE_FACT FACT, GRADE_DIM GRADE \" + \r\n\t\t\t\t\t\t\t \"WHERE FACT.ORG_NODEID in ( \"+ nodeId +\" )\" +\r\n\t\t\t\t\t\t\t \"AND grade.gradeid = fact.gradeid\";*/\r\n\t\t\tString query = /*\"SELECT DISTINCT GRADE.GRADE_NAME, gsl.jasper_orgid, GRADE.GRADE_SEQ \" +\r\n\t\t\t\t\t\"FROM GRADE_SELECTION_LOOKUP GSL, ADMIN_DIM ADM, GRADE_DIM GRADE \" +\r\n\t\t\t\t\t\"WHERE ADM.ADMINID = GSL.ADMINID \" +\r\n\t\t\t\t\t\"AND grade.gradeid = gsl.gradeid \" +\r\n\t\t\t\t\t\"AND ADM.CURRENT_ADMIN = 'Y' \" +\r\n\t\t\t\t\t\"AND gsl.jasper_orgid in ( \"+ jasperOrgIds +\" ) \";*/\r\n\t\t\t\t\tCustomStringUtil.appendString(\r\n\t\t\t\t\t\t\t\"select distinct gd.grade_code, ond.org_nodeid, GD.GRADE_SEQ\",\r\n\t\t\t\t\t\t\t\" from users u,\",\r\n\t\t\t\t\t\t\t\" org_users ou,\",\r\n\t\t\t\t\t\t\t\" org_node_dim ond,\",\r\n\t\t\t\t\t\t\t\" student_bio_dim sbd,\",\r\n\t\t\t\t\t\t\t\" grade_dim gd\",\r\n\t\t\t\t\t\t\t\" where u.userid = ou.userid\",\r\n\t\t\t\t\t\t\t\" and ou.org_nodeid = ond.org_nodeid\",\r\n\t\t\t\t\t\t\t//\" and ond.parent_org_nodeid in ( \"+ jasperOrgIds +\" )\",\r\n\t\t\t\t\t\t\t\" and ond.org_nodeid in ( \"+ jasperOrgIds +\" )\",\r\n\t\t\t\t\t\t\t\" and sbd.org_nodeid = ond.org_nodeid\",\r\n\t\t\t\t\t\t\t\" and sbd.gradeid = gd.gradeid\",\r\n\t\t\t\t\t\t\t\" order by ond.org_nodeid\");\r\n\t\t\t\r\n\t\t\tpstmt = conn.prepareCall(query);\r\n\t\t\t//pstmt.setString(1, nodeId);\r\n\t\t\trs = pstmt.executeQuery();\r\n\t\t\twhile(rs.next()) {\r\n\t\t\t\tgrades = new OrgTO();\r\n\t\t\t\tString grade = rs.getString(1);\r\n\t\t\t\tInteger gradeInt = new Integer(grade);\r\n\t\t\t\tgrades.setGrade(gradeInt.toString());\r\n\t\t\t\tgrades.setJasperOrgId(rs.getString(2));\r\n\t\t\t\tgrades.setGradeSeq(rs.getInt(3));\r\n\t\t\t\tallGrades.add(grades);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new Exception(e.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {rs.close();} catch (Exception e2) {}\r\n\t\t\ttry {pstmt.close();} catch (Exception e2) {}\r\n\t\t\ttry {conn.close();} catch (Exception e2) {}\r\n\t\t}\r\n\t\tlogger.info(\"Returning \" + allGrades.size() + \" Grades\");\r\n\t\treturn allGrades;\r\n\t}", "private static void print_Final(Gradebook gradebook, String[] flags){\n if (flags[3] != null && flags[3].equals(\"G\")){\n List<Student> studentsList = gradebook.getAllStudents();\n //Map<Student, Double>\n Map<Double, List<Student>> grades = new HashMap<Double, List<Student>>();\n Set<Double> gradeSet = new HashSet<Double>();\n\n for(Student s : studentsList){\n double grade = gradebook.getGradeStudent(s);\n List<Student> studs = grades.get(grade);\n\n if(studs == null){\n studs = new ArrayList<Student>();\n }\n\n studs.add(s);\n grades.put(grade, studs);\n gradeSet.add(grade);\n }\n\n List<Double> gradeList = new ArrayList<Double>(gradeSet);\n Collections.sort(gradeList, Collections.reverseOrder());\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for(Double d : gradeList){\n\n List<Student> studs = grades.get(d);\n for(Student s : studs){\n\n System.out.println(\"(\" + s.getLast() + \", \" + s.getFirst() + \", \" + df.format(d) + \")\");\n }\n }\n } else if (flags[4] != null && flags[4].equals(\"A\")){\n //compare override class at bottom of file\n List<Student> studentsAlpha = gradebook.getAllStudents();\n Collections.sort(studentsAlpha, new Comparator<Student>() {\n @Override\n public int compare(Student o1, Student o2) {\n if ( o2.getLast().compareToIgnoreCase(o1.getLast()) == 0) {\n return o1.getFirst().compareToIgnoreCase(o2.getFirst());\n } else {\n return o1.getLast().compareToIgnoreCase(o2.getLast());\n }\n }\n });\n\n DecimalFormat df = new DecimalFormat(\"#.####\"); //Round to 4 decimal places\n df.setRoundingMode(RoundingMode.HALF_UP);\n for (Student stud: studentsAlpha) {\n System.out.println(\"(\" + stud.getLast() + \", \" + stud.getFirst() + \", \" + df.format(gradebook.getGradeStudent(stud)) + \")\");\n }\n\n }\n else{\n throw new IllegalArgumentException(\"Grade or Alphabetical flag missing.\");\n }\n return;\n }", "public boolean setGrade (int index, double newGrade){\r\n\r\n\t\tif ((index >= 0 && index <= 2) && (newGrade >= 0 && newGrade <=100)){\r\n\r\n\t\t\tgrades[index] = newGrade;\r\n\t\t\tif (grades[index] == newGrade)\r\n\t\t\t\treturn true;\r\n\t\t\telse \r\n\t\t\t\treturn false;\r\n\t\t}else{ \r\n\t\t\tSystem.out.println(\"Please enter a valid index and grade.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t}", "public List<String> getStudents();", "java.util.List getGradeModelRefs();", "public static void main(String[] args) {\n\t\t\n\t\tint[] grades = {10, 9, 8, 9, 2, 34, 78, 4, 7, 1};\n\t\tgrades[1] = 900; //this is used to update an array.\n\t\tSystem.out.println(grades[1]);\n //Never try to pull up a number that is not in the array\n\t}" ]
[ "0.6755378", "0.6698805", "0.6433183", "0.6430651", "0.6400085", "0.6265582", "0.62049216", "0.6164819", "0.6127946", "0.6093872", "0.60643375", "0.60410565", "0.5951739", "0.5874103", "0.58629453", "0.58342594", "0.58322996", "0.5825167", "0.57864195", "0.57335716", "0.57042116", "0.569998", "0.56915474", "0.5653439", "0.56476295", "0.56470144", "0.5630694", "0.5615759", "0.5601839", "0.5551699", "0.55396926", "0.550363", "0.5492008", "0.5486401", "0.5478151", "0.54710066", "0.54682475", "0.5462813", "0.5452166", "0.5440287", "0.5439326", "0.5436623", "0.54321945", "0.54181045", "0.54134333", "0.5408879", "0.5407475", "0.53996253", "0.53989756", "0.5365879", "0.5359121", "0.5336667", "0.5325248", "0.5325248", "0.5325248", "0.5325248", "0.53129387", "0.5310728", "0.53046197", "0.52974313", "0.52962214", "0.5291939", "0.528761", "0.5277106", "0.5264362", "0.52567846", "0.52469414", "0.52448213", "0.5237355", "0.52365124", "0.52326906", "0.5228276", "0.5224031", "0.5219576", "0.5214509", "0.52055997", "0.5201069", "0.5195894", "0.51957417", "0.5192457", "0.51896", "0.5180746", "0.5163322", "0.5152542", "0.51329005", "0.5124281", "0.51242065", "0.5122098", "0.5117298", "0.5117102", "0.5103035", "0.51026744", "0.51014376", "0.50962603", "0.50945026", "0.5087671", "0.50873166", "0.5086366", "0.50854367", "0.5082986" ]
0.64877415
2
/ Input: 4 73 67 38 33 Output: 75 67 40 33
public static void main(String[] args) throws IOException { BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); int gradesCount = Integer.parseInt(bufferedReader.readLine().trim()); List<Integer> grades = IntStream.range(0, gradesCount).mapToObj(i -> { try { return bufferedReader.readLine().replaceAll("\\s+$", ""); } catch (IOException ex) { throw new RuntimeException(ex); } }) .map(String::trim) .map(Integer::parseInt) .collect(toList()); List<Integer> result = Result.gradingStudents(grades); bufferedReader.close(); System.out.println(result.stream() .map(Object::toString) .collect(joining("\n")) + "\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void eval5(){\n for(int i = 0; i < 46; i++){\n for(int j = i + 1; j < 47; j++){\n for(int k = j + 1; k < 48; k++){\n for(int l = k + 1; l < 49; l++){\n for(int m = l + 1; m < 50; m++){\n Evaluator.evaluate(i, j, k, l, m);\n }\n }\n }\n }\n }\n }", "private static void eval7(){\n int z = 0;\n for(int i = 0; i < 46; i++){\n for(int j = i + 1; j < 47; j++){\n for(int k = j + 1; k < 48; k++){\n for(int l = k + 1; l < 49; l++){\n for(int m = l + 1; m < 50; m++){\n for(int n = m + 1; n < 51; n++){\n for(int o = n + 1; o < 52; o++){\n Evaluator.evaluate(i, j, k, l, m, n, o);\n }\n }\n }\n }\n }\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n long[] arr = new long[5];\r\n for(int arr_i=0; arr_i < 5; arr_i++){\r\n arr[arr_i] = in.nextInt();\r\n }\r\n \r\n long min_sum, max_sum, aux_sum = 0;\r\n int indice_out = 0;\r\n min_sum = arr[0] + arr[1] + arr[2] + arr[3];\r\n max_sum = arr[0] + arr[1] + arr[2] + arr[3];\r\n \r\n for(int arr_i = 0; arr_i < 5; arr_i++){\r\n \taux_sum = 0;\r\n \tfor(int i = 0; i < 5; i++){\r\n \t\tif(i != indice_out){\r\n \t\t\taux_sum += arr[i];\r\n \t\t}\r\n \t}\r\n \t\r\n \tif(aux_sum > max_sum){\r\n \t\tmax_sum = aux_sum;\r\n \t}\r\n \t\r\n \tif(aux_sum < min_sum){\r\n \t\tmin_sum = aux_sum;\r\n \t}\r\n \tindice_out++;\r\n }\r\n \r\n System.out.println(min_sum+\" \"+max_sum);\r\n in.close();\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tint i, x=4,w=9,q;\r\n\t\tfor(i=-1;i<20;i+=3) {\r\n\t\t\tx++;\r\n\t\t\tfor(q=4;q<11;q++) {\r\n\t\t\t\tdo {\r\n\t\t\t\t\ti=+3;\r\n\t\t\t\t\tw=sizeof(i);\r\n\t\t\t\t\ti=x+w;\r\n\t\t\t\t\tx=w+i;\r\n\t\t\t\t\t\t\r\n\t\t\t\t} while (x<15);\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"x:\"+x+\"i:\"+i);\r\n\r\n\t}", "public static void main(String[] args) throws IOException{\n Reader sc = new Reader();\n \n int n=sc.nextInt();\n int m=sc.nextInt();\n \n int ans[]=new int[n];\n \n for(int i=0;i<m;i++)\n {\n int l=sc.nextInt();\n int r=sc.nextInt();\n // indexing is 1 based.\n l--;\n r--;\n \n ans[l]++;\n if(r!=n-1)\n {\n ans[r+1]--;\n \n } \n \n }\n \n int s=0;\n int max=0;\n for(int i=0;i<n;i++)\n {\n s+=ans[i];\n ans[i]=s;\n if(s>max)\n {\n max=s;\n }\n }\n \n int brr[]=new int[max+1];\n for(int i=0;i<n;i++)\n {\n brr[ans[i]]++;\n \n }\n \n s=0;\n for(int i=max;i>=0;i--)\n {\n s+=brr[i];\n brr[i]=s;\n \n }\n \n int q=sc.nextInt();\n for(int i=0;i<q;i++)\n {\n int x=sc.nextInt();\n if(x>max)\n {\n System.out.println(0);\n }\n else\n \tSystem.out.println(brr[x]);\n }\n \n\t}", "long part2(long[] input) {\n\t\tString[] inarr = { //\n\t\t\t\t\"A,B,A,B,C,C,B,C,B,A\", //\n\t\t\t\t\"R,12,L,8,R,12\", //\n\t\t\t\t\"R,8,R,6,R,6,R,8\", //\n\t\t\t\t\"R,8,L,8,R,8,R,4,R,4\"//\n\t\t};\n\t\tinput[0] = 2;\n\t\tIntCode ic = new IntCode();\n\t\tic.setStack(input);\n\t\tint state = ic.execIO();\n\t\tint inArrI = 0;\n\t\tint inArrJ = 0;\n\t\tboolean observing = false;\n\t\twhile (state != IntCode._STATE_HALT) {\n\t\t\tif (observing) {\n\t\t\t\tic.setInput(10);\n\t\t\t\tList<Long> out = ic.getAndResetOutput();\n\t\t\t\tprintGrid(longListToGrid(out));\n\t\t\t} else if (inArrI >= inarr.length) {\n\t\t\t\tic.setInput((int) 'n');\n\t\t\t\tstate = ic.execIO();\n\t\t\t\tic.setInput(10);\n\t\t\t\tstate = ic.execIO();\n\t\t\t\tbreak;\n//\t\t\t\tobserving = true;\n\t\t\t} else if (inArrJ >= inarr[inArrI].length()) {\n\t\t\t\tic.setInput(10);\n\t\t\t\tinArrI++;\n\t\t\t\tinArrJ = 0;\n\t\t\t} else {\n\t\t\t\tic.setInput((int) inarr[inArrI].charAt(inArrJ++));\n\t\t\t}\n\t\t\tstate = ic.execIO();\n\t\t}\n\t\tList<Long> out = ic.getOutputList();\n\t\treturn out.get(out.size() - 1);\n\t}", "public static void main(String[] args)\n {\n int[][] ints;\n int[][] ints1;\n\n\n\n\n ints = new int[][]{\n {1, 2, 3, 4, 5, 6, 7, 8, 9},\n {10, 11, 12, 13, 14, 15, 16, 17, 18},\n {19, 20, 21, 22, 23, 24, 25, 26, 27},\n {28, 29, 30, 31, 32, 33, 34, 35, 36},\n {37, 38, 39, 40, 41, 42, 43, 44, 45},\n {46, 47, 48, 49, 50, 51, 52, 53, 54},\n {55, 56, 57, 58, 59, 60, 61, 62, 63},\n {64, 65, 66, 67, 68, 69, 70, 0, 71},\n {73, 74, 75, 76, 77, 78, 79, 80, 72}\n };\n\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 5, 6},\n {7, 0, 8}\n };\n\n ints1 = new int[][]{\n {1, 2, 3},\n {4, 8, 5},\n {7, 0, 6}\n };\n ints = new int[][]{\n {5, 0, 4},\n {2, 3, 8},\n {7,1,6}\n };\n ints1 = new int[][]{\n {1, 6, 4},\n {7, 0, 8},\n {2, 3, 5}\n };\n\n ints1 = new int[][]{\n {6, 0, 5},\n {8, 7, 4},\n {3, 2, 1}\n };\n ints1 = new int[][]{\n {11, 0, 4, 7},\n {2, 15, 1, 8},\n {5, 14, 9, 3},\n {13, 6, 12, 10 }\n };\n\n\n ints1 = new int[][]{\n {14, 13, 5, 3},\n {0, 1, 8, 12},\n {6, 2, 4, 10},\n {11, 9, 15, 7 }\n };\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n\n\n ints = new int[][]{\n {1, 2, 3},\n {4, 6,5},\n {7, 8,0}\n };\n ints1 = new int[][]{\n {8, 4, 7},\n {1,5,6},\n {3,2,0}\n };\n ints = new int[][]{\n {1,0},\n {2,3},\n };\n System.out.println(System.currentTimeMillis());\n Board board = new Board(ints);\n Solver solution = new Solver(board);\n\n for (Board el :solution.solution())\n {\n System.out.println(el);\n }\n System.out.println(System.currentTimeMillis());\n\n\n }", "public static void main(String[] args) throws IOException {\n\t\tbr = new BufferedReader(new InputStreamReader(System.in));\r\n\t\tout = new PrintWriter(System.out);\r\n\t\tsc = new StringTokenizer(\"\");\r\n\t\tn = nxtInt();\r\n\t\tm = nxtInt();\r\n\t\tc0 = nxtInt();\r\n\t\td0 = nxtInt();\r\n\t\ta = new int[m];\r\n\t\tb = new int[m];\r\n\t\tc = new int[m];\r\n\t\td = new int[m];\r\n\t\tdp = new long[m+2][101][n+1];\r\n\t\tfor(long[][]ar:dp)\r\n\t\t\tfor(long[]arr:ar)\r\n\t\t\t\tArrays.fill(arr, -1);\r\n\t\tint i = 0;\r\n\t\twhile(i < m){\r\n\t\t\ta[i]= nxtInt();\r\n\t\t\tb[i]= nxtInt();\r\n\t\t\tc[i]= nxtInt();\r\n\t\t\td[i]= nxtInt();\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tSystem.out.println(maxVal(0, n, a[0]));\r\n\r\n\t}", "public static void main(String[] args) {\n List<Integer> pr = new ArrayList<>();\n out:\n for (int p = 2; p <= 100; p++) {\n for (int q : pr) {\n if (p % q == 0) {\n continue out;\n }\n }\n pr.add(p);\n }\n Set<List<Integer>> s = new HashSet<>();\n for (int a = 2; a <= 100; a++) {\n List<Integer> l = new ArrayList<>();\n for (int p : pr) {\n int e = 0;\n for (int c = a; c % p == 0; c /= p) {\n e++;\n }\n l.add(e);\n }\n for (int b = 2; b <= 100; b++) {\n List<Integer> m = new ArrayList<>();\n for (int e : l) {\n m.add(b * e);\n }\n s.add(m);\n }\n }\n System.out.println(s.size());\n }", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\r\n\t\twhile(in.hasNext()){\r\n\t\t\tint n = in.nextInt();\r\n\t\t\tint[] A = new int[n];\r\n\t\t\tfor(int i=0;i<n;i++){\r\n\t\t\t\tA[i] = in.nextInt();\r\n\t\t\t}\r\n\t\t\tint[] leftSmall = leftSmall(A);\r\n\t\t\tint[] rightBig = rightBig(A);\r\n//\t\t\tSystem.out.println(Arrays.toString(leftSmall));\r\n//\t\t\tSystem.out.println(Arrays.toString(rightBig));\r\n\t\t\tint small = Integer.MAX_VALUE;\r\n\t\t\tfor(int i=0;i<n;i++){\r\n\t\t\t\tint s = leftSmall[i] + rightBig[i] -1;\r\n\t\t\t\tsmall = Math.min(small, n-s);\r\n\t\t\t}\r\n\t\t\tSystem.out.println(small);\r\n\t\t}\r\n\t}", "static long getIdealNumber (long low,long high) {\n\n int exp3_Max= exp(3,high);\n int exp5_Max= exp(5,high);\n\n System.out.printf(\"Max exp3 (3^exp3_max) = %d , Max exp5(5^exp5_Max) = %d\" , exp3_Max , exp5_Max );\n System.out.println(\" \");\n\n\n int idealCounter=0;\n\n long n3=1L;\n\n\n for (int i=0;i<=exp3_Max;i++) {\n\n long n5=1l;\n \n for (int j=0;j<=exp5_Max;j++) {\n\n long num = n3*n5;\n System.out.printf(\"3^%d * 5^%d = %d%n\", i, j, num);\n\n if (num>high) {\n break ;\n }\n if (num>=low) {\n System.out.println(\"---> \" + num);\n idealCounter++;\n }\n n5*=5;\n\n }\n n3*=3;\n }\n\n return idealCounter;\n\n\n\n }", "private static int[] enumerate(String in, int min, int max) {\n List<Integer> result = new ArrayList<Integer>();\n \n // a, b, c\n StringTokenizer tok = new StringTokenizer(in.trim(), \",\");\n while (tok.hasMoreTokens()) {\n \n String str = tok.nextToken().trim();\n int stepsize = 1;\n int start = min;\n int end = max;\n \n // Extract the step size, */2 or 7-10/2\n int stepdivider = str.indexOf('/');\n if (stepdivider > 0) {\n try {\n stepsize = Integer.parseInt(str.substring(stepdivider + 1));\n if (!\"*\".equals(str.substring(0, str.indexOf('/'))))\n throw new IllegalArgumentException(\"Malformed stepsize expression '\" + str + \"', first argument should be *\");\n for (int i = 0; i < max; i++) {\n if (i % stepsize == 0)\n result.add(i);\n }\n return toIntArray(result);\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Illegal stepsize in '\" + str + \"'\");\n }\n }\n \n // *, 7-12, 13\n int hyphen = str.indexOf('-');\n if (str.startsWith(\"*\")) {\n return new int[] {};\n } else if (hyphen > 0) {\n try {\n start = Integer.parseInt(toNumber(str.substring(0, hyphen)));\n end = Integer.parseInt(toNumber(str.substring(hyphen + 1)));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid interval in '\" + str + \"'\");\n }\n } else {\n try {\n start = end = Integer.parseInt(toNumber(str));\n } catch (NumberFormatException e) {\n throw new IllegalArgumentException(\"Invalid number: '\" + str + \"'\");\n }\n }\n \n // Check for minimum / maximum\n if (start < min)\n throw new IllegalArgumentException(\"Value \" + start + \" in '\" + in + \"' is smaller than the minimum of \" + min);\n if (end > max)\n throw new IllegalArgumentException(\"Value \" + end + \" in '\" + in + \"' is larger than the maximum of \" + min);\n \n // Return the result\n for (int i = start; i <= end; i += stepsize) {\n result.add(new Integer(i));\n }\n \n }\n return toIntArray(result);\n }", "public static void main(String[] args) {\n\t\t\n\t\t int m= 9, n= 1,x=0 ;\n\t\t \n\t\t while (m>n) {\n\t\t\t m--;\n\t\t\t n+=2;\n\t\t\t x+=m+n;\n\t\t\t \n\t\t\t \n\t\t\t \n\t\t\t \n\t\t }\n\t\t System.out.println(x);\n\t\t \n\t\t \n\t\t \n\t\t // a) 11\n\t \t// b) 13\n //c) 23\n //d) 36\n //e) 50\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tString data = \"\\r\\n\" + \n\t\t\t\t\"3\\r\\n\" + \n\t\t\t\t\"5 2\\r\\n\" + \n\t\t\t\t\"13 32\\r\\n\" + \n\t\t\t\t\"100 1000\";\n\t\t\n\t\tScanner sc = new Scanner(data);\n\t\t\n\t\tint T = sc.nextInt();\n\t\tfor(int test_case = 1; test_case<=T; ++test_case) {\n\t\t\tint minji = sc.nextInt();\n\t\t\tint treasure = sc.nextInt();\n\t\t\tint answer = 0;\n\t\t\t\n\t\t\tint start = (minji<=treasure)? minji : treasure;\n\t\t\tint target = (minji>treasure)? minji : treasure;\n\t\t\t\n\t\t\tint line = 1;\n\t\t\tint left = 1;\n\t\t\tint right =1;\n\t\t\t\n\t\t\tint startLine = 0;\n\t\t\tint targetLine = 0;\n\t\t\t\n\t\t\twhile(startLine == 0 || targetLine == 0) {\n\t\t\t\tif(left <= start && right>= start) \n\t\t\t\t\tstartLine = line;\n\t\t\t\t\n\t\t\t\tif(left <= target && right>= target) {\n\t\t\t\t\ttargetLine = line;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tleft += line;\n\t\t\t\tright += (line + 1);\n\t\t\t\t\n\t\t\t\t++line;\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(startLine + \" \" + targetLine);\n\t\t\t\n\t\t\tleft = start;\n\t\t\tright = start;\n\t\t\tline = startLine;\n\t\t\t\n\t\t\twhile(answer == 0) {\n\t\t\t\tif(targetLine == line) {\n\t\t\t\t\tif(left<=target && right>=target) {\n\t\t\t\t\t\tanswer = targetLine - startLine;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tanswer = targetLine - startLine + Math.min(Math.abs(target - left),Math.abs(right - target));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//System.out.println(left);\n\t\t\t\t\n\t\t\t\tleft += line;\n\t\t\t\tright += (line + 1);\n\t\t\t\t\n\t\t\t\t++line;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"#\" + test_case + \" \" + answer);\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\t\n\t int a, b;\n\t int arr[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 };\n\t int range[][]={{3,7}, {4,6}, {5,5}};\n\n\t for (int i = 0; i < range.length; i++){\n\t \t\n\t \ta = range[i][0];\n\t \tb = range[i][1];\n\n\t\t\tfor(int j = 0; j < (b-a)/2; j++){\n\t\t\t\tint temp = arr[a-1+j];\n\t\t\t\tarr[a-1+j] =arr[b-1-j]; \n\t\t\t\tarr[b-1-j] = temp;\n\t\t\t}\n\t }\n\n\t\tSystem.out.print (\"결과 : \"+\"[ \");\n\t\t\n\t\tfor(int i=0; i<arr.length ; i++ ) {\n\t\t\tSystem.out.print (arr[i] + \" \" );\n\n\t\t}\n\t\tSystem.out.print (\"]\");\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int T = scanner.nextInt();\n assert T >=1;\n assert T<=100000;\n long []numArr = new long[T];\n for(int i=0; i<T; i++) {\n numArr[i] = scanner.nextLong ();\n assert numArr[i]>=1;\n assert numArr[i]<=1000000000;\n }\n\n for (long num : numArr) {\n int i=1;\n long sum=0;\n while(i*3<num) {\n sum +=i*3;\n if(i*5<num && i%3!=0)\n sum +=i*5;\n i++;\n }\n System.out.println(sum);\n }\n }", "public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); \n int t = Integer.parseInt(br.readLine());\n for(int i=0;i<t;i++){\n int n = Integer.parseInt(br.readLine());\n int[][] arr = new int[n][n];\n for(int j=0;j<n;j++){\n arr[j] = Arrays.stream(br.readLine().split(\" \")).mapToInt(Integer::parseInt).toArray();\n }\n int r = Integer.parseInt(br.readLine());\n int x=-1, y=-1;\n for(int p=0;p<n;p++){\n for(int q=0;q<n;q++){\n if(group(p,q, arr, n)==r){\n x = p;\n y = q;\n }\n }\n }\n System.out.println(x+\" \"+y);\n }\n\t}", "public static void main(String[] args) {\n int T = 10;\n Scanner scan = new Scanner(System.in);\n for(int t = 1; t <= T; t++) {\n int dumpCount = scan.nextInt();\n scan.nextLine();\n String line = scan.nextLine();\n StringTokenizer st = new StringTokenizer(line, \" \");\n \n int[] numbers = new int[st.countTokens()];\n int tempi = 0;\n while(st.hasMoreTokens()) {\n numbers[tempi] = Integer.parseInt(st.nextToken());\n tempi++;\n }\n \n for(int i = 0; i < dumpCount; i++) {\n int maxPivot = findMax(numbers);\n int minPivot = findMin(numbers);\n numbers[maxPivot] -= 1;\n numbers[minPivot] += 1;\n }\n \n int result = numbers[findMax(numbers)] - numbers[findMin(numbers)];\n System.out.println(\"#\" + t + \" \" + result);\n }\n scan.close();\n }", "public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint N = Integer.parseInt(br.readLine());\n\n\t\tint ar[] = new int[N];\n\n\t\tArrayList<Integer> as[] = new ArrayList[N];\n\t\t\n\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\n\t\tar[0] = Integer.parseInt(st.nextToken());\n\t\tint max = ar[0];\n\t\tas[0] = new ArrayList<Integer>();\n\n\t\tArrayList<Integer> m=new ArrayList<Integer>();\n\t\t\n\t\tint cntMax=0,cntMaxLone=0;\n\t\t\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tar[i] = Integer.parseInt(st.nextToken());\n\t\t\t\n\t\t\tmax=Math.max(ar[i],max);\n\t\t\t\n\t\t\tas[i] = new ArrayList<Integer>();\n\t\t}\n\t\t\n\t\t\n\t\tint u, v;\n\n\t\tfor (int i = 0; i < N - 1; i++) {\n\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\tu = Integer.parseInt(st.nextToken()) - 1;\n\t\t\tv = Integer.parseInt(st.nextToken()) - 1;\n\n\t\t\tas[u].add(v);\n\t\t\tas[v].add(u);\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tfor(int j=0;j<N;j++){\n\t\t\tif(ar[j]==max){\n\t\t\t\tcntMax++;\n\t\t\t}else if(ar[j]==max-1){\n\t\t\t\tcntMaxLone++;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint ans=max+2;\n\t\t\n\t\tfor(int i=0;i<N;i++){\n\t\t\tint x=cntMax,y=cntMaxLone;\n\t\t\tif(ar[i]==max){\n\t\t\t\tx--;\n\t\t\t}else if(ar[i]==max-1){\n\t\t\t\ty--;\n\t\t\t}\n\t\t\tfor(Integer j:as[i]){\n\t\t\t\tif(ar[j]==max){\n\t\t\t\t\tx--;\n\t\t\t\t\ty++;\n\t\t\t\t}else if(ar[j]==max-1){\n\t\t\t\t\ty--;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x==0){\n\t\t\t\tans=Math.min(ans, max+1);\n\t\t\t\tif(y==0){\n\t\t\t\t\tans=Math.min(ans, max);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(ans);\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tScanner get = new Scanner(System.in);\r\n\t\t\r\n\t\t//---------------------------------- 1 -----------------------------\r\n\t\t/*\r\n\t\tint n=5;\r\n\t\tint num[] =new int[n];\r\n\t\tfloat avg=0,sum=0,max=0,mini=0;\r\n\t\t\r\n\t\t\r\n\t\tfor(int i=0;i<n;i++) {\r\n\t\t\tSystem.out.format(\"Enter your number[%d] :\",i+1);\r\n\t\t\tnum[i] = get.nextInt();\r\n\t\t\tsum += num[i];\r\n\t\t\tif(i==0) {\r\n\t\t\t\tmax=num[i];\r\n\t\t\t\tmini=num[i];\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tif(num[i]>max) {\r\n\t\t\t\t\tmax = num[i];\r\n\t\t\t\t}\r\n\t\t\t\tif(num[i]<mini) {\r\n\t\t\t\t\tmini = num[i];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tavg = sum/n;\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\\naverang of number = \" + avg);\r\n\t\tSystem.out.println(\"maximum of number = \" + max);\r\n\t\tSystem.out.println(\"minimum of number = \" + mini);\r\n\t\tSystem.out.println(\"sum of number = \" + sum);\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//------------------------------------- 2 -------------------------------------------\r\n\t\t/*\r\n\t\tint a[]= {1,2,3,4,5,6,7},b[]= {8,9,10,11,12,13,14},ab[]=new int[a.length+b.length];\r\n\t\tint i=0;\r\n\t\t\r\n\t\tfor(i=i;i<a.length;i++) {\r\n\t\t\tab[i]=a[i];\r\n\t\t}\r\n\t\tfor(i=a.length;i<a.length+b.length;i++) {\r\n\t\t\tab[i]=b[i-a.length];\r\n\t\t}\r\n\t\tSystem.out.println(\"number of ab[] = \"+(a.length+b.length));\r\n\t\tfor(i=0;i<a.length+b.length;i++) {\r\n\t\t\tSystem.out.print(ab[i]+\"\\t\");\r\n\t\t\tif((i+1)%3==0)\r\n\t\t\t{\r\n\t\t\t\tSystem.out.print(\"\\n\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t*/\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//-------------------------------- 3 ---------------------------------\r\n\t\t\r\n\t\tint i,j;\r\n\t\tchar start='a',alphabet[] = new char [26];\r\n\t\t\r\n\t\tfor(int k=0;;k++) {\r\n\t\t\tSystem.out.print(\"Pleas enter your number : \");\r\n\t\t\tj = get.nextInt();\r\n\t\t\tif(j>0 && j<=26) {\r\n\t\t\t\tfor(i=0;i<j;i++) {\r\n\t\t\t\t\talphabet[i]=start;\r\n\t\t\t\t\tSystem.out.format(\"%c \\n\",alphabet[i]);\r\n\t\t\t\t\tstart++;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//----------------------------- 4 ------------------------------\r\n\t\t/*\r\n\t\tint num,i;\r\n\t\tSystem.out.print(\"How number to calculate :\");\r\n\t\tnum = get.nextInt();\r\n\t\tfloat in[]=new float[num],out[]=new float[num],sum = 0,sqr=0;\r\n\t\t\r\n\t\tfor(i=0;i<num;i++){\r\n\t\t\tSystem.out.format(\"number [%d]:\",i+1);\r\n\t\t\tin[i]=get.nextFloat();\r\n\t\t\t\r\n\t\t}\r\n\t\tfor(i=0;i<num;i++) {\r\n\t\t\tsum+=Math.pow(in[i], 2);\r\n\t\t}\r\n\t\t\r\n\t\tsqr=(float) Math.sqrt(sum);\r\n\t\t\r\n\t\tSystem.out.println(\"\\n\");\r\n\t\tfor(i=0;i<num;i++)\r\n\t\t{\r\n\t\t\tout[i]=in[i]/sqr;\r\n\t\t\tSystem.out.format(\"out[%d] : %.6f\\n\",i,out[i]);\r\n\t\t}\r\n\t\t\r\n\t\t*/\r\n\t\t\r\n\t}", "public static void main(String[] args) throws Exception {\n\t\tScanner scn = new Scanner(System.in);\r\n\t\tint tc = scn.nextInt();\r\n\t\tfor(int t=1; t<=tc; t++) {\r\n\t\t\tint n = scn.nextInt();\r\n\t\t\tint k = scn.nextInt();\r\n\t\t\tString str = scn.next();\r\n\t\t\tString arr[] = new String[n];\r\n\t\t\tarr = str.split(\"\");\r\n\t\t\tLinkedList<String> list = new LinkedList<>();\r\n\t\t\tLinkedList<Integer> result = new LinkedList<>();\r\n\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\tlist.add(arr[i]);\r\n\t\t\t}\r\n\t\t\tint comeback = 0;\r\n\t\t\twhile(comeback<4) {\r\n\t\t\t\tint cnt = 0;\r\n\t\t\t\tcomeback = 0;\r\n\t\t\t\tString st = \"\";\r\n\t\t\t\tfor(int i=0; i<n; i++) {\r\n\t\t\t\t\tif(cnt==(n/4)-1) {\r\n\t\t\t\t\t\tcnt = 0;\r\n\t\t\t\t\t\tst += list.get(i);\r\n\t\t\t\t\t\tint tmp = Integer.parseInt(st, 16);\r\n\t\t\t\t\t\tif(!isHave(result,tmp) && (result.size()>0)) {\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse if(result.size() == 0){\r\n\t\t\t\t\t\t\tresult.add(tmp);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tcomeback++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tst = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tst+= list.get(i);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\trotate(list);\r\n\t\t\t}\r\n\t\t\tCollections.sort(result);\r\n\t\t\tint cnt = 0;\r\n\t\t\tSystem.out.println(\"#\"+t+\" \"+result.get(result.size()-k));\t\t\t\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint N = in.nextInt();\n\t\tint p = in.nextInt();\n\t\tArrayList<Integer> num = new ArrayList<Integer>();\n\t\tint max =N;\n\t\tint min =N;\n\t\tint length = 0;\n\t\tfor(int i=0;i<N;i++){\n\t\t\tnum.add(in.nextInt());\n\t\t}\n\t\tCollections.sort(num);\n\t\tfor(int i=num.size()-1;i>=0;i--){\n\t\t\tfor(int j=min-1;j>=0;j--){\n\t\t\t\tif(num.get(i)<num.get(j)*p){\n\t\t\t\t\tmax = i;\n\t\t\t\t\tmin = j;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(length<(max-min+1))\n\t\t\t{\n\t\t\t\tlength = max-min+1;\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tSystem.out.println(length);\n\t\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint total = sc.nextInt();\n\t\tint lastAns = 0;\n\t\tList<List<Integer>> list = new ArrayList();\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tlist.add(new ArrayList());\n\t\t}\n\t\tfor (int i = 0; i < total; i++) {\n\t\t\tint q = sc.nextInt();\n\t\t\tint x = sc.nextInt();\n\t\t\tint y = sc.nextInt();\n\t\t\tint seq = (x ^ lastAns) % N;\n\t\t\tList<Integer> seqList = list.get(seq);\n\t\t\t\n\t\t\tswitch (q) {\n\t\t\t\tcase 1:\n\t\t\t\t\tseqList.add(y);\n\t\t\t\t\tlist.set(seq, seqList);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tlastAns = seqList.get(y % seqList.size());\n\t\t\t\t\tSystem.out.println(lastAns);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\t int a = 0;\n\t\t a=scan.nextInt();\n\t\t int [] arr=new int[a+1];\n\t\t arr[1]=arr[2]=1;\n\t\t for(int i=3;i<arr.length;i++){\n\t\t arr[i]=(arr[i-1]+arr[i-2])%10007;//对每一个斐波那契数列进行取余数\n\t\t }\n\t\t System.out.println(arr[a]);\n\t\t }", "public static void main(String[] args) throws Exception {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n int t = Integer.parseInt(in.readLine());int j=0,k=0; int res1=0, res2=0; \n for(int p=0;p<t;p++){\n int m = Integer.parseInt(in.readLine());\n int n = Integer.parseInt(in.readLine());\n String[] str=in.readLine().split(\" \");\n int[] num = new int[n];\n for(int i=0;i<n;i++){\n num[i] = Integer.parseInt(str[i]);\n }\n for(j=0;j<n;j++){\n for(k=j+1;k<n;k++){\n \tint tmp = num[j]+num[k];\n if(m==tmp){res1=j+1;res2=k+1; break;}\n }\n }\n System.out.println(res1+\" \"+res2);\n j=0;k=0;\n }\n }", "public static void main(String[] args) throws Exception {\n int arr[]= {7,9,88,-33,2,12,6,1};\n Arrays.sort(arr);\n /*for(int i=0; i<arr.length; i++)\n \t System.out.print(arr[i]+\", \");\n System.out.println(\"\\n DESC\");\n System.out.print(\"{ \");\n for(int i=arr.length-1; i>=0; i--) {\n \t if(arr[i]==arr[0])\n \t System.out.print(arr[i]);\n \t else \n \t\t System.out.print(arr[i]+\", \");\n }*/\n // System.out.print(\" }\");\n \n int[] ar= {6,2,2,5,2,2,1};\n int startIndex=0;\n int lastIndex=ar.length-1;\n //a is sumRight,b = sumLeft\n int a=0,b=0;\n /* while(true) {\n \t \n \t if(b>a) \n \t\t //1+2+2=+5\n \t\t a+=ar[lastIndex--];\n \t else \n \t\t //6+2+2\n \t\t\t b+=ar[startIndex++];\n \t\tif(startIndex>lastIndex) {\n \t\t\tSystem.out.println(startIndex);\n \t\t\tif(a==b)\n \t\t\t\tbreak;\n \t\t\t else\n \t\t\t throw new Exception(\"not a valid array\");\n \t\t\t\n \t\t}\n \t\t\t \n \t\t\n }\n System.out.println(lastIndex);\n */\n \n \n while(true) {\n \t \n \t if(b>a)\n \t\t a+= ar[lastIndex--];\n \t else\n b+=ar[startIndex++];\n \t if(startIndex>lastIndex) {\n \t\t if(a==b)\n \t\t\t break;\n \t }\n }\n System.out.println(lastIndex);\n\t}", "@Override\n public String solve() {\n int LIMIT = 50 * NumericHelper.ONE_MILLION_INT;\n int[] nCount = new int[LIMIT+1];\n for(long y = 1; y<= LIMIT; y++) {\n for(long d= (y+3)/4; d<y; d++) { // +3 is to make d atleast 1\n long xSq = (y+d) * (y+d);\n long ySq = y * y;\n long zSq = (y-d) * (y-d);\n\n long n = xSq - ySq - zSq;\n\n if(n<0) {\n continue;\n }\n\n if(n>=LIMIT) {\n break;\n }\n\n\n nCount[(int)n]++;\n\n }\n }\n\n int ans = 0;\n for(int i = 1; i<LIMIT; i++) {\n if(nCount[i] == 1) {\n //System.out.print(i +\",\");\n ans++;\n }\n }\n\n return Integer.toString(ans);\n }", "public static void getLeastNumbers_2(int[] input, int[] output) {\n int start = 0;\n int end = input.length - 1;\n int k = output.length;\n int index = partition(input, start, end);\n while(index != k - 1) {\n if(index > k - 1) {\n end = index - 1;\n index = partition(input, start, end);\n }\n else {\n start = index + 1;\n index = partition(input, start, end);\n }\n }\n \n for(int i = 0; i < k; ++i)\n output[i] = input[i];\n }", "public static void main(String[] args) {\n int N = 100, i, j, min;\n System.out.println(\"Value of N: \" + N);\n\n for (i = 1; i <= N; i++)\n {\n for (j = 1; j <= N; j++)\n {\n min = i < j ? i : j;\n System.out.print(N - min + 1);\n }\n System.out.println();\n\n\n\n\n }\n}", "public static void main(String[] args) {\n\n\t\tint a = 10000;\n\t\tint num = 325489;\n\t\tint [][] lst = new int[a][a];\n\t\tint x = a/4, y = a/4;\n\t\tfinal int x0 = x,y0 = y;\n\t\tint layer = 0,cnt =1;\n\t\twhile (cnt <= num)\n\t\t{\n\t\t\tif (cnt == (2*layer+1)*(2*layer+1))\n\t\t\t{\n\t\t\t\tlst[x][y] = cnt;\n\t\t\t\ty++;\n\t\t\t\tlayer++;\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t\tfor (int j = 0 ; j < layer*2-1;j++)\n\t\t\t{\n\t\t\t\tlst[x][y] = cnt;\n\t\t\t\tx++;\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t\tfor (int j = 0 ; j < layer * 2;j++)\n\t\t\t{\n\t\t\t\tlst[x][y] = cnt;\n\t\t\t\ty--;\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t\tfor (int j = 0 ; j < layer * 2;j++)\n\t\t\t{\n\t\t\t\tlst[x][y] = cnt;\n\t\t\t\tx--;\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t\tfor (int j = 0 ; j < layer * 2;j++)\n\t\t\t{\n\t\t\t\tlst[x][y] = cnt;\n\t\t\t\ty++;\n\t\t\t\tcnt++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tint finalX = findx(lst,num);\n\t\tint finalY = findy(lst,num);\n\t\tSystem.out.println(Math.abs(finalY - y) + (finalX - x));\n\t}", "public static int Main()\n\t{\n\t\tint x;\n\t\tint y;\n\t\tint i;\n\t\tint j;\n\t\tx = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\ty = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tfor (i = 1;x / i > 0;i = i * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\tfor (j = 1;y / j > 0;j = j * 2)\n\t\t{\n\t\t;\n\t\t}\n\t\ti = i / 2;\n\t\tj = j / 2; //i,j????2?????\n\t\tif (i > j)\n\t\t{\n\t\t\tx = x * j / i;\n\t\t}\n\t\telse\n\t\t{\n\t\t\ty = y * i / j;\n\t\t}\n\t\twhile (x != y)\n\t\t{\n\t\t\tx = x / 2;\n\t\t\ty = y / 2;\n\t\t}\n\t\tSystem.out.print(x);\n\n\n\n\n\n\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner sc = new Scanner(System.in);\r\n\r\n\t\tint num = sc.nextInt();\r\n\t\tint snum[] = new int[4];\r\n\t\tint count = 0;\r\n\t\tint k1 = 0;\r\n\t\tint k2 = 0;\r\n\r\n\t\twhile (num != 6174) { // 반복\r\n\r\n\t\t\tcount++;\r\n\r\n\t\t\tsnum[0] = num / 1000; // 1000의자리수\r\n\t\t\tsnum[1] = (num - (snum[0] * 1000)) / 100; // 100의 자리수\r\n\t\t\tsnum[2] = (num - ((snum[0] * 1000) + (snum[1] * 100))) / 10; // 10의자리수\r\n\t\t\tsnum[3] = num % 10; // 1의자리수\r\n\r\n\t\t\tint temp;\r\n\t\t\tfor (int i = 0; i < snum.length; i++) {\r\n\t\t\t\tfor (int j = 0; j < snum.length; j++) {\r\n\t\t\t\t\ttemp = snum[i];\r\n\t\t\t\t\tif (snum[i] >= snum[j]) { // 큰수부터 정렬\r\n\t\t\t\t\t\tsnum[i] = snum[j];\r\n\t\t\t\t\t\tsnum[j] = temp;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tk1 = Integer.parseInt(Integer.toString(snum[0]) + snum[1] + snum[2] + snum[3]); // 큰\r\n\t\t\tk2 = Integer.parseInt(Integer.toString(snum[3]) + snum[2] + snum[1] + snum[0]); // 작은\r\n\r\n\t\t\tnum = k1 - k2; // 뺀\r\n\r\n\t\t}\r\n\t\tSystem.out.println(count);\r\n\t}", "public static void main(String[] args) {\n\t\tSystem.out.println(\"\"+(int)(Math.log(Integer.MAX_VALUE)/ Math.log(3)));\n//\t\tint[] arr = { 5, 3, 1, 2, 4 };\n\t\tint[] arr = ArrayUtils.buildIntArrayNoDup(6, 0,20);\n//\t\tint[] arr = ArrayUtils.generateIntArrayWithDup(6, 0,20);\n//\t\tint[] arr = { 3, 3, 7, 19, 16, 13 };\n\t\tprint(arr);\n\t\tSystem.out.println(\"\" + toStr(findNextRighClosestGreaterDis(arr)));\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tint N = sc.nextInt();\r\n\t\tint[] arr = new int[N+1];\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tarr[i] = sc.nextInt();\r\n\t\t}\r\n\r\n\t\tint num = sc.nextInt();\r\n\r\n\t\tfor (int i = 0; i < num; i++) {\r\n\t\t\tint s = sc.nextInt(); // 성별\r\n\t\t\tint n = sc.nextInt(); // 받은 수\r\n\r\n\t\t\tif (s == 1) { // 남자\r\n\t\t\t\tfor (int j = 1; j < arr.length; j++) {\r\n\t\t\t\t\tif (j % n == 0) { // 자기가 받은 수의 배수이면\r\n\t\t\t\t\t\tarr[j] = Math.abs(arr[j] - 1); // 스위치 상태 변경\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t} else { // 여자\r\n\t\t\t\tarr[n] = Math.abs(arr[n] - 1); // 스위치 상태 변경\r\n\t\t\t\tint left = n - 1;\r\n\t\t\t\tint right = n + 1;\r\n\t\t\t\twhile (true) {\r\n\t\t\t\t\tif (left <= 0 || right >= arr.length || arr[left] != arr[right])\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tarr[left] = Math.abs(arr[left] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tarr[right] = Math.abs(arr[right] - 1); // 스위치 상태 변경\r\n\t\t\t\t\tleft -= 1;\r\n\t\t\t\t\tright += 1;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tfor (int i = 1; i < arr.length; i++) {\r\n\t\t\tSystem.out.print(arr[i] + \" \");\r\n\t\t\tif(i % 20 == 0) {\r\n\t\t\t\tSystem.out.println();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException{\n BufferedReader f = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n int testcases = Integer.parseInt(f.readLine());\n f.readLine();\n for(int t = 0; t < testcases; t++) {\n if(t > 0) {\n out.println();\n }\n ArrayList<Integer> sequence = new ArrayList<>();\n ArrayList<Integer> pileTops = new ArrayList<>();\n ArrayList<Integer> currentLeftPileTopIndicies = new ArrayList<>();\n String input;\n while ((input = f.readLine()) != null && input.length() > 0) {\n int next = Integer.parseInt(input);\n int pileIndex = getPileIndex(sequence, pileTops, next);\n int leftPileIndex;\n if (pileIndex < 0) {\n leftPileIndex = pileTops.size() - 1;\n pileTops.add(sequence.size());\n } else {\n leftPileIndex = pileIndex - 1;\n pileTops.set(pileIndex, sequence.size());\n }\n sequence.add(next);\n currentLeftPileTopIndicies.add(leftPileIndex < 0 ? -1 : pileTops.get(leftPileIndex));\n }\n out.println(\"Max hits: \" + pileTops.size());\n int lastPileTop = pileTops.get(pileTops.size() - 1);\n ArrayList<Integer> subsequence = new ArrayList<>();\n while (lastPileTop >= 0) {\n subsequence.add(0, sequence.get(lastPileTop));\n lastPileTop = currentLeftPileTopIndicies.get(lastPileTop);\n }\n for (int i : subsequence) {\n out.println(i);\n }\n }\n f.close();\n out.close();\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 static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int sum = sc.nextInt();\n int N = sc.nextInt();\n sc.nextLine();\n int [][] arr = new int[N][2];\n for(int i = 0;i<N;i++)\n {\n arr[i][0] = sc.nextInt();\n arr[i][1] = sc.nextInt();\n sc.nextLine();\n }\n //Arrays.sort(arr, new Comparator<int[]>() {\n // @Override\n // public int compare(int[] o1, int[] o2) {\n // return o1[1]-o2[1]; //按第二列价值排个序。\n // }\n //});\n int [][] dp = new int[N+1][sum+1];\n int [][] path = new int[N+1][sum+1];\n for(int i = 1;i<=N;i++)\n {\n for(int j = 1;j<=sum;j++)\n {\n if(j<arr[i-1][0])\n dp[i][j] = dp[i-1][j];\n else\n {\n if(dp[i-1][j]<dp[i-1][j-arr[i-1][0]]+arr[i-1][1])\n path[i][j] = 1;\n dp[i][j] = Math.max(dp[i-1][j],dp[i-1][j-arr[i-1][0]]+arr[i-1][1]);\n }\n }\n }\n System.out.println(dp[N][sum]);\n\n int i = N;\n int j = sum;\n while (i>0&&j>0)\n {\n if(path[i][j]==1)\n {\n System.out.print(1+\" \");\n j -=arr[i-1][0];\n }\n else\n {\n i--;\n System.out.print(0+\" \");\n }\n }\n\n\n // 改进版。只使用一维数组。\n // int [] f = new int[sum+1];\n // for(int i = 0;i<N;i++)\n // {\n // for (int j = sum;j>=0;j--)\n // {\n // if(j>=arr[i][0])\n // f[j] = Math.max(f[j], f[j-arr[i][0]]+arr[i][1]);\n // }\n // }\n // System.out.println(f[sum]);\n\n }", "public static int calculate()\n {\n final List<Integer> oneToNine = IntStream.iterate(1, n -> n + 1)\n .limit(9)\n .boxed()\n .collect(toList());\n final List<List<Integer>> permutations = HeapPermutations.of(oneToNine);\n\n // System.out.println(permutations.size());\n //2- for each permutation\n // a. find all breaking 2 points to break\n // b. check first two sections' third is equal to the last section\n // c. if yes, add combintion to result, otherwise skip\n\n return permutations.stream()\n .flatMap(toTriples()) //find all combinations xx X yy = zz\n .filter(isPandigital()) // allow pandigital tripes through\n .map(Triple::getThird) // get the product\n .distinct() // get distinct products only given the problem statement does not allow repetition (see hint)\n .mapToInt(i -> i) // convert to primitive\n .sum(); // and finally get the sum\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.1 ===============\\n\");\n\t\t/*\n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\tX O X O X O X \n\t\tO X O X O X O \n\t\t*/\n\t\t// Pattern1 Start\n\t\tint size = 7;\n\t\n\t\tfor (int j=0;j<size;j++) {\n\t\t\tfor (int i=0;i<size;i++) {\n\t\t\t\tif((i+j)%2==0) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(\"O \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"X \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\t\n\t\t// Pattern1 End\n\t\tSystem.out.println(\"\\n============== Prog.2 ===============\\n\");\n\t\t/*\n\t\t* * * * * * * * * \n\t\t* * * * * * * \n\t\t * * * * * * \n\t\t * * * * * \n\t\t * * * * \n\t\t * * * \n\t\t * * * \n\t\t * * \n\t\t * \n\t\t * \n\t\t *\n\t\t * */\n\t\t// Pattern 2 Start\n\t\tint maxNum;\n\t\tint arr[] = {8,2,4,1,13,7,5,3};\n\t\tSystem.out.print(\"Length of array: \"+arr.length+\"\\nValues in Array:\");\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tSystem.out.println(\"\\n\");\n\t\t\n\t\tfor (int i=0;i<arr.length-1;i++) {\n\t\t\tif (arr[i]>arr[i+1]) {\n\t\t\t\tint tmp=arr[i+1]; // small value in tmp\n\t\t\t\tarr[i+1]=arr[i]; // large value\n\t\t\t\tarr[i]=tmp;\n\t\t\t}\n\t\t}\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tSystem.out.print(arr[i]+\" \");\n\t\t}\n\t\tmaxNum=Array.getInt(arr, arr.length-1);\n\t\tSystem.out.print(\"\\nMax number in array: \"+maxNum+\"\\n\\n\");\n\t\t\n\t\t\n\t\tfor (int j=0;j<maxNum;j++) {\n\t\t\tfor (int i=0;i<arr.length;i++) {\n\t\t\t\tif (j>=arr[i]) {\n\t\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t}else {\n\t\t\t\t\tSystem.out.print(\"* \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.print(\"\\n\");\n\t\t}\n\t\t// Pattern 2 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.3 ===============\\n\");\n\t\t\n\t\t// Pattern 3 Start\n\t\t\n\t\t// Find missing value without using sorting\n\t\tint arr2[] = {4,5,10,2,9,3,1,11,6,8};\n\t\tint total=0;\n\t\tfor (int i=0;i<arr2.length;i++) {\n\t\t\ttotal=total+arr2[i];\n\t\t}\n\t\tSystem.out.print(\"Array size: \"+arr2.length+\" & Array sum is: \"+total);\n\t\t\n\t\t// Pattern 3 End\n\t\tSystem.out.println(\"\\n============== Prog.4 ===============\\n\");\n\t\t// Pattern 4 Start\n\t\t/*\n\t\t *\n\t\t **\n\t\t ***\n\t\t ****\n\t\t ******\n\t\t * */\n\t\tint range=5;\n\t\tfor (int i=0;i<range;i++) {\n\t\t\tfor (int j=0;j<=i;j++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 4 End\n\t\tSystem.out.println(\"\\n============== Prog.5 ===============\\n\");\n\t\t// Pattern 5 Start\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * *\n\t\t * * * * *\n\t\t * */\n\t\tint prog5Length=5;\n\t\tfor (int i=1;i<=prog5Length;i++) {\n\t\t\tfor (int j=4;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" *\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t\t\n\t\t// Pattern 5 End\n\t\tSystem.out.println(\"\\n============== Prog.6 ===============\\n\");\n\t\t/*\n\t\t *\n\t\t * *\n\t\t * * *\n\t\t * * * * \n\t\t* * * * *\n\t\t * * * *\n\t\t * * *\n\t\t * *\n\t\t * \n\t\t * */\n\t\t// Pattern 6 Start\n\t\tint prog6Size=15;\n\t\tfor(int i=1;i<=prog6Size/2;i++) {\n\t\t\tfor(int j=(prog6Size/2)-1;j>=i;j--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=1;k<=i;k++) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\tfor(int i=1;i<=(prog6Size/2)-1;i++) {\n\t\t\tfor(int j=1;j<=i;j++) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}\n\t\t\tfor(int k=(prog6Size/2)-1;k>=i;k--) {\n\t\t\t\tSystem.out.print(\"* \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\t\n\t\t}\n\t\t// Pattern 6 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.7 ===============\\n\");\n\t\t/*\n\t\t * Print integer line using 2D array, Ex.\n\t\t * 1\n\t\t * 2\n\t\t * 3\n\t\t * 4\n\t\t * 5\n\t\t * */\n\t\t// Pattern 7 Start\n\t\tint row=5,col=1;\n\t\tint[][] my2DArray=new int[row][col];\n\t\tmy2DArray[0][0]=1;\n\t\tmy2DArray[1][0]=2;\n\t\tmy2DArray[2][0]=3;\n\t\tmy2DArray[3][0]=4;\n\t\tmy2DArray[4][0]=5;\n\t\tfor(int i=0;i<row;i++) {\n\t\t\tSystem.out.println(my2DArray[i][0]);\n\t\t}\n\t\t// Pattern 7 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.8 ===============\\n\");\n\t\t/*\n\t\t *\n *\n *\n *\n *\n\t\t* */\n\t\t// Pattern 8 Start\n\t\tint prog8Size=5;\n\t\tfor (int m=1;m<=prog8Size;m++) {\n\t\t\tfor (int i=prog8Size-1;i>m-1;i--) {\n\t\t\t\tSystem.out.print(\" \");\n\t\t\t}System.out.print(\" *\\n\");\n\t\t}\n\t\t// Pattern 8 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.9 ===============\\n\");\n\t\t// Pattern 9 Start\n\t\t\n\t\t// Pattern 9 End\n\t\t\n\t\tSystem.out.println(\"\\n============== Prog.10 ===============\\n\");\n\t\t// Pattern 10 Start\n\t\t\n\t\t// Pattern 10 End\n\t\t\n\t}", "public static void main(String[] args) {\n\t\tint[] a = { -2, -3, 4, -1, -2, 1, 5, -3 }; \n\t\t int size = a.length; \n\t int max_so_far = Integer.MIN_VALUE, max_ending_here=0;\n\t for (int i = 0; i < size; i++) { \n\t max_ending_here = max_ending_here + a[i]; \n\t if (max_so_far < max_ending_here) \n\t max_so_far = max_ending_here; \n\t if (max_ending_here < 0) \n\t max_ending_here = 0; \n\t } \n\t // System.out.println(max_so_far);\n\t int product=1,max=0;\n\t for (int i = 0; i < size; i++) {\n\t \t\n\t \tproduct=product*a[i];\n\t \tif(product>max)\n\t \t\tmax=product;\n\t \t if (product < 0) \n\t \t\t product = 1; \n\t \t\n\t }\n\t // System.out.println(max);\n\t \n\t Arrays.sort(a);\n\t int i=0,j=a.length-1;\n\t while(i<a.length &&j<a.length)\n\t {\n\t \t if(a[i]+a[j]==3)\n\t \t {\n\t \t\t System.out.println(a[i]+\" \"+a[j]);\n\t \t\t i++;j--;\n\t \t }\n\t \t else if(a[i]+a[j]>3)\n\t \t\t j--;\n\t \t else if(a[i]+a[j]<3)\n\t \t\t i++;\n\t }\n\t \n\t \n\t }", "public static void main(String[] args) {\n int[][] bn = new int[127][];\n \n for(int i = 1; i <128; i++)\n {\n int m = (int) (Math.log10(i)/Math.log10(2));\n \n int l = i, j = 2*m; int[] b = new int[2*m+1]; \n \n while(l >= 1)\n {\n int k = l;\n l = l/2;\n \n b[j] = k - l*2; j--;\n }\n \n bn[i-1] = b;\n }\n \n /*int[] ds = new int[255*255*8];*/ int[] df = new int[14]; Arrays.fill(df, 0);\n //int l = 0;\n \n for(int i = 0; i <127; i++)\n {\n for(int j = 0; j<127; j++)\n {\n int k, d = 0;\n for(k = 0; k < bn[i].length; k++)\n { \n if(bn[i][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n for(k = 0; k < bn[j].length; k++)\n {\n if(bn[j][k] == 0)\n {\n d++;\n }\n else if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n \n if(d > 0)\n {\n //System.out.print(d+\",\");\n df[d-1]++; d = 0;\n }\n }\n }\n double sum = sum(df); int[] numb = {1,3,3,5,5,5,5,7,7,7,7,7,7,7,7}; int tb = 0;\n \n for(int i = 0; i < 14; i++)\n {\n tb = tb + (int)((df[i]*100/sum) + 0.5)*numb[i];\n \n System.out.print((int)((df[i]*100/sum) + 0.5)+\",\");\n }\n System.out.println();\n System.out.println(tb);\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\r\n int m=sc.nextInt();\r\n int n=sc.nextInt();\r\n int l=sc.nextInt();\r\n int a[]=new int[(n-m+1)];\r\n int temp1=m;\r\n for(int i=0;i<n-m+1;i++){\r\n \ta[i]= temp1;\r\n \ttemp1++;\r\n }\r\n int b[]=new int[n-m+1];\r\n int temp=0;\r\n for(int i=0;i<n-m+1;i++)\r\n {\t\ttemp=a[i];\r\n \t while (temp != 0)\r\n \t {\r\n \t b[i] = b[i] * 10 + temp % 10;\r\n \t temp = temp / 10;\r\n \t }\r\n }\r\n \r\n long k=0,count=0;\r\n for(int i=0;i<n-m+1;i++){\r\n \tk=((Math.abs(a[i]-b[i]))%l);\r\n \tif(k==0){\r\n \t\tcount++;\r\n \t}\r\n \t\r\n\t}\r\nSystem.out.println(count);\r\n}", "public static int Main()\n\t{\n\tint[] b = new int[12];\n\tint w;\n\tint i;\n\tint[] a = {13, 44, 72, 103, 133, 164, 194, 225, 256, 286, 317, 347};\n\tString tempVar = ConsoleInput.scanfRead();\n\tif (tempVar != null)\n\t{\n\t\tw = Integer.parseInt(tempVar);\n\t}\n\tfor (i = 0;i < 12;i++)\n\t{\n\t\tb[i] = a[i] % 7 - 1;\n\t\tb[i] = (b[i] + w) % 7;\n\t}\n\tfor (i = 0;i < 12;i++)\n\t{\n\t\tif (b[i] == 5)\n\t\t{\n\t\t\tSystem.out.printf(\"%d\\n\",i + 1);\n\t\t}\n\t}\n\treturn 0;\n\t}", "public static int bigStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n int score = 0;\n\n if (noUniqVals >= 5) {\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[]{1, 2, 3, 4, 5});\n matchArrays.add(new int[]{2, 3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 4; i++) {\n resultSubArrays.add(Arrays.copyOfRange(uniqueValues, i, i + 5));\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 40;\n }\n\n }\n }\n }\n return score;\n }", "public static void main(String[] args) {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tdouble a=0;\r\n\t\t double b=2;\r\n\t\t\t double n=4;\r\n\t\t\t double s;\r\n\r\n\t\t\tfor(int i=0; i<=n-1;i++) {\r\n\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t s = a + Math.pow(2, i)*b;\r\n\t\t\t\t\t\r\n\t\t\t\t\tSystem.out.println(s);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor(int j=0;j<=n-1;j++)\r\n\t\t\t{\r\n\t\t\t\tint arr\r\n\t\t\t}\r\n\t\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tint[] arr= {6,9,5,7,4};\r\n\t\t//int[] arr= {3,9,9,3,5,7,2};\r\n\t\t//int[] arr= {1,5,3,6,7,6,5};\r\n\t\tint[] tmp=solution(arr);\r\n\t\tfor(int i=0;i<tmp.length;i++)\r\n\t\t\tSystem.out.print(tmp[i]+\" \");\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tN = sc.nextInt();\n\t\ta = new int[N][N];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\ta[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tfor (int i = 1; i < N; i++) {\n\t\t\tfor (int j = 0; j <= i; j++) {\n\t\t\t\tint max = a[i - 1][j];\n\t\t\t\tif (j - 1 >= 0) max = Math.max(max, a[i - 1][j - 1]);\n\t\t\t\ta[i][j] += max;\n\t\t\t}\n\t\t}\n\t\tint r = a[N - 1][0];\n\t\tfor (int i = 0; i < N; i++) r = Math.max(r, a[N - 1][i]);\n\t\tSystem.out.println(r);\n\t\t\n\t}", "public static void main(String args[] ) throws Exception {\n String l[] = br.readLine().split(\" \");\n long N = Long.parseLong(l[0]);\n long S = Long.parseLong(l[1]);\n long E = Long.parseLong(l[2]);\n TreeMap<Long,Long> t1 = new TreeMap<Long,Long>();\n TreeMap<Long,Long> t2 = new TreeMap<Long,Long>();\n for(int i=0;i<N;i++) {\n String s[] = br.readLine().split(\" \");\n long x = Long.parseLong(s[0]);\n long p = Long.parseLong(s[1]);\n t1.put((x-p),(x+p));\n }\n ArrayList<Long> l1 = new ArrayList<Long>(t1.keySet());\n ArrayList<Long> l2 = new ArrayList<Long>(t1.values());\n long c = l1.get(0);\n long d = l2.get(0);\n for(int i=1;i<t1.size();i++)\n {\n if(l1.get(i)<=d)\n d = Math.max(d,l2.get(i));\n else\n {\n \n t2.put(c,d);\n c = l1.get(i);\n d = l2.get(i);\n }\n \n }\n t2.put(c,d);\n int i;\n long ans = 0;\n l1=new ArrayList<Long>(t2.keySet());\n l2=new ArrayList<Long>(t2.values());\n \n \n for(i=0;i<l1.size();i++)\n {\n if(S>=E)\n {\n S=E;\n break;\n }\n if(l1.get(i)<=S && S<=l2.get(i))\n S = l2.get(i);\n \n else if(S<=l1.get(i) && E>=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = l2.get(i);\n \n }\n else if(S<=l1.get(i) && E>=l1.get(i) && E<=l2.get(i))\n {\n ans+=l1.get(i)-S;\n S = E;\n }\n else if(S<=l1.get(i) && E<=l1.get(i))\n {\n ans+=E-S;\n S = E;\n }\n }\n if(S<E)\n ans+=E-S;\n pw.println(ans);\n \n pw.close();\n }", "static int GetJumpCount(int input1,int input2,int[] input3)\n {\n\n int tottalJump=0;\n for (int height:input3)\n {\n tottalJump+=GetJumpCountUtil(input1,input2,height);\n }\n return tottalJump;\n }", "public static void main(String[] args) {\n\r\n\t\tString input = \"21462675756\";\r\n\t\tSystem.out.println(createString(input));\r\n\t\tint a[] = { 1, 2, 3, 7, 5 };\r\n\t\tint b[] = {1, 4, 20, 3, 10, 5};\r\n\t\t// sortAndRemoveDuplicates(a);\r\n\t\t// shiftelements(a, 2);\r\n\r\n\t\tsubArrayWithGivenSum(a, 12);\r\n\t\tsubArrayWithGivenSum(b, 33);\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\r\n\t\ttry {\r\n\t\t\tint T = Integer.parseInt(br.readLine());\r\n\t\t\tfor (int t = 0; t < T; t++) {\r\n\t\t\t\tint N = Integer.parseInt(br.readLine());\r\n\t\t\t\tint[] A = new int[N]; // 수열 저장\r\n\t\t\t\tint cnt = 0;\r\n\r\n\t\t\t\tfor (int i = 0; i < N / 10 + 1; i++) {\r\n\t\t\t\t\tString[] arr = br.readLine().split(\" \");\r\n\t\t\t\t\tfor (int j = 0; j < arr.length; j++) {\r\n\t\t\t\t\t\tA[cnt] = Integer.parseInt(arr[j]);\r\n\t\t\t\t\t\tcnt++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tArrayList<Integer> result = new ArrayList<Integer>();\r\n\t\t\t\tPriorityQueue<Integer> maxheap = new PriorityQueue<Integer>(Collections.reverseOrder());\r\n\t\t\t\tPriorityQueue<Integer> minheap = new PriorityQueue<Integer>();\r\n\r\n\t\t\t\tfor (int i = 0; i < A.length; i++) {\r\n\t\t\t\t\tif (maxheap.size() == minheap.size())\r\n\t\t\t\t\t\tmaxheap.offer(A[i]);\r\n\t\t\t\t\telse if (maxheap.size() > minheap.size())\r\n\t\t\t\t\t\tminheap.offer(A[i]);\r\n\r\n\t\t\t\t\tif (!maxheap.isEmpty() && !minheap.isEmpty() && minheap.peek() < maxheap.peek()) {\r\n\t\t\t\t\t\tint max = maxheap.poll();\r\n\t\t\t\t\t\tint min = minheap.poll();\r\n\r\n\t\t\t\t\t\tminheap.offer(max);\r\n\t\t\t\t\t\tmaxheap.offer(min);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tif (i % 2 == 0) {\r\n\t\t\t\t\t\tresult.add(maxheap.peek());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(result.size());\r\n\t\t\t\tfor (int i = 0; i < result.size(); i++) {\r\n\t\t\t\t\tSystem.out.print(result.get(i) + \" \");\r\n\t\t\t\t\tif (i % 10 == 9)\r\n\t\t\t\t\t\tSystem.out.println();\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}\r\n\t}", "public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tBufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n\t\tStringTokenizer st;\n\t\tint arr[][] = new int[2][10000001];\n\t\tint n = Integer.parseInt(br.readLine());\n\t\tst = new StringTokenizer(br.readLine());\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint tmp = Integer.parseInt(st.nextToken());\n\t\t\tif(tmp>=0)\n\t\t\t\tarr[0][tmp]++;\n\t\t\telse\n\t\t\t\tarr[1][Math.abs(tmp)]++;\t\t\n\t\t}\n\t\tint m = Integer.parseInt(br.readLine());\n\t\tst = new StringTokenizer(br.readLine());\n\t\tfor(int i=0;i<m;i++) {\n\t\t\tint tmp = Integer.parseInt(st.nextToken());\n\t\t\tif(tmp>=0) {\n\t\t\t\tbw.write(String.valueOf(arr[0][tmp])+\" \");\n\t\t\t}\n\t\t\telse if(tmp<0) {\n\t\t\t\tbw.write(String.valueOf(arr[1][Math.abs(tmp)])+\" \");\n\t\t\t}\n\t\t}\n\t\tbw.close();\n\t}", "public ArrayList<ArrayList<Integer>> fourSum(int[] num, int target) {\n int temp = 0;\n Arrays.sort(num);\n\n ArrayList<ArrayList<Integer>> a = new ArrayList<ArrayList<Integer>>();\n int [] s = new int [4];\n int total = 0;\n int current = -1;\n int i = 0;\n Arrays.fill(s, 0);\n HashMap<Long, Integer> m = new HashMap<Long, Integer>();\n \n \n if (num.length < 4) return a;\n \n while (i!=-1) {\n //increase the current pointer\n ++current;\n if (current > num.length-1) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else if (total + num[current] > target || total + (4-i)*num[num.length-1] < target) {\n --i;\n if (i >= 0) \n {\n current = s[i];\n total -= num[current];\n }\n }\n else {\n //check if current number will work\n /*if (current == 0)\n {\n */\n if (i < 3) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == target) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n long c = num[s[0]]*num[s[1]]*num[s[2]]*num[current];\n long d = Math.abs((long)num[s[0]]*1000000000) \n + Math.abs((long)num[s[1]]*1000000)\n + Math.abs((long)num[s[2]]*1000)\n + Math.abs((long)num[current]);\n if (c < 0) d *= -1;\n if (!m.containsKey(d))\n {\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n b.add(num[current]);\n a.add(b);\n m.put(d, 1);\n }\n }\n /*\n } \n else if (num[current] != num[current-1])\n {\n if (i < 2) {s[i] = current; total += num[current]; ++i;}\n else if (num[current] + total == 0) {\n //bingo one answer\n ArrayList<Integer> b = new ArrayList<Integer>();\n b.add(num[s[0]]);\n b.add(num[s[1]]);\n b.add(num[s[2]]);\n a.add(b);\n }\n }\n */\n }\n }\n return a;\n }", "public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n arr = new int[N];\n dp = new int[N][N];\n sizeList = new ArrayList<>();\n cutIndexArr = new int[N][N];\n\n// StringTokenizer st = new StringTokenizer(br.readLine());\n for(int i = 0; i < N; i++) {\n arr[i] = sc.nextInt();\n Arrays.fill(dp[i] , -1);\n }\n\n divide(0,N-1);\n\n System.out.println(dp[0][N-1]);\n\n int cnt = 1;\n int preNum = 0;\n int next = cutIndexArr[0][N-1];\n\n if(next == N-1) {\n sizeList.add(N);\n }\n else\n sizeList.add(next - preNum +1);\n\n while(next < N-1) {\n preNum = next;\n next = cutIndexArr[next+1][N-1];\n sizeList.add(next - preNum );\n cnt++;\n }\n\n System.out.println(cnt);\n\n for(int i = 0; i < sizeList.size(); i++) {\n System.out.print(sizeList.get(i) + \" \");\n }\n\n\n\n }", "public static void main(String[] args) {\n int value = 5;\n int ab= 0;\n int ac=0;\n int ad=0;\n int ae=0;\n int af=0;\n int ag=0;\n int am=0;\n int az=0;\n int x = 0;\n int y = 0;\n int z = 0;\n int a = 0;\n int b = 0;\n int c = 0;\n int d = 0;\n int e = 0;\n x= value%2;\n ab=value/2;\n y= ab % 2;\n ac = ab/2;\n z = ac % 2;\n ad= ac/2;\n a = ad % 2;\n ae = ad/2;\n b = ae % 2;\n af= ae/2;\n c = af % 2;\n ag= af/2;\n d= ag % 2;\n am=ag/2;\n e = am %2;\n\n System.out.println(e+\"\"+d+\"\"+c+\"\"+b+\"\"+a+\"\"+z+\"\"+y+\"\"+x);\n\n\n\n\n\n\n\n }", "public static void main(String[] args)throws Exception {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tint N = Integer.parseInt(br.readLine());\n\t\t\tint midpoint = N/2;\n\t\t\tint output = N-midpoint;\n\t\t\tfor(int i=1;i<=midpoint;i++){\n\t\t\t\tint j=1;\n\t\t\t\twhile(j<=i && i*j<=N){\n\t\t\t\t\toutput++;\n\t\t\t\t\tj++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(output);\n\t\t\t\n\t\t\n\t}", "public static int Main()\n\t{\n\t\tint n; //????\n\t\tint k;\n\t\tint i = 1;\n\t\tint j;\n\t\tn = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tk = Integer.parseInt(ConsoleInput.readToWhiteSpace(true));\n\t\tint[] f = new int[n + 1]; //????\n\t\twhile (i > 0) //??????????\n\t\t{\n\t\t\tf[0] = (n - 1) * i; //?????\n\t\t\tfor (j = 1;j < n + 1;j++) //????\n\t\t\t{\n\t\t\t\tif (f[j - 1] % (n - 1) != 0)\n\t\t\t\t{\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tf[j] = f[j - 1] * n / (n - 1) + k;\n\t\t\t}\n\t\t\tif (j == n + 1)\n\t\t\t{\n\t\t\t\tbreak; //???????\n\t\t\t}\n\t\t\ti = i + 1;\n\t\t}\n\t\tSystem.out.print(f[n]);\n\t\tSystem.out.print(\"\\n\");\n\t\treturn 0;\n\t}", "public static void main(String[] args) {\n\r\n\t\tint[] a = {23,12,45,98,54};\r\n\t\t\r\n\t\tint [] result = new int [6]; //{54,98,45,12,23}\r\n\t\t\r\n\t\tint [] b = new int[6];\r\n\t\r\n\t\t\r\n\t\tfor(int i =0; i<a.length; i++) {\r\n\t\t\tresult[5 - i] = a[i];\r\n\t\t}\r\n\t\tfor(int i : result) {\r\n\t\t\tSystem.out.println(i);\r\n\t\t}\r\n\t\t\r\n\t\t//a 배열과 b배열의 값은 index 해당하는 값을 더하고 그 결과가 3의 배수이면 result 의 \r\n\t\t//해당 index에 값을 5배 하여 저장하고 그렇지 않은 index에는 10을 저장함 \r\n\t\t\r\n\t\tfor (int i=0; i<6; i++) {\r\n\t\t\tif((a[i] + b[i])%3 ==0)\r\n\t\t\t{\r\n\t\t\t\tresult[i] = a[i] + b[i]*5;\r\n\t\t\t}\r\n\t\t\telse result[i] = 10;\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\r\n\t\tint input1=123,input2=456,input3=345,input4=5043;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString in1 = Integer.toString(input1);\r\n\t\tString in2 = Integer.toString(input2);\r\n\t\tString in3 = Integer.toString(input3);\r\n\t\tString in4 = Integer.toString(input4);\r\n\t\t\r\n\t\t\r\n\t\tStringBuilder obj = new StringBuilder();\r\n\r\n\t\tobj.append(in1);\r\n\t\tobj.append(in2);\r\n\t\tobj.append(in3);\r\n\t\tobj.append(in4);\r\n\r\n\t\tString str = obj.toString();\t\r\n\t\tchar ch[] = str.toCharArray();\r\nint count[] = new int[10];\r\n\r\n\t\tfor(int i = 0 ;i < ch.length;i++)\r\n\t\t{\r\n\t\t\tcount[ Character.getNumericValue(ch[i]) ]++;\r\n\r\n\t\t}\r\n\r\n\tint max= 0,value=0;\r\n\r\n\tfor(int i = 0 ; i < count.length;i++)\r\n\t{\r\n\t\tif( max <= count[i])\r\n\t\t\t\t{max = count[i];\r\n\t\t\t\tvalue = i;\t\r\n\t\t\t\t}\r\n\t}\r\n\r\n\t\t\r\n\t\tSystem.out.println(Arrays.toString(count ));\r\n\t\tSystem.out.println(max);\r\n\t\tSystem.out.println(value);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void pattern6(int input){\n\t\tint counter=1;\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=counter;j<=(i*(i+1)/2);j++){\n\t\t\t\tSystem.out.print(counter++ + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) throws IOException{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint m = sc.nextInt();\n\t\tint[] array = new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarray[i] = sc.nextInt();\n\t\t}\n\t\tint[][] dp = new int[n][n];\n\t\tint[][] c = new int[n][n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint count=0,max=0;\n\t\t\tfor(int j=i;j<n;j++)\n\t\t\t{\n\t\t\t\tif(j==i){\n\t\t\t\t\tdp[i][j]=array[j];\n\t\t\t\t\tcount++;\n\t\t\t\t\tc[i][j]=count;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\telse{\n\t\t\t\t\tif(array[j]==array[j-1]){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tif(max<count) {\n\t\t\t\t\t\t\tmax =count;\n\t\t\t\t\t\t\tdp[i][j]=array[j];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\tdp[i][j]=dp[i][j-1];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tc[i][j]=count;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tcount =1;\n\t\t\t\t\t\tdp[i][j] = dp[i][j-1];\n\t\t\t\t\t\tc[i][j]=count;\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\t//System.out.print(dp[i][j]+\" \");\n\t\t\t}\n\t\t\t//System.out.println();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<m;i++)\n\t\t{\n\t\t\tint l = sc.nextInt()-1;\n\t\t\tint r = sc.nextInt()-1;\n\t\t\tint k = sc.nextInt();\n\t\t\tif(c[l][r]>k)\n\t\t\t{\n\t\t\t\tSystem.out.println(dp[l][r]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tSystem.out.println(-1);\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n\r\n for (int x = 1; x < 10; x++) {// x=1\r\n\r\n for (int h = 1; h < 10; h++) { // h=1+1+1...8+1\r\n\r\n System.out.println(x + \"*\" + h \"=\" +x*h);// 1-2-3....8-9\r\n\r\n if(h==2){\r\n break;\r\n }\r\n }\r\n\r\n if(x==4){\r\n continue;\r\n }\r\n\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 int k = in.nextInt();\n ArrayList<Integer> list = new ArrayList<>();\n for(int arr_i=0; arr_i < n; arr_i++){\n int integer = in.nextInt();\n list.add(new Integer(integer));\n }\n in.close();\n\n\n\n if(k == 1){\n System.out.println(k);\n return;\n }\n\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i) % k;\n list.set(i, x);\n }\n\n int[] kx = new int[k];\n for(int i = 0;i < k;i ++){\n kx[i] = 0;\n }\n for(int i = 0;i < list.size();i ++){\n int x = list.get(i);\n kx[x] ++;\n }\n\n\n int num = 0;\n int A = 0;\n if(k % 2 == 0){\n A = k / 2 - 1;\n }else{\n A = k / 2;\n }\n if(kx[0] != 0){\n num += 2;\n }\n for(int i = 1; i <= A;i ++){\n if(kx[i] >= kx[k - i]){\n num += kx[i];\n }else {\n\n num += kx[k - i];\n }\n\n }\n System.out.println(num);\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint t=sc.nextInt();\n\t\tfor(int i=0;i<t;i++) {\n\t\t\t\n\t\t\t\n\t\t\tint m=sc.nextInt();\n\t\t\tint [] arr=new int[m];\n\t\t\t\n\t\t\tfor(int j=0;j<arr.length;j++) {\n\t\t\t\tarr[j]=sc.nextInt();\n\t\t\t}\n\t\t\t\n\t\t\tint jc=1;\n\t\t\t\n\t\t\twhile(jc<=arr.length-1) {\n\t\t\t\t//String s1=\"\";String s2=\"\";\n\t\t\t\tfor(int j=0;j<arr.length-jc;j++) {\n\t\t\t\t\t String s1 = Integer.toString(arr[j]);\n\t String s2 = Integer.toString(arr[j+1]);\n\t\t\t\t\ts1=\"\"+arr[j];\n\t\t\t\t\ts2=\"\"+arr[j+1];\t\n\t\t\t\t\tString x=s1+s2;\n\t\t\t\t\tString y=s2+s1;\n\t\t\t\t\t long x1 = Long.parseLong(x);\n\t long y1 = Long.parseLong(y);\n\t\t\t\t\t\n\t\t\t\t\tif(x1<y1) {\n\t\t\t\t\t\tswap(arr,j,j+1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tjc++;\n\t\t\t}\n\t\t\tfor(int k=0;k<arr.length;k++) {\n\t\t\t\tSystem.out.print(arr[k]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tfor(int i=0 ; i<n ; i++ ){\n\t\t\tint lower = in.nextInt();\n\t\t\tint higher = in.nextInt();\n\t\t\tint base = (int)Math.ceil(Math.sqrt(lower));\n\t\t\tint count=0;\n\t\t\tfor(int j=base ; j*j<=higher ; j++){\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tSystem.out.println(count);\n\t\t}\n }", "public static void main(String[] args){\n int n;int k;\n Scanner sc=new Scanner(System.in);\n n=sc.nextInt();\n k=sc.nextInt();\n int[] a=new int[n];\n int[] reMain=new int[k];\n int num=0;\n for(int i=0;i<k;i++){\n reMain[i]=0;\n }\n for(int i=0;i<n;i++){\n int d=sc.nextInt()%k;\n reMain[d]++;\n }\n int p=0;\n if(k%2==0)\n p=k/2;\n else p=(k+1)/2;\n for(int i=1;i<p;i++){\n if(reMain[i]>reMain[k-i])\n num+=reMain[i];\n else\n num+=reMain[k-i];\n \n }\n if(reMain[p]%2==1 && k%2==0)\n num++;\n if(k==2)\n num=reMain[1];\n \n \n System.out.println(num);\n\t}", "public static void main(String[] args) {\n\t\tScanner jjdavidki = new Scanner(System.in);\r\n\t\tint n = jjdavidki.nextInt();\r\n\t\tint [] arr = new int[n];\r\n\t\tfor(int i =0; i<arr.length; i++){\r\n\t\t\tarr[i] = jjdavidki.nextInt();\r\n\t\t}\r\n\t\tint [] arr11 = new int[n];\r\n\t\tfor(int i =0; i<arr11.length; i++){\r\n\t\t\tarr11[i] = arr[i];\r\n\t\t}\r\n\t\tint [] arr2 = new int[n];\r\n\t\tint smallest = arr[0];\r\n\t\tfor(int j=0;j<arr.length;j++) {\r\n\t\t\tif(arr[j]<smallest) {\r\n\t\t\t\tsmallest = arr[j];\r\n\t\t\t}\r\n\t\t}\r\n\t\tint biggest = arr[0];\r\n\t\tint zapazeno = 0;\r\n\t\tfor(int k=0;k<arr.length/2;k++) {\r\n\t\t\tfor(int l=0;l<arr.length;l++) {\r\n\t\t\t\tif(arr[l]>=biggest) {\r\n\t\t\t\t\tbiggest = arr[l];\r\n\t\t\t\t\tzapazeno = l;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarr2[k] = biggest;\r\n\t\t\tarr[zapazeno] = smallest;\r\n\t\t\tbiggest = arr[0]-1;\r\n\t\t}\r\n\t\tint biggest2 = arr11[0];\r\n\t\tfor(int j=0;j<arr11.length;j++) {\r\n\t\t\tif(arr11[j]>biggest2) {\r\n\t\t\t\tbiggest2 = arr11[j];\r\n\t\t\t}\r\n\t\t}\r\n\t\tint smallest2 = arr11[0];\r\n\t\tfor(int k=arr11.length/2;k<arr11.length;k++) {\r\n\t\t\tfor(int l=0;l<arr11.length;l++) {\r\n\t\t\t\tif(arr11[l]<=smallest2) {\r\n\t\t\t\t\tsmallest2 = arr11[l];\r\n\t\t\t\t\tzapazeno = l;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tarr2[k] = smallest2;\r\n\t\t\tarr11[zapazeno] = biggest2;\r\n\t\t\tsmallest2 = arr11[0]+1;\r\n\t\t}\r\n\t\tfor(int g=0;g<arr2.length;g++) {\r\n\t\t\tSystem.out.println(arr2[g]);\r\n\t\t}\r\n\t\t\r\n\t}", "public final static void main(String[] args) {\n\t\tfinal int n = 8;\n\t\tfinal int k = 4;\n\n\t\tStreamSupport.stream(\n\t\t\t\tnew PermutationSpliterator(Selection.of(n, k)),\n\t\t\t\tfalse)\n\t\t\t\t.forEachOrdered(a -> {});\n\n\t\tfor (int cur = 0; cur < 70; cur++) {\n\t\t\tlong tCur = cur;\n\t\t\tfinal int x = (n - k)+1;\n\t\t\tint i = k;\n\t\t\tfinal int[] array = new int[k];\n\t\t\twhile (i >= 1) {\n\t\t\t\tarray[i-1] = (int) (tCur % x);\n\t\t\t\ttCur /= i--;\n\t\t\t}\n\t\t}\n\t}", "private int getU(int[] inputs, int[] original) {\n\t\tint u = 0; \n\t\tint u2 = 0;\n\t\tfor(int i = 0 ; i < inputs.length ; i++) {\n\t\t\tu += inputs[i];\n\t\t\tu2 += original[i];\n\t\t}\n\t\treturn u <= u2 ? u : u2;\n\t}", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int p=sc.nextInt();\n int q=sc.nextInt();\n long i=0;\n String S=null;\n String substring1=null;\n String substring2=null;\n long square=0;\n int fsquare=0;\n int ssquare=0;\n int sum=0;\n int v=0;\n for(i=p;i<=q;i++)\n {\n square=squar(i);\n S=Long.toString(square);\n \n if(square<=9)\n { S=0+S; }\n int length=S.length();\n int d=length/2;\n String lsquare=S.substring(0,d);\n String rsquare=S.substring(d);\n fsquare=Integer.parseInt(lsquare);\n ssquare=Integer.parseInt(rsquare);\n sum=fsquare+ssquare;\n if(sum==i)\n {\n System.out.print(i);\n System.out.print(\" \");\n v=1;\n } \n } \n if(v==0)\n {\n System.out.print(\"INVALID RANGE\");\n } \n \n }", "public static void main(String[] args) \n\t{\n\t\t int i=20, j=40;\n\t\t int k=0;\n\t\t ArrayList<Integer> l1=new ArrayList<Integer>();\n\t\t ArrayList<Integer> l2=new ArrayList<Integer>();\n\t\t for(int a=i;a<=j;a++){\n\t\t int count=0;\n\t\t for(int b=2;b<a;b++)\n\t\t if(a%b==0)\n\t\t count++;\n\t\t if(count==0)\n\t\t l1.add(a); }\n\t\t for(int e=i;e<=j;e++)\n\t\t l2.add(e);\n\t\t l2.removeAll(l1);\n\t\t for(int d=0;d<l2.size();d++)\n\t\t k=k+l2.get(d);\n\t\t \n\t\tSystem.out.println(k);\n\t}", "public static void main(String[] args) {\n Scanner scan=new Scanner(System.in);\n int t= scan.nextInt();\n int min[] = new int[10001];\n Arrays.fill(min,89898);\n min[0] = 0;\n int pn[] = new int[10001];\n boolean p[] = new boolean[10001];\n for(int i=2;i<101;++i)\n {\n if(!p[i])\n for(int j=i*i;j<10001;j+=i)\n p[j] = true;\n }\n int index = 0;\n for(int i=2;i<10001;++i)\n if(!p[i])\n pn[index++] = i;\n int last = index-1;\n for(int i=0;i<=last;++i)\n {\n int temp = (int)Math.pow(pn[i], pn[i]);\n if(temp<10001)\n pn[index++] = temp;\n else break;\n }\n pn[index++] = 898989;\n Arrays.sort(pn,0,index);\n for(int i=2;i<10001;++i)\n {\n for(int j=0;pn[j]<=i;++j)\n if(min[i]>1+min[i-pn[j]])\n min[i] = 1+min[i-pn[j]];\n }\n\n StringBuilder sb = new StringBuilder(\"\");\n while(t-->0)\n {\n sb.append(min[scan.nextInt()]+\"\\n\");\n }\n System.out.println(sb);\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n ArrayList<ArrayList<Integer>> rows = new ArrayList<>();\n\n for (int i = 0; i < n; i++) {\n int r = scan.nextInt();\n ArrayList<Integer> row = new ArrayList<>();\n\n for (int j = 0; j < r; j++) {\n row.add(scan.nextInt());\n }\n rows.add(row);\n }\n\n int q = scan.nextInt();\n for (int k = 0; k < q; k++) {\n int x = scan.nextInt();\n int y = scan.nextInt();\n\n try {\n System.out.println(rows.get(x - 1).get(y - 1));\n } catch (IndexOutOfBoundsException e) {\n System.out.println(\"ERROR!\");\n }\n }\n }", "public static void main(String[] args) {\n Scanner sc=new Scanner(System.in);\n int n= sc.nextInt();\n for(int i=0;i<n;i++)\n {\n int x=sc.nextInt();\n int a=sc.nextInt();\n int b=sc.nextInt();\n if(a==b)\n System.out.print((x-1)*a);\n else\n { if(b<a)\n {\n int p=a;\n a=b;\n b=p;\n }\n for(int j=0;j<x;j++)\n {\n int t= j*b+(x-1-j)*a;\n System.out.print(t + \" \");\n }\n }\n System.out.println();\n }\n }", "public static void main(String[] args) {\n\n\t\tScanner sc=new Scanner(System.in);\n\t\t\n\t\tint tc=sc.nextInt();\n\t\t\n\t\tfor (int t = 1; t <= tc; t++) {\n\t\t\tN=sc.nextInt();\n\t\t\tK=sc.nextInt();\n\t\t\tP=N/4;\n\t\t\tString input=sc.next();\n\t\t\t\n\t\t\tarray=input.toCharArray();\n\t\t\t\n\t\t\tTreeSet<Long> set=new TreeSet<>();\n\t\t\t\n\t\t\t\n\t\t\tfor (int i = 0; i < P; i++) {\n\t\t\t\tString str=new String(array);\n\t\t\t\t\n\t\t\t\tfor (int j =0; j < 4; j++) {\n//\t\t\t\t\tSystem.out.println(str.substring(j*P,j*P+P));\n//\t\t\t\t\tSystem.out.println(to10(str.substring(j*P,j*P+P)));\n\t\t\t\t\tset.add(to10(str.substring(j*P,j*P+P)));\n\t\t\t\t}\n//\t\t\t\tSystem.out.println();\n\t\t\t\tmoveArray();\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i <K-1; i++) {\n\t\t\t\t\n\t\t\t\tset.pollLast();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"#\"+t+\" \"+set.pollLast());\n\t\t\t\n\t\t\n\t\t\t\n\t\t\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint t = in.nextInt();\n\t\twhile( t-- > 0 )\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint m = in.nextInt();\n\t\t\tString s[] = new String[n];\n\t\t\tfor( int i = 0 ; i < n ; i++ )\n\t\t\t{\n\t\t\t\ts[i] = in.next();\n\t\t\t}\n\t\t\tArrayList<Point> p = new ArrayList<>();\n\t\t\tfor(int i = 0 ; i < n ; i++ )\n\t\t\t{\n\t\t\t\tfor(int j = 0 ; j < m ; j++)\n\t\t\t\t{\n\t\t\t\t\tif(s[i].charAt(j) == '1')\n\t\t\t\t\t{\n\t\t\t\t\t\tp.add(new Point(i,j));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n//\t\t\tfor(int i = 0 ; i < p.size() ;i++ )\n//\t\t\t{\n//\t\t\t\tSystem.out.println(p.get(i).x +\" \" + p.get(i).y );\n//\t\t\t}\n\t\t\t\n\t\t\tHashMap<Integer,Integer> map = new HashMap<>();\n\t\t\tfor(int i = 1 ; i < p.size() ; i++ )\n\t\t\t{\n\t\t\t\t\n\t\t\t}\n\t\t\tfor(int i = 0 ; i < p.size() ;i++ )\n\t\t\t{\n\t\t\t\tfor(int j = i + 1 ; j < p.size() ; j++ )\n\t\t\t\t{\n\t\t\t\t\t{\n\t\t\t\t\t\tPoint p1 = p.get(i);\n\t\t\t\t\t\tPoint p2 = p.get(j);\n\t\t\t\t\t\tint d = Math.abs(p1.x - p2.x) + Math.abs(p1.y - p2.y);\n\t\t\t\t\t\tif(!map.containsKey(d))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmap.put(d, 1);\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\tmap.put(d, map.get(d) + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i = 1 ; i <= n + m - 2 ; i++)\n\t\t\t{\n\t\t\t\tif (map.containsKey(i))\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(map.get(i)+ \" \");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tSystem.out.print(0 + \" \");\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}", "public static void method_3(){\n int totalhotdog = 400;\n int hotDogPerContainer = 8;\n int totalContainer =0;\n int temp = totalhotdog+hotDogPerContainer;\n\n while (temp>hotDogPerContainer){\n temp = temp - hotDogPerContainer;\n System.out.println(temp);\n totalContainer++;\n }\n System.out.println(\"\\n \\n\\n\\n\\n \"+totalContainer);\n }", "public static void main(String[] args) {\n\t\tint array[]={2,3,4,6};\n\t\tint n=array.length;\n\t\tint maximum=Integer.MIN_VALUE;\n\t\tint minimum=Integer.MAX_VALUE;\n\t\tfor(int i:array)\n\t\t{\n\t\t\tif(i>maximum)\n\t\t\t\tmaximum=i;\n\t\t\tif(i<minimum)\n\t\t\t\tminimum=i;\n\t\t}\n\t\t\n\t\tint mark[]=new int[maximum+2];\n\t\tint value[]=new int[maximum+2];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tmark[array[i]]=1; // marking ki exist karta hai no need to search in the array.\n\t\t\tvalue[array[i]]=1; //har value se ek fbt to banega hi (1 node ka)\n\t\t}\n\t\tint ans=0;\n\t\tfor(int i=minimum;i<=maximum;i++){\n\t\t\tif(mark[i]==1) // element is present in the array.// we have found the first factor now find 2nd factor.\n\t\t\t{\n\t\t// find the multiples of arr[i] which are less than max value and also less than its square\n\t\t\tfor(int j=i+i ;j<=maximum && j/i<=i;j=j+i)\n\t\t\t{\n\t\t\t\tif(mark[j]==1 && mark[j/i]==1) // i is the first factor and j/i is the 2nd factor.j is the product that serves as root.\n\t\t\t\t{\n\t\t\t\t\t// value =all combination of left child with right child.\n\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t\t\n\t\t\t\t\t// if the 2 child are not same then one more orientation.\n\t\t\t\t\tif(i!=(j/i))\n\t\t\t\t\t\tvalue[j]=value[j] + (value[i] * value[j/i]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\tans=ans+value[i];\n\t\t}\n\t\tSystem.out.println(ans);\n\t}", "public static void main(String[] args) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t/*80\r\n\t\tint matches = 3162;\r\n\t\tint results = 1218;\r\n\t\tint pairs = 146;\r\n\t\t*/\r\n\t\t//70\r\n\t\t/*int matches = 3302;\r\n\t\tint results = 909;\r\n\t\tint pairs = 59;*/\r\n\r\n\t\tfor(int i=1;i<=10;i++)\r\n\t\t{\r\n\t\t\tdouble b = (0.1*i)*((matches*3)+(results*3)+(pairs*3));\r\n\t\t\tSystem.out.print(Math.round(b)+\",\");\r\n\t\t}\t\r\n\t\r\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int noOfElements = sc.nextInt();\n int[] arr = new int[noOfElements];\n int[] arr1 = new int[noOfElements];\n int diff = Integer.MAX_VALUE;\n int sIndex = 0;\n int j = 0;\n for (int i = 0; i < noOfElements; i++) {\n arr[i] = sc.nextInt();\n }\n for (int j1 = 1; j1 < noOfElements; j1++) {\n int i = j1 - 1;\n int key = arr[j1];\n while (i >= 0 && key < arr[i]) { // 1 2 3\n arr[i + 1] = arr[i];\n i--;\n }\n arr[i + 1] = key;\n }\n //Arrays.sort(arr);\n for (int i = 0; i < noOfElements - 1; i++) {\n int temp = Math.abs(arr[i] - arr[i + 1]);\n if (temp <= diff) {\n diff=temp;\n }\n\n }\n\n for (int i = 0; i < noOfElements - 1; i++) {\n if (Math.abs(arr[i] - arr[i+1]) == diff) {\n System.out.print(arr[i] + \" \" + arr[i+1] + \" \");\n }\n }\n// for (int a = 0; a < j; a++) {\n//\n// System.out.print(arr[arr1[a]] + \" \" + arr[arr1[a]+1] + \" \");\n// }\n\n }", "private static int getResult(int x, int y) {\n\t\tint startx=0;\r\n\t\tint starty=0;\r\n\t\tint num=1;\r\n\t\tif(startx==x&&starty==y){\r\n\t\t\treturn num;\r\n\t\t}\r\n\t\tfor(int z=1;z<105;z++){\r\n\t\t\tfor(int i=1;i<=2*z-1;i++){\r\n\t\t\t\tstartx=startx+1;\r\n\t\t\t\tnum++;\r\n//\t\t\t\tSystem.out.println(num);\r\n\t\t\t\tif(startx==x&&starty==y){\r\n\t\t\t\t\treturn num;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=1;i<=2*z-1;i++){\r\n\t\t\t\tstarty=starty+1;\r\n\t\t\t\tnum++;\r\n//\t\t\t\tSystem.out.println(num);\r\n\t\t\t\tif(startx==x&&starty==y){\r\n\t\t\t\t\treturn num;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=1;i<=2*z;i++){\r\n\t\t\t\tstartx=startx-1;\r\n\t\t\t\tnum++;\r\n//\t\t\t\tSystem.out.println(num);\r\n\t\t\t\tif(startx==x&&starty==y){\r\n\t\t\t\t\treturn num;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfor(int i=1;i<=2*z;i++){\r\n\t\t\t\tstarty=starty-1;\r\n\t\t\t\tnum++;\r\n//\t\t\t\tSystem.out.println(num);\r\n\t\t\t\tif(startx==x&&starty==y){\r\n\t\t\t\t\treturn num;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn num;\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\r\n\t\tint n = sc.nextInt();\r\n\t\tint[] a = new int[n];\r\n\t\tfor(int i = 0; i < n; i++){\r\n\t\t\ta[i] = sc.nextInt();\r\n\t\t}\r\n\t\tint res = 0, p = 0, t = 0;\r\n\t\twhile(true){\r\n\t\t\tp = 0; t = 0;\r\n\t\t\tfor(int i = 0; i < a.length; i++){\r\n\t\t\t\t\r\n\t\t\t\tif(i == a.length-1){\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t\ta[0] += p;\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\ta[i] /= 2;\r\n\t\t\t\t\tt = a[i];\r\n\t\t\t\t\ta[i] += p;\r\n\t\t\t\t\tp = t;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tboolean flag = true;\r\n\t\t\tint temp = a[0];\r\n\t\t\tfor(int j = 1; j < a.length; j++){\r\n\t\t\t\tif(a[j] != temp){\r\n\t\t\t\t\tflag = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif(flag){\r\n\t\t\t\tSystem.out.println(res);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tfor(int j = 0; j < a.length; j++){\r\n\t\t\t\tif(a[j] % 2 != 0){\r\n\t\t\t\t\ta[j] += 1;\r\n\t\t\t\t\tres++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[] arr = new int[n+1];\n\t\tint[] dp = new int[n+1];\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tarr[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tfor (int i = 1; i < arr.length; i++) {\n\t\t\tfor (int j = 1; j <= i; j++) {\n\t\t\t\tdp[i] = Math.max(dp[i], dp[i-j] + arr[j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(dp[arr.length-1]);\n\t}", "public static void main(String[] args) throws Exception {\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int[] arr = new int[n];\n \n for(int i = 0; i< n; i++){\n arr[i] = scn.nextInt();\n }\n \n int[] dp = new int[n];\n dp[0] = 1;\n int maxLen = 1;\n // traversing from 1 to jth position starting from 0\n for(int i = 1; i<n; i++){\n for(int j = 0; j<i; j++){\n \n if(arr[i] > arr[j]){\n dp[i] = Math.max(dp[i],dp[j]);\n }\n }\n dp[i] += 1;\n \n if(maxLen < dp[i]){\n maxLen = dp[i];\n }\n }\n System.out.println(maxLen);\n //System.out.println(Arrays.toString(dp));\n\n }", "public static void main(String[] args) {\n int[][]grade={ {78,100},\n {59,80},\n {90,70},\n {65,120}\n \t\t };\n System.out.println(grade[2][4]);\n int k;\n for(int i=0;i<grade.length-1;i++){\n \t for(int j=0;j<grade.length-1;j++){\n \t\t k=(int) ((grade[1][3]+grade[2][3])/2);\n \t\t System.out.println(k);}\n }\n\n int m;\n\tfor(int i=0;i<grade.length-1;i++){\n \t for(int j=0;j<grade.length-1;j++){\n \t\t m=(int) ((grade[1][1]+grade[1][2]+grade[1][3]+grade[1][4])/4);\n \t\t System.out.println(m);\n \t\t }\n \n\t}\n\t\n\t\n\t}", "public static void main(String[] args) throws IOException {\n\t\tScanner sc = new Scanner(System.in);\n//\t\tint T = stoi(br.readLine());\n\t\tint T = sc.nextInt();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tfor(int Tcase=1; Tcase <= T; Tcase++){\n\t\t\tint ans=0;\n\t\t\tsb.append(\"#\").append(Tcase).append(\" \");\n\t\t\t//오름차순 //내림차순\n\t\t\tint N = sc.nextInt();\n\t\t\tint[] dataSet = new int[N];\n\t\t\tfor (int count = 0; count < N; count++) {\n\t\t\t\tdataSet[count] = sc.nextInt();\n\t\t\t}\n\t\t\t\n\t\t\t//시작상태 0 //오름차순 1// 내림차순 2\n\t\t\tint swit = 0;\n\t\t\tint leftIdx = 0;\n\t\t\tint rightIdx = 0;\n\t\t\tint midIdx = 0;\n\t\t\tint preData = dataSet[0];\n\t\t\tint hi;\n\t\t\tfor (int idx = 1; idx < dataSet.length; idx++) {\n\t\t\t\thi = dataSet[idx];\n\t\t\t\tif(preData < hi) { //오름차순 1\n\t\t\t\t\tif(swit == 2) {\n\t\t\t\t\t\trightIdx = idx-1;\n\t\t\t\t\t\tans += (midIdx-leftIdx)*(rightIdx-midIdx);\n\t\t\t\t\t\tleftIdx = idx-1;\n\t\t\t\t\t}\n\t\t\t\t\tswit = 1;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//같은경우 고려 안함\n\t\t\t\telse {//내림차순 2\n\t\t\t\t\tif(swit == 1) midIdx = idx-1;\n\t\t\t\t\t\n\t\t\t\t\tswit = 2;\n\t\t\t\t\tif(idx == dataSet.length-1){\n\t\t\t\t\t\trightIdx = idx;\n\t\t\t\t\t\tans += (midIdx-leftIdx)*(rightIdx-midIdx);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tpreData = hi;\n\t\t\t}\n\t\t\t\n\t\t\tsb.append(ans).append(\"\\n\");\n\t\t}\n\t\tSystem.out.print(sb);\n\t\t\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int a[] = new int[n];\n for (int i = 0; i < a.length; i++) {\n\t\ta[i]= scanner.nextInt();\n\t}\n int maxP = Integer.MIN_VALUE;\n int minB = Integer.MAX_VALUE;\n for (int i = 0; i < a.length; i++) {\n \t minB=Math.min(minB, a[i]);\n\t\tmaxP= Math.max(maxP, a[i]-minB);\n\t}\n System.out.println(maxP);\n\t}", "void solve() {\n num = new ArrayList<>();\n num.add(BigInteger.valueOf(4));\n for (int len = 2; len <= 100; len++)\n generate(\"4\", 1, len, false);\n Collections.sort(num);\n for (int tc = ii(); tc > 0; tc--) {\n long x = il();\n BigInteger X = BigInteger.valueOf(x);\n for (int i = 0; i < num.size(); i++) {\n if (num.get(i).mod(X).equals(BigInteger.ZERO)) {\n String z = num.get(i).toString();\n int end = z.lastIndexOf('4');\n int len = z.length();\n int a = 2 * (end+1);\n int b = len - end;\n out.println(a + b);\n break;\n }\n }\n }\n }", "public static void main(String[] args) {\n Scanner scan = new Scanner(\"11\");\n\n int input_x;\n\n int output;\n\n input_x = scan.nextInt();\n\n for (output = 1000 ; output > 0; output--) {\n if (input_x - output * 5 < 0) {\n continue;\n } else if ((input_x - output * 5) % 3 == 0) {\n break;\n }\n }\n\n if (output == 0 && input_x % 3 != 0) {\n System.out.println(-1);\n } else {\n System.out.println(output + (input_x - output * 5) / 3);\n }\n }", "public static void pattern7(int input){\n\t\tfor(int i=1;i<=input;i++){\n\t\t\tfor(int j=1;j<=i;j++){\n\t\t\t\tSystem.out.print(j+\" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int max = Integer.MIN_VALUE;\n int temp;\n int[][] array = new int[6][6];\n for(int i=0; i<6; i++){\n for(int j=0; j<6; j++){\n array[i][j] = sc.nextInt();\n }\n }\n for(int i=0;i<4;i++){\n for(int j=0;j<4;j++){\n temp = array[i][j] + array[i][j+1] + array[i][j+2]\n + array[i+1][j+1]\n + array[i+2][j] + array[i+2][j+1] + array[i+2][j+2];\n max = Math.max(temp,max);\n }\n }\n System.out.println(max);\n }", "public static void main(String[] args) throws IOException {\n\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st;\n ArrayList<Integer[]>arr = new ArrayList<Integer[]>();\n int n = Integer.parseInt(br.readLine());\n for(int i = 0 ;i<n;i++) {\n st = new StringTokenizer(br.readLine());\n int start = Integer.parseInt(st.nextToken());\n int end = Integer.parseInt(st.nextToken());\n arr.add(new Integer[] {start,end});\n }\n \n Collections.sort(arr,new Comparator<Integer[]>() {\n public int compare(Integer[] p , Integer[]q) {\n return p[1].compareTo(q[1]);\n }\n });\n int ans = 0;\n int last = 0;\n \n for(int i = 0;i<n;i++) {\n Integer[] tmp = arr.get(i);\n if(last<=tmp[0]) {\n last = tmp[1];\n ans++;\n }\n }\n System.out.println(ans);\n }", "public static void main(String[] args) {\n\t\tArrayList<Integer> primelist = sieve(7071);\n\t\tArrayList<Double> second = new ArrayList<Double>();\n\t\tfor(int one : primelist) \n\t\t\tsecond.add(Math.pow(one, 2));\n\t\tArrayList<Double> third = new ArrayList<Double>();\n\t\tprimelist = sieve(368);\n\t\tfor(int one : primelist)\n\t\t\tthird.add(Math.pow(one, 3));\n\t\tArrayList<Double> fourth = new ArrayList<Double>();\n\t\tprimelist = sieve(84);\n\t\tfor(int one : primelist)\n\t\t\tfourth.add(Math.pow(one, 4));\n\n\t\tArrayList<Double> possibilities = new ArrayList<Double>();\n\t\tfor (int k = fourth.size() - 1; k >=0 ; k--) {\n\t\t\tfor (int j = 0; j < third.size(); j++) {\n\t\t\t\tdouble sum = fourth.get(k) + third.get(j);\n\t\t\t\tif (sum > 50000000)\n\t\t\t\t\tbreak;\n\t\t\t\telse {\n\t\t\t\t\tfor (int i = 0; i < second.size(); i++) {\n\t\t\t\t\t\tdouble nextsum = sum + second.get(i);\n\t\t\t\t\t\tif (nextsum > 50000000)\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t// I am not sure whether it can be proved that the sum is unique.\n\t\t\t\t\t\t\tif (!possibilities.contains(nextsum))\n\t\t\t\t\t\t\t\tpossibilities.add(nextsum);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tint totalcount = possibilities.size();\n\t\tSystem.out.println(totalcount);\n\t}", "public static int smallStraightYahtzee(int... result) {\n\n Arrays.sort(result);\n\n int[] uniqueValues = IntStream.of(result).distinct().sorted().toArray();\n long noUniqVals = IntStream.of(uniqueValues).distinct().count();\n\n int score = 0;\n\n if (noUniqVals >= 4) {\n\n ArrayList<int[]> matchArrays = new ArrayList<>();\n matchArrays.add(new int[] {1, 2, 3, 4});\n matchArrays.add(new int[] {2, 3, 4, 5});\n matchArrays.add(new int[] {3, 4, 5, 6});\n\n ArrayList<int[]> resultSubArrays = new ArrayList<>();\n for (int i = 0; i < noUniqVals - 3; i++) {\n int[] testArr = Arrays.copyOfRange(uniqueValues, i, i + 4);\n resultSubArrays.add(testArr);\n }\n\n for (int[] arr : resultSubArrays) {\n for (int[] match : matchArrays) {\n if (Arrays.equals(arr, match)) {\n score = 30;\n }\n }\n }\n }\n return score;\n }", "private int[] process(int[] ip)\n\t{\n\t\tint[] result = new int[ip.length];\n\t\t//first multiply all numbers\n\t\tint x = ip[0];\n\t\tfor(int i=0; i<ip.length; i++)\n\t\t{\n\t\t\tx = x*ip[i];\n\t\t}\n\t\t\n\t\tfor(int i=0;i<ip.length; i++)\n\t\t{\n\t\t\tresult[i] = x / ip[i];\n\t\t}\n\t\treturn result;\n\t}", "private int m3423z(int i, int i2) {\n int i3;\n int i4;\n for (int size = this.f4373c.size() - 1; size >= 0; size--) {\n C0933b bVar = this.f4373c.get(size);\n int i5 = bVar.f4379a;\n if (i5 == 8) {\n int i6 = bVar.f4380b;\n int i7 = bVar.f4382d;\n if (i6 < i7) {\n i4 = i6;\n i3 = i7;\n } else {\n i3 = i6;\n i4 = i7;\n }\n if (i < i4 || i > i3) {\n if (i < i6) {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n bVar.f4382d = i7 - 1;\n }\n }\n } else if (i4 == i6) {\n if (i2 == 1) {\n bVar.f4382d = i7 + 1;\n } else if (i2 == 2) {\n bVar.f4382d = i7 - 1;\n }\n i++;\n } else {\n if (i2 == 1) {\n bVar.f4380b = i6 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i6 - 1;\n }\n i--;\n }\n } else {\n int i8 = bVar.f4380b;\n if (i8 <= i) {\n if (i5 == 1) {\n i -= bVar.f4382d;\n } else if (i5 == 2) {\n i += bVar.f4382d;\n }\n } else if (i2 == 1) {\n bVar.f4380b = i8 + 1;\n } else if (i2 == 2) {\n bVar.f4380b = i8 - 1;\n }\n }\n }\n for (int size2 = this.f4373c.size() - 1; size2 >= 0; size2--) {\n C0933b bVar2 = this.f4373c.get(size2);\n if (bVar2.f4379a == 8) {\n int i9 = bVar2.f4382d;\n if (i9 == bVar2.f4380b || i9 < 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n } else if (bVar2.f4382d <= 0) {\n this.f4373c.remove(size2);\n mo7620a(bVar2);\n }\n }\n return i;\n }", "public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n int t = in.nextInt();\n for(int a0 = 0; a0 < t; a0++){\n long n = in.nextLong();\n long sum=0;\n n--;\n long x=n-n%3;\n sum+=(x)*(x+3)/6;\n x=n-n%5;\n sum+=(x)*(x+5)/10;\n x=n-n%15;\n sum-=(x)*(x+15)/30;\n System.out.println(sum);\n in.close();\n }\n }", "public static void calcIntegersDivBy()\r\n\t{\r\n\t\tint x = 5;\r\n\t\tint y = 20;\r\n\t\tint p = 3;\r\n\t\tint result = 0;\r\n\t\tif (x % p == 0)\r\n\t\t\tresult = (y / p - x / p + 1);\r\n\t\telse\r\n\t\t\tresult = (y / p - x / p);\r\n\t\tSystem.out.println(result);\r\n\t}", "public static void main(String[] args) {\n\t\tint[] arr = {5,5,3,3,3,2,5};\n\t\tint[] result = solution(arr);\n\t\tfor(int n : result) {\n\t\t\tSystem.out.print(n + \" \");\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner sf = new Scanner(System.in);\n\t\tint tot = sf.nextInt();\n\t\tint[] arr = new int[tot];\n\t\tint[] res_i = new int[tot];\n\t\tint[] res_d = new int[tot];\n\t\t\n\t\tfor (int i = 0; i < tot; i++) {\n\t\t\tarr[i] = sf.nextInt();\n\t\t\tres_i[i] = 1;\n\t\t\tres_d[i] = 1;\n\t\t}\n\t\tfinder(arr, res_i, 0);\n\t\tfinder_rev(arr, res_d,arr.length-1);\n\t\tint max = 0;\n\t\tfor (int i = 0; i < res_d.length; i++) {\n\t\t\t if(max<res_d[i]+res_i[i]-1) { max = res_d[i]+res_i[i]-1; }\n\t\t\t\t\t}\n\t\tSystem.out.println(max);\n\t\tsf.close();\n\t}", "public static void main(String[] args) {\n\t\tint[] w = { 1, 4, 3 };\n\t\tint[] val = { 1500, 3000, 2000 };\n\t\tint m = 4;\n\t\tint n = val.length;\n\t\tint[][] v = new int[n + 1][m + 1];\n\t\tint[][] path = new int[n + 1][m + 1];\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tv[i][0] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v[0].length; i++) {\n\t\t\tv[0][i] = 0;\n\t\t}\n\t\tfor (int i = 0; i < v.length; i++) {\n\t\t\tfor (int j = 0; j < v[i].length; j++) {\n\t\t\t\tSystem.out.print(v[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\tfor (int i = 1; i < v.length; i++) {\n\t\t\tfor (int j = 1; j < v[i].length; j++) {\n\t\t\t\tif(w[i-1]>j) {\n\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t}else {\n\t\t\t\t\tif(v[i-1][j]<val[i-1]+v[i-1][j-w[i-1]]) {\n\t\t\t\t\t\tv[i][j]=val[i-1]+v[i-1][j-w[i-1]];\n\t\t\t\t\t\tpath[i][j]=1;\n\t\t\t\t\t}else {\n\t\t\t\t\t\tv[i][j]=v[i-1][j];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int[] i:v) {\n\t\t\tSystem.out.println(Arrays.toString(i));\n\t\t}\n\t}" ]
[ "0.60035276", "0.5991002", "0.59379226", "0.59360653", "0.59175587", "0.5891674", "0.5890819", "0.5885304", "0.58830124", "0.5852057", "0.5851355", "0.5841377", "0.583576", "0.5814751", "0.5811054", "0.5803322", "0.578039", "0.5774307", "0.57620937", "0.5761256", "0.575171", "0.57335836", "0.57318187", "0.5731608", "0.570884", "0.570317", "0.57031095", "0.5695613", "0.56929153", "0.56895643", "0.5687494", "0.5686371", "0.5685483", "0.5685478", "0.5682812", "0.5670426", "0.5667754", "0.5663691", "0.5661586", "0.56602037", "0.5648989", "0.5648978", "0.5641658", "0.5623962", "0.56237864", "0.5622295", "0.5621637", "0.5620492", "0.56194013", "0.5616731", "0.56160617", "0.5612938", "0.56118184", "0.5607251", "0.56060576", "0.56030816", "0.5600632", "0.5596222", "0.558925", "0.5588095", "0.5585844", "0.558281", "0.5582479", "0.55824006", "0.5581924", "0.55817866", "0.5580108", "0.5579808", "0.55780864", "0.5577351", "0.55768204", "0.557583", "0.5573228", "0.55706483", "0.5568183", "0.5568147", "0.5567221", "0.555637", "0.5552904", "0.55508095", "0.55389094", "0.5538615", "0.5532234", "0.5532192", "0.5530778", "0.55301267", "0.55282485", "0.5527872", "0.55247945", "0.55246127", "0.5523363", "0.55210644", "0.55190235", "0.5517494", "0.5517077", "0.5507404", "0.5500182", "0.54999363", "0.5499583", "0.5498423", "0.54931974" ]
0.0
-1
avl tree test ll rotate
@Test public void test1() { Integer[] data = new Integer[]{// 100, 50, 25, // }; baseRotateTest(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}", "private void doubleRotateLeftDel (WAVLNode z) {\n\t WAVLNode a = z.right.left;\r\n\t WAVLNode y = z.right;\r\n\t WAVLNode c = z.right.left.left;\r\n\t WAVLNode d = z.right.left.right;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.left=z;\r\n\t a.right=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.left=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.right=c;\r\n\t z.rank=z.rank-2;\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private void rotateLeftDel (WAVLNode z) {\n\t WAVLNode y = z.right;\r\n\t WAVLNode a = y.left;\r\n\t y.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=y;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=y;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=y;\r\n\t }\r\n\t \r\n\t y.left = z;\r\n\t y.rank++;\r\n\t z.parent=y;\r\n\t z.right = a;\r\n\t z.rank--;\r\n\t if(a.rank>=0) {\r\n\t\t a.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.left.sizen+a.sizen+1;\r\n\t y.sizen = z.sizen+y.right.sizen+1;\r\n }", "private int FixAVLtree(IAVLNode node)\r\n\t{\r\n\t\tif (node.isRealNode()) \r\n\t\t{\r\n\t\t\tif(BFCalc(node) == -2) \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==-1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or -1\r\n\t\t\t\tint rightBF=BFCalc(node.getRight());\r\n\t\t\t\tif(rightBF==0||rightBF==-1) {\r\n\t\t\t\t\tRRRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tRLRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse //if BFCalc(node) == 2 \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or 1\r\n\t\t\t\tint leftBF=BFCalc(node.getLeft());\r\n\t\t\t\tif(leftBF==1 ||leftBF==0) \r\n\t\t\t\t{\r\n\t\t\t\t\tLLRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tLRRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t} \r\n\t\t} \r\n\t\t\treturn 0;\r\n\t}", "private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}", "private void fixAVLTree(Node node) {\n\t\tfinal int lf = getLoadFactor(node);\n\t\t//if (lf == -1 || lf == 0 || lf == 1) {\n\t\tif (lf >= -1 && lf <= 1) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t}\t\t\n\t\trotateTree(node);\n\t}", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.right=z;\r\n\t a.left=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.right=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.left=c;\r\n\t z.rank=z.rank-2;\r\n\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "public int insert(int k, String i) { // insert a node with a key of k and info of i, the method returns the number of rebalance operation\r\n WAVLNode x = new WAVLNode(k,i);// create the new node to insert\r\n x.left=EXT_NODE;\r\n x.right=EXT_NODE;\r\n if(root==EXT_NODE) { // checking if the tree is empty, in that case put x as a root\r\n \t root=x;\r\n \t return 0;\r\n }\r\n WAVLNode y = treePos(this, k); // find the correct position to insert the node\r\n int [] f = {x.key,y.key};\r\n if (f[0]==f[1]) { // in case the key is already exists in the tree, return -1 and dosent insert anything\r\n \t \r\n \t return -1;\r\n }\r\n x.parent=y; \r\n if(y.rank!=0) {// if y is onary do:\r\n \t if(x.key<y.key) {// check if x should be left son of y\r\n \t\t y.left=x;\r\n \t }\r\n \t else { // x should be right son of y\r\n \t\t y.right=x;\r\n \t }\r\n \t return 0; // no rebalance operation was needed, return 0\r\n }\r\n if(x.key<y.key) { // if y is a leaf\r\n \t y.left=x;\r\n }\r\n else {\r\n \t y.right=x;\r\n }\r\n int cnt=0;//rebalance operation to return\r\n while(x.parent!=null&&x.parent.rank-x.rank==0) { // while the tree is not balanced continue to balance the tree\r\n \t if(parentside(x.parent, x).equals(\"left\")) { // check if x is a left son of x's parent\r\n \t\t if (x.parent.rank-x.parent.right.rank==1) {//check the conditions for promotion\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.left.rank==1) { // check the conditions for rotate\r\n \t\t\t rightRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t doubleRotateleft(x); // check the conditions for double rotate\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n \t else { // x is a right son of x's parent, all conditions and actions are symmetric to the left side\r\n \t\t if (x.parent.rank-x.parent.left.rank==1) {\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.right.rank==1) {\r\n \t\t\t leftRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t \r\n \t\t\t doubleRotateright(x);\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n }\r\n return cnt;\r\n \r\n }", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "private void rotateRightDel (WAVLNode z) {\n\t WAVLNode x = z.left;\r\n\t WAVLNode d = x.right;\r\n\t x.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=x;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=x;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=x;\r\n\t }\r\n\t x.right = z;\r\n\t x.rank++;\r\n\t z.parent=x;\r\n\t z.left = d;\r\n\t z.rank--;\r\n\t if(d.rank>=0) {\r\n\t\t d.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.right.sizen+d.sizen+1;\r\n\t x.sizen = z.sizen+x.left.sizen+1;\r\n }", "private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }", "Node leftRotate(Node x) { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = maxInt(heightBST(x.left), heightBST(x.right)) + 1; \n y.height = maxInt(heightBST(y.left), heightBST(y.right)) + 1; \n \n // Return new root \n return y; \n }", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "private void leftRightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getRight();\n AVLNode<T> oldNodeLeft = node.getLeft();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setLeft(nodeDat);\n if (oldNodeLeft != null) {\n node.getLeft().setLeft(oldNodeLeft);\n calcDeterminants(node.getLeft().getLeft());\n }\n node.setData(child.getData());\n if (oldChildLeft != null) {\n node.getLeft().setRight(oldChildLeft);\n calcDeterminants(node.getLeft().getRight());\n } else {\n node.getLeft().setRight(null);\n calcDeterminants(node.getLeft());\n }\n if (oldChildRight != null) {\n node.setRight(oldChildRight);\n calcDeterminants(node.getRight());\n } else {\n node.setRight(null);\n calcDeterminants(node.getLeft());\n }\n\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private void rightLeftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getLeft();\n AVLNode<T> oldNodeRight = node.getRight();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setRight(nodeDat);\n if (oldNodeRight != null) {\n node.getRight().setRight(oldNodeRight);\n calcDeterminants(node.getRight().getRight());\n }\n node.setData(child.getData());\n if (oldChildRight != null) {\n node.getRight().setLeft(oldChildRight);\n calcDeterminants(node.getRight().getLeft());\n } else {\n node.getRight().setLeft(null);\n calcDeterminants(node.getRight());\n }\n if (oldChildLeft != null) {\n node.setLeft(oldChildLeft);\n calcDeterminants(node.getLeft());\n } else {\n node.setLeft(null);\n calcDeterminants(node.getRight());\n }\n\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private BinaryNode<AnyType> rotateLeft1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t BinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.right.left;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp2.left=null;\r\n\t\t root=temp2;\r\n\t\t root.left=parno;\r\n\t\t root.left.right=temp3;\r\n\t\t root.left.left=temp1;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.left;\r\n\t\t\tparno.left=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.left.left;\r\n\t\t\tparno.left.left=temp;\r\n\t\t\tparno.left.left.right=templ;\r\n\t\t}\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.right;\r\n\t\t\tparno.right=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.right.left;\r\n\t\t\tparno.right.left=temp;\r\n\t\t\tparno.right.left.right=templ;\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private AVLNode<T> rotateLeft(AVLNode<T> node) {\n AVLNode<T> substitute = node.right;\n // donde ponemos los hijos a la izquierda del substituto\n node.right = substitute.left;\n substitute.left = node;\n\n return substitute;\n }", "private AvlNode<E> rotateWithRightChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.right;\n k1.right = k2.left;\n k2.left = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(k1.height, height(k2.right)) + 1;\n return k2;\n }", "public interface AVLTree<E extends Comparable<E>> extends BinarySortedTree<E>{\n\n boolean isAVLTree(AVLNode<E> current);\n\n interface AVLNode<E>{\n E getData();\n\n AVLNode setData(E data);\n\n AVLNode<E> getParent();\n\n AVLNode setParent(AVLNode<E> parent);\n\n AVLNode<E> getLeft();\n AVLNode setLeft(AVLNode<E> left);\n\n AVLNode<E> getRight();\n\n AVLNode setRight(AVLNode<E> right);\n\n int getHeight();\n\n AVLNode setHeight(int height);\n }\n}", "private static <V> IntTree<V> rebalanced(\n final long key, final V value, final IntTree<V> left, final IntTree<V> right) {\n if (left.size + right.size > 1) {\n if (left.size >= OMEGA * right.size) { // rotate to the right\n IntTree<V> ll = left.left, lr = left.right;\n if (lr.size < ALPHA * ll.size) // single rotation\n return new IntTree<V>(\n left.key + key,\n left.value,\n ll,\n new IntTree<V>(-left.key, value, lr.withKey(lr.key + left.key), right));\n else { // double rotation:\n IntTree<V> lrl = lr.left, lrr = lr.right;\n return new IntTree<V>(\n lr.key + left.key + key,\n lr.value,\n new IntTree<V>(-lr.key, left.value, ll, lrl.withKey(lrl.key + lr.key)),\n new IntTree<V>(\n -left.key - lr.key, value, lrr.withKey(lrr.key + lr.key + left.key), right));\n }\n } else if (right.size >= OMEGA * left.size) { // rotate to the left\n IntTree<V> rl = right.left, rr = right.right;\n if (rl.size < ALPHA * rr.size) // single rotation\n return new IntTree<V>(\n right.key + key,\n right.value,\n new IntTree<V>(-right.key, value, left, rl.withKey(rl.key + right.key)),\n rr);\n else { // double rotation:\n IntTree<V> rll = rl.left, rlr = rl.right;\n return new IntTree<V>(\n rl.key + right.key + key,\n rl.value,\n new IntTree<V>(\n -right.key - rl.key, value, left, rll.withKey(rll.key + rl.key + right.key)),\n new IntTree<V>(-rl.key, right.value, rlr.withKey(rlr.key + rl.key), rr));\n }\n }\n }\n // otherwise already balanced enough:\n return new IntTree<V>(key, value, left, right);\n }", "public nodoArbolAVL insertarAVL(nodoArbolAVL nuevo,nodoArbolAVL subAr){\n nodoArbolAVL nuevoPadre = subAr;\n if(nuevo.dato < subAr.dato){\n if(subAr.hijoIzquierdo == null){\n subAr.hijoIzquierdo = nuevo;\n }else{\n subAr.hijoIzquierdo = \n insertarAVL(nuevo,subAr.hijoIzquierdo);\n if((obtenerFE(subAr.hijoIzquierdo)-obtenerFE(subAr.hijoDerecho)==2)){\n if(nuevo.dato < subAr.hijoIzquierdo.dato){\n nuevoPadre = rotacionIzquierda(subAr);\n }else{\n nuevoPadre = rotacionDobleIzquierda(subAr);\n }\n }\n }\n }else if(nuevo.dato > subAr.dato){\n if(subAr.hijoDerecho == null){\n subAr.hijoDerecho = nuevo;\n \n }else{\n subAr.hijoDerecho = insertarAVL(nuevo,subAr.hijoDerecho);\n if((obtenerFE(subAr.hijoDerecho)-obtenerFE(subAr.hijoIzquierdo)==-2)){\n if(nuevo.dato > subAr.hijoDerecho.dato){\n nuevoPadre = rotacionDerecha (subAr);\n }else{\n nuevoPadre = rotacionDobleDerecha(subAr);\n }\n }\n }\n }else{\n System.out.println(\"NODO DUPLICADO\");\n }\n //ACTUALIZANDO EL FE\n if((subAr.hijoIzquierdo == null)&&(subAr.hijoDerecho !=null)){\n subAr.fe = subAr.hijoDerecho.fe + 1;\n }else if((subAr.hijoDerecho == null)&&(subAr.hijoIzquierdo != null)){\n subAr.fe = subAr.hijoIzquierdo.fe +1 ;\n }else{\n subAr.fe = Math.max(obtenerFE(subAr.hijoIzquierdo),\n obtenerFE(subAr.hijoDerecho))+1;\n }\n nuevo.SetNivel(nuevo.nivel+1);\n return nuevoPadre;\n }", "private AVLNode<T, U> rotateLeft(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getRight();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setRight(newRoot.getLeft());\n\t\t\t \n\t\tif(oldRoot.getRight() != null) {\n\t\t\toldRoot.getRight().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setLeft(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "private BinaryNode<AnyType> rotateRight1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t\tBinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.left.right;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp1.right=null;\r\n\t\t root=temp1;\r\n\t\t root.right=parno;\r\n\t\t root.right.left=temp3;\r\n\t\t root.right.right=temp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.left;\r\n\t\t\tparno.left=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.left.right;\r\n\t\t\tparno.left.right=temp;\r\n\t\t\tparno.left.right.left=tempr;\r\n\t\t}\r\n\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.right;\t\t\r\n\t\t\tparno.right=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.right.right;\r\n\t\t\tparno.right.right=temp;\r\n\t\t\tparno.right.right.left=tempr;\r\n\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private void doubleRotateleft(WAVLNode x) {\n\t WAVLNode z=x.right;\r\n\t leftRotate(z);\r\n\t z.rank+=1;\r\n\t rightRotate(z);\r\n }", "private AVLTreeNode<E> smallRotateRight(AVLTreeNode<E> node) {\n AVLTreeNode<E> q = node.getLeft();\n node.setLeft(q.getRight());\n q.setRight(node);\n node.fixHeight();\n q.fixHeight();\n return q;\n }", "private void leftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private void doubleRotationLR(BinaryNode node) {\n BinaryNode temp = max(node.left);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the left\n temp.parent.right = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n root.parent = null;\n root.right = node;\n root.left = node.left;\n if(node.left != null) node.left.parent = root;\n node.parent = root;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.left = node.left;\n if(node.left != null) node.left.parent = temp;\n temp.right = node;\n node.parent = temp;\n node.left = null;\n }\n }", "AVLNode delete(AVLNode node, int key) {\n if (node == null) \n return node; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < node.key) \n node.left = delete(node.left, key); \n \n // If the key to be deleted is greater than the \n // root's key, then it lies in right subtree \n else if (key > root.key) \n node.right = delete(node.right, key); \n \n // if key is same as root's key, then this is the node \n // to be deleted \n else\n { \n \n // node with only one child or no child \n if ((node.left == null) || (node.right == null)) \n { \n AVLNode temp = null; \n if (temp == node.left) \n temp = node.right; \n else\n temp = node.left; \n \n if (temp == null) \n { \n temp = node; \n node = null; \n } \n else \n node = temp; \n } \n else\n { \n AVLNode temp = getSucc(node.right); \n node.key = temp.key; \n node.right = delete(node.right, temp.key); \n } \n } \n \n if (node== null) \n return node; \n \n node.height = max(height(node.left), height(node.right)) + 1; \n \n int balance = getBF(node); \n \n if (balance > 1 && getBF(node.left) >= 0) \n return rightrot(node); \n \n if (balance > 1 && getBF(node.left) < 0) \n { \n node.left = leftrot(node.left); \n return rightrot(node); \n } \n \n if (balance < -1 && getBF(node.right) <= 0) \n return leftrot(node); \n\n if (balance < -1 && getBF(node.right) > 0) \n { \n node.right = rightrot(node.right); \n return leftrot(node); \n } \n return node;\n }", "public interface IAVLNode{\t\r\n\t\tpublic int getKey(); //returns node's key (for virtuval node return -1)\r\n\t\tpublic String getValue(); //returns node's value [info] (for virtuval node return null)\r\n\t\tpublic void setValue(String value); // sets the value of the node\r\n\t\tpublic void setLeft(IAVLNode node); //sets left child\r\n\t\tpublic IAVLNode getLeft(); //returns left child (if there is no left child return null)\r\n\t\tpublic void setRight(IAVLNode node); //sets right child\r\n\t\tpublic IAVLNode getRight(); //returns right child (if there is no right child return null)\r\n\t\tpublic void setParent(IAVLNode node); //sets parent\r\n\t\tpublic IAVLNode getParent(); //returns the parent (if there is no parent return null)\r\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\r\n\t\tpublic void setHeight(int height); // sets the height of the node\r\n \tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\r\n \tpublic void setKey(int key); // Sets the key of the node\r\n \tpublic void setSize(int size); // sets the number of real nodes in this node's subtree\r\n \tpublic int getSize(); // Returns the number of real nodes in this node's subtree (Should be implemented in O(1))\r\n\t}", "private AVLTreeNode<E> smallRotateLeft(AVLTreeNode<E> node) {\n AVLTreeNode<E> p = node.getRight();\n node.setRight(p.getLeft());\n p.setLeft(node);\n node.fixHeight();\n p.fixHeight();\n return p;\n }", "private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }", "private void leftRotate(RedBlackNode<T> x){\n leftRotateFixup(x);\n\n RedBlackNode<T> y;\n y = x.right;\n x.right = y.left;\n\n // czy istnieje y.left i zamiana referencji\n if (!isNil(y.left))\n y.left.parent = x;\n y.parent = x.parent;\n\n // x.parent jest nil\n if (isNil(x.parent))\n root = y;\n\n // x jest lewym dzieckiem swojego rodzica\n else if (x.parent.left == x)\n x.parent.left = y;\n\n //x jest prawym dzieckiem swojego rodzica\n else\n x.parent.right = y;\n\n y.left = x;\n x.parent = y;\n }", "private AVLNode<T, U> rotateRight(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getLeft();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setLeft(newRoot.getRight());\n\t\t\t \n\t\tif(oldRoot.getLeft() != null) {\n\t\t\toldRoot.getLeft().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setRight(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "public int delRecTriOne(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tint rightEdge = node.right.getHeight() - node.right.getRight().getHeight();\n\t\t\tint leftEdge = node.right.getHeight() - node.right.getLeft().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (leftEdge == 2) {// case 3\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// leftEdge==1, case 4\n\t\t\t\tAVLNode rightsLeftChild = (AVLNode) node.getRight().getLeft();\n\t\t\t\tint numOp = this.doubleRotation(rightsLeftChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getRight().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\n\t\t}\n\n\t\telse { // side='R'\n\t\t\tint leftEdge = node.left.getHeight() - node.left.getLeft().getHeight();\n\t\t\tint rightEdge = node.left.getHeight() - node.left.getRight().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (rightEdge == 2) {// case 3\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// rightEdge==1, leftEdge==2, case 4\n\t\t\t\tAVLNode leftsRightChild = (AVLNode) node.getLeft().getRight();\n\t\t\t\tint numOp = this.doubleRotation(leftsRightChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getLeft().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\t\t}\n\t}", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = max(height(x.left), height(x.right)) + 1; \n y.height = max(height(y.left), height(y.right)) + 1; \n \n // Return new root \n return y; \n }", "public void leftRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.rightChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// If pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\t// do this if root has a parent\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\t// if root is going left to the root's parent, then set pivot to\r\n\t\t\t\t// left of the root.\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be on the left of parent\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// if root is going right of root's parent, then set pivot to\r\n\t\t\t\t// right of the root.\r\n\t\t\t\telse if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be on the right of the parent.\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent.\r\n\t\t\telse {\r\n\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "private void rotateLeft(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode y = x.right;\n\t RedBlackNode BSubTree = y.left;\n\t y.left = x;\n\t x.parent = y;\n\t x.right = BSubTree;\n\t //analyse whether need to have Nil check in this code\n\t BSubTree.parent = x;\n\t if(xParent == this.Nil){\n\t\t this.root = y;\n\t\t y.parent = this.Nil;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t\t y.parent = xParent;\n\t }else{\n\t\t xParent.right = y;\n\t\t y.parent = xParent;\n\t }\n\t \n }", "private AVLNode<T> rotateRight(AVLNode<T> node) {\n AVLNode<T> substiute = node.left;\n node.left = substiute.right;\n substiute.right = node;\n\n // node = substitute;\n\n return substiute;\n }", "@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }", "AVLTreeNode insert(AVLTreeNode node, int key)\r\n {\n if (node == null)\r\n {\r\n return new AVLTreeNode(key);\r\n }\r\n\r\n if (key < node.key)\r\n {\r\n node.left = insert(node.left, key);\r\n }\r\n else if (key > node.key)\r\n {\r\n node.right = insert(node.right, key);\r\n }\r\n else\r\n {\r\n return node;\r\n }\r\n\r\n // now update the height of the node\r\n updateHeight(node);\r\n\r\n // check the balance at this node and perform rotations accordingly\r\n int balance = getBalance(node);\r\n\r\n if (balance > 1) // indicates either left-left or left-right case\r\n {\r\n if (key < node.left.key) // confirms left-left case\r\n {\r\n node = rightRotate(node);\r\n }\r\n else // confirms left-right case\r\n {\r\n node.left = leftRotate(node.left);\r\n node = rightRotate(node);\r\n }\r\n }\r\n\r\n else if (balance < -1) // indicates either right-right or right-left case\r\n {\r\n if (key > node.right.key) // confirms right-right case\r\n {\r\n node = leftRotate(node);\r\n }\r\n else // confirms right-left case\r\n {\r\n node.right = rightRotate(node.right);\r\n node = leftRotate(node);\r\n }\r\n }\r\n return node;\r\n }", "private void rotateRight(Node tree) {\n assert tree != null;\n assert tree.left != null;\n\n Node temp = tree.left;\n tree.left = temp.right;\n if(temp.right != null) { //no null pointers\n temp.right.parent = tree;\n }\n temp.parent = tree.parent;\n if(temp.parent != null) { //am i at the root?\n if(temp.parent.left == tree) {\n temp.parent.left = temp;\n } else if (temp.parent.right == tree) {\n temp.parent.right = temp;\n }\n }\n tree.parent = temp;\n temp.right = tree;\n if(tree == root) { root = temp; } //rewrite the root\n rotations += 1;\n }", "private void balanceTree(AVLNode<T> node) {\n AVLNode<T> parent = null;\n int parBal = 0;\n if (node.getHeight() == 0) {\n if (!(node.getData().equals(root.getData()))) {\n balanceTree(getParent(root, node));\n } else {\n parent = node;\n parBal = parent.getBalanceFactor();\n }\n } else {\n if (node.getData().equals(root.getData())) {\n parent = node;\n parBal = parent.getBalanceFactor();\n } else {\n parent = getParent(root, node);\n if (parent != null) {\n parBal = parent.getBalanceFactor();\n }\n }\n }\n\n if (parBal < -1 && node.getBalanceFactor() <= 0) {\n leftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() >= 0) {\n rightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal < -1 && node.getBalanceFactor() > 0) {\n rightLeftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() < 0) {\n leftRightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else {\n if (parent != null && !(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n }\n }", "private void rightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private void doubleRotationRL(BinaryNode node) {\n BinaryNode temp = min(node.right);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the right\n temp.parent.right = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n root.parent = null;\n root.left = node;\n root.right = node.right;\n if(node.right != null) node.right.parent = root;\n node.parent = root;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.right = node.right;\n if(node.right != null) node.right.parent = temp;\n temp.left = node;\n node.parent = temp;\n node.right = null;\n }\n }", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "protected void rotateLeft(BSTNode n) {\n\n\t\tassert (n != null);\n\n\t\tBSTNode pv = n.right;\n\t\tassert (pv != null);\n\n\t\t// promote pv\n\t\tpv.parent = n.parent;\n\n\t\tif (n.parent == null) {\n\t\t\tif (n == _root) {\n\t\t\t\t_root = pv;\n\t\t\t} else {\n\t\t\t\t// do nothing, pv has no parent to notify\n\t\t\t}\n\t\t} else {\n\t\t\tsetParentReference(n, pv);\n\t\t}\n\n\t\t// move pv's left subtree over to n's right\n\t\tn.right = pv.left;\n\t\tif (n.right != null)\n\t\t\tn.right.parent = n;\n\n\t\t// move n to be the left child of pv\n\t\tpv.left = n;\n\t\tn.parent = pv;\n\n\t\t_stats.incRotations();\n\n\t\t/*\n\t\t * Fixup other tree stats\n\t\t */\n\n\t\tn.size = 1 + (n.left != null ? n.left.size : 0)\n\t\t\t\t+ (n.right != null ? n.right.size : 0);\n\n\t\tpv.size = 1 + n.size + (pv.right != null ? pv.right.size : 0);\n\t}", "private Node leftRotate(Node a) {\n Node b = a.getRightChild();\n Node n2 = b.getLeftChild();\n b.setLeftChild(a);\n a.setRightChild(n2);\n setHeights(a, b);\n return b;\n }", "public AVLNode rotateLeft(AVLNode x) {\n AVLNode y = x.getRight();\n AVLNode T2 = y.getLeft();\n \n //rotation\n y.setLeft(x);\n x.setRight(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return y;\n }", "public AVLNode deleteNodeImmersion(AVLNode treeRoot, int key) {\n if (treeRoot == null) {\n // Sub tree is empty\n // End operation\n return treeRoot;\n }\n\n // Sub tree is NOT empty so we have to perform the recursive descent\n if (key < treeRoot.getKey()) {\n // The key of the current node is less than the key we are looking for\n // Recursive descent through the left\n treeRoot.setLeft(deleteNodeImmersion(treeRoot.getLeft(), key));\n } else if (key > treeRoot.getKey()) {\n // The key of the current node is greater than the key we are looking for\n // Recursive descent through the right\n treeRoot.setRight(deleteNodeImmersion(treeRoot.getRight(), key));\n } else {\n // Key already exists, so we cannot add a new element with the same key\n treeRoot = this.handleDeletion(treeRoot);\n }\n\n // After applying the removal, let's see if rotations need to be applied\n\n // Case of tree with just one node: it is not necessary to apply rotations\n if (treeRoot == null) {\n return treeRoot;\n }\n\n // After inserting the element, we must increase the height of the current node\n // so we can later compute the height of the whole tree.\n // Let's compute height below using child heights\n int heightBelow = IntegerUtilities.max(height(treeRoot.getLeft()), height(treeRoot.getRight()));\n // Increase the height of the current node\n treeRoot.setHeight(heightBelow + 1);\n\n // Compute the balance factor of this node\n int balance = getBalance(treeRoot);\n\n // Check if this node is unbalanced\n if (balance > 1 || balance < -1) {\n\n // This node is unbalanced\n // Let's check the case\n\n if (balance > 1) {\n // Case Left Left / case Left Right\n if (getBalance(treeRoot.getLeft()) >= 0) {\n // Case Left Left: Right Rotation\n return rightRotate(treeRoot);// Right Rotation\n } else if (getBalance(treeRoot.getLeft()) < 0) {\n // Case Left Right: Left Rotation and Right Rotation\n treeRoot.setLeft(leftRotate(treeRoot.getLeft()));// Left Rotation\n return rightRotate(treeRoot);// Right Rotation\n }\n } else {// balance < -1\n // Case Right Right / case Right Left\n if (getBalance(treeRoot.getRight()) <= 0) {\n // Case Right Right: Left Rotation\n return leftRotate(treeRoot);// Left Rotation\n } else if (getBalance(treeRoot.getRight()) > 0) {\n // Case Right Left: Right Rotation and Left Rotation\n treeRoot.setRight(rightRotate(treeRoot.getRight()));// Right Rotation\n return leftRotate(treeRoot);// Left Rotation\n }\n }\n }\n\n return treeRoot;\n }", "private void singleRotationRL(BinaryNode node) {\n if (node == root) {\n root = node.right;\n root.parent = null;\n root.left = node;\n node.parent = node.right;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.right;\n } else {\n node.parent.left = node.right;\n }\n node.right.parent = node.parent;\n node.right.left = node;\n node.parent = node.right;\n node.right = null;\n }\n }", "public int singleRotation(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setLeft(node.right);\n\t\t\tnode.right.setParent(node.parent);\n\t\t\tnode.setRight(node.parent);\n\t\t\tnode.setParent(node.getRight().getParent());\n\t\t\tnode.right.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.right.setHeight(node.right.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.right.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\n\t\telse {// side == 'R'\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setRight(node.left);\n\t\t\tnode.left.setParent(node.parent);\n\t\t\tnode.setLeft(node.parent);\n\t\t\tnode.setParent(node.getLeft().getParent());\n\t\t\tnode.left.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.left.setHeight(node.left.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.left.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\t}", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n\n // Perform rotation \n y.left = x; \n x.right = T2; \n\n // Update heights \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n\n // Return new root \n return y; \n }", "private long leftRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentRight = current.right;\r\n Node tempN = new Node(current.right);\r\n current.right = tempN.left;\r\n tempN.left = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentRight);\r\n return currentRight;\r\n }", "public void rightRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.leftChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// if the pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be to the left of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t} else if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be to the right of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent\r\n\t\t\telse {\r\n\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public int case1(AVLNode node, int bottomLeftEdge) {\n\t\tchar sideOfNode = node.parentSide();\n\t\tif (sideOfNode == 'N') {\n\t\t\tnode.setSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getHeight() == 1) {\n\t\t\tnode.setSize();\n\t\t\tnode.updateSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (sideOfNode == 'L') {\n\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\tif (rightEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 1;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // rightEdge == 2\n\t\t\t\tif (bottomLeftEdge == 1) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 2, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getRight(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // sideOfNode == 'R'\n\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\tif (leftEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 2;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // leftEdge == 2\n\t\t\t\tif (bottomLeftEdge == 2) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 1, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getLeft(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private int HieghtsUpdating(IAVLNode node) \r\n\t{\r\n\t\tint moneRot = 0;\r\n\t\twhile (node != null) //as long as we didn't reached root's parent\r\n\t\t{\r\n\t\t\tif ((BFCalc(node) < -1) || (BFCalc(node) > 1)) //if AVL isn't balanced \r\n\t\t\t\tmoneRot+= FixAVLtree(node); \r\n \r\n\t\t\tnode.setSize(sizeCalc(node));\r\n\t\t\tif(HeightCalc(node) != node.getHeight()) {\r\n\t\t\t\tmoneRot += Math.abs(HeightCalc(node)-node.getHeight());\r\n\t\t\t\tnode.setHeight(HeightCalc(node));\r\n\t\t\t}\r\n\t\t\tnode = node.getParent();\r\n\t\t}\r\n\t\treturn moneRot;\r\n\t}", "Node leftRotate(Node x)\n\t\t{\n\t\t\tNode y=x.right;\n\t\t\tNode T2=y.left;\n\t\t\t\n\t\t\t//rotate\n\t\t\t\n\t\t\ty.left=x;\n\t\t\tx.right=T2;\n\t\t\t\n\t\t\t//update heights\n\t\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\t\n\t\t\t// new root\n\t\t\treturn y;\n\t\t}", "protected Node<E> rotateLeft(Node<E> root) {\r\n\t\tNode<E> temp = root.right;\r\n\t\troot.right = temp.left;\r\n\t\ttemp.left = root;\r\n\t\treturn temp;\t\r\n\t}", "public AVLNode() {\n\t\t\tthis.key = -1;\n\t\t\tthis.val = null;\n\t\t\tthis.left = null;\n\t\t\tthis.right = null;\n\t\t\tthis.parent = null;\n\t\t\tthis.rank = -1;\n\t\t\tthis.size = 0;\n\t\t}", "private NodeTreeBinary<T> rotateLeft(NodeTreeBinary<T> h) {\n\t\tNodeTreeBinary<T> x = h.getRight();\n\n\t\th.setRight(x.getLeft());\n\t\tx.setLeft(h);\n\t\tsetColor(x, getColor(x.getLeft()));\n\t\tsetColor(x.getLeft(), NodeTreeRB.RED);\n\n\t\tsetSize(x, getSize(h));\n\t\tsetSize(h, getSize(h.getLeft()) + getSize(h.getRight()) + 1);\n\n\t\treturn x;\n\t}", "public int delete(int k){\n\t WAVLNode x = treePosForDel(this, k); // find the node to delete\r\n\t int cnt = 0; // rebalance operations counter\r\n\t if(x.key!=k) { // if a node with a key of k doesnt exist in the tree there is nothing to delete, return -1\r\n\t\t return -1;\r\n\t }\r\n\t if(this.root.key==x.key&&this.root.rank==0) {//root is a leaf\r\n\t\t this.root=EXT_NODE;// change the root pointer to EXT_NODE\r\n\t\t return 0;\r\n\t }\r\n\t else if(this.root.key==x.key&&(this.root.right==EXT_NODE||this.root.left==EXT_NODE)) {//root is onary\r\n\t\t if(x.left!=EXT_NODE) { // x is a root with a left child\r\n\t\t\t x.left.parent = null;\r\n\t\t\t this.root = x.left; // change the root pointer to the root's left child\r\n\t\t\t x.left.sizen=1;\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t x.right.parent = null; // x is a root with a right child \r\n\t\t x.right.sizen=1;\r\n\t\t this.root = x.right; // change the root pointer to the root's right child\r\n\t\t return 0;\r\n\t }\r\n\t WAVLNode z;\r\n\t if(isInnerNode(x)) {// x is an inner node, requires a call for successor and swap\r\n\t\t z = successorForDel(x); // find the successor of x\r\n\t\t x = swap(x,z); // put x's successor instead of x and delete successor \r\n\t }\r\n\t\t if(x.rank == 0) {//x is a leaf\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.left = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.left;\r\n\t\t\t }\r\n\t\t\telse { // x is a right child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.right = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.right; \r\n\t\t\t }\r\n\t\t }\r\n\t\t else {//x is onary\r\n\t\t\t boolean onaryside = onaryLeft(x); // check if x is onary with a left child\r\n\t\t\t WAVLNode x_child = EXT_NODE;\r\n\t\t\t if (onaryside) {\r\n\t\t\t\t x_child=x.left; // get a pointer for x child\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x_child=x.right;\r\n\t\t\t }\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.left=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {// x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.right=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t }\r\n\t\t }\r\n\t if (z.left.rank==-1&&z.right.rank==-1) {//special case, z becomes a leaf, change pointers and demote\r\n\t\t demote(z);\r\n\t\t x=z;\r\n\t\t z=z.parent;\r\n\t\t cnt++;\r\n\t }\r\n\t \r\n\t while(z!=null&&z.rank-x.rank==3) { // while the tree is not balanced continue to balance the tree\r\n\t\t if(parentside(z, x).equals(\"left\")) { // x is z's left son\r\n\t\t\t if(z.rank-z.right.rank==2) {//condition for demote\r\n\r\n\t\t\t\t demote(z);\r\n\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.right.rank-z.right.left.rank==2&&z.right.rank-z.right.right.rank==2) {//condition for doubledemote left\r\n\t\t\t\t\t doubleDemoteLeft(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t\t else if((z.right.rank-z.right.left.rank==1||z.right.rank-z.right.left.rank==2)&&z.right.rank-z.right.right.rank==1) {// condition for rotate left for del\r\n\t\t\t\t\t rotateLeftDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t\t else {//condition for doublerotate left for del\r\n\t\t\t\t\t doubleRotateLeftDel(z);\r\n\t\t\t\t\t \r\n\t\t\t\t\t cnt=cnt+5;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t else { // x is z's right son, conditions are symmetric to left side\r\n\t\t\t if(z.rank-z.left.rank==2) {\r\n\t\t\t\t demote(z);\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.left.rank-z.left.right.rank==2&&z.left.rank-z.left.left.rank==2) {\r\n\t\t\t\t\t doubleDemoteright(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t }\r\n\t\t\t\t else if((z.left.rank-z.left.right.rank==1||z.left.rank-z.left.right.rank==2)&&z.left.rank-z.left.left.rank==1) {\r\n\t\t\t\t\t rotateRightDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\r\n\t\t\t\t\t doubleRotateRightDel(z);\r\n\t\t\t\t\t cnt+=5;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t return cnt;\r\n }", "@Test\n void removeLeaves_on3HeightLeftSpindlyTree_returnsCorrectTree() {\n IntTree tree = new IntTree(6,\n 5, 2,\n 4, null, null, null,\n 1, 3);\n IntTreeProblems.removeLeaves(tree);\n IntTree expected = new IntTree(6,\n 5, null,\n 4);\n assertThat(tree).isEqualTo(expected);\n }", "private void leftRotateFixup(RedBlackNode x){\n\n // Przypadek 1: tylko x, x.right i x.right.right są nil.\n if (isNil(x.left) && isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 0;\n x.right.numLeft = 1;\n }\n\n // Przypadek 2: x.right.left istnieje w dodatku do przypadku 1\n else if (isNil(x.left) && !isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 2 + x.right.left.numLeft +\n x.right.left.numRight;\n }\n\n // Przypadek 3: x.left także istnieje w dodatku do przypadku 1\n else if (!isNil(x.left) && isNil(x.right.left)){\n x.numRight = 0;\n x.right.numLeft = 2 + x.left.numLeft + x.left.numRight;\n\n }\n\n // Przypadek 4: x.left i x.right.left istnieją w dodatku do przypadku 1\n else{\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 3 + x.left.numLeft + x.left.numRight +\n x.right.left.numLeft + x.right.left.numRight;\n }\n }", "private void splay(Node tree) {\n assert(tree != null);\n while(tree.parent != null && tree.parent.parent != null) { //while has a parent and a grandparent\n if(tree.parent.left == tree && tree.parent.parent.left == tree.parent) { //zig-zig case\n rotateRight(tree.parent.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.left == tree.parent) { //zig-zag case\n rotateLeft(tree.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.right == tree.parent) { //zag-zag case\n rotateLeft(tree.parent.parent);\n rotateLeft(tree.parent);\n } else if(tree.parent.left == tree && tree.parent.parent.right == tree.parent) { //zag-zig case\n rotateRight(tree.parent);\n rotateLeft(tree.parent);\n }\n }\n if(tree != root) { //tree is only of depth 1\n if (root.left == tree) { //zig\n rotateRight(root);\n } else { //zag\n rotateLeft(root);\n }\n }\n }", "public int compareTo(LeafPage node) {\r\n//\t\tSystem.out.println(\"Leaf compare\");\r\n if (this.getKey(0)>node.getKey(0)){\r\n \treturn 1;\r\n } else if(this.getKey(0)<node.getKey(0)){\r\n \treturn -1;\r\n }\r\n return 0;\r\n }", "public AVLNode rotateLeft(AVLNode pt) {\n\t\tAVLNode node = pt.getRight();\n\t\t\n\t\tpt.setRight(node.getLeft());\n\t\tnode.setLeft(pt);\n\t\t\n\t\treturn node;\n\t}", "@Test\n public void testGetLeft() {\n AVLNode<Integer> left = new AVLNode<> ( 4 );\n AVLNode<Integer> instance = new AVLNode<>( 7);\n instance.setLeft(left);\n AVLNode<Integer> expResult = left;\n AVLNode<Integer> result = instance.getLeft();\n assertEquals(expResult, result);\n }", "boolean insertNode(RBTreeNode curr, RBTreeNode node) {\n int dir1 = curr.getDirection(node);\n int dir2 = dir1 ==0 ? 1 : 0;\n\n if(curr.children[dir1] == null) {\n curr.children[dir1] = node;\n return true;\n }\n\n if(isRedNode(curr)) {\n //Case 1: Case where we can flip colors and black height remains unchanged\n if(isRedNode(curr.children[dir1]) ) {\n if(isRedNode(curr.children[dir2])) {\n curr.children[dir1].isRed = true;\n curr.children[dir2].isRed = true;\n curr.isRed = false;\n return true;\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir1])) { //Case 2 and 3 //single rotation\n //RBTreeNode temp = singleRotate(curr,dir1,dir1); //Java no pointers :( So need to copy the returned val\n //curr.update(temp);\n curr.update(singleRotate(curr,dir1,dir1));\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir2])) { //Case 2 and 3 // double rotation\n //doubleRotate\n\n }\n } else {\n //do nothing as black height is unchanged and red red violation\n }\n }//not sure about braces\n\n return insertNode(curr.children[dir1],node);\n }", "public void leftRotate(Node n) {\r\n\t\tNode y = n.right;\r\n\t\tn.right = y.left;\r\n\t\tif(!y.left.isNil)\r\n\t\t\ty.left.parent = n;\r\n\t\ty.parent = n.parent;\r\n\t\tif(n.parent.isNil)\r\n\t\t\troot = y;\r\n\t\telse if(n == n.parent.left)\r\n\t\t\tn.parent.left = y;\r\n\t\telse\r\n\t\t\tn.parent.right = y;\r\n\t\ty.left = n;\r\n\t\tn.parent = y;\r\n\t}", "public int join(IAVLNode x, AVLTree t) {\n\t\tif (this.empty() && t.empty()) {\n\t\t\tthis.root = x;\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (this.empty()) {// t is not empty\n\t\t\tint comp = t.getRoot().getHeight() + 1;\n\t\t\tt.insert(x.getKey(), x.getValue());\n\t\t\tthis.root = t.root;\n\t\t\treturn comp;\n\t\t}\n\n\t\tif (t.empty()) {// this is not empty\n\t\t\tint comp = this.getRoot().getHeight() + 1;\n\t\t\tthis.insert(x.getKey(), x.getValue());\n\t\t\treturn comp;\n\t\t}\n\n\t\tint thisRank = this.getRoot().getHeight();\n\t\tint otherRank = t.getRoot().getHeight();\n\t\tif (thisRank == otherRank) {\n\t\t\tif (this.getRoot().getKey() < x.getKey()) {\n\t\t\t\tx.setLeft(this.getRoot());\n\t\t\t\tthis.getRoot().setParent(x);\n\t\t\t\tx.setRight(t.getRoot());\n\t\t\t\tt.getRoot().setParent(x);\n\t\t\t\tx.setHeight(x.getLeft().getHeight() + 1);\n\t\t\t\tthis.root = x;\n\t\t\t} else {// this.getRoot().getKey() > x.getKey()\n\t\t\t\tx.setRight(this.getRoot());\n\t\t\t\tthis.getRoot().setParent(x);\n\t\t\t\tx.setLeft(t.getRoot());\n\t\t\t\tt.getRoot().setParent(x);\n\t\t\t\tx.setHeight(x.getRight().getHeight() + 1);\n\t\t\t\tthis.root = x;\n\t\t\t}\n\t\t\treturn (Math.abs(thisRank - otherRank) + 1);\n\t\t} // if we got here, than the trees aren't in the same height\n\t\tboolean newIsHigher;\n\t\tboolean newIsBigger;\n\t\tnewIsHigher = (this.getRoot().getHeight() < t.getRoot().getHeight());\n\t\tnewIsBigger = (this.getRoot().getKey() < this.getRoot().getKey());\n\t\tAVLNode tempX = (AVLNode) x;\n\t\tif (newIsHigher && newIsBigger) {\n\t\t\tt.joinByLeft(tempX, this, 'R');\n\t\t}\n\t\tif (!newIsHigher && !newIsBigger) {\n\t\t\tthis.joinByLeft(tempX, t, 'L');\n\t\t}\n\t\tif (newIsHigher && !newIsBigger) {\n\t\t\tt.joinByRight(tempX, this, 'R');\n\t\t}\n\t\tif (!newIsHigher && newIsBigger) {\n\t\t\tthis.joinByRight(tempX, t, 'L');\n\t\t}\n\t\treturn (Math.abs(thisRank - otherRank) + 1);\n\t}", "private NodeRB<K, V> rotateLeft(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> xParent = x.parent;\n\n\t\tNodeRB<K, V> y = x.right;\n\t\tx.right = y.left;\n\t\ty.left = x;\n\n\t\t// Parents relations fix\n\t\tif (xParent != null) {\n\t\t\tif (x.isLeftChild()) {\n\t\t\t\txParent.left = y;\n\t\t\t} else {\n\t\t\t\txParent.right = y;\n\t\t\t}\n\t\t}\n\n\t\tx.parent = y;\n\t\ty.parent = xParent;\n\t\tif (x.right != null) {\n\t\t\tx.right.parent = x;\n\t\t}\n\n\t\tx.height = 1 + Math.max(height(x.left), height(x.right));\n\t\ty.height = 1 + Math.max(height(y.left), height(y.right));\n\t\treturn y;\n\t}", "private void nullLeaf(AVLNode<T> node) {\n AVLNode<T> prev = getParent(root, node);\n int comp = node.getData().compareTo(prev.getData());\n if (comp > 0) {\n prev.setRight(null);\n AVLNode<T> min = findMin(prev.getLeft());\n AVLNode<T> max = findMax(prev.getLeft());\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n } else {\n prev.setLeft(null);\n AVLNode<T> max = findMax(prev.getRight());\n AVLNode<T> min = findMin(prev.getRight());\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n }\n }", "public interface IAVLNode {\n\t\tpublic int getKey(); // returns node's key (for virtuval node return -1)\n\n\t\tpublic String getValue(); // returns node's value [info] (for virtuval node return null)\n\n\t\tpublic void setLeft(IAVLNode node); // sets left child\n\n\t\tpublic IAVLNode getLeft(); // returns left child (if there is no left child return null)\n\n\t\tpublic void setRight(IAVLNode node); // sets right child\n\n\t\tpublic IAVLNode getRight(); // returns right child (if there is no right child return null)\n\n\t\tpublic void setParent(IAVLNode node); // sets parent\n\n\t\tpublic IAVLNode getParent(); // returns the parent (if there is no parent return null)\n\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\n\n\t\tpublic void setHeight(int height); // sets the height of the node\n\n\t\tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\n\n\t\tpublic void setSize();\n\n\t\tpublic int getSize();\n\t}", "Node leftRotate(Node x) {\n Node y = x.right;\n Node T2 = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = T2;\n\n // Update heights\n x.height = max(height(x.left), height(x.right)) + 1;\n y.height = max(height(y.left), height(y.right)) + 1;\n\n // Return new root\n return y;\n }", "private void doubleDemoteLeft (WAVLNode z) {\n\t z.rank--;\r\n\t z.right.rank--;\r\n }", "public int delete(int k) {\n\t\tif (this.empty()) {// empty tree, nothing to erase\n\t\t\treturn -1;\n\t\t}\n\t\tAVLNode root = (AVLNode) this.root;\n\t\tAVLNode node = (AVLNode) root.delFindNode(k);\n\t\tif (node == null) {// no node with key==k in this tree\n\t\t\treturn -1;\n\t\t}\n\t\tchar side = node.parentSide();\n\t\tboolean rootTerm = (node.getLeft().getKey() != -1 && node.getRight().getKey() != -1);\n\t\tif (side == 'N' && (rootTerm == false)) {\n\t\t\treturn this.deleteRoot(node);\n\t\t}\n\t\tif (side == 'L') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 1 && rightEdge == 2) {\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.left != null && node.right == null) || (node.left == null && node.right != null)) {// node is //\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// unary\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 2)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (side == 'R') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 2 && rightEdge == 1) {\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.getLeft().getHeight() != -1 && node.getRight().getHeight() == -1)\n\t\t\t\t\t|| (node.getLeft().getHeight() == -1 && node.getRight().getHeight() != -1)) {// node is unary\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 2 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// we get here only if node is binary, and thus not going through any other\n\t\t// submethod\n\t\tAVLNode successor = this.findSuccessor(node); // successor must be unary/leaf\n\t\tif (node.checkRoot()) {\n\t\t\tthis.root = successor;\n\t\t}\n\t\tint numOp = this.delete(successor.key);\n\t\tsuccessor.setHeight(node.getHeight());\n\t\tsuccessor.size = node.getSize();\n\t\tsuccessor.setRight(node.getRight());\n\t\tnode.right.setParent(successor);\n\t\tnode.setRight(null);\n\t\tsuccessor.setLeft(node.getLeft());\n\t\tnode.left.setParent(successor);\n\t\tnode.setLeft(null);\n\t\tsuccessor.setParent(node.getParent());\n\t\tif (node.parentSide() == 'L') {\n\t\t\tnode.parent.setLeft(successor);\n\t\t} else if (node.parentSide() == 'R') {// node.parentSide()=='R'\n\t\t\tnode.parent.setRight(successor);\n\t\t}\n\t\tnode.setParent(null);\n\t\treturn numOp;\n\n\t}", "private void doubleRotateright(WAVLNode x) {\n\t WAVLNode z=x.left;\r\n\t rightRotate(z);\r\n\t z.rank+=1;\r\n\t leftRotate(z);\r\n }", "public void setLeft(IAVLNode node);", "public void setLeft(IAVLNode node);", "private AVLTree[] splitLoop(IAVLNode nodeX, AVLTree [] arr){\r\n\t\t\tAVLTree tmp1 = new AVLTree();\r\n\t\t\tAVLTree tmp2 = new AVLTree();\r\n\t\t\tAVLTree tmp3 = new AVLTree();\r\n\t\t\tAVLTree tmp4 = new AVLTree();\r\n\t\t\tIAVLNode preOfX, newNodeForJoin; \r\n\t\t\tint newHeight, newSize;\r\n\t\t\t\r\n\t\t\tIAVLNode curr = nodeX;\r\n\t\t\ttmp1.setRoot(curr.getLeft());\r\n\t\t\ttmp1.getRoot().setParent(null);\r\n\t\t\ttmp3.setRoot(curr.getRight());\r\n\t\t\ttmp3.getRoot().setParent(null);\r\n\t\t\twhile (curr != null) {\r\n\t\t\t\tif(curr.getParent() == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif(curr.getParent().getRight() == curr) // im his left son\r\n\t\t\t\t\t{preOfX = curr.getParent();\r\n\t\t\t\t\ttmp2.setRoot(preOfX.getLeft());\r\n\t\t\t\t\ttmp2.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp1.join(newNodeForJoin, tmp2);\r\n\t\t\t\t\tnewHeight = tmp1.HeightCalc(tmp1.getRoot());\r\n\t\t\t\t\tnewSize = tmp1.sizeCalc(tmp1.getRoot());\r\n\t\t\t\t\ttmp1.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp1.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp2.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreOfX = curr.getParent();\r\n\t\t\t\t\ttmp4.setRoot(preOfX.getRight());\r\n\t\t\t\t\ttmp4.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp3.join(newNodeForJoin, tmp4);\r\n\t\t\t\t\tnewHeight = tmp3.HeightCalc(tmp3.getRoot());\r\n\t\t\t\t\tnewSize = tmp3.sizeCalc(tmp3.getRoot());\r\n\t\t\t\t\ttmp3.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp3.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp4.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t}\r\n\t\t\t\tnewNodeForJoin = new AVLNode(null);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tarr[0] = tmp1;\r\n\t\t\t\tarr[1]= tmp3;\r\n\t\t\t\tarr[0].minimum = arr[0].minPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].minimum = arr[1].minPointer(arr[1].getRoot());\r\n\t\t\t\tarr[0].maximum = arr[0].maxPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].maximum = arr[1].maxPointer(arr[1].getRoot());\r\n\t\r\n\t\t\t\treturn arr;\r\n\t\t\t\t\r\n\t\t\t}", "private void balanceTree(BinaryNode node) {\n if (node == null) return;\n\n int leftDepth = getDepth(node.left, 0);\n int rightDepth = getDepth(node.right, 0);\n if (Math.abs(leftDepth - rightDepth) > 1) { // outofbalance\n if (leftDepth > rightDepth) {\n if (node.left.right != null) doubleRotationLR(node);\n else singleRotationLR(node);\n }\n\n else {\n if (node.right.left != null) doubleRotationRL(node);\n else singleRotationRL(node);\n }\n balanceTree(root);\n } else {\n balanceTree(node.left);\n balanceTree(node.right);\n }\n }", "public static void main(String[] args) {\n\t\tint[] arr = {7,3,10,12,5,1,9};\n\t\tNode root = null;\n\t\tfor(int n:arr) {\n\t\t\tif(root == null) {\n\t\t\t\troot = new Node(n);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tNode cur = root;\n\t\t\tNode par = null;\n\t\t\twhile(cur != null) {\n\t\t\t\tpar = cur;\n\t\t\t\tif(n < cur.val) cur = cur.left;\n\t\t\t\telse cur = cur.right;\n\t\t\t}\n\t\t\tif(n < par.val) par.left = new Node(n);\n\t\t\telse par.right = new Node(n);\n\t\t\tif(height(root.left) - height(root.right) > 1) {\n\t\t\t\tif(height(root.left.right) > height(root.left.left)) leftRotate(root.left);\n\t\t\t\trightRotate(root);\n\t\t\t}\n\t\t\tif(height(root.right) - height(root.left) > 1) {\n\t\t\t\tif(height(root.right.left) > height(root.right.right)) rightRotate(root.right);\n\t\t\t\tleftRotate(root);\n\t\t\t}\n\t\t}\n\t\t//infixOrder(root);\n//\t\tdel(root,7);\n//\t\tinfixOrder(root);\n\t\t//del(root,5);\n\t\t//del(root,5);\n\t\tinfixOrder(root);\n\t}", "public AVLTree(IAVLNode node) {\n\t\tthis.root = node;\n\t}", "protected RedBlackNode<T> rotateLeft(RedBlackNode<T> node) {\n RedBlackNode<T> rightNode = node.getRightChild();\n RedBlackNode<T> parent = node.getParent();\n rightNode._parent = node.getParent();\n node._rightChild = rightNode.getLeftChild();\n if (node._rightChild != null ) {\n node._rightChild._parent = node;\n } \n rightNode._leftChild = node; \n node._parent = rightNode;\n // node had parent.\n if(parent != null) {\n // node was left child\n if(parent._leftChild == node) {\n parent._leftChild = rightNode;\n } else {\n // node was right child\n parent._rightChild = rightNode;\n }\n } else {\n // node was head\n _head = rightNode;\n }\n return rightNode;\n }", "public void leftRotate(Node<E> x){\n \n \t/*\n If x is the root of the tree to rotate with left child subtree T1 and right child y, \n where T2 and T3 are the left and right children of y:\n x becomes left child of y and T3 as its right child of y\n T1 becomes left child of x and T2 becomes right child of x\n */\n\t\tNode<E> y = x.getRightChild(); //set y\n\t\tx.setRightChild(y.getLeftChild()); //turn y's subtree into x's right subtree\n\t\ty.getLeftChild().setParent(x);\n\t\ty.setParent(x.getParent());\n\t\tif (x.getParent() == sentinel || x.getParent() == null) {\n\t\t\troot = y;\n\t\t} else if (x == x.getParent().getLeftChild()) { //link x's parent to y\n\t\t\tx.getParent().setLeftChild(y);\n\t\t} else {\n\t\t\tx.getParent().setRightChild(y);\n\t\t}\n\t\ty.setLeftChild(x); //put x on y's left\n\t\tx.setParent(y);\n\t\n }", "void leftRotate(Node<K, V> x) {\n\t\tassert IsNotNil(x.getRight());\n\t\tNode<K, V> y = x.getRight();\n\n\t\t// B in position\n\t\tx.setRight(y.getLeft());\n\n\t\t// Y to root\n\t\tif (x == root) {\n\t\t\troot = y;\n\t\t} else if (x.isLeftChild()) {\n\t\t\tx.getParent().setLeft(y);\n\t\t} else if (x.isRightChild()) {\n\t\t\tx.getParent().setRight(y);\n\t\t}\n\n\t\t// x in position\n\t\ty.setLeft(x);\n\t}", "@Test\n\tpublic void test_3_RotacionesSimplesIzquierdaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.remove(3000)); // Primera rotación\n\t\tassertTrue(tree.remove(1500)); \n\t\tassertTrue(tree.add(700));\n\t\tassertTrue(tree.add(400));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(700)); \n\t\tassertTrue(tree.add(450));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.remove(1000)); // Tercera rotación\n\n\t//\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la\n\t\t// izquierda\n\t\tassertEquals(3, tree.getRotacionesSimplesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}", "AVLNode insert(AVLNode node, int key) {\n\t\tif (node == null) \n\t\t\treturn (new AVLNode(key)); \n\n\t\tif (key < node.key) \n\t\t\tnode.left = insert(node.left, key); \n\t\telse if (key > node.key) \n\t\t\tnode.right = insert(node.right, key);\n\n\t\tnode.height = 1 + max(height(node.left),height(node.right)); \n\n\t\tint balance = getBF(node); \n\n\t\t// If this node becomes unbalanced, then there \n\t\t// are 4 cases Left Left Case \n\t\tif (balance == 2 && key < node.left.key) \n\t\t\treturn rightrot(node); \n\n\t\t// Right Right Case \n\t\tif (balance == -2 && key > node.right.key) \n\t\t\treturn leftrot(node); \n\n\t\t// Left Right Case \n\t\tif (balance ==2 && key > node.left.key) { \n\t\t\tnode.left = leftrot(node.left); \n\t\t\treturn rightrot(node); \n\t\t} \n\n\t\t// Right Left Case \n\t\tif (balance == -2 && key < node.right.key) { \n\t\t\tnode.right = rightrot(node.right); \n\t\t\treturn leftrot(node); \n\t\t} \n\n\t\t/* return the (unchanged) node pointer */\n\t\treturn node; \n\t}", "@Test\n public void levelOrder() throws Exception {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n\n Queue<Integer> expected = new LinkedList<Integer>();\n expected.add(110);\n expected.add(80);\n expected.add(150);\n expected.add(120);\n expected.add(40);\n BinarySearchTree.levelOrder(root);\n assertEquals(expected, BinarySearchTree.printQ);\n }", "private AvlNode<E> doubleWithLeftChild(AvlNode<E> k1){\n k1.left = rotateWithRightChild(k1.left);\n return rotateWithLeftChild(k1);\n }", "private RedBlackNode rotateRight(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode BSubTree = x.left.right;\n\t RedBlackNode y = x.left;\n\t y.right = x;\n\t x.parent = y;\n\t x.left = BSubTree;\n\t //Need to anlayse whether Nil check need to have or Not\n\t BSubTree.parent = x;\n\t if( xParent == this.Nil){\n\t\t this.root = y;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t }else{\n\t\t xParent.right = y;\n\t }\n\t y.parent = xParent;\n\t return y;\n }", "public Node rotateLeft(Node n)\r\n\t{\r\n\t\tNode target = n.right;//rotate target to node\r\n\t\tNode subTree = target.left;//get its subtree\r\n\t\t\r\n\t\ttarget.left = n;//set targets old sub tree to nodes sub tree\r\n\t\tn.right = subTree;// set old sub tree to nodes subtree\r\n\t\t\r\n\t\t//increment the height of the tree\r\n\t\tn.height = maxHeight(height(n.left),height(n.right))+1;\r\n\t\ttarget.height = maxHeight(height(target.left),height(target.right))+1;\r\n\t\t\r\n\t\treturn target;\r\n\t}", "private Node rotateLeft(Node h) {\n Node x = h.right;\n h.right = x.left;\n x.left = h;\n x.color = x.left.color;\n x.left.color = RED;\n x.size = h.size;\n h.size = size(h.left) + size(h.right) + 1;\n return x;\n }", "private WAVLNode treePosForDel (WAVLTree tree,int key) {\n\t\t WAVLNode x=tree.root;\r\n\t\t WAVLNode y=EXT_NODE;\r\n\t\t if(x==EXT_NODE) { // if the tree happens to be empty return a node with a different key then expected\r\n\t\t\t return new WAVLNode(key-1,\"i\");\r\n\t\t }\r\n\t\t while (x!=EXT_NODE) {\r\n\t\t\t y=x;\r\n\t\t\t y.sizen--;\r\n\t\t\t if (key==x.key){\r\n\t\t\t\t return x;\r\n\t\t\t }\r\n\t\t\t else if (key<x.key) {\r\n\t\t\t\t x=x.left;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x=x.right;\r\n\t\t\t }\r\n\t\t }\r\n\t\t if(y.key!=key) { // if the node is not found, the method call refixfordel to fix the sizes\r\n\t\t\t reFixForDel(y);\r\n\t\t }\r\n\t\t return y;\r\n\t }", "public AVLTree() {\n\t\tthis.root = null;\n\t}", "private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }" ]
[ "0.69056463", "0.682897", "0.6761755", "0.6618509", "0.6568093", "0.6525723", "0.6512745", "0.6493243", "0.6376243", "0.63216084", "0.6313309", "0.62847257", "0.62092745", "0.6200809", "0.61739385", "0.61626774", "0.6139413", "0.6136598", "0.6114357", "0.61141604", "0.60994977", "0.60916543", "0.6085819", "0.6048947", "0.6041527", "0.60295725", "0.60185313", "0.59825814", "0.5961391", "0.5955279", "0.59408385", "0.58672124", "0.58646756", "0.5861725", "0.58512425", "0.5840733", "0.5839513", "0.5821682", "0.5808203", "0.5796832", "0.5795595", "0.57933044", "0.57913226", "0.57867193", "0.57767206", "0.57723016", "0.5750501", "0.5745419", "0.5745199", "0.5744985", "0.57207626", "0.5715964", "0.5691464", "0.5670478", "0.56682086", "0.56647664", "0.5650203", "0.5642149", "0.56404847", "0.5631302", "0.5622029", "0.5604158", "0.5602707", "0.5597961", "0.55943394", "0.55937755", "0.55898523", "0.55801165", "0.5579987", "0.5575586", "0.55744594", "0.55627334", "0.5561593", "0.5554379", "0.55432457", "0.55350584", "0.55239886", "0.5521606", "0.5506726", "0.5489444", "0.54728645", "0.54641235", "0.54541755", "0.54541755", "0.5445924", "0.54340726", "0.5433964", "0.5427567", "0.54260784", "0.5423091", "0.54218143", "0.5417741", "0.54171556", "0.541349", "0.538995", "0.5387812", "0.5382223", "0.5371081", "0.5366444", "0.53621304", "0.5361413" ]
0.0
-1
avl tree test rr rotate
@Test public void test2() { Integer[] data = new Integer[]{// 25, 50, 100, // }; baseRotateTest(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}", "private void doubleRotateLeftDel (WAVLNode z) {\n\t WAVLNode a = z.right.left;\r\n\t WAVLNode y = z.right;\r\n\t WAVLNode c = z.right.left.left;\r\n\t WAVLNode d = z.right.left.right;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.left=z;\r\n\t a.right=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.left=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.right=c;\r\n\t z.rank=z.rank-2;\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.right=z;\r\n\t a.left=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.right=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.left=c;\r\n\t z.rank=z.rank-2;\r\n\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private void rotateLeftDel (WAVLNode z) {\n\t WAVLNode y = z.right;\r\n\t WAVLNode a = y.left;\r\n\t y.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=y;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=y;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=y;\r\n\t }\r\n\t \r\n\t y.left = z;\r\n\t y.rank++;\r\n\t z.parent=y;\r\n\t z.right = a;\r\n\t z.rank--;\r\n\t if(a.rank>=0) {\r\n\t\t a.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.left.sizen+a.sizen+1;\r\n\t y.sizen = z.sizen+y.right.sizen+1;\r\n }", "private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}", "private int FixAVLtree(IAVLNode node)\r\n\t{\r\n\t\tif (node.isRealNode()) \r\n\t\t{\r\n\t\t\tif(BFCalc(node) == -2) \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==-1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or -1\r\n\t\t\t\tint rightBF=BFCalc(node.getRight());\r\n\t\t\t\tif(rightBF==0||rightBF==-1) {\r\n\t\t\t\t\tRRRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tRLRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse //if BFCalc(node) == 2 \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or 1\r\n\t\t\t\tint leftBF=BFCalc(node.getLeft());\r\n\t\t\t\tif(leftBF==1 ||leftBF==0) \r\n\t\t\t\t{\r\n\t\t\t\t\tLLRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tLRRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t} \r\n\t\t} \r\n\t\t\treturn 0;\r\n\t}", "private void rotateRightDel (WAVLNode z) {\n\t WAVLNode x = z.left;\r\n\t WAVLNode d = x.right;\r\n\t x.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=x;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=x;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=x;\r\n\t }\r\n\t x.right = z;\r\n\t x.rank++;\r\n\t z.parent=x;\r\n\t z.left = d;\r\n\t z.rank--;\r\n\t if(d.rank>=0) {\r\n\t\t d.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.right.sizen+d.sizen+1;\r\n\t x.sizen = z.sizen+x.left.sizen+1;\r\n }", "private void fixAVLTree(Node node) {\n\t\tfinal int lf = getLoadFactor(node);\n\t\t//if (lf == -1 || lf == 0 || lf == 1) {\n\t\tif (lf >= -1 && lf <= 1) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t}\t\t\n\t\trotateTree(node);\n\t}", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "public int insert(int k, String i) { // insert a node with a key of k and info of i, the method returns the number of rebalance operation\r\n WAVLNode x = new WAVLNode(k,i);// create the new node to insert\r\n x.left=EXT_NODE;\r\n x.right=EXT_NODE;\r\n if(root==EXT_NODE) { // checking if the tree is empty, in that case put x as a root\r\n \t root=x;\r\n \t return 0;\r\n }\r\n WAVLNode y = treePos(this, k); // find the correct position to insert the node\r\n int [] f = {x.key,y.key};\r\n if (f[0]==f[1]) { // in case the key is already exists in the tree, return -1 and dosent insert anything\r\n \t \r\n \t return -1;\r\n }\r\n x.parent=y; \r\n if(y.rank!=0) {// if y is onary do:\r\n \t if(x.key<y.key) {// check if x should be left son of y\r\n \t\t y.left=x;\r\n \t }\r\n \t else { // x should be right son of y\r\n \t\t y.right=x;\r\n \t }\r\n \t return 0; // no rebalance operation was needed, return 0\r\n }\r\n if(x.key<y.key) { // if y is a leaf\r\n \t y.left=x;\r\n }\r\n else {\r\n \t y.right=x;\r\n }\r\n int cnt=0;//rebalance operation to return\r\n while(x.parent!=null&&x.parent.rank-x.rank==0) { // while the tree is not balanced continue to balance the tree\r\n \t if(parentside(x.parent, x).equals(\"left\")) { // check if x is a left son of x's parent\r\n \t\t if (x.parent.rank-x.parent.right.rank==1) {//check the conditions for promotion\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.left.rank==1) { // check the conditions for rotate\r\n \t\t\t rightRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t doubleRotateleft(x); // check the conditions for double rotate\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n \t else { // x is a right son of x's parent, all conditions and actions are symmetric to the left side\r\n \t\t if (x.parent.rank-x.parent.left.rank==1) {\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.right.rank==1) {\r\n \t\t\t leftRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t \r\n \t\t\t doubleRotateright(x);\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n }\r\n return cnt;\r\n \r\n }", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "private void leftRightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getRight();\n AVLNode<T> oldNodeLeft = node.getLeft();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setLeft(nodeDat);\n if (oldNodeLeft != null) {\n node.getLeft().setLeft(oldNodeLeft);\n calcDeterminants(node.getLeft().getLeft());\n }\n node.setData(child.getData());\n if (oldChildLeft != null) {\n node.getLeft().setRight(oldChildLeft);\n calcDeterminants(node.getLeft().getRight());\n } else {\n node.getLeft().setRight(null);\n calcDeterminants(node.getLeft());\n }\n if (oldChildRight != null) {\n node.setRight(oldChildRight);\n calcDeterminants(node.getRight());\n } else {\n node.setRight(null);\n calcDeterminants(node.getLeft());\n }\n\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private AvlNode<E> rotateWithRightChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.right;\n k1.right = k2.left;\n k2.left = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(k1.height, height(k2.right)) + 1;\n return k2;\n }", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "private void rightLeftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getLeft();\n AVLNode<T> oldNodeRight = node.getRight();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setRight(nodeDat);\n if (oldNodeRight != null) {\n node.getRight().setRight(oldNodeRight);\n calcDeterminants(node.getRight().getRight());\n }\n node.setData(child.getData());\n if (oldChildRight != null) {\n node.getRight().setLeft(oldChildRight);\n calcDeterminants(node.getRight().getLeft());\n } else {\n node.getRight().setLeft(null);\n calcDeterminants(node.getRight());\n }\n if (oldChildLeft != null) {\n node.setLeft(oldChildLeft);\n calcDeterminants(node.getLeft());\n } else {\n node.setLeft(null);\n calcDeterminants(node.getRight());\n }\n\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "private static <V> IntTree<V> rebalanced(\n final long key, final V value, final IntTree<V> left, final IntTree<V> right) {\n if (left.size + right.size > 1) {\n if (left.size >= OMEGA * right.size) { // rotate to the right\n IntTree<V> ll = left.left, lr = left.right;\n if (lr.size < ALPHA * ll.size) // single rotation\n return new IntTree<V>(\n left.key + key,\n left.value,\n ll,\n new IntTree<V>(-left.key, value, lr.withKey(lr.key + left.key), right));\n else { // double rotation:\n IntTree<V> lrl = lr.left, lrr = lr.right;\n return new IntTree<V>(\n lr.key + left.key + key,\n lr.value,\n new IntTree<V>(-lr.key, left.value, ll, lrl.withKey(lrl.key + lr.key)),\n new IntTree<V>(\n -left.key - lr.key, value, lrr.withKey(lrr.key + lr.key + left.key), right));\n }\n } else if (right.size >= OMEGA * left.size) { // rotate to the left\n IntTree<V> rl = right.left, rr = right.right;\n if (rl.size < ALPHA * rr.size) // single rotation\n return new IntTree<V>(\n right.key + key,\n right.value,\n new IntTree<V>(-right.key, value, left, rl.withKey(rl.key + right.key)),\n rr);\n else { // double rotation:\n IntTree<V> rll = rl.left, rlr = rl.right;\n return new IntTree<V>(\n rl.key + right.key + key,\n rl.value,\n new IntTree<V>(\n -right.key - rl.key, value, left, rll.withKey(rll.key + rl.key + right.key)),\n new IntTree<V>(-rl.key, right.value, rlr.withKey(rlr.key + rl.key), rr));\n }\n }\n }\n // otherwise already balanced enough:\n return new IntTree<V>(key, value, left, right);\n }", "private AVLTreeNode<E> smallRotateRight(AVLTreeNode<E> node) {\n AVLTreeNode<E> q = node.getLeft();\n node.setLeft(q.getRight());\n q.setRight(node);\n node.fixHeight();\n q.fixHeight();\n return q;\n }", "public int delRecTriOne(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tint rightEdge = node.right.getHeight() - node.right.getRight().getHeight();\n\t\t\tint leftEdge = node.right.getHeight() - node.right.getLeft().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (leftEdge == 2) {// case 3\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// leftEdge==1, case 4\n\t\t\t\tAVLNode rightsLeftChild = (AVLNode) node.getRight().getLeft();\n\t\t\t\tint numOp = this.doubleRotation(rightsLeftChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getRight().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\n\t\t}\n\n\t\telse { // side='R'\n\t\t\tint leftEdge = node.left.getHeight() - node.left.getLeft().getHeight();\n\t\t\tint rightEdge = node.left.getHeight() - node.left.getRight().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (rightEdge == 2) {// case 3\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// rightEdge==1, leftEdge==2, case 4\n\t\t\t\tAVLNode leftsRightChild = (AVLNode) node.getLeft().getRight();\n\t\t\t\tint numOp = this.doubleRotation(leftsRightChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getLeft().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\t\t}\n\t}", "private BinaryNode<AnyType> rotateRight1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t\tBinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.left.right;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp1.right=null;\r\n\t\t root=temp1;\r\n\t\t root.right=parno;\r\n\t\t root.right.left=temp3;\r\n\t\t root.right.right=temp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.left;\r\n\t\t\tparno.left=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.left.right;\r\n\t\t\tparno.left.right=temp;\r\n\t\t\tparno.left.right.left=tempr;\r\n\t\t}\r\n\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.right;\t\t\r\n\t\t\tparno.right=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.right.right;\r\n\t\t\tparno.right.right=temp;\r\n\t\t\tparno.right.right.left=tempr;\r\n\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }", "public nodoArbolAVL insertarAVL(nodoArbolAVL nuevo,nodoArbolAVL subAr){\n nodoArbolAVL nuevoPadre = subAr;\n if(nuevo.dato < subAr.dato){\n if(subAr.hijoIzquierdo == null){\n subAr.hijoIzquierdo = nuevo;\n }else{\n subAr.hijoIzquierdo = \n insertarAVL(nuevo,subAr.hijoIzquierdo);\n if((obtenerFE(subAr.hijoIzquierdo)-obtenerFE(subAr.hijoDerecho)==2)){\n if(nuevo.dato < subAr.hijoIzquierdo.dato){\n nuevoPadre = rotacionIzquierda(subAr);\n }else{\n nuevoPadre = rotacionDobleIzquierda(subAr);\n }\n }\n }\n }else if(nuevo.dato > subAr.dato){\n if(subAr.hijoDerecho == null){\n subAr.hijoDerecho = nuevo;\n \n }else{\n subAr.hijoDerecho = insertarAVL(nuevo,subAr.hijoDerecho);\n if((obtenerFE(subAr.hijoDerecho)-obtenerFE(subAr.hijoIzquierdo)==-2)){\n if(nuevo.dato > subAr.hijoDerecho.dato){\n nuevoPadre = rotacionDerecha (subAr);\n }else{\n nuevoPadre = rotacionDobleDerecha(subAr);\n }\n }\n }\n }else{\n System.out.println(\"NODO DUPLICADO\");\n }\n //ACTUALIZANDO EL FE\n if((subAr.hijoIzquierdo == null)&&(subAr.hijoDerecho !=null)){\n subAr.fe = subAr.hijoDerecho.fe + 1;\n }else if((subAr.hijoDerecho == null)&&(subAr.hijoIzquierdo != null)){\n subAr.fe = subAr.hijoIzquierdo.fe +1 ;\n }else{\n subAr.fe = Math.max(obtenerFE(subAr.hijoIzquierdo),\n obtenerFE(subAr.hijoDerecho))+1;\n }\n nuevo.SetNivel(nuevo.nivel+1);\n return nuevoPadre;\n }", "private void rotateRight(Node tree) {\n assert tree != null;\n assert tree.left != null;\n\n Node temp = tree.left;\n tree.left = temp.right;\n if(temp.right != null) { //no null pointers\n temp.right.parent = tree;\n }\n temp.parent = tree.parent;\n if(temp.parent != null) { //am i at the root?\n if(temp.parent.left == tree) {\n temp.parent.left = temp;\n } else if (temp.parent.right == tree) {\n temp.parent.right = temp;\n }\n }\n tree.parent = temp;\n temp.right = tree;\n if(tree == root) { root = temp; } //rewrite the root\n rotations += 1;\n }", "AVLNode delete(AVLNode node, int key) {\n if (node == null) \n return node; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < node.key) \n node.left = delete(node.left, key); \n \n // If the key to be deleted is greater than the \n // root's key, then it lies in right subtree \n else if (key > root.key) \n node.right = delete(node.right, key); \n \n // if key is same as root's key, then this is the node \n // to be deleted \n else\n { \n \n // node with only one child or no child \n if ((node.left == null) || (node.right == null)) \n { \n AVLNode temp = null; \n if (temp == node.left) \n temp = node.right; \n else\n temp = node.left; \n \n if (temp == null) \n { \n temp = node; \n node = null; \n } \n else \n node = temp; \n } \n else\n { \n AVLNode temp = getSucc(node.right); \n node.key = temp.key; \n node.right = delete(node.right, temp.key); \n } \n } \n \n if (node== null) \n return node; \n \n node.height = max(height(node.left), height(node.right)) + 1; \n \n int balance = getBF(node); \n \n if (balance > 1 && getBF(node.left) >= 0) \n return rightrot(node); \n \n if (balance > 1 && getBF(node.left) < 0) \n { \n node.left = leftrot(node.left); \n return rightrot(node); \n } \n \n if (balance < -1 && getBF(node.right) <= 0) \n return leftrot(node); \n\n if (balance < -1 && getBF(node.right) > 0) \n { \n node.right = rightrot(node.right); \n return leftrot(node); \n } \n return node;\n }", "private AVLNode<T> rotateLeft(AVLNode<T> node) {\n AVLNode<T> substitute = node.right;\n // donde ponemos los hijos a la izquierda del substituto\n node.right = substitute.left;\n substitute.left = node;\n\n return substitute;\n }", "private void rightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private BinaryNode<AnyType> rotateLeft1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t BinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.right.left;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp2.left=null;\r\n\t\t root=temp2;\r\n\t\t root.left=parno;\r\n\t\t root.left.right=temp3;\r\n\t\t root.left.left=temp1;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.left;\r\n\t\t\tparno.left=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.left.left;\r\n\t\t\tparno.left.left=temp;\r\n\t\t\tparno.left.left.right=templ;\r\n\t\t}\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.right;\r\n\t\t\tparno.right=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.right.left;\r\n\t\t\tparno.right.left=temp;\r\n\t\t\tparno.right.left.right=templ;\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private AVLNode<T, U> rotateRight(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getLeft();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setLeft(newRoot.getRight());\n\t\t\t \n\t\tif(oldRoot.getLeft() != null) {\n\t\t\toldRoot.getLeft().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setRight(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "Node leftRotate(Node x) { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = maxInt(heightBST(x.left), heightBST(x.right)) + 1; \n y.height = maxInt(heightBST(y.left), heightBST(y.right)) + 1; \n \n // Return new root \n return y; \n }", "private AVLNode<T> rotateRight(AVLNode<T> node) {\n AVLNode<T> substiute = node.left;\n node.left = substiute.right;\n substiute.right = node;\n\n // node = substitute;\n\n return substiute;\n }", "private void doubleRotateleft(WAVLNode x) {\n\t WAVLNode z=x.right;\r\n\t leftRotate(z);\r\n\t z.rank+=1;\r\n\t rightRotate(z);\r\n }", "public interface AVLTree<E extends Comparable<E>> extends BinarySortedTree<E>{\n\n boolean isAVLTree(AVLNode<E> current);\n\n interface AVLNode<E>{\n E getData();\n\n AVLNode setData(E data);\n\n AVLNode<E> getParent();\n\n AVLNode setParent(AVLNode<E> parent);\n\n AVLNode<E> getLeft();\n AVLNode setLeft(AVLNode<E> left);\n\n AVLNode<E> getRight();\n\n AVLNode setRight(AVLNode<E> right);\n\n int getHeight();\n\n AVLNode setHeight(int height);\n }\n}", "private AVLNode<T, U> rotateLeft(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getRight();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setRight(newRoot.getLeft());\n\t\t\t \n\t\tif(oldRoot.getRight() != null) {\n\t\t\toldRoot.getRight().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setLeft(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "private void doubleRotationLR(BinaryNode node) {\n BinaryNode temp = max(node.left);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the left\n temp.parent.right = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n root.parent = null;\n root.right = node;\n root.left = node.left;\n if(node.left != null) node.left.parent = root;\n node.parent = root;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.left = node.left;\n if(node.left != null) node.left.parent = temp;\n temp.right = node;\n node.parent = temp;\n node.left = null;\n }\n }", "private void leftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "public AVLNode deleteNodeImmersion(AVLNode treeRoot, int key) {\n if (treeRoot == null) {\n // Sub tree is empty\n // End operation\n return treeRoot;\n }\n\n // Sub tree is NOT empty so we have to perform the recursive descent\n if (key < treeRoot.getKey()) {\n // The key of the current node is less than the key we are looking for\n // Recursive descent through the left\n treeRoot.setLeft(deleteNodeImmersion(treeRoot.getLeft(), key));\n } else if (key > treeRoot.getKey()) {\n // The key of the current node is greater than the key we are looking for\n // Recursive descent through the right\n treeRoot.setRight(deleteNodeImmersion(treeRoot.getRight(), key));\n } else {\n // Key already exists, so we cannot add a new element with the same key\n treeRoot = this.handleDeletion(treeRoot);\n }\n\n // After applying the removal, let's see if rotations need to be applied\n\n // Case of tree with just one node: it is not necessary to apply rotations\n if (treeRoot == null) {\n return treeRoot;\n }\n\n // After inserting the element, we must increase the height of the current node\n // so we can later compute the height of the whole tree.\n // Let's compute height below using child heights\n int heightBelow = IntegerUtilities.max(height(treeRoot.getLeft()), height(treeRoot.getRight()));\n // Increase the height of the current node\n treeRoot.setHeight(heightBelow + 1);\n\n // Compute the balance factor of this node\n int balance = getBalance(treeRoot);\n\n // Check if this node is unbalanced\n if (balance > 1 || balance < -1) {\n\n // This node is unbalanced\n // Let's check the case\n\n if (balance > 1) {\n // Case Left Left / case Left Right\n if (getBalance(treeRoot.getLeft()) >= 0) {\n // Case Left Left: Right Rotation\n return rightRotate(treeRoot);// Right Rotation\n } else if (getBalance(treeRoot.getLeft()) < 0) {\n // Case Left Right: Left Rotation and Right Rotation\n treeRoot.setLeft(leftRotate(treeRoot.getLeft()));// Left Rotation\n return rightRotate(treeRoot);// Right Rotation\n }\n } else {// balance < -1\n // Case Right Right / case Right Left\n if (getBalance(treeRoot.getRight()) <= 0) {\n // Case Right Right: Left Rotation\n return leftRotate(treeRoot);// Left Rotation\n } else if (getBalance(treeRoot.getRight()) > 0) {\n // Case Right Left: Right Rotation and Left Rotation\n treeRoot.setRight(rightRotate(treeRoot.getRight()));// Right Rotation\n return leftRotate(treeRoot);// Left Rotation\n }\n }\n }\n\n return treeRoot;\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "private void doubleRotationRL(BinaryNode node) {\n BinaryNode temp = min(node.right);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the right\n temp.parent.right = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n root.parent = null;\n root.left = node;\n root.right = node.right;\n if(node.right != null) node.right.parent = root;\n node.parent = root;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.right = node.right;\n if(node.right != null) node.right.parent = temp;\n temp.left = node;\n node.parent = temp;\n node.right = null;\n }\n }", "private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }", "private void singleRotationRL(BinaryNode node) {\n if (node == root) {\n root = node.right;\n root.parent = null;\n root.left = node;\n node.parent = node.right;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.right;\n } else {\n node.parent.left = node.right;\n }\n node.right.parent = node.parent;\n node.right.left = node;\n node.parent = node.right;\n node.right = null;\n }\n }", "private void balanceTree(AVLNode<T> node) {\n AVLNode<T> parent = null;\n int parBal = 0;\n if (node.getHeight() == 0) {\n if (!(node.getData().equals(root.getData()))) {\n balanceTree(getParent(root, node));\n } else {\n parent = node;\n parBal = parent.getBalanceFactor();\n }\n } else {\n if (node.getData().equals(root.getData())) {\n parent = node;\n parBal = parent.getBalanceFactor();\n } else {\n parent = getParent(root, node);\n if (parent != null) {\n parBal = parent.getBalanceFactor();\n }\n }\n }\n\n if (parBal < -1 && node.getBalanceFactor() <= 0) {\n leftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() >= 0) {\n rightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal < -1 && node.getBalanceFactor() > 0) {\n rightLeftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() < 0) {\n leftRightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else {\n if (parent != null && !(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n }\n }", "public void rightRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.leftChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// if the pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be to the left of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t} else if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be to the right of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent\r\n\t\t\telse {\r\n\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void leftRotate(RedBlackNode<T> x){\n leftRotateFixup(x);\n\n RedBlackNode<T> y;\n y = x.right;\n x.right = y.left;\n\n // czy istnieje y.left i zamiana referencji\n if (!isNil(y.left))\n y.left.parent = x;\n y.parent = x.parent;\n\n // x.parent jest nil\n if (isNil(x.parent))\n root = y;\n\n // x jest lewym dzieckiem swojego rodzica\n else if (x.parent.left == x)\n x.parent.left = y;\n\n //x jest prawym dzieckiem swojego rodzica\n else\n x.parent.right = y;\n\n y.left = x;\n x.parent = y;\n }", "private AVLTreeNode<E> smallRotateLeft(AVLTreeNode<E> node) {\n AVLTreeNode<E> p = node.getRight();\n node.setRight(p.getLeft());\n p.setLeft(node);\n node.fixHeight();\n p.fixHeight();\n return p;\n }", "public void leftRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.rightChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// If pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\t// do this if root has a parent\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\t// if root is going left to the root's parent, then set pivot to\r\n\t\t\t\t// left of the root.\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be on the left of parent\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// if root is going right of root's parent, then set pivot to\r\n\t\t\t\t// right of the root.\r\n\t\t\t\telse if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be on the right of the parent.\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent.\r\n\t\t\telse {\r\n\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "public int singleRotation(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setLeft(node.right);\n\t\t\tnode.right.setParent(node.parent);\n\t\t\tnode.setRight(node.parent);\n\t\t\tnode.setParent(node.getRight().getParent());\n\t\t\tnode.right.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.right.setHeight(node.right.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.right.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\n\t\telse {// side == 'R'\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setRight(node.left);\n\t\t\tnode.left.setParent(node.parent);\n\t\t\tnode.setLeft(node.parent);\n\t\t\tnode.setParent(node.getLeft().getParent());\n\t\t\tnode.left.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.left.setHeight(node.left.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.left.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\t}", "private int HieghtsUpdating(IAVLNode node) \r\n\t{\r\n\t\tint moneRot = 0;\r\n\t\twhile (node != null) //as long as we didn't reached root's parent\r\n\t\t{\r\n\t\t\tif ((BFCalc(node) < -1) || (BFCalc(node) > 1)) //if AVL isn't balanced \r\n\t\t\t\tmoneRot+= FixAVLtree(node); \r\n \r\n\t\t\tnode.setSize(sizeCalc(node));\r\n\t\t\tif(HeightCalc(node) != node.getHeight()) {\r\n\t\t\t\tmoneRot += Math.abs(HeightCalc(node)-node.getHeight());\r\n\t\t\t\tnode.setHeight(HeightCalc(node));\r\n\t\t\t}\r\n\t\t\tnode = node.getParent();\r\n\t\t}\r\n\t\treturn moneRot;\r\n\t}", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = max(height(x.left), height(x.right)) + 1; \n y.height = max(height(y.left), height(y.right)) + 1; \n \n // Return new root \n return y; \n }", "public interface IAVLNode{\t\r\n\t\tpublic int getKey(); //returns node's key (for virtuval node return -1)\r\n\t\tpublic String getValue(); //returns node's value [info] (for virtuval node return null)\r\n\t\tpublic void setValue(String value); // sets the value of the node\r\n\t\tpublic void setLeft(IAVLNode node); //sets left child\r\n\t\tpublic IAVLNode getLeft(); //returns left child (if there is no left child return null)\r\n\t\tpublic void setRight(IAVLNode node); //sets right child\r\n\t\tpublic IAVLNode getRight(); //returns right child (if there is no right child return null)\r\n\t\tpublic void setParent(IAVLNode node); //sets parent\r\n\t\tpublic IAVLNode getParent(); //returns the parent (if there is no parent return null)\r\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\r\n\t\tpublic void setHeight(int height); // sets the height of the node\r\n \tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\r\n \tpublic void setKey(int key); // Sets the key of the node\r\n \tpublic void setSize(int size); // sets the number of real nodes in this node's subtree\r\n \tpublic int getSize(); // Returns the number of real nodes in this node's subtree (Should be implemented in O(1))\r\n\t}", "private void rotateLeft(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode y = x.right;\n\t RedBlackNode BSubTree = y.left;\n\t y.left = x;\n\t x.parent = y;\n\t x.right = BSubTree;\n\t //analyse whether need to have Nil check in this code\n\t BSubTree.parent = x;\n\t if(xParent == this.Nil){\n\t\t this.root = y;\n\t\t y.parent = this.Nil;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t\t y.parent = xParent;\n\t }else{\n\t\t xParent.right = y;\n\t\t y.parent = xParent;\n\t }\n\t \n }", "public int case1(AVLNode node, int bottomLeftEdge) {\n\t\tchar sideOfNode = node.parentSide();\n\t\tif (sideOfNode == 'N') {\n\t\t\tnode.setSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getHeight() == 1) {\n\t\t\tnode.setSize();\n\t\t\tnode.updateSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (sideOfNode == 'L') {\n\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\tif (rightEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 1;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // rightEdge == 2\n\t\t\t\tif (bottomLeftEdge == 1) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 2, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getRight(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // sideOfNode == 'R'\n\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\tif (leftEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 2;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // leftEdge == 2\n\t\t\t\tif (bottomLeftEdge == 2) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 1, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getLeft(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "AVLTreeNode insert(AVLTreeNode node, int key)\r\n {\n if (node == null)\r\n {\r\n return new AVLTreeNode(key);\r\n }\r\n\r\n if (key < node.key)\r\n {\r\n node.left = insert(node.left, key);\r\n }\r\n else if (key > node.key)\r\n {\r\n node.right = insert(node.right, key);\r\n }\r\n else\r\n {\r\n return node;\r\n }\r\n\r\n // now update the height of the node\r\n updateHeight(node);\r\n\r\n // check the balance at this node and perform rotations accordingly\r\n int balance = getBalance(node);\r\n\r\n if (balance > 1) // indicates either left-left or left-right case\r\n {\r\n if (key < node.left.key) // confirms left-left case\r\n {\r\n node = rightRotate(node);\r\n }\r\n else // confirms left-right case\r\n {\r\n node.left = leftRotate(node.left);\r\n node = rightRotate(node);\r\n }\r\n }\r\n\r\n else if (balance < -1) // indicates either right-right or right-left case\r\n {\r\n if (key > node.right.key) // confirms right-right case\r\n {\r\n node = leftRotate(node);\r\n }\r\n else // confirms right-left case\r\n {\r\n node.right = rightRotate(node.right);\r\n node = leftRotate(node);\r\n }\r\n }\r\n return node;\r\n }", "private Node leftRotate(Node a) {\n Node b = a.getRightChild();\n Node n2 = b.getLeftChild();\n b.setLeftChild(a);\n a.setRightChild(n2);\n setHeights(a, b);\n return b;\n }", "public AVLNode() {\n\t\t\tthis.key = -1;\n\t\t\tthis.val = null;\n\t\t\tthis.left = null;\n\t\t\tthis.right = null;\n\t\t\tthis.parent = null;\n\t\t\tthis.rank = -1;\n\t\t\tthis.size = 0;\n\t\t}", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "AVLNode rrCase(AVLNode Node){\r\n\t\r\n\t\tAVLNode childR = Node.right;\r\n\t\tNode.right = childR.left;\r\n\t\tchildR.left = Node;\t\t\r\n\t\treturn childR;\r\n\t\t\r\n\t}", "public int delete(int k){\n\t WAVLNode x = treePosForDel(this, k); // find the node to delete\r\n\t int cnt = 0; // rebalance operations counter\r\n\t if(x.key!=k) { // if a node with a key of k doesnt exist in the tree there is nothing to delete, return -1\r\n\t\t return -1;\r\n\t }\r\n\t if(this.root.key==x.key&&this.root.rank==0) {//root is a leaf\r\n\t\t this.root=EXT_NODE;// change the root pointer to EXT_NODE\r\n\t\t return 0;\r\n\t }\r\n\t else if(this.root.key==x.key&&(this.root.right==EXT_NODE||this.root.left==EXT_NODE)) {//root is onary\r\n\t\t if(x.left!=EXT_NODE) { // x is a root with a left child\r\n\t\t\t x.left.parent = null;\r\n\t\t\t this.root = x.left; // change the root pointer to the root's left child\r\n\t\t\t x.left.sizen=1;\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t x.right.parent = null; // x is a root with a right child \r\n\t\t x.right.sizen=1;\r\n\t\t this.root = x.right; // change the root pointer to the root's right child\r\n\t\t return 0;\r\n\t }\r\n\t WAVLNode z;\r\n\t if(isInnerNode(x)) {// x is an inner node, requires a call for successor and swap\r\n\t\t z = successorForDel(x); // find the successor of x\r\n\t\t x = swap(x,z); // put x's successor instead of x and delete successor \r\n\t }\r\n\t\t if(x.rank == 0) {//x is a leaf\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.left = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.left;\r\n\t\t\t }\r\n\t\t\telse { // x is a right child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.right = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.right; \r\n\t\t\t }\r\n\t\t }\r\n\t\t else {//x is onary\r\n\t\t\t boolean onaryside = onaryLeft(x); // check if x is onary with a left child\r\n\t\t\t WAVLNode x_child = EXT_NODE;\r\n\t\t\t if (onaryside) {\r\n\t\t\t\t x_child=x.left; // get a pointer for x child\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x_child=x.right;\r\n\t\t\t }\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.left=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {// x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.right=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t }\r\n\t\t }\r\n\t if (z.left.rank==-1&&z.right.rank==-1) {//special case, z becomes a leaf, change pointers and demote\r\n\t\t demote(z);\r\n\t\t x=z;\r\n\t\t z=z.parent;\r\n\t\t cnt++;\r\n\t }\r\n\t \r\n\t while(z!=null&&z.rank-x.rank==3) { // while the tree is not balanced continue to balance the tree\r\n\t\t if(parentside(z, x).equals(\"left\")) { // x is z's left son\r\n\t\t\t if(z.rank-z.right.rank==2) {//condition for demote\r\n\r\n\t\t\t\t demote(z);\r\n\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.right.rank-z.right.left.rank==2&&z.right.rank-z.right.right.rank==2) {//condition for doubledemote left\r\n\t\t\t\t\t doubleDemoteLeft(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t\t else if((z.right.rank-z.right.left.rank==1||z.right.rank-z.right.left.rank==2)&&z.right.rank-z.right.right.rank==1) {// condition for rotate left for del\r\n\t\t\t\t\t rotateLeftDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t\t else {//condition for doublerotate left for del\r\n\t\t\t\t\t doubleRotateLeftDel(z);\r\n\t\t\t\t\t \r\n\t\t\t\t\t cnt=cnt+5;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t else { // x is z's right son, conditions are symmetric to left side\r\n\t\t\t if(z.rank-z.left.rank==2) {\r\n\t\t\t\t demote(z);\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.left.rank-z.left.right.rank==2&&z.left.rank-z.left.left.rank==2) {\r\n\t\t\t\t\t doubleDemoteright(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t }\r\n\t\t\t\t else if((z.left.rank-z.left.right.rank==1||z.left.rank-z.left.right.rank==2)&&z.left.rank-z.left.left.rank==1) {\r\n\t\t\t\t\t rotateRightDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\r\n\t\t\t\t\t doubleRotateRightDel(z);\r\n\t\t\t\t\t cnt+=5;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t return cnt;\r\n }", "boolean insertNode(RBTreeNode curr, RBTreeNode node) {\n int dir1 = curr.getDirection(node);\n int dir2 = dir1 ==0 ? 1 : 0;\n\n if(curr.children[dir1] == null) {\n curr.children[dir1] = node;\n return true;\n }\n\n if(isRedNode(curr)) {\n //Case 1: Case where we can flip colors and black height remains unchanged\n if(isRedNode(curr.children[dir1]) ) {\n if(isRedNode(curr.children[dir2])) {\n curr.children[dir1].isRed = true;\n curr.children[dir2].isRed = true;\n curr.isRed = false;\n return true;\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir1])) { //Case 2 and 3 //single rotation\n //RBTreeNode temp = singleRotate(curr,dir1,dir1); //Java no pointers :( So need to copy the returned val\n //curr.update(temp);\n curr.update(singleRotate(curr,dir1,dir1));\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir2])) { //Case 2 and 3 // double rotation\n //doubleRotate\n\n }\n } else {\n //do nothing as black height is unchanged and red red violation\n }\n }//not sure about braces\n\n return insertNode(curr.children[dir1],node);\n }", "private RedBlackNode rotateRight(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode BSubTree = x.left.right;\n\t RedBlackNode y = x.left;\n\t y.right = x;\n\t x.parent = y;\n\t x.left = BSubTree;\n\t //Need to anlayse whether Nil check need to have or Not\n\t BSubTree.parent = x;\n\t if( xParent == this.Nil){\n\t\t this.root = y;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t }else{\n\t\t xParent.right = y;\n\t }\n\t y.parent = xParent;\n\t return y;\n }", "public AVLNode rotateLeft(AVLNode x) {\n AVLNode y = x.getRight();\n AVLNode T2 = y.getLeft();\n \n //rotation\n y.setLeft(x);\n x.setRight(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return y;\n }", "protected void rotateLeft(BSTNode n) {\n\n\t\tassert (n != null);\n\n\t\tBSTNode pv = n.right;\n\t\tassert (pv != null);\n\n\t\t// promote pv\n\t\tpv.parent = n.parent;\n\n\t\tif (n.parent == null) {\n\t\t\tif (n == _root) {\n\t\t\t\t_root = pv;\n\t\t\t} else {\n\t\t\t\t// do nothing, pv has no parent to notify\n\t\t\t}\n\t\t} else {\n\t\t\tsetParentReference(n, pv);\n\t\t}\n\n\t\t// move pv's left subtree over to n's right\n\t\tn.right = pv.left;\n\t\tif (n.right != null)\n\t\t\tn.right.parent = n;\n\n\t\t// move n to be the left child of pv\n\t\tpv.left = n;\n\t\tn.parent = pv;\n\n\t\t_stats.incRotations();\n\n\t\t/*\n\t\t * Fixup other tree stats\n\t\t */\n\n\t\tn.size = 1 + (n.left != null ? n.left.size : 0)\n\t\t\t\t+ (n.right != null ? n.right.size : 0);\n\n\t\tpv.size = 1 + n.size + (pv.right != null ? pv.right.size : 0);\n\t}", "private NodeRB<K, V> rotateLeft(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> xParent = x.parent;\n\n\t\tNodeRB<K, V> y = x.right;\n\t\tx.right = y.left;\n\t\ty.left = x;\n\n\t\t// Parents relations fix\n\t\tif (xParent != null) {\n\t\t\tif (x.isLeftChild()) {\n\t\t\t\txParent.left = y;\n\t\t\t} else {\n\t\t\t\txParent.right = y;\n\t\t\t}\n\t\t}\n\n\t\tx.parent = y;\n\t\ty.parent = xParent;\n\t\tif (x.right != null) {\n\t\t\tx.right.parent = x;\n\t\t}\n\n\t\tx.height = 1 + Math.max(height(x.left), height(x.right));\n\t\ty.height = 1 + Math.max(height(y.left), height(y.right));\n\t\treturn y;\n\t}", "private void splay(Node tree) {\n assert(tree != null);\n while(tree.parent != null && tree.parent.parent != null) { //while has a parent and a grandparent\n if(tree.parent.left == tree && tree.parent.parent.left == tree.parent) { //zig-zig case\n rotateRight(tree.parent.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.left == tree.parent) { //zig-zag case\n rotateLeft(tree.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.right == tree.parent) { //zag-zag case\n rotateLeft(tree.parent.parent);\n rotateLeft(tree.parent);\n } else if(tree.parent.left == tree && tree.parent.parent.right == tree.parent) { //zag-zig case\n rotateRight(tree.parent);\n rotateLeft(tree.parent);\n }\n }\n if(tree != root) { //tree is only of depth 1\n if (root.left == tree) { //zig\n rotateRight(root);\n } else { //zag\n rotateLeft(root);\n }\n }\n }", "private Node<T> rotateWithRight(Node<T> a) {\n Node<T> b = a.getRight();\n a.setRight(b.getLeft());\n b.setLeft(a);\n int aH = Math.max(findHeight(a.getLeft()),\n findHeight(a.getRight())) + 1;\n a.setHeight(aH);\n int bH = Math.max(findHeight(b.getRight()), aH) + 1;\n b.setHeight(bH);\n hAndBF(a);\n hAndBF(b);\n return b;\n }", "public static void main(String[] args) {\n\t\tint[] arr = {7,3,10,12,5,1,9};\n\t\tNode root = null;\n\t\tfor(int n:arr) {\n\t\t\tif(root == null) {\n\t\t\t\troot = new Node(n);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tNode cur = root;\n\t\t\tNode par = null;\n\t\t\twhile(cur != null) {\n\t\t\t\tpar = cur;\n\t\t\t\tif(n < cur.val) cur = cur.left;\n\t\t\t\telse cur = cur.right;\n\t\t\t}\n\t\t\tif(n < par.val) par.left = new Node(n);\n\t\t\telse par.right = new Node(n);\n\t\t\tif(height(root.left) - height(root.right) > 1) {\n\t\t\t\tif(height(root.left.right) > height(root.left.left)) leftRotate(root.left);\n\t\t\t\trightRotate(root);\n\t\t\t}\n\t\t\tif(height(root.right) - height(root.left) > 1) {\n\t\t\t\tif(height(root.right.left) > height(root.right.right)) rightRotate(root.right);\n\t\t\t\tleftRotate(root);\n\t\t\t}\n\t\t}\n\t\t//infixOrder(root);\n//\t\tdel(root,7);\n//\t\tinfixOrder(root);\n\t\t//del(root,5);\n\t\t//del(root,5);\n\t\tinfixOrder(root);\n\t}", "private void doubleDemoteLeft (WAVLNode z) {\n\t z.rank--;\r\n\t z.right.rank--;\r\n }", "@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }", "@Test\n\tpublic void test_3_RotacionesSimplesIzquierdaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.remove(3000)); // Primera rotación\n\t\tassertTrue(tree.remove(1500)); \n\t\tassertTrue(tree.add(700));\n\t\tassertTrue(tree.add(400));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(700)); \n\t\tassertTrue(tree.add(450));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.remove(1000)); // Tercera rotación\n\n\t//\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la\n\t\t// izquierda\n\t\tassertEquals(3, tree.getRotacionesSimplesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}", "private Node rightRotate(Node a) {\n Node b = a.getLeftChild();\n Node n3 = b.getRightChild();\n b.setRightChild(a);\n a.setLeftChild(n3);\n setHeights(a, b);\n return b;\n }", "private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }", "public int delete(int k) {\n\t\tif (this.empty()) {// empty tree, nothing to erase\n\t\t\treturn -1;\n\t\t}\n\t\tAVLNode root = (AVLNode) this.root;\n\t\tAVLNode node = (AVLNode) root.delFindNode(k);\n\t\tif (node == null) {// no node with key==k in this tree\n\t\t\treturn -1;\n\t\t}\n\t\tchar side = node.parentSide();\n\t\tboolean rootTerm = (node.getLeft().getKey() != -1 && node.getRight().getKey() != -1);\n\t\tif (side == 'N' && (rootTerm == false)) {\n\t\t\treturn this.deleteRoot(node);\n\t\t}\n\t\tif (side == 'L') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 1 && rightEdge == 2) {\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.left != null && node.right == null) || (node.left == null && node.right != null)) {// node is //\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// unary\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 2)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (side == 'R') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 2 && rightEdge == 1) {\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.getLeft().getHeight() != -1 && node.getRight().getHeight() == -1)\n\t\t\t\t\t|| (node.getLeft().getHeight() == -1 && node.getRight().getHeight() != -1)) {// node is unary\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 2 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// we get here only if node is binary, and thus not going through any other\n\t\t// submethod\n\t\tAVLNode successor = this.findSuccessor(node); // successor must be unary/leaf\n\t\tif (node.checkRoot()) {\n\t\t\tthis.root = successor;\n\t\t}\n\t\tint numOp = this.delete(successor.key);\n\t\tsuccessor.setHeight(node.getHeight());\n\t\tsuccessor.size = node.getSize();\n\t\tsuccessor.setRight(node.getRight());\n\t\tnode.right.setParent(successor);\n\t\tnode.setRight(null);\n\t\tsuccessor.setLeft(node.getLeft());\n\t\tnode.left.setParent(successor);\n\t\tnode.setLeft(null);\n\t\tsuccessor.setParent(node.getParent());\n\t\tif (node.parentSide() == 'L') {\n\t\t\tnode.parent.setLeft(successor);\n\t\t} else if (node.parentSide() == 'R') {// node.parentSide()=='R'\n\t\t\tnode.parent.setRight(successor);\n\t\t}\n\t\tnode.setParent(null);\n\t\treturn numOp;\n\n\t}", "private AVLTree[] splitLoop(IAVLNode nodeX, AVLTree [] arr){\r\n\t\t\tAVLTree tmp1 = new AVLTree();\r\n\t\t\tAVLTree tmp2 = new AVLTree();\r\n\t\t\tAVLTree tmp3 = new AVLTree();\r\n\t\t\tAVLTree tmp4 = new AVLTree();\r\n\t\t\tIAVLNode preOfX, newNodeForJoin; \r\n\t\t\tint newHeight, newSize;\r\n\t\t\t\r\n\t\t\tIAVLNode curr = nodeX;\r\n\t\t\ttmp1.setRoot(curr.getLeft());\r\n\t\t\ttmp1.getRoot().setParent(null);\r\n\t\t\ttmp3.setRoot(curr.getRight());\r\n\t\t\ttmp3.getRoot().setParent(null);\r\n\t\t\twhile (curr != null) {\r\n\t\t\t\tif(curr.getParent() == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif(curr.getParent().getRight() == curr) // im his left son\r\n\t\t\t\t\t{preOfX = curr.getParent();\r\n\t\t\t\t\ttmp2.setRoot(preOfX.getLeft());\r\n\t\t\t\t\ttmp2.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp1.join(newNodeForJoin, tmp2);\r\n\t\t\t\t\tnewHeight = tmp1.HeightCalc(tmp1.getRoot());\r\n\t\t\t\t\tnewSize = tmp1.sizeCalc(tmp1.getRoot());\r\n\t\t\t\t\ttmp1.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp1.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp2.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreOfX = curr.getParent();\r\n\t\t\t\t\ttmp4.setRoot(preOfX.getRight());\r\n\t\t\t\t\ttmp4.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp3.join(newNodeForJoin, tmp4);\r\n\t\t\t\t\tnewHeight = tmp3.HeightCalc(tmp3.getRoot());\r\n\t\t\t\t\tnewSize = tmp3.sizeCalc(tmp3.getRoot());\r\n\t\t\t\t\ttmp3.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp3.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp4.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t}\r\n\t\t\t\tnewNodeForJoin = new AVLNode(null);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tarr[0] = tmp1;\r\n\t\t\t\tarr[1]= tmp3;\r\n\t\t\t\tarr[0].minimum = arr[0].minPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].minimum = arr[1].minPointer(arr[1].getRoot());\r\n\t\t\t\tarr[0].maximum = arr[0].maxPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].maximum = arr[1].maxPointer(arr[1].getRoot());\r\n\t\r\n\t\t\t\treturn arr;\r\n\t\t\t\t\r\n\t\t\t}", "protected Node<E> rotateLeft(Node<E> root) {\r\n\t\tNode<E> temp = root.right;\r\n\t\troot.right = temp.left;\r\n\t\ttemp.left = root;\r\n\t\treturn temp;\t\r\n\t}", "private void leftRotateFixup(RedBlackNode x){\n\n // Przypadek 1: tylko x, x.right i x.right.right są nil.\n if (isNil(x.left) && isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 0;\n x.right.numLeft = 1;\n }\n\n // Przypadek 2: x.right.left istnieje w dodatku do przypadku 1\n else if (isNil(x.left) && !isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 2 + x.right.left.numLeft +\n x.right.left.numRight;\n }\n\n // Przypadek 3: x.left także istnieje w dodatku do przypadku 1\n else if (!isNil(x.left) && isNil(x.right.left)){\n x.numRight = 0;\n x.right.numLeft = 2 + x.left.numLeft + x.left.numRight;\n\n }\n\n // Przypadek 4: x.left i x.right.left istnieją w dodatku do przypadku 1\n else{\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 3 + x.left.numLeft + x.left.numRight +\n x.right.left.numLeft + x.right.left.numRight;\n }\n }", "private void doubleRotateright(WAVLNode x) {\n\t WAVLNode z=x.left;\r\n\t rightRotate(z);\r\n\t z.rank+=1;\r\n\t leftRotate(z);\r\n }", "public int join(IAVLNode x, AVLTree t) {\n\t\tif (this.empty() && t.empty()) {\n\t\t\tthis.root = x;\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (this.empty()) {// t is not empty\n\t\t\tint comp = t.getRoot().getHeight() + 1;\n\t\t\tt.insert(x.getKey(), x.getValue());\n\t\t\tthis.root = t.root;\n\t\t\treturn comp;\n\t\t}\n\n\t\tif (t.empty()) {// this is not empty\n\t\t\tint comp = this.getRoot().getHeight() + 1;\n\t\t\tthis.insert(x.getKey(), x.getValue());\n\t\t\treturn comp;\n\t\t}\n\n\t\tint thisRank = this.getRoot().getHeight();\n\t\tint otherRank = t.getRoot().getHeight();\n\t\tif (thisRank == otherRank) {\n\t\t\tif (this.getRoot().getKey() < x.getKey()) {\n\t\t\t\tx.setLeft(this.getRoot());\n\t\t\t\tthis.getRoot().setParent(x);\n\t\t\t\tx.setRight(t.getRoot());\n\t\t\t\tt.getRoot().setParent(x);\n\t\t\t\tx.setHeight(x.getLeft().getHeight() + 1);\n\t\t\t\tthis.root = x;\n\t\t\t} else {// this.getRoot().getKey() > x.getKey()\n\t\t\t\tx.setRight(this.getRoot());\n\t\t\t\tthis.getRoot().setParent(x);\n\t\t\t\tx.setLeft(t.getRoot());\n\t\t\t\tt.getRoot().setParent(x);\n\t\t\t\tx.setHeight(x.getRight().getHeight() + 1);\n\t\t\t\tthis.root = x;\n\t\t\t}\n\t\t\treturn (Math.abs(thisRank - otherRank) + 1);\n\t\t} // if we got here, than the trees aren't in the same height\n\t\tboolean newIsHigher;\n\t\tboolean newIsBigger;\n\t\tnewIsHigher = (this.getRoot().getHeight() < t.getRoot().getHeight());\n\t\tnewIsBigger = (this.getRoot().getKey() < this.getRoot().getKey());\n\t\tAVLNode tempX = (AVLNode) x;\n\t\tif (newIsHigher && newIsBigger) {\n\t\t\tt.joinByLeft(tempX, this, 'R');\n\t\t}\n\t\tif (!newIsHigher && !newIsBigger) {\n\t\t\tthis.joinByLeft(tempX, t, 'L');\n\t\t}\n\t\tif (newIsHigher && !newIsBigger) {\n\t\t\tt.joinByRight(tempX, this, 'R');\n\t\t}\n\t\tif (!newIsHigher && newIsBigger) {\n\t\t\tthis.joinByRight(tempX, t, 'L');\n\t\t}\n\t\treturn (Math.abs(thisRank - otherRank) + 1);\n\t}", "public static void main(String[] args) {\n\n /**\n * 1\n * 2 3\n * 4 5 6 7\n * 8\n */\n final BinaryTree binaryTree = new BinaryTree(1);\n\n binaryTree.insertAsLeftChild(2, 1);\n binaryTree.insertAsRightChild(3, 1);\n\n binaryTree.insertAsLeftChild(4,2);\n binaryTree.insertAsRightChild(5,2);\n\n binaryTree.insertAsLeftChild(6,3);\n binaryTree.insertAsRightChild(7, 3);\n\n binaryTree.insertAsLeftChild(8,6);\n\n binaryTree.inOrderTraversal();\n binaryTree.inOrderTraversalRec();\n\n binaryTree.preOrderTraversal();\n binaryTree.preOrderTraversalRec();\n\n binaryTree.postOrderTraversalRec();\n binaryTree.postOrderTraversal();\n\n binaryTree.levelOrderTraversal();\n binaryTree.levelOrderTraversalBruteForce();\n\n binaryTree.printAllPaths();\n binaryTree.printLevel(3);\n binaryTree.printLeaves();\n binaryTree.leftSideView();\n binaryTree.rightSideView();\n\n System.out.println(\"binaryTree.heightBalanceFactor(3): \" + binaryTree.heightBalanceFactor(binaryTree.searchRec(3)));\n System.out.println(\"binaryTree.heightBalanceFactor(1): \" + binaryTree.heightBalanceFactor(binaryTree.searchRec(1)));\n\n binaryTree.toMirrorImage();\n\n System.out.println(\"After Converting the tree to mirror image\");\n binaryTree.leftSideView();\n binaryTree.rightSideView();\n\n System.out.println(\"binaryTree.numberOfNodes(): \" + binaryTree.numberOfNodes());\n System.out.println(\"binaryTree.isSimilar(binaryTree): \" + binaryTree.isSimilar(binaryTree));\n System.out.println(\"binaryTree.isSimilar(binaryTree): \" + binaryTree.isCopy(binaryTree));\n System.out.println(\"binaryTree.height(): \" + binaryTree.height());\n System.out.println(\"binaryTree.searchRec(4) \" + binaryTree.searchRec(4));\n System.out.println(\"binaryTree.searchRec(9) \" + binaryTree.searchRec(9));\n }", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n\n // Perform rotation \n y.left = x; \n x.right = T2; \n\n // Update heights \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n\n // Return new root \n return y; \n }", "public AVLNode rotateLeft(AVLNode pt) {\n\t\tAVLNode node = pt.getRight();\n\t\t\n\t\tpt.setRight(node.getLeft());\n\t\tnode.setLeft(pt);\n\t\t\n\t\treturn node;\n\t}", "private RedBlackNode performRotation(int newElement, RedBlackNode parent) \n { \n //check whether the value of the newElement is lesser than the element of the parent node or not \n if(newElement < parent.element) \n //if true, perform the rotation with the left child and right child based on condition and set return value to the left child of the parent node \n return parent.leftChild = newElement < parent.leftChild.element ? rotationWithLeftChild(parent.leftChild) : rotationWithRightChild(parent.leftChild) ; \n else \n //if false, perform the rotation with the left child and right child based on condition and set return value to the right child of the parent node \n return parent.rightChild = newElement < parent.rightChild.element ? rotationWithLeftChild(parent.rightChild) : rotationWithRightChild(parent.rightChild); \n }", "private void rightRotate(RedBlackNode<T> y){\n rightRotateFixup(y);\n\n RedBlackNode<T> x = y.left;\n y.left = x.right;\n\n // Czy istnieje x.right\n if (!isNil(x.right))\n x.right.parent = y;\n x.parent = y.parent;\n\n // y.parent jest nil\n if (isNil(y.parent))\n root = x;\n\n // y jest prawym dzieckiem swojego rodzica\n else if (y.parent.right == y)\n y.parent.right = x;\n\n // y jest lewym dzieckiem swojego rodzica\n else\n y.parent.left = x;\n x.right = y;\n\n y.parent = x;\n\n }", "@Test\n public void testGetLeft() {\n AVLNode<Integer> left = new AVLNode<> ( 4 );\n AVLNode<Integer> instance = new AVLNode<>( 7);\n instance.setLeft(left);\n AVLNode<Integer> expResult = left;\n AVLNode<Integer> result = instance.getLeft();\n assertEquals(expResult, result);\n }", "private NodeTreeBinary<T> rotateLeft(NodeTreeBinary<T> h) {\n\t\tNodeTreeBinary<T> x = h.getRight();\n\n\t\th.setRight(x.getLeft());\n\t\tx.setLeft(h);\n\t\tsetColor(x, getColor(x.getLeft()));\n\t\tsetColor(x.getLeft(), NodeTreeRB.RED);\n\n\t\tsetSize(x, getSize(h));\n\t\tsetSize(h, getSize(h.getLeft()) + getSize(h.getRight()) + 1);\n\n\t\treturn x;\n\t}", "public void rebalance(NodeRB node){\n \r\n if (node == null){ //failsafe. probably not needed.\r\n return;\r\n }\r\n\r\n NodeRB parent = null, uncle = null, grandparent = null;\r\n parent = fetchParentOf(node); // attempt to fetch the parent. if null, nothing happens.\r\n \r\n if (parent != null){ // must have a parent to have a grandparent. A parent is needed for rebalancing.\r\n \r\n grandparent = fetchParentOf(parent); // attempt to fetch the grandparent. if null, nothing happens.\r\n \r\n if (grandparent != null && parent.color == 'r'){ // grandparent is also required for rebalancing.\r\n \r\n //attempt to find an uncle. can return null. in this case, see the first 'if' statement.\r\n uncle = (grandparent.left == parent) ? grandparent.right : grandparent.left;\r\n\r\n if (uncle == null){ // Phantom, used for reference. assumes the role of a black null leaf.\r\n //System.out.println(\"[i] Uncle is NULL. Assuming as black null leaf.\");\r\n uncle = new NodeRB(0);\r\n uncle.color = 'b';\r\n }\r\n\r\n if (uncle.color == 'r'){ // case 0\r\n System.out.println(\"[i] Case 0: Recolor.\");\r\n recolor(parent);\r\n recolor(uncle);\r\n recolor(grandparent);\r\n return;\r\n }\r\n\r\n if (uncle.color == 'b'){\r\n\r\n //case 1: simple right\r\n if (parent.left == node && grandparent.left == parent){\r\n System.out.println(\"[i]: Simple Right (RR) Rotation...\");\r\n rotateRight(grandparent);\r\n recolor(parent);\r\n recolor(grandparent);\r\n }\r\n\r\n //case 2: simple left\r\n else if (parent.right == node && grandparent.right == parent){\r\n System.out.println(\"[i]: Simple left (LL) Rotation...\");\r\n rotateLeft(grandparent);\r\n recolor(parent);\r\n recolor(grandparent);\r\n }\r\n\r\n //case 3: double left\r\n else if (parent.left == node && grandparent.right == parent){\r\n System.out.println(\"[i]: Double Left (RL) Rotation...\");\r\n rotateRight(parent);\r\n rotateLeft(grandparent);\r\n recolor(node);\r\n recolor(grandparent);\r\n }\r\n\r\n //case 4: double right\r\n else if (parent.right == node && grandparent.left == parent){\r\n System.out.println(\"[i]: Double Right (LR) Rotation...\");\r\n rotateLeft(parent);\r\n rotateRight(grandparent);\r\n recolor(node);\r\n recolor(grandparent);\r\n }\r\n\r\n }\r\n\r\n }\r\n }\r\n \r\n }", "int RBTreeTest(RBTreeNode testRoot) {\n if (testRoot == null) {\n return 1; //Leaf nodes\n }\n\n RBTreeNode lNode = testRoot.children[0];\n RBTreeNode rNode = testRoot.children[1];\n\n\n\n //Check that Red Nodes do not have red children\n if(isRedNode(testRoot)) {\n if(isRedNode(rNode) || isRedNode(lNode)) {\n System.out.println(\"Red-Red violation- Left: \"+ isRedNode(lNode) +\" Right: \"+isRedNode(rNode));\n return 0;\n }\n\n\n\n }\n\n int lHeight = RBTreeTest(lNode);\n int rHeight = RBTreeTest(rNode);\n\n //Check for Binary Tree. Should be done after the recursive call to handle the null case.\n if(lNode.val > rNode.val) {\n System.out.println(\"Binary tree violation Left: \"+ lNode.val + \" Right: \"+ rNode.val);\n return 0;\n }\n\n if(lHeight !=0 && rHeight != 0 && lHeight != rHeight) {\n System.out.println(\"Height violation- left Height: \"+rHeight+ \" right Height: \"+lHeight);\n return 0;\n }\n\n\n //Return current height incuding the current node.\n if (lHeight != 0 && rHeight != 0)\n return isRedNode(testRoot) ? lHeight : lHeight + 1;\n else\n return 0;\n\n }", "private void balanceTree(BinaryNode node) {\n if (node == null) return;\n\n int leftDepth = getDepth(node.left, 0);\n int rightDepth = getDepth(node.right, 0);\n if (Math.abs(leftDepth - rightDepth) > 1) { // outofbalance\n if (leftDepth > rightDepth) {\n if (node.left.right != null) doubleRotationLR(node);\n else singleRotationLR(node);\n }\n\n else {\n if (node.right.left != null) doubleRotationRL(node);\n else singleRotationRL(node);\n }\n balanceTree(root);\n } else {\n balanceTree(node.left);\n balanceTree(node.right);\n }\n }", "private void fixTree(Node node){\n while(node.parent.color == RED){\n Node uncle = nil;\n if (node.parent == node.parent.parent.left){ // parent is to the left of grandparent\n uncle = node.parent.parent.right;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****LEFT RIGHT CASE (rotate P left)**** // GB GB\n if (node == node.parent.right){ // PR ==> NR\n node = node.parent; // NR PR\n rotateLeft(node); //\n }\n \n // ****LEFT LEFT CASE (rotate G right)****\n // uncle is nil and color = BLACK, or is // GB P\n // not nil and color still is BLACK // PR ==> N G\n node.parent.color = BLACK; // NR\n node.parent.parent.color = RED;\n rotateRight(node.parent.parent);\n \n } else { //parent is to the right of grand parent\n uncle = node.parent.parent.left;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****RIGHT LEFT CASE (rotate P right)**** // GB GB\n if (node == node.parent.left){ // PR ==> NR\n node = node.parent; // NR PR\n rotateRight(node); //\n }\n \n // **** RIGHT RIGHT CASE (rotate G left) // GR PB\n node.parent.color = BLACK; // PB ==> GR NR\n node.parent.parent.color = RED; // NR\n rotateLeft(node.parent.parent);\n }\n }\n \n root.color = BLACK;\n }", "Node leftRotate(Node x)\n\t\t{\n\t\t\tNode y=x.right;\n\t\t\tNode T2=y.left;\n\t\t\t\n\t\t\t//rotate\n\t\t\t\n\t\t\ty.left=x;\n\t\t\tx.right=T2;\n\t\t\t\n\t\t\t//update heights\n\t\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\t\n\t\t\t// new root\n\t\t\treturn y;\n\t\t}", "protected RedBlackNode<T> rotateLeft(RedBlackNode<T> node) {\n RedBlackNode<T> rightNode = node.getRightChild();\n RedBlackNode<T> parent = node.getParent();\n rightNode._parent = node.getParent();\n node._rightChild = rightNode.getLeftChild();\n if (node._rightChild != null ) {\n node._rightChild._parent = node;\n } \n rightNode._leftChild = node; \n node._parent = rightNode;\n // node had parent.\n if(parent != null) {\n // node was left child\n if(parent._leftChild == node) {\n parent._leftChild = rightNode;\n } else {\n // node was right child\n parent._rightChild = rightNode;\n }\n } else {\n // node was head\n _head = rightNode;\n }\n return rightNode;\n }", "private void doubleDemoteright (WAVLNode z) {\n\t z.rank--;\r\n\t z.left.rank--;\r\n }", "public void fixViolationDelete(Node node){ \n\t\t\n\t while(node!=root && node.colour==\"Black\"){\n\t if(node==node.parent.left){\n\t \t//if the node is the left child and sibling is in the right\n\t Node sibling=node.parent.right;\n\t //check if the color of sibling is red then exchange the color with parent and rotate left \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateLeft(node.parent);\n\t sibling=node.parent.right;\n\t }\n\t if(sibling.left.colour==\"Black\" && sibling.right.colour ==\"Black\"){\n\t \t//if both the children of sibling are black, change the color of the sibling and transfer the problem up the parent\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }\n\t else{ \n\t if(sibling.right.colour==\"Black\"){\n\t \t//if the left child of the sibling in red exchange the color of the sibling's child with sibling and color the child black\n\t \t// and rotate right\n\t \tsibling.left.colour = \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateRight(sibling);\n\t sibling=node.parent.right;\n\t }\n\t //followed my the left rotation\n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.right.colour = \"Black\";\n\t rotateLeft(node.parent);\n\t node=root;\n\t }\n\t }\n\t else{\n\t \t//node is the right child of the parent and sibling is the left child\n\t Node sibling=node.parent.left;\n\t \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateRight(node.parent);\n\t sibling=node.parent.left;\n\t }\n\t \n\t if(sibling.right.colour==\"Black\" && sibling.left.colour==\"Black\"){\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }else{\n\t if(sibling.left.colour==\"Black\"){\n\t \tsibling.right.colour= \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateLeft(sibling);\n\t sibling=node.parent.left;\n\t }\n\t \n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.left.colour = \"Black\";\n\t rotateRight(node.parent);\n\t node=root;\n\t }\n\t }\n\t }\n\t //we color the node black\n\t node.colour = \"Black\";\n\t}", "private int joinSecnodCase(AVLTree t1, IAVLNode x, AVLTree t2) {\r\n\t\t\t\t int returnValue = 0;\r\n\t\t\t\t IAVLNode curr = t1.getRoot(), parent;\r\n\t\t\t\t \r\n\t\t\t\t while(true) {\r\n\t\t\t\t\t if(curr.getHeight() <= t2.getRoot().getHeight())\r\n\t\t\t\t\t\t break;\r\n\t\t\t\t\t if(curr.getRight().getHeight() == -1)\r\n\t\t\t\t\t\t break;\r\n\t\t\t\t\t curr = curr.getRight();\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t parent = curr.getParent();\r\n\t\t\t\t \r\n\t\t\t\t if(t1.getRoot() == curr) {\r\n\t\t\t\t\t curr.setRight(x);\r\n\t\t\t\t\t x.setParent(curr);\r\n\t\t\t\t\t curr.setHeight(curr.getHeight() + 1 );\r\n\t\t\t\t\t return 0;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t\t returnValue = Math.abs(t2.getRoot().getHeight() - curr.getHeight());\r\n\t\t\t\t \r\n\t\t\t\t //replacing pointers\r\n\t\t\t\t \r\n\t\t\t\t x.setLeft(curr);\r\n\t\t\t\t x.setParent(parent);\r\n\t\t\t\t parent.setRight(x);\r\n\t\t\t\t curr.setParent(x);\r\n\t\t\t\t x.setRight(t2.getRoot());\r\n\t\t\t\t t2.getRoot().setParent(x);\r\n\t\t\t\t t2.setRoot(null);\r\n\t\t\t\t t2.setRoot(t1.getRoot());\r\n\t\t\t\t x.setHeight(Math.max(x.getRight().getHeight(), x.getLeft().getHeight()) + 1);\r\n\t\t\t\t //FIXING NEW TREE CREATED\r\n\t\t\t\t \r\n\t\t\t\t //t2.minimum = t1.minimum;\r\n\t\t\t\t t2.maximum = t1.maximum;\r\n\t\t\t\t \r\n\t\t\t\t //FIXING NEW TREE CREATED\r\n\t\t\t\t HieghtsUpdating(x);\r\n\t\t\t\t SizesUpdate(x);\r\n\t\t\r\n\t\t\t\t return returnValue;\r\n\t\t\t\t}", "private AvlNode<E> remove(Comparable<E> element, AvlNode<E> node){\n if(node == null) {\n return node;\n } else if(node.value.compareTo((E)element) > 0){\n node.left = remove(element, node.left);\n } else if(node.value.compareTo((E)element) < 0){\n node.right = remove(element, node.right);\n } else {\n if(node.left == null && node.right == null){\n return null;\n } else if(node.left == null){\n return node.right;\n } else if(node.right == null){\n return node.left;\n } else {\n AvlNode<E> replacement = findMax(node.left);\n replacement.left = remove(replacement.value, node.left);\n replacement.right = node.right;\n return replacement;\n }\n }\n\n if(height(node.left) - height(node.right) > 1){\n if(height(node.left.left) > height(node.left.right)){\n node = rotateWithLeftChild(node);\n } else {\n node = doubleWithLeftChild(node);\n }\n } else if(height(node.left) - height(node.right) < -1){\n if(height(node.right.right) > height(node.right.left)){\n node = rotateWithRightChild(node);\n } else {\n node = doubleWithRightChild(node);\n }\n }\n node.height = max(height(node.left), height(node.right)) + 1;\n return node;\n }", "@Ignore\n public void replay() {\n LinkedRBTree tree = new LinkedRBTree();\n Key[] add = new Key[] {\n new Key(0, 1), new Key(1, 0), new Key(0, 0)\n };\n Key[] rem = new Key[] {\n new Key(0, 1)\n };\n for (Key k : add) {\n System.out.println(\"added\" + k + \": \" + tree.add(k));\n }\n System.out.println(\"added!\");\n// System.out.println(\"==========\");\n// System.out.println(tree.debug());\n// System.out.println(\"==========\");\n// MultiTool.sleepThread(10);\n for (Key k : rem) {\n// System.out.println(\"==========\");\n// System.out.println(tree.debug());\n// System.out.println(\"==========\");\n// MultiTool.sleepThread(10);\n System.out.println(\"removed\" + k + \": \" + tree.remove(k));\n }\n System.out.println(\"removed!\");\n System.out.println(tree);\n System.out.println(\"root: \" + tree.getRoot());\n System.out.println(\"min : \" + tree.getMin());\n System.out.println(\"max : \" + tree.getMax());\n \n for (Key k : rem) {\n if (tree.contains(k)) {\n System.err.println(\"ERROR: Unexpected: \" + k);\n }\n }\n for (Key k : add) {\n if (!tree.contains(k) && !ArrayTools.asList(rem).contains(k)) {\n System.err.println(\"ERROR: Expected: \" + k);\n }\n }\n }", "private long leftRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentRight = current.right;\r\n Node tempN = new Node(current.right);\r\n current.right = tempN.left;\r\n tempN.left = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentRight);\r\n return currentRight;\r\n }", "@Test\n public void testGetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( 7 );\n AVLNode<Integer> expResult = new AVLNode<> (); \n expResult.setRoot(new AVLNode<>( 7 ));\n AVLNode<Integer> result = instance;\n assertEquals(expResult.getRoot().getKey(), result.getKey());\n }", "public AVLTree() {\n\t\tthis.root = null;\n\t}", "private RedBlackNode rotationWithRightChild(RedBlackNode node1) \n { \n RedBlackNode node2 = node1.rightChild; \n node1.rightChild = node2.leftChild; \n node2.leftChild = node1.leftChild; \n return node2; \n }", "@Test\n\tpublic void test_3_RotacionesDoblesIzquierdaRemove() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(4000));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.add(1400));\n\t\tassertTrue(tree.remove(4000)); // Primera rotación\n\t\tassertTrue(tree.add(1300));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.add(1200));\n\t\tassertTrue(tree.remove(1500)); // Tercera rotación\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones dobles a la izquierda\n\t\tassertEquals(3, tree.getRotacionesDoblesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha()); \n\t\tassertEquals(0, tree.getRotacionesSimplesIzquierda());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\n\t//\tSystem.out.print(tree.toString());\n\t}" ]
[ "0.6858467", "0.6819399", "0.6695318", "0.66937506", "0.6626784", "0.66111296", "0.65065384", "0.6441919", "0.6406262", "0.63672125", "0.6351469", "0.62502235", "0.62023383", "0.61996025", "0.6196432", "0.6191595", "0.61851007", "0.6175034", "0.60857344", "0.60826534", "0.60610944", "0.6048558", "0.60162365", "0.60027647", "0.599279", "0.5986261", "0.59738517", "0.5969936", "0.59696484", "0.596297", "0.5932304", "0.5929903", "0.59186494", "0.5912811", "0.58629566", "0.58444005", "0.58242357", "0.58103883", "0.5807839", "0.58064264", "0.5766388", "0.5757505", "0.57510734", "0.5746722", "0.57404816", "0.57104266", "0.5691155", "0.5688339", "0.5684322", "0.5636282", "0.5628414", "0.56265306", "0.5622017", "0.56089485", "0.55959564", "0.5593678", "0.55869335", "0.558123", "0.5573215", "0.5550954", "0.5549065", "0.55470103", "0.5523183", "0.55195236", "0.55166817", "0.5510662", "0.55105805", "0.550773", "0.5505983", "0.5500332", "0.54938763", "0.54887164", "0.54860204", "0.5485578", "0.5485181", "0.548403", "0.5479607", "0.54697603", "0.5464404", "0.5456", "0.5450913", "0.54366064", "0.54327536", "0.54282373", "0.542061", "0.54114765", "0.5407404", "0.5404382", "0.5399848", "0.5399833", "0.53997284", "0.53900546", "0.53807247", "0.5357435", "0.535443", "0.5352211", "0.5340469", "0.5338096", "0.5337136", "0.5333884", "0.53330785" ]
0.0
-1
avl tree test lr rotate
@Test public void test3() { Integer[] data = new Integer[]{// 100, 50, 75, // }; baseRotateTest(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doubleRotateLeftDel (WAVLNode z) {\n\t WAVLNode a = z.right.left;\r\n\t WAVLNode y = z.right;\r\n\t WAVLNode c = z.right.left.left;\r\n\t WAVLNode d = z.right.left.right;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.left=z;\r\n\t a.right=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.left=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.right=c;\r\n\t z.rank=z.rank-2;\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}", "private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}", "private void fixAVLTree(Node node) {\n\t\tfinal int lf = getLoadFactor(node);\n\t\t//if (lf == -1 || lf == 0 || lf == 1) {\n\t\tif (lf >= -1 && lf <= 1) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t}\t\t\n\t\trotateTree(node);\n\t}", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "private void rotateLeftDel (WAVLNode z) {\n\t WAVLNode y = z.right;\r\n\t WAVLNode a = y.left;\r\n\t y.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=y;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=y;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=y;\r\n\t }\r\n\t \r\n\t y.left = z;\r\n\t y.rank++;\r\n\t z.parent=y;\r\n\t z.right = a;\r\n\t z.rank--;\r\n\t if(a.rank>=0) {\r\n\t\t a.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.left.sizen+a.sizen+1;\r\n\t y.sizen = z.sizen+y.right.sizen+1;\r\n }", "private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.right=z;\r\n\t a.left=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.right=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.left=c;\r\n\t z.rank=z.rank-2;\r\n\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private int FixAVLtree(IAVLNode node)\r\n\t{\r\n\t\tif (node.isRealNode()) \r\n\t\t{\r\n\t\t\tif(BFCalc(node) == -2) \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==-1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or -1\r\n\t\t\t\tint rightBF=BFCalc(node.getRight());\r\n\t\t\t\tif(rightBF==0||rightBF==-1) {\r\n\t\t\t\t\tRRRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tRLRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse //if BFCalc(node) == 2 \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or 1\r\n\t\t\t\tint leftBF=BFCalc(node.getLeft());\r\n\t\t\t\tif(leftBF==1 ||leftBF==0) \r\n\t\t\t\t{\r\n\t\t\t\t\tLLRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tLRRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t} \r\n\t\t} \r\n\t\t\treturn 0;\r\n\t}", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "private void leftRightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getRight();\n AVLNode<T> oldNodeLeft = node.getLeft();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setLeft(nodeDat);\n if (oldNodeLeft != null) {\n node.getLeft().setLeft(oldNodeLeft);\n calcDeterminants(node.getLeft().getLeft());\n }\n node.setData(child.getData());\n if (oldChildLeft != null) {\n node.getLeft().setRight(oldChildLeft);\n calcDeterminants(node.getLeft().getRight());\n } else {\n node.getLeft().setRight(null);\n calcDeterminants(node.getLeft());\n }\n if (oldChildRight != null) {\n node.setRight(oldChildRight);\n calcDeterminants(node.getRight());\n } else {\n node.setRight(null);\n calcDeterminants(node.getLeft());\n }\n\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private void rightLeftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getLeft();\n AVLNode<T> oldNodeRight = node.getRight();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setRight(nodeDat);\n if (oldNodeRight != null) {\n node.getRight().setRight(oldNodeRight);\n calcDeterminants(node.getRight().getRight());\n }\n node.setData(child.getData());\n if (oldChildRight != null) {\n node.getRight().setLeft(oldChildRight);\n calcDeterminants(node.getRight().getLeft());\n } else {\n node.getRight().setLeft(null);\n calcDeterminants(node.getRight());\n }\n if (oldChildLeft != null) {\n node.setLeft(oldChildLeft);\n calcDeterminants(node.getLeft());\n } else {\n node.setLeft(null);\n calcDeterminants(node.getRight());\n }\n\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "private void rotateRightDel (WAVLNode z) {\n\t WAVLNode x = z.left;\r\n\t WAVLNode d = x.right;\r\n\t x.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=x;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=x;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=x;\r\n\t }\r\n\t x.right = z;\r\n\t x.rank++;\r\n\t z.parent=x;\r\n\t z.left = d;\r\n\t z.rank--;\r\n\t if(d.rank>=0) {\r\n\t\t d.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.right.sizen+d.sizen+1;\r\n\t x.sizen = z.sizen+x.left.sizen+1;\r\n }", "public int insert(int k, String i) { // insert a node with a key of k and info of i, the method returns the number of rebalance operation\r\n WAVLNode x = new WAVLNode(k,i);// create the new node to insert\r\n x.left=EXT_NODE;\r\n x.right=EXT_NODE;\r\n if(root==EXT_NODE) { // checking if the tree is empty, in that case put x as a root\r\n \t root=x;\r\n \t return 0;\r\n }\r\n WAVLNode y = treePos(this, k); // find the correct position to insert the node\r\n int [] f = {x.key,y.key};\r\n if (f[0]==f[1]) { // in case the key is already exists in the tree, return -1 and dosent insert anything\r\n \t \r\n \t return -1;\r\n }\r\n x.parent=y; \r\n if(y.rank!=0) {// if y is onary do:\r\n \t if(x.key<y.key) {// check if x should be left son of y\r\n \t\t y.left=x;\r\n \t }\r\n \t else { // x should be right son of y\r\n \t\t y.right=x;\r\n \t }\r\n \t return 0; // no rebalance operation was needed, return 0\r\n }\r\n if(x.key<y.key) { // if y is a leaf\r\n \t y.left=x;\r\n }\r\n else {\r\n \t y.right=x;\r\n }\r\n int cnt=0;//rebalance operation to return\r\n while(x.parent!=null&&x.parent.rank-x.rank==0) { // while the tree is not balanced continue to balance the tree\r\n \t if(parentside(x.parent, x).equals(\"left\")) { // check if x is a left son of x's parent\r\n \t\t if (x.parent.rank-x.parent.right.rank==1) {//check the conditions for promotion\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.left.rank==1) { // check the conditions for rotate\r\n \t\t\t rightRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t doubleRotateleft(x); // check the conditions for double rotate\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n \t else { // x is a right son of x's parent, all conditions and actions are symmetric to the left side\r\n \t\t if (x.parent.rank-x.parent.left.rank==1) {\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.right.rank==1) {\r\n \t\t\t leftRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t \r\n \t\t\t doubleRotateright(x);\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n }\r\n return cnt;\r\n \r\n }", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "private AVLTreeNode<E> smallRotateRight(AVLTreeNode<E> node) {\n AVLTreeNode<E> q = node.getLeft();\n node.setLeft(q.getRight());\n q.setRight(node);\n node.fixHeight();\n q.fixHeight();\n return q;\n }", "private void rightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private void leftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private void doubleRotateleft(WAVLNode x) {\n\t WAVLNode z=x.right;\r\n\t leftRotate(z);\r\n\t z.rank+=1;\r\n\t rightRotate(z);\r\n }", "private AvlNode<E> rotateWithRightChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.right;\n k1.right = k2.left;\n k2.left = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(k1.height, height(k2.right)) + 1;\n return k2;\n }", "private AVLNode<T> rotateLeft(AVLNode<T> node) {\n AVLNode<T> substitute = node.right;\n // donde ponemos los hijos a la izquierda del substituto\n node.right = substitute.left;\n substitute.left = node;\n\n return substitute;\n }", "public int delRecTriOne(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tint rightEdge = node.right.getHeight() - node.right.getRight().getHeight();\n\t\t\tint leftEdge = node.right.getHeight() - node.right.getLeft().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (leftEdge == 2) {// case 3\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// leftEdge==1, case 4\n\t\t\t\tAVLNode rightsLeftChild = (AVLNode) node.getRight().getLeft();\n\t\t\t\tint numOp = this.doubleRotation(rightsLeftChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getRight().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\n\t\t}\n\n\t\telse { // side='R'\n\t\t\tint leftEdge = node.left.getHeight() - node.left.getLeft().getHeight();\n\t\t\tint rightEdge = node.left.getHeight() - node.left.getRight().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (rightEdge == 2) {// case 3\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// rightEdge==1, leftEdge==2, case 4\n\t\t\t\tAVLNode leftsRightChild = (AVLNode) node.getLeft().getRight();\n\t\t\t\tint numOp = this.doubleRotation(leftsRightChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getLeft().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\t\t}\n\t}", "public interface AVLTree<E extends Comparable<E>> extends BinarySortedTree<E>{\n\n boolean isAVLTree(AVLNode<E> current);\n\n interface AVLNode<E>{\n E getData();\n\n AVLNode setData(E data);\n\n AVLNode<E> getParent();\n\n AVLNode setParent(AVLNode<E> parent);\n\n AVLNode<E> getLeft();\n AVLNode setLeft(AVLNode<E> left);\n\n AVLNode<E> getRight();\n\n AVLNode setRight(AVLNode<E> right);\n\n int getHeight();\n\n AVLNode setHeight(int height);\n }\n}", "private AVLNode<T, U> rotateLeft(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getRight();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setRight(newRoot.getLeft());\n\t\t\t \n\t\tif(oldRoot.getRight() != null) {\n\t\t\toldRoot.getRight().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setLeft(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }", "public nodoArbolAVL insertarAVL(nodoArbolAVL nuevo,nodoArbolAVL subAr){\n nodoArbolAVL nuevoPadre = subAr;\n if(nuevo.dato < subAr.dato){\n if(subAr.hijoIzquierdo == null){\n subAr.hijoIzquierdo = nuevo;\n }else{\n subAr.hijoIzquierdo = \n insertarAVL(nuevo,subAr.hijoIzquierdo);\n if((obtenerFE(subAr.hijoIzquierdo)-obtenerFE(subAr.hijoDerecho)==2)){\n if(nuevo.dato < subAr.hijoIzquierdo.dato){\n nuevoPadre = rotacionIzquierda(subAr);\n }else{\n nuevoPadre = rotacionDobleIzquierda(subAr);\n }\n }\n }\n }else if(nuevo.dato > subAr.dato){\n if(subAr.hijoDerecho == null){\n subAr.hijoDerecho = nuevo;\n \n }else{\n subAr.hijoDerecho = insertarAVL(nuevo,subAr.hijoDerecho);\n if((obtenerFE(subAr.hijoDerecho)-obtenerFE(subAr.hijoIzquierdo)==-2)){\n if(nuevo.dato > subAr.hijoDerecho.dato){\n nuevoPadre = rotacionDerecha (subAr);\n }else{\n nuevoPadre = rotacionDobleDerecha(subAr);\n }\n }\n }\n }else{\n System.out.println(\"NODO DUPLICADO\");\n }\n //ACTUALIZANDO EL FE\n if((subAr.hijoIzquierdo == null)&&(subAr.hijoDerecho !=null)){\n subAr.fe = subAr.hijoDerecho.fe + 1;\n }else if((subAr.hijoDerecho == null)&&(subAr.hijoIzquierdo != null)){\n subAr.fe = subAr.hijoIzquierdo.fe +1 ;\n }else{\n subAr.fe = Math.max(obtenerFE(subAr.hijoIzquierdo),\n obtenerFE(subAr.hijoDerecho))+1;\n }\n nuevo.SetNivel(nuevo.nivel+1);\n return nuevoPadre;\n }", "private void doubleRotationLR(BinaryNode node) {\n BinaryNode temp = max(node.left);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the left\n temp.parent.right = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n root.parent = null;\n root.right = node;\n root.left = node.left;\n if(node.left != null) node.left.parent = root;\n node.parent = root;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.left = node.left;\n if(node.left != null) node.left.parent = temp;\n temp.right = node;\n node.parent = temp;\n node.left = null;\n }\n }", "private AVLNode<T, U> rotateRight(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getLeft();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setLeft(newRoot.getRight());\n\t\t\t \n\t\tif(oldRoot.getLeft() != null) {\n\t\t\toldRoot.getLeft().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setRight(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "private AVLNode<T> rotateRight(AVLNode<T> node) {\n AVLNode<T> substiute = node.left;\n node.left = substiute.right;\n substiute.right = node;\n\n // node = substitute;\n\n return substiute;\n }", "private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }", "private static <V> IntTree<V> rebalanced(\n final long key, final V value, final IntTree<V> left, final IntTree<V> right) {\n if (left.size + right.size > 1) {\n if (left.size >= OMEGA * right.size) { // rotate to the right\n IntTree<V> ll = left.left, lr = left.right;\n if (lr.size < ALPHA * ll.size) // single rotation\n return new IntTree<V>(\n left.key + key,\n left.value,\n ll,\n new IntTree<V>(-left.key, value, lr.withKey(lr.key + left.key), right));\n else { // double rotation:\n IntTree<V> lrl = lr.left, lrr = lr.right;\n return new IntTree<V>(\n lr.key + left.key + key,\n lr.value,\n new IntTree<V>(-lr.key, left.value, ll, lrl.withKey(lrl.key + lr.key)),\n new IntTree<V>(\n -left.key - lr.key, value, lrr.withKey(lrr.key + lr.key + left.key), right));\n }\n } else if (right.size >= OMEGA * left.size) { // rotate to the left\n IntTree<V> rl = right.left, rr = right.right;\n if (rl.size < ALPHA * rr.size) // single rotation\n return new IntTree<V>(\n right.key + key,\n right.value,\n new IntTree<V>(-right.key, value, left, rl.withKey(rl.key + right.key)),\n rr);\n else { // double rotation:\n IntTree<V> rll = rl.left, rlr = rl.right;\n return new IntTree<V>(\n rl.key + right.key + key,\n rl.value,\n new IntTree<V>(\n -right.key - rl.key, value, left, rll.withKey(rll.key + rl.key + right.key)),\n new IntTree<V>(-rl.key, right.value, rlr.withKey(rlr.key + rl.key), rr));\n }\n }\n }\n // otherwise already balanced enough:\n return new IntTree<V>(key, value, left, right);\n }", "private AVLTreeNode<E> smallRotateLeft(AVLTreeNode<E> node) {\n AVLTreeNode<E> p = node.getRight();\n node.setRight(p.getLeft());\n p.setLeft(node);\n node.fixHeight();\n p.fixHeight();\n return p;\n }", "Node leftRotate(Node x) { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = maxInt(heightBST(x.left), heightBST(x.right)) + 1; \n y.height = maxInt(heightBST(y.left), heightBST(y.right)) + 1; \n \n // Return new root \n return y; \n }", "private void balanceTree(AVLNode<T> node) {\n AVLNode<T> parent = null;\n int parBal = 0;\n if (node.getHeight() == 0) {\n if (!(node.getData().equals(root.getData()))) {\n balanceTree(getParent(root, node));\n } else {\n parent = node;\n parBal = parent.getBalanceFactor();\n }\n } else {\n if (node.getData().equals(root.getData())) {\n parent = node;\n parBal = parent.getBalanceFactor();\n } else {\n parent = getParent(root, node);\n if (parent != null) {\n parBal = parent.getBalanceFactor();\n }\n }\n }\n\n if (parBal < -1 && node.getBalanceFactor() <= 0) {\n leftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() >= 0) {\n rightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal < -1 && node.getBalanceFactor() > 0) {\n rightLeftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() < 0) {\n leftRightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else {\n if (parent != null && !(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n }\n }", "private void rotateRight(Node tree) {\n assert tree != null;\n assert tree.left != null;\n\n Node temp = tree.left;\n tree.left = temp.right;\n if(temp.right != null) { //no null pointers\n temp.right.parent = tree;\n }\n temp.parent = tree.parent;\n if(temp.parent != null) { //am i at the root?\n if(temp.parent.left == tree) {\n temp.parent.left = temp;\n } else if (temp.parent.right == tree) {\n temp.parent.right = temp;\n }\n }\n tree.parent = temp;\n temp.right = tree;\n if(tree == root) { root = temp; } //rewrite the root\n rotations += 1;\n }", "private void singleRotationRL(BinaryNode node) {\n if (node == root) {\n root = node.right;\n root.parent = null;\n root.left = node;\n node.parent = node.right;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.right;\n } else {\n node.parent.left = node.right;\n }\n node.right.parent = node.parent;\n node.right.left = node;\n node.parent = node.right;\n node.right = null;\n }\n }", "private void doubleRotationRL(BinaryNode node) {\n BinaryNode temp = min(node.right);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the right\n temp.parent.right = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n root.parent = null;\n root.left = node;\n root.right = node.right;\n if(node.right != null) node.right.parent = root;\n node.parent = root;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.right = node.right;\n if(node.right != null) node.right.parent = temp;\n temp.left = node;\n node.parent = temp;\n node.right = null;\n }\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "private BinaryNode<AnyType> rotateRight1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t\tBinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.left.right;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp1.right=null;\r\n\t\t root=temp1;\r\n\t\t root.right=parno;\r\n\t\t root.right.left=temp3;\r\n\t\t root.right.right=temp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.left;\r\n\t\t\tparno.left=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.left.right;\r\n\t\t\tparno.left.right=temp;\r\n\t\t\tparno.left.right.left=tempr;\r\n\t\t}\r\n\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.right;\t\t\r\n\t\t\tparno.right=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.right.right;\r\n\t\t\tparno.right.right=temp;\r\n\t\t\tparno.right.right.left=tempr;\r\n\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private BinaryNode<AnyType> rotateLeft1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t BinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.right.left;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp2.left=null;\r\n\t\t root=temp2;\r\n\t\t root.left=parno;\r\n\t\t root.left.right=temp3;\r\n\t\t root.left.left=temp1;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.left;\r\n\t\t\tparno.left=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.left.left;\r\n\t\t\tparno.left.left=temp;\r\n\t\t\tparno.left.left.right=templ;\r\n\t\t}\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.right;\r\n\t\t\tparno.right=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.right.left;\r\n\t\t\tparno.right.left=temp;\r\n\t\t\tparno.right.left.right=templ;\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private void leftRotate(RedBlackNode<T> x){\n leftRotateFixup(x);\n\n RedBlackNode<T> y;\n y = x.right;\n x.right = y.left;\n\n // czy istnieje y.left i zamiana referencji\n if (!isNil(y.left))\n y.left.parent = x;\n y.parent = x.parent;\n\n // x.parent jest nil\n if (isNil(x.parent))\n root = y;\n\n // x jest lewym dzieckiem swojego rodzica\n else if (x.parent.left == x)\n x.parent.left = y;\n\n //x jest prawym dzieckiem swojego rodzica\n else\n x.parent.right = y;\n\n y.left = x;\n x.parent = y;\n }", "AVLNode delete(AVLNode node, int key) {\n if (node == null) \n return node; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < node.key) \n node.left = delete(node.left, key); \n \n // If the key to be deleted is greater than the \n // root's key, then it lies in right subtree \n else if (key > root.key) \n node.right = delete(node.right, key); \n \n // if key is same as root's key, then this is the node \n // to be deleted \n else\n { \n \n // node with only one child or no child \n if ((node.left == null) || (node.right == null)) \n { \n AVLNode temp = null; \n if (temp == node.left) \n temp = node.right; \n else\n temp = node.left; \n \n if (temp == null) \n { \n temp = node; \n node = null; \n } \n else \n node = temp; \n } \n else\n { \n AVLNode temp = getSucc(node.right); \n node.key = temp.key; \n node.right = delete(node.right, temp.key); \n } \n } \n \n if (node== null) \n return node; \n \n node.height = max(height(node.left), height(node.right)) + 1; \n \n int balance = getBF(node); \n \n if (balance > 1 && getBF(node.left) >= 0) \n return rightrot(node); \n \n if (balance > 1 && getBF(node.left) < 0) \n { \n node.left = leftrot(node.left); \n return rightrot(node); \n } \n \n if (balance < -1 && getBF(node.right) <= 0) \n return leftrot(node); \n\n if (balance < -1 && getBF(node.right) > 0) \n { \n node.right = rightrot(node.right); \n return leftrot(node); \n } \n return node;\n }", "private int HieghtsUpdating(IAVLNode node) \r\n\t{\r\n\t\tint moneRot = 0;\r\n\t\twhile (node != null) //as long as we didn't reached root's parent\r\n\t\t{\r\n\t\t\tif ((BFCalc(node) < -1) || (BFCalc(node) > 1)) //if AVL isn't balanced \r\n\t\t\t\tmoneRot+= FixAVLtree(node); \r\n \r\n\t\t\tnode.setSize(sizeCalc(node));\r\n\t\t\tif(HeightCalc(node) != node.getHeight()) {\r\n\t\t\t\tmoneRot += Math.abs(HeightCalc(node)-node.getHeight());\r\n\t\t\t\tnode.setHeight(HeightCalc(node));\r\n\t\t\t}\r\n\t\t\tnode = node.getParent();\r\n\t\t}\r\n\t\treturn moneRot;\r\n\t}", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "public AVLNode rotateLeft(AVLNode x) {\n AVLNode y = x.getRight();\n AVLNode T2 = y.getLeft();\n \n //rotation\n y.setLeft(x);\n x.setRight(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return y;\n }", "public int case1(AVLNode node, int bottomLeftEdge) {\n\t\tchar sideOfNode = node.parentSide();\n\t\tif (sideOfNode == 'N') {\n\t\t\tnode.setSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getHeight() == 1) {\n\t\t\tnode.setSize();\n\t\t\tnode.updateSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (sideOfNode == 'L') {\n\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\tif (rightEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 1;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // rightEdge == 2\n\t\t\t\tif (bottomLeftEdge == 1) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 2, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getRight(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // sideOfNode == 'R'\n\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\tif (leftEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 2;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // leftEdge == 2\n\t\t\t\tif (bottomLeftEdge == 2) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 1, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getLeft(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public int singleRotation(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setLeft(node.right);\n\t\t\tnode.right.setParent(node.parent);\n\t\t\tnode.setRight(node.parent);\n\t\t\tnode.setParent(node.getRight().getParent());\n\t\t\tnode.right.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.right.setHeight(node.right.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.right.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\n\t\telse {// side == 'R'\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setRight(node.left);\n\t\t\tnode.left.setParent(node.parent);\n\t\t\tnode.setLeft(node.parent);\n\t\t\tnode.setParent(node.getLeft().getParent());\n\t\t\tnode.left.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.left.setHeight(node.left.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.left.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\t}", "public AVLNode() {\n\t\t\tthis.key = -1;\n\t\t\tthis.val = null;\n\t\t\tthis.left = null;\n\t\t\tthis.right = null;\n\t\t\tthis.parent = null;\n\t\t\tthis.rank = -1;\n\t\t\tthis.size = 0;\n\t\t}", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "public interface IAVLNode{\t\r\n\t\tpublic int getKey(); //returns node's key (for virtuval node return -1)\r\n\t\tpublic String getValue(); //returns node's value [info] (for virtuval node return null)\r\n\t\tpublic void setValue(String value); // sets the value of the node\r\n\t\tpublic void setLeft(IAVLNode node); //sets left child\r\n\t\tpublic IAVLNode getLeft(); //returns left child (if there is no left child return null)\r\n\t\tpublic void setRight(IAVLNode node); //sets right child\r\n\t\tpublic IAVLNode getRight(); //returns right child (if there is no right child return null)\r\n\t\tpublic void setParent(IAVLNode node); //sets parent\r\n\t\tpublic IAVLNode getParent(); //returns the parent (if there is no parent return null)\r\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\r\n\t\tpublic void setHeight(int height); // sets the height of the node\r\n \tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\r\n \tpublic void setKey(int key); // Sets the key of the node\r\n \tpublic void setSize(int size); // sets the number of real nodes in this node's subtree\r\n \tpublic int getSize(); // Returns the number of real nodes in this node's subtree (Should be implemented in O(1))\r\n\t}", "public AVLNode rotateLeft(AVLNode pt) {\n\t\tAVLNode node = pt.getRight();\n\t\t\n\t\tpt.setRight(node.getLeft());\n\t\tnode.setLeft(pt);\n\t\t\n\t\treturn node;\n\t}", "public void leftRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.rightChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// If pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\t// do this if root has a parent\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\t// if root is going left to the root's parent, then set pivot to\r\n\t\t\t\t// left of the root.\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be on the left of parent\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// if root is going right of root's parent, then set pivot to\r\n\t\t\t\t// right of the root.\r\n\t\t\t\telse if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be on the right of the parent.\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent.\r\n\t\t\telse {\r\n\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void doubleDemoteLeft (WAVLNode z) {\n\t z.rank--;\r\n\t z.right.rank--;\r\n }", "public void rightRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.leftChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// if the pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be to the left of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t} else if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be to the right of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent\r\n\t\t\telse {\r\n\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "AVLNode lrCase(AVLNode Node){\r\n\t\t\r\n\t\tAVLNode childL = Node.left;\r\n\t\tchildL = Node.left;\r\n\t\tNode.left = rrCase(childL);\r\n\t\treturn llCase(Node);\r\n\t}", "private Node leftRotate(Node a) {\n Node b = a.getRightChild();\n Node n2 = b.getLeftChild();\n b.setLeftChild(a);\n a.setRightChild(n2);\n setHeights(a, b);\n return b;\n }", "private AVLTree[] splitLoop(IAVLNode nodeX, AVLTree [] arr){\r\n\t\t\tAVLTree tmp1 = new AVLTree();\r\n\t\t\tAVLTree tmp2 = new AVLTree();\r\n\t\t\tAVLTree tmp3 = new AVLTree();\r\n\t\t\tAVLTree tmp4 = new AVLTree();\r\n\t\t\tIAVLNode preOfX, newNodeForJoin; \r\n\t\t\tint newHeight, newSize;\r\n\t\t\t\r\n\t\t\tIAVLNode curr = nodeX;\r\n\t\t\ttmp1.setRoot(curr.getLeft());\r\n\t\t\ttmp1.getRoot().setParent(null);\r\n\t\t\ttmp3.setRoot(curr.getRight());\r\n\t\t\ttmp3.getRoot().setParent(null);\r\n\t\t\twhile (curr != null) {\r\n\t\t\t\tif(curr.getParent() == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif(curr.getParent().getRight() == curr) // im his left son\r\n\t\t\t\t\t{preOfX = curr.getParent();\r\n\t\t\t\t\ttmp2.setRoot(preOfX.getLeft());\r\n\t\t\t\t\ttmp2.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp1.join(newNodeForJoin, tmp2);\r\n\t\t\t\t\tnewHeight = tmp1.HeightCalc(tmp1.getRoot());\r\n\t\t\t\t\tnewSize = tmp1.sizeCalc(tmp1.getRoot());\r\n\t\t\t\t\ttmp1.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp1.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp2.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreOfX = curr.getParent();\r\n\t\t\t\t\ttmp4.setRoot(preOfX.getRight());\r\n\t\t\t\t\ttmp4.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp3.join(newNodeForJoin, tmp4);\r\n\t\t\t\t\tnewHeight = tmp3.HeightCalc(tmp3.getRoot());\r\n\t\t\t\t\tnewSize = tmp3.sizeCalc(tmp3.getRoot());\r\n\t\t\t\t\ttmp3.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp3.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp4.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t}\r\n\t\t\t\tnewNodeForJoin = new AVLNode(null);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tarr[0] = tmp1;\r\n\t\t\t\tarr[1]= tmp3;\r\n\t\t\t\tarr[0].minimum = arr[0].minPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].minimum = arr[1].minPointer(arr[1].getRoot());\r\n\t\t\t\tarr[0].maximum = arr[0].maxPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].maximum = arr[1].maxPointer(arr[1].getRoot());\r\n\t\r\n\t\t\t\treturn arr;\r\n\t\t\t\t\r\n\t\t\t}", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = max(height(x.left), height(x.right)) + 1; \n y.height = max(height(y.left), height(y.right)) + 1; \n \n // Return new root \n return y; \n }", "private void rotateLeft(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode y = x.right;\n\t RedBlackNode BSubTree = y.left;\n\t y.left = x;\n\t x.parent = y;\n\t x.right = BSubTree;\n\t //analyse whether need to have Nil check in this code\n\t BSubTree.parent = x;\n\t if(xParent == this.Nil){\n\t\t this.root = y;\n\t\t y.parent = this.Nil;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t\t y.parent = xParent;\n\t }else{\n\t\t xParent.right = y;\n\t\t y.parent = xParent;\n\t }\n\t \n }", "private void doubleRotateright(WAVLNode x) {\n\t WAVLNode z=x.left;\r\n\t rightRotate(z);\r\n\t z.rank+=1;\r\n\t leftRotate(z);\r\n }", "private void leftRotateFixup(RedBlackNode x){\n\n // Przypadek 1: tylko x, x.right i x.right.right są nil.\n if (isNil(x.left) && isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 0;\n x.right.numLeft = 1;\n }\n\n // Przypadek 2: x.right.left istnieje w dodatku do przypadku 1\n else if (isNil(x.left) && !isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 2 + x.right.left.numLeft +\n x.right.left.numRight;\n }\n\n // Przypadek 3: x.left także istnieje w dodatku do przypadku 1\n else if (!isNil(x.left) && isNil(x.right.left)){\n x.numRight = 0;\n x.right.numLeft = 2 + x.left.numLeft + x.left.numRight;\n\n }\n\n // Przypadek 4: x.left i x.right.left istnieją w dodatku do przypadku 1\n else{\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 3 + x.left.numLeft + x.left.numRight +\n x.right.left.numLeft + x.right.left.numRight;\n }\n }", "AVLTreeNode insert(AVLTreeNode node, int key)\r\n {\n if (node == null)\r\n {\r\n return new AVLTreeNode(key);\r\n }\r\n\r\n if (key < node.key)\r\n {\r\n node.left = insert(node.left, key);\r\n }\r\n else if (key > node.key)\r\n {\r\n node.right = insert(node.right, key);\r\n }\r\n else\r\n {\r\n return node;\r\n }\r\n\r\n // now update the height of the node\r\n updateHeight(node);\r\n\r\n // check the balance at this node and perform rotations accordingly\r\n int balance = getBalance(node);\r\n\r\n if (balance > 1) // indicates either left-left or left-right case\r\n {\r\n if (key < node.left.key) // confirms left-left case\r\n {\r\n node = rightRotate(node);\r\n }\r\n else // confirms left-right case\r\n {\r\n node.left = leftRotate(node.left);\r\n node = rightRotate(node);\r\n }\r\n }\r\n\r\n else if (balance < -1) // indicates either right-right or right-left case\r\n {\r\n if (key > node.right.key) // confirms right-right case\r\n {\r\n node = leftRotate(node);\r\n }\r\n else // confirms right-left case\r\n {\r\n node.right = rightRotate(node.right);\r\n node = leftRotate(node);\r\n }\r\n }\r\n return node;\r\n }", "public AVLNode deleteNodeImmersion(AVLNode treeRoot, int key) {\n if (treeRoot == null) {\n // Sub tree is empty\n // End operation\n return treeRoot;\n }\n\n // Sub tree is NOT empty so we have to perform the recursive descent\n if (key < treeRoot.getKey()) {\n // The key of the current node is less than the key we are looking for\n // Recursive descent through the left\n treeRoot.setLeft(deleteNodeImmersion(treeRoot.getLeft(), key));\n } else if (key > treeRoot.getKey()) {\n // The key of the current node is greater than the key we are looking for\n // Recursive descent through the right\n treeRoot.setRight(deleteNodeImmersion(treeRoot.getRight(), key));\n } else {\n // Key already exists, so we cannot add a new element with the same key\n treeRoot = this.handleDeletion(treeRoot);\n }\n\n // After applying the removal, let's see if rotations need to be applied\n\n // Case of tree with just one node: it is not necessary to apply rotations\n if (treeRoot == null) {\n return treeRoot;\n }\n\n // After inserting the element, we must increase the height of the current node\n // so we can later compute the height of the whole tree.\n // Let's compute height below using child heights\n int heightBelow = IntegerUtilities.max(height(treeRoot.getLeft()), height(treeRoot.getRight()));\n // Increase the height of the current node\n treeRoot.setHeight(heightBelow + 1);\n\n // Compute the balance factor of this node\n int balance = getBalance(treeRoot);\n\n // Check if this node is unbalanced\n if (balance > 1 || balance < -1) {\n\n // This node is unbalanced\n // Let's check the case\n\n if (balance > 1) {\n // Case Left Left / case Left Right\n if (getBalance(treeRoot.getLeft()) >= 0) {\n // Case Left Left: Right Rotation\n return rightRotate(treeRoot);// Right Rotation\n } else if (getBalance(treeRoot.getLeft()) < 0) {\n // Case Left Right: Left Rotation and Right Rotation\n treeRoot.setLeft(leftRotate(treeRoot.getLeft()));// Left Rotation\n return rightRotate(treeRoot);// Right Rotation\n }\n } else {// balance < -1\n // Case Right Right / case Right Left\n if (getBalance(treeRoot.getRight()) <= 0) {\n // Case Right Right: Left Rotation\n return leftRotate(treeRoot);// Left Rotation\n } else if (getBalance(treeRoot.getRight()) > 0) {\n // Case Right Left: Right Rotation and Left Rotation\n treeRoot.setRight(rightRotate(treeRoot.getRight()));// Right Rotation\n return leftRotate(treeRoot);// Left Rotation\n }\n }\n }\n\n return treeRoot;\n }", "@Test\n public void testGetLeft() {\n AVLNode<Integer> left = new AVLNode<> ( 4 );\n AVLNode<Integer> instance = new AVLNode<>( 7);\n instance.setLeft(left);\n AVLNode<Integer> expResult = left;\n AVLNode<Integer> result = instance.getLeft();\n assertEquals(expResult, result);\n }", "AVLNode rrCase(AVLNode Node){\r\n\t\r\n\t\tAVLNode childR = Node.right;\r\n\t\tNode.right = childR.left;\r\n\t\tchildR.left = Node;\t\t\r\n\t\treturn childR;\r\n\t\t\r\n\t}", "private NodeRB<K, V> rotateLeft(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> xParent = x.parent;\n\n\t\tNodeRB<K, V> y = x.right;\n\t\tx.right = y.left;\n\t\ty.left = x;\n\n\t\t// Parents relations fix\n\t\tif (xParent != null) {\n\t\t\tif (x.isLeftChild()) {\n\t\t\t\txParent.left = y;\n\t\t\t} else {\n\t\t\t\txParent.right = y;\n\t\t\t}\n\t\t}\n\n\t\tx.parent = y;\n\t\ty.parent = xParent;\n\t\tif (x.right != null) {\n\t\t\tx.right.parent = x;\n\t\t}\n\n\t\tx.height = 1 + Math.max(height(x.left), height(x.right));\n\t\ty.height = 1 + Math.max(height(y.left), height(y.right));\n\t\treturn y;\n\t}", "public AVLNode rotateRight(AVLNode pt) {\n\t\tAVLNode node = pt.getLeft();\n\t\t\n\t\tpt.setLeft(node.getRight());\n\t\tnode.setRight(pt);\n\t\t\n\t\treturn node;\n\t}", "protected Node<E> rotateLeft(Node<E> root) {\r\n\t\tNode<E> temp = root.right;\r\n\t\troot.right = temp.left;\r\n\t\ttemp.left = root;\r\n\t\treturn temp;\t\r\n\t}", "protected void rotateLeft(BSTNode n) {\n\n\t\tassert (n != null);\n\n\t\tBSTNode pv = n.right;\n\t\tassert (pv != null);\n\n\t\t// promote pv\n\t\tpv.parent = n.parent;\n\n\t\tif (n.parent == null) {\n\t\t\tif (n == _root) {\n\t\t\t\t_root = pv;\n\t\t\t} else {\n\t\t\t\t// do nothing, pv has no parent to notify\n\t\t\t}\n\t\t} else {\n\t\t\tsetParentReference(n, pv);\n\t\t}\n\n\t\t// move pv's left subtree over to n's right\n\t\tn.right = pv.left;\n\t\tif (n.right != null)\n\t\t\tn.right.parent = n;\n\n\t\t// move n to be the left child of pv\n\t\tpv.left = n;\n\t\tn.parent = pv;\n\n\t\t_stats.incRotations();\n\n\t\t/*\n\t\t * Fixup other tree stats\n\t\t */\n\n\t\tn.size = 1 + (n.left != null ? n.left.size : 0)\n\t\t\t\t+ (n.right != null ? n.right.size : 0);\n\n\t\tpv.size = 1 + n.size + (pv.right != null ? pv.right.size : 0);\n\t}", "private void doubleDemoteright (WAVLNode z) {\n\t z.rank--;\r\n\t z.left.rank--;\r\n }", "public void rebalance(NodeRB node){\n \r\n if (node == null){ //failsafe. probably not needed.\r\n return;\r\n }\r\n\r\n NodeRB parent = null, uncle = null, grandparent = null;\r\n parent = fetchParentOf(node); // attempt to fetch the parent. if null, nothing happens.\r\n \r\n if (parent != null){ // must have a parent to have a grandparent. A parent is needed for rebalancing.\r\n \r\n grandparent = fetchParentOf(parent); // attempt to fetch the grandparent. if null, nothing happens.\r\n \r\n if (grandparent != null && parent.color == 'r'){ // grandparent is also required for rebalancing.\r\n \r\n //attempt to find an uncle. can return null. in this case, see the first 'if' statement.\r\n uncle = (grandparent.left == parent) ? grandparent.right : grandparent.left;\r\n\r\n if (uncle == null){ // Phantom, used for reference. assumes the role of a black null leaf.\r\n //System.out.println(\"[i] Uncle is NULL. Assuming as black null leaf.\");\r\n uncle = new NodeRB(0);\r\n uncle.color = 'b';\r\n }\r\n\r\n if (uncle.color == 'r'){ // case 0\r\n System.out.println(\"[i] Case 0: Recolor.\");\r\n recolor(parent);\r\n recolor(uncle);\r\n recolor(grandparent);\r\n return;\r\n }\r\n\r\n if (uncle.color == 'b'){\r\n\r\n //case 1: simple right\r\n if (parent.left == node && grandparent.left == parent){\r\n System.out.println(\"[i]: Simple Right (RR) Rotation...\");\r\n rotateRight(grandparent);\r\n recolor(parent);\r\n recolor(grandparent);\r\n }\r\n\r\n //case 2: simple left\r\n else if (parent.right == node && grandparent.right == parent){\r\n System.out.println(\"[i]: Simple left (LL) Rotation...\");\r\n rotateLeft(grandparent);\r\n recolor(parent);\r\n recolor(grandparent);\r\n }\r\n\r\n //case 3: double left\r\n else if (parent.left == node && grandparent.right == parent){\r\n System.out.println(\"[i]: Double Left (RL) Rotation...\");\r\n rotateRight(parent);\r\n rotateLeft(grandparent);\r\n recolor(node);\r\n recolor(grandparent);\r\n }\r\n\r\n //case 4: double right\r\n else if (parent.right == node && grandparent.left == parent){\r\n System.out.println(\"[i]: Double Right (LR) Rotation...\");\r\n rotateLeft(parent);\r\n rotateRight(grandparent);\r\n recolor(node);\r\n recolor(grandparent);\r\n }\r\n\r\n }\r\n\r\n }\r\n }\r\n \r\n }", "protected RedBlackNode<T> rotateLeft(RedBlackNode<T> node) {\n RedBlackNode<T> rightNode = node.getRightChild();\n RedBlackNode<T> parent = node.getParent();\n rightNode._parent = node.getParent();\n node._rightChild = rightNode.getLeftChild();\n if (node._rightChild != null ) {\n node._rightChild._parent = node;\n } \n rightNode._leftChild = node; \n node._parent = rightNode;\n // node had parent.\n if(parent != null) {\n // node was left child\n if(parent._leftChild == node) {\n parent._leftChild = rightNode;\n } else {\n // node was right child\n parent._rightChild = rightNode;\n }\n } else {\n // node was head\n _head = rightNode;\n }\n return rightNode;\n }", "public AVLTree() {\n\t\tthis.root = null;\n\t}", "private Node<T> rotateWithRight(Node<T> a) {\n Node<T> b = a.getRight();\n a.setRight(b.getLeft());\n b.setLeft(a);\n int aH = Math.max(findHeight(a.getLeft()),\n findHeight(a.getRight())) + 1;\n a.setHeight(aH);\n int bH = Math.max(findHeight(b.getRight()), aH) + 1;\n b.setHeight(bH);\n hAndBF(a);\n hAndBF(b);\n return b;\n }", "public void preOrden(nodoArbolAVL r){\n\n if(r != null){\n System.out.print(r.dato + \" , \");\n \n preOrden(r.hijoIzquierdo);\n preOrden(r.hijoDerecho);\n \n } \n }", "private AVLNode<T, U> doubleRotateRightLeft(AVLNode<T, U> node) {\n\t\t node.setRight(rotateRight(node.getRight()));\n\t\t return rotateLeft(node);\n\t}", "private void balanceTree(BinaryNode node) {\n if (node == null) return;\n\n int leftDepth = getDepth(node.left, 0);\n int rightDepth = getDepth(node.right, 0);\n if (Math.abs(leftDepth - rightDepth) > 1) { // outofbalance\n if (leftDepth > rightDepth) {\n if (node.left.right != null) doubleRotationLR(node);\n else singleRotationLR(node);\n }\n\n else {\n if (node.right.left != null) doubleRotationRL(node);\n else singleRotationRL(node);\n }\n balanceTree(root);\n } else {\n balanceTree(node.left);\n balanceTree(node.right);\n }\n }", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n\n // Perform rotation \n y.left = x; \n x.right = T2; \n\n // Update heights \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n\n // Return new root \n return y; \n }", "boolean insertNode(RBTreeNode curr, RBTreeNode node) {\n int dir1 = curr.getDirection(node);\n int dir2 = dir1 ==0 ? 1 : 0;\n\n if(curr.children[dir1] == null) {\n curr.children[dir1] = node;\n return true;\n }\n\n if(isRedNode(curr)) {\n //Case 1: Case where we can flip colors and black height remains unchanged\n if(isRedNode(curr.children[dir1]) ) {\n if(isRedNode(curr.children[dir2])) {\n curr.children[dir1].isRed = true;\n curr.children[dir2].isRed = true;\n curr.isRed = false;\n return true;\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir1])) { //Case 2 and 3 //single rotation\n //RBTreeNode temp = singleRotate(curr,dir1,dir1); //Java no pointers :( So need to copy the returned val\n //curr.update(temp);\n curr.update(singleRotate(curr,dir1,dir1));\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir2])) { //Case 2 and 3 // double rotation\n //doubleRotate\n\n }\n } else {\n //do nothing as black height is unchanged and red red violation\n }\n }//not sure about braces\n\n return insertNode(curr.children[dir1],node);\n }", "public static void main(String[] args) {\n\t\tint[] arr = {7,3,10,12,5,1,9};\n\t\tNode root = null;\n\t\tfor(int n:arr) {\n\t\t\tif(root == null) {\n\t\t\t\troot = new Node(n);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tNode cur = root;\n\t\t\tNode par = null;\n\t\t\twhile(cur != null) {\n\t\t\t\tpar = cur;\n\t\t\t\tif(n < cur.val) cur = cur.left;\n\t\t\t\telse cur = cur.right;\n\t\t\t}\n\t\t\tif(n < par.val) par.left = new Node(n);\n\t\t\telse par.right = new Node(n);\n\t\t\tif(height(root.left) - height(root.right) > 1) {\n\t\t\t\tif(height(root.left.right) > height(root.left.left)) leftRotate(root.left);\n\t\t\t\trightRotate(root);\n\t\t\t}\n\t\t\tif(height(root.right) - height(root.left) > 1) {\n\t\t\t\tif(height(root.right.left) > height(root.right.right)) rightRotate(root.right);\n\t\t\t\tleftRotate(root);\n\t\t\t}\n\t\t}\n\t\t//infixOrder(root);\n//\t\tdel(root,7);\n//\t\tinfixOrder(root);\n\t\t//del(root,5);\n\t\t//del(root,5);\n\t\tinfixOrder(root);\n\t}", "private RedBlackNode rotateRight(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode BSubTree = x.left.right;\n\t RedBlackNode y = x.left;\n\t y.right = x;\n\t x.parent = y;\n\t x.left = BSubTree;\n\t //Need to anlayse whether Nil check need to have or Not\n\t BSubTree.parent = x;\n\t if( xParent == this.Nil){\n\t\t this.root = y;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t }else{\n\t\t xParent.right = y;\n\t }\n\t y.parent = xParent;\n\t return y;\n }", "private Node rightRotate(Node a) {\n Node b = a.getLeftChild();\n Node n3 = b.getRightChild();\n b.setRightChild(a);\n a.setLeftChild(n3);\n setHeights(a, b);\n return b;\n }", "public int delete(int k){\n\t WAVLNode x = treePosForDel(this, k); // find the node to delete\r\n\t int cnt = 0; // rebalance operations counter\r\n\t if(x.key!=k) { // if a node with a key of k doesnt exist in the tree there is nothing to delete, return -1\r\n\t\t return -1;\r\n\t }\r\n\t if(this.root.key==x.key&&this.root.rank==0) {//root is a leaf\r\n\t\t this.root=EXT_NODE;// change the root pointer to EXT_NODE\r\n\t\t return 0;\r\n\t }\r\n\t else if(this.root.key==x.key&&(this.root.right==EXT_NODE||this.root.left==EXT_NODE)) {//root is onary\r\n\t\t if(x.left!=EXT_NODE) { // x is a root with a left child\r\n\t\t\t x.left.parent = null;\r\n\t\t\t this.root = x.left; // change the root pointer to the root's left child\r\n\t\t\t x.left.sizen=1;\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t x.right.parent = null; // x is a root with a right child \r\n\t\t x.right.sizen=1;\r\n\t\t this.root = x.right; // change the root pointer to the root's right child\r\n\t\t return 0;\r\n\t }\r\n\t WAVLNode z;\r\n\t if(isInnerNode(x)) {// x is an inner node, requires a call for successor and swap\r\n\t\t z = successorForDel(x); // find the successor of x\r\n\t\t x = swap(x,z); // put x's successor instead of x and delete successor \r\n\t }\r\n\t\t if(x.rank == 0) {//x is a leaf\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.left = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.left;\r\n\t\t\t }\r\n\t\t\telse { // x is a right child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.right = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.right; \r\n\t\t\t }\r\n\t\t }\r\n\t\t else {//x is onary\r\n\t\t\t boolean onaryside = onaryLeft(x); // check if x is onary with a left child\r\n\t\t\t WAVLNode x_child = EXT_NODE;\r\n\t\t\t if (onaryside) {\r\n\t\t\t\t x_child=x.left; // get a pointer for x child\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x_child=x.right;\r\n\t\t\t }\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.left=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {// x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.right=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t }\r\n\t\t }\r\n\t if (z.left.rank==-1&&z.right.rank==-1) {//special case, z becomes a leaf, change pointers and demote\r\n\t\t demote(z);\r\n\t\t x=z;\r\n\t\t z=z.parent;\r\n\t\t cnt++;\r\n\t }\r\n\t \r\n\t while(z!=null&&z.rank-x.rank==3) { // while the tree is not balanced continue to balance the tree\r\n\t\t if(parentside(z, x).equals(\"left\")) { // x is z's left son\r\n\t\t\t if(z.rank-z.right.rank==2) {//condition for demote\r\n\r\n\t\t\t\t demote(z);\r\n\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.right.rank-z.right.left.rank==2&&z.right.rank-z.right.right.rank==2) {//condition for doubledemote left\r\n\t\t\t\t\t doubleDemoteLeft(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t\t else if((z.right.rank-z.right.left.rank==1||z.right.rank-z.right.left.rank==2)&&z.right.rank-z.right.right.rank==1) {// condition for rotate left for del\r\n\t\t\t\t\t rotateLeftDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t\t else {//condition for doublerotate left for del\r\n\t\t\t\t\t doubleRotateLeftDel(z);\r\n\t\t\t\t\t \r\n\t\t\t\t\t cnt=cnt+5;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t else { // x is z's right son, conditions are symmetric to left side\r\n\t\t\t if(z.rank-z.left.rank==2) {\r\n\t\t\t\t demote(z);\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.left.rank-z.left.right.rank==2&&z.left.rank-z.left.left.rank==2) {\r\n\t\t\t\t\t doubleDemoteright(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t }\r\n\t\t\t\t else if((z.left.rank-z.left.right.rank==1||z.left.rank-z.left.right.rank==2)&&z.left.rank-z.left.left.rank==1) {\r\n\t\t\t\t\t rotateRightDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\r\n\t\t\t\t\t doubleRotateRightDel(z);\r\n\t\t\t\t\t cnt+=5;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t return cnt;\r\n }", "public void setLeft(IAVLNode node);", "public void setLeft(IAVLNode node);", "private AvlTreeNode<K, V> restoreBalance(AvlTreeNode<K, V> h) {\n if (h == null) return null;\n updateHeight(h);\n int x = balance(h);\n if (x == 2) {\n // 2x right-heavy\n if (balance(h.right) < 0) {\n h.right = rotateRight(h.right);\n }\n h = rotateLeft(h);\n } else if (x == -2) {\n // 2x left-heavy\n if (balance(h.left) > 0) {\n h.left = rotateLeft(h.left);\n }\n h = rotateRight(h);\n }\n return h;\n }", "public int rob(TreeNode root) {\n if(root == null)\n return 0;\n \n int[] result = helper(root);\n return Math.max(result[0], result[1]);\n}", "Node leftRotate(Node x)\n\t\t{\n\t\t\tNode y=x.right;\n\t\t\tNode T2=y.left;\n\t\t\t\n\t\t\t//rotate\n\t\t\t\n\t\t\ty.left=x;\n\t\t\tx.right=T2;\n\t\t\t\n\t\t\t//update heights\n\t\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\t\n\t\t\t// new root\n\t\t\treturn y;\n\t\t}", "int RBTreeTest(RBTreeNode testRoot) {\n if (testRoot == null) {\n return 1; //Leaf nodes\n }\n\n RBTreeNode lNode = testRoot.children[0];\n RBTreeNode rNode = testRoot.children[1];\n\n\n\n //Check that Red Nodes do not have red children\n if(isRedNode(testRoot)) {\n if(isRedNode(rNode) || isRedNode(lNode)) {\n System.out.println(\"Red-Red violation- Left: \"+ isRedNode(lNode) +\" Right: \"+isRedNode(rNode));\n return 0;\n }\n\n\n\n }\n\n int lHeight = RBTreeTest(lNode);\n int rHeight = RBTreeTest(rNode);\n\n //Check for Binary Tree. Should be done after the recursive call to handle the null case.\n if(lNode.val > rNode.val) {\n System.out.println(\"Binary tree violation Left: \"+ lNode.val + \" Right: \"+ rNode.val);\n return 0;\n }\n\n if(lHeight !=0 && rHeight != 0 && lHeight != rHeight) {\n System.out.println(\"Height violation- left Height: \"+rHeight+ \" right Height: \"+lHeight);\n return 0;\n }\n\n\n //Return current height incuding the current node.\n if (lHeight != 0 && rHeight != 0)\n return isRedNode(testRoot) ? lHeight : lHeight + 1;\n else\n return 0;\n\n }", "private BTNode<T> rotateLeft(BTNode<T> p){\n BTNode<T> q = p.getRight();\n p.setRight(q.getLeft());\n q.setLeft(p);\n fixHeight(q);\n fixHeight(p);\n return q;\n }", "public AVLTree(IAVLNode node) {\n\t\tthis.root = node;\n\t}", "public int checkLR(RBNode<T, E> node) {\r\n\r\n\t\tif (node.uniqueKey.compareTo(this.root.uniqueKey) < 0) {\r\n\t\t\t// Must be Left\r\n\t\t\treturn -1;\r\n\t\t} else if (node.uniqueKey.compareTo(this.root.uniqueKey) > 0) {\r\n\t\t\t// Must be Right\r\n\t\t\treturn 1;\r\n\t\t} else {\r\n\t\t\t// Must be Equal\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public void joinByRight(AVLNode node, AVLTree lTree, char parentTree) {\n\t\tAVLNode bNode = (AVLNode) this.getRoot();\n\t\twhile (bNode.getHeight() > lTree.getRoot().getHeight()) { // connecting the trees\n\t\t\tbNode = (AVLNode) bNode.getRight();\n\t\t}\n\t\tnode.setHeight(lTree.getRoot().getHeight() + 1);\n\t\tnode.setRight(lTree.getRoot());\n\t\tlTree.getRoot().setParent(node);\n\t\tnode.setLeft(bNode);\n\t\tnode.setParent(bNode.getParent());\n\t\tnode.getParent().setRight(node);\n\t\tnode.getLeft().setParent(node);\n\t\t// end of concatenation\n\t\tif (node.getHeight() - node.getLeft().getHeight() == 2) {\n\t\t\tthis.case1(node, 2);\n\t\t\tif (parentTree == 'R') {\n\t\t\t\tlTree.root = this.root;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getHeight() == 1) {\n\t\t\tif (parentTree == 'R') {// higher tree is t, not our tree\n\t\t\t\tlTree.root = this.getRoot();// we need to change our tree's root to the higher tree\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getParent().getLeft().getHeight() == 2) {\n\t\t\tthis.singleRotation(node, 'R');\n\t\t\tif (parentTree == 'R') {\n\t\t\t\tlTree.root = this.root;\n\t\t\t}\n\t\t\tnode.setHeight(node.getHeight() + 1);\n\t\t\tnode.getLeft().setHeight(node.getLeft().getHeight() + 1);\n\t\t\treturn;\n\t\t}\n\n\t\tif (node.getParent().getHeight() - node.getParent().getLeft().getHeight() == 1) {\n\t\t\tthis.case1(node, 2);\n\t\t\tif (parentTree == 'R') {\n\t\t\t\tlTree.root = this.root;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t}", "private long leftRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentRight = current.right;\r\n Node tempN = new Node(current.right);\r\n current.right = tempN.left;\r\n tempN.left = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentRight);\r\n return currentRight;\r\n }", "public interface IAVLNode {\n\t\tpublic int getKey(); // returns node's key (for virtuval node return -1)\n\n\t\tpublic String getValue(); // returns node's value [info] (for virtuval node return null)\n\n\t\tpublic void setLeft(IAVLNode node); // sets left child\n\n\t\tpublic IAVLNode getLeft(); // returns left child (if there is no left child return null)\n\n\t\tpublic void setRight(IAVLNode node); // sets right child\n\n\t\tpublic IAVLNode getRight(); // returns right child (if there is no right child return null)\n\n\t\tpublic void setParent(IAVLNode node); // sets parent\n\n\t\tpublic IAVLNode getParent(); // returns the parent (if there is no parent return null)\n\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\n\n\t\tpublic void setHeight(int height); // sets the height of the node\n\n\t\tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\n\n\t\tpublic void setSize();\n\n\t\tpublic int getSize();\n\t}", "public static void main(String[] args) {\n\n\t\tAVLTree tree = new AVLTree();\n\t\ttree.root = insert(tree.root,10);\n\t\ttree.root = insert(tree.root, 20); \n tree.root = insert(tree.root, 30); \n tree.root = insert(tree.root, 40); \n tree.root = insert(tree.root, 50); \n tree.root = insert(tree.root, 25); \n \n preOrder(tree.root);\n \n tree.root = deleteNodeFomAVL(tree.root, 25);\n \n System.out.println();\n \n preOrder(tree.root);\n \n\t}", "private void nullLeaf(AVLNode<T> node) {\n AVLNode<T> prev = getParent(root, node);\n int comp = node.getData().compareTo(prev.getData());\n if (comp > 0) {\n prev.setRight(null);\n AVLNode<T> min = findMin(prev.getLeft());\n AVLNode<T> max = findMax(prev.getLeft());\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n } else {\n prev.setLeft(null);\n AVLNode<T> max = findMax(prev.getRight());\n AVLNode<T> min = findMin(prev.getRight());\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n }\n }", "private void fixTree(Node node){\n while(node.parent.color == RED){\n Node uncle = nil;\n if (node.parent == node.parent.parent.left){ // parent is to the left of grandparent\n uncle = node.parent.parent.right;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****LEFT RIGHT CASE (rotate P left)**** // GB GB\n if (node == node.parent.right){ // PR ==> NR\n node = node.parent; // NR PR\n rotateLeft(node); //\n }\n \n // ****LEFT LEFT CASE (rotate G right)****\n // uncle is nil and color = BLACK, or is // GB P\n // not nil and color still is BLACK // PR ==> N G\n node.parent.color = BLACK; // NR\n node.parent.parent.color = RED;\n rotateRight(node.parent.parent);\n \n } else { //parent is to the right of grand parent\n uncle = node.parent.parent.left;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****RIGHT LEFT CASE (rotate P right)**** // GB GB\n if (node == node.parent.left){ // PR ==> NR\n node = node.parent; // NR PR\n rotateRight(node); //\n }\n \n // **** RIGHT RIGHT CASE (rotate G left) // GR PB\n node.parent.color = BLACK; // PB ==> GR NR\n node.parent.parent.color = RED; // NR\n rotateLeft(node.parent.parent);\n }\n }\n \n root.color = BLACK;\n }", "private void splay(Node tree) {\n assert(tree != null);\n while(tree.parent != null && tree.parent.parent != null) { //while has a parent and a grandparent\n if(tree.parent.left == tree && tree.parent.parent.left == tree.parent) { //zig-zig case\n rotateRight(tree.parent.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.left == tree.parent) { //zig-zag case\n rotateLeft(tree.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.right == tree.parent) { //zag-zag case\n rotateLeft(tree.parent.parent);\n rotateLeft(tree.parent);\n } else if(tree.parent.left == tree && tree.parent.parent.right == tree.parent) { //zag-zig case\n rotateRight(tree.parent);\n rotateLeft(tree.parent);\n }\n }\n if(tree != root) { //tree is only of depth 1\n if (root.left == tree) { //zig\n rotateRight(root);\n } else { //zag\n rotateLeft(root);\n }\n }\n }", "@Ignore\n public void replay() {\n LinkedRBTree tree = new LinkedRBTree();\n Key[] add = new Key[] {\n new Key(0, 1), new Key(1, 0), new Key(0, 0)\n };\n Key[] rem = new Key[] {\n new Key(0, 1)\n };\n for (Key k : add) {\n System.out.println(\"added\" + k + \": \" + tree.add(k));\n }\n System.out.println(\"added!\");\n// System.out.println(\"==========\");\n// System.out.println(tree.debug());\n// System.out.println(\"==========\");\n// MultiTool.sleepThread(10);\n for (Key k : rem) {\n// System.out.println(\"==========\");\n// System.out.println(tree.debug());\n// System.out.println(\"==========\");\n// MultiTool.sleepThread(10);\n System.out.println(\"removed\" + k + \": \" + tree.remove(k));\n }\n System.out.println(\"removed!\");\n System.out.println(tree);\n System.out.println(\"root: \" + tree.getRoot());\n System.out.println(\"min : \" + tree.getMin());\n System.out.println(\"max : \" + tree.getMax());\n \n for (Key k : rem) {\n if (tree.contains(k)) {\n System.err.println(\"ERROR: Unexpected: \" + k);\n }\n }\n for (Key k : add) {\n if (!tree.contains(k) && !ArrayTools.asList(rem).contains(k)) {\n System.err.println(\"ERROR: Expected: \" + k);\n }\n }\n }" ]
[ "0.66792125", "0.6662892", "0.66527903", "0.6624228", "0.65759677", "0.65560085", "0.649569", "0.64537954", "0.6352874", "0.6332299", "0.6319652", "0.6316152", "0.6276758", "0.6262932", "0.61980855", "0.6058913", "0.60576993", "0.60414207", "0.6010811", "0.5997243", "0.59882355", "0.59643996", "0.5956748", "0.5928172", "0.5928074", "0.5913328", "0.5910245", "0.59077644", "0.59035784", "0.5887695", "0.5881756", "0.5877282", "0.5846856", "0.5808114", "0.57699436", "0.5744853", "0.57107943", "0.5709622", "0.570184", "0.5675834", "0.56649965", "0.5655958", "0.56429774", "0.5627719", "0.56111616", "0.55959123", "0.55895257", "0.5578882", "0.557791", "0.55715805", "0.5571282", "0.5567236", "0.5560204", "0.5557184", "0.5539453", "0.55148304", "0.5507348", "0.54969066", "0.54931515", "0.5491227", "0.5455821", "0.544721", "0.5415285", "0.5408347", "0.5397525", "0.53948253", "0.5382777", "0.5377388", "0.5370569", "0.53680664", "0.5359707", "0.53491414", "0.53487384", "0.5347494", "0.5345698", "0.5340412", "0.53390026", "0.53288025", "0.53158224", "0.5306406", "0.52890956", "0.5287892", "0.5287237", "0.5286486", "0.52759457", "0.52759457", "0.5275631", "0.52705157", "0.5267497", "0.5266537", "0.52645737", "0.5262797", "0.5262736", "0.52509755", "0.5250597", "0.5249631", "0.523068", "0.5225262", "0.5225148", "0.52249736", "0.5216531" ]
0.0
-1
avl tree test rl rotate
@Test public void test4() { Integer[] data = new Integer[]{// 50, 100, 75, // }; baseRotateTest(data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doubleRotateLeftDel (WAVLNode z) {\n\t WAVLNode a = z.right.left;\r\n\t WAVLNode y = z.right;\r\n\t WAVLNode c = z.right.left.left;\r\n\t WAVLNode d = z.right.left.right;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.left=z;\r\n\t a.right=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.left=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.right=c;\r\n\t z.rank=z.rank-2;\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private void rotateLeftDel (WAVLNode z) {\n\t WAVLNode y = z.right;\r\n\t WAVLNode a = y.left;\r\n\t y.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=y;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=y;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=y;\r\n\t }\r\n\t \r\n\t y.left = z;\r\n\t y.rank++;\r\n\t z.parent=y;\r\n\t z.right = a;\r\n\t z.rank--;\r\n\t if(a.rank>=0) {\r\n\t\t a.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.left.sizen+a.sizen+1;\r\n\t y.sizen = z.sizen+y.right.sizen+1;\r\n }", "private void LLRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode leftChild = node.getLeft(); \r\n\t\tIAVLNode rightGrandChild = node.getLeft().getRight(); \r\n\t\t\t\t\t\t\t\t\t\t \r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft()) \r\n\t\t\t\tparent.setLeft(leftChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(leftChild);\r\n\t\t}\r\n\t\tnode.setLeft(rightGrandChild); // rightGrandChild is now node's left child\r\n\t\trightGrandChild.setParent(node); // node becomes rightGrandChild's parent\r\n\t\tleftChild.setRight(node); // node is now leftChild's right child\r\n\t\tnode.setParent(leftChild); // node's parent is now leftChild\r\n\t\tleftChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size \r\n\t\tleftChild.setSize(sizeCalc(leftChild)); //updating leftChild's size\r\n\t\tleftChild.setHeight(HeightCalc(leftChild)); // updating leftChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\r\n\t\tif (node == root)\r\n\t\t\tthis.root = leftChild;\r\n\t}", "private void RRRotation(IAVLNode node)\r\n\t{\r\n\t\tIAVLNode parent = node.getParent(); \r\n\t\tIAVLNode rightChild = node.getRight() ; \r\n\t\tIAVLNode leftGrandChild = node.getRight().getLeft(); \r\n\t\t\r\n\t\tif(node != root) \r\n\t\t{\r\n\t\t\tif(node == parent.getLeft())\r\n\t\t\t\tparent.setLeft(rightChild);\r\n\t\t\telse \r\n\t\t\t\tparent.setRight(rightChild);\r\n\t\t}\r\n\t\t\r\n\t\tnode.setRight(leftGrandChild); //leftGrandChild is now node's right child\r\n\t\tleftGrandChild.setParent(node); //node is now leftGrandChild's parent\r\n\t\trightChild.setLeft(node); // node is now rightChild's left child\r\n\t\tnode.setParent(rightChild); // node's parent is now leftChild\r\n\t\trightChild.setParent(parent); // leftChild's parent is now node's old parent\r\n\t\t\r\n\t\t//updating sizes and heights\r\n\t\tnode.setSize(sizeCalc(node)); // updating node's size\r\n\t\trightChild.setSize(sizeCalc(rightChild)); //updating rightChild's size\r\n\t\trightChild.setHeight(HeightCalc(rightChild)); // updating rightChild's height\r\n\t\tnode.setHeight(HeightCalc(node)); // updating node's height\r\n\t\t\r\n\t\tif (node == root) \r\n\t\t\tthis.root = rightChild;\r\n\t}", "private void doubleRotateRightDel (WAVLNode z) {\n\t WAVLNode a = z.left.right;\r\n\t WAVLNode y = z.left;\r\n\t WAVLNode c = z.left.right.right;\r\n\t WAVLNode d = z.left.right.left;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=a;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=a;\r\n\r\n\t }\r\n\t\t \r\n\t }\r\n\t else {\r\n\t\t this.root=a;\r\n\t }\r\n\t a.right=z;\r\n\t a.left=y;\r\n\t a.rank=a.rank+2;\r\n\t a.parent=z.parent;\r\n\t y.parent=a;\r\n\t y.right=d;\r\n\t y.rank--;\r\n\t z.parent=a;\r\n\t z.left=c;\r\n\t z.rank=z.rank-2;\r\n\r\n\t c.parent=z;\r\n\t d.parent=y;\r\n\t z.sizen=z.right.sizen+z.left.sizen+1;\r\n\t y.sizen=y.right.sizen+y.left.sizen+1;\r\n\t a.sizen=a.right.sizen+a.left.sizen+1;\r\n }", "private int FixAVLtree(IAVLNode node)\r\n\t{\r\n\t\tif (node.isRealNode()) \r\n\t\t{\r\n\t\t\tif(BFCalc(node) == -2) \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==-1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or -1\r\n\t\t\t\tint rightBF=BFCalc(node.getRight());\r\n\t\t\t\tif(rightBF==0||rightBF==-1) {\r\n\t\t\t\t\tRRRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t} \r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tRLRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse //if BFCalc(node) == 2 \r\n\t\t\t{\r\n\t\t\t\t//in insert we need to fix if BFCalc(node.getLeft())==1\r\n\t\t\t\t//in delete we need to fix if BFCalc(node.getLeft())==0 or 1\r\n\t\t\t\tint leftBF=BFCalc(node.getLeft());\r\n\t\t\t\tif(leftBF==1 ||leftBF==0) \r\n\t\t\t\t{\r\n\t\t\t\t\tLLRotation(node);\r\n\t\t\t\t\treturn 1;\r\n\t\t\t\t}\r\n\t\t\t\telse \r\n\t\t\t\t{ \r\n\t\t\t\t\tLRRotation(node);\r\n\t\t\t\t\treturn 2;\r\n\t\t\t\t}\t\t\t\t\t\r\n\t\t\t} \r\n\t\t} \r\n\t\t\treturn 0;\r\n\t}", "private void fixAVLTree(Node node) {\n\t\tfinal int lf = getLoadFactor(node);\n\t\t//if (lf == -1 || lf == 0 || lf == 1) {\n\t\tif (lf >= -1 && lf <= 1) {\n\t\t\t// do nothing\n\t\t\treturn;\n\t\t}\t\t\n\t\trotateTree(node);\n\t}", "private void leftRotate(WAVLNode y) {\n\t WAVLNode x=y.parent;\r\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=y.left;\r\n\t WAVLNode c = y.right;\r\n\t y.left=x;\r\n\t x.right=b;\r\n\t \r\n\t if (x.parent!=null) {\r\n\t\t WAVLNode d=x.parent;\r\n\t\t String side=parentside(d,x);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=y;\r\n\t\t\t y.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t y.parent=null;\r\n\t\t this.root=y;\r\n\t }\r\n\t x.parent=y;\r\n\t b.parent=x;\r\n\t x.rank=x.rank-1;\r\n\t x.sizen=a.sizen+b.sizen+1;\r\n\t y.sizen=x.sizen+c.sizen+1;\r\n\t \r\n }", "private void rotateRightDel (WAVLNode z) {\n\t WAVLNode x = z.left;\r\n\t WAVLNode d = x.right;\r\n\t x.parent=z.parent;\r\n\t if(z.parent!=null) {\r\n\t\t if(parentside(z.parent, z).equals(\"left\")) {\r\n\t\t\t z.parent.left=x;\r\n\r\n\t }\r\n\t else {\r\n\t\t\t z.parent.right=x;\r\n\r\n\t }\r\n\t }\r\n\r\n\t else {\r\n\t\t this.root=x;\r\n\t }\r\n\t x.right = z;\r\n\t x.rank++;\r\n\t z.parent=x;\r\n\t z.left = d;\r\n\t z.rank--;\r\n\t if(d.rank>=0) {\r\n\t\t d.parent=z; \r\n\t }\r\n\t if(z.left==EXT_NODE&&z.right==EXT_NODE&&z.rank!=0) {\r\n\t\t z.rank--;\r\n\t }\r\n\t z.sizen = z.right.sizen+d.sizen+1;\r\n\t x.sizen = z.sizen+x.left.sizen+1;\r\n }", "private void rightRotate(WAVLNode x) {\n\t WAVLNode a=x.left;\r\n\t WAVLNode b=x.right;\r\n\t WAVLNode y=x.parent;\r\n\t WAVLNode c=y.right;\r\n\t x.right=y;\r\n\t y.left=b;\r\n\t if (y.parent!=null) {\r\n\t\t WAVLNode d=y.parent;\r\n\t\t String side=parentside(d,y);\r\n\r\n\t\t if (side.equals(\"right\")) {\r\n\t\t\t d.right=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t\t else {\r\n\t\t\t d.left=x;\r\n\t\t\t x.parent=d;\r\n\t\t }\r\n\t }\r\n\t else {\r\n\t\t x.parent=null;\r\n\t\t this.root=x;\r\n\t }\r\n\t y.parent=x;\r\n\t b.parent=y;\r\n\t y.rank=y.rank-1;\r\n\t \r\n\t y.sizen=b.sizen+c.sizen+1;\r\n\t x.sizen=a.sizen+y.sizen+1;\r\n\t \r\n }", "public int insert(int k, String i) { // insert a node with a key of k and info of i, the method returns the number of rebalance operation\r\n WAVLNode x = new WAVLNode(k,i);// create the new node to insert\r\n x.left=EXT_NODE;\r\n x.right=EXT_NODE;\r\n if(root==EXT_NODE) { // checking if the tree is empty, in that case put x as a root\r\n \t root=x;\r\n \t return 0;\r\n }\r\n WAVLNode y = treePos(this, k); // find the correct position to insert the node\r\n int [] f = {x.key,y.key};\r\n if (f[0]==f[1]) { // in case the key is already exists in the tree, return -1 and dosent insert anything\r\n \t \r\n \t return -1;\r\n }\r\n x.parent=y; \r\n if(y.rank!=0) {// if y is onary do:\r\n \t if(x.key<y.key) {// check if x should be left son of y\r\n \t\t y.left=x;\r\n \t }\r\n \t else { // x should be right son of y\r\n \t\t y.right=x;\r\n \t }\r\n \t return 0; // no rebalance operation was needed, return 0\r\n }\r\n if(x.key<y.key) { // if y is a leaf\r\n \t y.left=x;\r\n }\r\n else {\r\n \t y.right=x;\r\n }\r\n int cnt=0;//rebalance operation to return\r\n while(x.parent!=null&&x.parent.rank-x.rank==0) { // while the tree is not balanced continue to balance the tree\r\n \t if(parentside(x.parent, x).equals(\"left\")) { // check if x is a left son of x's parent\r\n \t\t if (x.parent.rank-x.parent.right.rank==1) {//check the conditions for promotion\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.left.rank==1) { // check the conditions for rotate\r\n \t\t\t rightRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t doubleRotateleft(x); // check the conditions for double rotate\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n \t else { // x is a right son of x's parent, all conditions and actions are symmetric to the left side\r\n \t\t if (x.parent.rank-x.parent.left.rank==1) {\r\n \t\t\t promote(x.parent);\r\n \t\t\t x=x.parent;\r\n \t\t\t cnt++;\r\n \t\t }\r\n \t\t else if(x.rank-x.right.rank==1) {\r\n \t\t\t leftRotate(x);\r\n \t\t\t cnt+=2;\r\n \t\t }\r\n \t\t else {\r\n \t\t\t \r\n \t\t\t doubleRotateright(x);\r\n \t\t\t cnt+=5;\r\n \t\t }\r\n \t }\r\n }\r\n return cnt;\r\n \r\n }", "@Test\n public void visualiseTree()\n {\n System.out.println(avlTree.toString());\n }", "private AvlNode<E> rotateWithRightChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.right;\n k1.right = k2.left;\n k2.left = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(k1.height, height(k2.right)) + 1;\n return k2;\n }", "private void RLRotation(IAVLNode node)\r\n\t{\r\n\t\tLLRotation(node.getRight());\r\n\t\tRRRotation(node);\r\n\t}", "private void LRRotation(IAVLNode node)\r\n\t{\r\n\r\n\t\tRRRotation(node.getLeft());\r\n\t\tLLRotation(node);\r\n\t}", "private void leftRightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getRight();\n AVLNode<T> oldNodeLeft = node.getLeft();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setLeft(nodeDat);\n if (oldNodeLeft != null) {\n node.getLeft().setLeft(oldNodeLeft);\n calcDeterminants(node.getLeft().getLeft());\n }\n node.setData(child.getData());\n if (oldChildLeft != null) {\n node.getLeft().setRight(oldChildLeft);\n calcDeterminants(node.getLeft().getRight());\n } else {\n node.getLeft().setRight(null);\n calcDeterminants(node.getLeft());\n }\n if (oldChildRight != null) {\n node.setRight(oldChildRight);\n calcDeterminants(node.getRight());\n } else {\n node.setRight(null);\n calcDeterminants(node.getLeft());\n }\n\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private void rightLeftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> child = node.getLeft();\n AVLNode<T> oldNodeRight = node.getRight();\n AVLNode<T> oldChildLeft = child.getLeft();\n AVLNode<T> oldChildRight = child.getRight();\n AVLNode<T> nodeDat = new AVLNode<>(node.getData());\n node.setRight(nodeDat);\n if (oldNodeRight != null) {\n node.getRight().setRight(oldNodeRight);\n calcDeterminants(node.getRight().getRight());\n }\n node.setData(child.getData());\n if (oldChildRight != null) {\n node.getRight().setLeft(oldChildRight);\n calcDeterminants(node.getRight().getLeft());\n } else {\n node.getRight().setLeft(null);\n calcDeterminants(node.getRight());\n }\n if (oldChildLeft != null) {\n node.setLeft(oldChildLeft);\n calcDeterminants(node.getLeft());\n } else {\n node.setLeft(null);\n calcDeterminants(node.getRight());\n }\n\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private AvlNode<E> rotateWithLeftChild(AvlNode<E> k1){\n AvlNode<E> k2 = k1.left;\n k1.left = k2.right;\n k2.right = k1;\n k1.height = max(height(k1.left), height(k2.right)) + 1;\n k2.height = max(height(k2.left), k1.height) + 1;\n return k2;\n }", "public nodoArbolAVL insertarAVL(nodoArbolAVL nuevo,nodoArbolAVL subAr){\n nodoArbolAVL nuevoPadre = subAr;\n if(nuevo.dato < subAr.dato){\n if(subAr.hijoIzquierdo == null){\n subAr.hijoIzquierdo = nuevo;\n }else{\n subAr.hijoIzquierdo = \n insertarAVL(nuevo,subAr.hijoIzquierdo);\n if((obtenerFE(subAr.hijoIzquierdo)-obtenerFE(subAr.hijoDerecho)==2)){\n if(nuevo.dato < subAr.hijoIzquierdo.dato){\n nuevoPadre = rotacionIzquierda(subAr);\n }else{\n nuevoPadre = rotacionDobleIzquierda(subAr);\n }\n }\n }\n }else if(nuevo.dato > subAr.dato){\n if(subAr.hijoDerecho == null){\n subAr.hijoDerecho = nuevo;\n \n }else{\n subAr.hijoDerecho = insertarAVL(nuevo,subAr.hijoDerecho);\n if((obtenerFE(subAr.hijoDerecho)-obtenerFE(subAr.hijoIzquierdo)==-2)){\n if(nuevo.dato > subAr.hijoDerecho.dato){\n nuevoPadre = rotacionDerecha (subAr);\n }else{\n nuevoPadre = rotacionDobleDerecha(subAr);\n }\n }\n }\n }else{\n System.out.println(\"NODO DUPLICADO\");\n }\n //ACTUALIZANDO EL FE\n if((subAr.hijoIzquierdo == null)&&(subAr.hijoDerecho !=null)){\n subAr.fe = subAr.hijoDerecho.fe + 1;\n }else if((subAr.hijoDerecho == null)&&(subAr.hijoIzquierdo != null)){\n subAr.fe = subAr.hijoIzquierdo.fe +1 ;\n }else{\n subAr.fe = Math.max(obtenerFE(subAr.hijoIzquierdo),\n obtenerFE(subAr.hijoDerecho))+1;\n }\n nuevo.SetNivel(nuevo.nivel+1);\n return nuevoPadre;\n }", "public interface AVLTree<E extends Comparable<E>> extends BinarySortedTree<E>{\n\n boolean isAVLTree(AVLNode<E> current);\n\n interface AVLNode<E>{\n E getData();\n\n AVLNode setData(E data);\n\n AVLNode<E> getParent();\n\n AVLNode setParent(AVLNode<E> parent);\n\n AVLNode<E> getLeft();\n AVLNode setLeft(AVLNode<E> left);\n\n AVLNode<E> getRight();\n\n AVLNode setRight(AVLNode<E> right);\n\n int getHeight();\n\n AVLNode setHeight(int height);\n }\n}", "private static <V> IntTree<V> rebalanced(\n final long key, final V value, final IntTree<V> left, final IntTree<V> right) {\n if (left.size + right.size > 1) {\n if (left.size >= OMEGA * right.size) { // rotate to the right\n IntTree<V> ll = left.left, lr = left.right;\n if (lr.size < ALPHA * ll.size) // single rotation\n return new IntTree<V>(\n left.key + key,\n left.value,\n ll,\n new IntTree<V>(-left.key, value, lr.withKey(lr.key + left.key), right));\n else { // double rotation:\n IntTree<V> lrl = lr.left, lrr = lr.right;\n return new IntTree<V>(\n lr.key + left.key + key,\n lr.value,\n new IntTree<V>(-lr.key, left.value, ll, lrl.withKey(lrl.key + lr.key)),\n new IntTree<V>(\n -left.key - lr.key, value, lrr.withKey(lrr.key + lr.key + left.key), right));\n }\n } else if (right.size >= OMEGA * left.size) { // rotate to the left\n IntTree<V> rl = right.left, rr = right.right;\n if (rl.size < ALPHA * rr.size) // single rotation\n return new IntTree<V>(\n right.key + key,\n right.value,\n new IntTree<V>(-right.key, value, left, rl.withKey(rl.key + right.key)),\n rr);\n else { // double rotation:\n IntTree<V> rll = rl.left, rlr = rl.right;\n return new IntTree<V>(\n rl.key + right.key + key,\n rl.value,\n new IntTree<V>(\n -right.key - rl.key, value, left, rll.withKey(rll.key + rl.key + right.key)),\n new IntTree<V>(-rl.key, right.value, rlr.withKey(rlr.key + rl.key), rr));\n }\n }\n }\n // otherwise already balanced enough:\n return new IntTree<V>(key, value, left, right);\n }", "Node leftRotate(Node x) { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = maxInt(heightBST(x.left), heightBST(x.right)) + 1; \n y.height = maxInt(heightBST(y.left), heightBST(y.right)) + 1; \n \n // Return new root \n return y; \n }", "public int delRecTriOne(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tint rightEdge = node.right.getHeight() - node.right.getRight().getHeight();\n\t\t\tint leftEdge = node.right.getHeight() - node.right.getLeft().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (leftEdge == 2) {// case 3\n\t\t\t\tAVLNode rightChild = (AVLNode) node.right;\n\t\t\t\tint numOp = this.singleRotation(rightChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// leftEdge==1, case 4\n\t\t\t\tAVLNode rightsLeftChild = (AVLNode) node.getRight().getLeft();\n\t\t\t\tint numOp = this.doubleRotation(rightsLeftChild, 'R');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getRight().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\n\t\t}\n\n\t\telse { // side='R'\n\t\t\tint leftEdge = node.left.getHeight() - node.left.getLeft().getHeight();\n\t\t\tint rightEdge = node.left.getHeight() - node.left.getRight().getHeight();\n\t\t\tif (rightEdge == leftEdge && rightEdge == 1) {// case 2\\\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.setSize();\n\t\t\t\tnode.updateSize();\n\t\t\t\treturn numOp + 1;\n\t\t\t}\n\t\t\tif (rightEdge == 2) {// case 3\n\t\t\t\tAVLNode leftChild = (AVLNode) node.left;\n\t\t\t\tint numOp = this.singleRotation(leftChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t} else {// rightEdge==1, leftEdge==2, case 4\n\t\t\t\tAVLNode leftsRightChild = (AVLNode) node.getLeft().getRight();\n\t\t\t\tint numOp = this.doubleRotation(leftsRightChild, 'L');\n\t\t\t\tnode.setHeight(node.getHeight() - 1); // demote 'z'\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tnode.setSize();\n\t\t\t\tparent.getLeft().setSize();\n\t\t\t\tparent.setSize();\n\t\t\t\treturn numOp + this.delRecTwos(parent);\n\t\t\t}\n\t\t}\n\t}", "AVLNode delete(AVLNode node, int key) {\n if (node == null) \n return node; \n \n // If the key to be deleted is smaller than \n // the root's key, then it lies in left subtree \n if (key < node.key) \n node.left = delete(node.left, key); \n \n // If the key to be deleted is greater than the \n // root's key, then it lies in right subtree \n else if (key > root.key) \n node.right = delete(node.right, key); \n \n // if key is same as root's key, then this is the node \n // to be deleted \n else\n { \n \n // node with only one child or no child \n if ((node.left == null) || (node.right == null)) \n { \n AVLNode temp = null; \n if (temp == node.left) \n temp = node.right; \n else\n temp = node.left; \n \n if (temp == null) \n { \n temp = node; \n node = null; \n } \n else \n node = temp; \n } \n else\n { \n AVLNode temp = getSucc(node.right); \n node.key = temp.key; \n node.right = delete(node.right, temp.key); \n } \n } \n \n if (node== null) \n return node; \n \n node.height = max(height(node.left), height(node.right)) + 1; \n \n int balance = getBF(node); \n \n if (balance > 1 && getBF(node.left) >= 0) \n return rightrot(node); \n \n if (balance > 1 && getBF(node.left) < 0) \n { \n node.left = leftrot(node.left); \n return rightrot(node); \n } \n \n if (balance < -1 && getBF(node.right) <= 0) \n return leftrot(node); \n\n if (balance < -1 && getBF(node.right) > 0) \n { \n node.right = rightrot(node.right); \n return leftrot(node); \n } \n return node;\n }", "int query_tree(int v, int l, int r, int tl, int tr) {\n int ans = query(1, l, r, r, tl, tr);\n return r - l + 1 - ans;\n }", "private AVLTreeNode<E> smallRotateRight(AVLTreeNode<E> node) {\n AVLTreeNode<E> q = node.getLeft();\n node.setLeft(q.getRight());\n q.setRight(node);\n node.fixHeight();\n q.fixHeight();\n return q;\n }", "private BinaryNode<AnyType> rotateRight1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t\tBinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.left.right;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp1.right=null;\r\n\t\t root=temp1;\r\n\t\t root.right=parno;\r\n\t\t root.right.left=temp3;\r\n\t\t root.right.right=temp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.left;\r\n\t\t\tparno.left=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.left.right;\r\n\t\t\tparno.left.right=temp;\r\n\t\t\tparno.left.right.left=tempr;\r\n\t\t}\r\n\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp = parno.right;\t\t\r\n\t\t\tparno.right=no.left;\r\n\t\t\ttemp.left=null;\r\n\t\t\tBinaryNode tempr=parno.right.right;\r\n\t\t\tparno.right.right=temp;\r\n\t\t\tparno.right.right.left=tempr;\r\n\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private BinaryNode<AnyType> rotateLeft1(BinaryNode<AnyType>t, AnyType x)\r\n\t{\r\n\t\tBinaryNode<AnyType> no=find(t,x);\r\n\t\tBinaryNode<AnyType> parno=findParentNode(t,x);\r\n\r\n\t\tif(no==parno)\r\n\t\t{\r\n\t\t BinaryNode temp1=parno.left;\r\n\t\t BinaryNode temp2=parno.right;\r\n\t\t BinaryNode temp3=parno.right.left;\r\n\t\t parno.left=null;\r\n\t\t parno.right=null;\r\n\t\t temp2.left=null;\r\n\t\t root=temp2;\r\n\t\t root.left=parno;\r\n\t\t root.left.right=temp3;\r\n\t\t root.left.left=temp1;\r\n\t\t}\r\n\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)<0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.left;\r\n\t\t\tparno.left=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.left.left;\r\n\t\t\tparno.left.left=temp;\r\n\t\t\tparno.left.left.right=templ;\r\n\t\t}\r\n\t\t\r\n\t\tif(no.element.compareTo(parno.element)>0)\r\n\t\t{\r\n\t\t\tBinaryNode temp=parno.right;\r\n\t\t\tparno.right=no.right;\r\n\t\t\ttemp.right=null;\r\n\t\t\tBinaryNode templ=parno.right.left;\r\n\t\t\tparno.right.left=temp;\r\n\t\t\tparno.right.left.right=templ;\r\n\t\t}\r\n\t\treturn t;\r\n\t}", "private AVLNode<T> rotateLeft(AVLNode<T> node) {\n AVLNode<T> substitute = node.right;\n // donde ponemos los hijos a la izquierda del substituto\n node.right = substitute.left;\n substitute.left = node;\n\n return substitute;\n }", "private AVLNode<T, U> rotateLeft(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getRight();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setRight(newRoot.getLeft());\n\t\t\t \n\t\tif(oldRoot.getRight() != null) {\n\t\t\toldRoot.getRight().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setLeft(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "private void rightRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldRight = parent.getRight();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setRight(parDat);\n if (oldRight != null) {\n parent.getRight().setRight(oldRight);\n calcDeterminants(parent.getRight().getRight());\n }\n if (node.getRight() != null) {\n parent.getRight().setLeft(node.getRight());\n calcDeterminants(parent.getRight().getLeft());\n }\n parent.setData(node.getData());\n if (node.getLeft() != null) {\n parent.setLeft(node.getLeft());\n calcDeterminants(parent.getLeft());\n } else {\n parent.setLeft(null);\n calcDeterminants(parent.getRight());\n }\n }", "private void leftRotate(AVLNode<T> parent, AVLNode<T> node) {\n AVLNode<T> oldLeft = parent.getLeft();\n AVLNode<T> parDat = new AVLNode<>(parent.getData());\n parent.setLeft(parDat);\n if (oldLeft != null) {\n parent.getLeft().setLeft(oldLeft);\n calcDeterminants(parent.getLeft().getLeft());\n }\n if (node.getLeft() != null) {\n parent.getLeft().setRight(node.getLeft());\n calcDeterminants(parent.getLeft().getRight());\n }\n parent.setData(node.getData());\n if (node.getRight() != null) {\n parent.setRight(node.getRight());\n calcDeterminants(parent.getRight());\n } else {\n parent.setRight(null);\n calcDeterminants(parent.getLeft());\n }\n }", "private void doubleRotateleft(WAVLNode x) {\n\t WAVLNode z=x.right;\r\n\t leftRotate(z);\r\n\t z.rank+=1;\r\n\t rightRotate(z);\r\n }", "private void balanceTree(AVLNode<T> node) {\n AVLNode<T> parent = null;\n int parBal = 0;\n if (node.getHeight() == 0) {\n if (!(node.getData().equals(root.getData()))) {\n balanceTree(getParent(root, node));\n } else {\n parent = node;\n parBal = parent.getBalanceFactor();\n }\n } else {\n if (node.getData().equals(root.getData())) {\n parent = node;\n parBal = parent.getBalanceFactor();\n } else {\n parent = getParent(root, node);\n if (parent != null) {\n parBal = parent.getBalanceFactor();\n }\n }\n }\n\n if (parBal < -1 && node.getBalanceFactor() <= 0) {\n leftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() >= 0) {\n rightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal < -1 && node.getBalanceFactor() > 0) {\n rightLeftRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else if (parBal > 1 && node.getBalanceFactor() < 0) {\n leftRightRotate(parent, node);\n if (!(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n } else {\n if (parent != null && !(parent.getData().equals(root.getData()))) {\n balanceTree(parent);\n }\n }\n }", "private AVLNode<T, U> rotateRight(AVLNode<T, U> oldRoot) {\n\t\tAVLNode<T, U> newRoot = oldRoot.getLeft();\n\t\t\n\t\tnewRoot.setParent(oldRoot.getParent());\n\t\toldRoot.setLeft(newRoot.getRight());\n\t\t\t \n\t\tif(oldRoot.getLeft() != null) {\n\t\t\toldRoot.getLeft().setParent(oldRoot);\n\t\t}\n\t\t\n\t\tnewRoot.setRight(oldRoot);\n\t\toldRoot.setParent(newRoot);\n\t\t\n\t\tif(newRoot.getParent() != null){\n\t\t\tif(newRoot.getParent().getRight() == oldRoot){\n\t\t\t\tnewRoot.getParent().setRight(newRoot);\n\t\t\t}else if(newRoot.getParent().getLeft() == oldRoot){\n\t\t\t\tnewRoot.getParent().setLeft(newRoot);\n\t\t\t}\n\t\t}\n\t\t\n\t\tcomputeHeightsToRoot(oldRoot);\n\t\treturn newRoot;\n\t}", "private void doubleRotationLR(BinaryNode node) {\n BinaryNode temp = max(node.left);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the left\n temp.parent.right = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.left;\n if (temp.left != null) temp.left.parent = temp.parent;\n }\n root.parent = null;\n root.right = node;\n root.left = node.left;\n if(node.left != null) node.left.parent = root;\n node.parent = root;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.left = node.left;\n if(node.left != null) node.left.parent = temp;\n temp.right = node;\n node.parent = temp;\n node.left = null;\n }\n }", "private void doubleRotationRL(BinaryNode node) {\n BinaryNode temp = min(node.right);\n if (node == root) {\n root = temp;\n if (temp.parent.right == temp) { //temp could have a child on the right\n temp.parent.right = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n else {\n temp.parent.left = temp.right;\n if (temp.right != null) temp.right.parent = temp.parent;\n }\n root.parent = null;\n root.left = node;\n root.right = node.right;\n if(node.right != null) node.right.parent = root;\n node.parent = root;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = temp;\n } else {\n node.parent.left = temp;\n }\n temp.parent = node.parent;\n temp.right = node.right;\n if(node.right != null) node.right.parent = temp;\n temp.left = node;\n node.parent = temp;\n node.right = null;\n }\n }", "public interface IAVLNode{\t\r\n\t\tpublic int getKey(); //returns node's key (for virtuval node return -1)\r\n\t\tpublic String getValue(); //returns node's value [info] (for virtuval node return null)\r\n\t\tpublic void setValue(String value); // sets the value of the node\r\n\t\tpublic void setLeft(IAVLNode node); //sets left child\r\n\t\tpublic IAVLNode getLeft(); //returns left child (if there is no left child return null)\r\n\t\tpublic void setRight(IAVLNode node); //sets right child\r\n\t\tpublic IAVLNode getRight(); //returns right child (if there is no right child return null)\r\n\t\tpublic void setParent(IAVLNode node); //sets parent\r\n\t\tpublic IAVLNode getParent(); //returns the parent (if there is no parent return null)\r\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\r\n\t\tpublic void setHeight(int height); // sets the height of the node\r\n \tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\r\n \tpublic void setKey(int key); // Sets the key of the node\r\n \tpublic void setSize(int size); // sets the number of real nodes in this node's subtree\r\n \tpublic int getSize(); // Returns the number of real nodes in this node's subtree (Should be implemented in O(1))\r\n\t}", "private AVLNode<T> rotateRight(AVLNode<T> node) {\n AVLNode<T> substiute = node.left;\n node.left = substiute.right;\n substiute.right = node;\n\n // node = substitute;\n\n return substiute;\n }", "private void singleRotationRL(BinaryNode node) {\n if (node == root) {\n root = node.right;\n root.parent = null;\n root.left = node;\n node.parent = node.right;\n node.right = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.right;\n } else {\n node.parent.left = node.right;\n }\n node.right.parent = node.parent;\n node.right.left = node;\n node.parent = node.right;\n node.right = null;\n }\n }", "private void singleRotationLR(BinaryNode node){\n if (node == root) {\n root = node.left;\n root.parent = null;\n root.right = node;\n node.parent = node.left;\n node.left = null;\n } else {\n if (node.parent.right == node) {\n node.parent.right = node.left;\n } else {\n node.parent.left = node.left;\n }\n node.left.parent = node.parent;\n node.left.right = node;\n node.parent = node.left;\n node.left = null;\n }\n }", "private void rotateRight(Node tree) {\n assert tree != null;\n assert tree.left != null;\n\n Node temp = tree.left;\n tree.left = temp.right;\n if(temp.right != null) { //no null pointers\n temp.right.parent = tree;\n }\n temp.parent = tree.parent;\n if(temp.parent != null) { //am i at the root?\n if(temp.parent.left == tree) {\n temp.parent.left = temp;\n } else if (temp.parent.right == tree) {\n temp.parent.right = temp;\n }\n }\n tree.parent = temp;\n temp.right = tree;\n if(tree == root) { root = temp; } //rewrite the root\n rotations += 1;\n }", "public void leftRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.rightChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// If pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\t// do this if root has a parent\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\t// if root is going left to the root's parent, then set pivot to\r\n\t\t\t\t// left of the root.\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be on the left of parent\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t}\r\n\t\t\t\t// if root is going right of root's parent, then set pivot to\r\n\t\t\t\t// right of the root.\r\n\t\t\t\telse if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be on the right of the parent.\r\n\t\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent.\r\n\t\t\telse {\r\n\t\t\t\troot.rightChild = pivot.leftChild;\r\n\t\t\t\tpivot.leftChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean onaryLeft(WAVLNode z) {\n\t if(z.left.rank!=-1) {\r\n\t\t return true;\r\n\t }\r\n\t return false;\r\n }", "public AVLNode deleteNodeImmersion(AVLNode treeRoot, int key) {\n if (treeRoot == null) {\n // Sub tree is empty\n // End operation\n return treeRoot;\n }\n\n // Sub tree is NOT empty so we have to perform the recursive descent\n if (key < treeRoot.getKey()) {\n // The key of the current node is less than the key we are looking for\n // Recursive descent through the left\n treeRoot.setLeft(deleteNodeImmersion(treeRoot.getLeft(), key));\n } else if (key > treeRoot.getKey()) {\n // The key of the current node is greater than the key we are looking for\n // Recursive descent through the right\n treeRoot.setRight(deleteNodeImmersion(treeRoot.getRight(), key));\n } else {\n // Key already exists, so we cannot add a new element with the same key\n treeRoot = this.handleDeletion(treeRoot);\n }\n\n // After applying the removal, let's see if rotations need to be applied\n\n // Case of tree with just one node: it is not necessary to apply rotations\n if (treeRoot == null) {\n return treeRoot;\n }\n\n // After inserting the element, we must increase the height of the current node\n // so we can later compute the height of the whole tree.\n // Let's compute height below using child heights\n int heightBelow = IntegerUtilities.max(height(treeRoot.getLeft()), height(treeRoot.getRight()));\n // Increase the height of the current node\n treeRoot.setHeight(heightBelow + 1);\n\n // Compute the balance factor of this node\n int balance = getBalance(treeRoot);\n\n // Check if this node is unbalanced\n if (balance > 1 || balance < -1) {\n\n // This node is unbalanced\n // Let's check the case\n\n if (balance > 1) {\n // Case Left Left / case Left Right\n if (getBalance(treeRoot.getLeft()) >= 0) {\n // Case Left Left: Right Rotation\n return rightRotate(treeRoot);// Right Rotation\n } else if (getBalance(treeRoot.getLeft()) < 0) {\n // Case Left Right: Left Rotation and Right Rotation\n treeRoot.setLeft(leftRotate(treeRoot.getLeft()));// Left Rotation\n return rightRotate(treeRoot);// Right Rotation\n }\n } else {// balance < -1\n // Case Right Right / case Right Left\n if (getBalance(treeRoot.getRight()) <= 0) {\n // Case Right Right: Left Rotation\n return leftRotate(treeRoot);// Left Rotation\n } else if (getBalance(treeRoot.getRight()) > 0) {\n // Case Right Left: Right Rotation and Left Rotation\n treeRoot.setRight(rightRotate(treeRoot.getRight()));// Right Rotation\n return leftRotate(treeRoot);// Left Rotation\n }\n }\n }\n\n return treeRoot;\n }", "private void leftRotate(RedBlackNode<T> x){\n leftRotateFixup(x);\n\n RedBlackNode<T> y;\n y = x.right;\n x.right = y.left;\n\n // czy istnieje y.left i zamiana referencji\n if (!isNil(y.left))\n y.left.parent = x;\n y.parent = x.parent;\n\n // x.parent jest nil\n if (isNil(x.parent))\n root = y;\n\n // x jest lewym dzieckiem swojego rodzica\n else if (x.parent.left == x)\n x.parent.left = y;\n\n //x jest prawym dzieckiem swojego rodzica\n else\n x.parent.right = y;\n\n y.left = x;\n x.parent = y;\n }", "public void rightRotate(RBNode<T, E> node) {\r\n\t\t// Keep Track of the root and the pivot and roots parent\r\n\t\tRBNode<T, E> root = node;\r\n\t\tRBNode<T, E> pivot = node.leftChild;\r\n\t\tRBNode<T, E> rParent = root.parent;\r\n\t\t// if the pivot is not null, then proceed to rotate\r\n\t\tif (pivot != nillLeaf) {\r\n\t\t\tif (rParent != nillLeaf) {\r\n\t\t\t\tif (root.uniqueKey.compareTo(rParent.uniqueKey) < 0) {\r\n\t\t\t\t\t// root must be to the left of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.leftChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\r\n\t\t\t\t} else if (root.uniqueKey.compareTo(rParent.uniqueKey) > 0) {\r\n\t\t\t\t\t// root must be to the right of the root's parent\r\n\t\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\t\tpivot.rightChild = root;\r\n\t\t\t\t\trParent.rightChild = pivot;\r\n\t\t\t\t\troot.parent = pivot;\r\n\t\t\t\t\tpivot.parent = rParent;\r\n\t\t\t\t\tthis.root = searchRoot(rParent);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// else if root has no parent, then rotate with no parent\r\n\t\t\telse {\r\n\t\t\t\troot.leftChild = pivot.rightChild;\r\n\t\t\t\tpivot.rightChild.parent = root;\r\n\t\t\t\tpivot.leftChild = root;\r\n\t\t\t\troot.parent = pivot;\r\n\t\t\t\tthis.root = pivot;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n \n // Perform rotation \n y.left = x; \n x.right = T2; \n \n // Update heights \n x.height = max(height(x.left), height(x.right)) + 1; \n y.height = max(height(y.left), height(y.right)) + 1; \n \n // Return new root \n return y; \n }", "public int singleRotation(AVLNode node, char side) {\n\t\tif (side == 'L') {\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setLeft(node.right);\n\t\t\tnode.right.setParent(node.parent);\n\t\t\tnode.setRight(node.parent);\n\t\t\tnode.setParent(node.getRight().getParent());\n\t\t\tnode.right.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.right.setHeight(node.right.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.right.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\n\t\telse {// side == 'R'\n\t\t\tchar pSide = ((AVLNode) node.getParent()).parentSide();\n\t\t\tnode.parent.setRight(node.left);\n\t\t\tnode.left.setParent(node.parent);\n\t\t\tnode.setLeft(node.parent);\n\t\t\tnode.setParent(node.getLeft().getParent());\n\t\t\tnode.left.setParent(node);\n\t\t\tif (pSide == 'L') {\n\t\t\t\tnode.getParent().setLeft(node);\n\t\t\t} else if (pSide == 'R') {\n\t\t\t\tnode.getParent().setRight(node);\n\t\t\t}\n\t\t\tnode.left.setHeight(node.left.getHeight() - 1);\n\t\t\tif (node.checkRoot()) {// we need to update root pointer\n\t\t\t\tthis.root = node;\n\t\t\t}\n\t\t\tnode.left.setSize();\n\t\t\tnode.setSize();\n\t\t\treturn 2;\n\t\t}\n\t}", "private int HieghtsUpdating(IAVLNode node) \r\n\t{\r\n\t\tint moneRot = 0;\r\n\t\twhile (node != null) //as long as we didn't reached root's parent\r\n\t\t{\r\n\t\t\tif ((BFCalc(node) < -1) || (BFCalc(node) > 1)) //if AVL isn't balanced \r\n\t\t\t\tmoneRot+= FixAVLtree(node); \r\n \r\n\t\t\tnode.setSize(sizeCalc(node));\r\n\t\t\tif(HeightCalc(node) != node.getHeight()) {\r\n\t\t\t\tmoneRot += Math.abs(HeightCalc(node)-node.getHeight());\r\n\t\t\t\tnode.setHeight(HeightCalc(node));\r\n\t\t\t}\r\n\t\t\tnode = node.getParent();\r\n\t\t}\r\n\t\treturn moneRot;\r\n\t}", "private AVLTreeNode<E> smallRotateLeft(AVLTreeNode<E> node) {\n AVLTreeNode<E> p = node.getRight();\n node.setRight(p.getLeft());\n p.setLeft(node);\n node.fixHeight();\n p.fixHeight();\n return p;\n }", "public int delete(int k){\n\t WAVLNode x = treePosForDel(this, k); // find the node to delete\r\n\t int cnt = 0; // rebalance operations counter\r\n\t if(x.key!=k) { // if a node with a key of k doesnt exist in the tree there is nothing to delete, return -1\r\n\t\t return -1;\r\n\t }\r\n\t if(this.root.key==x.key&&this.root.rank==0) {//root is a leaf\r\n\t\t this.root=EXT_NODE;// change the root pointer to EXT_NODE\r\n\t\t return 0;\r\n\t }\r\n\t else if(this.root.key==x.key&&(this.root.right==EXT_NODE||this.root.left==EXT_NODE)) {//root is onary\r\n\t\t if(x.left!=EXT_NODE) { // x is a root with a left child\r\n\t\t\t x.left.parent = null;\r\n\t\t\t this.root = x.left; // change the root pointer to the root's left child\r\n\t\t\t x.left.sizen=1;\r\n\t\t\t return 0;\r\n\t\t }\r\n\t\t x.right.parent = null; // x is a root with a right child \r\n\t\t x.right.sizen=1;\r\n\t\t this.root = x.right; // change the root pointer to the root's right child\r\n\t\t return 0;\r\n\t }\r\n\t WAVLNode z;\r\n\t if(isInnerNode(x)) {// x is an inner node, requires a call for successor and swap\r\n\t\t z = successorForDel(x); // find the successor of x\r\n\t\t x = swap(x,z); // put x's successor instead of x and delete successor \r\n\t }\r\n\t\t if(x.rank == 0) {//x is a leaf\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.left = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.left;\r\n\t\t\t }\r\n\t\t\telse { // x is a right child of it's parent, requires change in pointers \r\n\t\t\t\t x.parent.right = EXT_NODE;\r\n\t\t\t\t z = x.parent;\r\n\t\t\t\t x = x.parent.right; \r\n\t\t\t }\r\n\t\t }\r\n\t\t else {//x is onary\r\n\t\t\t boolean onaryside = onaryLeft(x); // check if x is onary with a left child\r\n\t\t\t WAVLNode x_child = EXT_NODE;\r\n\t\t\t if (onaryside) {\r\n\t\t\t\t x_child=x.left; // get a pointer for x child\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x_child=x.right;\r\n\t\t\t }\r\n\t\t\t if(parentside(x.parent, x).equals(\"left\")) { // x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.left=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {// x is a left child of its parent, change pointers for delete and rebalance loop\r\n\t\t\t\t x.parent.right=x_child;\r\n\t\t\t\t x_child.parent=x.parent;\r\n\t\t\t\t z=x.parent;\r\n\t\t\t\t x=x_child;\r\n\t\t\t }\r\n\t\t }\r\n\t if (z.left.rank==-1&&z.right.rank==-1) {//special case, z becomes a leaf, change pointers and demote\r\n\t\t demote(z);\r\n\t\t x=z;\r\n\t\t z=z.parent;\r\n\t\t cnt++;\r\n\t }\r\n\t \r\n\t while(z!=null&&z.rank-x.rank==3) { // while the tree is not balanced continue to balance the tree\r\n\t\t if(parentside(z, x).equals(\"left\")) { // x is z's left son\r\n\t\t\t if(z.rank-z.right.rank==2) {//condition for demote\r\n\r\n\t\t\t\t demote(z);\r\n\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.right.rank-z.right.left.rank==2&&z.right.rank-z.right.right.rank==2) {//condition for doubledemote left\r\n\t\t\t\t\t doubleDemoteLeft(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t\t \r\n\t\t\t\t }\r\n\t\t\t\t else if((z.right.rank-z.right.left.rank==1||z.right.rank-z.right.left.rank==2)&&z.right.rank-z.right.right.rank==1) {// condition for rotate left for del\r\n\t\t\t\t\t rotateLeftDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t\t else {//condition for doublerotate left for del\r\n\t\t\t\t\t doubleRotateLeftDel(z);\r\n\t\t\t\t\t \r\n\t\t\t\t\t cnt=cnt+5;\r\n\t\t\t\t\t break; // tree is balanced\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t }\r\n\t\t else { // x is z's right son, conditions are symmetric to left side\r\n\t\t\t if(z.rank-z.left.rank==2) {\r\n\t\t\t\t demote(z);\r\n\t\t\t\t x=z;\r\n\t\t\t\t z=z.parent;\r\n\t\t\t\t cnt++;\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t if(z.left.rank-z.left.right.rank==2&&z.left.rank-z.left.left.rank==2) {\r\n\t\t\t\t\t doubleDemoteright(z);\r\n\t\t\t\t\t x=z;\r\n\t\t\t\t\t z=z.parent;\r\n\t\t\t\t\t cnt+=2;\r\n\t\t\t\t }\r\n\t\t\t\t else if((z.left.rank-z.left.right.rank==1||z.left.rank-z.left.right.rank==2)&&z.left.rank-z.left.left.rank==1) {\r\n\t\t\t\t\t rotateRightDel(z);\r\n\t\t\t\t\t cnt+=3;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t else {\r\n\r\n\t\t\t\t\t doubleRotateRightDel(z);\r\n\t\t\t\t\t cnt+=5;\r\n\t\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t }\r\n\t }\r\n\t return cnt;\r\n }", "private void rebalanceLeft(TreeNodeDataType n) {\n left(n);\r\n \r\n \r\n }", "public AVLNode() {\n\t\t\tthis.key = -1;\n\t\t\tthis.val = null;\n\t\t\tthis.left = null;\n\t\t\tthis.right = null;\n\t\t\tthis.parent = null;\n\t\t\tthis.rank = -1;\n\t\t\tthis.size = 0;\n\t\t}", "public int case1(AVLNode node, int bottomLeftEdge) {\n\t\tchar sideOfNode = node.parentSide();\n\t\tif (sideOfNode == 'N') {\n\t\t\tnode.setSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (node.getParent().getHeight() - node.getHeight() == 1) {\n\t\t\tnode.setSize();\n\t\t\tnode.updateSize();\n\t\t\treturn 0;\n\t\t}\n\t\tif (sideOfNode == 'L') {\n\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\tif (rightEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 1;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // rightEdge == 2\n\t\t\t\tif (bottomLeftEdge == 1) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 2, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getRight(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t} else { // sideOfNode == 'R'\n\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\tif (leftEdge == 1) {\n\t\t\t\tnode.parent.setHeight(node.parent.getHeight() + 1);\n\t\t\t\tnode.parent.setSize();\n\t\t\t\tbottomLeftEdge = 2;\n\t\t\t\treturn 1 + this.case1((AVLNode) node.parent, bottomLeftEdge);\n\t\t\t} else { // leftEdge == 2\n\t\t\t\tif (bottomLeftEdge == 2) { // case 2 - single rotation\n\t\t\t\t\tint opNum = this.singleRotation(node, sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t} else { // B.L.Edge == 1, case 3, double rotation\n\t\t\t\t\tint opNum = this.doubleRotation((AVLNode) node.getLeft(), sideOfNode);\n\t\t\t\t\tnode.updateSize();\n\t\t\t\t\treturn opNum;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private Node leftRotate(Node a) {\n Node b = a.getRightChild();\n Node n2 = b.getLeftChild();\n b.setLeftChild(a);\n a.setRightChild(n2);\n setHeights(a, b);\n return b;\n }", "public AVLNode rotateLeft(AVLNode x) {\n AVLNode y = x.getRight();\n AVLNode T2 = y.getLeft();\n \n //rotation\n y.setLeft(x);\n x.setRight(T2);\n \n //update heights\n x.setHeight(Math.max(getHeight(x.getLeft()), getHeight(x.getRight())) + 1);\n y.setHeight(Math.max(getHeight(y.getLeft()), getHeight(y.getRight())) + 1);\n \n return y;\n }", "protected void rotateLeft(BSTNode n) {\n\n\t\tassert (n != null);\n\n\t\tBSTNode pv = n.right;\n\t\tassert (pv != null);\n\n\t\t// promote pv\n\t\tpv.parent = n.parent;\n\n\t\tif (n.parent == null) {\n\t\t\tif (n == _root) {\n\t\t\t\t_root = pv;\n\t\t\t} else {\n\t\t\t\t// do nothing, pv has no parent to notify\n\t\t\t}\n\t\t} else {\n\t\t\tsetParentReference(n, pv);\n\t\t}\n\n\t\t// move pv's left subtree over to n's right\n\t\tn.right = pv.left;\n\t\tif (n.right != null)\n\t\t\tn.right.parent = n;\n\n\t\t// move n to be the left child of pv\n\t\tpv.left = n;\n\t\tn.parent = pv;\n\n\t\t_stats.incRotations();\n\n\t\t/*\n\t\t * Fixup other tree stats\n\t\t */\n\n\t\tn.size = 1 + (n.left != null ? n.left.size : 0)\n\t\t\t\t+ (n.right != null ? n.right.size : 0);\n\n\t\tpv.size = 1 + n.size + (pv.right != null ? pv.right.size : 0);\n\t}", "public int delete(int k) {\n\t\tif (this.empty()) {// empty tree, nothing to erase\n\t\t\treturn -1;\n\t\t}\n\t\tAVLNode root = (AVLNode) this.root;\n\t\tAVLNode node = (AVLNode) root.delFindNode(k);\n\t\tif (node == null) {// no node with key==k in this tree\n\t\t\treturn -1;\n\t\t}\n\t\tchar side = node.parentSide();\n\t\tboolean rootTerm = (node.getLeft().getKey() != -1 && node.getRight().getKey() != -1);\n\t\tif (side == 'N' && (rootTerm == false)) {\n\t\t\treturn this.deleteRoot(node);\n\t\t}\n\t\tif (side == 'L') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 1 && rightEdge == 2) {\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tnode.parent.setLeft(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.left != null && node.right == null) || (node.left == null && node.right != null)) {// node is //\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// unary\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.parent.getRight().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 2)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==2&&rightEdge==1\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\tif (side == 'R') {\n\t\t\tif (node.isLeaf()) {\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tAVLNode parent = (AVLNode) node.parent;\n\t\t\t\tif (leftEdge == 1 && rightEdge == 1) {// first case (\"easy one\", just delete)\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.updateSize();\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\tif (leftEdge == 2 && rightEdge == 1) {\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\tparent.setHeight(parent.getHeight() - 1);\n\t\t\t\t\tparent.setSize();\n\t\t\t\t\treturn this.delRecTwos(parent);\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tnode.parent.setRight(new AVLNode());\n\t\t\t\t\tnode.setParent(null);\n\t\t\t\t\treturn this.delRecTriOne(parent, side);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((node.getLeft().getHeight() != -1 && node.getRight().getHeight() == -1)\n\t\t\t\t\t|| (node.getLeft().getHeight() == -1 && node.getRight().getHeight() != -1)) {// node is unary\n\t\t\t\tint rightEdge = node.parent.getHeight() - node.getHeight();\n\t\t\t\tint leftEdge = node.parent.getHeight() - node.parent.getLeft().getHeight();\n\t\t\t\tif ((leftEdge == 1 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\tAVLNode parent = node.delUnaryLeft();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\tAVLNode parent = node.delUnaryRight();\n\t\t\t\t\t\tparent.updateSize();\n\t\t\t\t\t\treturn 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ((leftEdge == 2 && rightEdge == 1)) {\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryLeft());\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTwos(node.delUnaryRight());\n\t\t\t\t\t}\n\t\t\t\t} else {// leftEdge==1&&rightEdge==2\n\t\t\t\t\tif (node.left != null) {\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryLeft(), side);\n\t\t\t\t\t} else {// node.right!=null\n\t\t\t\t\t\treturn this.delRecTriOne(node.delUnaryRight(), side);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// we get here only if node is binary, and thus not going through any other\n\t\t// submethod\n\t\tAVLNode successor = this.findSuccessor(node); // successor must be unary/leaf\n\t\tif (node.checkRoot()) {\n\t\t\tthis.root = successor;\n\t\t}\n\t\tint numOp = this.delete(successor.key);\n\t\tsuccessor.setHeight(node.getHeight());\n\t\tsuccessor.size = node.getSize();\n\t\tsuccessor.setRight(node.getRight());\n\t\tnode.right.setParent(successor);\n\t\tnode.setRight(null);\n\t\tsuccessor.setLeft(node.getLeft());\n\t\tnode.left.setParent(successor);\n\t\tnode.setLeft(null);\n\t\tsuccessor.setParent(node.getParent());\n\t\tif (node.parentSide() == 'L') {\n\t\t\tnode.parent.setLeft(successor);\n\t\t} else if (node.parentSide() == 'R') {// node.parentSide()=='R'\n\t\t\tnode.parent.setRight(successor);\n\t\t}\n\t\tnode.setParent(null);\n\t\treturn numOp;\n\n\t}", "private void rotateLeft(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode y = x.right;\n\t RedBlackNode BSubTree = y.left;\n\t y.left = x;\n\t x.parent = y;\n\t x.right = BSubTree;\n\t //analyse whether need to have Nil check in this code\n\t BSubTree.parent = x;\n\t if(xParent == this.Nil){\n\t\t this.root = y;\n\t\t y.parent = this.Nil;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t\t y.parent = xParent;\n\t }else{\n\t\t xParent.right = y;\n\t\t y.parent = xParent;\n\t }\n\t \n }", "private long leftRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentRight = current.right;\r\n Node tempN = new Node(current.right);\r\n current.right = tempN.left;\r\n tempN.left = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentRight);\r\n return currentRight;\r\n }", "@Test\n void solvesTestCase() {\n TreeNode root = new TreeNode(3);\n root.left = new TreeNode(9);\n root.right = new TreeNode(20);\n root.right.left = new TreeNode(15);\n root.right.right = new TreeNode(7);\n\n List<List<Integer>> traversal = new ZigZagLevelOrder().zigzagLevelOrder(root);\n assertThat(traversal.size()).isEqualTo(3);\n assertThat(traversal.get(0)).containsExactly(3);\n assertThat(traversal.get(1)).containsExactly(20, 9);\n assertThat(traversal.get(2)).containsExactly(15, 7);\n }", "private void splay(Node tree) {\n assert(tree != null);\n while(tree.parent != null && tree.parent.parent != null) { //while has a parent and a grandparent\n if(tree.parent.left == tree && tree.parent.parent.left == tree.parent) { //zig-zig case\n rotateRight(tree.parent.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.left == tree.parent) { //zig-zag case\n rotateLeft(tree.parent);\n rotateRight(tree.parent);\n } else if(tree.parent.right == tree && tree.parent.parent.right == tree.parent) { //zag-zag case\n rotateLeft(tree.parent.parent);\n rotateLeft(tree.parent);\n } else if(tree.parent.left == tree && tree.parent.parent.right == tree.parent) { //zag-zig case\n rotateRight(tree.parent);\n rotateLeft(tree.parent);\n }\n }\n if(tree != root) { //tree is only of depth 1\n if (root.left == tree) { //zig\n rotateRight(root);\n } else { //zag\n rotateLeft(root);\n }\n }\n }", "AVLTreeNode insert(AVLTreeNode node, int key)\r\n {\n if (node == null)\r\n {\r\n return new AVLTreeNode(key);\r\n }\r\n\r\n if (key < node.key)\r\n {\r\n node.left = insert(node.left, key);\r\n }\r\n else if (key > node.key)\r\n {\r\n node.right = insert(node.right, key);\r\n }\r\n else\r\n {\r\n return node;\r\n }\r\n\r\n // now update the height of the node\r\n updateHeight(node);\r\n\r\n // check the balance at this node and perform rotations accordingly\r\n int balance = getBalance(node);\r\n\r\n if (balance > 1) // indicates either left-left or left-right case\r\n {\r\n if (key < node.left.key) // confirms left-left case\r\n {\r\n node = rightRotate(node);\r\n }\r\n else // confirms left-right case\r\n {\r\n node.left = leftRotate(node.left);\r\n node = rightRotate(node);\r\n }\r\n }\r\n\r\n else if (balance < -1) // indicates either right-right or right-left case\r\n {\r\n if (key > node.right.key) // confirms right-right case\r\n {\r\n node = leftRotate(node);\r\n }\r\n else // confirms right-left case\r\n {\r\n node.right = rightRotate(node.right);\r\n node = leftRotate(node);\r\n }\r\n }\r\n return node;\r\n }", "public static void main(String[] args) {\n\t\tint[] arr = {7,3,10,12,5,1,9};\n\t\tNode root = null;\n\t\tfor(int n:arr) {\n\t\t\tif(root == null) {\n\t\t\t\troot = new Node(n);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tNode cur = root;\n\t\t\tNode par = null;\n\t\t\twhile(cur != null) {\n\t\t\t\tpar = cur;\n\t\t\t\tif(n < cur.val) cur = cur.left;\n\t\t\t\telse cur = cur.right;\n\t\t\t}\n\t\t\tif(n < par.val) par.left = new Node(n);\n\t\t\telse par.right = new Node(n);\n\t\t\tif(height(root.left) - height(root.right) > 1) {\n\t\t\t\tif(height(root.left.right) > height(root.left.left)) leftRotate(root.left);\n\t\t\t\trightRotate(root);\n\t\t\t}\n\t\t\tif(height(root.right) - height(root.left) > 1) {\n\t\t\t\tif(height(root.right.left) > height(root.right.right)) rightRotate(root.right);\n\t\t\t\tleftRotate(root);\n\t\t\t}\n\t\t}\n\t\t//infixOrder(root);\n//\t\tdel(root,7);\n//\t\tinfixOrder(root);\n\t\t//del(root,5);\n\t\t//del(root,5);\n\t\tinfixOrder(root);\n\t}", "Node leftRotate(Node x) \n { \n Node y = x.right; \n Node T2 = y.left; \n\n // Perform rotation \n y.left = x; \n x.right = T2; \n\n // Update heights \n x.height = Math.max(height(x.left), height(x.right)) + 1; \n y.height = Math.max(height(y.left), height(y.right)) + 1; \n\n // Return new root \n return y; \n }", "private void doubleDemoteLeft (WAVLNode z) {\n\t z.rank--;\r\n\t z.right.rank--;\r\n }", "private AVLTree[] splitLoop(IAVLNode nodeX, AVLTree [] arr){\r\n\t\t\tAVLTree tmp1 = new AVLTree();\r\n\t\t\tAVLTree tmp2 = new AVLTree();\r\n\t\t\tAVLTree tmp3 = new AVLTree();\r\n\t\t\tAVLTree tmp4 = new AVLTree();\r\n\t\t\tIAVLNode preOfX, newNodeForJoin; \r\n\t\t\tint newHeight, newSize;\r\n\t\t\t\r\n\t\t\tIAVLNode curr = nodeX;\r\n\t\t\ttmp1.setRoot(curr.getLeft());\r\n\t\t\ttmp1.getRoot().setParent(null);\r\n\t\t\ttmp3.setRoot(curr.getRight());\r\n\t\t\ttmp3.getRoot().setParent(null);\r\n\t\t\twhile (curr != null) {\r\n\t\t\t\tif(curr.getParent() == null)\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tif(curr.getParent().getRight() == curr) // im his left son\r\n\t\t\t\t\t{preOfX = curr.getParent();\r\n\t\t\t\t\ttmp2.setRoot(preOfX.getLeft());\r\n\t\t\t\t\ttmp2.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp1.join(newNodeForJoin, tmp2);\r\n\t\t\t\t\tnewHeight = tmp1.HeightCalc(tmp1.getRoot());\r\n\t\t\t\t\tnewSize = tmp1.sizeCalc(tmp1.getRoot());\r\n\t\t\t\t\ttmp1.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp1.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp2.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tpreOfX = curr.getParent();\r\n\t\t\t\t\ttmp4.setRoot(preOfX.getRight());\r\n\t\t\t\t\ttmp4.getRoot().setParent(null);\r\n\t\t\t\t\tnewNodeForJoin= new AVLNode(preOfX.getKey(), preOfX.getValue());\r\n\t\t\t\t\tnewNodeForJoin.setHeight(0);\r\n\t\t\t\t\ttmp3.join(newNodeForJoin, tmp4);\r\n\t\t\t\t\tnewHeight = tmp3.HeightCalc(tmp3.getRoot());\r\n\t\t\t\t\tnewSize = tmp3.sizeCalc(tmp3.getRoot());\r\n\t\t\t\t\ttmp3.getRoot().setHeight(newHeight);\r\n\t\t\t\t\ttmp3.getRoot().setSize(newSize);\r\n\t\t\t\t\ttmp4.setRoot(null);\r\n\t\t\t\t\tcurr = preOfX;\r\n\t\t\t\t}\r\n\t\t\t\tnewNodeForJoin = new AVLNode(null);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tarr[0] = tmp1;\r\n\t\t\t\tarr[1]= tmp3;\r\n\t\t\t\tarr[0].minimum = arr[0].minPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].minimum = arr[1].minPointer(arr[1].getRoot());\r\n\t\t\t\tarr[0].maximum = arr[0].maxPointer(arr[0].getRoot());\r\n\t\t\t\tarr[1].maximum = arr[1].maxPointer(arr[1].getRoot());\r\n\t\r\n\t\t\t\treturn arr;\r\n\t\t\t\t\r\n\t\t\t}", "Node leftRotate(Node x)\n\t\t{\n\t\t\tNode y=x.right;\n\t\t\tNode T2=y.left;\n\t\t\t\n\t\t\t//rotate\n\t\t\t\n\t\t\ty.left=x;\n\t\t\tx.right=T2;\n\t\t\t\n\t\t\t//update heights\n\t\t\ty.height=max(height(y.left),height(y.left) +1 ) ;\n\t\t\tx.height=max(height(x.left),height(x.left) +1 ) ;\n\t\t\t\n\t\t\t// new root\n\t\t\treturn y;\n\t\t}", "@Test\n\tpublic void test_3_RotacionesSimplesIzquierdaHijoEquilibrado() {\n\t\tassertTrue(tree.add(2000));\n\t\tassertTrue(tree.add(3000));\n\t\tassertTrue(tree.add(1000));\n\t\tassertTrue(tree.add(500));\n\t\tassertTrue(tree.add(1500));\n\t\tassertTrue(tree.remove(3000)); // Primera rotación\n\t\tassertTrue(tree.remove(1500)); \n\t\tassertTrue(tree.add(700));\n\t\tassertTrue(tree.add(400));\n\t\tassertTrue(tree.remove(2000)); // Segunda rotación\n\t\tassertTrue(tree.remove(700)); \n\t\tassertTrue(tree.add(450));\n\t\tassertTrue(tree.add(300));\n\t\tassertTrue(tree.remove(1000)); // Tercera rotación\n\n\t//\t System.out.print(tree.toString());\n\n\t\t// Comprobamos que se hayan realizado 3 rotaciones simples a la\n\t\t// izquierda\n\t\tassertEquals(3, tree.getRotacionesSimplesIzquierda());\n\n\t\t// Comprobamos que no se haya hecho ninguna rotación más\n\t\tassertEquals(0, tree.getRotacionesSimplesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesDerecha());\n\t\tassertEquals(0, tree.getRotacionesDoblesIzquierda());\n\n\t\t// System.out.print(tree.toString());\n\t}", "private NodeRB<K, V> rotateLeft(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> xParent = x.parent;\n\n\t\tNodeRB<K, V> y = x.right;\n\t\tx.right = y.left;\n\t\ty.left = x;\n\n\t\t// Parents relations fix\n\t\tif (xParent != null) {\n\t\t\tif (x.isLeftChild()) {\n\t\t\t\txParent.left = y;\n\t\t\t} else {\n\t\t\t\txParent.right = y;\n\t\t\t}\n\t\t}\n\n\t\tx.parent = y;\n\t\ty.parent = xParent;\n\t\tif (x.right != null) {\n\t\t\tx.right.parent = x;\n\t\t}\n\n\t\tx.height = 1 + Math.max(height(x.left), height(x.right));\n\t\ty.height = 1 + Math.max(height(y.left), height(y.right));\n\t\treturn y;\n\t}", "public AVLNode rotateLeft(AVLNode pt) {\n\t\tAVLNode node = pt.getRight();\n\t\t\n\t\tpt.setRight(node.getLeft());\n\t\tnode.setLeft(pt);\n\t\t\n\t\treturn node;\n\t}", "private void balanceTree(BinaryNode node) {\n if (node == null) return;\n\n int leftDepth = getDepth(node.left, 0);\n int rightDepth = getDepth(node.right, 0);\n if (Math.abs(leftDepth - rightDepth) > 1) { // outofbalance\n if (leftDepth > rightDepth) {\n if (node.left.right != null) doubleRotationLR(node);\n else singleRotationLR(node);\n }\n\n else {\n if (node.right.left != null) doubleRotationRL(node);\n else singleRotationRL(node);\n }\n balanceTree(root);\n } else {\n balanceTree(node.left);\n balanceTree(node.right);\n }\n }", "public void leftRotate(Node n) {\r\n\t\tNode y = n.right;\r\n\t\tn.right = y.left;\r\n\t\tif(!y.left.isNil)\r\n\t\t\ty.left.parent = n;\r\n\t\ty.parent = n.parent;\r\n\t\tif(n.parent.isNil)\r\n\t\t\troot = y;\r\n\t\telse if(n == n.parent.left)\r\n\t\t\tn.parent.left = y;\r\n\t\telse\r\n\t\t\tn.parent.right = y;\r\n\t\ty.left = n;\r\n\t\tn.parent = y;\r\n\t}", "public int join(IAVLNode x, AVLTree t) {\n\t\tif (this.empty() && t.empty()) {\n\t\t\tthis.root = x;\n\t\t\treturn 1;\n\t\t}\n\n\t\tif (this.empty()) {// t is not empty\n\t\t\tint comp = t.getRoot().getHeight() + 1;\n\t\t\tt.insert(x.getKey(), x.getValue());\n\t\t\tthis.root = t.root;\n\t\t\treturn comp;\n\t\t}\n\n\t\tif (t.empty()) {// this is not empty\n\t\t\tint comp = this.getRoot().getHeight() + 1;\n\t\t\tthis.insert(x.getKey(), x.getValue());\n\t\t\treturn comp;\n\t\t}\n\n\t\tint thisRank = this.getRoot().getHeight();\n\t\tint otherRank = t.getRoot().getHeight();\n\t\tif (thisRank == otherRank) {\n\t\t\tif (this.getRoot().getKey() < x.getKey()) {\n\t\t\t\tx.setLeft(this.getRoot());\n\t\t\t\tthis.getRoot().setParent(x);\n\t\t\t\tx.setRight(t.getRoot());\n\t\t\t\tt.getRoot().setParent(x);\n\t\t\t\tx.setHeight(x.getLeft().getHeight() + 1);\n\t\t\t\tthis.root = x;\n\t\t\t} else {// this.getRoot().getKey() > x.getKey()\n\t\t\t\tx.setRight(this.getRoot());\n\t\t\t\tthis.getRoot().setParent(x);\n\t\t\t\tx.setLeft(t.getRoot());\n\t\t\t\tt.getRoot().setParent(x);\n\t\t\t\tx.setHeight(x.getRight().getHeight() + 1);\n\t\t\t\tthis.root = x;\n\t\t\t}\n\t\t\treturn (Math.abs(thisRank - otherRank) + 1);\n\t\t} // if we got here, than the trees aren't in the same height\n\t\tboolean newIsHigher;\n\t\tboolean newIsBigger;\n\t\tnewIsHigher = (this.getRoot().getHeight() < t.getRoot().getHeight());\n\t\tnewIsBigger = (this.getRoot().getKey() < this.getRoot().getKey());\n\t\tAVLNode tempX = (AVLNode) x;\n\t\tif (newIsHigher && newIsBigger) {\n\t\t\tt.joinByLeft(tempX, this, 'R');\n\t\t}\n\t\tif (!newIsHigher && !newIsBigger) {\n\t\t\tthis.joinByLeft(tempX, t, 'L');\n\t\t}\n\t\tif (newIsHigher && !newIsBigger) {\n\t\t\tt.joinByRight(tempX, this, 'R');\n\t\t}\n\t\tif (!newIsHigher && newIsBigger) {\n\t\t\tthis.joinByRight(tempX, t, 'L');\n\t\t}\n\t\treturn (Math.abs(thisRank - otherRank) + 1);\n\t}", "private Node<T> rotateWithRight(Node<T> a) {\n Node<T> b = a.getRight();\n a.setRight(b.getLeft());\n b.setLeft(a);\n int aH = Math.max(findHeight(a.getLeft()),\n findHeight(a.getRight())) + 1;\n a.setHeight(aH);\n int bH = Math.max(findHeight(b.getRight()), aH) + 1;\n b.setHeight(bH);\n hAndBF(a);\n hAndBF(b);\n return b;\n }", "public interface IAVLNode {\n\t\tpublic int getKey(); // returns node's key (for virtuval node return -1)\n\n\t\tpublic String getValue(); // returns node's value [info] (for virtuval node return null)\n\n\t\tpublic void setLeft(IAVLNode node); // sets left child\n\n\t\tpublic IAVLNode getLeft(); // returns left child (if there is no left child return null)\n\n\t\tpublic void setRight(IAVLNode node); // sets right child\n\n\t\tpublic IAVLNode getRight(); // returns right child (if there is no right child return null)\n\n\t\tpublic void setParent(IAVLNode node); // sets parent\n\n\t\tpublic IAVLNode getParent(); // returns the parent (if there is no parent return null)\n\n\t\tpublic boolean isRealNode(); // Returns True if this is a non-virtual AVL node\n\n\t\tpublic void setHeight(int height); // sets the height of the node\n\n\t\tpublic int getHeight(); // Returns the height of the node (-1 for virtual nodes)\n\n\t\tpublic void setSize();\n\n\t\tpublic int getSize();\n\t}", "protected Node<E> rotateLeft(Node<E> root) {\r\n\t\tNode<E> temp = root.right;\r\n\t\troot.right = temp.left;\r\n\t\ttemp.left = root;\r\n\t\treturn temp;\t\r\n\t}", "private Node rightRotate(Node a) {\n Node b = a.getLeftChild();\n Node n3 = b.getRightChild();\n b.setRightChild(a);\n a.setLeftChild(n3);\n setHeights(a, b);\n return b;\n }", "private void doubleRotateright(WAVLNode x) {\n\t WAVLNode z=x.left;\r\n\t rightRotate(z);\r\n\t z.rank+=1;\r\n\t leftRotate(z);\r\n }", "private long rightRotate(long n) throws IOException {\n Node current = new Node(n);\r\n long currentLeft = current.left;\r\n Node tempN = new Node(current.left);\r\n current.left = tempN.right;\r\n tempN.right = n;\r\n current.height = getHeight(current);\r\n current.writeNode(n);\r\n tempN.height = getHeight(tempN);\r\n tempN.writeNode(currentLeft);\r\n return currentLeft;\r\n }", "private void leftRotateFixup(RedBlackNode x){\n\n // Przypadek 1: tylko x, x.right i x.right.right są nil.\n if (isNil(x.left) && isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 0;\n x.right.numLeft = 1;\n }\n\n // Przypadek 2: x.right.left istnieje w dodatku do przypadku 1\n else if (isNil(x.left) && !isNil(x.right.left)){\n x.numLeft = 0;\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 2 + x.right.left.numLeft +\n x.right.left.numRight;\n }\n\n // Przypadek 3: x.left także istnieje w dodatku do przypadku 1\n else if (!isNil(x.left) && isNil(x.right.left)){\n x.numRight = 0;\n x.right.numLeft = 2 + x.left.numLeft + x.left.numRight;\n\n }\n\n // Przypadek 4: x.left i x.right.left istnieją w dodatku do przypadku 1\n else{\n x.numRight = 1 + x.right.left.numLeft +\n x.right.left.numRight;\n x.right.numLeft = 3 + x.left.numLeft + x.left.numRight +\n x.right.left.numLeft + x.right.left.numRight;\n }\n }", "public AVLTree() {\n\t\tthis.root = null;\n\t}", "private RedBlackNode rotateRight(RedBlackNode x){\n\t RedBlackNode xParent = x.parent;\n\t RedBlackNode BSubTree = x.left.right;\n\t RedBlackNode y = x.left;\n\t y.right = x;\n\t x.parent = y;\n\t x.left = BSubTree;\n\t //Need to anlayse whether Nil check need to have or Not\n\t BSubTree.parent = x;\n\t if( xParent == this.Nil){\n\t\t this.root = y;\n\t }else if(xParent.left == x){\n\t\t xParent.left = y;\n\t }else{\n\t\t xParent.right = y;\n\t }\n\t y.parent = xParent;\n\t return y;\n }", "Node leftRotate(Node x) {\n Node y = x.right;\n Node T2 = y.left;\n\n // Perform rotation\n y.left = x;\n x.right = T2;\n\n // Update heights\n x.height = max(height(x.left), height(x.right)) + 1;\n y.height = max(height(y.left), height(y.right)) + 1;\n\n // Return new root\n return y;\n }", "private long replace(long r, Node change) throws IOException {\n Node current = new Node(r);\r\n if (current.right != 0) {\r\n current.right = replace(current.right, change);\r\n current.height = getHeight(current);\r\n current.writeNode(r);\r\n int heightDifference = getHeightDifference(r);\r\n if (heightDifference < -1) {\r\n if (getHeightDifference(current.right) > 0) {\r\n current.right = rightRotate(current.right);\r\n current.writeNode(r);\r\n return leftRotate(r);\r\n }\r\n else {\r\n return leftRotate(r);\r\n }\r\n }\r\n else if (heightDifference > 1) {\r\n if (getHeightDifference(current.left) < 0) {\r\n current.left = leftRotate(current.left);\r\n current.writeNode(r);\r\n return rightRotate(r);\r\n }\r\n else {\r\n return rightRotate(r);\r\n }\r\n }\r\n return r;\r\n }\r\n else {\r\n change.key = current.key;\r\n change.fields = current.fields;\r\n addToFree(r);\r\n return current.left;\r\n }\r\n }", "private NodeTreeBinary<T> rotateLeft(NodeTreeBinary<T> h) {\n\t\tNodeTreeBinary<T> x = h.getRight();\n\n\t\th.setRight(x.getLeft());\n\t\tx.setLeft(h);\n\t\tsetColor(x, getColor(x.getLeft()));\n\t\tsetColor(x.getLeft(), NodeTreeRB.RED);\n\n\t\tsetSize(x, getSize(h));\n\t\tsetSize(h, getSize(h.getLeft()) + getSize(h.getRight()) + 1);\n\n\t\treturn x;\n\t}", "private void fixTree(Node node){\n while(node.parent.color == RED){\n Node uncle = nil;\n if (node.parent == node.parent.parent.left){ // parent is to the left of grandparent\n uncle = node.parent.parent.right;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****LEFT RIGHT CASE (rotate P left)**** // GB GB\n if (node == node.parent.right){ // PR ==> NR\n node = node.parent; // NR PR\n rotateLeft(node); //\n }\n \n // ****LEFT LEFT CASE (rotate G right)****\n // uncle is nil and color = BLACK, or is // GB P\n // not nil and color still is BLACK // PR ==> N G\n node.parent.color = BLACK; // NR\n node.parent.parent.color = RED;\n rotateRight(node.parent.parent);\n \n } else { //parent is to the right of grand parent\n uncle = node.parent.parent.left;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****RIGHT LEFT CASE (rotate P right)**** // GB GB\n if (node == node.parent.left){ // PR ==> NR\n node = node.parent; // NR PR\n rotateRight(node); //\n }\n \n // **** RIGHT RIGHT CASE (rotate G left) // GR PB\n node.parent.color = BLACK; // PB ==> GR NR\n node.parent.parent.color = RED; // NR\n rotateLeft(node.parent.parent);\n }\n }\n \n root.color = BLACK;\n }", "public AVLTree(IAVLNode node) {\n\t\tthis.root = node;\n\t}", "boolean insertNode(RBTreeNode curr, RBTreeNode node) {\n int dir1 = curr.getDirection(node);\n int dir2 = dir1 ==0 ? 1 : 0;\n\n if(curr.children[dir1] == null) {\n curr.children[dir1] = node;\n return true;\n }\n\n if(isRedNode(curr)) {\n //Case 1: Case where we can flip colors and black height remains unchanged\n if(isRedNode(curr.children[dir1]) ) {\n if(isRedNode(curr.children[dir2])) {\n curr.children[dir1].isRed = true;\n curr.children[dir2].isRed = true;\n curr.isRed = false;\n return true;\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir1])) { //Case 2 and 3 //single rotation\n //RBTreeNode temp = singleRotate(curr,dir1,dir1); //Java no pointers :( So need to copy the returned val\n //curr.update(temp);\n curr.update(singleRotate(curr,dir1,dir1));\n } else if(isRedNode(curr.children[dir1]) && isRedNode(curr.children[dir1].children[dir2])) { //Case 2 and 3 // double rotation\n //doubleRotate\n\n }\n } else {\n //do nothing as black height is unchanged and red red violation\n }\n }//not sure about braces\n\n return insertNode(curr.children[dir1],node);\n }", "public void leftRotate(Node<E> x){\n \n \t/*\n If x is the root of the tree to rotate with left child subtree T1 and right child y, \n where T2 and T3 are the left and right children of y:\n x becomes left child of y and T3 as its right child of y\n T1 becomes left child of x and T2 becomes right child of x\n */\n\t\tNode<E> y = x.getRightChild(); //set y\n\t\tx.setRightChild(y.getLeftChild()); //turn y's subtree into x's right subtree\n\t\ty.getLeftChild().setParent(x);\n\t\ty.setParent(x.getParent());\n\t\tif (x.getParent() == sentinel || x.getParent() == null) {\n\t\t\troot = y;\n\t\t} else if (x == x.getParent().getLeftChild()) { //link x's parent to y\n\t\t\tx.getParent().setLeftChild(y);\n\t\t} else {\n\t\t\tx.getParent().setRightChild(y);\n\t\t}\n\t\ty.setLeftChild(x); //put x on y's left\n\t\tx.setParent(y);\n\t\n }", "public int compareTo(LeafPage node) {\r\n//\t\tSystem.out.println(\"Leaf compare\");\r\n if (this.getKey(0)>node.getKey(0)){\r\n \treturn 1;\r\n } else if(this.getKey(0)<node.getKey(0)){\r\n \treturn -1;\r\n }\r\n return 0;\r\n }", "@Test\n public void levelOrder() throws Exception {\n Node node = new Node(150);\n node.setLeft(new Node(120));\n node.setRight(new Node(40));\n Node root = new Node(110);\n root.setLeft(new Node(80));\n root.setRight(node);\n\n Queue<Integer> expected = new LinkedList<Integer>();\n expected.add(110);\n expected.add(80);\n expected.add(150);\n expected.add(120);\n expected.add(40);\n BinarySearchTree.levelOrder(root);\n assertEquals(expected, BinarySearchTree.printQ);\n }", "@Test\n void removeLeaves_on3HeightLeftSpindlyTree_returnsCorrectTree() {\n IntTree tree = new IntTree(6,\n 5, 2,\n 4, null, null, null,\n 1, 3);\n IntTreeProblems.removeLeaves(tree);\n IntTree expected = new IntTree(6,\n 5, null,\n 4);\n assertThat(tree).isEqualTo(expected);\n }", "public static void main(String[] args) {\n\n /**\n * 1\n * 2 3\n * 4 5 6 7\n * 8\n */\n final BinaryTree binaryTree = new BinaryTree(1);\n\n binaryTree.insertAsLeftChild(2, 1);\n binaryTree.insertAsRightChild(3, 1);\n\n binaryTree.insertAsLeftChild(4,2);\n binaryTree.insertAsRightChild(5,2);\n\n binaryTree.insertAsLeftChild(6,3);\n binaryTree.insertAsRightChild(7, 3);\n\n binaryTree.insertAsLeftChild(8,6);\n\n binaryTree.inOrderTraversal();\n binaryTree.inOrderTraversalRec();\n\n binaryTree.preOrderTraversal();\n binaryTree.preOrderTraversalRec();\n\n binaryTree.postOrderTraversalRec();\n binaryTree.postOrderTraversal();\n\n binaryTree.levelOrderTraversal();\n binaryTree.levelOrderTraversalBruteForce();\n\n binaryTree.printAllPaths();\n binaryTree.printLevel(3);\n binaryTree.printLeaves();\n binaryTree.leftSideView();\n binaryTree.rightSideView();\n\n System.out.println(\"binaryTree.heightBalanceFactor(3): \" + binaryTree.heightBalanceFactor(binaryTree.searchRec(3)));\n System.out.println(\"binaryTree.heightBalanceFactor(1): \" + binaryTree.heightBalanceFactor(binaryTree.searchRec(1)));\n\n binaryTree.toMirrorImage();\n\n System.out.println(\"After Converting the tree to mirror image\");\n binaryTree.leftSideView();\n binaryTree.rightSideView();\n\n System.out.println(\"binaryTree.numberOfNodes(): \" + binaryTree.numberOfNodes());\n System.out.println(\"binaryTree.isSimilar(binaryTree): \" + binaryTree.isSimilar(binaryTree));\n System.out.println(\"binaryTree.isSimilar(binaryTree): \" + binaryTree.isCopy(binaryTree));\n System.out.println(\"binaryTree.height(): \" + binaryTree.height());\n System.out.println(\"binaryTree.searchRec(4) \" + binaryTree.searchRec(4));\n System.out.println(\"binaryTree.searchRec(9) \" + binaryTree.searchRec(9));\n }", "private void nullLeaf(AVLNode<T> node) {\n AVLNode<T> prev = getParent(root, node);\n int comp = node.getData().compareTo(prev.getData());\n if (comp > 0) {\n prev.setRight(null);\n AVLNode<T> min = findMin(prev.getLeft());\n AVLNode<T> max = findMax(prev.getLeft());\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n } else {\n prev.setLeft(null);\n AVLNode<T> max = findMax(prev.getRight());\n AVLNode<T> min = findMin(prev.getRight());\n if (max != null) {\n calcDeterminants(max);\n balanceTree(max);\n calcDeterminants(max);\n }\n if (min != null) {\n calcDeterminants(min);\n balanceTree(min);\n calcDeterminants(min);\n }\n }\n }", "public void fixViolationDelete(Node node){ \n\t\t\n\t while(node!=root && node.colour==\"Black\"){\n\t if(node==node.parent.left){\n\t \t//if the node is the left child and sibling is in the right\n\t Node sibling=node.parent.right;\n\t //check if the color of sibling is red then exchange the color with parent and rotate left \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateLeft(node.parent);\n\t sibling=node.parent.right;\n\t }\n\t if(sibling.left.colour==\"Black\" && sibling.right.colour ==\"Black\"){\n\t \t//if both the children of sibling are black, change the color of the sibling and transfer the problem up the parent\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }\n\t else{ \n\t if(sibling.right.colour==\"Black\"){\n\t \t//if the left child of the sibling in red exchange the color of the sibling's child with sibling and color the child black\n\t \t// and rotate right\n\t \tsibling.left.colour = \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateRight(sibling);\n\t sibling=node.parent.right;\n\t }\n\t //followed my the left rotation\n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.right.colour = \"Black\";\n\t rotateLeft(node.parent);\n\t node=root;\n\t }\n\t }\n\t else{\n\t \t//node is the right child of the parent and sibling is the left child\n\t Node sibling=node.parent.left;\n\t \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateRight(node.parent);\n\t sibling=node.parent.left;\n\t }\n\t \n\t if(sibling.right.colour==\"Black\" && sibling.left.colour==\"Black\"){\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }else{\n\t if(sibling.left.colour==\"Black\"){\n\t \tsibling.right.colour= \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateLeft(sibling);\n\t sibling=node.parent.left;\n\t }\n\t \n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.left.colour = \"Black\";\n\t rotateRight(node.parent);\n\t node=root;\n\t }\n\t }\n\t }\n\t //we color the node black\n\t node.colour = \"Black\";\n\t}", "private void balance(Node<T> a) {\n\n if (a == null) return;\n Node<T> temp = new Node<>(a.getValue());\n Node<T> b;\n\n // If current node has a left node but no right...\n if ((b = a.getLeft()) != null && a.getRight() == null) {\n rotateRight(a, temp, b);\n\n // If current node has a right node but no left...\n } else if ((b = a.getRight()) != null && a.getLeft() == null) {\n rotateLeft(a, temp, b);\n\n // If current node has two children...\n } else {\n\n // If node is unbalanced and weighted left...\n if (getBalance(a) > 1) {\n doubleRotateRight(a, temp);\n // After rotation, branch is weighted right, therefore right branch should be rebalanced.\n rebalanceBranch(a, \"right\");\n\n // If node is unbalanced and weighted right...\n } else if (getBalance(a) < -1) {\n doubleRotateLeft(a, temp);\n // After rotation, branch is weighted left, therefore left branch should be rebalanced.\n rebalanceBranch(a, \"left\");\n }\n }\n }", "private WAVLNode treePosForDel (WAVLTree tree,int key) {\n\t\t WAVLNode x=tree.root;\r\n\t\t WAVLNode y=EXT_NODE;\r\n\t\t if(x==EXT_NODE) { // if the tree happens to be empty return a node with a different key then expected\r\n\t\t\t return new WAVLNode(key-1,\"i\");\r\n\t\t }\r\n\t\t while (x!=EXT_NODE) {\r\n\t\t\t y=x;\r\n\t\t\t y.sizen--;\r\n\t\t\t if (key==x.key){\r\n\t\t\t\t return x;\r\n\t\t\t }\r\n\t\t\t else if (key<x.key) {\r\n\t\t\t\t x=x.left;\r\n\t\t\t }\r\n\t\t\t else {\r\n\t\t\t\t x=x.right;\r\n\t\t\t }\r\n\t\t }\r\n\t\t if(y.key!=key) { // if the node is not found, the method call refixfordel to fix the sizes\r\n\t\t\t reFixForDel(y);\r\n\t\t }\r\n\t\t return y;\r\n\t }", "void leftRotate(Node<K, V> x) {\n\t\tassert IsNotNil(x.getRight());\n\t\tNode<K, V> y = x.getRight();\n\n\t\t// B in position\n\t\tx.setRight(y.getLeft());\n\n\t\t// Y to root\n\t\tif (x == root) {\n\t\t\troot = y;\n\t\t} else if (x.isLeftChild()) {\n\t\t\tx.getParent().setLeft(y);\n\t\t} else if (x.isRightChild()) {\n\t\t\tx.getParent().setRight(y);\n\t\t}\n\n\t\t// x in position\n\t\ty.setLeft(x);\n\t}", "public AVLTree() {\r\n\r\n\r\n this.root = new AVLTreeNode(9);\r\n Delete(9);\r\n }" ]
[ "0.68408227", "0.679537", "0.6735798", "0.67263937", "0.661906", "0.65833336", "0.6499564", "0.64921385", "0.64647055", "0.645796", "0.6438803", "0.6274945", "0.62339723", "0.6233728", "0.6232243", "0.6206748", "0.62034017", "0.6200702", "0.6126279", "0.61110216", "0.60778564", "0.60627717", "0.6035138", "0.60085666", "0.5985341", "0.59754115", "0.5971264", "0.59466463", "0.5943032", "0.59348714", "0.5909217", "0.59061825", "0.59044003", "0.5903172", "0.5893912", "0.5890096", "0.58608776", "0.58274984", "0.5823718", "0.58061206", "0.5800423", "0.5792447", "0.5791774", "0.57473594", "0.5746119", "0.57402396", "0.57349014", "0.57281554", "0.57227415", "0.57224524", "0.57160705", "0.57098466", "0.5703715", "0.5696059", "0.56890863", "0.5676964", "0.56536514", "0.56421375", "0.5640219", "0.56320524", "0.5616185", "0.5613807", "0.5612205", "0.5588054", "0.55848736", "0.55678505", "0.55536777", "0.5524715", "0.5521782", "0.55187947", "0.5507595", "0.54762334", "0.5474221", "0.54716617", "0.546739", "0.5466325", "0.5461068", "0.54584825", "0.5454614", "0.5449527", "0.54466146", "0.54396576", "0.54332966", "0.54217386", "0.54180187", "0.54078335", "0.540779", "0.5382425", "0.53816456", "0.5380227", "0.5379293", "0.53755814", "0.5374962", "0.5369015", "0.5364825", "0.5356405", "0.53547466", "0.535333", "0.5352244", "0.53355867", "0.5335142" ]
0.0
-1
ensure working directory exists
@PostConstruct private void init() throws MalformedURLException { workingDirectoryPath = Paths.get(workDirectory).toAbsolutePath(); if (Files.exists(workingDirectoryPath)) { if (!Files.isDirectory(workingDirectoryPath)) { throw new FhFormException(workingDirectoryPath + " is not a directory"); } } else { try { Files.createDirectories(workingDirectoryPath); } catch (IOException e) { throw new FhFormException("Cannot create " + workingDirectoryPath, e); } } // create classloader URL url = workingDirectoryPath.toUri().toURL(); workingDirectoryClassloader = FhCL.classLoader; addURLToClassLoader(url, workingDirectoryClassloader); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupWorkingDir(Execute exe) {\r\n if (dir == null) {\r\n dir = getProject().getBaseDir();\r\n }\r\n else if (!dir.exists() || !dir.isDirectory()) {\r\n throw new BuildException(dir.getAbsolutePath() + \" is not a valid directory\", getLocation());\r\n }\r\n exe.setWorkingDirectory(dir);\r\n }", "public static void insurePathToFileExists(File f) {\r\n File p = f.getParentFile();\r\n //System.out.println(\"uu.iPE: parent of \"+filename+\" is \"+parent);\r\n\r\n if (!p.exists()) {\r\n // parent doesn't exist, create it:\r\n if (!p.mkdirs()) {\r\n throw new IllegalStateException(\"Unable to make directory \" + p.getPath());\r\n } // endif -- second mkdir unsuc\r\n } // endif -- parent exists\r\n }", "private void checkIfLocationExists() {\n try {\n File file = new File(saveLocation);\n if(!file.exists()) file.mkdirs();\n } catch (Exception e) {\n log.error(e.getMessage(), e);\n }\n }", "private boolean initHome(File file) {\r\n\t\ttry {\r\n\t\t\tFileUtils.forceMkdir(file);\r\n\t\t\treturn true;\r\n\t\t} catch (Exception ex) {\r\n\t\t\tlogger.error(\"Failed to initialize home directory '\" + file + \"'\", ex);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "private File createWorkingDir( final String path )\n {\n File workDir = new File( path );\n workDir.mkdirs();\n return workDir;\n }", "public void createTestDir() {\n\t\tworkDir = new File(System.getProperty(\"test.dir\", \"target\"));\n\t}", "private void checkDirectory(File directory) throws MojoExecutionException\n {\n if (!directory.exists())\n {\n if (!directory.mkdirs())\n {\n throw new MojoExecutionException(\n String.format(\"Failed to create directory '%s'\", directory));\n }\n }\n }", "private FilePath ensureWorkspaceExists(WorkflowJob job) throws Exception {\n FilePath path = remote.getWorkspaceFor(job);\n path.mkdirs();\n return path;\n }", "private static void checkHistoryDirectory()\n throws FileNotFoundException {\n Path path = Paths.get(HISTORY_FILE_PATH); //creates Path instance\n try {\n Files.createDirectories(Paths.get(DIRECTORY));\n Files.createFile(path); //creates file at specified location\n } catch (IOException e) {\n readHistoryData();\n }\n }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "public IStatus prepareRuntimeDirectory(IPath baseDir);", "private File createEmptyDirectory() throws IOException {\n File emptyDirectory = findNonExistentDirectory();\n if (emptyDirectory.mkdir() == false) {\n throw new IOException(\"Can't create \" + emptyDirectory);\n }\n\n return emptyDirectory;\n }", "public boolean setupFileSystem() {\n\t\tboolean success = false;\n\t\tthis.root = Paths.get(\"\").toAbsolutePath();\n\t\tthis.showNamedMessage(\"Client root path set to: \" + this.root.toString());\n\t\t\n\t\tthis.fileStorage = root.resolve(fileStorageDirName);\n\t\tthis.showNamedMessage(\"File storage set to: \" + this.fileStorage.toString());\n\n\t\ttry {\n\t\t\tFiles.createDirectory(fileStorage);\n\t\t\tthis.showNamedMessage(\"File storage directory did not exist:\"\n\t\t\t\t\t+ \" created \" + fileStorageDirName + \" in client root\"); \n\t\t} catch (java.nio.file.FileAlreadyExistsException eExist) {\n\t\t\tthis.showNamedMessage(\"File storage directory already exist:\"\n\t\t\t\t\t+ \" not doing anything with \" + fileStorageDirName + \" in client root\");\n\t\t} catch (IOException e) {\n\t\t\tthis.showNamedError(\"Failed to create file storage:\"\n\t\t\t\t\t+ e.getLocalizedMessage());\n\t\t}\n\n\t\tsuccess = true;\n\t\treturn success;\n\t}", "private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }", "private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}", "@Test\n public void testFileInDirectoryFileExists() {\n\n File file1 = new File(\"file1\");\n parent.storeFile(file1);\n assertTrue(parent.fileInDirectory(\"file1\"));\n }", "private boolean verifyAsinstalldir(File home) throws ClassNotFoundException{\n if (home!= null && home.isDirectory()) {\n if ( new File(home, \"config\").isDirectory() ) {\n return true;\n } \n }\n throw new ClassNotFoundException(\"ClassCouldNotBeFound\");\n }", "@BeforeClass\n public static void createOutputDir() throws OfficeException {\n\n // Ensure we start with a fresh output directory\n final File outputDir = new File(OUTPUT_DIR);\n FileUtils.deleteQuietly(outputDir);\n outputDir.mkdirs();\n }", "private Step createLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_CREATE_LOCAL_WORK_DIR)\n .tasklet(createLocalWorkingDir)\n .listener(new ExecutionContextPromotionListener() {\n\n @Override\n public ExitStatus afterStep(StepExecution stepExecution) {\n ExecutionContext stepContext = stepExecution.getExecutionContext();\n ExecutionContext jobContext = stepExecution.getJobExecution().getExecutionContext();\n\n // Share local working directory with other tasks\n String stepContextKey = STEP_CREATE_LOCAL_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n CreateDirectoryTask.EnumOutParameter.NEW_DIRECTORY.getValue();\n String localWorkingDir = (String) stepContext.get(stepContextKey);\n\n // Configure export meter serial task\n String jobContextKey = STEP_CREATE_SCENARIO_METER_FILE +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure export meter data task\n jobContextKey = STEP_EXPORT_METER_DATA +\n Constants.PARAMETER_NAME_DELIMITER +\n ExportMeterDataToFileTask.EnumInParameter.WORKING_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure copy HDFS files task\n jobContextKey = STEP_COPY_REMOTE_FILES +\n Constants.PARAMETER_NAME_DELIMITER +\n CopyFileTask.EnumInParameter.SOURCE_PATH.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n // Configure delete local files task\n jobContextKey = STEP_DELETE_LOCAL_WORK_DIR +\n Constants.PARAMETER_NAME_DELIMITER +\n DeleteDirectoryTask.EnumInParameter.INPUT_DIRECTORY.getValue();\n jobContext.put(jobContextKey, localWorkingDir);\n\n return null;\n }\n\n })\n .build();\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 }}", "private boolean checkBackupDir() {\n if (!dbBackupDir.exists()) {\n return dbBackupDir.mkdir();\n }\n return true;\n }", "@Test\n public void testStorageLocationMkdirs() throws Exception {\n MemoryBackendCheckpointStorageAccess storage =\n new MemoryBackendCheckpointStorageAccess(\n new JobID(), randomTempPath(), null, DEFAULT_MAX_STATE_SIZE);\n\n File baseDir = new File(storage.getCheckpointsDirectory().getPath());\n assertFalse(baseDir.exists());\n\n // mkdirs only be called when initializeLocationForCheckpoint\n storage.initializeLocationForCheckpoint(177L);\n assertTrue(baseDir.exists());\n }", "@Test\n\tpublic void Directories() {\n\t\t\n\t\tString dirs = \"test/one/two/\";\n\t\tFile d = new File(dirs);\n\t\td.mkdirs();\n\t\tAssert.assertTrue(d.exists());\n\t\t\n\t\t//Cleanup\n\t\tif(d.delete()) {\n\t\t\td = new File(\"test/one\");\n\t\t\tif(d.delete()) {\n\t\t\t\td = new File(\"test\");\n\t\t\t\td.delete();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@BeforeEach\n public void setUp() {\n assertTrue(Files.isDirectory(this.temporaryDirectory));\n }", "public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }", "private File getHomeDirectory() {\n String brunelDir = System.getProperty(\"brunel.home\");\n File home = brunelDir != null ? new File(brunelDir) :\n new File(System.getProperty(\"user.home\"), \"brunel\");\n return ensureWritable(home);\n }", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "private void checkCreateParentDirs(Path file) throws IOException {\n if (!Files.exists(file.getParent())) {\n Files.createDirectories(file.getParent());\n }\n }", "@BeforeEach\n void before() {\n if (Files.notExists(path)) path.toFile().mkdirs();\n }", "private void checkRootFolder() throws TBException {\r\n\t\tFile f = new File(rootTBFolder);\r\n\t\tif(!f.exists()) {\r\n\t\t\tf.mkdir();\r\n\t\t\tf = new File(AppUtil.createFilePath(new String[]{rootTBFolder, COMPUTED_FILES_FOLDER_NM}));\r\n\t\t\tf.mkdir();\r\n\t\t}\t\r\n\t}", "public boolean make() {\n File file = new File(parent);\n if(!file.exists())\n return file.mkdirs();\n return true;\n }", "private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void setWorkDiretory() {\n\t\tthis.workDiretory = System.getProperty(\"user.dir\");\n\t}", "public void setUp() {\n new File(TEST_FILE).getParentFile().mkdirs();\n }", "private static boolean checkDirectory() {\n File baseDir = new File(Environment.getExternalStorageDirectory(), \"Andevindo\");\n mImageDir = new File(baseDir.getPath() + File.separator + \"Images\");\n mVideoDir = new File(baseDir.getPath() + File.separator + \"Videos\");\n mMiscDir = new File(baseDir.getPath() + File.separator + \"Misc\");\n if (!baseDir.exists()) {\n if (!baseDir.mkdirs()) {\n\n return false;\n } else {\n\n\n if (!mImageDir.exists()) {\n if (!mImageDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mVideoDir.exists()) {\n if (!mVideoDir.mkdirs()) {\n\n return false;\n }\n }\n\n\n if (!mMiscDir.exists()) {\n if (!mMiscDir.mkdirs()) {\n\n return false;\n }\n }\n\n }\n }\n return true;\n }", "private boolean createGitletDirectory(){\n File dir = new File(Utils.GITLET_DIR);\n\n if(!dir.exists()){\n dir.mkdir();\n\n } else {\n System.out.println(\"A gitlet version-control system already exists in the current directory.\");\n return false;\n }\n\n File commitDir = Utils.join(Utils.GITLET_DIR, Utils.COMMIT_DIR);\n\n if(!commitDir.exists()){\n commitDir.mkdir();\n }\n\n File blobDir = Utils.join(Utils.GITLET_DIR, Utils.BLOBS_DIR);\n\n if (!blobDir.exists()){\n blobDir.mkdir();\n }\n return true;\n }", "abstract protected void createWorkEnv(File outputDir)\n throws TaskRunException;", "@Override\n protected void createRootDir() {\n }", "@BeforeClass(enabled = true)\n\tpublic void oneTimeSetup() {\n\t\ttry {\n\t\t\tFile resultsDirectory = new File(AppConstants.TEST_RESULTS_DIRECTORY);\n\t\t\tif (!resultsDirectory.isDirectory()) {\n\t\t\t\tFileUtils.forceMkdir(resultsDirectory);\n\t\t\t} else {\n\t\t\t\tFileUtils.cleanDirectory(resultsDirectory);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tLOG.debug(\"Error cleaning the results directory\");\n\t\t}\n\t}", "public void setWorking(File working) {\r\n if (working.exists() && !working.isDirectory()) {\r\n throw new BuildException(\"if working folder exists, it must be a directory\");\r\n }\r\n this._working = working;\r\n }", "protected static void cleanUpWorkingDir() {\n final Path testControllerPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE);\n try {\n Files.deleteIfExists(testControllerPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerPath, e);\n }\n\n final Path testControllerBakPath =\n Paths.get(SystemPersistence.manager.getConfigurationPath().toString(), TEST_CONTROLLER_FILE_BAK);\n try {\n Files.deleteIfExists(testControllerBakPath);\n } catch (final Exception e) {\n logger.info(\"Problem cleaning {}\", testControllerBakPath, e);\n }\n }", "public File getHomeDir() {\n\t\tFile f = new File(System.getProperty(\"user.home\"),MuViChatConstants.muviHomeDir);\t\t\n if (!f.isDirectory()) {\n\t f.mkdir();\t \n\t }\n return f;\n\t}", "public static boolean checkFileDirectory() {\n\t\ttry {\n\t\t\tfinal File dir = new File(FINAL_SAVE_MEDIA_PATH);\n\t\t\tif (!dir.exists()) {\n\t\t\t\tfinal boolean isMkdirs = dir.mkdirs();\n\t\t\t\treturn isMkdirs;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\t}", "protected void ensureExistence() {\n if (folder.exists()) return;\n\n Base.showWarning(_(\"Sketch Disappeared\"),\n _(\"The sketch folder has disappeared.\\n \" +\n \"Will attempt to re-save in the same location,\\n\" +\n \"but anything besides the code will be lost.\"), null);\n try {\n folder.mkdirs();\n modified = true;\n\n for (int i = 0; i < codeCount; i++) {\n code[i].save(); // this will force a save\n }\n calcModified();\n\n } catch (Exception e) {\n Base.showWarning(_(\"Could not re-save sketch\"),\n _(\"Could not properly re-save the sketch. \" +\n \"You may be in trouble at this point,\\n\" +\n \"and it might be time to copy and paste \" +\n \"your code to another text editor.\"), e);\n }\n }", "private Step deleteLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_LOCAL_WORK_DIR)\n .tasklet(deleteLocalWorkingDir)\n .build();\n }", "@Override\n public MethodOutcome mkdirsRootOutcome() {\n return new MethodOutcome(MethodOutcome.Type.RETURNS_TRUE);\n }", "private boolean directoryExists() {\n if (Meta.getInstance().containDirectory(dirName))\n return true;\n else\n return false;\n }", "public static boolean createDBDir() {\n return (new File(path)).mkdirs();\n }", "@Test\r\n\tpublic void testRelativeDir() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users/skeshavaa\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users/skeshavaa\".split(\" \"), \"cd users/skeshavaa\", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}", "private void markOutputDirSuccessful(JobContext context) throws IOException {\r\n JobConf conf = context.getJobConf();\r\n // get the o/p path\r\n Path outputPath = FileOutputFormat.getOutputPath(conf);\r\n if (outputPath != null) {\r\n // get the filesys\r\n FileSystem fileSys = outputPath.getFileSystem(conf);\r\n // create a file in the output folder to mark the job completion\r\n Path filePath = new Path(outputPath, SUCCEEDED_FILE_NAME);\r\n fileSys.create(filePath).close();\r\n }\r\n }", "Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }", "private void checkDirectory() {\n\t\tif( getDirectory()==null ) {\n\t\t\tthrow new LuceneIndexAccessException(\"The directory is not specified\");\n\t\t}\n\t}", "public void createSubDirCameraTaken() {\n\t\tFile f = new File(getPFCameraTakenPath());\n\t\tf.mkdirs();\n\t}", "private void check() {\n Path pathroot = getPath();\n // check the path is file or directory\n checkFileOrDirectory(pathroot);\n }", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "public static String getWorkingDirectory(Context context) {\n String res;\n if (isSDCardMounted()) {\n String directory = \"For Happy\";\n res = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/\" + directory;\n } else {\n res = context.getFilesDir().getAbsolutePath() + \"/\";\n }\n if (!res.endsWith(\"/\")) {\n res += \"/\";\n }\n File f = new File(res);\n if (!f.exists()) {\n boolean success = f.mkdirs();\n if (!success) {\n LogUtil.e(\"FileUtils create file failed\");\n }\n }\n return res;\n }", "@Override\n\tpublic String getWorkingDir() {\n\t\treturn model.getWorkingDir();\n\t}", "public Object run() {\n System.out.println(\"\\nYour java.home property: \"\n +System.getProperty(\"java.home\"));\n\n System.out.println(\"\\nYour user.home property: \"\n +System.getProperty(\"user.home\"));\n\n File f = new File(\"foo.txt\");\n System.out.print(\"\\nfoo.txt does \");\n if (!f.exists())\n System.out.print(\"not \");\n System.out.println(\"exist in the current working directory.\");\n return null;\n }", "private static void checkFilePath(String filePath) {\n File file = new File(filePath);\n try {\n if (!file.getParentFile().exists()) {\n file.getParentFile().mkdirs();\n }\n if (!file.exists()) {\n file.createNewFile();\n }\n file.createNewFile();\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n }", "public Boolean isExist() {\n\t\tif(pfDir.exists())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "@Before\n\tpublic void setUp() {\n\t\tresultsDir.mkdir();\n\t}", "@BeforeClass\n public static void setup() {\n logger.info(\"setup: creating a temporary directory\");\n\n // create a directory for temporary files\n directory = new File(UUID.randomUUID().toString());\n directory.mkdir();\n }", "public static boolean createDirIfNotExists(SourceFile sourceFile) throws IOException {\n return createDirIfNotExists(sourceFile.getPath(), sourceFile.getSourceType());\n }", "@Override\n protected void setUp() throws Exception {\n baseDirectory = new File(TEST_DIR_NAME);\n assertTrue(ConnectorTestUtils.deleteAllFiles(baseDirectory));\n // Then recreate it empty\n assertTrue(baseDirectory.mkdirs());\n }", "public boolean checkSetup(){\n return checkSetup(folderName);\n }", "private void createEssentialDirs() throws TNotFoundEx{\n\t\tFileUtil fT = new FileUtil();\n\t\tfT.createDirOnDevice(TicklerVars.sdCardPath);\n\t\tif (!fT.isExistOnDevice(TicklerVars.sdCardPath))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.sdCardPath+\". Check your configurations in Tickler.conf file\");\n\t\tfT.createDirOnHost(TicklerVars.appTickDir);\n\t\tif (!fT.isExist(TicklerVars.appTickDir))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.appTickDir+\". Check your configurations in Tickler.conf file\");\n\t\t\n\t}", "protected void validateTaskAttemptWorkingDirectory(\n ManifestCommitter committer,\n TaskAttemptContext context) throws IOException {\n }", "private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }", "protected void validateMcaDeployedToWorkingDir() {\n\t\tassertTrue(unitTestDir.exists());\n\t\tassertTrue(new File(unitTestDir, \"composition.groovy\").exists());\n\t\tassertTrue(new File(unitTestDir, \"MCA-INF/components/components.jar\").exists());\n\t\tassertTrue(new File(unitTestDir, \"MCA-INF/promoted/promoted.jar\").exists());\n\t\tassertTrue(new File(unitTestDir, \"MCA-INF/hidden/hidden.jar\").exists());\n\t}", "public boolean isSetStaticWorkingDir() {\n return this.staticWorkingDir != null;\n }", "public void makeRoot() throws FileSystemNotWritableException {\r\n\tif (isWritable()) {\r\n\t\tsetModificationTime();\r\n\t\tsetDir(null);\r\n\t}\r\n\telse {\r\n\t\tthrow new FileSystemNotWritableException(this);\r\n\t}\r\n}", "public void checkFolder() {\n String mPath = Environment.getExternalStorageDirectory().getAbsolutePath() + \"/ExoTest/\";\n mDir = new File(mPath);\n boolean isDirectoryCreated = mDir.exists();\n if (!isDirectoryCreated) {\n isDirectoryCreated = mDir.mkdir();\n }\n if (isDirectoryCreated) {\n // do something\\\n Log.d(\"Folder\", \"Already Created\");\n }\n }", "@Test\n public void testMakeFileFileExists() {\n FileTree myTree = new FileTree();\n String file = \"file1\";\n boolean result = false;\n try {\n myTree.makeFile(file);\n myTree.makeFile(file);\n } catch (NotDirectoryException | AlreadyExistException e) {\n result = true;\n }\n assertTrue(result);\n\n }", "@Test\n public void testFileInDirectoryFileDoesNotExists() {\n\n assertFalse(parent.fileInDirectory(\"file1\"));\n }", "private static void prepareLoggingSystemEnviroment() {\n\t\t// property configuration relies on this parameter\n\t\tSystem.setProperty(\"log.directory\", getLogFolder());\n\t\t//create the log directory if not yet existing:\n\t\t//removed code as log4j is now capable of doing that automatically\n\t}", "boolean hasPersistDirectory();", "public IStatus prepareDeployDirectory(IPath deployPath);", "File getWorkingDirectory();", "public static void initializeOutputFolder() {\n\t\tString default_folder = PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t\t\n\t\t// The file has to exist and is a directory (Not just a child file)\n\t\tString fullQualifiedFolderName = getFullyQualifiedFileName(default_folder);\n\t\tFile defaultDir = new File(fullQualifiedFolderName);\n\t\tif (!checkFolder(fullQualifiedFolderName)) {\n\t\t\tboolean dirCreated = defaultDir.mkdir();\n\t\t\tif(dirCreated == false) {\n\t\t\t\tlog.error(\"Could not create generation folder\");\n\t\t\t}\n\t\t} else\n\t\t\tdeleteFolderRecursively(defaultDir);\n\t}", "private void makeFolders( final File directoryToCreate )\n throws MojoExecutionException\n {\n this.logger.debug( \"Creating folder '\" + directoryToCreate.getAbsolutePath() + \"' ...\" );\n if ( directoryToCreate.mkdirs() == false )\n {\n throw new MojoExecutionException( \"Could not create folder '\" + directoryToCreate.getAbsolutePath() + \"'!\" );\n }\n }", "@Test\r\n public void setStateWhenFileCannotExistTest() {\r\n try {\r\n deleteFile(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename());\r\n // make a directory by the same name as the properties file. This will result in a FNFException when trying to open it as a file\r\n (new File(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename())).mkdirs();\r\n\r\n // Perform the operation\r\n runtimeConfigDAOPropertiesFile.setState(new State(State.DISABLED));\r\n Assert.fail(\"The properties file should already exist as a directory and so an exceptions should have been thrown.\");\r\n } catch (CannotSetStateException e) {\r\n // Passed the test\r\n }\r\n (new File(runtimeConfigDAOPropertiesFile.getRuntimePropertiesFilename())).delete();\r\n }", "boolean getWorkfileExists();", "private void checkValidity() throws FileSystemException {\n\t\tif ( invalidated || cachedCurrentDirectory == null ) {\n\t\t\t\n\t\t\tfillCache();\n\t\t\tinvalidated = false;\n\t\t} \n\t\t\n\t}", "public boolean checkFolderExistsOrMake(File folder) {\n\t\ttry {\n\t\t\tif(folder.exists()) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tfolder.mkdir();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean mkdirs()\n\t{\n\t\treturn file.mkdirs() ;\n\t}", "@Test\n\tpublic void validFileDirectoryTest() {\n\t\t// Test valid file directory\n\t\tFile f = new File(workingDir);\n\t\tassertTrue(Helper.isValidDirectory(f));\n\n\t\t// Test valid file directory 2\n\t\tworkDir = new File(workingDir);\n\t\texpected = workDir.getAbsolutePath();\n\t\tactual = Helper.isValidDirectory(workDir, \"misc\");\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\n\t\t// Test valid file directory 3\n\t\tworkDir = new File(workingDir);\n\t\texpected = workDir.getAbsolutePath() + pathSep + dirName; // Bugs: OS\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// compatible \\\\\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// changed to /\n\t\tactual = Helper.isValidDirectory(workDir, dirName);\n\t\tassertEquals(expected, actual.getAbsolutePath());\n\t}", "public static boolean checkAppFileDirectory(Context context) {\n\t\ttry {\n\t\t\tfinal String imageDir = getAppFilesDirByData(context);\n\t\t\tfinal File imageFileDir = new File(imageDir);\n\t\t\tif (!imageFileDir.exists()) {\n\t\t\t\tfinal boolean isMkdirs = imageFileDir.mkdirs();\n\t\t\t\treturn isMkdirs;\n\t\t\t}\n\t\t\treturn true;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn false;\n\n\t}", "private void createDirectoryIfNeeded(String directoryName)\n\t{\n\t\tFile theDir = new File(directoryName);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!theDir.exists())\n\t\t{\n\t\t\t//System.out.println(\"creating directory: \" + directoryName);\n\t\t\ttheDir.mkdir();\n\t\t}\n\t}", "@Test\n public void testCdDoesNotExsist() {\n FileTree myTree = new FileTree();\n boolean result = false;\n try{\n myTree.cd(\"/test\");\n }\n catch (NotDirectoryException e){\n result = true;\n }\n assertTrue(result);\n }", "public static boolean createRootdir(String parentPath, String name) {\n File dir = new File(parentPath + File.separator + name);\n if (dir.exists())\n return false;\n\n try {\n if (!readReadWriteFile())\n RootTools.remount(parentPath, \"rw\");\n\n execute(\"mkdir \" + getCommandLineString(dir.getAbsolutePath()));\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return false;\n }", "@Test\n public void testTempDirectory() {\n assertTrue(getTempDirPath().indexOf(File.separator\n\t+ \"TestSpringLockssTestCase\") > -1);\n assertTrue(getTempDirPath().endsWith(\".tmp\"));\n }", "public static void checkFolder(String dir){\n java.nio.file.Path checkFolderPath = java.nio.file.Paths.get(dir+\"/data\");\n boolean folderExists = java.nio.file.Files.exists(checkFolderPath);\n //folder not exists, create one\n if(!folderExists) {\n new File(dir+\"/data\").mkdirs();\n }\n }", "private void createScratchDirectory(Path rootpath) {\n\t\tprintMsg(\"running createScratchDirectory() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\t\n\t\tif (Files.isDirectory(rootpath)) {\n\t\t\tprintMsg(\"The \" + theRootPath + \" exists...\");\n\t\t} else {\n\t\t\tprintMsg(\"Creating \" + theRootPath);\n\t\t\ttry {\n\t\t\t\tFiles.createDirectories(rootpath);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private void checkSyncDirExists() {\n syncDirString = IVLEOfflineStorage.GetPropertyValue(Constants.SyncDirectory);\n if(syncDirString != null || syncDirString != \"\") {\n jTextField3.setText(syncDirString);\n } else {\n jTextField3.setText(\"Please Select a Sync Directory.\");\n }\n }", "@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}", "public void createDir(File file){\n\t\tif (!file.exists()) {\n\t\t\tif (file.mkdir()) {\n\t\t\t\tlogger.debug(\"Directory is created!\");\n\t\t\t} else {\n\t\t\t\tlogger.debug(\"Failed to create directory!\");\n\t\t\t}\n\t\t}\n\t}", "public boolean createDir(String userName) {\n\t\tString path = userName;\n\n\t\tboolean success = true;\n\t\ttry{\n\t\t\tsuccess = (new File(path)).mkdirs();\n\t\t\tSystem.out.println(success);\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t\treturn success;\n\n\t}", "@Test\r\n\tpublic void testRelativePath() {\r\n\t\t// Expected return from Cd\r\n\t\texpectedCd = null;\r\n\t\t// Expected current working directory\r\n\t\texpectedPath = \"/users\";\r\n\t\t// Actual return from Cd\r\n\t\tactualCd = cd.run(fs, \"users\".split(\" \"), \"cd users \", false);\r\n\t\t// Returns the current working directory\r\n\t\tactualPath = fs.getCurrentPath();\r\n\t\t// Checks if the values are equal or not\r\n\t\tassertTrue(actualCd == expectedCd && actualPath.equals(expectedPath));\r\n\t}", "@Test(timeout = SWIFT_TEST_TIMEOUT)\n public void testRenameDirToSelf() throws Throwable {\n assumeRenameSupported();\n Path parentdir = path(\"/test/parentdir\");\n fs.mkdirs(parentdir);\n Path child = new Path(parentdir, \"child\");\n createFile(child);\n\n rename(parentdir, parentdir, false, true, true);\n //verify the child is still there\n assertIsFile(child);\n }" ]
[ "0.6487748", "0.63067645", "0.6261291", "0.62500685", "0.61615556", "0.61127734", "0.6075573", "0.60634977", "0.5945581", "0.5914948", "0.5900998", "0.58306056", "0.5820726", "0.5820673", "0.5813047", "0.5806937", "0.5760603", "0.5747085", "0.5724879", "0.57101566", "0.56881034", "0.56769735", "0.56685823", "0.56662345", "0.5656546", "0.56376916", "0.5629095", "0.56159467", "0.5604586", "0.55987895", "0.558258", "0.55754757", "0.5571408", "0.5553896", "0.55522424", "0.5539752", "0.5529919", "0.5518902", "0.55094683", "0.55071694", "0.55019265", "0.5492202", "0.5465952", "0.54523396", "0.54254425", "0.5418205", "0.5413005", "0.5403531", "0.5396934", "0.5382801", "0.5373475", "0.53704983", "0.5366359", "0.53446394", "0.53409046", "0.5334277", "0.5332121", "0.53302675", "0.53212667", "0.53116935", "0.53018636", "0.5291104", "0.5287766", "0.52870786", "0.5281355", "0.5271564", "0.52708334", "0.5265212", "0.5257567", "0.52535313", "0.52498543", "0.5249755", "0.52456886", "0.52181613", "0.5209651", "0.5207676", "0.5207174", "0.52008456", "0.517527", "0.5175262", "0.5175086", "0.5173179", "0.51680285", "0.51669145", "0.5165605", "0.5163463", "0.5159925", "0.515753", "0.51545084", "0.51438904", "0.51403904", "0.5136104", "0.51360315", "0.5134409", "0.5128059", "0.5121184", "0.51207805", "0.5111839", "0.51105136", "0.5097775", "0.5083905" ]
0.0
-1
prepare package directory if not exists
public Path createDynamicFile(Path otherBasePath, String generatedCode, String newClassPackage, String newClassName, String extension) { Path packagePath; try { packagePath = otherBasePath.resolve(newClassPackage.replace(".", "/")); Files.createDirectories(packagePath); } catch (IOException e) { throw new RuntimeException(String.format("Cannot create %s package directory under %s", newClassPackage, otherBasePath.toString()), e); } // create java file Path javaFilePath = packagePath.resolve(newClassName + extension); String javaFilePathString = javaFilePath.toAbsolutePath().toString(); try { Files.write(javaFilePath, generatedCode.getBytes(Charset.forName("UTF-8"))); return javaFilePath; } catch (IOException e) { throw new RuntimeException(String.format("Cannot create form java file %s", javaFilePathString), e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public IStatus prepareRuntimeDirectory(IPath baseDir);", "public IStatus prepareDeployDirectory(IPath deployPath);", "@Override\n protected void createRootDir() {\n }", "protected abstract void generatePackageFiles(ClassTree classtree) throws Exception;", "private void makeDirectory() {\n String userHome = System.getProperty(\"user.home\");\n wnwData = new File(userHome + \"/.wnwdata\");\n wnwData.mkdirs();\n\n makeCampaignChallengesFile();\n makeCustomChallengesFile();\n makeProgressFile();\n makeSettingsFile();\n }", "public void createDirectory() {\r\n\t\tpath = env.getProperty(\"resources\") + \"/\" + Year.now().getValue() + \"/\";\r\n\t\tFile file = new File(path);\r\n\t\tif (!file.exists())\r\n\t\t\tfile.mkdirs();\r\n\t}", "public int mkdirs(String callingPkg, String path) throws RemoteException;", "private void createEssentialDirs() throws TNotFoundEx{\n\t\tFileUtil fT = new FileUtil();\n\t\tfT.createDirOnDevice(TicklerVars.sdCardPath);\n\t\tif (!fT.isExistOnDevice(TicklerVars.sdCardPath))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.sdCardPath+\". Check your configurations in Tickler.conf file\");\n\t\tfT.createDirOnHost(TicklerVars.appTickDir);\n\t\tif (!fT.isExist(TicklerVars.appTickDir))\n\t\t\tthrow new TNotFoundEx(\"Cannot create Tickler directory \"+TicklerVars.appTickDir+\". Check your configurations in Tickler.conf file\");\n\t\t\n\t}", "Package createPackage();", "private void setupWorkingDir(Execute exe) {\r\n if (dir == null) {\r\n dir = getProject().getBaseDir();\r\n }\r\n else if (!dir.exists() || !dir.isDirectory()) {\r\n throw new BuildException(dir.getAbsolutePath() + \" is not a valid directory\", getLocation());\r\n }\r\n exe.setWorkingDirectory(dir);\r\n }", "public void createTestDir() {\n\t\tworkDir = new File(System.getProperty(\"test.dir\", \"target\"));\n\t}", "protected File makeUnpackDir() {\n\t\tthrow new UnsupportedOperationException();\n\t}", "File prepareTempSourceDirectory() throws FileNotFoundException, IOException{\n\t\tFile tempfile = null;\n\t\tFile tempdir = null;\n\t\ttempfile = File.createTempFile(\"temp\", \"Delete\");\n\t\ttempdir = tempfile.getParentFile();\n\t\ttempfile.delete();\n\t\ttempdir = new File(tempdir, \"SAFS_UPDATE\");\n\t\ttempdir.mkdir();\n\n\t\tFile[] files = tempdir.listFiles();\n\t\tif(files != null && files.length > 0){\n\t\t\tfor(File file:files){\n\t\t\t\tif(file.isDirectory()) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tFileUtilities.deleteDirectoryRecursively(file.getAbsolutePath(), false);\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\t// java.lang.NoClassDefFoundError\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfile.delete();\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(tempdir==null || !tempdir.isDirectory()) throw new IOException(\"Cannot deduce a root source directory for HTTP extraction.\");\n\t\treturn tempdir;\n\t}", "private void setUpDirectories() {\r\n\t\tFile creation = new File(\"Creations\");\r\n\t\tFile audio = new File(\"Audio\");\r\n\t\tFile quiz = new File(\"Quiz\");\r\n\t\tFile temp = new File(\"Temp\");\r\n\r\n\t\tif (!creation.isDirectory()) {\r\n\t\t\tcreation.mkdir();\r\n\t\t}\r\n\t\tif (!audio.isDirectory()) {\r\n\t\t\taudio.mkdir();\r\n\t\t}\r\n\t\tif (!quiz.isDirectory()) {\r\n\t\t\tquiz.mkdir();\r\n\t\t}\r\n\t\tif (!temp.isDirectory()) {\r\n\t\t\ttemp.mkdir();\r\n\t\t}\r\n\r\n\t}", "@Override\r\n public void pack() {\r\n super.pack();\r\n JkFileTree.of(this.classDir()).exclude(\"**/*.jar\").zip().to(packer().jarFile(\"lean\"));\r\n distrib();\r\n }", "File prepareEnvironment();", "public static boolean createDirIfNotExists(SourceFile sourceFile) throws IOException {\n return createDirIfNotExists(sourceFile.getPath(), sourceFile.getSourceType());\n }", "private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}", "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "protected static void createDirectory(MasterProcedureEnv env, NamespaceDescriptor nsDescriptor)\n throws IOException {\n createDirectory(env.getMasterServices().getMasterFileSystem(), nsDescriptor);\n }", "private void createScratchDirectory(Path rootpath) {\n\t\tprintMsg(\"running createScratchDirectory() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\t\n\t\tif (Files.isDirectory(rootpath)) {\n\t\t\tprintMsg(\"The \" + theRootPath + \" exists...\");\n\t\t} else {\n\t\t\tprintMsg(\"Creating \" + theRootPath);\n\t\t\ttry {\n\t\t\t\tFiles.createDirectories(rootpath);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private File createDirectoryIfNotExisting( String dirName ) throws HarvesterIOException\n {\n \tFile path = FileHandler.getFile( dirName );\n \tif ( !path.exists() )\n \t{\n \t log.info( String.format( \"Creating directory: %s\", dirName ) );\n \t // create path:\n \t if ( !path.mkdir() )\n \t {\n \t\tString errMsg = String.format( \"Could not create necessary directory: %s\", dirName );\n \t\tlog.error( errMsg );\n \t\tthrow new HarvesterIOException( errMsg );\n \t }\n \t}\n \t\n \treturn path;\n }", "boolean shouldAllowMissingSourceDir() {\n return allowMissingSourceDir;\n }", "private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }", "@Test\n\tpublic void removeUnneededDirectory() throws IOException {\n\t\tfinal Path targetDir = _temp.toPath().resolve(\"target\");\n\t\tfinal Path fsTargetDir = targetDir.resolve(DIR_FIRSTSPIRIT_5);\n\t\tfinal Path installerTar = new File(getClass().getResource(TEST_INSTALLER_TAR_GZ).getFile()).toPath();\n\t\tServerInstaller.decompressInstaller(targetDir, installerTar);\n\t\tassertTrue(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should exist\");\n\n\t\t// test\n\t\tServerInstaller.removeUnneededDirectory(targetDir);\n\n\t\t// verify\n\t\tassertFalse(fsTargetDir.toFile().exists(), DIR_FIRSTSPIRIT_5 + \" dir should have been deleted\");\n\t}", "@Test\n public void createPackage() throws FlywayException {\n flyway.setLocations(\"migration/dbsupport/oracle/sql/package\");\n flyway.migrate();\n }", "public void setup() {\n\t\tif (!new File(plugin.getDataFolder() + path).exists())\r\n\t\t\tnew File(plugin.getDataFolder() + path).mkdir();\r\n\r\n\t\tif (!new File(plugin.getDataFolder() + path, name + \".yml\").exists())\r\n\t\t\ttry {\r\n\t\t\t\tnew File(plugin.getDataFolder() + path, name + \".yml\").createNewFile();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\tplugin.getLogger().log(Level.SEVERE, \"Could not generate \" + name + \".yml\");\r\n\t\t\t}\r\n\t}", "private final void directory() {\n\t\tif (!this.plugin.getDataFolder().isDirectory()) {\n\t\t\tif (!this.plugin.getDataFolder().mkdirs()) {\n\t\t\t\tMain.SEVERE(\"Failed to create directory\");\n\t\t\t} else {\n\t\t\t\tMain.INFO(\"Created directory sucessfully!\");\n\t\t\t}\n\t\t}\n\t}", "public static void initializeOutputFolder() {\n\t\tString default_folder = PropertiesFile.getInstance().getProperty(\"default_folder\");\n\t\t\n\t\t// The file has to exist and is a directory (Not just a child file)\n\t\tString fullQualifiedFolderName = getFullyQualifiedFileName(default_folder);\n\t\tFile defaultDir = new File(fullQualifiedFolderName);\n\t\tif (!checkFolder(fullQualifiedFolderName)) {\n\t\t\tboolean dirCreated = defaultDir.mkdir();\n\t\t\tif(dirCreated == false) {\n\t\t\t\tlog.error(\"Could not create generation folder\");\n\t\t\t}\n\t\t} else\n\t\t\tdeleteFolderRecursively(defaultDir);\n\t}", "private void createDirectory(String path) throws IOException {\n\t\tfinal Path p = Paths.get(path);\n\t\tif (!fileExists(p)) {\n\t\t\tFiles.createDirectory(p);\n\t\t}\n\t}", "private void createRequiredDirectory(String outdir, String className) throws IOException\r\n\t{\n\t\tString workingdirectory = System.getProperty(\"user.dir\");\r\n\t\t\r\n\t\t//used to create directory\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory +\"/custom-test-report/Failure_Screenshot\");\r\n\t\tscreenshotDir.mkdir();\r\n\t\t\r\n\t\tscreenshotDir = new File(workingdirectory + \"/custom-test-report\" + \"/\" + className);\r\n\t\tscreenshotDir.mkdir();\r\n\t}", "@Override\n\tpublic void generateDirectories() {\n\t\tFile file = new File(\"Data/My Contacts/\");\n\n\t\tif (!file.exists()) {\n\t\t\tfile.mkdirs();\n\t\t}\n\t}", "public PackageServer() {\n\t\t\n\t\t// Create the release folder\n\t\tLOGGER.debug(\"Creating directory: {}\", RELEASE_FOLDER);\n\t\tif (PackageUtils.createDirectory(RELEASE_FOLDER)) {\n\t\t\tLOGGER.debug(\"Created: {}\", RELEASE_FOLDER);\n\t\t} else {\n\t\t\tLOGGER.debug(\"Failed creating: {}\", RELEASE_FOLDER);\n\t\t}\n\t}", "public static void createDirectory(String srcDir, String nameDir) {\n try {\n Path path = Paths.get(srcDir + \"/\" + nameDir);\n\n Files.createDirectories(path);\n System.out.println(\"Directory is created\");\n } catch (IOException e) {\n System.err.println(\"ERROR CREATION! \" + e.getMessage());\n }\n\n }", "private static void doCreateDir() {\n String newDir = \"new_dir\";\n boolean success = (new File(newDir)).mkdir();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n // Create a directory; all non-existent ancestor directories are\n // automatically created.\n newDir = \"c:/export/home/jeffreyh/new_dir1/new_dir2/new_dir3\";\n success = (new File(newDir)).mkdirs();\n\n if (success) {\n System.out.println(\"Successfully created directory: \" + newDir);\n } else {\n System.out.println(\"Failed to create directory: \" + newDir);\n }\n\n }", "private void createDirectoryIfNeeded(String directoryName)\n\t{\n\t\tFile theDir = new File(directoryName);\n\n\t\t// if the directory does not exist, create it\n\t\tif (!theDir.exists())\n\t\t{\n\t\t\t//System.out.println(\"creating directory: \" + directoryName);\n\t\t\ttheDir.mkdir();\n\t\t}\n\t}", "public static void createDirectories() \r\n\t{\r\n\t\tif(!fCertificatesDir().exists()) \r\n\t\t{\r\n\t\t\tfCertificatesDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fDbDir().exists()) \r\n\t\t{\r\n\t\t\tfDbDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsDir().exists())\r\n\t\t{\r\n\t\t\tfMibsDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsBinaryDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsBinaryDir().mkdir();\r\n\t\t}\r\n\t\t\r\n\t\tif(!fMibsTextDir().exists()) \r\n\t\t{\r\n\t\t\tfMibsTextDir().mkdir();\r\n\t\t}\r\n\t}", "private static File prepareTempFolder() {\n File result;\n try {\n result = java.nio.file.Files.createTempDirectory(\n DCOSService.class.getSimpleName()).toFile();\n System.out.println(result.toString());\n\n return result;\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }", "private boolean createGitletDirectory(){\n File dir = new File(Utils.GITLET_DIR);\n\n if(!dir.exists()){\n dir.mkdir();\n\n } else {\n System.out.println(\"A gitlet version-control system already exists in the current directory.\");\n return false;\n }\n\n File commitDir = Utils.join(Utils.GITLET_DIR, Utils.COMMIT_DIR);\n\n if(!commitDir.exists()){\n commitDir.mkdir();\n }\n\n File blobDir = Utils.join(Utils.GITLET_DIR, Utils.BLOBS_DIR);\n\n if (!blobDir.exists()){\n blobDir.mkdir();\n }\n return true;\n }", "@BeforeEach\n void before() {\n if (Files.notExists(path)) path.toFile().mkdirs();\n }", "protected File getAsinstalldir() throws ClassNotFoundException {\n\t\tif (asinstalldir == null) {\n\t\t\tString home = getProject().getProperty(\"asinstall.dir\");\n\t\t\tif (home != null) {\n asinstalldir = new File(home);\n\t\t\t}\n else {\n home = getProject().getProperty(\"sunone.home\");\n if (home != null)\n {\n final String msg = lsm.getString(\"DeprecatedProperty\", new Object[] {\"sunone.home\", \"asinstall.dir\"});\n log(msg, Project.MSG_WARN);\n asinstalldir = new File(home);\n }\n \n }\n\t\t}\n if (asinstalldir!=null) verifyAsinstalldir(asinstalldir);\n\t\treturn asinstalldir;\n\t}", "private boolean verifyAsinstalldir(File home) throws ClassNotFoundException{\n if (home!= null && home.isDirectory()) {\n if ( new File(home, \"config\").isDirectory() ) {\n return true;\n } \n }\n throw new ClassNotFoundException(\"ClassCouldNotBeFound\");\n }", "private static File setYdfDirectory()\r\n/* 27: */ throws IOException\r\n/* 28: */ {\r\n/* 29: 32 */ log.finest(\"OSHandler.setYdfDirectory\");\r\n/* 30: 33 */ ydfDirectory = new File(USER_HOME + \"/\" + \".yourdigitalfile\");\r\n/* 31: 34 */ ydfDirectory.mkdir();\r\n/* 32: 35 */ return ydfDirectory;\r\n/* 33: */ }", "private void createClassPath() {\n classPath = classFactory.createClassPath();\n }", "private void prepareFolder(String name, String newFolderName) {\n }", "void addImage() throws Exception {\n builderContext.reportStatus(\"%n%nExporting package %s%n\", getPackageName(packageInfo));\n\n IOUtils.deleteRecursive(imageDir);\n imageDir.mkdirs();\n\n for (File f : new File[]{messagesDir, promptsDir}) {\n if (!f.exists() && !f.mkdirs()) {\n throw (new TBBuilder.TBBuilderException(String.format(\"Unable to create directory: %s%n\", f)));\n }\n }\n if (builderContext.deDuplicateAudio) {\n for (File f : new File[]{shadowMessagesDir, shadowPromptsDir}) {\n if (!f.exists() && !f.mkdirs()) {\n throw (new TBBuilder.TBBuilderException(String.format(\"Unable to create directory: %s%n\", f)));\n }\n }\n }\n\n // Create the empty directory structure\n PackageData packageData = packagesData.addPackage(getPackageName(packageInfo))\n .withPromptPath(makePath(promptsDir));\n addPackageContentToImage(packageData);\n\n addSystemPromptsToImage();\n addSystemDirFilesToImage();\n if (packageInfo.hasTutorial()) {\n addTutorialToImage(packageData);\n }\n if (packageInfo.isUfPublic()) {\n addUfToImage(packageData);\n }\n\n allPackagesData.addPackagesData(packagesData);\n File of = new File(contentDir, PackagesData.PACKAGES_DATA_TXT);\n try (FileOutputStream fos = new FileOutputStream(of)) {\n packagesData.exportPackageDataFile(fos, getPackageName(packageInfo));\n }\n\n builderContext.reportStatus(\n String.format(\"Done with adding image for %s and %s.%n\",\n getPackageName(packageInfo),\n packageInfo.getLanguageCode()));\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 File prepareCodeFolder() {\n if (!codeFolder.exists()) {\n codeFolder.mkdirs();\n }\n return codeFolder;\n }", "private static void createSaveDirIfNotExisting() {\n\t\tFile dir = new File(\"save\");\n\t\tif (!dir.exists()) {\n\t\t\t// directory does not exist => create!\n\t\t\tdir.mkdir();\n\t\t}\n\t}", "ModulePackage createModulePackage();", "public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }", "ImportedPackage createImportedPackage();", "public void createSubDirData() {\n\t\tFile f = new File(getPFDataPath());\n\t\tf.mkdirs();\n\t}", "private File createConfigDirIfNecessary(String configName) throws IOException {\n return createConfigDirIfNecessary(configDirPath.toFile(), configName);\n }", "private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}", "public void setAndCreateDirPath(String dirname) {\r\n\t File newPath = new File(dirname); \r\n\t \r\n\t if(!newPath.isDirectory()) {\r\n\t\t newPath.mkdirs();\r\n\t }\r\n\t \r\n\t directory = newPath;\r\n }", "private void removeLocalDockerImageFiles(PluginPackages pluginPackage) {\n String versionPath = SystemUtils.getTempFolderPath() + pluginPackage.getName() + \"-\"\n + pluginPackage.getVersion() + \"/\";\n File versionDirectory = new File(versionPath);\n try {\n log.info(\"Delete directory: {}\", versionPath);\n FileUtils.deleteDirectory(versionDirectory);\n } catch (IOException e) {\n log.error(\"Remove plugin package file failed: {}\", e);\n throw new WecubeCoreException(\"3107\", \"Remove plugin package file failed.\");\n }\n }", "public void createModuleGeneratedXMLPath() {\n\t\tString[] onlyFolderNames = new String[] {\n\t\t\tmInstance.getModuleGeneratedXMLPath(),\n\t\t\tmModuleName\n\t\t};\n\t\t\n\t\tmModuleGeneratedXMLPath = StringUtils.makeFilePath (onlyFolderNames, false);\n\t}", "Composer createComposer();", "@Test\n\tpublic void cleanupTargetDirectory() throws IOException {\n\t\tfinal Path targetDir = _temp.toPath().resolve(\"target\");\n\t\tfinal Path installerTar = new File(getClass().getResource(TEST_INSTALLER_TAR_GZ).getFile()).toPath();\n\t\tFileUtil.mkDirs(targetDir);\n\t\tArchiveUtil.decompressTarGz(installerTar, targetDir);\n\n\t\t// test\n\t\tassertTrue(targetDir.toFile().list().length > 0, \"target dir should exist with children\");\n\t\tServerInstaller.cleanupTargetDirectory(targetDir);\n\n\t\t// verify\n\t\tassertFalse(targetDir.toFile().exists(), \"target dir should not exist\");\n\t}", "public void checkoutHelper(String fileName) {\n\t\tint posafter = 0;\n\t\tfor (int k = 0; k < fileName.length(); k++) {\n\t\t\tif (fileName.charAt(k) == '/') {\n\t\t\t\tposafter = k;\n\t\t\t\tFile f = new File(fileName.substring(0, posafter));\n\t\t\t\tif (!f.exists()) {\n\t\t\t\t\tf.mkdir();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void prepare() throws ClassNotFoundException {\n }", "static void createOutputStructure(final File dir) throws MojoExecutionException {\n if (!dir.exists() && !dir.mkdirs()) {\n throw new MojoExecutionException(\"could not create output directory \" + dir.getAbsolutePath());\n }\n }", "private void checkDirectory(File directory) throws MojoExecutionException\n {\n if (!directory.exists())\n {\n if (!directory.mkdirs())\n {\n throw new MojoExecutionException(\n String.format(\"Failed to create directory '%s'\", directory));\n }\n }\n }", "public static String createDownloadDirectory() {\n \tvar downloadDirectory = Configuration.toString(\"downloadDirectory\");\n \tif (downloadDirectory == null) {\n \t\tdownloadDirectory = \"../../Downloads\";\n \t}\n return downloadDirectory;\n }", "private static void prepareLoggingSystemEnviroment() {\n\t\t// property configuration relies on this parameter\n\t\tSystem.setProperty(\"log.directory\", getLogFolder());\n\t\t//create the log directory if not yet existing:\n\t\t//removed code as log4j is now capable of doing that automatically\n\t}", "public void setupDrive(){\n // Place Dove/ into base of drive\n new File(drv.toString() + File.separator + folderName).mkdir();\n //upload preset content if required\n isSetup = true;\n }", "private boolean isSourceDirectory(Project project, String sourceDirectory) {\r\n\t\tboolean result=false;\r\n\t\tif(sourceDirectory!=null&&(!sourceDirectory.equals(\"gen\"))){\r\n\t\t\tresult=true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "private File createWorkingDir( final String path )\n {\n File workDir = new File( path );\n workDir.mkdirs();\n return workDir;\n }", "public void setUp() {\n new File(TEST_FILE).getParentFile().mkdirs();\n }", "@Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n if (!this.sourceDirectory.equals(dir)) {\n // Create this directory in the target and make it our current target.\n Path newDirectory = this.currentTargetDirectory.resolve(dir.getFileName());\n boolean didCreate = newDirectory.toFile().mkdir();\n Assert.assertTrue(didCreate);\n logger.output(\"Created directory: \" + newDirectory);\n this.currentTargetDirectory = newDirectory;\n }\n return FileVisitResult.CONTINUE;\n }", "public void createModuleStubPath() {\n String[] onlyFolderNames = new String[] {\n mInstance.getModuleStubPath(),\n mModuleName\n };\n\n mModuleStubPath = StringUtils.makeFilePath (onlyFolderNames, false);\n }", "@BeforeClass\n public static void setup() {\n logger.info(\"setup: creating a temporary directory\");\n\n // create a directory for temporary files\n directory = new File(UUID.randomUUID().toString());\n directory.mkdir();\n }", "private void initializeTargetDirectory()\n {\n if ( isFtpEnabled() )\n initializeRemoteTargetDirectory();\n else\n initializeLocalTargetDirectory(); \n }", "private void processDir(){\n // get the location of ISAW code base\n String isaw_home=SharedData.getProperty(\"ISAW_HOME\");\n if(isaw_home==null)\n throw new InstantiationError(\"Could not find directory:ISAW_HOME is null\");\n isaw_home=FilenameUtil.setForwardSlash(isaw_home+\"/\");\n\n // get the name of the directory to check\n String dir=FilenameUtil.setForwardSlash(isaw_home\n +\"DataSetTools/parameter/\");\n\n // check that the directory is okay to work with\n if(DEBUG) System.out.println(\"Looking in \"+dir);\n File paramDir=new File(dir);\n if( !(paramDir.exists()) || !(paramDir.isDirectory()) )\n throw new InstantiationError(\"Could not find directory \" + dir);\n\n // get the list of all possible classes\n File[] files=paramDir.listFiles();\n String filename=null;\n for( int i=0 ; i<files.length ; i++ ){\n filename=checkName(files[i].toString(),isaw_home.length());\n if(filename!=null) addParameter(filename);\n }\n \n \n\n dir=FilenameUtil.setForwardSlash(isaw_home\n +\"gov/anl/ipns/Parameters/\");\n\n // check that the directory is okay to work with\n if(DEBUG) System.out.println(\"Looking in \"+dir);\n paramDir=new File(dir);\n if( !(paramDir.exists()) || !(paramDir.isDirectory()) )\n throw new InstantiationError(\"Could not find directory \" + dir);\n\n // get the list of all possible classes\n files=paramDir.listFiles();\n filename=null;\n for( int i=0 ; i<files.length ; i++ ){\n filename=checkName(files[i].toString(),isaw_home.length());\n if(filename!=null) addParameter(filename);\n }\n\n }", "private void makeDir(String targetDir){\n\t\tchar letter = 'A';\n\t\tnew File(targetDir + \"\\\\Sorted Music\").mkdir();\n\t\t\n\t\tfor (int i = 0; i < 26; i++){\n\t\t\tnew File(targetDir + \"\\\\Sorted Music\\\\\" + letter).mkdir();\n\t\t\tletter++;\n\t\t}\n\t}", "@BeforeAll\n public static void setUp() throws IOException {\n Files.createDirectories(Paths.get(targetPath));\n }", "static File getDistributionInstallationFolder() {\n return ProcessRunnerImpl.getDistRootPath();\n }", "abstract protected void createWorkEnv(File outputDir)\n throws TaskRunException;", "public boolean makeDirectory(){\n File root = new File(Environment.getExternalStorageDirectory(),\"OQPS\");\n if(!root.exists()){\n return root.mkdir();\n }\n return true; //folder already exists\n }", "public void createModuleBackupPath() {\n\t\tString[] onlyFolderNames = new String[] {\n\t\t\tmInstance.getModuleBackupRepositoryPath(),\n\t\t\tmModuleName\n\t\t};\n\t\t\n\t\tmModuleBackupPath = StringUtils.makeFilePath (onlyFolderNames, false);\n\t}", "@BeforeClass\n public static void createOutputDir() throws OfficeException {\n\n // Ensure we start with a fresh output directory\n final File outputDir = new File(OUTPUT_DIR);\n FileUtils.deleteQuietly(outputDir);\n outputDir.mkdirs();\n }", "private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }", "protected void prepareUninstallation() {\n\t\t//\n\t}", "public static void init() {\r\n if (MAIN_FOLDER.isDirectory()) {\r\n throw new GitletException(\"A Gitlet version-control system already \"\r\n + \"exists in the current directory.\");\r\n } else {\r\n MAIN_FOLDER.mkdirs();\r\n COMMIT_FOLDER.mkdirs();\r\n ADD_FOLDER.mkdirs();\r\n BLOB_FOLDER.mkdirs();\r\n Story story = new Story();\r\n story.saveStory();\r\n }\r\n }", "private Path initFolder(String folder) throws IOException {\n return Files.createDirectory(Paths.get(uploadFolder + \"/\" + folder));\n }", "abstract void addNewSourceDirectory(final File targetDirectory);", "Directory createAsDirectory() {\n return getParentAsExistingDirectory().findOrCreateChildDirectory(name);\n }", "private void createJavaWebStartPath() {\n String[] onlyFolderNames = new String[] {\n mInstance.getJavaWebStartPath(),\n mModuleName\n };\n\n mJavaWebStartPath = StringUtils.makeFilePath (onlyFolderNames, false);\n }", "static Optional<String> assemblePackage(List<Thing> things, double packageWeight) throws APIException {\n\t\treturn new PackageBuilder().resolveBetterPackage(things, packageWeight);\n\t}", "private void prepareREADME() {\n\t\ttry {\n\t\t\tInputStream is = getClass().getResourceAsStream(\"/demo/README.txt\");\n\t\t\tInputStreamReader isr = new InputStreamReader(is);\n\t\t\tBufferedReader br = new BufferedReader(isr);\n\t\t\tString readme = \"\";\n\t\t\twhile ((readme = br.readLine()) != null)\n\t\t\t\tview.appendTextREADME(readme += \"\\n\");\n\t\t\tbr.close();\n\t\t\tisr.close();\n\t\t\tis.close();\n\t\t} catch (IOException e) {\n\t\t\tview.displayErrorMessage(\"ERROR: README creation failed.\");\n\t\t}\n\t}", "private static void processJar(Path destinationPath) throws IOException {\n\n if (destinationPath == null) {\n throw new IOException(\"Cobigen folder path not found!\");\n }\n\n File cobigenTemplatesPath = CobiGenPaths.getTemplatesFolderPath().toFile();\n\n Path sourcesJarPath = TemplatesJarUtil.getJarFile(true, cobigenTemplatesPath).toPath();\n Path classesJarPath = TemplatesJarUtil.getJarFile(false, cobigenTemplatesPath).toPath();\n\n LOG.debug(\"Processing jar file @ {}\", sourcesJarPath);\n\n // extract sources jar to target directory\n extractArchive(sourcesJarPath, destinationPath);\n\n // create src/main/java directory\n Files.createDirectory(destinationPath.resolve(\"src/main/java\"));\n\n // move com folder to src/main/java/com\n Files.move(destinationPath.resolve(\"com\"), destinationPath.resolve(\"src/main/java/com\"),\n StandardCopyOption.REPLACE_EXISTING);\n\n // create src/main/resources directory\n Files.createDirectory(destinationPath.resolve(\"src/main/resources\"));\n\n // move META-INF folder to src/main/resources\n Files.move(destinationPath.resolve(\"META-INF\"), destinationPath.resolve(\"src/main/resources/META-INF\"),\n StandardCopyOption.REPLACE_EXISTING);\n\n // delete MANIFEST.MF\n Files.deleteIfExists(destinationPath.resolve(\"src/main/resources/META-INF/MANIFEST.MF\"));\n\n URI zipFile = URI.create(\"jar:file:\" + classesJarPath.toUri().getPath());\n\n // extract classes jar pom.xml\n try (FileSystem fs = FileSystemUtil.getOrCreateFileSystem(zipFile)) {\n Files.copy(fs.getPath(\"pom.xml\"), destinationPath.resolve(\"pom.xml\"), StandardCopyOption.REPLACE_EXISTING);\n }\n\n }", "public static File getRootPackageDir(File location, String longPackageName) {\r\n\t\tfinal StringTokenizer tk = new StringTokenizer(longPackageName, \".\");\r\n\t\tFile back = location;\r\n\t\twhile (tk.hasMoreTokens()) {\r\n\t\t\ttk.nextToken();\r\n\t\t\tback = back.getParentFile();\r\n\t\t}\r\n\t\treturn back;\r\n\t}", "private static void judeDirExists(String myPath) {\n \tFile myDir = new File(Paths.get(myPath).getParent().toString());\n if (!myDir.exists()) {\n \tmyDir.mkdirs(); \n System.out.println(\"Create path:\"+ myDir.getPath());\n }\n }", "void update(ModuleDef module, CompileDir compileDir, TreeLogger logger)\n throws UnableToCompleteException {\n File moduleDir = new File(launcherDir + \"/\" + module.getName());\n if (!moduleDir.isDirectory()) {\n if (!moduleDir.mkdirs()) {\n logger.log(Type.ERROR, \"Can't create launcher dir for module: \" + moduleDir);\n throw new UnableToCompleteException();\n }\n }\n\n try {\n String stub = generateStubNocacheJs(module.getName(), options);\n\n final File noCacheJs = new File(moduleDir, module.getName() + \".nocache.js\");\n Files.write(stub, noCacheJs, Charsets.UTF_8);\n\n // Remove gz file so it doesn't get used instead.\n // (We may be writing to an existing war directory.)\n final File noCacheJsGz = new File(noCacheJs.getPath() + \".gz\");\n if (noCacheJsGz.exists()) {\n if (!noCacheJsGz.delete()) {\n logger.log(Type.ERROR, \"cannot delete file: \" + noCacheJsGz);\n throw new UnableToCompleteException();\n }\n }\n\n writePublicResources(moduleDir, module, logger);\n\n // Copy the GWT-RPC serialization policies so that the subclass of RemoteServiceServlet\n // can pick it up. (It expects to find policy files in the module directory.)\n // See RemoteServiceServlet.loadSerializationPolicy.\n // (An alternate approach is to set the gwt.codeserver.port environment variable\n // so that the other server downloads policies over HTTP.)\n for (PolicyFile policyFile : compileDir.readRpcPolicyManifest(module.getName())) {\n String filename = policyFile.getName();\n File src = new File(compileDir.getWarDir(), module.getName() + \"/\" + filename);\n File dest = new File(moduleDir, filename);\n Files.copy(src, dest);\n }\n\n } catch (IOException e) {\n logger.log(Type.ERROR, \"Can't update launcher dir\", e);\n throw new UnableToCompleteException();\n }\n }", "public void initiaizeTickler(String pkgName,boolean isDev) throws TNotFoundEx{\n\n\t\tPackagez pkg = new Packagez();\n\t\tif (isDev){\n\t\t\tthis.checkDevices();\n\t\t}\n\t\t\n\t\tthis.checkRequirements();\n\t\t\n\t\tthis.loadConfiguration();\n\t\n\t\tif (!pkg.isPackageExist(pkgName)){\n\t\t\tthrow new TNotFoundEx(this.PKG_NOT_FOUND.replaceAll(\"\\\\$P\", pkgName));\n\t\t}\n\t\t\n\t\tTicklerVars.updateVars(pkgName);\n\t\t\n\t\tthis.createEssentialDirs();\t\n\t\tthis.checkExternalLibDir();\n\t\tthis.isDex2Jar();\n\t\n\t}", "abstract File getTargetDirectory();", "private void loadDirectoryUp() {\n\t\tString s = pathDirsList.remove(pathDirsList.size() - 1);\n\t\t// path modified to exclude present directory\n\t\tpath = new File(path.toString().substring(0,\n\t\t\t\tpath.toString().lastIndexOf(s)));\n\t\tfileList.clear();\n\t}", "protected String setPathToResourcesIfNotProvided(String[] args) {\n if (args.length == 0) {\n args = new String[1];\n args[0] = \"./src/main/resources/Code Test\";\n }\n return args[0];\n }", "abstract File getResourceDirectory();", "Builder forProjectDirectory(File projectDir);" ]
[ "0.67241853", "0.60337037", "0.576266", "0.5719131", "0.5680241", "0.56785697", "0.56481934", "0.56244045", "0.55850625", "0.5565801", "0.5501648", "0.5397756", "0.53599715", "0.5354233", "0.5337559", "0.5303104", "0.52934605", "0.5291396", "0.52892405", "0.52825356", "0.5274614", "0.5273635", "0.52209437", "0.519675", "0.5191296", "0.5185249", "0.5179035", "0.51532114", "0.5142977", "0.51141894", "0.51111853", "0.5107882", "0.5055907", "0.50336003", "0.50244004", "0.5013926", "0.50117624", "0.4992507", "0.4987112", "0.49834108", "0.49830896", "0.4979667", "0.49635762", "0.4959966", "0.49596667", "0.49506176", "0.49501264", "0.494755", "0.49461207", "0.49377495", "0.49348477", "0.49323216", "0.49263054", "0.49134117", "0.49095115", "0.49060518", "0.49055976", "0.489977", "0.48920503", "0.48777506", "0.4872718", "0.48674092", "0.48554116", "0.4830918", "0.4826773", "0.48180807", "0.48167124", "0.48145142", "0.47969857", "0.47855276", "0.47816995", "0.4777418", "0.4761881", "0.47565863", "0.47432706", "0.47332466", "0.47205195", "0.47175854", "0.47161183", "0.47154906", "0.47142154", "0.47129798", "0.47116563", "0.46985236", "0.46907818", "0.46894094", "0.46819523", "0.4679986", "0.46731853", "0.4651967", "0.46470588", "0.46461028", "0.46457708", "0.46455923", "0.46455684", "0.46440408", "0.46411437", "0.46407822", "0.46342322", "0.46329272", "0.46293062" ]
0.0
-1
public WorkExperience queryWorkExpById(int studentId) throws Exception;
public WorkExperience queryWorkExpById(int workExperienceId) throws Exception;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Employee getStudentOnId(int id);", "public student getstudent(Integer id);", "public Student findById(int theStudent_id);", "public Student findStudent(int id);", "Student getStudentById(Long id);", "@NotNull\n public StudentExam findOneWithExercises(Long studentExamId) {\n log.debug(\"Request to get student exam {} with exercises\", studentExamId);\n return studentExamRepository.findWithExercisesById(studentExamId)\n .orElseThrow(() -> new EntityNotFoundException(\"Student exam with id \\\"\" + studentExamId + \"\\\" does not exist\"));\n }", "public int getStudentId();", "Student findById(String id);", "public Object searchSingle() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.studentId = :id\");\r\n \tquery.setParameter(\"id\", 1);\r\n \tStudent result = (Student)query.getSingleResult();\r\n \t \r\n \t// Query for a single data element.\r\n// \tQuery query = em.createQuery(\"Select MAX(e.grade) FROM Student e\");\r\n// \tBigDecimal result = (BigDecimal)query.getSingleResult();\r\n \t\r\n// \tQuery query = em.createQuery(\"Select e FROM Student e JOIN e.projectList u WHERE u.name = :name\");\r\n// \tquery.setParameter(\"name\", \"student_example\");\r\n// \tStudent result = (Student)query.getSingleResult();\r\n \t\r\n\r\n\r\n \t\r\n \treturn result;\r\n }", "public int getExamId();", "public E returnStudent(String studentID){}", "School findSchoolById(int id) throws TechnicalException;", "List<ScoreEntity> findList(int studentId);", "@NotNull\n public StudentExam findOne(Long studentExamId) {\n log.debug(\"Request to get student exam : {}\", studentExamId);\n return studentExamRepository.findById(studentExamId).orElseThrow(() -> new EntityNotFoundException(\"Student exam with id \\\"\" + studentExamId + \"\\\" does not exist\"));\n }", "public comprehensive_record findByStudent(String studentid) {\n\t\tString hql=\"from comprehensive_record cr where cr.personInfo.studentid=:studentid\";\r\n\t\treturn (comprehensive_record)getSession().createQuery(hql).setString(\"studentid\", studentid).uniqueResult();\r\n\t}", "Student get(long id);", "@NotNull\n public StudentExam findOneWithEagerExercises(Long studentExamId) {\n log.debug(\"Request to get student exam with exercises : {}\", studentExamId);\n return studentExamRepository.findWithEagerExercisesById(studentExamId)\n .orElseThrow(() -> new EntityNotFoundException(\"Student exam with id \\\"\" + studentExamId + \"\\\" does not exist\"));\n }", "@Override\n public StudentHomework selectByP(Long id) {\n return studentHomeworkMapper.selectByPrimaryKey(id);\n }", "hr.domain.ResumeDBOuterClass.Experience getExperiences(int index);", "public Student getStudentById(int id){\n String whereClause=\"id=?\";\n String[] whereArgs={String.valueOf(id)};\n SQLiteDatabase st=getReadableDatabase();\n Cursor rs=st.query(\"student\",null,whereClause,\n whereArgs,null,null,null);\n if(rs.moveToNext()){\n String n=rs.getString(1);\n boolean g=rs.getInt(2)==1;\n double m=rs.getDouble(3);\n return new Student(id,n,g,m);\n }\n return null;\n }", "public Student getStudent(int studentId) {\n\t\tStudent student = this.hibernateTemplate.get(Student.class, studentId);\n\t\treturn student;\n\t}", "@Override\n\t public ResponseEntity<Student> getStudentById( BigInteger stdId) throws RecordNotFoundException {\n\t \tStudent stdStudent=studentrepo.findById(stdId).\n\t \t orElseThrow(() -> new RecordNotFoundException(\"Test not found for the given id\" +stdId));\n\t \treturn ResponseEntity.ok().body(stdStudent);\n\t }", "Assessment getTest(Long assessmentId);", "@Override\r\n\tpublic Student getStudentById(Long id) {\n\t\treturn studentRepository.findById(id).get();\r\n\t}", "Student selectByPrimaryKey(Integer studentId);", "StudentRecord getStudent(String recordId, String clientId) throws Exception;", "List<Student> selectByExample(StudentExample example);", "public Student getStudent(String theStudentId)throws Exception {\n\t\tStudent theStudent=null;\n\t\tConnection conn=null;\n\t\tPreparedStatement myStmt=null;\n\t\tResultSet myRs=null;\n\t\tint studentId;\n\t\ttry{\n\t\t\t// convert student id to int\n\t\t\tstudentId=Integer.parseInt(theStudentId);\n\t\t\t//get connection to database\n\t\t\tconn=dataSource.getConnection();\n\t\t\t//create sql to get selected student\n\t\t\tString sql=\"select * from student where id=?\";\n\t\t\t//create prepared statement\n\t\t\tmyStmt=conn.prepareStatement(sql);\n\t\t\t// set parameters\n\t\t\tmyStmt.setInt(1, studentId);\n\t\t\t//execute statement\n\t\t\tmyRs=myStmt.executeQuery();\n\t\t\t//retrieve data from result set row\n\t\t\tif(myRs.next()) {\n\t\t\t\tString firstName=myRs.getString(\"first_name\");\n\t\t\t\tString lastName=myRs.getString(\"last_name\");\n\t\t\t\tString email=myRs.getString(\"email\");\n\t\t\t\ttheStudent=new Student(studentId,firstName,lastName,email);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Could'nt find the student id:\"+ studentId);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose(conn,myStmt,myRs);\n\t\t}\n\t\treturn theStudent;\n\t}", "StudentEntity selectByPrimaryKey(String studentId);", "public long getStudentID();", "@Query(\"SELECT * FROM wellbeing_questions WHERE wellbeing_question_id == :id\")\n WellbeingQuestion getQuestionById(long id);", "Skill getSkill(Long skillId) throws DbException;", "public sust.paperlessexm.entity.Student getStudent(java.lang.Integer id) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n Student bean = (Student) hibernateTemplate.get(Student.class, id);\n return bean;\n } finally {\n log.debug(\"finished getStudent(java.lang.Integer id)\");\n }\n }", "public Student getStudent(Student entity){\r\n return repo.findOne(entity.getID());\r\n }", "@Override\n public List<StudentHomework> selectByHomeworkId(Long homeworkId) {\n return studentHomeworkMapper.selectByHomeworkId(homeworkId) ;\n }", "Student fetchBy(String name);", "public int getStudentId() {\n return studentId;\n }", "@Override\n\t\tpublic BigInteger getTestByStudentId(BigInteger studentId)\n\t\t\t\tthrows RecordNotFoundException {\n\n\t\t\tBigInteger id1= studentrepo.getTestByStudentId(studentId);\n\t\t\treturn id1;\n\t\t}", "SchoolMasterVo getSchoolMasterDetail(int id);", "Student selectByPrimaryKey(Integer id);", "List<PaperFinish> getStudentFinish(Long courseId,Long paperId);", "StudentInfo selectByPrimaryKey(Integer id);", "hr.domain.ResumeDBOuterClass.Education getEducations(int index);", "public String getId() { return studentId; }", "@Override\n\t\tpublic String queryStudent(int no) throws RemoteException {\n\t\t\treturn queryString(no);\n\t\t}", "public interface AcademicProfileRepo extends CrudRepository<AcademicProfile, Integer> {\n AcademicProfile findBySchoolId(String schoolId);\n}", "@Override\n\t\tpublic Student getStudentById(Integer id)\n\t\t{\n\t\t\treturn (Student) sessionFactory.getCurrentSession().get(Student.class,id);\n\t\t}", "public Employee getEmployeeById(Long custId)throws EmployeeException;", "Exam load(Long id);", "public List<Student> search() {\n \tQuery query = em.createQuery(\"Select e FROM Student e WHERE e.grade > 50.00\");\r\n \tList<Student> result = query.getResultList();\r\n \t\r\n \t \r\n \t// Query for a List of data elements.\r\n// \tQuery query = em.createQuery(\"Select e.firstname FROM Student e\");\r\n// \tList<String> result = query.getResultList();\r\n \t \r\n \t// Query for a List of element arrays.\r\n// \tQuery query = em.createQuery(\"Select e.firstname, e.grade FROM Student e\");\r\n// \tList<Object[]> result = query.getResultList();\r\n \t\r\n\t\t// \tsetFirstResult()\r\n\t\t// \tsetMaxResults()\r\n \t\r\n \treturn result;\r\n }", "public int getId() \r\n {\r\n return studentId;\r\n }", "@Override\n\t public List<Student> getAllStudent(BigInteger stdId){\n\t \t\n\t\t \n\t \treturn (List<Student>) studentrepo.findAll(); \t\n\t }", "List<SalGrade> selectByExample(SalGradeExample example);", "public void setStudentId(int studentId);", "@Override\n\tpublic Student getStudent(int id) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// get and return Student\n\t\tStudent student = currentSession.get(Student.class, id);\n\t\treturn student;\n\t}", "List<Workshift> findByProfessionalId(Long id);", "@Override\r\n\tpublic Student getById(int id) {\n\t\treturn sdao.getStudentById(id);\r\n\t}", "Lesson loadLesson(int id) throws DataAccessException;", "School findSchoolByName(String schoolName) throws TechnicalException;", "Assessment getAssessment();", "public Employee findEmployee(Long id);", "private static String searchStudent ( int studentId){\n for (Student s : studentDB) {\n if (s.getID() == studentId) {\n return s.getName();\n }\n }\n return \"\";\n }", "public int getStudentId() { // changed to string\n return studentId;\n }", "List<ReEducation> selectByExample(ReEducationExample example);", "public Query_GetStudent(DataSource ds) {\n\t\t\tsuper(ds, sql_getStudent);\n\t\t\tsuper.declareParameter(new SqlParameter(\"id\", Types.INTEGER));\n\t\t\tcompile();\n\t\t}", "@GetMapping(\"/students/{studentId}\")\n @ApiOperation(value = \"Search StudyClasses by its students\")\n public List<StudyClassDTO> findByStudentStudentId(\n @ApiParam(value = \"The student studentId\") @PathVariable String studentId) {\n return studyClassService.findByStudentStudentId(studentId);\n }", "public Employeedetails getEmployeeDetailByName(String employeeId);", "EmployeeDetail getById(long identifier) throws DBException;", "ProSchoolWare selectByPrimaryKey(String id);", "com.demo.springprotobuff.Demoproto.Student getStudent(int index);", "List<Student> selectByExample(StudentCriteria example);", "int fetchLevelOfStudent(Student student , Subject subject);", "List<HomeWork> selectByExample(HomeWorkExample example);", "@Override\n\tpublic List<Student> selectStudent2(int classId) {\n\t\tString sql=\"SELECT stu_id,stu_no,stu_name,stu_profession FROM tb_student where class_id=?\";\n\t\tObject[] classid={classId};\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, classid, Student.class);\n\t\treturn stu;\n\t}", "@Override\r\n\tpublic Student findStudent(String studentId, String password) {\n\t\treturn db.findStudent(studentId, password);\r\n\t}", "TResearchTeach selectByPrimaryKey(Long researchid);", "public int getHC_EmployeeGrade2_ID();", "TrainingCourse selectByPrimaryKey(String id);", "public Researcher getResearcherByID(int id);", "Employee findById(int id);", "@Query(\"SELECT * FROM course WHERE course_id = :course_id\")\n CourseEntity getCourseById(int course_id);", "@Override\n\tpublic Student getStudent(int id) {\n\t\treturn null;\n\t}", "Student selectByPrimaryKey(Integer userid);", "public interface StudentRepository extends JpaRepository<Student,Integer> {\n\n Student findAdminByNum(Long num);\n\n Student findAdminByName(String name);\n\n\n}", "@GetMapping(\"/api/students/{id}\")\n public ResponseEntity getById(@RequestParam(value = \"id\", required = false) Long id) {\n\n return ResponseEntity.ok(studentService.returnById(id));\n\n }", "@Override\n\tpublic Student selectStudentById(int stuId) {\n\t\tString sql=\"SELECT * FROM tb_student where stu_id=?\";\n\t\tObject[] stuid={stuId};\n\t\tList<Student> stu=ORMUtil.ormutil().selectList(sql, stuid, Student.class);\n\t\treturn stu.size()>0?stu.get(0):null;\n\t}", "@Override\n\tpublic Student retrieveStudent(Integer id) {\n\t\treturn em.find(Student.class, id);\n\t}", "public Student getById(int id) {\r\n\r\n\t\treturn studentMapper.selectByPrimaryKey(id);\r\n\t}", "public Integer getStudentId() {\n return studentId;\n }", "public Integer getStudentId() {\n return studentId;\n }", "@Transactional\n\t@Override\n\tpublic List<Lesson> showLesson(int qid) throws Exception {\n\t\treturn lessonDao.findAllByQid(qid);\n\t}", "public Student getById(int id) {\n\t\tResultSet rs = null;\n\t\t\n\t\tString sql = String.format(\"select * from student where id = %s\", id);\n\t\ttry {\n\t\t\trs = myDB.execSQLQuery(sql);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tint aPosition = 0;\n\t\tStudent aStudent = getAStudentFromRS(rs, aPosition);\n\t\treturn aStudent;\n\t}", "SchoolSubject findSchoolSubjectById(Integer id) throws DaoException;", "Student findByLastName(String lastName);", "@Query(\"SELECT * FROM Grades WHERE id = :id\")\n Grades getGradeById(Long id);", "public Long getStudentId() {\n return studentId;\n }", "@Repository\npublic interface StudentRep extends JpaRepository<Student, String>, JpaSpecificationExecutor<Student> {\n\n List<Student> findByMName(String name);\n List<Student> findByMId(String Id);\n\n @Query(\"select s from student s where s.mName like ?1%\")\n List<Student> findByLikeName(String likeName);\n\n}", "abstract public void getStudent();", "public int getStudentID() {\n return studentID;\n }", "public F returnCourse(String studentID){}" ]
[ "0.7071605", "0.6979144", "0.6886932", "0.68008476", "0.6620547", "0.6585859", "0.6515268", "0.6448238", "0.642655", "0.6401756", "0.6375531", "0.6360169", "0.6336425", "0.63142306", "0.6307636", "0.63042474", "0.6235976", "0.6205943", "0.61551213", "0.6067166", "0.6066764", "0.60450387", "0.6023971", "0.60101765", "0.60064477", "0.5990022", "0.5950298", "0.59471655", "0.593801", "0.5923065", "0.59225047", "0.591301", "0.5908469", "0.59059787", "0.58842343", "0.58656454", "0.58506", "0.5829165", "0.58108616", "0.5809843", "0.5802129", "0.5800099", "0.57992333", "0.5787528", "0.57814586", "0.5771674", "0.57659525", "0.5763487", "0.5756336", "0.5753344", "0.57487786", "0.57347023", "0.5720152", "0.5713108", "0.5711283", "0.57095337", "0.5708712", "0.57085687", "0.5699986", "0.5695306", "0.56910545", "0.5688337", "0.56880087", "0.56770825", "0.56768894", "0.5675806", "0.5674054", "0.5672109", "0.5672036", "0.5666324", "0.5663121", "0.5657233", "0.5654625", "0.56411916", "0.5630551", "0.5630158", "0.56296504", "0.5616884", "0.56157887", "0.5613389", "0.5607433", "0.56057173", "0.5604902", "0.5601543", "0.55982435", "0.55947834", "0.5590042", "0.5588617", "0.5583643", "0.5583643", "0.5575753", "0.5570441", "0.556684", "0.55598706", "0.5552414", "0.55516696", "0.5547507", "0.5546657", "0.55396736", "0.5537666" ]
0.8488119
0
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View v = inflater.inflate(R.layout.fragment_feed, container, false); recyclerView = (RecyclerView) v.findViewById(R.id.post_recycler_view); recyclerView.setLayoutManager(new LinearLayoutManager(getActivity())); Location myLocation = PlaceData.getGpsData(getActivity()); String lat = Double.toString(myLocation.getLatitude()); String lng = Double.toString(myLocation.getLongitude()); Retrofit retrofit = new Retrofit.Builder() .baseUrl(Const.URI_API) .addConverterFactory(GsonConverterFactory.create()) .build(); IGetNearByPosts service = retrofit.create(IGetNearByPosts.class); Call<PostContainer> call = service.getPostNearby(lat,lng, Integer.toString(Var.currentUser.getId()), "0", "10", Integer.toString(Var.radius)); call.enqueue(new Callback<PostContainer>() { @Override public void onResponse(Response<PostContainer> response, Retrofit retrofit) { PostNearByAdapter adapter = new PostNearByAdapter(getActivity(), response.body()); recyclerView.setAdapter(adapter); } @Override public void onFailure(Throwable t) { } } ); return v; }
{ "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 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 return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n 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_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_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 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 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,\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, 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 view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\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 }", "@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,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n 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,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\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 }" ]
[ "0.6740084", "0.6724855", "0.6721061", "0.669875", "0.6690866", "0.6688299", "0.66871583", "0.6685089", "0.6676965", "0.66749275", "0.6666751", "0.66662604", "0.6664662", "0.6660371", "0.6653889", "0.66494936", "0.6642919", "0.6638222", "0.66376024", "0.6634041", "0.6625364", "0.662052", "0.66171074", "0.6608666", "0.6597055", "0.6593528", "0.65857065", "0.6584925", "0.6574016", "0.6572048", "0.6569487", "0.65692663", "0.6568774", "0.65681714", "0.6564867", "0.6553995", "0.65534616", "0.6543987", "0.65423656", "0.6541335", "0.6538488", "0.6537051", "0.6536358", "0.6535173", "0.6532997", "0.65328467", "0.65313554", "0.6528864", "0.65278983", "0.65261745", "0.6524924", "0.6524231", "0.652326", "0.65229994", "0.6518273", "0.651362", "0.65127337", "0.65126544", "0.65125155", "0.65110034", "0.6510715", "0.65097964", "0.65091705", "0.6508564", "0.65082407", "0.65027887", "0.65019786", "0.65013415", "0.6501044", "0.6497672", "0.6494031", "0.64925015", "0.6490162", "0.6488267", "0.64877325", "0.6487593", "0.6487242", "0.64867294", "0.6486641", "0.64842254", "0.64839804", "0.6482437", "0.64820856", "0.64819664", "0.6480692", "0.64795756", "0.64770675", "0.6476404", "0.64762866", "0.6475034", "0.6473981", "0.6471452", "0.6471227", "0.64707255", "0.6469712", "0.6467403", "0.6466458", "0.64627796", "0.6462479", "0.6461928", "0.6461686" ]
0.0
-1
Converts a file into byte[]
public byte[] convertToFile(String content, String filename){ byte[] contentByteArray = null; try{ //Converting a Base64 String into Content byte array contentByteArray = decodeContent(content); // Write a content byte array into file system FileOutputStream contentOutFile = new FileOutputStream("resources/" + filename, false); contentOutFile.write(contentByteArray); contentOutFile.close(); System.out.println("Content Successfully Manipulated!"); } catch (FileNotFoundException e) { System.out.println("Content not found" + e); } catch (IOException ioe) { System.out.println("Exception while reading the content" + ioe); } return contentByteArray; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] file2byte() {\n\t\tbyte[] result = null;\n\t\t\n\t\tif (this.isFile()) {\n\t\t\tBufferedInputStream bufferedInputStream = null;\n\t\t\tByteArrayOutputStream byteArrayOutputStream = null;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tbufferedInputStream = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\tbyteArrayOutputStream = new ByteArrayOutputStream(1024);\n\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\tint size = 0;\n\t\t\t\twhile ((size = bufferedInputStream.read(buffer)) != -1) {\n\t\t\t\t\tbyteArrayOutputStream.write(buffer, 0, size);\n\t\t\t\t}\n\t\t\t\tbufferedInputStream.close();\n\n\t\t\t\tresult = byteArrayOutputStream.toByteArray();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bufferedInputStream != null) bufferedInputStream.close();\n\t\t\t\t\tif (byteArrayOutputStream != null) byteArrayOutputStream.close();\n\t\t\t\t} catch (Exception exception) {\n\t\t\t\t\tbufferedInputStream = null;\n\t\t\t\t\tbyteArrayOutputStream = null;\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public static byte[] convertir(File file) {\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "public static byte[] getByteArrayFromFile(File file) throws UnsupportedEncodingException {\n return (fileLoggerInstance == null) ? new byte[]{} : fileLoggerInstance.getFileContentsAsByteArray(file);\n }", "public static byte[] fileToBytes(String filePath) throws IOException {\n final Path path = Paths.get(filePath);\n return Files.readAllBytes(path);\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\r\n\r\n InputStream is = new FileInputStream(file);\r\n\r\n // Get the size of the file\r\n long length = file.length();\r\n\r\n /*\r\n * You cannot create an array using a long type. It needs to be an int\r\n * type. Before converting to an int type, check to ensure that file is\r\n * not loarger than Integer.MAX_VALUE;\r\n */\r\n if (length > Integer.MAX_VALUE) {\r\n System.out.println(\"File is too large to process\");\r\n return null;\r\n }\r\n\r\n // Create the byte array to hold the data\r\n byte[] bytes = new byte[(int) length];\r\n\r\n // Read in the bytes\r\n int offset = 0;\r\n int numRead = 0;\r\n while ((offset < bytes.length) &&\r\n ((numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)) {\r\n\r\n offset += numRead;\r\n\r\n }\r\n\r\n // Ensure all the bytes have been read in\r\n if (offset < bytes.length) {\r\n throw new IOException(\"Could not completely read file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n return bytes;\r\n\r\n }", "public byte[] bytes() throws IOException {\n try(FileInputStream fis = new FileInputStream(file)) {\n return ByteStreams.toByteArray(fis);\n }\n }", "public static byte[] readBytes(File file) throws IOException {\n InputStream is = null;\n try {\n is = new FileInputStream(file);\n byte[] result = new byte[(int) file.length()];\n is.read(result);\n return result;\n } finally {\n close(is);\n }\n }", "public static byte[] writeToByteArray(File file) throws IOException {\n return writeToByteArray(new FileInputStream(file));\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\n InputStream is = new FileInputStream(file);\n\n // Get the size of the file\n long length = file.length();\n\n // You cannot create an array using a long type.\n // It needs to be an int type.\n // Before converting to an int type, check\n // to ensure that file is not larger than Integer.MAX_VALUE.\n if (length > Integer.MAX_VALUE) {\n // File is too large\n }\n\n // Create the byte array to hold the data\n byte[] bytes = new byte[(int)length];\n\n // Read in the bytes\n int offset = 0;\n int numRead = 0;\n while (offset < bytes.length\n && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\n offset += numRead;\n }\n\n // Ensure all the bytes have been read in\n if (offset < bytes.length) {\n throw new IOException(\"Could not completely read file \"+file.getName());\n }\n\n // Close the input stream and return bytes\n is.close();\n return bytes;\n }", "public static byte[] readBytes(File file) throws IOException {\n FileInputStream is = new FileInputStream(file);\n byte[] bytes = new byte[(int) file.length()];\n int read = is.read(bytes);\n for (int totalRead = read; read > 0; ) {\n read = is.read(bytes, totalRead, bytes.length - totalRead);\n }\n is.close();\n return bytes;\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\n\t\tlong length = file.length();\r\n\r\n\t\t// You cannot create an array using a long type.\r\n\t\t// It needs to be an int type.\r\n\t\t// Before converting to an int type, check\r\n\t\t// to ensure that file is not larger than Integer.MAX_VALUE.\r\n\t\tif (length > Integer.MAX_VALUE) {\r\n\t\t\t// File is too large\r\n\t\t\tthrow new IOException(\"File is too large!\");\r\n\t\t}\r\n\r\n\t\t// Create the byte array to hold the data\r\n\t\tbyte[] bytes = new byte[(int)length];\r\n\r\n\t\t// Read in the bytes\r\n\t\tint offset = 0;\r\n\t\tint numRead = 0;\r\n\r\n\t\tInputStream is = new FileInputStream(file);\r\n\t\ttry {\r\n\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n\t\t\t\toffset += numRead;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\r\n\t\t// Ensure all the bytes have been read in\r\n\t\tif (offset < bytes.length) {\r\n\t\t\tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}", "public static byte[] readFileAsByteArray(String path) throws IOException {\n return internalReadFileAsByteArray(path).array();\n }", "public static byte[] readBytesFromFile(File f) {\r\n byte[] bytes = null;\r\n try {\r\n int filesize = (int) f.length();\r\n bytes = new byte[filesize];\r\n DataInputStream in = new DataInputStream(new FileInputStream(f));\r\n in.readFully(bytes);\r\n in.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading byte[] from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return bytes;\r\n }", "public static byte[] getBytesFromFile(File file) {\r\n byte[] bytes;\r\n try (InputStream is = new FileInputStream(file)) {\r\n long length = file.length();\r\n if (length > Integer.MAX_VALUE) {\r\n LOG.log(Level.SEVERE, \"File {0} is too large\", file.getName());\r\n bytes = new byte[0];\r\n return bytes;\r\n }\r\n bytes = new byte[(int) length];\r\n int offset = 0;\r\n int numRead = 0;\r\n while (offset < bytes.length\r\n && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) {\r\n offset += numRead;\r\n }\r\n if (offset < bytes.length) {\r\n LOG.log(Level.SEVERE, \"Could not completely read file {0}\", file.getName());\r\n bytes = new byte[0];\r\n return bytes;\r\n }\r\n }\r\n catch (IOException ioex) {\r\n LOG.log(Level.SEVERE, \"{0} {1}\", new Object[]{ioex.getMessage(), file.getName()});\r\n bytes = new byte[0];\r\n return bytes;\r\n }\r\n\r\n return bytes;\r\n }", "public static byte[] To_Byte_Array (String filename) throws java.security.NoSuchAlgorithmException {\n byte[] data = null;\n // MessageDigest hash = MessageDigest.getInstance(\"SHA-512\");//SHA2 //removed\n\n //Streams, in:\n File textFile;//Textdatei\n FileInputStream in;//Dateieingabe-Stream\n\n try {\n\n textFile = new File(filename);\n in = new FileInputStream(textFile);\n int size = (int)textFile.length(); // Dateilaenge\n int read = 0; // Anzahl der gelesenen Zeichen\n data = new byte[size]; // Lesepuffer\n // Auslesen der Datei\n while (read < size)\n read =+ in.read(data, read, size-read);\n in.close();\n // Schreiben des Lesepuffers in Instanz von MessageDigest und speichern des Hash-Werts in message\n //hash.update (data);//removed\n //message=hash.digest ();//removed\n\n\n }//try\n catch (IOException ex) {\n ex.printStackTrace();\n }\n return data;//added\n }", "private static byte[] getFileAsByte(String pathFile) {\n\t\tFile file = new File(pathFile);\n\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(file);\n\t\t\tbyte fileContent[] = new byte[(int) file.length()];\n\t\t\tfin.read(fileContent);\n\t\t\tfin.close();\n\n\t\t\treturn fileContent;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLOGGER.error(\"File not found: \" + e);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Exception while reading the file: \" + e);\n\t\t}\n\t\treturn null;\n\t}", "public byte[] getFile(final String file) throws RemoteException;", "public static byte[] getByteArrayFromFilePath(String filePath) throws IOException {\n InputStream inputStream = new FileInputStream(filePath);\n return Util.toByteArray(inputStream);\n }", "static byte[] readContents(File file) {\n if (!file.isFile()) {\n throw new IllegalArgumentException(\"must be a normal file\");\n }\n try {\n return Files.readAllBytes(file.toPath());\n } catch (IOException excp) {\n throw new IllegalArgumentException(excp.getMessage());\n }\n }", "public static byte[] toByteArray(Path path) {\n\t\tvalidateFile(path);\n\t\ttry {\n\t\t\treturn Files.readAllBytes(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "private static byte[] getFileBytes(String filePath) {\n try {\n return Files.readAllBytes(Paths.get(filePath));\n } catch (IOException e) {\n throw new RuntimeException(\"I/O exception reading contents of file \" + filePath, e);\n }\n }", "private byte[] convertPhotoFileTOBytes(File file) throws IOException {\r\n FileInputStream fis = new FileInputStream(file);\r\n Bitmap bm = BitmapFactory.decodeStream(fis);\r\n return getBytesFromBitmap(bm);\r\n }", "public static byte[] fileToZipBytes(final File file) throws IOException {\n\n if (file == null || !file.exists()) {\n throw new IllegalArgumentException(\"File must not be null\");\n }\n\n if (file.isFile() && file.getName().endsWith(\".zip\")) {\n\n // This is zip already\n return FileUtils.readFileToByteArray(file);\n\n } else {\n\n // Non zip file, needs to be zipped\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\n final ZipOutputStream zos = new ZipOutputStream(baos);\n appendFile(zos, null, file);\n zos.close();\n\n return baos.toByteArray();\n\n }\n \n }", "public static byte[] bytesFromFile(File file) throws Exception {\n if (!file.exists()) {\n return null;\n }\n FileImageInputStream in = null;\n try {\n byte bytes[] = new byte[(int) file.length()];\n in = new FileImageInputStream(file);\n in.read(bytes);\n return bytes;\n } finally {\n if (in != null) {\n in.close();\n }\n }\n }", "public byte[] getBytes() throws IOException {\r\n return mFile.getBytes();\r\n }", "static byte[] getFileAsByteArray(String filename) {\n\n byte[] fileDisk = new byte[DISK_SIZE];\n\n try {\n byte[] array = Files.readAllBytes(new File(filename).toPath());\n return array;\n } catch (Exception e) {\n System.out.println(\"error\");\n System.exit(0);\n }\n\n return fileDisk;\n }", "public static byte[] readAllBytes(String filename) {\n return readAllBytes(filename, true);\n }", "public static byte[] readBytes(String file) throws IOException\n {\n try(InputStream in = getInputStream(file))\n {\n byte[] buffer = new byte[512];\n int size = 0;\n int read;\n while((read = in.read(buffer, size, buffer.length - size)) > 0)\n {\n size += read;\n if(size == buffer.length)\n buffer = Arrays.copyOf(buffer, size * 2);\n }\n\n if(size < buffer.length)\n buffer = Arrays.copyOf(buffer, size);\n\n return buffer;\n }\n }", "public byte[] readByteArrayFromFile(String fileName)\r\n\tthrows FileNotFoundException, IOException {\r\n\t\tFileInputStream theSourceInputStream = new FileInputStream(fileName);\r\n\t\tByteArrayOutputStream theSourceOutputStream = new ByteArrayOutputStream(\r\n\t\t\t\tBUFFER_SIZE);\r\n\t\tcopyStreamContent(theSourceInputStream, theSourceOutputStream);\r\n\t\tbyte[] theResult = theSourceOutputStream.toByteArray();\r\n\t\ttheSourceInputStream.close();\r\n\t\ttheSourceOutputStream.close();\r\n\t\treturn theResult;\r\n\t}", "public static byte[] convertImageToByteArray(File f) {\n\t\tBitmap bm = BitmapFactory.decodeFile(f.getAbsolutePath());\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbm.compress(Bitmap.CompressFormat.JPEG, 100, baos); // bm is the bitmap\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// object\n\t\tbyte[] b = baos.toByteArray();\n\t\treturn b;\n\t}", "public byte[] readFile(RAFFileEntry fileEntry) throws IOException {\n\t\tarchiveFile.setPosition(fileEntry.getDataOffset());\n\t\tif (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException(\"File too big.\");\n\t\tbyte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());\n\t\treturn data;\n\t}", "private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }", "public static byte[] convertir(String ruta) {\n\t\tFile file = new File(ruta);\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "@Nullable\n public byte[] getFileByteArray(String path) {\n\n try {\n return FileUtils.readFileToByteArray(getFile(path));\n } catch (Exception e) {\n //Eliten.getLogger().warning(\"File not found with path \" + path);\n }\n\n return null;\n }", "public byte[] fileToBlob() throws IOException {\n long numBlocks = 0L;\n int blockSize = 0x10000;\n int leftOver = 0;\n int pos = 0;\n OutputStream stream;\n numBlocks = BigInteger.valueOf(m_size).divide(BigInteger.valueOf(blockSize)).longValue();\n leftOver = BigInteger.valueOf(m_size).mod(BigInteger.valueOf(blockSize)).intValue();\n byte[] binByte2 = new byte[m_size];\n System.arraycopy(m_parent.m_binArray, m_startData, binByte2, 0, m_size);\n return binByte2;\n }", "public static byte[] compressFile(File inFile) throws IOException, CompressorException {\n if(inFile==null) {\n throw new IllegalArgumentException(\"Null value for inFile\");\n }\n if( FileUtils.verifyFile(inFile.getAbsolutePath()) ) {\n throw new IllegalArgumentException(\"Unable to access file=\"+inFile.getAbsolutePath());\n }\n SyncCompressInMemory compress = SyncCompressInMemory.newCompression();\n compress.write(org.apache.commons.io.FileUtils.readFileToString(inFile, Charset.defaultCharset()));\n compress.close();\n return compress.getByteArray();\n }", "private byte[] getStreamArquivo(File arquivo) throws IOException\n\t{\n\t\t/* Define o tamanho do buffer a ser lido do arquivo (max 32kb),\n\t\t * faz a criacao de um buffer em memoria para ir armazenando os dados\n\t\t * lidos e entao apos a leitura faz o envio dos dados para o GPP\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tFileInputStream fileInput = new FileInputStream(arquivo);\n\t\tByteArrayOutputStream bufferArquivo = new ByteArrayOutputStream();\n\n\t\tbyte[] data = new byte[sizeBuffer];\n\t\tint count=0;\n\t\twhile ( (count = fileInput.read(data)) != -1 )\n\t\t\tbufferArquivo.write(data,0,count);\n\t\t\n\t\treturn bufferArquivo.toByteArray();\n\t}", "public static byte[] readFileToByteArray(String aFileName) {\n byte[] res;\n try {\n res = org.apache.commons.io.FileUtils.readFileToByteArray(new File(aFileName));\n } catch (IOException e) {\n res = null;\n }\n return res;\n }", "public abstract byte[] getBytes(String path) throws IOException, ClassNotFoundException;", "private static String readAllBytesJava7(String filePath) {\n String content = \"\";\n\n try {\n content = new String(Files.readAllBytes(Paths.get(filePath)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content;\n }", "public static byte[] readBytes(String filePath) {\n\t\ttry {\n\t\t\treturn IOUtils.toByteArray(new FileInputStream(new File(filePath)));\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\treturn null;\n\t}", "public abstract byte[] toByteArray();", "public abstract byte[] toByteArray();", "public static byte[] getByteArray(Context context, String fileName) throws IOException {\n return Util.toByteArray(getInputStream(context, fileName));\n }", "private byte[] readFile(String fileLocation){\n File myFile = new File(fileLocation);\n byte myByteArray[] = new byte[(int) myFile.length()];\n try {\n BufferedInputStream reader = new BufferedInputStream(new FileInputStream(myFile));\n reader.read(myByteArray,0,myByteArray.length);\n reader.close();\n }catch(FileNotFoundException e){\n System.out.println(\"The file has not been found: \"+e.getMessage());\n }catch(IOException e){\n System.out.println(\"problem with reading the file: \"+e.getMessage());\n }\n return myByteArray;\n }", "byte[] getByteContent() throws IOException;", "public static byte[] readAll(String filename) {\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(filename);\n\t\t\treturn readAll(fis);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t}\n\t}", "public byte[] getbyteArray() {\n byte[] output = new byte[header_size+fileData.length];\n output[0] = (byte)((type & 0xff00)>> 8);\n output[1] = (byte)(type & 0xff);\n output[2] = (byte)((length & 0xff00)>> 8);\n\t output[3] = (byte)(length & 0xff);\n output[4] = (byte)((clientID & 0xff00)>> 8);\n output[5] = (byte)(clientID & 0xff);\n output[6] = action;\n byte[] temp2 = ByteBuffer.allocate(4).putInt(sectionLength).array();\n for(int i=0;i<4;i++) {\n output[7+i] = temp2[i]; \n }\n temp2 = ByteBuffer.allocate(4).putInt(filePosition).array();\n for(int j=0;j<4;j++) {\n output[11+j] = temp2[j]; \n }\n //copy file data\n System.arraycopy(fileData, 0,output, 15,fileData.length); \n return output;\n }", "public byte[] getFile() {\n return file;\n }", "public byte[] toByteArray() throws IOException\n {\n try (InputStream is = createInputStream())\n {\n return is.readAllBytes();\n }\n }", "public byte[] getAssetFileToByte(AssetManager assetManager, String path) throws IOException {\n InputStream inputStream = assetManager.open(path);\n byte[] fileBytes = new byte[inputStream.available()];\n inputStream.read(fileBytes);\n inputStream.close();\n return fileBytes;\n }", "byte[] getFile(String sha) throws Exception;", "public static String getEncodedFile(File file) {\n InputStream fis = null;\n StringBuilder sb = new StringBuilder(\"\");\n try {\n fis = new FileInputStream(file);\n byte[] buffer = new byte[fis.available()];\n final int readLength = fis.read(buffer);\n Log.i(TAG, \"getEncodedFile: Read Length: \" + readLength);\n sb.append(Base64.encodeToString(buffer, Base64.DEFAULT));\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fis != null) {\n try {\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }", "public static void main(String[] args) {\n String filename = \"test.txt\";\n FileStream.getFileAsByteArray(filename);\n }", "public static byte[] convertirString(String archivo) {\n\t\ttry {\n\t\t\treturn archivo.getBytes(\"UTF-8\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public static byte[] ReadFileSync(String filePath)\n {\n byte[] bytes = new byte[0];\n try\n {\n //Instantiate the file object\n File file = new File(filePath);\n //Instantiate the input stread\n InputStream insputStream = new FileInputStream(file);\n long length = file.length();\n bytes = new byte[(int) length];\n \n insputStream.read(bytes);\n insputStream.close();\n\n }\n catch(Exception e)\n {\n Log.e(\"IO\", \"Failed to load file async: \"+filePath+e.toString());\n }\n return bytes;\n }", "public abstract byte[] toBytes() throws Exception;", "byte[] getBytes();", "byte[] getBytes();", "byte[] getFile(String filename) throws NoSuchFileException;", "public static byte[] readFileFully(File source) {\n DataInputStream raf = null;\n int length = (int)source.length();\n if(length <= 0)\n return null;\n\n byte[] data = new byte[length];\n try {\n raf = new DataInputStream(new BufferedInputStream(new FileInputStream(source)));\n raf.readFully(data);\n } catch(IOException ioe) {\n return null;\n } finally {\n IOUtils.close(raf);\n }\n \n return data;\n }", "public byte[] getFileBytes(){\n\t\treturn fileBytes;\n\t}", "FileObject getFile();", "FileObject getFile();", "public byte[] toByteArray() throws IOException {\n/* */ COSInputStream cOSInputStream;\n/* 501 */ ByteArrayOutputStream output = new ByteArrayOutputStream();\n/* 502 */ InputStream is = null;\n/* */ \n/* */ try {\n/* 505 */ cOSInputStream = createInputStream();\n/* 506 */ IOUtils.copy((InputStream)cOSInputStream, output);\n/* */ }\n/* */ finally {\n/* */ \n/* 510 */ if (cOSInputStream != null)\n/* */ {\n/* 512 */ cOSInputStream.close();\n/* */ }\n/* */ } \n/* 515 */ return output.toByteArray();\n/* */ }", "public static byte[] getByteArray(Operation opcode, String filename) {\n\n\t\tByteArrayOutputStream stream = new ByteArrayOutputStream();\n\n\t\tstream.write(0); // Initial 0 byte.\n\t\tstream.write(opcode.ordinal()); // 0 for error, 1 for read, 2 for write\n\t\tstream.write(filename.getBytes(), 0, filename.length());\n\t\tstream.write(0); // Separator\n\t\tstream.write(Config.DEFAULT_MODE.toString().getBytes(), 0, Config.DEFAULT_MODE.toString().length());\n\t\tstream.write(0); // Ending 0\n\n\t\treturn stream.toByteArray();\n\t}", "public static byte[] getImageBinary(File f) {\n BufferedImage bi;\n try {\n bi = ImageIO.read(f);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ImageIO.write(bi, \"jpg\", baos);\n byte[] bytes = baos.toByteArray();\n return bytes;\n //return encoder.encodeBuffer(bytes).trim();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "byte[] readBytes();", "public byte[] readRawFile(int fileID)throws Exception{\n\t\tResources rs = context.getResources();\r\n\t\tInputStream inputStream = rs.openRawResource(fileID);\r\n\t\tByteArrayOutputStream mArrayOutputStream = new ByteArrayOutputStream();\r\n\t\tbyte [] b = new byte[1024];\r\n\t\tint length =0;\r\n\t\twhile((length=inputStream.read(b, 0, b.length))!=-1){\r\n\t\t\tmArrayOutputStream.write(b, 0, length);\r\n\t\t}\r\n\t\tif(inputStream!=null){\r\n\t\t\tinputStream.close();\r\n\t\t}\r\n\t\treturn mArrayOutputStream.toByteArray();\r\n\t}", "public static byte[] toByteArray(InputStream in) throws IOException {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n copy(in, out);\n return out.toByteArray();\n }", "private byte[] getContent(File f) {\n byte[] content = null;\n\n try {\n FileInputStream fis = new FileInputStream(f);\n byte[] temp = new byte[fis.available()];\n fis.read(temp);\n fis.close();\n content = temp;\n } catch (IOException e) {\n System.err.println(e.getMessage());\n }\n\n return content;\n }", "protected String getEncodedFileContent() throws IOException\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n Path path = Paths.get(fullAttachmentFilename);\n byte[] byteArray = Files.readAllBytes(path);\n Base64 x = new Base64();\n String encodedFileContent = x.encodeAsString(byteArray);\n return encodedFileContent;\n }", "public static byte[] leerFichero(String nombreFichero) throws FileNotFoundException, IOException {\n\t\tFile file = new File(new File(\"C:\\\\\"), nombreFichero);\n\t\tint fileLength = (int) file.length();\n\t\t\n\t\tFileInputStream fileIn = null;\n\t\tbyte[] contenido = new byte[fileLength];\n\t\t\n\t\ttry {\n\t\t\tfileIn = new FileInputStream(file);\n\t\t\tfileIn.read(contenido);\n\t\t}\n\t\tfinally {\n\t\t\tif (fileIn != null) \n\t\t\t\tfileIn.close();\n\t\t}\n\t\treturn contenido;\n\t}", "public byte[] getReportFile(){\n \tbyte[] result = new byte[this.reportFile.length];\n System.arraycopy(this.reportFile, 0, result, 0, this.reportFile.length);\n return result;\n }", "private static String fileToString(String path) throws IOException {\n\n\t\tbyte[] encoded = Files.readAllBytes(Paths.get(path));\n\t\treturn new String(encoded, StandardCharsets.UTF_8);\n\t}", "static byte[] streamToBytes(final InputStream in) throws IOException {\n return streamToBytes(in, new byte[7]);\n }", "public byte[] getFileBytes(MessageObject messageObject) {\n\t\tMessageObject msgObject = winnowMessage(messageObject);\n\t\tif (messageObject.isUseTransform()) {\n\t\t\tdetransformMessageObject(messageObject);\n\t\t}\n\t\tbyte[] res = new byte[0];\n\t\tfor (MessagePart msgPart : msgObject.getMessageParts()) {\n\t\t\tres = concatByteArrays(res, msgPart.getMsg());\n\t\t}\n\t\treturn res;\n\t}", "public InputStreamToByteArray(byte buf[]) {\n this(buf, 0, buf.length);\n }", "protected byte[] stream2blob(InputStream is) throws IOException, IllegalArgumentException {\n return StreamUtils.stream2blob(is);\n }", "private static ByteBuffer internalReadFileAsByteArray(String path) throws IOException {\n ByteBuffer byteBuffer = null;\n Path filePath = FileSystems.getDefault().getPath(path);\n try (\n FileChannel fileChannel = FileChannel.open(filePath, StandardOpenOption.READ);) {\n Long size = fileChannel.size();\n if (size > Integer.MAX_VALUE) {\n throw new IOException(MessageFormat.format(\n \"File {0} is too large. Its size is {1,number,integer} bytes which is larger \" +\n \"then this method could handle ( {2,number,integer})\", path, size, Integer.MAX_VALUE));\n }\n byteBuffer = ByteBuffer.allocate(size.intValue());\n int readBytes = 0;\n int totalReadBytes = 0;\n int failureCounter = 0;\n while ((readBytes = fileChannel.read(byteBuffer)) >= 0 && totalReadBytes < size.intValue()) {\n if (readBytes > 0) {\n totalReadBytes += readBytes;\n if (failureCounter > 0) {\n failureCounter = 0;\n }\n } else {\n if (++failureCounter >= MAX_READ_FAILURES) {\n throw new IOException(MessageFormat.format(\"File {0} could not be read for unknown reason\", path));\n }\n }\n }\n }\n return (ByteBuffer) byteBuffer.flip();\n }", "public byte[] readfile(int pos) throws IOException\n {\n byte[] bytes = new byte[1024];\n f.seek(1024*pos);\n f.read(bytes);\n return bytes;\n }", "public static byte[] toByteArray(final InputStream input) throws IOException {\n final ByteArrayOutputStream output = new ByteArrayOutputStream();\n copy(input, output);\n return output.toByteArray();\n }", "public static char[] getFileContents(File file) {\n // char array to store the file contents in\n char[] contents = null;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file));\n StringBuffer sb = new StringBuffer();\n String line = \"\";\n while ((line = br.readLine()) != null) {\n // append the content and the lost new line.\n sb.append(line + \"\\n\");\n }\n contents = new char[sb.length()];\n sb.getChars(0, sb.length() - 1, contents, 0);\n\n assert (contents.length > 0);\n } catch (IOException e) {\n System.out.println(e.getMessage());\n }\n\n return contents;\n }", "public byte[] getFilecontent() {\n return filecontent;\n }", "public byte[] getFileContent() throws IOException {\n if (data != null) {\n return data;\n }\n if (tempFile != null) {\n return FileUtil.readBytes(tempFile);\n }\n return null;\n }", "public byte[] getBytesFromFile(String imagePath) throws IOException {\n File file = new File(imagePath);\n return Files.readAllBytes(file.toPath());\n }", "public static byte[] readFileContent(Path targetFilePath) throws KubernetesPluginException {\n File file = targetFilePath.toFile();\n // append if file exists\n if (file.exists() && !file.isDirectory()) {\n try {\n return Files.readAllBytes(targetFilePath);\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Unable to read contents of the file \" + targetFilePath);\n }\n }\n throw new KubernetesPluginException(\"Unable to read contents of the file \" + targetFilePath);\n }", "public static byte[] readBytes(String resource) {\n TByteList \t\tresult;\n InputStream \tin;\n byte[]\t\tbuffer;\n int \t\tread;\n\n result = new TByteArrayList();\n in = null;\n buffer = new byte[4096];\n\n try {\n in = Content.class.getClassLoader().getResourceAsStream(resource);\n while ((read = in.read(buffer)) > 0)\n\tresult.add(buffer, 0, read);\n }\n catch (Exception e) {\n LOGGER.log(Level.SEVERE, \"Failed to read bytes from resource file: \" + resource, e);\n return null;\n }\n finally {\n IOUtils.closeQuietly(in);\n }\n\n return result.toArray();\n }", "public byte[] toBytes() {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n try {\n writeTo(os);\n } catch (IOException e) {e.printStackTrace();}\n return os.toByteArray();\n }", "String getFile();", "String getFile();", "String getFile();", "byte[] load(String bucket, String file) throws IOException;", "public static byte[] inputStreamToBytes(InputStream in) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n try {\r\n byte[] buffer = new byte[1024];\r\n int len;\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error converting InputStream to byte[]: \"\r\n + e.getMessage());\r\n }\r\n return out.toByteArray();\r\n }", "public static byte [] convertirFoto(String ruta){\n byte[] icono;\n try {\n File rut=new File(ruta);\n icono = new byte[(int)rut.length()];\n InputStream input = new FileInputStream(ruta);\n input.read(icono);\n } catch (Exception ex) {\n return null;\n }\n return icono;\n }", "public byte[] serializeBinFile(byte[] bin, int offset, String filename){\n int binSize = bin.length;\n ByteBuffer buffer = ByteBuffer.allocate(filenameSize + offsetSize + binSize + headerSize + 2);\n serializeHeader(buffer);\n buffer.put(formatString(filename, filenameSize).getBytes());\n buffer.putInt(offset);\n buffer.putShort(checksum);\n buffer.put(bin);\n return buffer.array();\n }", "public static byte[] readResourceFile(String path) throws IOException {\n if (path == null) {\n throw new NullPointerException(\"argument 'path' cannot be null\");\n }\n\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n InputStream in = null;\n try {\n in = Example.class.getResourceAsStream(path);\n if (in == null) {\n throw new IOException(\"Resources not found: \" + path);\n }\n\n int byteRead = 0;\n byte[] b = new byte[8096];\n\n while ((byteRead = in.read(b)) != -1) {\n bout.write(b, 0, byteRead);\n }\n } finally {\n if (in != null) {\n try {\n in.close();\n } catch (IOException ex) {\n }\n }\n }\n\n return bout.toByteArray();\n }", "public static byte[] toByteArray(final Reader input, final String encoding) throws IOException {\n return toByteArray(input, Charset.forName(encoding));\n }", "public static byte[] decodeToBytes(InputStream in) throws IOException {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tdecode(in, out, false);\n\t\treturn out.toByteArray();\n\t}", "default byte[] decodificarBase64(String archivoBase64) {\n\t\treturn Base64.getDecoder().decode(archivoBase64);\n\t}" ]
[ "0.8155481", "0.772582", "0.7340409", "0.73001117", "0.7141515", "0.7053219", "0.7031124", "0.7007456", "0.6983011", "0.690156", "0.6898443", "0.6861498", "0.68344665", "0.6828765", "0.68211037", "0.68041277", "0.68018603", "0.6719386", "0.66901106", "0.6625925", "0.66229457", "0.661462", "0.6550011", "0.6529171", "0.6508622", "0.65063226", "0.65019584", "0.6478905", "0.6411903", "0.64068455", "0.63462144", "0.6326523", "0.6319755", "0.6315161", "0.6314905", "0.62315106", "0.62283504", "0.6148089", "0.61058795", "0.60951716", "0.600341", "0.5979413", "0.5979413", "0.59768", "0.5954127", "0.5908284", "0.5900281", "0.5859227", "0.5847825", "0.58279085", "0.58272403", "0.57857496", "0.5772773", "0.5764037", "0.57245815", "0.57205963", "0.5716942", "0.57128924", "0.57128924", "0.5709932", "0.5709857", "0.5699155", "0.56550545", "0.56550545", "0.5636391", "0.56153697", "0.56137747", "0.5606574", "0.56000316", "0.55819416", "0.557695", "0.55678165", "0.55615354", "0.5546213", "0.5541791", "0.5528234", "0.54814243", "0.54802907", "0.5474875", "0.5437704", "0.54290754", "0.54260474", "0.5403356", "0.54004586", "0.5372184", "0.53706247", "0.5368139", "0.53579813", "0.53414667", "0.53358525", "0.53358525", "0.53358525", "0.5330798", "0.5327969", "0.5324448", "0.5322235", "0.53158474", "0.5313936", "0.52910376", "0.5290546" ]
0.57028687
61
This is the main decoder of file to byte[]
public byte[] decodeContent(String contentDataString){ return Base64.decodeBase64(contentDataString); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] file2byte() {\n\t\tbyte[] result = null;\n\t\t\n\t\tif (this.isFile()) {\n\t\t\tBufferedInputStream bufferedInputStream = null;\n\t\t\tByteArrayOutputStream byteArrayOutputStream = null;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tbufferedInputStream = new BufferedInputStream(new FileInputStream(this));\n\t\t\t\tbyteArrayOutputStream = new ByteArrayOutputStream(1024);\n\n\t\t\t\tbyte[] buffer = new byte[1024];\n\t\t\t\tint size = 0;\n\t\t\t\twhile ((size = bufferedInputStream.read(buffer)) != -1) {\n\t\t\t\t\tbyteArrayOutputStream.write(buffer, 0, size);\n\t\t\t\t}\n\t\t\t\tbufferedInputStream.close();\n\n\t\t\t\tresult = byteArrayOutputStream.toByteArray();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bufferedInputStream != null) bufferedInputStream.close();\n\t\t\t\t\tif (byteArrayOutputStream != null) byteArrayOutputStream.close();\n\t\t\t\t} catch (Exception exception) {\n\t\t\t\t\tbufferedInputStream = null;\n\t\t\t\t\tbyteArrayOutputStream = null;\n\t\t\t\t\texception.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "byte[] decodeBytes();", "private byte[] decode(Node root) {\n BitSet dataInBits = BitSet.valueOf(Arrays.copyOfRange(buffer.array(), bufferPosition, buffer.capacity()));\n int bitIndex = 0;\n\n ByteBuffer result = ByteBuffer.allocate(inputFileSize);\n\n for (int i = 0; i < inputFileSize; i++) {\n Node node = root;\n while (!node.hasValue() && i < inputFileSize) {\n boolean bit = dataInBits.get(bitIndex);\n bitIndex += 1;\n if (bit) node = node.getRightChild();\n else node = node.getLeftChild();\n }\n if (node.hasValue()) {\n result.put(node.getValue());\n }\n }\n\n // preparing byte buffer for converting to byte array\n int pos = result.position();\n result.flip();\n byte[] resultArray = new byte[pos];\n result.get(resultArray);\n return resultArray;\n }", "public byte[] deserializeBinFile(byte[] buf){\n int size = buf.length;\n ByteBuffer buffer = ByteBuffer.wrap(buf);\n msgType = buffer.getShort(0);\n byte[] srcIP_temp = new byte[15];\n System.arraycopy(buf, 2, srcIP_temp, 0, 15);\n String srcIP_str = new String(srcIP_temp);\n srcIP = srcIP_str.trim();\n srcPort = buffer.getInt(17);\n desCost = buffer.getFloat(21);\n byte[] desIP_temp = new byte[15];\n System.arraycopy(buf, 25, desIP_temp, 0, 15);\n String desIP_str = new String(desIP_temp);\n desIP = desIP_str.trim();\n desPort = buffer.getInt(40);\n byte[] filenameBuf = new byte[filenameSize];\n System.arraycopy(buf, 44, filenameBuf, 0, filenameSize);\n String filename_str = new String(filenameBuf);\n filename = filename_str.trim();\n offset = buffer.getInt(44 + filenameSize);\n checksum = buffer.getShort(44+filenameSize+offsetSize);\n int pos = 44+filenameSize+offsetSize+2;\n if(pos>=size) return null;\n byte[] binBytes = new byte[size-pos];\n System.arraycopy(buf, pos, binBytes, 0, binBytes.length);\n return binBytes;//the returned bin array which does not include the offset.\n }", "public static byte[] convertir(File file) {\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "byte[] readBytes();", "byte[] inflate(byte[] data) throws IOException;", "public static byte[] To_Byte_Array (String filename) throws java.security.NoSuchAlgorithmException {\n byte[] data = null;\n // MessageDigest hash = MessageDigest.getInstance(\"SHA-512\");//SHA2 //removed\n\n //Streams, in:\n File textFile;//Textdatei\n FileInputStream in;//Dateieingabe-Stream\n\n try {\n\n textFile = new File(filename);\n in = new FileInputStream(textFile);\n int size = (int)textFile.length(); // Dateilaenge\n int read = 0; // Anzahl der gelesenen Zeichen\n data = new byte[size]; // Lesepuffer\n // Auslesen der Datei\n while (read < size)\n read =+ in.read(data, read, size-read);\n in.close();\n // Schreiben des Lesepuffers in Instanz von MessageDigest und speichern des Hash-Werts in message\n //hash.update (data);//removed\n //message=hash.digest ();//removed\n\n\n }//try\n catch (IOException ex) {\n ex.printStackTrace();\n }\n return data;//added\n }", "public byte[] fileToBlob() throws IOException {\n long numBlocks = 0L;\n int blockSize = 0x10000;\n int leftOver = 0;\n int pos = 0;\n OutputStream stream;\n numBlocks = BigInteger.valueOf(m_size).divide(BigInteger.valueOf(blockSize)).longValue();\n leftOver = BigInteger.valueOf(m_size).mod(BigInteger.valueOf(blockSize)).intValue();\n byte[] binByte2 = new byte[m_size];\n System.arraycopy(m_parent.m_binArray, m_startData, binByte2, 0, m_size);\n return binByte2;\n }", "public abstract byte[] toByteArray();", "public abstract byte[] toByteArray();", "public static byte[] getByteArrayFromFile(File file) throws UnsupportedEncodingException {\n return (fileLoggerInstance == null) ? new byte[]{} : fileLoggerInstance.getFileContentsAsByteArray(file);\n }", "public abstract byte[] getEncoded();", "private byte[] decode(ByteBuffer bytes) {\n \treturn bytes.array();\r\n }", "byte[] getBytes();", "byte[] getBytes();", "byte[] getByteContent() throws IOException;", "public byte[] getbyteArray() {\n byte[] output = new byte[header_size+fileData.length];\n output[0] = (byte)((type & 0xff00)>> 8);\n output[1] = (byte)(type & 0xff);\n output[2] = (byte)((length & 0xff00)>> 8);\n\t output[3] = (byte)(length & 0xff);\n output[4] = (byte)((clientID & 0xff00)>> 8);\n output[5] = (byte)(clientID & 0xff);\n output[6] = action;\n byte[] temp2 = ByteBuffer.allocate(4).putInt(sectionLength).array();\n for(int i=0;i<4;i++) {\n output[7+i] = temp2[i]; \n }\n temp2 = ByteBuffer.allocate(4).putInt(filePosition).array();\n for(int j=0;j<4;j++) {\n output[11+j] = temp2[j]; \n }\n //copy file data\n System.arraycopy(fileData, 0,output, 15,fileData.length); \n return output;\n }", "default byte[] decodificarBase64(String archivoBase64) {\n\t\treturn Base64.getDecoder().decode(archivoBase64);\n\t}", "public abstract byte[] toBytes() throws Exception;", "public byte[] bytes() throws IOException {\n try(FileInputStream fis = new FileInputStream(file)) {\n return ByteStreams.toByteArray(fis);\n }\n }", "private byte[] getStreamArquivo(File arquivo) throws IOException\n\t{\n\t\t/* Define o tamanho do buffer a ser lido do arquivo (max 32kb),\n\t\t * faz a criacao de um buffer em memoria para ir armazenando os dados\n\t\t * lidos e entao apos a leitura faz o envio dos dados para o GPP\n\t\t */\n\t\tint sizeBuffer = Integer.parseInt(getPropriedade(\"ordemVoucher.tamanhoBufferArquivos\"));\n\t\tFileInputStream fileInput = new FileInputStream(arquivo);\n\t\tByteArrayOutputStream bufferArquivo = new ByteArrayOutputStream();\n\n\t\tbyte[] data = new byte[sizeBuffer];\n\t\tint count=0;\n\t\twhile ( (count = fileInput.read(data)) != -1 )\n\t\t\tbufferArquivo.write(data,0,count);\n\t\t\n\t\treturn bufferArquivo.toByteArray();\n\t}", "public abstract byte[] encode () throws IOException;", "private byte[] convertPhotoFileTOBytes(File file) throws IOException {\r\n FileInputStream fis = new FileInputStream(file);\r\n Bitmap bm = BitmapFactory.decodeStream(fis);\r\n return getBytesFromBitmap(bm);\r\n }", "private static byte[] m136428a(File file) throws IOException {\n FileInputStream fileInputStream = new FileInputStream(file);\n byte[] bArr = new byte[((int) file.length())];\n int i = 0;\n while (i < bArr.length) {\n int read = fileInputStream.read(bArr, i, bArr.length - i);\n if (read < 0) {\n break;\n }\n i += read;\n }\n if (i >= bArr.length) {\n fileInputStream.close();\n return bArr;\n }\n StringBuilder sb = new StringBuilder(\"Could not completely read file \");\n sb.append(file.getName());\n throw new IOException(sb.toString());\n }", "public abstract byte[] getBytes(String path) throws IOException, ClassNotFoundException;", "private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream( factory.length()*4 + 4 + count );\n DataOutputStream dout = new DataOutputStream( out );\n \n dout.writeUTF( factory );\n dout.writeInt( count );\n \n for( int i = 0; i < count; i++ ){\n int read = in.read();\n if( read == -1 )\n throw new EOFException( \"unexpectetly reached end of file\" );\n dout.write( read );\n }\n \n dout.close();\n return out.toByteArray();\n }", "byte[] getData();", "byte[] getData();", "byte[] getData();", "byte[] getData();", "private static byte[] getFileAsByte(String pathFile) {\n\t\tFile file = new File(pathFile);\n\n\t\ttry {\n\t\t\tFileInputStream fin = new FileInputStream(file);\n\t\t\tbyte fileContent[] = new byte[(int) file.length()];\n\t\t\tfin.read(fileContent);\n\t\t\tfin.close();\n\n\t\t\treturn fileContent;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLOGGER.error(\"File not found: \" + e);\n\t\t} catch (IOException e) {\n\t\t\tLOGGER.error(\"Exception while reading the file: \" + e);\n\t\t}\n\t\treturn null;\n\t}", "private static void decode() throws IOException{\n File file = new File(_encodedBinFile);\n String longStringAsFile;\n \n //DataInputStream dis;\n FileWriter w;\n try {\n //dis = new DataInputStream(new FileInputStream(file));\n longStringAsFile = getLongStringAsFile();\n //dis.close();\n w = new FileWriter(\"decoded.txt\");\n Node traverser = root;\n for(int i=0; i < longStringAsFile.length(); i++){\n if(longStringAsFile.charAt(i) == '0'){\n //go to left\n if (traverser.getLeftPtr() == null){\n //fallen off the tree. Print to file\n if (i == longStringAsFile.length() - 1 ){\n w.write(((LeafNode)traverser).getData());\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getLeftPtr();\n }\n }\n else{\n traverser = traverser.getLeftPtr();\n }\n }\n else{\n //go to right of tree\n if (traverser.getRightPtr() == null){\n //fallen off the tree. PRint to file\n if (i == longStringAsFile.length() - 1){\n w.write(((LeafNode)traverser).getData() );\n }\n else{\n w.write(((LeafNode)traverser).getData() + \"\\n\");\n traverser = root.getRightPtr();\n }\n\n }\n else{\n traverser = traverser.getRightPtr();\n }\n }\n \n }\n //dis.close();\n w.close();\n } catch (IOException ex) {\n Logger.getLogger(decoder.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }", "public byte[] serializeBinFile(byte[] bin, int offset, String filename){\n int binSize = bin.length;\n ByteBuffer buffer = ByteBuffer.allocate(filenameSize + offsetSize + binSize + headerSize + 2);\n serializeHeader(buffer);\n buffer.put(formatString(filename, filenameSize).getBytes());\n buffer.putInt(offset);\n buffer.putShort(checksum);\n buffer.put(bin);\n return buffer.array();\n }", "byte[] getContent();", "protected byte[] stream2blob(InputStream is) throws IOException, IllegalArgumentException {\n return StreamUtils.stream2blob(is);\n }", "byte[] toByteArray() throws IOException {\n return ProtobufUtil.prependPBMagic(convert().toByteArray());\n }", "public static byte[] getImageBinary(File f) {\n BufferedImage bi;\n try {\n bi = ImageIO.read(f);\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n ImageIO.write(bi, \"jpg\", baos);\n byte[] bytes = baos.toByteArray();\n return bytes;\n //return encoder.encodeBuffer(bytes).trim();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public byte[] decifrar(String archivo) {\n\t\tVector[] texto = null;\n\t\tMessageDigest md;\n\t\tPolinomio polinomio = new Polinomio();\n\t\tLinkedList<Vector> lista = new LinkedList<Vector>();\n\t\ttry {\n\t\t\tString linea;\n\t\t\tFileInputStream fis = new FileInputStream(archivo + \".frg\");\n\t\t\tDataInputStream in = new DataInputStream(fis);\n\t\t\tBufferedReader bf = new BufferedReader(new InputStreamReader(in));\n\t\t\twhile((linea = bf.readLine()) != null) {\n\t\t\t\tlista.add(new Vector(2));\n\t\t\t\t((Vector)lista.getLast()).add(0, new BigInteger(linea.substring(0, linea.indexOf(','))));\n\t\t\t\t((Vector)lista.getLast()).add(1, new BigInteger(linea.substring(linea.indexOf(',') + 1 , linea.length())));\n\t\t\t}\n\t\t\tin.close();\n\t\t\ttexto = new Vector[lista.size()];\n\t\t\tfor(int i = 0; i < texto.length; i++)\n\t\t\t\ttexto[i] = (Vector)lista.get(i);\n\t\t\treturn polinomio.interpolacion(new BigInteger(\"0\"), texto).toByteArray();\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(\"Error al decifrar!\");\n\t\t}\n\t\treturn null;\n\t}", "public byte[] getBytes() throws IOException {\r\n return mFile.getBytes();\r\n }", "public byte[] marshall();", "public byte[] readFile(RAFFileEntry fileEntry) throws IOException {\n\t\tarchiveFile.setPosition(fileEntry.getDataOffset());\n\t\tif (fileEntry.getDataSize() > 0xFFFFFFFFL) throw new IOException(\"File too big.\");\n\t\tbyte[] data = archiveFile.readBytes((int) fileEntry.getDataSize());\n\t\treturn data;\n\t}", "public static byte[] getBytesFromFile(File file) throws IOException {\r\n\r\n InputStream is = new FileInputStream(file);\r\n\r\n // Get the size of the file\r\n long length = file.length();\r\n\r\n /*\r\n * You cannot create an array using a long type. It needs to be an int\r\n * type. Before converting to an int type, check to ensure that file is\r\n * not loarger than Integer.MAX_VALUE;\r\n */\r\n if (length > Integer.MAX_VALUE) {\r\n System.out.println(\"File is too large to process\");\r\n return null;\r\n }\r\n\r\n // Create the byte array to hold the data\r\n byte[] bytes = new byte[(int) length];\r\n\r\n // Read in the bytes\r\n int offset = 0;\r\n int numRead = 0;\r\n while ((offset < bytes.length) &&\r\n ((numRead = is.read(bytes, offset, bytes.length - offset)) >= 0)) {\r\n\r\n offset += numRead;\r\n\r\n }\r\n\r\n // Ensure all the bytes have been read in\r\n if (offset < bytes.length) {\r\n throw new IOException(\"Could not completely read file \" + file.getName());\r\n }\r\n\r\n is.close();\r\n return bytes;\r\n\r\n }", "public static byte[] readBytesFromFile(File f) {\r\n byte[] bytes = null;\r\n try {\r\n int filesize = (int) f.length();\r\n bytes = new byte[filesize];\r\n DataInputStream in = new DataInputStream(new FileInputStream(f));\r\n in.readFully(bytes);\r\n in.close();\r\n } catch (Exception e) {\r\n System.out.println(\"Error reading byte[] from file: \"\r\n + e.getMessage());\r\n return null;\r\n }\r\n return bytes;\r\n }", "public static byte[] readFile(File file, int valueType) {\n if (!file.exists()) {\n Log.e(TAG, \"The file doesn't exist\");\n }\n try {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n FileInputStream fileInputStream = new FileInputStream(file);\n BufferedInputStream bufferedInputStream = new BufferedInputStream(fileInputStream);\n byte[] buf = new byte[4096];\n switch (valueType) {\n case 0:\n case 1:\n case 2:\n case 3:\n while (bufferedInputStream.read(buf) != -1) {\n byteArrayOutputStream.write(buf, 16 * valueType, 16);\n }\n break;\n case 4:\n if (!file.getName().equals(\"E_SK2\")) {\n if (!file.getName().equals(\"E_PIN2\")) {\n while (true) {\n int len = bufferedInputStream.read(buf);\n if (len == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, (len - 32) - (16 * 1));\n }\n }\n } else {\n while (true) {\n int len2 = bufferedInputStream.read(buf);\n if (len2 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 1, ((len2 - 32) - (16 * 1)) - PKLENGTH);\n }\n }\n }\n } else {\n while (true) {\n int len3 = bufferedInputStream.read(buf);\n if (len3 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 16 * 4, (len3 - 32) - (16 * 4));\n }\n }\n }\n case 5:\n while (true) {\n int len4 = bufferedInputStream.read(buf);\n if (len4 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, len4 - 32, 32);\n }\n }\n case PUBLICKEY /* 7 */:\n while (true) {\n int len5 = bufferedInputStream.read(buf);\n if (len5 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, (len5 - 32) - PKLENGTH, PKLENGTH);\n }\n }\n case 8:\n while (true) {\n int len6 = bufferedInputStream.read(buf);\n if (len6 == -1) {\n break;\n } else {\n byteArrayOutputStream.write(buf, 0, len6 - 32);\n }\n }\n }\n byte[] buffer = byteArrayOutputStream.toByteArray();\n bufferedInputStream.close();\n fileInputStream.close();\n byteArrayOutputStream.close();\n return buffer;\n } catch (IOException e) {\n Log.e(TAG, \"read file exception!\" + e.getMessage());\n return new byte[0];\n }\n }", "public abstract Object decode(InputStream is) ;", "private static String readAllBytesJava7(String filePath) {\n String content = \"\";\n\n try {\n content = new String(Files.readAllBytes(Paths.get(filePath)));\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return content;\n }", "public byte[] convertToFile(String content, String filename){\n byte[] contentByteArray = null; \n try{\n //Converting a Base64 String into Content byte array \n\t\t\t\n\t\t\tcontentByteArray = decodeContent(content);\n\t\t\t\n\t\t\t\n\t\t\t// Write a content byte array into file system \n\t\t\t \n\t\t\tFileOutputStream contentOutFile = new FileOutputStream(\"resources/\" + filename, false);\n\t\t\tcontentOutFile.write(contentByteArray);\n\t\t\t\n\t\t\t\n\t\t\tcontentOutFile.close();\n\t\t\t\n\t\t\tSystem.out.println(\"Content Successfully Manipulated!\");\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Content not found\" + e);\n\t\t} catch (IOException ioe) {\n\t\t\tSystem.out.println(\"Exception while reading the content\" + ioe);\n\t\t}\n \n return contentByteArray;\n }", "public static byte[] getByteArray(Operation opcode, String filename) {\n\n\t\tByteArrayOutputStream stream = new ByteArrayOutputStream();\n\n\t\tstream.write(0); // Initial 0 byte.\n\t\tstream.write(opcode.ordinal()); // 0 for error, 1 for read, 2 for write\n\t\tstream.write(filename.getBytes(), 0, filename.length());\n\t\tstream.write(0); // Separator\n\t\tstream.write(Config.DEFAULT_MODE.toString().getBytes(), 0, Config.DEFAULT_MODE.toString().length());\n\t\tstream.write(0); // Ending 0\n\n\t\treturn stream.toByteArray();\n\t}", "public static byte[] readBytes(String file) throws IOException\n {\n try(InputStream in = getInputStream(file))\n {\n byte[] buffer = new byte[512];\n int size = 0;\n int read;\n while((read = in.read(buffer, size, buffer.length - size)) > 0)\n {\n size += read;\n if(size == buffer.length)\n buffer = Arrays.copyOf(buffer, size * 2);\n }\n\n if(size < buffer.length)\n buffer = Arrays.copyOf(buffer, size);\n\n return buffer;\n }\n }", "public byte[] getData();", "public static byte[] decodeToBytes(InputStream in) throws IOException {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tdecode(in, out, false);\n\t\treturn out.toByteArray();\n\t}", "public static byte[] writeToByteArray(File file) throws IOException {\n return writeToByteArray(new FileInputStream(file));\n }", "public static void main(String[] args) {\n String filename = \"test.txt\";\n FileStream.getFileAsByteArray(filename);\n }", "public byte[] read();", "public byte[] toArray()\r\n {\r\n return _stream.toByteArray();\r\n }", "public abstract byte[] parse(String input);", "ByteSequence getByteSequence(Key key) throws IOException;", "byte[] toByteArray(ORecordVersion version);", "public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }", "static byte[] getFileAsByteArray(String filename) {\n\n byte[] fileDisk = new byte[DISK_SIZE];\n\n try {\n byte[] array = Files.readAllBytes(new File(filename).toPath());\n return array;\n } catch (Exception e) {\n System.out.println(\"error\");\n System.exit(0);\n }\n\n return fileDisk;\n }", "public byte[] serialize();", "public byte[] getSource();", "public byte[] getContent();", "public static void decode(File fIn) throws IOException {\n\t\tdecode(fIn, fIn, true);\n\t}", "byte[] readBytes(File f) throws Exception {\n\n byte[] b_total = new byte[actualSize];\n int step = actualSize / N;\n\n byte[] b = new byte[step];\n ByteBuffer bb = ByteBuffer.allocate(step);\n\n for (int i = 0; i < N; ++i) {\n \n // READ NEXT PORTION OF BYTES VIA FIS:\n\n fis.read(b);\n System.arraycopy(b, 0, b_total, i * step, b.length);\n\n ++i;\n \n if (i < N) {\n\n bb.clear(); // needed to prepare ByteBuffer for channel read / put operations \n\n // READ NEXT PORTION OF BYTES VIA CHANNEL:\n\n inChannel.read(bb);\n byte[] arr = bb.array();\n System.arraycopy(arr, 0, b_total, i * step, arr.length);\n }\n }\n\n return b_total;\n }", "public static byte[] convertImageToByteArray(File f) {\n\t\tBitmap bm = BitmapFactory.decodeFile(f.getAbsolutePath());\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\n\t\tbm.compress(Bitmap.CompressFormat.JPEG, 100, baos); // bm is the bitmap\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// object\n\t\tbyte[] b = baos.toByteArray();\n\t\treturn b;\n\t}", "public byte[] readRawFile(int fileID)throws Exception{\n\t\tResources rs = context.getResources();\r\n\t\tInputStream inputStream = rs.openRawResource(fileID);\r\n\t\tByteArrayOutputStream mArrayOutputStream = new ByteArrayOutputStream();\r\n\t\tbyte [] b = new byte[1024];\r\n\t\tint length =0;\r\n\t\twhile((length=inputStream.read(b, 0, b.length))!=-1){\r\n\t\t\tmArrayOutputStream.write(b, 0, length);\r\n\t\t}\r\n\t\tif(inputStream!=null){\r\n\t\t\tinputStream.close();\r\n\t\t}\r\n\t\treturn mArrayOutputStream.toByteArray();\r\n\t}", "byte[] getEByteArray();", "public static byte[] convertir(String ruta) {\n\t\tFile file = new File(ruta);\n\t\tbyte[] a = new byte[(int) file.length()];\n\t\ttry {\n\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\tfis.read(a);\n\t\t\tfis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn a;\n\t}", "public byte[] getFileBytes(){\n\t\treturn fileBytes;\n\t}", "private String decodeFile(String encodedFileName, int bit) throws Exception{\r\n\r\n\t\tdouble maxSize = Math.pow(2, bit);\r\n\r\n\t\t//InputStream and Reader to read the encoded file\r\n\t\tInputStream fileEncoded = new FileInputStream(encodedFileName);\r\n\t\tReader reader = new InputStreamReader(fileEncoded,\"UTF-16BE\");\r\n\t\tReader br = new BufferedReader(reader);\r\n\t\tint tableSize = 255;\r\n\r\n\t\tList<Integer> encodedList = new ArrayList<Integer>();\r\n\t\tdouble fileData = 0;\r\n\t\twhile((fileData = br.read())!=-1){\r\n\t\t\tencodedList.add((int)fileData);\r\n\t\t}\r\n\t\tbr.close();\r\n\r\n\t\t//Map to store the Character in a HashMap and then compare it to check the key or Value\r\n\t\tMap<Integer, String> charTable = new HashMap<Integer,String>();\r\n\t\tfor(int i =0; i<=255;i++){\r\n\t\t\tcharTable.put( i, \"\" + (char)i);\r\n\t\t}\r\n\t\t//Implementing the LZW algorithm\r\n\t\tString encodeValue = encodedList.get(0).toString();\r\n\t\tStringBuffer decodedStringBuffer = new StringBuffer();\r\n\r\n\t\tfor (int key:encodedList) {\r\n\r\n\t\t\tString value = \"\";\r\n\t\t\tif (charTable.containsKey(key))\r\n\t\t\t{\t//Storing the string from the HashMap to value\r\n\t\t\t\tvalue = charTable.get(key);\r\n\t\t\t}\r\n\t\t\telse if (key == tableSize)\r\n\t\t\t{//Append if key==tablesize to value\r\n\t\t\t\tvalue = encodeValue + encodeValue.charAt(0);\r\n\t\t\t}\r\n\t\t\tdecodedStringBuffer.append(value);\r\n\r\n\t\t\tif(tableSize < maxSize )\r\n\t\t\t{\t//If not present then checking tablesize with maxsize and adding into the HashMap\r\n\t\t\t\tcharTable.put(tableSize++, encodeValue + value.charAt(0));\r\n\t\t\t}\r\n\t\t\tencodeValue = value;\r\n\t\t}\r\n\t\t//Return the decodedStringBuffer which contains the decoded values\r\n\t\treturn decodedStringBuffer.toString();\r\n\t}", "public byte[] getFile(final String file) throws RemoteException;", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }", "byte [] getBuffer ();", "static byte[] streamToBytes(final InputStream in) throws IOException {\n return streamToBytes(in, new byte[7]);\n }", "public static byte[] readAllBytes(String filename) {\n return readAllBytes(filename, true);\n }", "public byte[] toByteArray() throws IOException\n {\n try (InputStream is = createInputStream())\n {\n return is.readAllBytes();\n }\n }", "public byte[] getEncoded() \n {\n try\n {\n return super.getEncoded();\n }\n catch (IOException e)\n {\n return null;\n }\n }", "public byte[] toByteArray() {\n ByteBuffer buf = ByteBuffer.allocate(blockSize);\n for (Record record : records) {\n buf.put(record.isEmpty() ? (byte) 1 : (byte) 0);\n buf.put(new String(record.getTconst()).getBytes(StandardCharsets.US_ASCII));\n buf.putFloat(record.getAvgRating());\n buf.putInt(record.getNumVotes());\n }\n return buf.array();\n }", "public static byte[] toByteArray(Path path) {\n\t\tvalidateFile(path);\n\t\ttry {\n\t\t\treturn Files.readAllBytes(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public abstract byte[] getEncoded() throws CRLException;", "public byte[] getBinary() throws IOException {\n\r\n String contentType = null;\r\n int contentLength = -1;\r\n\r\n // a little weird - this will throw NoSuchElementException\r\n // if nothing was recieved\r\n contentType = connection.getContentType();\r\n contentLength = connection.getContentLength();\r\n\r\n log.info(\"contentType {} contentLength {}\", contentType, contentLength);\r\n\r\n InputStream raw;\r\n byte[] data = null;\r\n int initSize = (contentLength == -1) ? 65536 : contentLength;\r\n ByteArrayOutputStream bos = new ByteArrayOutputStream(initSize);\r\n InputStream in = null;\r\n // try {\r\n raw = connection.getInputStream();\r\n in = new BufferedInputStream(raw);\r\n\r\n byte[] tmp = new byte[initSize];\r\n int ret;\r\n while ((ret = in.read(tmp)) > 0) {\r\n log.debug(\"read {} bytes\", ret);\r\n bos.write(tmp, 0, ret);\r\n }\r\n /*\r\n * } catch (IOException e) { Logging.logException(e); }\r\n */\r\n\r\n data = bos.toByteArray();\r\n log.info(\"read {} bytes\", data.length);\r\n\r\n try {\r\n if (in != null) {\r\n in.close();\r\n }\r\n } catch (IOException e) {\r\n // don't care\r\n }\r\n\r\n /*\r\n * \r\n * try { // content size sent back data = new byte[contentLength]; int\r\n * bytesRead = 0; int offset = 0; while (offset < contentLength) { bytesRead\r\n * = in.read(data, offset, data.length - offset); if (bytesRead == -1)\r\n * break; offset += bytesRead; } in.close();\r\n * \r\n * if (offset != contentLength) { throw new IOException(\"Only read \" +\r\n * offset + \" bytes; Expected \" + contentLength + \" bytes\"); } } catch\r\n * (IOException e1) { Logging.logException(e1); error = e1.getMessage(); } }\r\n */\r\n\r\n /*\r\n * String filename = u.getFile().substring(filename.lastIndexOf('/') + 1);\r\n */\r\n\r\n /*\r\n * FileOutputStream out; try { out = new FileOutputStream(\"hello.mp3\");\r\n * out.write(data); out.flush(); out.close(); } catch (Exception e) { //\r\n * TODO Auto-generated catch block e.printStackTrace(); }\r\n */\r\n\r\n return data;\r\n }", "private byte[] decode(byte[] msg) {\r\n\t\treturn Base64.decode(msg); \r\n\t}", "public static byte[] fileToBytes(String filePath) throws IOException {\n final Path path = Paths.get(filePath);\n return Files.readAllBytes(path);\n }", "byte[] deflate(byte[] data) throws IOException;", "public static String getEncodedFile(File file) {\n InputStream fis = null;\n StringBuilder sb = new StringBuilder(\"\");\n try {\n fis = new FileInputStream(file);\n byte[] buffer = new byte[fis.available()];\n final int readLength = fis.read(buffer);\n Log.i(TAG, \"getEncodedFile: Read Length: \" + readLength);\n sb.append(Base64.encodeToString(buffer, Base64.DEFAULT));\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if (fis != null) {\n try {\n fis.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n return sb.toString();\n }", "com.google.protobuf.ByteString\n getFromBytes();", "com.google.protobuf.ByteString\n getFromBytes();", "public byte[] getFile() {\n return file;\n }", "public static byte[] getBytesFromFile(File file) throws IOException {\n InputStream is = new FileInputStream(file);\n\n // Get the size of the file\n long length = file.length();\n\n // You cannot create an array using a long type.\n // It needs to be an int type.\n // Before converting to an int type, check\n // to ensure that file is not larger than Integer.MAX_VALUE.\n if (length > Integer.MAX_VALUE) {\n // File is too large\n }\n\n // Create the byte array to hold the data\n byte[] bytes = new byte[(int)length];\n\n // Read in the bytes\n int offset = 0;\n int numRead = 0;\n while (offset < bytes.length\n && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\n offset += numRead;\n }\n\n // Ensure all the bytes have been read in\n if (offset < bytes.length) {\n throw new IOException(\"Could not completely read file \"+file.getName());\n }\n\n // Close the input stream and return bytes\n is.close();\n return bytes;\n }", "byte[] getContent() throws IOException;", "protected String getEncodedFileContent() throws IOException\n {\n if (fullAttachmentFilename == null)\n {\n return null;\n }\n Path path = Paths.get(fullAttachmentFilename);\n byte[] byteArray = Files.readAllBytes(path);\n Base64 x = new Base64();\n String encodedFileContent = x.encodeAsString(byteArray);\n return encodedFileContent;\n }", "public native static long getConvertBytes();", "public static byte[] decode(byte[] bytes){\n\t\tByteArrayInputStream in = new ByteArrayInputStream(bytes);\n\t\t// calculate the length of the resulting output.\n\t\t// in general it will be at most 3/4 the size of the input\n\t\t// but the input length must be divisible by four.\n\t\t// If it isn't the next largest size that is divisible\n\t\t// by four is used.\n\t\tint mod;\n\t\tint length = bytes.length;\n\t\tif ((mod = length % 4) != 0){\n\t\t\tlength += 4 - mod;\n\t\t}\n\t\tlength = length * 3 / 4;\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream(length);\n\t\ttry {\n\t\t\tdecode(in, out, false);\n\t\t} catch (IOException x){\n\t\t\t// This can't happen.\n\t\t\t// The input and output streams were constructed\n\t\t\t// on memory structures that don't actually use IO.\n\t\t\t throw new RuntimeException(x);\n\t\t}\n\t\treturn out.toByteArray();\n\t}", "private byte[] toBytes(String obj){\n return Base64.getDecoder().decode(obj);\n }", "@Override\r\n\tpublic byte[] getBytes() {\n\t\treturn buffer.array();\r\n\t}", "public static byte[] getBytesFromFile(File file) throws IOException {\n\t\tlong length = file.length();\r\n\r\n\t\t// You cannot create an array using a long type.\r\n\t\t// It needs to be an int type.\r\n\t\t// Before converting to an int type, check\r\n\t\t// to ensure that file is not larger than Integer.MAX_VALUE.\r\n\t\tif (length > Integer.MAX_VALUE) {\r\n\t\t\t// File is too large\r\n\t\t\tthrow new IOException(\"File is too large!\");\r\n\t\t}\r\n\r\n\t\t// Create the byte array to hold the data\r\n\t\tbyte[] bytes = new byte[(int)length];\r\n\r\n\t\t// Read in the bytes\r\n\t\tint offset = 0;\r\n\t\tint numRead = 0;\r\n\r\n\t\tInputStream is = new FileInputStream(file);\r\n\t\ttry {\r\n\t\t\twhile (offset < bytes.length\r\n\t\t\t\t\t&& (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) {\r\n\t\t\t\toffset += numRead;\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tis.close();\r\n\t\t}\r\n\r\n\t\t// Ensure all the bytes have been read in\r\n\t\tif (offset < bytes.length) {\r\n\t\t\tthrow new IOException(\"Could not completely read file \"+file.getName());\r\n\t\t}\r\n\t\treturn bytes;\r\n\t}", "public static byte[] readFileAsByteArray(String path) throws IOException {\n return internalReadFileAsByteArray(path).array();\n }", "private byte[] PPMfile() {\n StringBuilder Finald = new StringBuilder();\n Finald.append(\"P6\");\n Finald.append(\"\\n\");\n Finald.append(width);\n Finald.append(\" \");\n Finald.append(height);\n Finald.append(\"\\n\");\n Finald.append(255);\n Finald.append(\"\\n\");\n for (int x = 0; x < height; ++x) {\n for (int y = 0; y < width; ++y) {\n char auxe = (char) FinalR[x][y];\n Finald.append(auxe);\n auxe = (char) FinalG[x][y];\n Finald.append(auxe);\n auxe = (char) FinalB[x][y];\n Finald.append(auxe);\n }\n }\n String Finaldes = Finald.toString();\n return Finaldes.getBytes();\n }", "private static byte[] getFileBytes(String filePath) {\n try {\n return Files.readAllBytes(Paths.get(filePath));\n } catch (IOException e) {\n throw new RuntimeException(\"I/O exception reading contents of file \" + filePath, e);\n }\n }" ]
[ "0.6831062", "0.67389065", "0.6531284", "0.65128994", "0.6407733", "0.6368195", "0.6363365", "0.63211817", "0.6297166", "0.6287908", "0.6287908", "0.62216944", "0.6205931", "0.61798346", "0.6150387", "0.6150387", "0.6089204", "0.6047614", "0.59898186", "0.59566134", "0.59253395", "0.59142005", "0.59013516", "0.5852072", "0.5818072", "0.5796691", "0.5784823", "0.5709432", "0.5709432", "0.5709432", "0.5709432", "0.5705754", "0.5697877", "0.569694", "0.56952494", "0.56927055", "0.5689155", "0.56512284", "0.5651164", "0.56321687", "0.5616936", "0.55859035", "0.55813956", "0.55759555", "0.5570619", "0.554719", "0.55424064", "0.5523071", "0.55201244", "0.55083376", "0.5500105", "0.5491408", "0.5490768", "0.5484268", "0.54790825", "0.54700637", "0.54657274", "0.54629564", "0.5461886", "0.54611504", "0.5459796", "0.54594433", "0.54567766", "0.54565084", "0.5451381", "0.54475147", "0.5442021", "0.54396236", "0.54389626", "0.5438357", "0.5407571", "0.5402024", "0.53955567", "0.53859246", "0.538582", "0.5380281", "0.53800994", "0.53747034", "0.5351555", "0.5335148", "0.53330564", "0.53270715", "0.53227293", "0.53188217", "0.5312144", "0.5308178", "0.53042686", "0.5302648", "0.5302648", "0.5301199", "0.5297614", "0.52973413", "0.5297128", "0.5294937", "0.5292648", "0.5291716", "0.52895284", "0.5284559", "0.5282669", "0.5282106", "0.52617514" ]
0.0
-1
super.doGet(req, resp); req.getRequestDispatcher(resp.encodeURL("/jsp/user/reserve.jsp")).forward(req, resp);
@Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { this.doPost(req,resp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.getRequestDispatcher(\"/WEB-INF/Register.jsp\").forward(request, response);\n //processRequest(request, response);\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n RequestDispatcher dispatcher = this.getServletContext()\n \t\t.getRequestDispatcher(\"/WEB-INF/views/ClientProfile.jsp\");\n \n dispatcher.forward(request, response);\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/html;charset=UTF-8\"); \n RequestDispatcher rd=request.getRequestDispatcher(\"Contact.jsp\");\n rd.forward(request, response); \n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n req.getRequestDispatcher(\"/WEB-INF/pages/updateCharacter.jsp\").forward(req, resp);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"employeelogin.html\").forward(req, resp);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n //processRequest(request, response);\r\n String forward=\"\";\r\n String action = request.getParameter(\"action\");\r\n\r\n forward = \"/createLocacao.jsp\";\r\n\r\n RequestDispatcher view = request.getRequestDispatcher(forward);\r\n view.forward(request, response);\r\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n\n UserDao dao = new UserDao();\n log.debug(dao.getAllUsers());\n List<Users> users = dao.getAllUsers();\n req.setAttribute(\"users\", users.get(0).getUserName());\n req.setAttribute(\"users\", users);\n log.debug(users.get(0).getPassword());\n String url = \"/leaderBoard.jsp\";\n\n RequestDispatcher dispatcher\n = getServletContext().getRequestDispatcher(url);\n dispatcher.forward(req, resp);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"/views/form.jsp\").forward(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n req.getRequestDispatcher(\"/WEB-INF/views/login.jsp\").forward(req, resp);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\t\treq.getRequestDispatcher(\"/index.jsp\").forward(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tRequestDispatcher dispatcher=req.getRequestDispatcher(\"login.html\");\n\t\tdispatcher.forward(req, resp);\n\t\t\n\t}", "@Override\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n RequestDispatcher dispatcher = req.getRequestDispatcher(\"/Servlet\");\n dispatcher.forward(req, resp);\n \n}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\n\n\n RequestDispatcher dispatcher //\n = this.getServletContext().getRequestDispatcher(\"/WEB-INF/quanli/themthisinh.jsp\");\n dispatcher.forward(request, response);\n\n\t\t\n\n\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n Map<String, Book> recommendedMap = bookService.getAllRecommendedBooks();\n HttpSession session = request.getSession();\n session.setAttribute(\"recommendedMap\", recommendedMap);\n String url = \"/adminRecommendedItemsList.jsp\";\n RequestDispatcher dispatcher = request.getRequestDispatcher(url);\n dispatcher.forward(request, response); \n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String userID = null;\n if (request.getSession().getAttribute(\"userID\") != null) {\n userID = (String) request.getSession().getAttribute(\"userID\");\n }\n\n //user pressed login button\n if (request.getParameter(\"user\") != null) {\n if (userID == null) {\n userID = sc.firstConnection();\n }\n String email = request.getParameter(\"email\");\n String password = request.getParameter(\"password\");\n try {\n sc.makeLogin(userID, email, password);\n userID = email;\n request.getSession().setAttribute(\"userID\", userID);\n } catch (Exception e) {\n e.printStackTrace();\n String errorString = \"Login Failed!\";\n request.setAttribute(\"errorString\", errorString);\n request.setAttribute(\"email\", email);\n request.getSession().removeAttribute(\"userID\");\n RequestDispatcher dispatcher //\n = this.getServletContext().getRequestDispatcher(\"/WEB-INF/views/loginView.jsp\");\n dispatcher.forward(request, response);\n }\n }\n //user presses login as guest\n else if (request.getParameter(\"guest\") != null) {\n if (userID == null) {\n userID = sc.firstConnection();\n }\n request.getSession().setAttribute(\"userID\", userID);\n }\n //user pressed register button\n else if (request.getParameter(\"register\") != null) {\n //ArrayList<Nationality> nationalities = new ArrayList<>(Arrays.asList(Nationality.values()));\n //request.setAttribute(\"nat\", nationalities);\n request.getSession().removeAttribute(\"userID\");\n RequestDispatcher dispatcher = this.getServletContext().getRequestDispatcher(\"/WEB-INF/views/registerView.jsp\");\n dispatcher.forward(request, response);\n } else {\n return;\n }\n\n User user = sc.getInSystemUser(userID);\n request.getSession().setAttribute(\"userType\", user.getType().toString());\n response.sendRedirect(request.getContextPath() + \"/MainMenu\");\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n this.getServletContext().getRequestDispatcher(\"/WEB-INF/signup.jsp\").forward(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n req.setAttribute(\"title\", \"Transaction\");\n\n String action = req.getParameter(\"action\");\n action = StringUtils.capitalize(action);\n req.setAttribute(\"action\", action);\n\n page.getPage(\"view/transaction/doTransaction.jsp\", req, resp);\n\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tif(req.getSession().getAttribute(\"Users\")!=null){\r\n\t\t\treq.getSession().removeAttribute(\"Users\");\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tresp.sendRedirect(PathUtil.getBasePath(req,\"index.jsp\"));\r\n\t\r\n\t}", "@Override\n public void execute(\n HttpServletRequest request,\n HttpServletResponse response)\n throws ServletException, IOException {\n ServletContext context = request.getSession().getServletContext();\n context.getRequestDispatcher(\"/EntryDataForNewUser.jsp\").forward(request, response);\n //context.getRequestDispatcher(request.getHeader(\"referer\")).forward(request, response);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tList<Student> students = HelperClassUtil.getStudents();\n\t\trequest.setAttribute(\"student_list\", students);\n\t\t\n\t//step 2: call the JSP \n\t\tRequestDispatcher dispatcher =request.getRequestDispatcher(\"/mvc_view_students2.jsp\");\n\t\t\n\t//step 3: send/forward data to jsp\n\t\tdispatcher.forward(request, response);\n\t\t\n\t\n\t\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\tresponse.setContentType(\"text/html\");\r\n\t\t\tPrintWriter pw= response.getWriter();\r\n\t\t\tList<String> loc=new ArrayList<String>();\r\n\t\t\t\r\n\t\t\tPreparedStatement pst=con.prepareStatement(\"select loc from dept\");\r\n\t\t\tResultSet res= pst.executeQuery();\r\n\t\t\t\r\n\t\t\twhile(res.next())\r\n\t\t\t{\r\n\t\t\t\tloc.add(res.getNString(\"loc\"));\r\n\t\t\t}\r\n\t\t\r\n\t\t\t request.setAttribute(\"location\", loc);\r\n\t\t\t RequestDispatcher rd=request.getRequestDispatcher(\"Server2\");\r\n\t\t\t rd.forward(request,response);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(Exception ee)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in forwarding\"+ee);\r\n\t\t}\r\n\t}", "@Override\n public void doGet(HttpServletRequest req, HttpServletResponse resp)\n throws ServletException, IOException {\n Map<String, String> messages = new HashMap<String, String>();\n req.setAttribute(\"messages\", messages);\n // Just render the JSP.\n req.getRequestDispatcher(\"/TenantPostLandlordReview.jsp\").forward(req, resp);\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\tAdmin admin = (Admin) request.getSession().getAttribute(\"username\");\n\t\tif (admin != null) {\n\t\t\t// if (administer.getAccessLevel().equals(AccessLevel.ADMIN)) {\n\t\t\tresponse.sendRedirect(\"welcome.jsp\");\n\t\t\t// } else {\n\t\t\t// response.sendRedirect(doc_JSP);\n\t\t\t// }\n\t\t} else {\n\t\t\tRequestDispatcher rd = request.getRequestDispatcher(\"signup.jsp\");\n\t\t\trd.forward(request, response);\n\t\t}\n\n//\t\tRequestDispatcher rd = request.getRequestDispatcher(\"signup.jsp\");\n//\t\trd.forward(request, response);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n HttpSession session = request.getSession(true);\r\n String id = (String) session.getAttribute(\"id\");//ici la valeur de la session va dans id\r\n if (id == null) {\r\n sc.getRequestDispatcher(\"/connexion.jsp\").forward(request, response); //si l'authentification n'a pas encore eu lieu, on renvoie sur la page connexion.html; dont l'action fait fonctionner le servlet sauthentifier\r\n return;\r\n }\r\n else{\r\n sc.getRequestDispatcher(\"/emprunter.jsp\").forward(request, response);\r\n }\r\n \r\n response.setContentType(\"text/html\"); // on pourra générer ca dans le code jsp en entête\r\n PrintWriter p = response.getWriter();\r\n p.println(\"<DOCTYPE html>\");\r\n p.println(\"<html>\");\r\n p.println(\"<head>\");\r\n p.println(\"</head>\");\r\n p.println(\"<body>\");\r\n p.println(\"<h1>Page pour Emprunter</h1>\");\r\n p.println(\"</body>\");\r\n p.println(\"</html>\");\r\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tthis.getServletContext().getRequestDispatcher(\"/WEB-INF/jsp/pageventenondebutee.jsp\").forward(request, response);\r\n\t}", "protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\r\n\t\t\r\n\t\treq.getRequestDispatcher(\"main.jsp\").include(req, resp);\r\n\t\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.getRequestDispatcher(\"login.html\").forward(req, resp);\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n request.getRequestDispatcher(\"login.jsp\").forward(request, response);\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\treq.setAttribute(\"message\", \"Bienvenue sur ce site en MVC\");\r\n\t\tRequestDispatcher rq = getServletContext().getRequestDispatcher(\"/WEB-INF/formulaire.jsp\");\r\n\t\trq.forward(req, resp);\r\n\t}", "public void doGet(HttpServletRequest req, HttpServletResponse res)\n throws ServletException, IOException {\n HttpSession session = req.getSession();\n User user = (User)(session.getAttribute(\"User\"));\n\n\n UserDAOImpl impl = new UserDAOImpl();\n List<User> list = impl.getAllUsers();\n\n req.getRequestDispatcher(\"viewEmployees.jsp\").forward(req,res);\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\t\n\t\tString valor = req.getParameter(\"action\");\n\t\tString destino = \"index.jsp\";\n\t\t\n\t\tList<GrupoDTO> lgt = ControladorGrupos.getInstancia().getGrupos();\n\t\treq.setAttribute(\"listgrupo\", lgt);\n\t\tdestino = \"VerGrupos.jsp\";\n\t\t\n\t\tRequestDispatcher rd = req.getRequestDispatcher(destino);\n\t\trd.forward(req, resp);\t\t\n\t}", "@Override\n\tprotected void doGet( HttpServletRequest req, HttpServletResponse resp ) throws ServletException, IOException {\n\t\t\n this.getServletContext().getRequestDispatcher(linkApp).forward( req,resp);\n\n\t }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n response.setContentType(\"text/html;charset=UTF-8\");\r\n TownServiceImpl townServ = new TownServiceImpl();\r\n request.setAttribute(\"townList\", townServ.getAll());\r\n Merchant actMerchant = (Merchant) request.getSession().getAttribute(\"merchant\");\r\n if (request.getAttribute(\"userinput\") == null) {\r\n request.setAttribute(\"userinput\", actMerchant);\r\n }\r\n getServletContext().getRequestDispatcher(\"/mreg.jsp\").include(request, response);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t\t\n\t\tList<GuestBookVO> gbList = gbService.selectAll();\n\t\treq.setAttribute(\"GBLIST\", gbList);\n//\t\treq.getRequestDispatcher(\"/WEB-INF/views/home.jsp\").forward(req, resp);\n\t\tRequestForwardController.forward(req, resp, \"home\");\n\t}", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws \r\n\t \t\t\tServletException, IOException{ \t \r\n\t\t \r\n\t\t \t// Where jsp is /WEB-INF/views/login.jsp\r\n\t\t\t//when we write login.do we need to redirect servlet to Jsp. here we get request and redirecte it to jsp. \r\n\t\t\t//When we load the first page which is http://localhost:8080/login.do , it is get method. so we get the request from browser and redircet it to login.jsp to display the long page\r\n\t\t \t request.getRequestDispatcher(\"/WEB-INF/views/login.jsp\").forward(request, response);\r\n\t }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n /* Affichage de la page d'inscription */\r\n this.getServletContext()\r\n .getRequestDispatcher(VIEW)\r\n .forward(request, response);\r\n\r\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n request.getRequestDispatcher(\"WEB-INF/Paamelding.jsp\").forward(request, response);\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n request.getRequestDispatcher(\"LoginForm.jsp\").forward(request, response);\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n String idbook = request.getParameter(\"book\");\r\n request.setAttribute(\"book\", BookManager.getById(Integer.parseInt(idbook)));\r\n RequestDispatcher rd = request.getRequestDispatcher(\"borrow.jsp\");\r\n rd.forward(request, response);\r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n String myVarIaka = getMessage();\n //myVar = \"Adrian\";\n req.setAttribute(\"myVar\",myVarIaka);\n req.setAttribute(\"myList\",provideList());\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/index.jsp\");\n dispatcher.forward(req,resp);\n\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t doPost(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tHttpSession hpSession = req.getSession();\n\t\tUser u = (User) hpSession.getAttribute(\"user\");\n\t\tString start=req.getParameter(\"Start\");\n\t\tString end=req.getParameter(\"End\");\n\t\tif(start==null||end==null){\n\t\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd\");\n\t\t\tjava.util.Date now=new java.util.Date();\n\t\t\tjava.util.Date next=new Date(now.getTime()+24*3600*1000);\n\t\t\tstart=sdf.format(now.getTime());\n\t\t\tend=sdf.format(next.getTime());\n\t\t}\n//\t\t查找需要加上日期\n\n\t\tif (u != null && u.getUserType() == 1) {\n\t\t\tList<Roomdisplay> roomdisplayList = roomdisplayServiceImpl.findAll();\n\t\t\treq.setAttribute(\"roomdisplayList\", roomdisplayList);\n\n\t\t\treq.getRequestDispatcher(resp.encodeURL(\"/jsp/user/reserve.jsp\")).forward(req, resp);\n\t\t} else {\n\t\t\tSystem.out.println(\"ReserveServlet get user failed!\");\n\t\t\treq.getRequestDispatcher(resp.encodeURL(\"/jsp/common/login.jsp\")).forward(req, resp);\n\t\t}\n\n\t}", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n resp.setContentType(\"text/html;charset=UTF-8\");\n req.getRequestDispatcher(\"/jsp/produtos/index.jsp\").include(req, resp);\n \n }", "@Override \r\nprotected void doGet(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString search = req.getParameter(\"searchBook\");\n\t\tString output=search;\n\n\t\t//redirect output to view search.jsp\n\t\treq.setAttribute(\"output\", output);\n\t\tresp.setContentType(\"text/json\");\n\t\tRequestDispatcher view = req.getRequestDispatcher(\"search.jsp\");\n\t\tview.forward(req, resp);\n\t\t\t\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tif (req.getSession().getAttribute(\"client\") == null) {\n\t\t\tresp.sendRedirect(\"/FinalProject/login\");\n\t\t} else {\n\t\t\treq.getRequestDispatcher(\"view/client/client-profile.jsp\").forward(req, resp);\n\t\t}\n\t}", "public void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n HttpSession session = request.getSession();\n int userID = Integer.parseInt(request.getParameter(\"id\"));\n\n //Get all users\n GenericDao userDAO = new GenericDao(User.class);\n\n User user = (User) userDAO.getById(userID);\n\n request.setAttribute(\"firstName\", user.getFirst_name());\n request.setAttribute(\"lastName\", user.getLast_name());\n request.setAttribute(\"email\", user.getEmail());\n request.setAttribute(\"username\", user.getUser_name());\n request.setAttribute(\"success\", 1);\n // Forward to the HTTP Request and Response to JSP\n String url = \"/editUser.jsp\";\n\n RequestDispatcher dispatcher = request.getRequestDispatcher(url);\n dispatcher.forward(request, response);\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n //LLAMAMOS AL FORMULARIO\r\n RequestDispatcher rd = getServletContext().getRequestDispatcher(\"/inicioSesion.jsp\");\r\n rd.forward(request, response);\r\n \r\n }", "@Override\r\n public void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException{\n SocialBoardService socialBoardService = JerseyPresenterFactory.getBoardPresenter(); \r\n\r\n // 로그인 체크\r\n if(!SessionManager.getInstance(req).isLogin()) {\r\n \r\n String message = SessionManager.LOGIN_REQUIRED_MESSAGE;\r\n String linkUrl = \"/login\";\r\n \r\n PageTransfer.getInstance(req, resp).error(message, linkUrl);\r\n return;\r\n }\r\n \r\n String boardUsid = req.getParameter(\"boardUsid\");\r\n \r\n SocialBoard socialBoard = socialBoardService.findSocialBoard(boardUsid);\r\n List<SocialBoard> socialBoards = socialBoardService.findAllSocialBoards();\r\n \r\n req.setAttribute(\"boardList\", socialBoards);\r\n req.setAttribute(\"socialBoard\", socialBoard);\r\n \r\n // request dispatch\r\n RequestDispatcher dispatcher =\r\n req.getRequestDispatcher(\"/WEB-INF/views/board/update.jsp\");\r\n dispatcher.forward(req, resp);\r\n }", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tdoPost(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String sesion_med = dmmed.ObtenerCodigoSesion();\n Medico medico_sesion = dmmed.VerMedicoPorCodigo(sesion_med);\n String acceder = \"\";\n String accion = request.getParameter(\"accion\");\n if (accion.equalsIgnoreCase(\"RealizarCita\")) {\n request.getSession().setAttribute(\"mensaje_cita\", null);\n acceder = \"medico/realizar_cita.jsp\";\n } else if (accion.equalsIgnoreCase(\"AgendarExamen\")) {\n request.getSession().setAttribute(\"alerta_e\", null);\n acceder = \"medico/agendar_examen.jsp\";\n } else if (accion.equalsIgnoreCase(\"Reporte1\")) {\n acceder = \"medico/reporte1.jsp\";\n } else if (accion.equalsIgnoreCase(\"Reporte2\")) {\n acceder = \"medico/reporte2.jsp\";\n } else if (accion.equalsIgnoreCase(\"Reporte3\")) {\n acceder = \"medico/reporte3.jsp\";\n } else if (accion.equalsIgnoreCase(\"Reporte4\")) {\n acceder = \"medico/reporte4.jsp\";\n }\n RequestDispatcher pagina = request.getRequestDispatcher(acceder);\n pagina.forward(request, response);\n }", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override\r\nprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t process(req,resp);\r\n\t }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException \n {\n String act = request.getParameter(\"act\");\n \n if (act!=null && act.equalsIgnoreCase(\"doAddTransaction\")){// show page with form to obtain client name\n doPost(request, response);\n }else{// put client name into a bean\n RequestDispatcher dispatcher = getServletContext().getRequestDispatcher(\"/addtransaction.jsp\");\n dispatcher.forward(request, response);\n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {Usermodel usermodel = new Usermodel();\n//\t\tusermodel.setFullName(\"Nguyen Trung Hieu\");\n//\t\t//cach lay fullName cua usermodel de day ra jsp | \"model\" se co tat cac thuoc tinh cua usermoldel\n//\t\treq.setAttribute(\"model\", usermodel);\n//\t\t\n\t\tRequestDispatcher requestDispatchedDispatcher = req.getRequestDispatcher(\"/views/web/home-web.jsp\");\n\t\trequestDispatchedDispatcher.forward(req, res);\n\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n if (Authentication.isAdminInDbByCookies(req)) {\n // Authentication.log(req.getCookies()[0].getValue() + \" - redirect to /admin/registration/registration.html\");\n req.getRequestDispatcher(\"/admin/registration/registration.html\")\n .forward(req, resp);\n\n } else {\n // Authentication.log(req.getCookies()[0].getValue() + \" - redirect to / . Error Authorization.\");\n resp.sendRedirect(\"/\");\n }\n\n }", "@Override\r\n\t\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t this.doGet(request, response);\r\n\t }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.getRequestDispatcher(\"WEB-INF/views/accountSetting.jsp\").forward(request, response);\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\treq.setAttribute(\"model\", model);\r\n\t\treq.getRequestDispatcher(\"param.jsp\").forward(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n List<Produtos> listaProdutos = ProdutosDAO.getProdutos();\n request.setAttribute(\"listaProdutos\", listaProdutos);\n System.out.println(\"PASSOUUUUU\");\n request.getRequestDispatcher(\"produtos/listaProdutos.jsp\").forward(request, response);\n\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException \r\n{\nresponse.getWriter().append(\"Served at: \").append(request.getContextPath()); \r\n}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String action = request.getParameter(\"action\");\n String id = request.getParameter(\"id\"); \n if (action==null) {\n List<User> users = userDao.findAll();\n request.setAttribute(\"users\", users);\n request.getRequestDispatcher(\"list-user.jsp\").forward(request, response);\n } else if (action.equals(\"delete\")){\n if (Controller.controller.deleteUser(Integer.parseInt(id))) {\n response.sendRedirect(\"doUser\");\n } else {\n response.sendRedirect(\"admin.jsp\");\n }\n }\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n // Restrict access by non-Guests\n if (!SessionHelpers.checkGuest(request.getSession())) {\n request.setAttribute(\"statusMessage\", \"You must be logged in as a guest to view the requested page.\");\n request.setAttribute(\"statusType\", \"warning\");\n RequestDispatcher view = request.getRequestDispatcher(\"/manager/login\");\n view.forward(request, response);\n return;\n }\n\n HttpSession session = request.getSession();\n User user = (User) session.getAttribute(\"sessionUser\");\n\n String url = \"/WEB-INF/views/list-events-guest.jsp\";\n String pageTitle = \"My Events\";\n\n // Get user attendance data from DB\n List<Attendance> userAttendance = attendanceData.getUserAttendance(user);\n request.setAttribute(\"userAttendance\", userAttendance);\n\n request.setAttribute(\"pageTitle\", pageTitle);\n RequestDispatcher view = request.getRequestDispatcher(url);\n view.forward(request, response);\n\n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(\"Im get vom Registriercontroller\");\r\n\t\trequest.getSession().invalidate();\r\n\t\tSystem.out.println(\"Weiterleiten zum Registrieren!\");\r\n\t\trequest.getRequestDispatcher(\"Registrieren.jsp\").include(request, response);\r\n\t\tresponse.setContentType(\"text/html\");\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest req, HttpServletResponse resp)\r\n throws ServletException, IOException {\n this.doPost(req, resp);\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\t\tString menuId = req.getParameter(\"id\"); \r\n\t\t\t\t//System.out.println(stuId);\r\n\t\t\t\tMap<String, Object> mn = ms.findMenuInfo(Integer.valueOf(menuId));\r\n\t\t\t\t//System.out.println(st);\r\n\t\t\t\treq.setAttribute(\"menu\", mn);\r\n\t\t\t\t//req.setAttribute(\"deptList\", Department.values());\r\n\t\treq.getRequestDispatcher(\"manager/modifymenu.jsp\").forward(req,resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String pagina = \"\";\n \n if(request.getSession().getAttribute(\"usuario\") != null) {\n \n if(request.getParameter(\"pedido_id\") != null){\n int pedido_id = Integer.parseInt(request.getParameter(\"pedido_id\"));\n usuarioDAO i_s = new usuarioDAO();\n \n try {\n proveedores = i_s.obtenerProveedores();\n } catch (Exception ex) {}\n \n request.setAttribute(\"proveedores\", proveedores);\n request.getSession().setAttribute(\"pedido_id\", pedido_id);\n pagina=\"/cotizacion/crearCotizacion.jsp\";\n } else {\n cotizacionDAO i_s = new cotizacionDAO();\n ArrayList<cotizacionBean> cotizaciones = i_s.listado();\n request.setAttribute(\"cotizaciones\", cotizaciones);\n pagina=\"/cotizacion/listaCotizacion.jsp\";\n }\n \n } else {\n pagina=\"/login.jsp\";\n request.setAttribute(\"mensaje\",\"Necesitas iniciar sesión!\");\n }\n \n getServletContext().getRequestDispatcher(pagina).forward(request, response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doGet(req, resp);\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // processRequest(request, response);\n\n if(request.getParameter(\"action\").equalsIgnoreCase(\"add\")){\n ArrayList<TeacherModel> al=TeacherDao.display();\n request.setAttribute(\"teacherdata\",al);\n ArrayList<CourseModel> dl= CourseDao.display();\n request.setAttribute(\"coursedata\",dl);\n RequestDispatcher rd=request.getRequestDispatcher(\"AddGroup.jsp\");\n rd.forward(request,response);\n \n \n } else if(request.getParameter(\"action\").equalsIgnoreCase(\"display\")){\n \n processRequest(request, response);\n \n \n }\n }", "public void doGet(HttpServletRequest req, HttpServletResponse resp){\n\n req.setAttribute(\"page\", \"null\");\n if (!LoginStatus.getStatus()){ // True if the user has not logged in to an account\n req.setAttribute(\"isApproved\", \"0\");\n req.setAttribute(\"log\", LoginStatus.getLogInUrl(\"/create_profile\"));\n try {\n req.setAttribute(\"logIn\", LoginStatus.getLogInUrl(\"/\"));\n req.setAttribute(\"createProf\", LoginStatus.getLogInUrl(\"/create_profile\"));\n req.getRequestDispatcher(\"Home2.jsp\").forward(req, resp);\n } catch(Exception e) {e.printStackTrace();}\n }\n else{ // Runs if the user has logged in to an account\n UserService userService = UserServiceFactory.getUserService(); // Finds the user's email from OAuth\n com.google.appengine.api.users.User user = userService.getCurrentUser();\n String email = user.getEmail();\n req.setAttribute(\"isApproved\", \"1\");\n req.setAttribute(\"log\", LoginStatus.getLogOutUrl(\"/\"));\n\n long curTime = new Date().getTime(); // Calculates the current time as a milliseconds timestamp\n\n\n List<Entity> queriedTrips = queryManager.query(\"trip\",\"lastOrder\", curTime-21600000, 1000,Query.FilterOperator.GREATER_THAN);\n // Queries the trips to find those that are still available for orders\n ArrayList<Trip> trips = new ArrayList<Trip>(); // Valid trips\n HashSet<Key> unique = new HashSet<Key>(); // Checks to see if a user has already joined a trip\n List<Entity> myOrders = queryManager.query(\"order\", \"email\", email ,1000, Query.FilterOperator.EQUAL);\n // Checks the orders that belong to this user\n for(Entity order:myOrders){\n\n unique.add(order.getParent()); // Adds the keys of the trips the users have joined\n\n }\n\n for (Entity trip : queriedTrips){\n if(!unique.contains(trip.getKey())) { // True if the user has not gone on said trip\n trips.add(new Trip(trip)); // Serializes the trip entity to a trip object in the ArrayList\n }\n }\n req.setAttribute(\"trips\", new Gson().toJson(trips)); // Returns a Json representation of the trips\n try{\n req.getRequestDispatcher(\"Home1.jsp\").forward(req, resp); // Sends the user back to the home page\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n HttpSession session = request.getSession();\n\n //Put user in session\n SessionUser sessionUser = new SessionUser();\n session.setAttribute(\"user\",sessionUser.getSessionUser(request));\n\n //Get request action\n String action = request.getParameter(\"action\");\n\n if (action != null) {\n switch (action) {\n case \"insert\":\n insertCar(request, response);\n break;\n case \"delete\":\n deleteCar(request, response);\n break;\n default:\n listCar(request, response);\n break;\n }\n }else{\n //Back to index page page\n RequestDispatcher dispatcher = request.getRequestDispatcher(\"index.jsp\");\n dispatcher.forward(request, response);\n }\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n\n doGet(request, response);\n\n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n\t\t// 로그인 유효성 검사\r\n\t\tHttpSession session = request.getSession();\r\n\t\tif(session.getAttribute(\"loginClient\") != null) {\r\n\t\t\tresponse.sendRedirect(request.getContextPath()+\"/IndexController\");\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/view/client/insertClient.jsp\").forward(request, response);\r\n\t}", "@Override\r\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n \r\n try {\r\n int id=Integer.parseInt(request.getParameter(\"id\"));\r\n \r\n Vehiculo vehiculo=service.selectVehiculo(id);\r\n \r\n HttpSession mySession=request.getSession(true);\r\n mySession.setAttribute(\"vehiculo\", vehiculo);\r\n \r\n RequestDispatcher rd=request.getRequestDispatcher(\"WEB-INF/update.jsp\");\r\n rd.forward(request, response);\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ServletUpdate.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n }", "public void doGet(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\t\t\r\n\t\trequest.getRequestDispatcher(\"/WEB-INF/jsp/account/SignonForm.jsp\").forward(request, response);\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\tdoPost(req, resp);\r\n\t}", "@Override\n protected void doGet(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }" ]
[ "0.773367", "0.7523677", "0.74938506", "0.74924356", "0.74824494", "0.7456347", "0.7371951", "0.7367503", "0.7321828", "0.7283826", "0.7222168", "0.718999", "0.7098831", "0.7084845", "0.708411", "0.7044036", "0.7021685", "0.7020329", "0.7000139", "0.69909203", "0.6976677", "0.6956795", "0.695329", "0.69494885", "0.69290215", "0.6922383", "0.6921387", "0.6899604", "0.6896366", "0.6888037", "0.6881368", "0.68644315", "0.68622565", "0.686192", "0.6860692", "0.68597597", "0.6854879", "0.68460065", "0.6839975", "0.68385714", "0.6838061", "0.68356496", "0.6828853", "0.6826326", "0.6825014", "0.68067306", "0.67906755", "0.67790353", "0.6765719", "0.6764617", "0.6762069", "0.67617023", "0.67605036", "0.67592764", "0.67592764", "0.6758813", "0.6757486", "0.6752566", "0.6750851", "0.67485684", "0.6737738", "0.6732504", "0.6732241", "0.6730374", "0.67192334", "0.6719078", "0.6719007", "0.67133415", "0.6709394", "0.6706538", "0.66987514", "0.6696912", "0.6680661", "0.66772205", "0.66772205", "0.6676802", "0.66760164", "0.66671735", "0.6665404", "0.6663736", "0.6663134", "0.6662956", "0.6662956", "0.6662956", "0.66601115", "0.66601115", "0.6655169", "0.66487616", "0.6645685", "0.6644186", "0.6644186", "0.6642763", "0.6642226", "0.6642226", "0.6642226", "0.66378057", "0.6636236", "0.663486", "0.66263825", "0.6624999" ]
0.677204
48
super.doPost(req, resp); PrintWriter out=resp.getWriter(); out.println("ReserveServlet>dopost:println");
@Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession hpSession = req.getSession(); User u = (User) hpSession.getAttribute("user"); String start=req.getParameter("Start"); String end=req.getParameter("End"); if(start==null||end==null){ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); java.util.Date now=new java.util.Date(); java.util.Date next=new Date(now.getTime()+24*3600*1000); start=sdf.format(now.getTime()); end=sdf.format(next.getTime()); } // 查找需要加上日期 if (u != null && u.getUserType() == 1) { List<Roomdisplay> roomdisplayList = roomdisplayServiceImpl.findAll(); req.setAttribute("roomdisplayList", roomdisplayList); req.getRequestDispatcher(resp.encodeURL("/jsp/user/reserve.jsp")).forward(req, resp); } else { System.out.println("ReserveServlet get user failed!"); req.getRequestDispatcher(resp.encodeURL("/jsp/common/login.jsp")).forward(req, resp); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\n\tsuper.doPost(req, resp);\n\t\n\tSystem.out.println(\"dddd\");\n}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {\n\t\t\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\t\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n // processRequest(request, response);\n final OutPass p=new OutPass();\n p.setRollno(request.getParameter(\"rollno\"));\n p.setReason(request.getParameter(\"reason\"));\n p.setFrom(request.getParameter(\"from\"));\n p.setTill(request.getParameter(\"till\"));\n p.setStatus(request.getParameter(\"status\")); \n boolean res=p.insert();\n //System.err.println(p.getStatus().equals(\"Accepted\"));\n \n // System.err.println(res);\n if(p.getStatus().equals(\"Accepted\")&&res){\n final General.OutPass op = new General.OutPass(p.getRollno());\n new Thread(new Runnable(){\n \n @Override\n public void run(){\n if(op.insert(p.getRequestid())){\n if(Student.getById(p.getRollno()).getAccomodation().equalsIgnoreCase(\"hostel\"))\n SMSTemplate.send(Parent.getNumber(p.getRollno()),p.getSMSContent());\n }\n }\n }).start();\n }\n \n if(res)\n response.sendRedirect(\"hostel/requests.jsp?msg=done\");\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\ndoGet(request, response);\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t}", "@Override\n public void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n \tdoGet(request, response);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n System.out.println(\"teste dopost\");\r\n }", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tprocess(req,resp);\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tsuper.doPost(req, resp);\r\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoPost(req,resp);;\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n\r\n }", "@Override\r\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t// TODO Auto-generated method stub\r\n\t\t doPost(req, resp);\r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tString rs=\"<button>Clik here this was POST request</button>\";\n\t\tresp.getWriter().write(rs);\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n super.doPost(req, resp);\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n \r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tsuper.doPost(req, resp);\n\t}", "@Override \r\nprotected void doPost(HttpServletRequest request, HttpServletResponse response) \r\nthrows ServletException, IOException { \r\nprocessRequest(request, response); \r\n}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n }", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n }", "protected void doPost (HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException\n {\n doGet(request,response);\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"post\");\n\t\tresp.setContentType(\"text/html\");\n\t\tPrintWriter out = resp.getWriter();\n//\t\tout.print(\"<html>\");\n//\t\tout.print(\"<head>\");\n//\t\tout.print(\"<style>\");\n//\t\tout.print(\"h1 {color : magenta;}\");\n//\t\tout.print(\"</style>\");\n//\t\tout.print(\"</head>\");\n//\t\tout.print(\"<body>\");\n\t\tout.print(\"<h1>Welcome! Servlet's World!</h1>\");\n//\t\tout.print(\"</body>\");\n//\t\tout.print(\"</html>\");\n\t\tBookTest bt = new BookTest();\n\t\ttry {\n\t\t\tHResourceDAO dao = new HResourceDAO();\n\t\t\tString line = dao.selectJobs();\n\t\t\tout.print(line);\n\t\t} catch (ClassNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n\tprotected void doPost(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException,\n\t IOException {\n\t\twriteResponse(request, response);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doPost(req,resp);\n\n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t\n\t\t\t\n\t\t \n\t}", "public void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n this.doGet(request, response);\n\t\t\n\t\t\t\n\t}", "protected void doPost1(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\r\n\t\t\t// TODO Auto-generated method stub\r\n\t\t\tdoGet(req, resp);\r\n\t\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tdoGet(req,resp);\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse res)\n\t\t\tthrows ServletException, IOException\n\t\t\t{\n\t\tdoGet(req, res);\n\t\t\t}", "@Override\n\tprotected void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows ServletException, IOException {\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.getWriter().println(\"go to post method in manager\");\n }", "public void doPost(HttpServletRequest request ,HttpServletResponse response){\n\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t\tresponse.setContentType(\"text/html;Charset=GBK\");\r\n\t\tPrintWriter out = response.getWriter();\r\n\t\tout.println(\"<HTML>\");\r\n\t\tout.println(\"<HEAD>用servlet测试get/post方法</HEAD>\");\r\n\t\tout.println(\"<BODY>\");\r\n\t\tout.println(\"<H2>调用了doPost方法</H2>\");\r\n\t\tout.println(\"<H2>用户输入的信息如下</H2>\");\r\n\t\tString useName = request.getParameter(\"useName\");\r\n\t\tif (useName == null || useName == \"\") {\r\n\r\n\t\t\tuseName = \"未输入\";\r\n\t\t}\r\n\t\tString passWord = request.getParameter(\"passWord\");\r\n\t\tif (passWord == null || passWord == \"\") {\r\n\t\t\tpassWord = \"未输入\";\r\n\t\t}\r\n\t\tout.println(\"<H2>用户名:\" + useName + \"</H2>\");\r\n\t\tout.println(\"<H2>密码:\" + passWord + \"</H2>\");\r\n\t\tout.println(\"</BODY>\");\r\n\t\tout.println(\"</HTML>\");\r\n\t\tout.close();\r\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\tdoPost(req, resp);\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\t// TODO Auto-generated method stub\n\t\tdoGet(request, response);\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n metPost(request, response);\n }", "protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException {\n }", "@Override\r\n\t\tprotected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t this.doGet(request, response);\r\n\t }", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tString pro=req.getParameter(\"pro\");\r\n\t\t\r\n\t\tString citys=service.getCitys(pro);\r\n\t\t\r\n\t\tresp.setContentType(\"text/html\");\r\n\t\tresp.setCharacterEncoding(\"utf-8\");\r\n\t\t\r\n\t\tPrintWriter out=resp.getWriter();\r\n\t\t\r\n\t\tout.println(citys);\r\n\t\tout.flush();\r\n\t\tout.close();\r\n\t\t\r\n\t\t\r\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws IOException \n {\n resp.setContentType(\"text/plain\"); \t\n /**\n * detects current action based on action param \n */\n String action = req.getParameter(\"action\"); \t\n if( action.equals(\"get_rezervace\")) getRezervace(req, resp); \n if( action.equals(\"post_rezervace\")) postRezervace(req, resp);\n if( action.equals(\"delete_rezervace\")) deleteRezervace(req, resp);\n\n /**\n * returns back to the jsp page\n */\n //resp.sendRedirect(\"/index.jsp?site=menucardEdit\");\n }", "public void doPost(HttpServletRequest request, HttpServletResponse response)\r\n\t\t\tthrows ServletException, IOException {\r\n\r\n\t\t\r\n\t}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tdoGet(request, response);\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \tSystem.out.println(\"---here---value-\");\n processRequest(request, response);\n \n }", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\n\n if (!SessionUtils.validateSession(req)){\n resp.sendRedirect(Constants.LOGIN_PAGE_URL);\n return;\n }\n\n BMSEngine engine = ServletUtils.getEngine(getServletContext());\n StringBuilder builder = new StringBuilder();\n String line;\n String streamData;\n BufferedReader reader = req.getReader();\n\n while ((line = reader.readLine()) != null){\n builder.append(line);\n }\n streamData = builder.toString();\n\n JsonElement jsonElement = JsonParser.parseString(streamData);\n JsonObject jsonObject = jsonElement.getAsJsonObject();\n\n int newWindowID = Integer.parseInt(jsonObject.get(\"newWindowID\").getAsString());\n int bookingID = Integer.parseInt(jsonObject.get(\"bookingID\").getAsString());\n\n ScheduleWindow newWindow = engine.retrieveScheduleWindowPerID(newWindowID);\n Booking theBooking = engine.retrieveBookingPerID(bookingID);\n\n String status = \"ok\";\n String message = \"\";\n JsonObject respJSON = new JsonObject();\n try {\n engine.editBookingWindow(newWindow,theBooking);\n notifyRowers(engine, bookingID, theBooking);\n } catch (ExportToXmlException | JAXBException e) {\n status = \"error\";\n message = \"Failed to save the changes to the DB\";\n System.out.println(e.getMessage());\n e.printStackTrace();\n }\n\n respJSON.addProperty(\"message\",message);\n respJSON.addProperty(\"status\",status);\n resp.setContentType(\"application/json\");\n PrintWriter out = resp.getWriter();\n out.println(respJSON.toString());\n out.flush();\n\n }", "protected void doPost(final HttpServletRequest request,final HttpServletResponse response)\r\n throws ServletException, IOException {\r\n this.doGet(request, response);\r\n \r\n }", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tSystem.out.println(\"get\");\n\t\tthis.doPost(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\t}", "@Override\n\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoGet(req, resp);\n\n\t}", "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n processRequest(request, response); \n }", "@Override\n\tpublic void doPost(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\t\n\t\t\tdoGet(request, response);\n\t\t\n\t}", "@Override\r\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\r\n\t\t\tthrows ServletException, IOException {\n\t\tdoGet(req, resp);\r\n\t}", "@Override\n \tpublic void doGet(HttpServletRequest req, HttpServletResponse resp)\n \t\t\tthrows ServletException, IOException {\n \t\tdoPost(req, resp);\n \t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n \n\n doGet(request, response);\n\n }", "protected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response)\r\n\t/* 43: */throws ServletException, IOException\r\n\t/* 44: */{\r\n\t\t/* 45:48 */doGet(request, response);\r\n\t\t/* 46: */}", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\tresponse.setCharacterEncoding(\"utf-8\");\n\t\t\n\t\t\n\t\tPrintWriter out=response.getWriter();\n\t\tString jsonString=\"\";\n\t\tString action_flag=request.getParameter(\"action_flag\");\n\t\tif(action_flag.equals(\"Person\")){\n\t\t\tjsonString=JsonTools.getJsonString( \"Person\", creatJson.getPerson());\n\t\t}else if(action_flag.equals(\"Persons\")){\n\t\t\tjsonString=JsonTools.getJsonString(\"Persons\", creatJson.getPersonList());\n\t\t}else if(action_flag.equals(\"StringList\")){\n\t\t\tjsonString=JsonTools.getJsonString(\"StringList\", creatJson.getStringList());\n\t\t}else if(action_flag.equals(\"ListMap\")){\n\t\t\tjsonString=JsonTools.getJsonString(\"ListMap\", creatJson.getListMap());\n\t\t}\n\t\tout.println(jsonString);\n\t\tout.flush();\n\t\tout.close();\n\t}", "public void doGet(HttpServletRequest request,HttpServletResponse response)\r\n\t{\r\n\t\t PrintWriter out;\r\n\t\t\ttry {\r\n\t\t\t\tout = response.getWriter();\r\n\t\t\t\tout.println(\"<font size='8' color='green'>update your accounts successfully</font>\");\r\n\t\t out.println(\"<form action=\\\"CustomerPage.jsp\\\" method=\\\"POST\\\">\");\r\n\t\t\t\tout.println(\"<input type=\\\"submit\\\" value=\\\"back\\\" style=\\\"font-size:20px;\\\" ></form>\");\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 \r\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {\n\t\tdoProc(req, resp);\n\t}", "@Override\r\n protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n throws ServletException, IOException {\r\n processRequest(request, response);\r\n }", "public void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows IOException {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n processRequest(request,response);\n }", "@Override\n public void doPost(HttpServletRequest req, HttpServletResponse res) throws IOException, ServletException {\n logger.warn(\"doPost Called\");\n handle(req, res);\n }", "protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\ttry{\n\t\t\tCookie ck[]=request.getCookies();\n\t\t\tString user = ck[0].getValue();\n\t\t\t\n\t\t\tAdminDao adminDao = new AdminDaoImpl();\n\t\t\tAdmin admin = adminDao.getAdmin(user);\n\t\t\t//String username = request.getParameter(\"username\");\n\t\t\t//String pass = request.getParameter(\"password\");\n\t\t\tString submitType = request.getParameter(\"submit\");\n\t\t\t\n\t\t\t//Login login = new Login(username, pass);\n\t\t\t\n\t\t\tDoctorDao doctorDao = new DoctorDaoImpl();\n\t\t\tDoctor a = new Doctor();\n\t\t\t\n\t\t\tif(submitType.equals(\"register\")){\n\t\t\t\ta.setName(request.getParameter(\"name\"));\n\t\t\t\ta.setUsername(request.getParameter(\"username\"));\n\t\t\t\ta.setPassword(request.getParameter(\"password\"));\n\t\t\t\ta.setSpecialty(request.getParameter(\"Specialty\"));\n\t\t\t\ta.setInfo(request.getParameter(\"Info\"));\n\t\t\t\tdoctorDao.addDoctor(a);\n\t\t\t\t\n\t\t\t\t//SlotDao slotdao = new SlotDaoImpl();\n\t\t\t\t//slotdao.addSlot(new Slot(600,700,a.getID()));\n\t\t\t\t\n\t\t\t\trequest.setAttribute(\"successMessage\", \"Registration done, please login!\");\n\t\t\t\trequest.setAttribute(\"name\", admin.getName());\n\t\t\t\trequest.getRequestDispatcher(\"AdminHome.jsp\").forward(request, response);\n\t\t\t}}\n\t\tcatch(Exception e){System.out.println(\"Something went wrong\");}\n\t\t\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "@Override\n\tprotected void doPost(HttpServletRequest req, HttpServletResponse resp)\n\t\t\tthrows ServletException, IOException {\n\t\tthis.doGet(req, resp);\n\t}", "public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException {\r\n\tlogTrace( req, \"POST log\" );\r\n\tString requestId = req.getQueryString();\r\n\tif (requestId == null) {\r\n\t try {\r\n\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t } catch (IOException ex) {\r\n\t }\r\n\t logError( req, resp, new Exception(\"Unrecognized POST\"), \"\" );\r\n\t sendError(resp, \"Unrecognized POST\");\r\n\t} else\r\n\t if (\"post-request\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onMEVPostsRequest( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"MEV POST error\" );\r\n\t\t sendError( resp, \"MEV POST error: \" + e.toString() );\r\n\t\t}\r\n\t } else if (\"post-response\".equals( requestId )) {\r\n\t\ttry {\r\n\t\t onPVMPostsResponse( req, resp );\r\n\t\t} catch (Exception e) {\r\n\t\t try {\r\n\t\t\tServletUtil.bufferedRead( req.getInputStream() );\r\n\t\t } catch (IOException ex) {\r\n\t\t }\r\n\t\t logError( req, resp, e, \"PVM POST error\" );\r\n\t\t sendError( resp, \"PVM POST error: \" + e.toString() );\r\n\t\t}\r\n\t }\r\n }" ]
[ "0.7970743", "0.7586927", "0.7577237", "0.7455075", "0.7455075", "0.73841655", "0.7382704", "0.7382704", "0.7382704", "0.73352426", "0.73352426", "0.73352426", "0.7323525", "0.7321477", "0.730626", "0.730626", "0.72965455", "0.7276625", "0.7271159", "0.72566265", "0.7256325", "0.72495013", "0.7229876", "0.7220707", "0.7217633", "0.721295", "0.721247", "0.7208147", "0.71899736", "0.71855813", "0.7177971", "0.7174215", "0.7156793", "0.7156793", "0.7156793", "0.71522033", "0.7149451", "0.7141183", "0.7118724", "0.7111581", "0.7108552", "0.70964277", "0.7094191", "0.7080765", "0.7076391", "0.7075308", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70732", "0.70637983", "0.7063015", "0.70397365", "0.7036851", "0.703142", "0.7030064", "0.7029352", "0.70288306", "0.7012549", "0.7010672", "0.69915444", "0.6988873", "0.6984469", "0.6977602", "0.69759095", "0.6975696", "0.6972884", "0.69353545", "0.6931876", "0.6931876", "0.6931876", "0.6931082", "0.69282085", "0.69282085", "0.6917489", "0.69168913", "0.691545", "0.6906424", "0.6896592", "0.6891963", "0.6891932", "0.6880928", "0.68771535", "0.6872818", "0.68673325", "0.68636656", "0.6859148", "0.6856519", "0.6840345", "0.6834624", "0.6833597", "0.6833597", "0.6833597", "0.6826416" ]
0.0
-1
for printing long log
private static void log(String message){ int maxLogSize = 2000; for(int i = 0; i <= message.length() / maxLogSize; i++) { int start = i * maxLogSize; int end = (i+1) * maxLogSize; end = end > message.length() ? message.length() : end; Log.i(TAG, message.substring(start, end)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void longInfo(@Nullable String str)\r\n\t{\r\n\t\tif (str == null) str = \"[null]\";\r\n\r\n\t\tif (str.length() > 4000)\r\n\t\t{\r\n\t\t\tLog.println(LOG_LEVEL, LOG_TAG, str.substring(0, 4000));\r\n\t\t\tlongInfo(str.substring(4000));\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tLog.println(LOG_LEVEL, LOG_TAG, str);\r\n\t\t}\r\n\t}", "private void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "public static void longInfo(String str) {\n\t\tif(str.length() > 4000) {\n\t\t\tLog.i(\"Lengthy String\", str.substring(0, 4000));\n\t\t\tlongInfo(str.substring(4000));\n\t\t} else\n\t\t\tLog.i(\"Lengthy String\", str);\n\t}", "public static void largeLog(String tag, String content) {\n if (content.length() > 1000) {\n Log.d(tag, content.substring(0, 1000));\n largeLog(tag, content.substring(1000));\n } else {\n Log.d(tag, content);\n }\n }", "@Override\n public String toString() {\n if(toStringLong().length() > 28) {\n return toStringLong().substring(0, 25) + \"...\";\n }\n return toStringLong();\n }", "private void writeLog(){\n\t\tStringBuilder str = new StringBuilder();\r\n\t\tstr.append(System.currentTimeMillis() + \", \");\r\n\t\tstr.append(fileInfo.getCreator() + \", \");\r\n\t\tstr.append(fileInfo.getFileName() + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(networkSize + \", \");\r\n\t\tstr.append(fileInfo.getN1() + \", \");\r\n\t\tstr.append(fileInfo.getK1() + \", \");\r\n\t\tstr.append(fileInfo.getN2() + \", \");\r\n\t\tstr.append(fileInfo.getK2() + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT)+ \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.encryStart, logger.encryStop) + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \"\\n\");\r\n\t\t\r\n\t\tString tmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getKeyStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\r\n\t\t\r\n\t\ttmp=\"\t\";\r\n\t\tfor(Integer i : fileInfo.getFileStorage())\r\n\t\t\ttmp += i + \",\";\r\n\t\ttmp += \"\\n\";\r\n\t\tstr.append(tmp);\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.FILE_CREATION, str.toString());\t\t\r\n\t\t\r\n\t\t// Topology Discovery\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"TopologyDisc, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.topStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.topStart, logger.topEnd-Constants.TOPOLOGY_DISCOVERY_TIMEOUT ) + \", \");\r\n\t\tstr.append(\"\\n\");\t\t\t\t\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\r\n\t\t\r\n\t\t// Optimization\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"Optimization, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(logger.optStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.optStart, logger.optStop) + \", \");\r\n\t\tstr.append(\"\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t\t\r\n\t\t\r\n\t\t// File Distribution\r\n\t\tstr.delete(0, str.length()-1);\r\n\t\tstr.append(Node.getInstance().getNodeId() + \", \");\t\t\t\r\n\t\tstr.append(\"FileDistribution, \");\r\n\t\tstr.append(networkSize + \", \" + n1 + \", \" + k1 + \", \" + n2 + \", \" + k2 + \", \");\r\n\t\tstr.append(fileInfo.getFileLength() + \", \");\r\n\t\tstr.append(logger.distStart + \", \");\r\n\t\tstr.append(logger.getDiff(logger.distStart, logger.distStop) + \", \");\r\n\t\tstr.append(\"\\n\\n\");\r\n\t\t//dataLogger.appendSensorData(LogFileName.TIMES, str.toString());\t\t\r\n\t}", "void printLog(String str)\n { printLog(str,Log.LEVEL_HIGH);\n }", "private void divertLog() {\n wr = new StringWriter(1000);\n LogTarget[] lt = { new WriterTarget(wr, fmt) };\n SampleResult.log.setLogTargets(lt);\n }", "private static String formatLog() {\r\n String str = \"\";\r\n\r\n str = log.stream().map((temp) -> temp + \"\\n\").reduce(str, String::concat);\r\n\r\n return str;\r\n }", "public String toString_long() {\n StringBuffer sb = new StringBuffer();\n if (addedEdges != null) {\n sb.append(\" writes: \");\n for (Iterator i=addedEdges.entrySet().iterator(); i.hasNext(); ) {\n java.util.Map.Entry e = (java.util.Map.Entry)i.next();\n jq_Field f = (jq_Field)e.getKey();\n Object o = e.getValue();\n if (o == null) continue;\n sb.append(f);\n sb.append(\"={\");\n if (o instanceof Node)\n sb.append(((Node)o).toString_short());\n else {\n for (Iterator j=((Set)o).iterator(); j.hasNext(); ) {\n sb.append(((Node)j.next()).toString_short());\n if (j.hasNext()) sb.append(\", \");\n }\n }\n sb.append(\"} \");\n }\n }\n if (accessPathEdges != null) {\n sb.append(\" reads: \");\n sb.append(accessPathEdges);\n }\n if (passedParameters != null) {\n sb.append(\" called: \");\n sb.append(passedParameters);\n }\n return sb.toString();\n }", "public void log(Request request, Reply reply, int nbytes, long duration) {\n Client client = request.getClient();\n long date = reply.getDate();\n String user = (String) request.getState(AuthFilter.STATE_AUTHUSER);\n URL urlst = (URL) request.getState(Request.ORIG_URL_STATE);\n String requrl;\n if (urlst == null) {\n URL u = request.getURL();\n if (u == null) {\n requrl = noUrl;\n } else {\n requrl = u.toExternalForm();\n }\n } else {\n requrl = urlst.toExternalForm();\n }\n StringBuffer sb = new StringBuffer(512);\n String logs;\n int status = reply.getStatus();\n if ((status > 999) || (status < 0)) {\n status = 999;\n }\n synchronized (sb) {\n byte ib[] = client.getInetAddress().getAddress();\n if (ib.length == 4) {\n boolean doit;\n edu.hkust.clap.monitor.Monitor.loopBegin(349);\nfor (int i = 0; i < 4; i++) { \nedu.hkust.clap.monitor.Monitor.loopInc(349);\n{\n doit = false;\n int b = ib[i];\n if (b < 0) {\n b += 256;\n }\n if (b > 99) {\n sb.append((char) ('0' + (b / 100)));\n b = b % 100;\n doit = true;\n }\n if (doit || (b > 9)) {\n sb.append((char) ('0' + (b / 10)));\n b = b % 10;\n }\n sb.append((char) ('0' + b));\n if (i < 3) {\n sb.append('.');\n }\n }} \nedu.hkust.clap.monitor.Monitor.loopEnd(349);\n\n } else {\n sb.append(client.getInetAddress().getHostAddress());\n }\n sb.append(\" - \");\n if (user == null) {\n sb.append(\"- [\");\n } else {\n sb.append(user);\n sb.append(\" [\");\n }\n dateCache(date, sb);\n sb.append(\"] \\\"\");\n sb.append(request.getMethod());\n sb.append(' ');\n sb.append(requrl);\n sb.append(' ');\n sb.append(request.getVersion());\n sb.append(\"\\\" \");\n sb.append((char) ('0' + status / 100));\n status = status % 100;\n sb.append((char) ('0' + status / 10));\n status = status % 10;\n sb.append((char) ('0' + status));\n sb.append(' ');\n if (nbytes < 0) {\n sb.append('-');\n } else {\n sb.append(nbytes);\n }\n if (request.getReferer() == null) {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"-\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"-\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n } else {\n if (request.getUserAgent() == null) {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"-\\\"\");\n } else {\n sb.append(\" \\\"\");\n sb.append(request.getReferer());\n sb.append(\"\\\" \\\"\");\n sb.append(request.getUserAgent());\n sb.append('\\\"');\n }\n }\n sb.append('\\n');\n logs = sb.toString();\n }\n logmsg(logs);\n }", "public String getLog();", "public void logElapsedTime() {\r\n\r\n NumberFormat nf = NumberFormat.getInstance();\r\n\r\n nf.setMaximumFractionDigits(2);\r\n nf.setMinimumFractionDigits(2);\r\n\r\n historyString = new String(\"Elapsed Time = \" + nf.format(getElapsedTime()) + \" sec.\\n\");\r\n writeLog();\r\n }", "String getLogContinued();", "String getLogExhausted();", "public void print(long someLong) {\r\n print(someLong + \"\");\r\n }", "private void log(String string) {\n long newTime = System.currentTimeMillis();\n mOutput.append(String.format(\"+%04d: %s\\n\",\n newTime - mLastTime, string));\n mLastTime = newTime;\n\n // A little trick to make the text view scroll to the end\n mScroller.post(new Runnable() {\n @Override\n public void run() {\n mScroller.fullScroll(View.FOCUS_DOWN);\n }\n });\n }", "public void printLongBinary(long l) {\n\t}", "@Test\n public void testEvenOverflow1() throws IOException {\n File logFile = tmpDir.newFile(\"mem.log\");\n MemMappedMessageLogger logger = new MemMappedMessageLogger (logFile, 16);\n\n for (int i=1; i <= 8; i++) {\n String msg = String.format(\"M%02d\", i); // logger adds \\n char to each\n logger.log(true, msg.getBytes(), 0, msg.length());\n }\n\n logger.close();\n assertLogContent (\"M05\\nM06\\nM07\\nM08\\n\", logFile);\n }", "@Test\n public void testEvenOverflow() throws IOException {\n File logFile = tmpDir.newFile(\"mem.log\");\n MemMappedMessageLogger logger = new MemMappedMessageLogger (logFile, 16);\n\n for (int i=1; i <= 5; i++) {\n String msg = String.format(\"M%02d\", i); // logger adds \\n char to each\n logger.log(true, msg.getBytes(), 0, msg.length());\n }\n\n logger.close();\n assertLogContent (\"M05\\nM02\\nM03\\nM04\\n\", logFile);\n }", "private void log(String val)\n {\n System.out.println(String.format(\"JOB: %s CPU #: %s MSG: %s\",\n currentJobNumber(),\n cpuNum,\n val));\n }", "private void logMessage(String msg) {\n\n\t\tlog.logMsg(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg + \"\\n\");\n\n\t\t// System.out.println(\"(L\" + lexAnalyser.getLineCount() + \")\" + msg);\n\n\t}", "private void appendLongStrBuf(char[] arr) {\n for (int i = 0; i < arr.length; i++) {\n appendLongStrBuf(arr[i]);\n }\n }", "public static void logPrint(String s) {\n \tif(!doLog) return;\n \t\n \tif(logMsg==null) logMsg=new String[logMsgN];\n \t\n \tString tstr=null;\n \tif(logStyle==LOGSINCESTART) \n \t\ttstr=timeStr(System.currentTimeMillis()-logStart);\n \telse {\n \tcal.setTimeInMillis(System.currentTimeMillis());\n \ttstr=nf(cal.get(Calendar.HOUR_OF_DAY),2) +\n \t\t\":\"+nf(cal.get(Calendar.MINUTE),2);\n \t}\n\n \tif(!logNoPrint) System.out.println(tstr+\" \"+s);\n \tSystem.arraycopy(logMsg,0,logMsg,1,logMsgN-1);\n \tlogMsg[0]=s;\n \tif(logger!=null) logger.info(s);\n }", "public void viewLogs() {\n\t}", "public static void log(String msg) {\n\t\tif (!log)\n\t\t\treturn;\n\n\n\t\tfinal int MAX = 1000;\n\t\tint start, end;\n\n\t\tfor (int i = 0; i <= msg.length() / MAX; i++) {\n\t\t\tstart = i * MAX;\n\t\t\tend = (i + 1) * MAX;\n\t\t\tend = end > msg.length() ? msg.length() : end;\n\t\t\tLog.v(\"Log\", msg.substring(start, end));\n\t\t}\n\t}", "public HtShowDetailedLog() {\n\t}", "private static void log(String aMsg){\n\t System.out.println(aMsg);\n\t }", "private void printTimer() {\n\t\tif (_verbose) {\n\t\t\tSystem.out.println(\"\");\n\t\t\tSystem.out.println(\"-- \" + getTimeString() + \" --\");\n\t\t}\n\t}", "private void debugPrintLn(String msg)\n {\n System.out.println(\";; [RedirectorPoolThread:\" + _id + \"] \" + msg);\n }", "Appendable getLog();", "private void log(String l) {\n if (LOG) {\n System.out.println(\"RotationMatrixTest.\" + l);\n }\n }", "private void log(String msg) {\n\t\tSystem.out.println(new Date() + \": \" + msg);\n\t}", "void log();", "private void printLog(String str, int level)\n { if (log!=null) log.println(\"AudioApp: \"+str, LoopbackMediaApp.LOG_OFFSET+level);\n if (level<=Log.LEVEL_HIGH) System.out.println(\"AudioApp: \"+str);\n }", "void printLog(String str, int level)\n { if (log!=null) log.println(\"CommandLineUA: \"+str, UserAgent.LOG_OFFSET+level);\n }", "@Override\r\n\tpublic String format(LogRecord record) {\n\t\tDate date = new Date(record.getMillis());\r\n\t\tSimpleDateFormat format = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\treturn format.format(date)+\" \" + record.getLevel()+\": \\n\" + record.getMessage()+\"\\n\";\r\n\t\t\r\n\t}", "static public void GLOBLOG(int logNumber, char logChar) {\r\n if(logNumber <= GlobalOptions.logLevel){\r\n // System.out.print(\"LOG-->\"+logChar);\r\n System.out.print(newline_prefix + logChar);\r\n System.out.flush();\r\n }\r\n }", "private final void prtln(String s) {\n\n\t\tif (debug) {\n\n\t\t\tSystem.out.println(getDateStamp() + \" \" + s);\n\n\t\t}\n\n\t}", "T print(long data) throws PrintingException;", "@Override\n public void log(byte[] buffer, int start, int count) throws IOException {\n String logData = new String(buffer, start, count, this.encoding);\n String lineFeed = this.addLineFeed ? this.lineSeparator : \"\";\n String logEntry = String.format(\"%s: %s%s\", this.prefix, logData, lineFeed);\n stream.print(logEntry);\n }", "private void constructLog() {\r\n String padStr = new String();\r\n padStr = \"Pad with slices \";\r\n\r\n if (padMode == PAD_FRONT) {\r\n padStr += \" using front slices\";\r\n } else if (padMode == PAD_BACK) {\r\n padStr += \" using back slices\";\r\n } else if (padMode == PAD_HALF) {\r\n padStr += \" using front and back slices\";\r\n }\r\n\r\n historyString = new String(\"PadWithSlices(\" + padStr + \")\\n\");\r\n }", "protected Log getLog()\n/* */ {\n/* 59 */ return log;\n/* */ }", "private String getLog() {\n\n\t\tNexTask curTask = TaskHandler.getCurrentTask();\n\t\tif (curTask == null || curTask.getLog() == null) {\n\t\t\treturn \"log:0\";\n\t\t}\n\t\tString respond = \"task_log:1:\" + TaskHandler.getCurrentTask().getLog();\n\t\treturn respond;\n\t}", "public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}", "private void lineBreak()\n\t{\n\t\tlog += String.format(\"%n\");\n\t\tfor(int i = 0; i < 25; i++)\n\t\t\tlog += \"-\";\n\t\tlog += String.format(\"%n\");\n\t}", "public void prlns(long a) {\n\t\tSystem.out.println(a);\r\n\t}", "LogTailer startTailing();", "public void print(){\t\t\r\n\t\tSystem.out.println(\"===\\nCommit \" + id +\"\\n\"+ Time + \"\\n\" + message + \"\\n\");\r\n\t}", "String getLogHandled();", "private void logFullTestDescription() {\n\t\tif (m_currentTestCaseTestSteps != null) {\n\t\t\tString[] fullDescription = m_currentTestCaseTestSteps.split(\"%%%\");\n\t\t\tfor (String testStep : fullDescription) {\n\t\t\t\tm_logMessage.append(\" \" + testStep + \"\\n\");\n\t\t\t}\n\t\t}\n\t}", "T println(long data) throws PrintingException;", "public static void main(String []args) {\n\t\tlog.trace(\"111---\");\n\t\tlog.debug(\"2222\");\n\t\tlog.info(\"333\");\n\t\tlog.warn(\"444\");\n\t\tlog.error(\"555\");\n\t}", "@Override\n\tpublic ReturnCode loggerWrite(byte[] buffer, int len) {\n\t\t\n\t\tSystem.out.println(new String(buffer));\n\t\treturn InstaMsg.ReturnCode.SUCCESS;\n\t}", "@Override \n public String toString(){\n return this.logRepresentation;\n }", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "public void writeLog() {\n\n\t}", "private synchronized static void internalLog(StringBuilder msg) {\n\n //add time header\n String timeStamp = simpleDateFormat.format(new Date());\n msg.insert(0, timeStamp);\n byte[] contentArray = msg.toString().getBytes();\n int length = contentArray.length;\n int srcPos = 0;\n\n if (mPos == LOG_BUFFER_SIZE_MAX) {\n //Flush internal buffer\n flushInternalBuffer();\n }\n\n if (length > buffer.length) {\n //Strongly flush the current buffer no matter whether it is full\n flushInternalBuffer();\n\n //Flush all msg string to sd card\n while (length > buffer.length) {\n\n System.arraycopy(contentArray, srcPos, buffer, mPos, buffer.length);\n\n flushInternalBuffer();\n\n length -= buffer.length;\n srcPos += buffer.length;\n\n }\n } else if (length == buffer.length) {\n flushInternalBuffer();\n\n //Copy contents to buffer\n System.arraycopy(contentArray, 0, buffer, mPos, length);\n flushInternalBuffer();\n length = 0;\n }\n\n if (length < buffer.length && length > 0) {\n if ((mPos + length) > buffer.length) {\n flushInternalBuffer();\n\n //Copy contents to buffer\n System.arraycopy(contentArray, srcPos, buffer, mPos, length);\n mPos += length;\n\n } else if ((mPos + length) == buffer.length) {\n //Add content to buffer\n System.arraycopy(contentArray, srcPos, buffer, mPos, length);\n mPos += length;\n\n flushInternalBuffer();\n\n } else {\n //Add content to buffer\n System.arraycopy(contentArray, srcPos, buffer, mPos, length);\n mPos += length;\n\n }\n\n }\n\n }", "public void showLogs() {\n String headID = Utils.readObject(HEADFILE, String.class);\n File asFile = new File(Main.ALL_COMMITS, headID);\n Commit associatedCommit = Utils.readObject(asFile, Commit.class);\n while (associatedCommit != null) {\n printCommitLog(associatedCommit);\n String parent = associatedCommit.getParent();\n if (parent == null) {\n break;\n }\n File commitFile = new File(Main.ALL_COMMITS, parent);\n associatedCommit = Utils.readObject(commitFile, Commit.class);\n }\n }", "static public void GLOBLOG(int logNumber, String logMessage) {\r\n if(logNumber <= GlobalOptions.logLevel){\r\n System.out.print(newline_prefix + logMessage);\r\n System.out.flush();\r\n }\r\n }", "public void printLog() {\n Runnable runnable = new Runnable() \n\t{\n @Override\n public void run() \n\t {\n\t\tmainClass os=new mainClass();\n\t\tos.run();\t\t\t\n\t\t\t\t\n }\n };\n\tThread thread = new Thread(runnable);\n thread.start();\n }", "private void appendStrBufToLongStrBuf() {\n for (int i = 0; i < strBufLen; i++) {\n appendLongStrBuf(strBuf[i]);\n }\n }", "private void debugPrint(String msg)\n {\n System.out.print(\";; [RedirectorPoolThread:\" + _id + \"] \" + msg);\n }", "long getLastLogIndex();", "public void log(String str)\n\t{\n\t\tDate date = new Date();\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm\");\n\t\t\n\t\tString loggable = dateFormat.format(date) + \": \" + str;\n\t\t\n\t\t// Add it to the log\n\t\tthis.log.add(loggable);\n\t\t\n\t\t// Print it out, for now.\n\t\tSystem.out.println(loggable); \n\t}", "public void logCommunalDeck()\n\t{\n\t\t\tlog += String.format(\"%nCOMMUNAL DECK UPDATED%nCOMMUNAL DECK NOW EMPTY\");\n\t\t\tlineBreak();\n\t}", "String longWrite();", "private String longStrBufToString() {\n if (longStrBufPending != '\\u0000') {\n appendLongStrBuf(longStrBufPending);\n }\n return new String(longStrBuf, 0, longStrBufLen);\n }", "private static void longer_logmsg_Log4j(Logger log, Object msg, Throwable ex, int id, \n String original_methname, Object msg_modified) {\n\n Level level = Level.toLevel(original_methname);\n boolean legacyEnabled = log.isEnabledFor(level);\n int printResult = shouldPrint(id, legacyEnabled);\n if( (printResult & LOG_OUT) != 0) {\n /*LEVS methname = getWarnLevel(id);\n if(methname == null)\n methname = setMeth(id, original_methname);\n Level level = Level.toLevel(methname.toString());*/\n if(msg_modified == null)\n msg_modified = taggedID(id) + msg;\n \n String logname = log.getName();\n\n log.callAppenders(\n new org.apache.log4j.spi.LoggingEvent(logname, log, level, msg_modified, ex));\n }\n if( (printResult & RECORD_OUT) != 0)\n RecordStatements.record(id, original_methname, msg, ex);\n }", "private static final void log(String msg) {\n\t\tlog.println(msg);\n\t}", "public StringBuilder buildLogContent() {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tint numberOfServers = Integer.parseInt(properties.getProperty(\"numberOfServers\"));\n\t\tint numberOfCpus = Integer.parseInt(properties.getProperty(\"numberOfCpus\"));\n\t\tint numberOfDays = Integer.parseInt(properties.getProperty(\"numberOfDays\"));\n\t\tint numberOfMins = numberOfDays * 24 * 60;\n\n\t\tfor (int server = 0; server < numberOfServers; server++) {\n\t\t\tfor (int cpu = 0; cpu < numberOfCpus; cpu++) {\n\t\t\t\tfor (int min = 0; min < numberOfMins; min++) {\n\t\t\t\t\tsb.append(new Log(server, cpu, min).getLine()).append(\"\\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sb;\n\n\t}", "private static void log(String msg) {\n System.out.println(msg);\n }", "public void printLongestTrack(BufferedWriter bw) throws IOException\r\n {\r\n\tTrack longestTrack = printLongestTrack();\r\n\tString outputString = \"Track in collection with longest duration:\\r\\n\";\r\n\t// Write output to bufferedWriter\r\n\tbw.write(outputString);\r\n\tbw.write(longestTrack.toString() + \"\\r\\n\");\r\n }", "protected void onANRHappend(long delta) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"[############ ANR: take \");\n sb.append(delta);\n sb.append(\" ms #############]\\n\");\n\n printAllStackTraces(sb.toString(), KANRLog);\n\n try {\n // there are may be problem\n LogToES.writeThreadLogToFileReal(LogToES.LOG_PATH,\n KANRLog.logFileName,\n KANRLog);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private void logParkingLotAgent() {\n\t\t\n\t\tLogger logger = Logger.getInstance();\n\t\t\n\t\tlogger.logPrint(\"PARKING LOT ARGS START\");\n\t\tlogger.logPrint(\"Coords: (\" + coords.x + \", \" + coords.y + \")\");\n\t\tlogger.logPrint(\"Available spots: \" + spots);\n\t\tlogger.logPrint(\"Regular: \" + regularSpots + \" Luxury: \" + luxurySpots + \" Handicap: \" + handicapSpots);\n\t\tlogger.logPrint(\"Hourly cost: \" + hourlyCost);\n\t\tlogger.logPrint(\"Luxury cost modifier: \" + luxuryCostPercent);\n\t\tlogger.logPrint(\"PARKING LOT ARGS END\" + System.lineSeparator());\n\t}", "public long getLogSize() {\n\t\treturn Appender.SIZE_UNDEFINED;\n\t}", "private StringBuffer formattedStringBuffer( final long value ) {\n\t\t\treturn formattedStringBuffer( (double)value );\n\t\t}", "public String get_log(){\n }", "@Override\n public String toString() {\n StringBuilder s = new StringBuilder(\"{\");\n for (Long v : this)\n s.append(v).append(\", \");\n if (s.length()>1) s.setLength(s.length()-2);\n return s.append(\"}\").toString();\n }", "private void log(String message) {\n System.out.println( message );\n sb.append( message ).append( \"\\n\" );\n }", "private void print(String msg) {\r\n\t\tSystem.out.printf(\"[%tT] %s\\n\", Calendar.getInstance(), msg);\r\n\t}", "private String fetchLogEntry(int i) {\n\t\tif (log.size() >= i) {\n\t\t\tLog logEntry = log.get(log.size()-i);\n\t\t\tif (logEntry.getStatus() == Status.ALARM) {\n\t\t\t\treturn logEntry.getTimeStamp()+\"* \"+logEntry.getMessage();\n\t\t\t} else {\n\t\t\t\treturn logEntry.getTimeStamp()+\" \"+logEntry.getMessage();\n\t\t\t}\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "protected void writeLog() {\r\n\r\n // get the current date/time\r\n DateFormat df1 = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.MEDIUM);\r\n\r\n // write to the history area\r\n if (Preferences.is(Preferences.PREF_LOG) && completed) {\r\n\r\n if (destImage != null) {\r\n\r\n if (srcImage != null) {\r\n destImage.getHistoryArea().setText(srcImage.getHistoryArea().getText());\r\n }\r\n\r\n if (historyString != null) {\r\n destImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n } else if (srcImage != null) {\r\n\r\n if (historyString != null) {\r\n srcImage.getHistoryArea().append(\"[\" + df1.format(new Date()) + \"] \" + historyString);\r\n }\r\n }\r\n }\r\n }", "private void tryToLog(Object proxy, long timeStart, Method method, Object[] args) {\n if (DynamicProxyUtil.LOGGER_ON) {\n long timeStop = System.nanoTime();\n System.out.println(String.format(OUTPUT_FORMAT, timeStop - timeStart, proxy.getClass().getName(),\n PROXIED_OBJECT.getClass().getName() + \"#\" + method.getName(), Arrays.toString(args).replaceAll(\"\\n\",\"\").trim()));\n }\n }", "public void log(String txt);", "static void log(String text) {\n\t\tif (LoggingConfig.BUFFER_VERBOSE) {\n\t\t\tSystem.out.println(text);\n\t\t}\n\t}", "protected String logFile(AggregatedJob job) {\n StringBuffer sb = new StringBuffer(32);\n if (mGlobalLog) {\n // the basename of the log file is derived from the dag name\n sb.append(this.mClusteredADag.getLabel());\n } else {\n // per seqexec job name\n sb.append(job.getName());\n }\n sb.append(this.SEQEXEC_PROGRESS_REPORT_SUFFIX);\n return sb.toString();\n }", "private void logika_rozpocznij(){\n\t}", "private static void writeLog(String log) {\n\t\twriteLog(log, true);\n\t}", "public void printLong(int length, int step) throws IOException{ \n int c , r, a; //cols, rows, and then another iterator\n PrintWriter x;\n String out = \"\";\n for(int i = 1; i < length/step; i++){\n x = new PrintWriter(i + \".txt\");\n out = \"\";\n for(c = 0; c < getGrid().getNumCols(); c++){\n for(r = 0; r < getGrid().getNumRows(); r++)\n out += getGrid().get(new Location(c , r)).getFitness() + \"\\t\";\n out += \"\\n\";\n }\n x.print(out);\n x.close();\n for(a = 0; a < step; a++)step();\n }\n }", "public static void dbg(String str) {\n\t\tString time = \"\";\r\n\t\tout(\"[MN] \"+Thread.currentThread().getId()+\" [\"+time+\"]> \"+str);\t\t\r\n\t}", "private static void prtln(String s) {\n\t\tif (debug) {\n\t\t\t// System.out.println(\"JloTester: \" + s);\n\t\t\tSystem.out.println(s);\n\t\t}\n\t}", "public void globallog() {\n for (Comm currcomm: allcomms.values()) {\n System.out.println(\"===\");\n System.out.println(\"commit \" + currcomm.getCommitID());\n if (currcomm.getMergepointer() != null) {\n System.out.println(\"Merge: \"\n + currcomm.getParent()\n .getCommitID().substring(0, 7) + \" \"\n + currcomm\n .getMergepointer().getCommitID().substring(0, 7));\n }\n System.out.println(\"Date: \" + currcomm.getDate());\n System.out.println(currcomm.getMessage());\n System.out.println();\n }\n }", "private void display(String msg) {\n String time = simpleDateFormat.format(new Date()) + \" | \" + msg;\n System.out.println(time);\n }", "public String getRunLog();", "void log(String line);", "private void printMsg(String msg) {\n Log.i(\"memorycat_log_tag\",msg);\n }", "protected void log(String s ) {\r\n\tmessageSB.append( s ).append(\"\\r\\n\");\r\n }", "static String printableString(final String string) {\n int maxLogStringLength = 64;\n if (string == null || string.length() == 0) {\n return string;\n }\n\n String ret = string.replaceAll(\"[^\\\\p{Print}]\", \"?\");\n\n ret = ret.substring(0, Math.min(ret.length(), maxLogStringLength)) + (ret.length() > maxLogStringLength ? \"...\" : \"\");\n\n return ret;\n\n }" ]
[ "0.662016", "0.6337329", "0.63186085", "0.6223717", "0.609914", "0.60885996", "0.6087757", "0.6044308", "0.6014167", "0.5980862", "0.59463394", "0.5839249", "0.58099085", "0.57715803", "0.57659847", "0.5763297", "0.574776", "0.57445383", "0.5728576", "0.5717788", "0.57014936", "0.57006925", "0.5699455", "0.5685439", "0.566989", "0.5626037", "0.56129706", "0.5610588", "0.5579398", "0.5545315", "0.55350906", "0.55310434", "0.5521358", "0.5502057", "0.55008", "0.548964", "0.548891", "0.5484553", "0.5476143", "0.5466384", "0.54581386", "0.545632", "0.5455607", "0.5449063", "0.54360473", "0.54319525", "0.5430755", "0.5427588", "0.54063874", "0.5404883", "0.54038036", "0.5396024", "0.53862095", "0.5383635", "0.5378896", "0.5378154", "0.5378154", "0.5378154", "0.5378102", "0.53753924", "0.5366195", "0.53612864", "0.53550696", "0.5354464", "0.5345669", "0.53388894", "0.53238344", "0.5314243", "0.5300827", "0.52908456", "0.52901846", "0.5280094", "0.52711403", "0.5270915", "0.5259195", "0.5255626", "0.52555025", "0.5251556", "0.524772", "0.52452785", "0.52442247", "0.52439535", "0.524358", "0.5243232", "0.52425903", "0.5238341", "0.5233476", "0.5231748", "0.5228487", "0.5227724", "0.52206033", "0.5216571", "0.52141356", "0.5212265", "0.52052", "0.5204779", "0.5196183", "0.51903087", "0.51811206", "0.5173589" ]
0.6115148
4
/ returns established connection to database
public Connection connect() { try { connection = DriverManager.getConnection(URL, USERNAME, PASSWORD); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } System.out.println("Creating connection"); return connection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Connection dbConnection() {\n\t\t\n\t\t///\n\t\t/// declare local variables\n\t\t///\n\t\t\n\t\tConnection result = null;\t// holds the resulting connection\n\t\t\n\t\t// try to make the connection\n\t\ttry {\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t\tresult = DriverManager.getConnection(CONNECTION_STRING);\n\t\t} catch (Exception ex) {\n\t\t\tSystem.out.println(ex.getMessage());\n\t\t}\n\t\t\n\t\t// return the resulting connection\n\t\treturn result;\n\t\t\n\t}", "public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }", "private Connection connect() {\n\t String url = \"jdbc:sqlite:\" + this.db;\r\n\t Connection conn = null;\r\n\t try {\r\n\t \t// Incercam conexiunea la baza de date\r\n\t conn = DriverManager.getConnection(url);\r\n\t } catch (SQLException e) {\r\n\t System.out.println(e.getMessage());\r\n\t }\r\n\t return conn; // returnam conexiunea, daca aceasta s-a facut fara erori\r\n\t }", "private Connection connect() {\n String url = \"jdbc:sqlite:\" + dbPath + dbName;\n Connection con = null;\n try {\n con = DriverManager.getConnection(url);\n }\n catch (SQLException e) {\n System.out.println(\"ERROR: \" + e.getMessage());\n }\n\n return con;\n }", "private Connection connect() {\n // SQLite connection string\n \tString url = \"jdbc:sqlite:DataBase/\" + database;\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "private Connection connect_db() {\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setUser(db_user);\n dataSource.setPassword(db_pass);\n dataSource.setServerName(db_url);\n dataSource.setDatabaseName(db_database);\n\n Connection conn = null;\n try {\n conn = dataSource.getConnection();\n conn.setAutoCommit(false);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public Connection getConnection();", "public Connection getConnection();", "public Connection getConnection();", "public Connection createConnection(){\n Connection conn = null;\n registerDriver();\n createURL();\n\n try {\n conn = DriverManager.getConnection(urlDB,username,password);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n System.out.println((conn != null)?\"You made it, take control your database now!\":\"Failed to make connection!\");\n\n return conn;\n}", "public static Connection establishConnection() {\n\t\tProperties props = new Properties();\n\t\tprops.setProperty(\"gssEncMode\", \"disable\");\n\t\tprops.setProperty(\"user\", \"pi\");\n\t\tprops.setProperty(\"password\", \"Bdw040795\"); // Should probably find a way to not have password in plaintext\n\t\tprops.setProperty(\"sslmode\", \"disable\");\n\t\tConnection WeatherDB;\n\t\ttry {\n\t\tWeatherDB = DriverManager.getConnection(\"jdbc:postgresql://10.0.0.100:5433/weather_app\", props);\n\t\treturn WeatherDB;\n\t\t} catch (SQLException e) {\n\t\te.printStackTrace();\n\t\tWeatherDB = null;\n\t\treturn WeatherDB;\n\t\t}\n\t}", "public Connection openDBConnection() {\n\t\ttry {\n\t\t\tClass.forName(\"oracle.jdbc.OracleDriver\");\n\t\t\tConnection myConnection = DriverManager.getConnection(\n\t\t\t\t\t\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" + \"csci.cscioraclesrv.ad.csbsju.edu\",\n\t\t\t\t\t\"team1\", \"Boh3P\");\n\t\t\treturn myConnection;\n\t\t} catch (Exception E) {\n\t\t\tE.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "public\n Connection getConnection();", "private Connection openConnection() throws SQLException {\r\n\t\tConnection dbConnection = DriverManager.getConnection(databaseURL, username, password);\r\n\t\treturn dbConnection;\r\n\t}", "public DatabaseConnection newConnection();", "public Connection openDBConnection() {\n try {\n // Load driver and link to driver manager\n Class.forName(\"oracle.jdbc.OracleDriver\");\n // Create a connection to the specified database\n Connection myConnection = DriverManager.getConnection(\"jdbc:oracle:thin:@//cscioraclesrv.ad.csbsju.edu:1521/\" +\n \"csci.cscioraclesrv.ad.csbsju.edu\",\"TEAM5\", \"mnz\");\n return myConnection;\n } catch (Exception E) {\n E.printStackTrace();\n }\n return null;\n }", "private Connection createConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:mysql://\" + host + \":\" + port + \"/\" + db, user, password);\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }", "public Connection createConnection() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n c = DriverManager.getConnection(\"jdbc:sqlite:ase_i3.db\");\n } catch (Exception e) {\n System.err.println(e.getClass().getName() + \": \" + e.getMessage());\n return null;\n }\n System.out.println(\"Database connection succeed.\");\n return c;\n }", "public Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:c:/Carapaca/server/db/database.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public static Connection getConnection() {\n Connection con = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n con = DriverManager.getConnection(\n \"jdbc:hsqldb:mem:avdosdb\", \"sa\", \"\");\n } catch(Exception e) {\n e.printStackTrace();\n }\n return con;\n }", "public Connection openConnection(){\n try {\n c = DriverManager.getConnection(\"jdbc:sqlite:LIB.db\");\n s = c.createStatement();\n\n System.out.println(\"Database connection open\");\n return c;\n }catch (SQLException e) {\n System.err.println(\"Opening connection failed: \" + e.getMessage());\n }\n return null;\n }", "private Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(dbDriver);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(dbConnectionURL, dbUser, dbPassword);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "private Connection getConnection() {\n if ( conn==null ) {\n conn = Util.getConnection( \"root\", \"\" );\n }\n return conn;\n }", "private Connection connect() throws SQLException {\n\t\treturn DriverManager.getConnection(\"jdbc:sqlite:database/scddata.db\");\n\t}", "public Connection getConnection() {\r\n\tConnection result = null;\r\n\tif (isConnected()) {\r\n\t result = conn;\r\n\t}\r\n\treturn result;\r\n }", "Connection createConnection();", "public Connection getConexao() {\t\n\t\ttry {\n\t\t\t\n\t\t\tif (this.conn!=null) {\n\t\t\t\treturn this.conn;\n\t\t\t}\n\t\t\t\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconn = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/\"+this.db,this.user,this.pass);\n\t\t\t\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t\treturn this.conn;\n\t}", "private Connection getConn(){\n \n return new util.ConnectionPar().getConn();\n }", "public void getConnect() \n {\n con = new ConnectDB().getCn();\n \n }", "public Connection connect(){\n try{\n \n Class.forName(\"org.apache.derby.jdbc.ClientDriver\").newInstance();\n conn = DriverManager.getConnection(dbUrl, name, pass);\n System.out.println(\"connected\");\n }\n catch(Exception e){\n System.out.println(\"connection problem\");\n }\n return conn;\n }", "public Connection getConnection() throws SQLException {\n\t\treturn Database.getConnection();\n\t}", "public static Connection establecerConexion() throws SQLException {\r\n Connection con = DriverManager.getConnection(getDatabase(), getUser(), getPassword());\r\n \r\n return con;\r\n \r\n }", "public Connection getDBConnection() {\n Connection con = connectDB();\n createTables(con);\n return con;\n }", "public Connection getConnection() {\n try {\n return ds.getConnection();\n } catch (SQLException e) {\n System.err.println(\"Error while connecting to database: \" + e.toString());\n }\n return null;\n }", "public String getConnection();", "private Connection getConnection() {\n\t\tlog.debug(\"getConnection start\");\n\t\tif (con != null)\n\t\t\treturn con;\n\t\tString url = \"jdbc:mysql://localhost:3306/\" + db;\n\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\t\t\tlog.debug(\"getConnection obtained driver\");\n\t\t\tcon = DriverManager.getConnection(url, user, password);\n\t\t\tlog.debug(\"getConnection got connection\");\n\t\t} catch (Exception ex) {\n\t\t\tlog.error(\"getConnection: error:\" + ex.getMessage(), ex);\n\t\t\treturn null;\n\t\t}\n\t\treturn con;\n\t}", "public Connection getConnection() {\n\t\t\tConnection conn = null;\n\t\t\tProperties prop = new Properties();\n\n\t\t\ttry {\n\t\t\t\tString url = \"jdbc:postgresql://java2010rev.cfqzgdfohgof.us-east-2.rds.amazonaws.com:5432/postgres?currentSchema=jensquared\";\n\t\t\t\tString username = \"jenny77\";\n\t\t\t\tString password = \"zeus1418\";\n//\t\t\t\tClassLoader loader = Thread.currentThread().getContextClassLoader();\n//\t prop.load(loader.getResourceAsStream(\"database.properties\"));\n//\t\t\t\tconn = DriverManager.getConnection(prop.getProperty(\"url\"),\n//\t\t\t\t\t\tprop.getProperty(\"username\"),prop.getProperty(\"password\"));\n\t\t\t\tconn = DriverManager.getConnection(url, username, password);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n//\t\t\t} catch (FileNotFoundException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n//\t\t\t} catch (IOException e) {\n//\t\t\t\t// TODO Auto-generated catch block\n//\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn conn;\n\t\t}", "protected Connection connection() {\n\t\tif (connection == null) {\n\t\t\ttry {\n\t\t\t\tdblogger.info(\"Connecting to \" + connectionUrlString);\n\t\t\t\tconnection = DriverManager.getConnection(connectionUrlString,\n\t\t\t\t\t\tusername, password);\n\t\t\t} catch (SQLException exception) {\n\t\t\t\tdblogger.fatal(\"Failed to connect to database using \"\n\t\t\t\t\t\t+ connectionUrlString + \" User: \" + username\n\t\t\t\t\t\t+ \" Password: \" + password);\n\t\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\t\"Failed to connect to the database using \"\n\t\t\t\t\t\t\t\t+ connectionUrlString\n\t\t\t\t\t\t\t\t+ \". Please contact your DBA.\");\n\t\t\t}\n\t\t}\n\t\treturn connection;\n\t}", "public static Connection getConnection() {\n try {\n String dbURL = \"jdbc:mysql://\" + HOST + \":3306/soccer\" ;\n Class.forName(DRIVER);\n Connection connection = DriverManager.getConnection(dbURL, USERNAME, PASSWORD);\n return connection;\n } catch (Exception e) {\n System.out.println(\"Error in Database.getConnection: \" + e.getMessage());\n return null;\n }\n }", "public static Connection getConnectionToDB() {\n\t\tProperties properties = getProperties();\n\n\t\ttry {\n\t\t\tmyConnection = DriverManager.getConnection(JDBC_URL, properties);\n\t\t\treturn myConnection;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}", "@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}", "public Connection getDBConnection()\r\n {\r\n Connection conn = null;\r\n try\r\n {\r\n // Quitamos los drivers\r\n Enumeration e = DriverManager.getDrivers();\r\n while (e.hasMoreElements())\r\n {\r\n DriverManager.deregisterDriver((Driver) e.nextElement());\r\n }\r\n DriverManager.registerDriver(new com.geopista.sql.GEOPISTADriver());\r\n String sConn = aplicacion.getString(UserPreferenceConstants.LOCALGIS_DATABASE_URL);\r\n conn = DriverManager.getConnection(sConn);\r\n AppContext app = (AppContext) AppContext.getApplicationContext();\r\n conn = app.getConnection();\r\n conn.setAutoCommit(false);\r\n } catch (Exception e)\r\n {\r\n return null;\r\n }\r\n return conn;\r\n }", "public void connect(){\n if (connected) {\n // connection already established\n return;\n }\n // Create connection to Database\n Properties props = new Properties();\n props.setProperty(\"user\", DB_USER);\n props.setProperty(\"password\", DB_PASSWORD);\n //props.setProperty(\"ssl\", \"true\");\n //\"Connecting to database...\"\n try {\n Class.forName(\"org.postgresql.Driver\");\n String connection_string = generateURL();\n dbConnect = DriverManager.getConnection(connection_string, props);\n //\"Connection established\"\n status = \"Connection established\";\n connected = true;\n } catch (SQLException e) {\n //\"Connection failed: SQL error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n } catch (Exception e) {\n //\"Connection failed: unknown error\"\n status = \"Connection failed: \" + e.getMessage();\n connected = false;\n }\n }", "private static Connection getDBConnection() {\n\n\t\tConnection dbConnection = null;\n\n\t\ttry {\n\n\t\t\tClass.forName(DB_DRIVER);\n\n\t\t} catch (ClassNotFoundException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\ttry {\n\n\t\t\tdbConnection = DriverManager.getConnection(DB_CONNECTION, DB_USER,\n\t\t\t\t\tDB_PASSWORD);\n\t\t\treturn dbConnection;\n\n\t\t} catch (SQLException e) {\n\n\t\t\tSystem.out.println(e.getMessage());\n\n\t\t}\n\n\t\treturn dbConnection;\n\n\t}", "static Connection getDBConnection(){\r\n\t\t if(mainConnection != null)\r\n\t\t\t return mainConnection;\r\n\t\t \r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\t// loading Oracle Driver\r\n\t\t \t\tSystem.out.print(\"Looking for Oracle's jdbc-odbc driver ... \");\r\n\t\t\t \tDriverManager.registerDriver(new oracle.jdbc.OracleDriver());\r\n\t\t\t \tSystem.out.println(\", Loaded.\");\r\n\r\n\t\t\t\t\tString URL = \"jdbc:oracle:thin:@localhost:1521:orcl\";\r\n\t\t\t \tString userName = \"system\";\r\n\t\t\t \tString password = \"password\";\r\n\r\n\t\t\t \tSystem.out.print(\"Connecting to DB...\");\r\n\t\t\t \tmainConnection = DriverManager.getConnection(URL, userName, password);\r\n\t\t\t \tSystem.out.println(\", Connected!\");\r\n\t\t \t\t}\r\n\t\t \t\tcatch (Exception e)\r\n\t\t \t\t{\r\n\t\t \t\tSystem.out.println( \"Error while connecting to DB: \"+ e.toString() );\r\n\t\t \t\te.printStackTrace();\r\n\t\t \t\tSystem.exit(-1);\r\n\t\t \t\t}\r\n\t\t\t\treturn mainConnection;\r\n\t\t \r\n\t}", "public Connection connect() {\n conn = null;\n try {\n conn = DriverManager.getConnection(url, user, password);\n System.out.println(\"Connected successfully.\");\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n \n return conn;\n }", "public final DBI getConnect() {\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n // String dbc = System.getenv(\"DB_CONNECTION\");\n // if (dbc == null || dbc.equals(\"\")) {\n // dbc = \"localhost:3306\";\n // }\n // DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n DBI dbi = new DBI(\"jdbc:mysql://localhost:3306/MLPXX?allowPublicKeyRetrieval=true&useSSL=false\", \"MLPXX\", \"MLPXX\");\n\n //DBI dbi = new DBI(\"jdbc:mysql://\" + dbc + \"/MLPXX?useSSL=false\", \"MLPXX\", \"MLPXX\");\n // dbi.setSQLLog(new PrintStreamLog());\n return dbi;\n } catch (ClassNotFoundException e) {\n //return null;\n throw new RuntimeException(e);\n }\n }", "public static Connection getConnection() {\n return singleInstance.createConnection();\n }", "String getConnection();", "String getConnection();", "String getConnection();", "String getConnection();", "public Connection getConnection() {\n if(connection == null) throw new RuntimeException(\"Attempt to get database connection before it was initialized\");\n return connection;\n }", "private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }", "public Connection connectdb(){\n Connection con = null;\n try {\n Class.forName(\"com.mysql.cj.jdbc.Driver\");\n con = DriverManager.getConnection(url, user, pass);\n } catch (ClassNotFoundException | SQLException ex) {\n Logger.getLogger(ILocker.class.getName()).log(Level.SEVERE, null, ex);\n }\n return con;\n }", "public static Connection getConnection() {\n \t\treturn connPool.getConnection();\n \t}", "private Connection getConnection() throws ClassNotFoundException, SQLException {\n\n log.info(\"Get DB connection\");\n\n String url = AppConfig.getInstance().getProperty(\"db.URL\") +\n AppConfig.getInstance().getProperty(\"db.schema\") +\n AppConfig.getInstance().getProperty(\"db.options\");\n String sDBUser = AppConfig.getInstance().getProperty(\"db.user\");\n String sDBPassword = AppConfig.getInstance().getProperty(\"db.password\");\n\n if (sDBUser != null && sDBPassword != null && sDBPassword.startsWith(\"crypt:\")) {\n AltEncrypter cypher = new AltEncrypter(\"cypherkey\" + sDBUser);\n sDBPassword = cypher.decrypt(sDBPassword.substring(6));\n }\n\n return DriverManager.getConnection(url, sDBUser, sDBPassword);\n }", "private Connection getConnection() throws SQLException { //gets and returns a connection to the database at the file path specified when the object was instantiated\n return DriverManager.getConnection(\"jdbc:sqlite:\" + databasePath); //returns the connection to the specified database\n }", "public static Connection getConnection() {\n\t\t\n\t\treturn conn;\n\t}", "public Connection getConnection(){\n try{\n if(connection == null || connection.isClosed()){\n connection = FabricaDeConexao.getConnection();\n return connection;\n } else return connection;\n } catch (SQLException e){throw new RuntimeException(e);}\n }", "abstract public boolean createConnection(String database);", "private Connection connect() {\n Connection c = null;\n try {\n Class.forName(\"org.sqlite.JDBC\"); //make sure jdbc exists and can be found\n c = DriverManager.getConnection(\"jdbc:sqlite:\" + url);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n } catch (ClassNotFoundException e) {\n e.printStackTrace();\n }\n return c;\n }", "private Connection getConnection() throws SQLException{\n return ds.getConnection();\n }", "public static Connection connect() throws SQLException {\n\t\tif (connection != null) {\n\t\t\treturn connection;\n\t\t} else {\n\n\t\t\tDBConnection db = new DBConnection();\n\t\t\treturn db.connection;\n\t\t}\n\n\t}", "public IDatabaseConnection getConnection() {\n try {\n DatabaseConnection databaseConnection = new DatabaseConnection(getDataSource().getConnection());\n editConfig(databaseConnection.getConfig());\n return databaseConnection;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }", "public Connection getDbConnect() {\n return dbConnect;\n }", "public synchronized Connection getConnection() throws SQLException {\n/* 158 */ return getConnection(true, false);\n/* */ }", "private Connection getConnection() {\n if (_connection != null) return _connection;\n\n Element ncElement = getNetcdfElement();\n \n //See if we can get the database connection from a JNDI resource.\n String jndi = ncElement.getAttributeValue(\"jndi\");\n if (jndi != null) {\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n DataSource ds = (DataSource) envCtx.lookup(jndi);\n _connection = ds.getConnection();\n } catch (Exception e) {\n String msg = \"Failed to get database connection from JNDI: \" + jndi;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n }\n return _connection;\n }\n\n //Make the connection ourselves.\n String connectionString = ncElement.getAttributeValue(\"connectionString\");\n String dbUser = ncElement.getAttributeValue(\"dbUser\");\n String dbPassword = ncElement.getAttributeValue(\"dbPassword\");\n String jdbcDriver = ncElement.getAttributeValue(\"jdbcDriver\");\n \n try {\n Class.forName(jdbcDriver);\n _connection = DriverManager.getConnection(connectionString, dbUser, dbPassword);\n } catch (Exception e) {\n String msg = \"Failed to get database connection: \" + connectionString;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return _connection;\n }", "public Connection getConnection(){\r\n try{\r\n conn=DriverManager.getConnection(host,user,pass);\r\n //JOptionPane.showMessageDialog(null,\"connection Successive\" );\r\n return conn;\r\n }\r\n catch(SQLException ex){\r\n JOptionPane.showMessageDialog(null, \"\"+ex.getMessage());\r\n return null;\r\n }\r\n }", "public abstract Connection getConnection();", "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}", "public Connection getConnection() {\n try {\n return DriverManager.getConnection(\"jdbc:sqlite:\" + dbName);\n } catch (SQLException e) {\n return null;\n }\n }", "public static Connection connectDB(){\n Connection conn = null; //initialize the connection\n try {\n //STEP 2: Register JDBC driver\n Class.forName(\"org.apache.derby.jdbc.ClientDriver\");\n\n //STEP 3: Open a connection\n System.out.println(\"Connecting to database...\");\n conn = DriverManager.getConnection(DB_URL);\n } catch (SQLException se) {\n //Handle errors for JDBC\n se.printStackTrace();\n } catch (Exception e) {\n //Handle errors for Class.forName\n e.printStackTrace();\n }\n return conn;\n }", "public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}", "public static Connection getInstanceConnection(){\r\n\t\ttry {\r\n\t\t\tif(conn==null) {\r\n\t\t\t\tconn=DriverManager.getConnection(url, userDb, pwdDb);\r\n\t\t\t\tSystem.out.println(\"Connexion �tablie avec la base\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Probl�me de connexion\");\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn conn;\r\n\t}", "protected Connection getConnection()\n {\n Connection connection = null;\n try\n {\n connection = DriverManager.getConnection(url, user, password);\n }\n catch (SQLException ex)\n {\n Logger.getLogger(DB_Utils.class.getName()).log(Level.SEVERE, null, ex);\n }\n return connection;\n }", "public static Connection getConnection() {\r\n\t\tsetProperties();\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\r\n\t\t\tconnection = (Connection) DriverManager.getConnection(DBURL,\r\n\t\t\t\t\tproperties);\r\n//\t\t\tSystem.err.println(\"Connection Established\");\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"connection Not Established\");\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "public boolean connect(){\n try{\n conn = DriverManager.getConnection(uri, user, password);\n }catch (SQLException sqle){\n DLException dle = new DLException(sqle, \"Unable to conclude this operation\");\n return false;\n }\n return true;\n }", "Connection getConnection() throws SQLException;", "Connection getConnection() throws SQLException;", "public static Connection getConnection() {\n\n\t\tConnection conn = null;\n\t\ttry {\n\t\t\tconn = getConnectionPool().getConnection();\n\t\t} catch (Exception e) {\n\n\t\t\tthrow new SystemException(\"Getting Connection from DB Connection Pool\",e,SystemCode.UNABLE_TO_EXECUTE);\n\t\t}\n\t\treturn conn;\n\n\t}", "public static Connection getDbConnection() throws SQLException {\n return getDbConnection(FxContext.get().getDivisionId());\n }", "public synchronized Connection getConnection() throws DBException {\n Connection con = null;\n try{\n if (s_ds != null) {\n try {\n con = s_ds.getConnection();\n } catch (Exception e) {\n SystemLog.getInstance().getErrorLog().error(\"ERR,HSQLDBTomCTRL,getCon-JNDI,\" + e\n , e);\n }\n } \n // If null try another method\n \n\t\t\tif ( con == null ){\n\t DriverManager.setLoginTimeout(5);\n\t\t\t\tcon = DriverManager.getConnection(m_dbURL , m_userName , m_password);\n\t\t\t\tSystem.out.println(\"HSQLDB-DBCON:user=\"+m_userName+\":Connection !!\");\n\t\t\t}\n\n return con;\n }catch(SQLException e) {\n System.err.println( \"DBCON:ERROR: user=\"+m_userName+\":Get Connection from pool-HSQLDB\");\n\t\t\tthrow new DBException(\"DBCON:ERROR: user=\"+m_userName+\":Get Connection HSQLDB:\" + e.getMessage()); \n }\n }", "public static Connection getConnection() {\n Connection conn = null;\n try {\n Class.forName(\"org.hsqldb.jdbcDriver\");\n //conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/bancodb\", \"sa\", \"\");\n conn = DriverManager.getConnection(\"jdbc:hsqldb:hsql://localhost/paciente2db\", \"sa\", \"\");\n } catch (SQLException e) {\n System.out.println(\"Problemas ao conectar no banco de dados\");\n } catch (ClassNotFoundException e) {\n System.out.println(\"O driver não foi configurado corretamente\");\n }\n\n return conn;\n }", "public static Connection getConnection() {\r\n\r\n\t\tConfigLoader loader = new ConfigLoader();\r\n\t\tProperties properties = null;\r\n\t\t;\r\n\t\ttry {\r\n\t\t\tproperties = loader.loadConfigurations();\r\n\t\t} catch (IOException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString url = properties.getProperty(\"hsqldb.url\");\r\n\t\t\tString user = properties.getProperty(\"hsqldb.user\");\r\n\t\t\tString password = properties.getProperty(\"hsqldb.password\");\r\n\t\t\tlogger.info(\"Connecting to hsqlDB with db:\" + url);\r\n\t\t\tconnection = DriverManager.getConnection(url, user, password);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(e.getStackTrace().toString());\r\n\t\t}\r\n\t\treturn connection;\r\n\t}", "private Connection connect() {\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(urlPath);\n } catch (SQLException e) {\n System.out.println(e.getMessage());\n }\n return conn;\n }", "public static Connection getConnection() {\n Connection localConnection = connection;\n if (localConnection == null) synchronized (DB_ConnectionProvider.class) {\n\n // multi thread supported, double checker lock\n\n localConnection = connection;\n if (localConnection == null) {\n try {\n Class.forName(\"oracle.jdbc.driver.OracleDriver\");\n // oracle driver: oracle.jdbc.driver.OracleDriver\n // mysql driver: com.mysql.jdbc.Driver\n connection = localConnection = DriverManager.getConnection(\n \"jdbc:oracle:thin:@localhost:1521:XE\", USERNAME, PASSWORD);\n // mysql url: jdbc:mysql://localhost:3306/world\n // oracle url: jdbc:oracle:thin:@localhost:1521:XE\n } catch (Exception ex) {\n System.out.println(\"Could not connect with the database.\");\n }\n }\n }\n return localConnection;\n }", "private Connection getDb() throws TzException {\n if (conn != null) {\n return conn;\n }\n\n try {\n dbPath = cfg.getDbPath();\n\n if (debug()) {\n debug(\"Try to open db at \" + dbPath);\n }\n\n conn = DriverManager.getConnection(\"jdbc:h2:\" + dbPath,\n \"sa\", \"\");\n\n final ResultSet rset =\n conn.getMetaData().getTables(null, null,\n aliasTable, null);\n if (!rset.next()) {\n clearDb();\n loadInitialData();\n }\n } catch (final Throwable t) {\n // Always bad.\n error(t);\n throw new TzException(t);\n }\n\n return conn;\n }", "private Connection getDBConnection(){\n\t\tConnection conn = null;\n\t\t\t\t\n\t\ttry{\n\t\t\t\t// name of the database\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\n\t\t} catch(ClassNotFoundException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\t\t\t\n\t\ttry{\n\t\t\t// type of the database file\n\t\t\tString url = \"jdbc:sqlite:vehicles.sqlite\";\n\t\t\tconn = DriverManager.getConnection(url);\n\t\t}catch(SQLException e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t\treturn conn;\n\t}", "public static Connection getConnection() {\r\n\t\tConnection connection = null;\r\n\t\ttry {\r\n\t\t\tString dbDirectory = \"C:/Users/MAX-Student/Desktop/java/db\";\r\n\t\t\tSystem.setProperty(\"derby.system.home\", dbDirectory);\r\n\r\n\t\t\t// set the db url, username, and password\r\n\t\t\tString url = \"jdbc:derby:InspirationalDB\";\r\n\t\t\tString username = \"\";\r\n\t\t\tString password = \"\";\r\n\r\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\r\n\t\t\treturn connection;\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\tfor (Throwable t : e)\r\n\t\t\t\tt.printStackTrace(); // for debugging\r\n\t\t\treturn null;\r\n\t\t }\r\n\t}", "public Connection ConnectDB() throws SQLException {\r\n String db=\"jdbc:postgresql://localhost:5432/Employee\";\r\n String user=\"postgres\";\r\n String pass=\"admin\";\r\n\r\n return DriverManager.getConnection(db,user,pass);\r\n\r\n }", "public Connection getConnecion()\r\n\t\t{\r\n\t\r\n\t\t \r\n\t\t\r\n\t try {\r\n\t\tClass.forName(\"com.mysql.jdbc.Driver\" );\r\n\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/curd_db\", \"root\", \"1254\" );\r\n\t\tif(con!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"connection estabilshed successfully\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Connection could not connect\");\r\n\t\t}\r\n\t }\r\n\t catch (ClassNotFoundException e) \r\n\t {\r\n\r\n\t\te.printStackTrace();\r\n\t}\r\n\t catch(SQLException e)\r\n\t {\r\n\t\te.printStackTrace(); \r\n\t }\r\n\treturn con;\r\n\t\t\r\n\t\t}", "private Connection getConnection() throws SQLException {\n OracleDataSource ods = new OracleDataSource();\n ods.setURL(url);\n ods.setUser(user);\n ods.setPassword(password);\n\n // Creates a physical connection to the database.\n return ods.getConnection();\n }", "public Connection connect() throws SQLException {\n Connection connection = null;\n try {\n Class.forName(\"org.sqlite.JDBC\");\n String url = \"jdbc:sqlite:\" + dbName;\n connection = DriverManager.getConnection(url);\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n return connection;\n }", "public Connection getConnection() {\n java.sql.Connection connection = null;\n try {\n connection = DriverManager.getConnection(\n \"jdbc:postgresql://cslvm74.csc.calpoly.edu:5432/bfung\", \"postgres\",\n \"\");\n } catch (SQLException e) {\n System.out.println(\"Connection Failed! Check output console\");\n e.printStackTrace();\n return null;\n }\n return connection;\n }", "public static Connection dbConnection()\r\n\t{\r\n\t\t\r\n\t\t Connection c = null;\r\n\t\ttry \r\n\t\t{\r\n\t\t\tClass.forName(\"org.sqlite.JDBC\");\r\n\t\t} \r\n\t\tcatch (ClassNotFoundException e1) \r\n\t\t{\r\n\t\t\te1.printStackTrace();\r\n\t\t}\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tc = DriverManager.getConnection(\"jdbc:sqlite:Patients.db\");\r\n\t\t\t\t\r\n\t\t\t\treturn c;\r\n\t\t\t} \r\n\t\t\t\tcatch (SQLException e) \r\n\t\t\t\t{\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\treturn c;\r\n\t\t\r\n\t}", "private Connection connect()\n\t{\n\t\tConnection con = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t//Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/project? useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n \n\t\treturn con;\n \n\t}", "protected static Connection connect() {\n // SQLite connection string\n String url = \"jdbc:sqlite:database1.db\";\n Connection conn = null;\n try {\n conn = DriverManager.getConnection(url);\n } catch (SQLException e) {\n System.out.println(\"Connect: \" + e.getMessage());\n }\n return conn;\n }", "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 }", "private Connection connect() {\n\t\tConnection con = null;\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\n\t\t\t// Provide the correct details: DBServer/DBName, username, password\n\t\t\tcon = DriverManager.getConnection(\"jdbc:mysql://127.0.0.1:3306/paymentdb?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC\", \"root\", \"\");\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn con;\n\t}" ]
[ "0.804067", "0.75212234", "0.746436", "0.7463956", "0.74350846", "0.7349203", "0.73463386", "0.73463386", "0.73463386", "0.734602", "0.72980785", "0.7292795", "0.7290465", "0.7288719", "0.725294", "0.7244721", "0.72387713", "0.7232932", "0.7221132", "0.718198", "0.7181247", "0.71713156", "0.7161303", "0.71567535", "0.71547675", "0.71529305", "0.7143385", "0.7141833", "0.71404237", "0.71373475", "0.71360046", "0.71338975", "0.7124896", "0.7122153", "0.71219474", "0.7117714", "0.7110884", "0.7105618", "0.71042615", "0.7095431", "0.7092743", "0.7086485", "0.7084336", "0.7081734", "0.70752645", "0.7068182", "0.7062971", "0.706085", "0.70595556", "0.70595556", "0.70595556", "0.70595556", "0.7055764", "0.7051122", "0.7048677", "0.70473844", "0.70473474", "0.7047163", "0.70421857", "0.7040758", "0.7028823", "0.70278794", "0.70260715", "0.70221114", "0.70199126", "0.7014984", "0.7000461", "0.6989709", "0.69872767", "0.69824874", "0.6976998", "0.6971791", "0.69656503", "0.69632345", "0.6947545", "0.6946331", "0.6944393", "0.6936527", "0.69364977", "0.69364977", "0.6933413", "0.6931568", "0.6930182", "0.6921681", "0.6919891", "0.69165736", "0.6911637", "0.6911234", "0.6910261", "0.69013256", "0.6890175", "0.6888793", "0.6884247", "0.6881891", "0.6879964", "0.6878477", "0.6875541", "0.68691456", "0.68588626", "0.6857562" ]
0.70424706
58
/ Breaks open connection
public void disconnect() { try { connection.close(); } catch (SQLException e) { e.printStackTrace(); } System.out.println("Disconnected"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void connectionLost(){\n\t\ttry {\n\t\t\tconnect(\"andrewTest\", false, (short) 100);\n\t\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (InterruptedException e1) {\t\t\t\n\t\t\t}\n\t\t\tconnectionLost();\n\t\t\t\n\t\t}\n\t}", "@Override\n public void connectionLost(Throwable cause) {\n }", "@Override\r\n\tpublic void connectionLost(Throwable t) {\n\t}", "@Override\n public void connectionLost() {\n }", "protected void connectionClosed() {}", "public boolean needsConnectionLeftOpen() {\n return false;\n }", "@Override\n public void connectionLost(Throwable arg0) {\n\n }", "@Override\n public void connectionLost(Throwable thrwbl) {\n System.out.println(\"服务器的连接丢失\");\n }", "private void openConnection(){}", "@Override\n public void connectionLost(Throwable cause) {\n\n }", "@Override\r\n\tpublic void connectionLost(Throwable cause) {\n\t\t\r\n\t}", "private void closeConnection () {\n setConnection (null);\n }", "@Override\n\t\t\tpublic void connectionLost(Throwable throwable) {\n\t\t\t\tSystem.out.println(\"connectionLost\");\n\t\t\t}", "private void close() {\n\t\ttry {\n\t\t\tif (conn != null) {\n\t\t\t\tconn.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog(e);\n\t\t} finally {\n\t\t\tisConnected = false;\n\t\t}\n\t}", "public void close() {\n connection.close();\n running = false;\n }", "@Override\n\tpublic void connectionLost(Throwable cause) {\n\t\t\n\t}", "private static void checkConn() {\n try {\n if (conns.isClosed()) conns = Connect.getConnect();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "private synchronized void closeConnection() {\n/* 212 */ if (this.conn != null) {\n/* 213 */ this.log.debug(\"Closing connection\");\n/* */ try {\n/* 215 */ this.conn.close();\n/* 216 */ } catch (IOException iox) {\n/* 217 */ if (this.log.isDebugEnabled()) {\n/* 218 */ this.log.debug(\"I/O exception closing connection\", iox);\n/* */ }\n/* */ } \n/* 221 */ this.conn = null;\n/* */ } \n/* */ }", "void handleConnectionClosed();", "private void endConnection(){\n\t\tif(this.connection != null){\n\t\t\ttry {\n\t\t\t\tthis.connection.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void testConnecitonFails() {\n\t\ttry {\n\t\t\t@SuppressWarnings(\"unused\")\n\t\t\tConnection c = new Connection(\"localhost\", 4444, this, this);\n\t\t\t// this connection should fail... wait for that:\n\t\t\tfor (int i=0; i<10; i++) {\n\t\t\t\t// if we have a result before our max-wait-time, break\n\t\t\t\tif (connectionStatus != null)\n\t\t\t\t\tbreak;\n\t\t\t\tThread.sleep(500);\n\t\t\t}\n\t\t\t\n\t\t\tassertTrue(connectionStatus != null && connectionStatus.booleanValue() == false);\n\t\t} catch (Exception e) {\n\t\t\tassertTrue(\"should not get an exception\", false);\n\t\t}\n\t}", "void handleConnectionOpened();", "private void openConnection() throws IOException, CorruptedPacketException {\n ExecutorService executorService = Executors.newSingleThreadExecutor();\n Future futureResult = executorService.submit(new InitPacketReceiver(this));\n int timesSent = 0;\n while (!socket.isClosed() && connectionId == null && timesSent < 20) {\n this.sendInitPacket(socket, address, port);\n ++timesSent;\n try {\n futureResult.get(100, TimeUnit.MILLISECONDS);\n } catch (CancellationException e) {\n } catch (InterruptedException e) {\n } catch (ExecutionException e) {\n } catch (TimeoutException e) {\n if (connectionId == null) {\n System.err.println(\"Opening packet has been lost, sending a new one.\");\n }\n }\n }\n\n if (timesSent >= 20) {\n socket.close();\n System.out.printf(\"Could not connect to Karel on %s:%d\\n\", address.getHostAddress(), port);\n }\n futureResult.cancel(true);\n executorService.shutdown();\n\n }", "@Override\n public synchronized void close() {\n mOpenConnections--;\n if (mOpenConnections == 0) {\n super.close();\n }\n }", "@Override\n public synchronized void close() {\n mOpenConnections--;\n if (mOpenConnections == 0) {\n super.close();\n }\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tSocket s = new Socket(ip,6969);\n\t\t\t\t\t\t\t\ts.close();\n\t\t\t\t\t\t\t\tconnection=true;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t catch (UnknownHostException e1) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\t\tLog.d(null, \"Wrong ip\");\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}", "final public void closeConnection() throws IOException {\n\n readyToStop = true;\n closeAll();\n }", "@Override\r\n\tpublic void closeConnection() {\n\t\t\r\n\t}", "public void disconnect()\r\n\t{\r\n\t\ttry {\r\n\t\t\tconnection_.close();\r\n\t\t} catch (IOException e) {} // How can closing a connection fail?\r\n\t\t\r\n\t}", "protected void kill() {\n disconnect = true;\n }", "@Override\n \tpublic void connectionClosed() {\n \t\t\n \t}", "public void disconnect() {\n\t\tif (_connection != null) {\n\t\t\ttry {\n\t\t\t\twhile (!_connection.isClosed()) {\n\t\t\t\t\t_connection.close();\n\t\t\t\t}\n\t\t\t} catch (Exception e) { /* ignore close errors */\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void closeConn(){\n if (null != this.mBTcomm){\n this.mBTcomm.closeConn();\n this.mBTcomm = null;\n }\n }", "public static void disconnect() {\n \t\tconnPool.stop();\n \t}", "protected void stop() {\n keepGoing = false;\n // connect to myself as Client to exit\n try {\n new Socket(\"localhost\", port);\n } catch(Exception e) {\n // exception handling\n }\n }", "Connection takeConnection() throws SQLException, InterruptedException;", "private void closeConnection(){\n report(\"Close connection\");\n try{\n if(socket != null && !socket.isClosed()) {\n report(\"Client: Close socket\");\n socket.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n report(\"End\");\n }", "@Override\n\tpublic void closeConnection() {\n\t\t\n\t}", "public void Stop_Connection(){\n keepWalking = false; //gia na stamatisei to chat alliws to thread dn ginete interrupt gt dn stamataei i liturgeia tou.\n Chat_Thread.interrupt();\n try {\n if(oos != null) oos.close();\n if(ois != null) ois.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n try {\n if(socket !=null) socket.close();\n } catch (IOException ex) {\n Logger.getLogger(ChatWithCC.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "private void closeConnection() {\r\n try {\r\n socket.close();\r\n } catch (IOException ex) {\r\n // Ex on close\r\n }\r\n }", "@Override\r\n\tpublic void close() throws IOException {\r\n\t\t List<Connection> connections = new ArrayList<>();\r\n\t\t connections.addAll(busyConnection);\r\n\t\t connections.addAll(freeConnection);\r\n\t\t \r\n\t\t for (Connection connection : connections) {\r\n\t\t\ttry {\r\n\t\t\t\tif(connection.isClosed()== false){\r\n\t\t\t\t\tconnection.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\tlogger.error(ErrorMessageDAO.ERROR_SQL_CLOSE + e);\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}", "@Override\n\tpublic boolean connect() {\n\t\treturn false;\n\t}", "@Override\n\tpublic void connectionClosed() {\n\t}", "protected void doDisconnect() throws Exception {\n/* 696 */ if (!this.metadata.hasDisconnect()) {\n/* 697 */ doClose();\n/* */ }\n/* */ }", "private boolean checkOpen(boolean recordException) {\n/* 650 */ if (!isOpen()) {\n/* 651 */ if (recordException) {\n/* 652 */ recordException(new ClosedChannelException());\n/* */ }\n/* 654 */ return false;\n/* */ } \n/* */ \n/* 657 */ return true;\n/* */ }", "@Test(timeout = 4000)\n public void test082() throws Throwable {\n DBUtil.close((Connection) null);\n }", "public void stopCurrentConnection() {\n if(mCurrentProfile!=null) {\n LogUtil.i(\"startConnection \" + mCurrentProfile.getName());\n mCurrentProfile = null;\n mWorkHandler.post(new DisConnectJob());\n }\n }", "public void communicationChannelBroken() {\n\n }", "void serverLostConnection();", "public void closeIdleConnections()\n {\n \n }", "public void mo10842b() {\n InputStream inputStream = this.f1048j;\n if (inputStream != null) {\n try {\n inputStream.close();\n } catch (IOException unused) {\n }\n }\n HttpURLConnection httpURLConnection = this.f1047i;\n if (httpURLConnection != null) {\n httpURLConnection.disconnect();\n }\n this.f1047i = null;\n }", "private void Disconnect() {\n //If the btSocket is busy\n if (btSocket!=null) {\n try {\n btSocket.close(); //close connection\n }\n catch (IOException e) {\n msg(\"Error\");\n }\n }\n finish(); //return to the first layout\n\n }", "@Override\n public synchronized void close(final C conn ) {\n if (debug())\n dprint( \"->close: \" + conn ) ;\n\n try {\n final ConnectionState<C> cs = connectionMap.remove( conn );\n\n if (cs == null) return;\n\n int count = cs.busyCount ;\n if (debug())\n dprint( \".close: \" + conn + \" count = \" + count ) ;\n\n if (count == 0)\n totalIdle-- ;\n else\n totalBusy-- ;\n\n final ConcurrentQueue.Handle rh = cs.reclaimableHandle ;\n if (rh != null) {\n if (debug())\n dprint( \".close: \" + conn + \" connection was reclaimable\" ) ;\n\n rh.remove() ;\n }\n\n conn.close() ;\n } finally {\n if (debug())\n dprint( \"<-close: \" + conn ) ;\n }\n }", "void disconnect() throws Exception;", "public void openConnection() {\n System.out.println(\"Opening connection...\");\n\n try {\n String HOST = \"192.168.4.1\";\n int PORT = 2323;\n connectionSocket = new Socket(HOST, PORT);\n connectionSocket.setTcpNoDelay(true);\n\n writer = new BufferedWriter(new OutputStreamWriter(new BufferedOutputStream(connectionSocket.getOutputStream())));\n reader = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));\n\n System.out.println(\"openConnection(): Success\");\n return;\n } catch (UnknownHostException e) {\n System.out.println(\"UnknownHostException at openConnection()\");\n } catch (IOException e) {\n System.out.println(\"IOException at openConnection()\");\n } catch (Exception e) {\n System.out.println(\"Exception at openConnection()\");\n System.out.println(e.toString());\n }\n\n System.out.println(\"Failed to connect\");\n }", "@Test\n\tpublic void testCloseInternalSQLConnection() throws SQLException {\n\t\tConnection connection = pool.getConnection(config.getConnectionTimeout());\n\t\tint count = pool.idleConnectionsCount();\n\t\tconnection.close();\n\t\tAssert.assertEquals(count + 1, pool.idleConnectionsCount());\n\t\tAssert.assertEquals(((ConnectionItem) connection).state().get(), ConnectionItem.STATE_NOT_IN_USE);\n\t}", "public boolean endConnection() throws CommunicationException;", "private void closeConnection() {\n\t\t\tSystem.out.println(\"\\nTerminating connection \" + myConID + \"\\n\");\n\t\t\ttry {\n\t\t\t\toutput.close(); // close output stream\n\t\t\t\tinput.close(); // close input stream\n\t\t\t\tconnection.close(); // close socket\n\t\t\t} catch (IOException ioException) {\n\t\t\t\tSystem.out.println(\"Exception occured in closing connection\"\n\t\t\t\t\t\t+ ioException);\n\t\t\t}\n\t\t}", "@Override\n public void connectionLost(Throwable t) {\n System.out.println(\"Connection lost!\");\n }", "@Override\n\tpublic boolean disconnect() {\n\t\treturn false;\n\t}", "private void handleClosedConnection() {\n final int currentConnections = concurrentConnections.decrementAndGet();\n\n log.debug(\"[Vertx-EventMetricsStream] - Current Connections - {} / Max Connections {}\", currentConnections, maxConcurrentConnections.get());\n }", "private void connectionClosed() {\n if (this.state != SessionState.DISCONNECTING) {\n // this came unexpected\n connectionClosed(new VertxException(\"Connection closed\"));\n }\n }", "private void makeBackgroundConnection() {\n connectionPending = true;\n try {\n Thread connectThread = new Thread(this);\n connectThread.start();\n } catch (OutOfMemoryError oome) {\n // Give up on new connection\n }\n }", "private void makeBackgroundConnection() {\n connectionPending = true;\n try {\n Thread connectThread = new Thread(this);\n connectThread.start();\n } catch (OutOfMemoryError oome) {\n // Give up on new connection\n }\n }", "public void disconnect() {}", "public void resetConnection() {\n\t\ttry {\n\t\t\tconnection.close();\n\t\t\tDriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());\n\t\t\tconnection = DriverManager.getConnection(url, username, password);\n\t\t} catch(Exception Ex) {\n\t\t\tSystem.out.println(\"Error connecting to database. Machine Error: \" + Ex.toString());\n\t\t\tEx.printStackTrace();\n\t\t\tSystem.out.println(\"\\nCONNECTION IS REQUIRED: EXITING\");\n\t\t\tSystem.exit(0); // No need to make sure connection is closed since it wasn't made\n\t\t}\n\t}", "private void connectionLost() {\n // Send a failure message back to the Activity\n Message msg = handler.obtainMessage(SdlRouterService.MESSAGE_LOG);\n Bundle bundle = new Bundle();\n bundle.putString(LOG, \"Device connection was lost\");\n msg.setData(bundle);\n handler.sendMessage(msg);\n handler.postDelayed(new Runnable() { //sends this stop back to the main thread to exit the reader thread\n @Override\n public void run() {\n stop();\n }\n }, 250);\n }", "public void closeConnection();", "private void failTheWebSocketConnection() {\n failed = true;\n }", "public void disconnect() {\r\n\t\trunning = false;\r\n\t}", "protected boolean shouldCloseConnection(HttpConnection conn) {\n return true;\n }", "boolean releaseConnection(Connection connection);", "private void close() {\n\t\ttry {\n\t\t\tsendCommand(\"end\\n\");\n\t\t\tout.close();\n\t\t\tin.close();\n\t\t\tsocket.close();\n\t\t} catch (MossException e) {\n\t\t} catch (IOException e2) {\n\t\t} finally {\n\t\t\tcurrentStage = Stage.DISCONNECTED;\n\t\t}\n\n\t}", "private void closeConnection() {\n\t\t_client.getConnectionManager().shutdown();\n\t}", "void setCloseConnection();", "public void ensureOpen() throws JSchException {\n for ( TunnelConnection tunnelConnection : tunnelConnections ) {\n if ( !tunnelConnection.isOpen() ) {\n tunnelConnection.reopen();\n }\n }\n }", "@Override\r\n\tpublic void close() {\n\t \t if (conn != null) {\r\n\t \t\t try {\r\n\t \t\t\t conn.close();\r\n\t \t\t } catch (Exception e) {\r\n\t \t\t\t e.printStackTrace();\r\n\t \t\t }\r\n\t \t }\r\n\t}", "void onConnectionLost();", "abstract public void closeConnection();", "private void disconnect() {\n if (readerThread != null)\n readerThread.kill();\n if (writerThread != null)\n writerThread.kill();\n if (nonblockReader != null) {\n nonblockReader.close();\n }\n isConnected = false;\n }", "public void closeConnection() {\n try {\n dis.close();\n dos.close();\n socket.close();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }", "protected void stop() {\n keepGoing = false;\n try {\n new Socket(\"localhost\", port);\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "private void closeIdleTimeoutConnection() {\r\n if (poolState.get() == POOL_NORMAL) {\r\n PooledConnection[] array = connArray;\r\n for (int i = 0, len = array.length; i < len; i++) {\r\n PooledConnection pConn = array[i];\r\n int state = pConn.state;\r\n if (state == CONNECTION_IDLE && !existBorrower()) {\r\n boolean isTimeoutInIdle = (currentTimeMillis() - pConn.lastAccessTime - poolConfig.getIdleTimeout() >= 0);\r\n if (isTimeoutInIdle && ConnStUpd.compareAndSet(pConn, state, CONNECTION_CLOSED)) {//need close idle\r\n removePooledConn(pConn, DESC_REMOVE_IDLE);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n } else if (state == CONNECTION_USING) {\r\n ProxyConnectionBase proxyConn = pConn.proxyConn;\r\n boolean isHoldTimeoutInNotUsing = currentTimeMillis() - pConn.lastAccessTime - poolConfig.getHoldTimeout() >= 0;\r\n if (isHoldTimeoutInNotUsing) {//recycle connection\r\n if (proxyConn != null) {\r\n proxyConn.trySetAsClosed();\r\n } else {\r\n removePooledConn(pConn, DESC_REMOVE_BAD);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n }\r\n } else if (state == CONNECTION_CLOSED) {\r\n removePooledConn(pConn, DESC_REMOVE_CLOSED);\r\n tryToCreateNewConnByAsyn();\r\n }\r\n }\r\n ConnectionPoolMonitorVo vo = this.getMonitorVo();\r\n commonLog.debug(\"BeeCP({})idle:{},using:{},semaphore-waiter:{},wait-transfer:{}\", poolName, vo.getIdleSize(), vo.getUsingSize(), vo.getSemaphoreWaiterSize(), vo.getTransferWaiterSize());\r\n }\r\n }", "public void disconnect() {\r\n\ttry {\r\n\r\n\t if (isConnected() && conn != null) {\r\n\t\tconn.close();\r\n\r\n\t\tif (countTables() <= 0 && conn.isClosed()) {\r\n\t\t setConnected(false);\r\n\t\t}\r\n\t }\r\n\t} catch (Exception e) {\r\n\t // nothing todo here\r\n\t}\r\n }", "@Override\n public void onObjectKill( Object o ) {\n try {\n ( (Connection) o ).close();\n } catch ( SQLException e ) {\n // which is a bad thing\n }\n }", "public void connectionBroken(Connection broken, boolean forced){\r\n System.out.println(\"Connection lost: \"+ broken);\r\n }", "public void mo47236p() {\n if (this.f44207T) {\n throw new IllegalStateException(\"Connection is already open\");\n }\n }", "public void mo1934e() {\n this.f2346g = true;\n try {\n super.mo1934e();\n if (this.f2340a.m262a()) {\n C0097b c0097b = this.f2340a;\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Connection \");\n stringBuilder.append(this);\n stringBuilder.append(\" shut down\");\n c0097b.m260a(stringBuilder.toString());\n }\n Socket socket = this.f2343d;\n if (socket != null) {\n socket.close();\n }\n } catch (Throwable e) {\n this.f2340a.m261a(\"I/O error shutting down connection\", e);\n }\n }", "public void disconnect() {\n\t\ttry { \n\t\t\tif(loginInput != null) loginInput.close();\n\t\t\tif(registerInput != null) registerInput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\t\ttry {\n\t\t\tif(loginOutput != null) loginOutput.close();\n\t\t\tif(registerOutput != null) registerOutput.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n try{\n\t\t\tif(loginSocket != null) loginSocket.close();\n\t\t\tif(registerSocket != null) registerSocket.close();\n\t\t}\n\t\tcatch(Exception e) {} // not much else I can do\n\n\t\tcg.connectionFailed();\n\t\t\t\n }", "public void startConnection(){\n startBTConnection(mBTDevice,MY_UUID_INSECURE);\n }", "@Test(timeout = 4000)\n public void test083() throws Throwable {\n jdbcConnection jdbcConnection0 = new jdbcConnection((Session) null);\n DBUtil.close((Connection) jdbcConnection0);\n assertFalse(jdbcConnection0.isClosed());\n }", "private void ensureConnectionRelease() {\n if (responseConnection != null) {\n responseConnection.releaseConnection();\n responseConnection = null;\n }\n }", "public synchronized void connectionClosed() {\n connCount--;\n Waiter waiter = getNextWaiter();\n if (waiter != null) {\n // There's a waiter - so it can have a new connection\n createNewConnection(waiter);\n } else if (connCount == 0) {\n // No waiters and no connections - remove the ConnQueue\n connQueues.remove(address);\n }\n }", "abstract public void openConnection();", "private void closeConnection()\n\t{\n\t\tif(result != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tresult.close();\n\t\t\t\tresult = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t\tif(con != null)\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tcon.close();\n\t\t\t\tcon = null;\n\t\t\t}\n\t\t\tcatch(Exception ignore){}\n\t\t}\n\t}", "public void connectionLost(Throwable throwable) {\n\t\tSystem.out.println(\"MQTT_CONNECTLOSS,\"+ System.currentTimeMillis() +\",bolt-\"+boltID);\n\t\tthrowable.printStackTrace();\n\t\t//System.out.println(\"***************************** lost connection to mqtt server\");\n\t}", "@Override\n protected void handleConnection(final Socket sock) throws IOException {\n sock.setSoTimeout(1);\n sock.getInputStream().read();\n\n stopAcceptingConnections();\n }", "public void halt() {\n closeSocket(sock1);\n closeSocket(sock2);\n }", "private void checkOpened() throws ConnectException {\n if (!opened) throw new ConnectException(\"Client connection not opened\");\n }", "public void closeConnection() {\n try {\n stdIn.close();\n socketIn.close();\n socketOut.close();\n }\n catch(IOException e) {\n e.printStackTrace();\n }\n }", "public void ExitConection(){\n try {\n resultSet.close();\n preparedStatement.close();\n conection.close();\n } catch (Exception e) {\n// MessageEmergent(\"Fail ExitConection(): \"+e.getMessage());\n }\n }" ]
[ "0.64771456", "0.6347979", "0.63371396", "0.6336249", "0.62903327", "0.62744313", "0.625761", "0.6228579", "0.6215018", "0.6211903", "0.6151693", "0.6132802", "0.61277276", "0.61249095", "0.61089647", "0.60887134", "0.6055149", "0.6034666", "0.60195047", "0.6014681", "0.60074246", "0.6002271", "0.59631264", "0.59582466", "0.59582466", "0.59487575", "0.5936602", "0.5911083", "0.5900252", "0.58943737", "0.58807063", "0.5875374", "0.5872583", "0.58593106", "0.5848635", "0.5845311", "0.5843886", "0.58436066", "0.5822703", "0.58104914", "0.5809716", "0.5806184", "0.58041775", "0.579999", "0.5798133", "0.5795928", "0.5764169", "0.57618964", "0.57573915", "0.57562023", "0.57543254", "0.57454956", "0.57454485", "0.57437676", "0.57418084", "0.5739279", "0.57343876", "0.5734117", "0.5729754", "0.5726382", "0.5725606", "0.57208824", "0.57201064", "0.57201064", "0.5710823", "0.57100236", "0.57065636", "0.5703236", "0.57016253", "0.5695534", "0.5694136", "0.56876916", "0.56872904", "0.568479", "0.5678049", "0.56777555", "0.5669536", "0.56687844", "0.56687033", "0.56677014", "0.5653585", "0.5652057", "0.565196", "0.5651545", "0.56481636", "0.564746", "0.5646371", "0.56427574", "0.5635711", "0.56306165", "0.5629411", "0.5619249", "0.56167763", "0.56104124", "0.56069046", "0.5603286", "0.56026417", "0.5594862", "0.5590602", "0.5588011", "0.557775" ]
0.0
-1
TODO Autogenerated method stub
public int getVertexSize() { return graph.vertexSet().size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public int getEdgeSixe() { return graph.edgeSet().size(); }
{ "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 implementar join session, search session
public void setCurrentSession(Session session){ if(currentSession == null){ currentSession = new MutableLiveData<>(); } Log.i("VIewModelSessions", "setting current session"); currentSession.setValue(session); Log.i("ViewModelSessions", "current session: "+session.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Joined> findBySession(Long Session);", "Session getSession();", "Session getSession();", "public boolean canSearch(Session session);", "List<Joined> findByUserIdAndSession(String userId, Long session);", "public Session getSession();", "Session getCurrentSession();", "Session getCurrentSession();", "public static void join(Session session){\n _sessionRef.set(session); \n if(!session.isConnected())session.reconnect();\n }", "public abstract I_SessionInfo getSession(I_SessionName sessionName);", "public void recuperoListeUtenteloggato(HttpServletRequest request, HttpServletResponse response){\n \n DAOFactory mySqlFactory = DAOFactory.getDAOFactory();\n HttpSession session = request.getSession();\n \n ShoppingListDAO shoppingListDAO = new MySQLShoppingListDAOImpl();\n SharingDAO sharingDAO = new MySQLSharingDAOImpl();\n ShoppingListCategoryDAO shoppingListCategoryDAO = new MySQLShoppingListCategoryDAOImpl();\n \n //elimino shopping list anonime scadute\n shoppingListDAO.deleteExpiredShoppingLists();\n \n if(session.getAttribute(\"emailSession\") != null){\n \n // START: recupero delle liste che appartengono all'utente loggato\n \n List lists = shoppingListDAO.getShoppingListsByOwner((String)session.getAttribute(\"emailSession\"));\n String[][] searchListResult = new String[lists.size()][4];\n\n for(int i=0; i<lists.size(); i++){\n searchListResult[i][0] = ((ShoppingList)(lists.get(i))).getName();\n searchListResult[i][1] = Integer.toString(((ShoppingList)(lists.get(i))).getLID());\n searchListResult[i][2] = ((ShoppingListCategory)(shoppingListCategoryDAO.getShoppingListCategory(((ShoppingList)(lists.get(i))).getLCID()))).getName();\n List listaCondivisa = sharingDAO.getAllEmailsbyList(Integer.parseInt(searchListResult[i][1]));\n if (listaCondivisa.isEmpty()){\n searchListResult[i][3] = Integer.toString(0);\n } else {\n searchListResult[i][3] = Integer.toString(1);\n }\n }\n\n session.setAttribute(\"ListUserSession\", searchListResult);\n session.setAttribute(\"ListUserSessionSize\", lists.size());\n\n // END: recupero delle liste che appartengono all'utente loggato\n \n // START: recupero delle liste condivise dell'utente loggato\n \n List sharingLists = sharingDAO.getAllListByEmail((String)session.getAttribute(\"emailSession\"));\n ShoppingList tmp = null;\n String[][] sharingListResult = new String[sharingLists.size()][3];\n\n for(int i=0; i<sharingLists.size(); i++){\n\n tmp = shoppingListDAO.getShoppingList(((Sharing)(sharingLists.get(i))).getLID());\n\n sharingListResult[i][0] = tmp.getName();\n sharingListResult[i][1] = Integer.toString(tmp.getLID());\n sharingListResult[i][2] = (shoppingListCategoryDAO.getShoppingListCategory(tmp.getLCID())).getName();\n } \n\n session.setAttribute(\"SharingListUserSession\", sharingListResult);\n session.setAttribute(\"SharingListUserSessionSize\", sharingLists.size());\n \n // END: recupero delle liste condivise dell'utente loggato \n \n } else {\n \n int cookieID;\n \n if(session.getAttribute(\"cookieIDSession\") == null){\n\n MyCookieDAO riverCookieDAO = mySqlFactory.getMyCookieDAO();\n MyCookieDAO myCookieDAO = new MySQLMyCookieDAOImpl();\n\n //cancello eventuali cookie scaduti\n List<MyCookie> cookieScaduti = myCookieDAO.deleteDBExpiredCookies();\n for(int i=0; i<cookieScaduti.size(); i++){\n myCookieDAO.deleteCookieByCookieID(cookieScaduti.get(i).getCookieID());\n }\n\n //Creo cookie\n Cookie cookie = new Cookie(\"FridayAnonymous\", Integer.toString(LastEntryTable(\"cookieID\", \"cookies\")));\n cookie.setMaxAge(-1);\n cookieID = Integer.parseInt((String)cookie.getValue());\n\n Long Deadline = new Timestamp(System.currentTimeMillis()).getTime()+1800*1000;\n\n myCookieDAO.createCookie(new MyCookie(LastEntryTable(\"cookieID\", \"cookies\"), 0, null, Deadline));\n session.setAttribute(\"cookieIDSession\", Integer.parseInt(cookie.getValue()));\n response.addCookie(cookie);\n \n } else {\n cookieID = (int)session.getAttribute(\"cookieIDSession\");\n }\n \n ShoppingList shoppingList = shoppingListDAO.getAnonymusShoppingList(cookieID);\n String[][] ListResult = null;\n\n if(shoppingList != null){\n\n ListResult = new String[1][3];\n ListResult[0][0] = shoppingList.getName();\n ListResult[0][1] = Integer.toString(shoppingList.getLID());\n ListResult[0][2] = (shoppingListCategoryDAO.getShoppingListCategory(shoppingList.getLCID())).getName();\n session.setAttribute(\"ListUserSessionSize\", 1);\n\n } else {\n ListResult = new String[0][3];\n session.setAttribute(\"ListUserSessionSize\", 0);\n }\n \n session.setAttribute(\"ListUserSession\", ListResult);\n \n }\n \n \n }", "private static void sessionFromCurrentSession(final Context context) {\n\n \t// The session itself\n final Session newSession = Session.getInstance();\n \n // The service\n Service newService = new Service();\n newSession.setService(newService);\n\n // The shared preferences\n Preferences preferences = new Preferences(context);\n newSession.setPreferences(preferences);\n\n // The database\n RestaurantDBAdapter restaurantDBAdapter = new RestaurantDBAdapter(context);\n newSession.setRestaurantDBAdapter(restaurantDBAdapter);\n\n // The hashmap of all the restaurants\n HashMap<String, Restaurant> restaurants = restaurantDBAdapter.getAllRestaurants();\n newSession.setRestaurants(restaurants);\n\n //Save the current session\n Session.setCurrentSession(newSession);\n Session.currentSession.saveAsCurrentSession(context);\n }", "public void searchMore() {\n if (session != null) session.searchMore();\n }", "DatabaseSession openSession();", "@Override\r\n \t\t\tpublic SSession getSession(long sessionId) throws SSessionNotFoundException {\n \t\t\t\treturn null;\r\n \t\t\t}", "synchronized Session getSession(long id) {\n return (Session) sessionMap.get(id);\n }", "InternalSession findSession(String id);", "public Session[] findSessions();", "private void multipleSessionsWithJoin(SparkSession spark) {\n\n\t\tDataset<Row> empDataset = readEmployeeData(spark);\n\n\t\tlog.info(\"Spark Session old :: \" + spark);\n\n\t\tlog.info(\"Spark Context old :: \" + spark.sparkContext());\n\n\t\tSparkSession.clearActiveSession();\n\t\tSparkSession.clearDefaultSession();\n\n\t\tSparkSession newSession = SparkSession\n\t\t\t\t.builder()\n\t\t\t\t.appName(\"Spark New Session\")\n\t\t\t\t.config(\"spark.eventLog.enabled\", \"true\")\n\t\t\t\t.config(\"spark.driver.cores\", \"2\")\n\t\t\t\t.getOrCreate();\n\n\t\tSparkSession.setDefaultSession(newSession);\n\n\t\tDataset<Row> deptDataset = readDepartmentData(newSession);\n\n\t\tdeptDataset\n\t\t\t\t.join(\n\t\t\t\t\t\tempDataset,\n\t\t\t\t\t\tdeptDataset.col(\"deptno\").equalTo(empDataset.col(\"deptno\")),\n\t\t\t\t\t\t\"inner\"\n\t\t\t\t)\n\t\t\t\t.show();\n\n\t\tlog.info(\"Spark Session new :: \" + newSession);\n\n\t\tlog.info(\"Spark Context new :: \" + newSession.sparkContext());\n\n\t}", "protected Session getSession() { return session; }", "public Session getSession() { return session; }", "public List<CourseSession> findCourseSessionByLocation(int locationId){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n Query query = session.createQuery(\"from CourseSession where location.id = :idLocation \");\r\n query.setParameter(\"idLocation\",locationId);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "private Session openSession() {\n return sessionFactory.getCurrentSession();\n }", "@Override\n\tpublic MemberVO getSession() {\n\t\treturn null;\n\t}", "String getAssociatedSession();", "Session begin();", "public PSUserSession getSession();", "public List<CourseSession> findCourseSessionByDate(Date start){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n //List allSession = session.createQuery(\"from CourseSession\").list();\r\n Query query = session.createQuery(\"from CourseSession Where startDate >= :dateStart \");\r\n query.setParameter(\"dateStart\",start);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "private Session getSession() {\n\t\treturn factory.getCurrentSession();\n\t}", "public void returnToSessionList() {\n Context context = this;\n Class destinationClass = SessionListActivity.class;\n Intent intentToStartDetailActivity = new Intent(context, destinationClass);\n startActivity(intentToStartDetailActivity);\n }", "private static void getFromCache(Session session) {\n\t\tCacheManager cm=CacheManager.getInstance();\n\t\tCache cache=cm.getCache(\"namanCache\");\n\t\tfor(int i=0;i<2;i++){\n\t\t\tif(cache.get(i)!=null){\n\t\t\t\tSystem.out.println(((UserDetails)cache.get(1).getObjectValue()).getName());\n\t\t\t}else{\n\t\t\t\tUserDetails user1=(UserDetails)session.get(UserDetails.class, i);\n\t\t\t\tSystem.out.println(user1.getName());\n\t\t\t\tcache.put(new Element(i+1,user1));\n\t\t\t}\n\t\t}\n\t\tcm.shutdown();\n\t}", "DefaultSession getSession(String id);", "boolean hasSession();", "public Session getSession() {\n return session;\n }", "public Session findSession(String id) throws IOException;", "public abstract Thread startSession();", "private Session fetchSession()\n\t{\n\t\t\tlog.info (\"******Fetching Hibernate Session\");\n\n\t\t\tSession session = HibernateFactory.currentSession();\n\n\t\t\treturn session;\n\t \n\t}", "public abstract I_SessionInfo getSessionByPublicId(long publicSessionId);", "public Session openSession() {\r\n //Interceptor interceptor= new Interceptor();\r\n //Session regresar = sessionFactory.withOptions().interceptor(interceptor).openSession();\r\n Session regresar = sessionFactory.openSession();\r\n //interceptor.setSession(regresar);\r\n return regresar;\r\n }", "@RequestMapping(\"/find\")\n public String find(HttpSession session) {\n return \"work_list\";\n }", "public List<CourseSession> findCourseSessionBetweenStartAndEnd(Date start,Date end){\r\n List<CourseSession> lstSession = new ArrayList<CourseSession>(); \r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n try{\r\n session.beginTransaction();\r\n //List allSession = session.createQuery(\"from CourseSession\").list();\r\n Query query = session.createQuery(\"from CourseSession Where startDate >= :dateStart and endDate <= :dateEnd\");\r\n query.setParameter(\"dateStart\",start);\r\n query.setParameter(\"dateEnd\", end);\r\n List allSession = query.list();\r\n for(Iterator i = allSession.iterator(); i.hasNext();){\r\n CourseSession cSession = (CourseSession) i.next(); \r\n \r\n Course c = new Course();\r\n c.setCode(cSession.getCourse().getCode());\r\n c.setTitle(cSession.getCourse().getTitle());\r\n \r\n Location l = new Location();\r\n l.setId(cSession.getLocation().getId());\r\n l.setCity(cSession.getLocation().getCity());\r\n \r\n CourseSession cs = new CourseSession();\r\n cs.setId(cSession.getId());\r\n cs.setStartDate(cSession.getStartDate());\r\n cs.setEndDate(cSession.getEndDate());\r\n cs.setCourse(c);\r\n cs.setLocation(l);\r\n \r\n lstSession.add(cs);\r\n }\r\n session.getTransaction().commit();\r\n }\r\n catch(HibernateException e){\r\n System.err.println(\"Initial SessionFactory creation failed.\");\r\n if(session.getTransaction() != null){\r\n try{\r\n session.getTransaction().rollback();\r\n }\r\n catch(HibernateException e2){\r\n e2.printStackTrace();\r\n }\r\n }\r\n }\r\n finally{\r\n if(session != null){\r\n try{\r\n session.close();\r\n }\r\n catch(HibernateException e3){\r\n e3.printStackTrace();\r\n }\r\n }\r\n } \r\n return lstSession;\r\n }", "@Override\n\tpublic Session sessionFindByAgentId(int agentid) {\n\t\treturn null;\n\t}", "public Session getSessionbyCookie(int cookie);", "@Test\r\n\tpublic void fun1(){\r\n\t\t//3 获得session\r\n\t\t\t\tSession session = HebernateUtils.openSession();\t\r\n\t\t\t\tsession.beginTransaction();\r\n\t\t\t\t//-------------------\r\n\t\t\t\tOrder o = (Order) session.get(Order.class, 1);\r\n\t\t\t\t\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t order0_.id as id4_0_,\r\n//\t\t\t\t order0_.name as name4_0_,\r\n//\t\t\t\t order0_.cid as cid4_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_order order0_ \r\n//\t\t\t\t where\r\n//\t\t\t\t order0_.id=?\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t customer0_.id as id3_0_,\r\n//\t\t\t\t customer0_.name as name3_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_customer customer0_ \r\n//\t\t\t\t where\r\n//\t\t\t\t customer0_.id=?\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t orders0_.cid as cid3_1_,\r\n//\t\t\t\t orders0_.id as id1_,\r\n//\t\t\t\t orders0_.id as id4_0_,\r\n//\t\t\t\t orders0_.name as name4_0_,\r\n//\t\t\t\t orders0_.cid as cid4_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_order orders0_ \r\n//\t\t\t\t where\r\n//\t\t\t\t orders0_.cid=?\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(o.getCustomer().getName());\r\n\t\t\t\t\r\n\t\t\t\t//------------------\r\n\t\t\t\tsession.getTransaction().commit();\r\n\t\t\t\tsession.close();\r\n\t}", "com.weizhu.proto.WeizhuProtos.Session getSession();", "public abstract I_SessionInfo getSessionInfo(I_SessionName sessionName);", "Session get(int id);", "public static void main(String[] args) {\n\n SessionFactory factory = new Configuration().configure().buildSessionFactory();\n Session session = factory.openSession();\n session.beginTransaction();\n\n System.out.println(\"First step\");\n\n Query query = session.createQuery(\"from UserDetails where userId = 2\");\n query.setCacheable(true);\n query.list();\n\n UserDetails user = session.get(UserDetails.class, 2);\n// System.out.println(\"User1: \" + user);\n\n\n session.close();\n\n System.out.println(\"Second step\");\n\n Session session2 = factory.openSession();\n session2.beginTransaction();\n\n\n Query query2 = session2.createQuery(\"from UserDetails where userId = 2\");\n query2.setCacheable(true);\n query2.list();\n\n UserDetails user1 = session2.get(UserDetails.class, 2);\n// System.out.println(\"User2: \" +user1);\n\n session2.close();\n factory.close();\n\n }", "User getBySession(String session);", "@Override\n\t\t\tpublic MemberInfoShowBean doInHibernate(Session session) throws HibernateException, SQLException {\n\t\t\t\tString hql = \"select new com.yuncai.modules.lottery.bean.vo.MemberInfoShowBean(m1.account, m1.name, m1.certNo, m1.email, m1.mobile, m2.bankCard, m2.bankPart,m2.bank) from Member as m1 ,MemberInfo as m2 where m1.id=m2.memberId and m1.account=:account\";\n\t\t\t\tQuery query = session.createQuery(hql);\n\t\t\t\tquery.setParameter(\"account\", account);\n\t\t\t\tMemberInfoShowBean bean = (MemberInfoShowBean) query.uniqueResult();\n\t\t\t\t\n\t\t\t\treturn bean;\n\t\t\t}", "private void queryForSelectedSession(String sessionId) {\r\n GetSessionQuery getSessionQuery = GetSessionQuery.builder().id(sessionId).build();\r\n awsAppSyncClient.query(getSessionQuery)\r\n .responseFetcher(AppSyncResponseFetchers.NETWORK_ONLY)\r\n .enqueue(getSessionCallBack);\r\n }", "public SessionDetails getSessionDetails(JobStep js, Sessions s);", "public MessageSession getSession(MessageExchange exchange) {\n\t\t// logger.info(\"The target session: \" + exchange.getExchangeId());\n\t\tfor (MessageSession s : sessions) {\n\t\t\tif (s.isBelongs(exchange)) {\n\t\t\t\t// logger.info(\"The Unit's session: \" + s.getSessionID());\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Session getSessionbyUid(int uid);", "@RequestMapping(value=\"/continue\")\n\tpublic String continueFromSession(ModelMap modelMap, HttpSession session) {\n\t\tMap<Long, SaleOrReturnOrderLine> orderLineMap = (Map<Long, SaleOrReturnOrderLine>) session.getAttribute(\"orderLineMap\");\n\t\tSaleOrReturn saleOrReturn = (SaleOrReturn) session.getAttribute(\"saleOrReturn\");\n\n\t\t//Place into session\n\t\tsession.setAttribute(\"saleOrReturn\", saleOrReturn);\n\t\tsession.setAttribute(\"orderLineMap\", orderLineMap);\n\n\t\t//Place into model\n\t\tfillModel(saleOrReturn, new StockItemSearchBean(), modelMap, orderLineMap);\n\t\treturn editOrCreateView(saleOrReturn);\n\t}", "@Override\n\tpublic Session getSession() throws Exception {\n\t\treturn null;\n\t}", "@Test\r\n\tpublic void fun4(){\r\n\t\t//3 获得session\r\n\t\t\t\tSession session = HebernateUtils.openSession();\t\r\n\t\t\t\tsession.beginTransaction();\r\n\t\t\t\t//-------------------\r\n\t\t\t\tOrder o = (Order) session.get(Order.class, 2);\r\n\t\t\t\t\r\n//\t\t\t\tHibernate: \r\n//\t\t\t\t select\r\n//\t\t\t\t order0_.id as id4_1_,\r\n//\t\t\t\t order0_.name as name4_1_,\r\n//\t\t\t\t order0_.cid as cid4_1_,\r\n//\t\t\t\t customer1_.id as id3_0_,\r\n//\t\t\t\t customer1_.name as name3_0_ \r\n//\t\t\t\t from\r\n//\t\t\t\t t_order order0_ \r\n//\t\t\t\t left outer join\r\n//\t\t\t\t t_customer customer1_ \r\n//\t\t\t\t on order0_.cid=customer1_.id \r\n//\t\t\t\t where\r\n//\t\t\t\t order0_.id=?\r\n\t\t\t\t \t\t\r\n\t\t\t\tSystem.out.println(o.getCustomer().getName());\r\n//\t\t\t\ttom\r\n\t\t\t\t//------------------\r\n\t\t\t\tsession.getTransaction().commit();\r\n\t\t\t\tsession.close();\r\n\t}", "public static Map<SessionFactory, Session> getSession() {\n\t\tSessionFactory sf = new Configuration().configure(Constants.ONE_TO_MANY).addAnnotatedClass(Instructor.class)\n\t\t\t\t.addAnnotatedClass(InstructorDetail.class).addAnnotatedClass(Course.class).buildSessionFactory();\n\t\tSession s = sf.openSession();\n\n\t\tMap<SessionFactory, Session> tmp = new HashMap<SessionFactory, Session>();\n\t\ttmp.put(sf, s);\n\n\t\treturn tmp;\n\t}", "public void setSession(Session session) { this.session = session; }", "@Override\n\tpublic void view(HttpServletRequest request,HttpServletResponse response) {\n\t\tlong id=(long) request.getSession().getAttribute(\"enrollment\");\n\t\tArrayList list;\n\t\tif(request.getParameterMap().containsKey(\"search\")){\n\t\t\tString searchParameter=request.getParameter(\"search\");\n\t\t\tlist=(ArrayList)((QuestionDao)cd).viewAll(searchParameter);\n\n\t\t}else if(id==12589){\n\t\t\tlist = (ArrayList) cd.view(id);\n\t\t}\n\t\telse{\n\t\t\tlist=(ArrayList)((QuestionDao)cd).viewAll(\"\");\n\t\t}\n\t\tHttpSession session = request.getSession();\n\t\tsession.setAttribute(\"list\",list);\n\t\ttry{\n\t\t\tif(id==12589)\n\t\t\t{\n\t\t response.sendRedirect(\"Admin/questionsearch.jsp\");\n\t\t\t}\n\t\t\telse\n\t\t\t\tresponse.sendRedirect(\"User/que_Ans_UI.jsp\");\n\t\t}\n\t\tcatch(Exception e){}\n\t}", "public abstract String getSessionList();", "protected final Session getSession() {\n return sessionTracker.getSession();\n }", "public LocalSession session() { return session; }", "public List<String> getSessionList(){\r\n \t\r\n \tList<String> sessionIds = new ArrayList<String>();\r\n \tfor (Entry<String, AccessDetailVO> curPage : pageAccess.entrySet()) {\r\n \t\tAccessDetailVO currLock = curPage.getValue();\r\n \t\tif(!sessionIds.contains(currLock.getSessionId())){\r\n \t\t\tsessionIds.add(currLock.getSessionId());\r\n \t\t}\t\r\n \t}\r\n \t\r\n \treturn sessionIds;\r\n }", "private Session getSession() throws RepositoryException {\n return getRepository().loginAdministrative(null);\n }", "public Session getSession()\n {\n return session;\n }", "public List<SessionDetailVO> getSessionDetail(){\r\n \t\r\n \tList<AccessDetailVO> accessDetails = getLockList();\r\n \tIterator<AccessDetailVO> iter = accessDetails.iterator();\r\n \tString prevSessionId = \"\";\r\n \tList<SessionDetailVO> sessionList = new ArrayList<SessionDetailVO>();\r\n \t\r\n \tSessionDetailVO sessionTmp = new SessionDetailVO();\r\n \twhile(iter.hasNext()){\r\n \t\tAccessDetailVO accessDetail = iter.next();\r\n \t\tif(accessDetail.getSessionId() != prevSessionId){\r\n \t\t\tsessionTmp = new SessionDetailVO();\r\n \t\t\tsessionTmp.setSessionId(accessDetail.getSessionId());\r\n \t\t\tsessionTmp.setSessionDetail(new ArrayList<AccessDetailVO>());\r\n \t\t\tprevSessionId = accessDetail.getSessionId();\r\n \t\t\tsessionList.add(sessionTmp);\r\n \t\t}\r\n \t\tsessionTmp.getSessionDetail().add(accessDetail);\r\n \t\t\r\n \t}\r\n \t\r\n \treturn sessionList;\r\n }", "@Override\n\tpublic Session sessionFindById(int id) {\n\t\treturn null;\n\t}", "public Session getSession(){\n\t\treturn sessionFactory.openSession();\n\t}", "public jkt.hms.masters.business.MasSession getSession () {\n\t\treturn session;\n\t}", "public java.util.List findStudentBySession(java.lang.Integer session) throws GenericBusinessException {\n sust.paperlessexm.hibernatehelper.HibernateQueryHelper hibernateTemplate = new sust.paperlessexm.hibernatehelper.HibernateQueryHelper();\n try {\n String queryString = \"from \" + Student.class.getName() + \" e where e.session like :session \";\n // Add a an order by on all primary keys to assure reproducable results.\n String orderByPart = \"\";\n orderByPart += \" order by e.studentId\";\n queryString += orderByPart;\n Query query = hibernateTemplate.createQuery(queryString);\n hibernateTemplate.setQueryParameter(query, \"session\", session);\n List list = hibernateTemplate.list(query);\n return list;\n } finally {\n log.debug(\"finished findStudentBySession(java.lang.Integer session)\");\n }\n }", "@Override\n\tpublic List<Session> getAssaignedSession(int agentid) {\n\t\treturn null;\n\t}", "private Session getCurrentSession() {\n return sessionFactory.getCurrentSession();\n }", "com.weizhu.proto.WeizhuProtos.SessionOrBuilder getSessionOrBuilder();", "private void updateSessionDetailsInDB(GlusterGeoRepSession session) {\n for (GlusterGeoRepSessionDetails sessDetails : session.getSessionDetails()) {\n sessDetails.setSessionId(session.getId());\n }\n getGeoRepDao().saveOrUpdateDetailsInBatch(session.getSessionDetails());\n }", "@Override\n public boolean SearchSQL() {\n\n /*\n appunto su query.next()\n inizialmente query.next è posto prima della prima riga\n alla prima chiaata si posiziona sulla prima row\n alla seconda chiamata si posiziona sulla seconda row e cosi via\n */\n\n boolean controllo = false;\n\n openConnection();\n\n String sql =\"select user,pass,vol_o_cand from pass where user='\"+userInserito+\"'\";\n ResultSet query = selectQuery(sql);\n\n try {\n\n if(query.next()){\n\n String pass = query.getString(\"pass\");\n\n if(pass.equals(passInserita)) {\n controllo = true;\n volocand = query.getString(\"vol_o_cand\");\n }\n\n }\n\n\n }catch(SQLException se){\n se.printStackTrace();\n }finally{\n closeConnection();\n }\n\n\n return controllo;\n\n }", "protected final void openSession() {\n openSessionForRead(null, null);\n }", "private Chat getChatSession(Intent intent) {\n ApiManager instance = ApiManager.getInstance();\n String sessionId = intent\n .getStringExtra(ChatIntent.EXTRA_CONTACT);\n if (instance == null) {\n Logger.i(TAG, \"ApiManager instance is null\");\n return null;\n }\n ChatService chatApi = instance.getChatApi();\n if (chatApi == null) {\n Logger.d(TAG, \"MessageingApi instance is null\");\n return null;\n }\n Chat chatSession = null;\n Logger.d(TAG, \"The chat session is null1\");\n try {\n chatSession = chatApi.getChat(sessionId);\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"Get chat session failed\");\n Logger.d(TAG, \"The chat session is null2\");\n e.printStackTrace();\n chatSession = null;\n }\n if (chatSession != null) {\n return chatSession;\n }\n try {\n // Set<Chat> totalChats = null;\n Set<Chat> totalChats = chatApi.getChats();\n if (totalChats != null) {\n Logger.w(TAG, \"aaa getChatSession size: \"\n + totalChats.size());\n Logger.d(TAG, \"The chat session is null3 : \"\n + totalChats.size());\n for (Chat setElement : totalChats) {\n if (setElement.getRemoteContact().equals(\n sessionId)) {\n Logger.e(TAG, \"Get chat session finally\");\n // might work or might throw exception, Java calls it\n // indefined behaviour:\n chatSession = setElement;\n break;\n }\n }\n } else {\n Logger.w(TAG, \"aaa getChatSession size: null\");\n }\n } catch (JoynServiceException e) {\n Logger.e(TAG, \"Get chat session xyz\");\n e.printStackTrace();\n }\n return chatSession;\n }", "private static Session secondLevelCacheHibernate(SessionFactory factory,\n\t\t\tSession session) {\n\t\tsession.close();\n\t\tsession=factory.openSession();\n\t\tsession.get(Employee.class, Long.valueOf(7));\n\t\tsession.close();\n\t\tsession=factory.openSession();\n\t\tsession.get(Employee.class, Long.valueOf(7));\n\t\treturn session;\n\t}", "public List getAllSessionList(){\n \tList l=null;\n try {\n Criteria crit=new Criteria();\n l=LecturePeer.doSelect(crit);\n } catch(Exception e) { ServerLog.log(\"Exception in Lecture select \"+e.getMessage());}\n \treturn l;\n }", "public void setSession(Session session) {\n\tthis.session = session; \r\n}", "protected Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public static void loadSession(Session session){\n currentSession = session;\n }", "public boolean exerciseInSession(String exercise){\n\t\t\tboolean inSide = false;\n\t\t\ttry {\n\t\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\t\tConnection con = DriverManager.getConnection(DB_URL, USER, PASS);\n\t\t\t\tPreparedStatement statement = (PreparedStatement) con.prepareStatement(\"SELECT name FROM EXECUTEDEXERCISE WHERE name = ?\");\n\t\t\t\tstatement.setString(1, exercise);\n\t\t\t\tResultSet result = statement.executeQuery();\n\t\t\t\tif(result.first()){\n\t\t\t\t\tinSide = true;\n\t\t\t\t\tSystem.out.println(\"In session\");\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tSystem.out.println(\"Not in session\");\n\t\t\t\t}\n\t\t\t\tcon.close();\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\treturn inSide;\n\t\t}", "public void add(Session session);", "@RequestMapping(\"/find\")\n public String find(HttpSession session) {\n return \"custom_list\";\n }", "public static Session openSession() {\n \treturn sessionFactory.openSession();\n }", "protected abstract SESSION getThisAsSession();", "List<Session> getAllSessions();", "public void sessionStarted() {\n\t\t\r\n\t}", "public abstract I_SessionInfo getSessionByAbsoluteName(String absoluteName);", "public static Session getSession() throws HException {\r\n\t\tSession s = (Session) threadSession.get();\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif (s == null) {\r\n\t\t\t\tlog.debug(\"Opening new Session for this thread.\");\r\n\t\t\t\tif (getInterceptor() != null) {\r\n\t\t\t\t\t\r\n\t\t\t\t\ts = getSessionFactory().withOptions().interceptor(getInterceptor()).openSession();\r\n\t\t\t\t} else {\r\n\t\t\t\t\ts = getSessionFactory().openSession();\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthreadSession.set(s);\r\n\t\t\t\tsetConnections(1);\r\n\t\t\t}\r\n\t\t} catch (HibernateException ex) {\r\n\t\t\tthrow new HException(ex);\r\n\t\t}\r\n\t\treturn s;\r\n\t}", "public /*static*/ Session getSession() {\n return sessionFactory.getCurrentSession();\n }", "public Session getSession(boolean create) throws LeaseException {\n return entity.getSession(create);\n }", "public void SessionSetupNav() throws InterruptedException {\n\t\t\t\t\n\t\t\t\tif (Controls.isElementPresent(By.id(placementProp.getProperty(\"sitename.id\")))==true)\n\t\t \n\t {\n\t Controls.Type(By.id(placementProp.getProperty(\"SessionLabel.id\")),placementProp.getProperty(\"Clinicalsitename\"));\n\t \n\t if(Controls.isElementPresent(By.xpath(placementProp.getProperty(\"Search_Button.Xpath\")))==true)\n\t\t {\n\t\t Controls.Click(By.xpath(placementProp.getProperty(\"Search_Button.Xpath\")));\n\t\t \n\t\t }\n\t\t else\n\t\t {\n\t\t Reports.log(Status.FAIL, \"Search button is missing\");\n\t\t }\n\t \n\t }\n\t else\n\t {\n\t Reports.log(Status.FAIL, \"Search field doesn't found\");\n\t }\n\t\t\t\t\tControls.wait(5000);\n\t\t\t\t\n\t\t\t\t\tif (Controls.isElementPresent(By.xpath(placementProp.getProperty(\"Session_SearchResult.Xpath\")))==true)\n\t\t\t \n\t\t {\n\t\t\t\t\t\tControls.Click(By.xpath(placementProp.getProperty(\"SessionSetupArrow.xpath\")));\n\t\t }else\n\t\t {\n\t\t \t Reports.log(Status.SKIP, \"No search result found so can't be redirected to Session Setup page.\");\n\t\t }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public Session getSession() throws LeaseException {\n return getSession(true);\n }", "@Override\n public ActionForward execute(ActionMapping mapping, ActionForm form,\n HttpServletRequest request, HttpServletResponse response)\n throws Exception {\n mybean nb=(mybean)form;\n String u=(String)request.getAttribute(\"nu\");\n String p=nb.getT2();\n //String t=nb.getT3();\n int flag=0;\n \n \n System.out.println(\"ffffffffffffffff\");\n Class.forName(\"com.mysql.jdbc.Driver\");\n Connection c=DriverManager.getConnection(\"jdbc:mysql://localhost/std\",\"root\",\"\");\n Statement st=c.createStatement();\n System.out.println(\"qqqqqqqqqqqqqqq\");\n ResultSet r=st.executeQuery(\"select * from signup\");\n System.out.println(\"error\");\n while(r.next())\n {\n System.out.println(\"ddddddddddddddddd\");\n if((r.getString(1).equals(u))&&(r.getString(6).equals(p)))\n {\n System.out.println(\"aaaaaaaaaaaaaaa\");\n flag=1;\n break;\n }\n \n }\n\n\n if (flag == 1)\n {\n HttpSession session1 = request.getSession();\n session1.setAttribute(\"name\",r.getString(1));\n session1.setAttribute(\"pass\",r.getString(6));\n /* response.sendRedirect(\"Organisereg.jsp\");\n response.sendRedirect(\"changepass.jsp\");\n response.sendRedirect(\"forgot.jsp\");\n response.sendRedirect(\"home.jsp\");\n response.sendRedirect(\"homer.jsp\");\n response.sendRedirect(\"homew.jsp\");\n response.sendRedirect(\"main.jsp\");\n response.sendRedirect(\"newjsp.jsp\");\n response.sendRedirect(\"newpass.jsp\");\n response.sendRedirect(\"normalreg.jsp\");\n response.sendRedirect(\"profilechange.jsp\");\n response.sendRedirect(\"profileview.jsp\");\n response.sendRedirect(\"regis.jsp\");\n response.sendRedirect(\"register.jsp\");\n response.sendRedirect(\"regw.jsp\");\n response.sendRedirect(\"result1.jsp\");\n response.sendRedirect(\"result2.jsp\");\n response.sendRedirect(\"showpass.jsp\");\n response.sendRedirect(\"viewjob.jsp\");\n response.sendRedirect(\"viewprofile.jsp\");\n response.sendRedirect(\"test.jsp\");\n response.sendRedirect(\"success.jsp\");\n response.sendRedirect(\"successlog.jsp\");*/\n request.setAttribute(\"n1\",r.getString(1));\n return mapping.findForward(\"ok\");\n }\n else\n return mapping.findForward(\"notok\");\n\n \n \n \n }", "protected Session getSession() {\n return sessionUtility.getSession();\n }", "int getActiveSessions();", "@Override\n public Session getSession() throws SQLException {\n // If we don't yet have a live transaction, start a new one\n // NOTE: a Session cannot be used until a Transaction is started.\n if (!isTransActionAlive()) {\n sessionFactory.getCurrentSession().beginTransaction();\n configureDatabaseMode();\n }\n // Return the current Hibernate Session object (Hibernate will create one if it doesn't yet exist)\n return sessionFactory.getCurrentSession();\n }", "@Override\r\n public PhoenixSession getSession()\r\n {\n return null;\r\n }" ]
[ "0.6578155", "0.63650954", "0.63650954", "0.6328576", "0.61636037", "0.6152405", "0.61501455", "0.61501455", "0.60300744", "0.5993524", "0.5954213", "0.5947092", "0.59111863", "0.58928245", "0.58450675", "0.5827144", "0.5825651", "0.5821838", "0.5818531", "0.57933784", "0.5667136", "0.5658043", "0.5638922", "0.5633004", "0.5627897", "0.560824", "0.5594048", "0.5589154", "0.5580465", "0.55800766", "0.55781215", "0.5562014", "0.5546889", "0.5527782", "0.550383", "0.5500553", "0.5460516", "0.54590213", "0.54546064", "0.5451544", "0.54500324", "0.5443503", "0.5429608", "0.5420968", "0.5417981", "0.54019845", "0.53998125", "0.539282", "0.5392035", "0.5385966", "0.5383507", "0.5375056", "0.5366143", "0.5365314", "0.53491646", "0.5343818", "0.5342098", "0.5329446", "0.53287363", "0.5322903", "0.53159547", "0.5312619", "0.53092325", "0.53022826", "0.5301252", "0.5300055", "0.52970636", "0.5295903", "0.52758783", "0.5272015", "0.5265306", "0.52619547", "0.5254994", "0.52533495", "0.52442855", "0.5241395", "0.52349305", "0.5229252", "0.5228096", "0.52272195", "0.52257997", "0.52224386", "0.5216314", "0.52162683", "0.5213651", "0.5208733", "0.5208544", "0.52082324", "0.52050275", "0.52016103", "0.51931936", "0.5191831", "0.51875395", "0.51819706", "0.5177431", "0.51745844", "0.516764", "0.5167345", "0.51635236", "0.5142176", "0.5136092" ]
0.0
-1
Constructor que recibe el jugador1, el jugador2 y la baraja
Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) { this.jugador1 = jugador1; this.jugador2 = jugador2; this.baraja = baraja; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Juego(String nombreJ1, String nombreJ2){\r\n\t\tMINATR = 3;\r\n\t\tMAXATR = 6;\r\n\t\tjugador1 = new Jugador(nombreJ1);\r\n\t\tjugador2 = new Jugador(nombreJ2);\r\n\t\tjugadorEnTurno = jugador1;\r\n\t}", "public JogoVelha(Jogador jogador1, Jogador jogador2) {\r\n // recebe os jogadores\r\n this.jogador1 = jogador1;\r\n this.jogador2 = jogador2;\r\n this.sncpu = false;\r\n \r\n }", "public Clasificacion (ArrayList<Jugador> jugadores)\n\t{\n\t\tthis.jugadores = jugadores;\n\t\tthis.numJug = jugadores.size();\n\t\tthis.podio = new ArrayList<Jugador>();\n\t\tthis.ganadores = new ArrayList<Jugador>();\n\t\tthis.baraja = new Baraja();\n\t\tbaraja.barajar(); baraja.barajar();\n\t\tbarajaDeCartas = baraja.getBaraja();\n\t}", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public Arquero(Jugador jugador){\n this.propietario = jugador;\n this.vida = 75;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public void setJugador1(Jugador jugador1) {\n\t\tthis.jugador1 = jugador1;\n\t}", "public Rettangolo(Punto p1, Punto p2) {\r\n // pre: p1!=null && p2!=null\r\n this.vbs = p1;\r\n this.vad = p2;\r\n }", "public static void main(String[] args) {\n\n aluno exemplo1 = new aluno();//objeto do tipo aluno\n aluno exemplo2 = new aluno();\n exemplo1.nome = \"EPAMINONDAS\";\n exemplo1.matricula = \"MAT-1\";\n exemplo1.nota = 5;\n exemplo1.anoNacimento = 2005;\n\n\n exemplo2.nome = \"MARIA\";\n exemplo2.matricula = \"MAT-2\";\n exemplo2.nota = 10;\n exemplo2.anoNacimento = 2000;\n\n\n System.out.println(\"Nome: \"+exemplo1.nome + \" matricula: \" + exemplo1.matricula + \" nota: \" + exemplo1.nota);\n System.out.println(\"Nome: \"+exemplo2.nome + \" matricula: \" + exemplo2.matricula + \" nota: \" + exemplo2.nota);\n\n exemplo1.mostraIdade(2030);//metodos\n exemplo2.mostraIdade(2021);\n exemplo2.mostraIdade(2003, 2021);\n }", "public void setJugador2(Jugador jugador2) {\n\t\tthis.jugador2 = jugador2;\n\t}", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "public VentanaJuego(ArrayList<Jugador> jugadores) {\n initComponents();\n //Esto hace que no se redimensione la pantalla\n this.setResizable(false);\n //Establece del titulo de la ventana\n this.setTitle(\"Picko Picko Mazorkitos\");\n //Coge el icono del jLabell principal\n this.jLabel11.setIcon(new ImageIcon(\"res/bgGame.jpg\"));\n //Coge la imagen logo\n this.logo.setIcon(new ImageIcon(\"res/logo.png\"));\n //Dimensiones de la pantalla\n this.jLabel11.setSize(1250, 700);\n //Localización de la pantalla\n this.jLabel11.setLocation(-110, 0);\n\n // Añade el ArrayList de los jugador al turno\n this.turno = new TurnoJugador(jugadores);\n \n // Añade el JTextArea a textarea\n this.textarea = new Mensajes(jTextArea1);\n textarea.hola();\n\n //Mostrar las imagenes de los dados gracias al Enum de CaraDado\n this.dado1.setIcon(CaraDado.CARA6.getImagen());\n this.dado2.setIcon(CaraDado.CARA1.getImagen());\n this.dado3.setIcon(CaraDado.CARA2.getImagen());\n this.dado4.setIcon(CaraDado.CARA3.getImagen());\n this.dado5.setIcon(CaraDado.CARA4.getImagen());\n this.dado6.setIcon(CaraDado.CARA5.getImagen());\n this.dado7.setIcon(CaraDado.CARA6.getImagen());\n this.dado8.setIcon(CaraDado.CARA6.getImagen());\n\n //Mostrar las imagenes de las raciones gracias al Enum de Racion\n this.ficha1.setIcon(Racion.RACION21.getImagen());\n this.ficha2.setIcon(Racion.RACION22.getImagen());\n this.ficha3.setIcon(Racion.RACION23.getImagen());\n this.ficha4.setIcon(Racion.RACION24.getImagen());\n this.ficha5.setIcon(Racion.RACION25.getImagen());\n this.ficha6.setIcon(Racion.RACION26.getImagen());\n this.ficha7.setIcon(Racion.RACION27.getImagen());\n this.ficha8.setIcon(Racion.RACION28.getImagen());\n this.ficha9.setIcon(Racion.RACION29.getImagen());\n this.ficha10.setIcon(Racion.RACION30.getImagen());\n this.ficha11.setIcon(Racion.RACION31.getImagen());\n this.ficha12.setIcon(Racion.RACION32.getImagen());\n this.ficha13.setIcon(Racion.RACION33.getImagen());\n this.ficha14.setIcon(Racion.RACION34.getImagen());\n this.ficha15.setIcon(Racion.RACION35.getImagen());\n // FALTA AÑADIR LA FICHA 36 A LA VENTANAJUEGO\n //this.ficha16.setIcon(Racion.RACION36.getImagen());\n\n // MODIFICAR\n switch (jugadores.size()) {\n case 2:\n this.gamePlayer1.setText(jugadores.get(0).getNombreJugador());\n this.gamePlayer2.setText(jugadores.get(1).getNombreJugador());\n this.gamePlayer3.setVisible(false);\n this.gamePlayer4.setVisible(false);\n break;\n case 3:\n this.gamePlayer1.setText(jugadores.get(0).getNombreJugador());\n this.gamePlayer2.setText(jugadores.get(1).getNombreJugador());\n this.gamePlayer3.setText(jugadores.get(2).getNombreJugador());\n this.gamePlayer4.setVisible(false);\n break;\n case 4:\n this.gamePlayer1.setText(jugadores.get(0).getNombreJugador());\n this.gamePlayer2.setText(jugadores.get(1).getNombreJugador());\n this.gamePlayer3.setText(jugadores.get(2).getNombreJugador());\n this.gamePlayer4.setText(jugadores.get(3).getNombreJugador());\n break;\n }\n\n }", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "public Jugador(String nombreJugador)\n {\n this.nombreJugador = nombreJugador;\n cartasQueTieneEnLaMano = new Carta[5];\n numeroCartasEnLaMano = 0;\n }", "public Jugador(int dorsal)\n {\n Random rmd = new Random();\n edad = rmd.nextInt(23)+18 ;\n estadoForma = rmd.nextInt(11);\n int nom = rmd.nextInt(33);\n Nombres nomb = new Nombres();\n nombre = nomb.getNombre(nom);\n this.dorsal = dorsal;\n this.nombre = nombre;\n }", "public ArmasHija2(int objetoHija2){\r\n super(objetoHija2);\r\n this.objetoHija2=objetoHija2;\r\n }", "public void jouer(Joueur joueur, int posX1, int posY1, int posX2, int posY2){\n\t\t\n\t\tcoefficientCombo = 1;\n\t\t\n\t\t\n\t\t\n\t\tif(joueur == joueurCourant){\t\t\t\t\t//On vérifie si c'est son tour de jouer\n\t\t\tif( verifVoisin(posX1, posY1, posX2, posY2)){\t\t\t\t//On vérifie si les cristaux joués sont voisins\n\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\t\t\t\t//On switch les cristaux dans le tableau \n\t\t\t\tArrayList<ArrayList<Integer>> tabs = chercheBlock(posX1, posY1);\t//On cherche si des blocks de cristaux de même couleur ont été formés et on stocks leurs coordonnées dans tab\n\t\t\t\tArrayList<ArrayList<Integer>> tabs2 = chercheBlock(posX2, posY2);\n\t\t\t\t\n\t\t\t\t/*for (ArrayList<Integer> arrayList : tabs) { //Affichage des coordonnées stockées dans tab\n\t\t\t\t\tfor(Integer i : arrayList){\n\t\t\t\t\t\tSystem.out.print(i);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tfaireLeMenage(tabs2);\n\t\t\t\tfaireLeMenage(tabs);\t\t//On \"supprime\" les cristaux listés dans tab\n\t\t\t\trestructurer();\t\t\t\t//On réagence le tableau en supprimant les cases vides, les cristaux au dessus glissent vers le bas, les cases hautes laissées vides sont remplies aléatoirement\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//trouverCombo();\n\t\t\t\t\n\t\t\t\tif(tabs.size() == 0 && tabs2.size()==0)\t\t//Aucun block n'a été renvoyé\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"reswitch\");\n\t\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Ces deux cristaux ne sont pas voisins\");\n\t\t\t}\n\t\t\t\t\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Ce n'est pas à \" + joueur.getNom() + \" de jouer...\");\n\t\t\tSystem.out.println(\"C'est au tour de \" + joueurCourant.getNom() + \" de jouer...\");\n\t\t}\n\t\t\n\t}", "public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }", "public Jogador jogadorDaVez() {\r\n Jogador jogadorvez = null;\r\n \r\n if (this.vezDoJogador1 ){\r\n jogadorvez = jogador1; \r\n }else{\r\n jogadorvez = jogador2;\r\n }\r\n return jogadorvez;\r\n }", "public EstacionDeTren(String nombreCiudad,int precioMaquina1,int precioMaquina2)\n {\n ciudad = nombreCiudad;\n maquina1 = new TicketMachine(precioMaquina1);\n maquina2 = new TicketMachine(precioMaquina2);\n }", "private void setupEscenario2( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,2,3,4\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"5,6,7,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"9\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "public Jogador(String nome, String cor){\r\n this.nome = nome;\r\n this.cor = cor;\r\n this.contaCorrente = new ContaCorrente(1500);\r\n this.propriedadesDoJogador = new ArrayList<>();\r\n this.companhiasDoJogador = new ArrayList<>();\r\n this.posicaoNoTabuleiroIndice = 0;\r\n this.possuiCartaSairDaPrisao = false;\r\n this.reclusao = 0;\r\n this.sorteNosDados = 0;\r\n monopolioNoGrupoDeCor = new ArrayList<>();\r\n }", "public Jugador(float x, float y, Colisiones colision, Main main,float wReescalado,float hReescalado) {\n this.x = x;\n this.y = y;\n this.colisiones=colision;\n this.main=main;\n this.wReescalado=wReescalado;\n this.hReescalado=hReescalado;\n rectangles=colisiones.getRect();//Obtengo el array de rectangulo en colisiones\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));//Asigno a texture el archivo png de mi personaje\n jugadorVista = \"\";//Agigno comillas a jugador vista\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());//Creo el rectangulo de mi jugador con las propiedades de texture\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);//Divido mi texture region en las partes indicadas para asignarlas a la matria\n //Los valores de la division de tpm equivalen al numero de filas y numero de columnas de mi png(En mi caso tengo 4 filas que son los diferentes movimientos y 4 columnas una para cada movimiento)\n //Ejemplo:Fila 1-->Movimiento a la derecha: Columna 1-->Quieto Columna -->Mueve un pie: Columna 3 --->Muevo el otro pie: Columna 4-->Vuelvo a estar quieto\n regions = new TextureRegion[4];//Asigno al array regions la longuitud por la que haya dividido en ancho my imagen\n for (int b = 0; b < regions.length; b++) {//Con este bucle voy cargando las imagenes y da la ilusion de que anda\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);//Inicializamos el constructor pasandole por parametros el tiempo que dura y el array\n tiempo = 0f;\n }\n }", "public static void main(String[] args) \n {\n Equipo Boca = new Equipo(2);\n \n //Crear objeto jugador, pasando por parametro sus atributos\n Jugador j1 = new Jugador(\"Andrada\", 1, 1, 20, 100);\n Jugador j2 = new Jugador(\"Salvio\", 4, 7, 20, 100);\n \n // cargar objeto Equipo\n Boca.agregarJugador(j1);\n Boca.agregarJugador(j2);\n \n //Mostrar objeto Equipo\n System.out.println(Boca.listarJugador());\n \n \n \n //Cantidad de jugadores con menos de 10 partidos jugados.\n System.out.print(\"Cantidad de Jugadores con menos de 10 partidos jugados: \");\n System.out.println(Boca.cantidadJugadores());\n \n \n //Nombre del jugador con mayor cantidad de partidos jugados.\n System.out.print(\"Nombre del jugador con mas partidos jugados: \");\n System.out.println(Boca.jugadorMasPartidos());\n \n \n\n //Promedio de estado físico de todo el equipo.\n \n System.out.print(\"Promedio de estado fisico del equipo:\");\n System.out.println(Boca.promedioEstadoFisicoEquipo() + \"%\");\n \n\n //Estado físico de un jugador particular identificado por número de camiseta. \n \n System.out.print(\"Estado fisico de un juegador dado su numero de camiseta: \");\n System.out.println(Boca.estadoFisicoJugador(7) +\"%\");\n \n //Promedio de partidos jugados de los jugadores de cada posición (4resultados).\n \n System.out.println(\"Promedio de partidos jugados de los jugadores de cada posición:\");\n System.out.println(Boca.promedioPartidosJugadosporPuesto());\n \n \n \n \n }", "public static void main(String[] args) {\n\t\tSecretario s1 = new Secretario(\"Mauro\", \"Pérez\", \"2168\", \"Calle Falsa\", 999, 500, true, \"Fax\");\n\t\tVendedor v1 = new Vendedor(\"Pepe\", \"Martinez\", \"2177\", \"Calle de atras\", 998, 750, 669, \"Alguna\", 0.10);\n\t\tVendedor v2 = new Vendedor(\"Antonio\", \"Martinez\", \"2144\", \"Calle de delante\", 996, 750, 669, \"Alguna\", 0.10);\n\t\tJefeZona j1 = new JefeZona(\"Manolo\", \"Ortega\", \"2155\", \"Una calle\", 997, 1000, true);\n\t\t\n\t\tClientes c1 = new Clientes(\"Cliente 1\");\n\t\tClientes c2 = new Clientes(\"Cliente 2\");\n\t\t\n\t\ts1.setSupervisor(v1);\n\t\t\n\t\tv1.agregarCliente(c1);\n\t\tv1.agregarCliente(c2);\n\t\tv1.eliminarCliente(c1);\n\t\t\n\t\tj1.agregarVendedor(v1);\n\t\tj1.agregarVendedor(v2);\n\t\t\n\t\tSystem.out.println(v1.toString());\n\t\tv1.incrementarSalario();\n\t\tSystem.out.println(v1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(s1.toString());\n\t\ts1.incrementarSalario();\n\t\tSystem.out.println(s1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(j1.toString());\n\t\tj1.incrementarSalario();\n\t\tSystem.out.println(j1.toString());\n\t}", "public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\t\n Juego juego1 = (Juego) new JuegoAdivinaNumero();\n juego1.setNumVidas(5);\n juego1.muestraVidasRestantes();\n/* juego1.setNumVidas(juego1.getNumVidas() - 1);\n juego1.muestraVidasRestantes();\n// \n juego1.quitaVida();\n juego1.muestraVidasRestantes();\n juego1.reiniciaPartida();\n juego1.muestraVidasRestantes(); \n juego1.ActualizaRecord();\n \n \n \n\n \n Juego juego2 = (Juego) new JuegoAdivinaNumero();\n juego2.setNumVidas(5);\n juego2.muestraVidasRestantes();\n \n */\n\t\t\n \t JuegoAdivinaNumero adivina1 = new JuegoAdivinaNumero(); \n \t adivina1.Juega();\n\t}", "public ControladorCombate(int tipo_simulacion,\r\n Entrenador entrenador1, Entrenador entrenador2, ControladorPrincipal cp){\r\n this.esLider = false;\r\n this.controlador_principal = cp;\r\n this.tipo_simulacion = tipo_simulacion;\r\n this.combate = new Combate();\r\n this.equipo1 = entrenador1.getPokemones();\r\n this.equipo2 = entrenador2.getPokemones();\r\n this.entrenador1 = entrenador1;\r\n this.entrenador2 = entrenador2;\r\n this.vc = new VistaCombate();\r\n this.va = new VistaAtaque();\r\n this.ve = new VistaEquipo();\r\n this.creg = new ControladorRegistros();\r\n String[] nombres1 = new String[6];\r\n String[] nombres2 = new String[6];\r\n for (int i = 0; i < 6; i++) {\r\n nombres1[i]=equipo1[i].getPseudonimo();\r\n nombres2[i]=equipo2[i].getPseudonimo(); \r\n }\r\n this.vpc = new VistaPreviaCombate(tipo_simulacion, entrenador1.getNombre(), entrenador2.getNombre());\r\n this.vpc.agregarListener(this);\r\n this.vpc.setjC_Equipo1(nombres1);\r\n this.vpc.setjC_Equipo2(nombres2);\r\n this.vpc.setVisible(true);\r\n this.termino = false;\r\n resetearEntrenadores();\r\n }", "private void inicializarVariablesControlRonda() {\n\t\ttieneAs = new int[4];\n\t\tfor(int i=0;i<tieneAs.length;i++) {\n\t\t\ttieneAs[i]=0;\n\t\t}\n\t\tidJugadores = new String[3];\n\t\tvalorManos = new int[4];\n\t\t\n\t\tmazo = new Baraja();\n\t\tCarta carta;\n\t\tganador = new ArrayList<String>();\n\t\tapuestasJugadores = new int[3];\n\t\tmanoJugador1 = new ArrayList<Carta>();\n\t\tmanoJugador2 = new ArrayList<Carta>();\n\t\tmanoJugador3 = new ArrayList<Carta>();\n\t\tmanoDealer = new ArrayList<Carta>();\n\t\tparejaNombreGanancia = new ArrayList<Pair<String,Integer>>(); \n\t\t\n\t\t// gestiona las tres manos en un solo objeto para facilitar el manejo del hilo\n\t\tmanosJugadores = new ArrayList<ArrayList<Carta>>(4);\n\t\tmanosJugadores.add(manoJugador1);\n\t\tmanosJugadores.add(manoJugador2);\n\t\tmanosJugadores.add(manoJugador3);\n\t\tmanosJugadores.add(manoDealer);\n\t\t// reparto inicial jugadores 1 y 2\n\t\tfor (int i = 1; i <= 2; i++) {\n\t\t\tcarta = mazo.getCarta();\n\t\t\tmanoJugador1.add(carta);\n\t\t\tcalcularValorMano(carta, 0);\n\t\t\tcarta = mazo.getCarta();\n\t\t\tmanoJugador2.add(carta);\n\t\t\tcalcularValorMano(carta, 1);\n\t\t\tcarta = mazo.getCarta();\n\t\t\tmanoJugador3.add(carta);\n\t\t\tcalcularValorMano(carta, 2);\n\t\t}\n\t\t// Carta inicial Dealer\n\t\tcarta = mazo.getCarta();\n\t\tmanoDealer.add(carta);\n\t\tcalcularValorMano(carta, 3);\n\n\t\t\n\t}", "public static void instanciarJugador(Jugador jugador) {\n\t\tjugadores[contSalas] = jugador;\n\t\tcontJugadores++;\n\t}", "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public Jovem(String identificador) {\n super(identificador);\n numAulas = DEFAULT_N_AULAS;\n }", "public Test3()\n {\n for(int i=0; i< horas.length;i++){\n String [] d = horas[i].split(\":\");\n v[i][0] = new CarroGrande(\"URC781\"+i, \"60458723\", Integer.parseInt(d[0]), Integer.parseInt(d[1]), Integer.parseInt(d[2]));\n v[i][1] = new CarroPequeno(\"URC782\"+i, \"60458723\", Integer.parseInt(d[0]), Integer.parseInt(d[1]), Integer.parseInt(d[2]));\n v[i][2] = new Moto(\"URC783\"+i, \"60458723\", Integer.parseInt(d[0]), Integer.parseInt(d[1]), Integer.parseInt(d[2]));\n v[i][3] = new Bicicleta(\"URC784\"+i, \"60458723\", Integer.parseInt(d[0]), Integer.parseInt(d[1]), Integer.parseInt(d[2]));\n }\n }", "public ejercicio1() {\n this.cadena = \"\";\n this.buscar = \"\";\n }", "public static int juego(String jugadorA, String jugadorB) {\r\n\t\t\r\n\t\tint fila = 0, columna = 0, alternador = 0;\r\n\t\tString jugadorAux, pieza;\r\n\t\tboolean malIntroducido, noRepetir;\r\n\t\ttablero = new Tablero();\r\n\t\tSystem.out.println(tablero.toString());\r\n\t\t\r\n\t\twhile (tablero.finJuego() == 0) {\r\n\t\t\tnoRepetir = true;\r\n\t\t\tif (alternador == 0) {\r\n\t\t\t\tjugadorAux = jugadorA;\r\n\t\t\t\talternador = 1;\r\n\t\t\t\tpieza = \"X\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tjugadorAux = jugadorB;\r\n\t\t\t\talternador = 0;\r\n\t\t\t\tpieza = \"O\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tdo {\r\n\t\t\tdo {\r\n\t\t\t\tmalIntroducido = false;\r\n\t\t\t\tSystem.out.println(jugadorAux +\" Introduce el número\");\r\n\t\t\t\tcolumna = entrada.nextInt() - 1;\r\n\t\t\t\tif (columna != 0 && columna != 1 && columna != 2) {\r\n\t\t\t\t\tmalIntroducido = true;\r\n\t\t\t\t\tSystem.out.println(\"Entrada incorrecta\");\r\n\t\t\t\t}\r\n\t\t\t} while(malIntroducido);\r\n\t\t\tdo {\r\n\t\t\t\tmalIntroducido = false;\r\n\t\t\t\tSystem.out.println(jugadorAux +\" Introduce la letra\");\r\n\t\t\t\tString C = entrada.next(); \r\n\t\t\t\tswitch(C) {\r\n\t\t\t\tcase \"A\": fila = 0; break;\r\n\t\t\t\tcase \"B\": fila = 1; break;\r\n\t\t\t\tcase \"C\": fila = 2; break;\r\n\t\t\t\tdefault: System.out.println(\"Entrada incorrecta\");\r\n\t\t\t\tmalIntroducido = true;\r\n\t\t\t\t}\r\n\t\t\t} while(malIntroducido);\r\n\t\t\t\r\n\t\t\tnoRepetir = tablero.setCasilla(fila, columna, pieza);\r\n\t\t\t} while(!noRepetir);\r\n\t\t\t\t\r\n\t\t\tSystem.out.println(tablero.toString());\r\n\t\t\t\r\n\t\t} \r\n\t\treturn tablero.finJuego();\r\n\t}", "public Pantry(Jam jar1, Jam jar2, Jam jar3){\r\n jam1 = jar1;\r\n jam2 = jar2;\r\n jam3 = jar3;\r\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "public Girasol(int x,int y){\n super(x,y);\n this.setComportamiento(\"Crea 20 soles cada 2 turnos\");\n this.setVidas(1);\n this.impresion=\"G(\"+this.getVidas()+\")\";\n this.setDaño(0);\n this.setFrecuencia(2);\n }", "public Tiempo2( Tiempo2 tiempo ) {\n // invoca al constructor de Tiempo2 con tres argumentos\n this( tiempo.obtenerHora(), tiempo.obtenerMinuto(), tiempo.obtenerSegundo() );\n }", "public Celula() { // Sentinela\n\t\tthis.item = new Jogador();\n\t\tproximo = null;\n\t}", "public static void main(String[] args) {\n Aviso aviso1 = new Aviso();\n \n aviso1.id=1;\n \n aviso1.tipoAviso=\"General\";\n aviso1.titulo=\"Insumos y bienes muebles de laboratorio disponibles\";\n aviso1.texto=\"La Coordinación de Control Técnico de Insumos (COCTI) de la Dirección de Prestaciones Médicas, pone a disposición del personal que realiza investigación el inventario adjunto.\";\n aviso1.resumen=\"Insumos y bienes muebles de laboratorio disponibles por la Coordinación de Control Técnico de Insumos (COCTI)\";\n aviso1.nombre=\"Eduardo Flores Díaz\";\n aviso1.estatusF=\"Vigente\";\n \n aviso1.diaP=02;\n aviso1.mesP=02;\n aviso1.yearP=2020;\n \n aviso1.diaA=02;\n aviso1.mesA=02;\n aviso1.yearA=2020;\n \n aviso1.diaB=02;\n aviso1.mesB=02;\n aviso1.yearB=2021;\n \n System.out.println(aviso1);\n \n Aviso aviso2 = new Aviso();\n \n aviso2.id=2;\n \n aviso2.tipoAviso=\"Conferencia\";\n aviso2.titulo=\"CONFERENCIA DR. COSSARIZZA\";\n aviso2.texto=\"El Dr. Andrea Cossarizza, ofreció a la comunidad IMSS su conferencia “Clinical Applications of Advanced Cytometry” y aprovechó la presencia de investigadores y estudiantes del IMSS para compartir sus últimos resultados de investigación, aún no publicados, sobre VIH y el uso de citometría de flujo.\\n\" +\n\"\\n\" +\n\"Además, invitó a nuestra comunidad a agregarse a la sociedad internacional sobre citometría: ISAC(International Society for the Advancement of Cytometry) y aprovechar los recursos que tienen como:\\n\" +\n\"\\n\" +\n\"Programa de Liderazgo MARYLOU INGRAM SCHOLARS PROGRAM, de 5 años para formación de citomteristas\\n\" +\n\"Iniciativa de innovación CYTO-Innovation apoya a las propuestas innovadoras que contemplan la conversión de ideas en productos comerciales de alto impacto para ayudar a nuevos empresarios a aprovechar la tecnología de citometría\\n\" +\n\"\\n\" +\n\"Además en la ISAC tienen disponibles una serie de manuales e información de punta sobre la citometría para uso libre. El Dr. Cossarizza reiteró la invitación al personal IMSS a vincularse con la Universidad de Módena y su laboratorio aprovechando el prestigio que tiene el Laboratorio de Citometría de Flujo del Centro de Instrumentos del Centro Médico Nacional Siglo XXI.\";\n \n aviso2.resumen=\"Conferencia de Dr. Andrea Cossarizza del tema “Clinical Applications of Advanced Cytometry\\\"\";\n aviso2.nombre=\"Kevin Meza Gonzalez\";\n aviso2.estatusF=\"No Vigente\";\n \n aviso2.diaP=02;\n aviso2.mesP=03;\n aviso2.yearP=2020;\n \n aviso2.diaA=15;\n aviso2.mesA=02;\n aviso2.yearA=2020;\n \n aviso2.diaB=31;\n aviso2.mesB=03;\n aviso2.yearB=2020;\n \n System.out.println(aviso2);\n \n }", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}", "public void testCasillasJugador1( )\n {\n setupEscenario1( );\n int tamanho = casillasJugador1.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador1.get( i ) ).intValue( );\n assertEquals( marcaJugador1, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public SuperRodada(){\n this.pontos_em_disputa=0;\n this.truco=false;\n this.Desafiante=null;\n this.addPontosEmDisputa(2);\n Game game = Game.getGame();\n DonoDoBaralho=(DonoDoBaralho==null)?game.getDupla(1).getJogadorA():this.proximoAJogar(DonoDoBaralho);\n \n }", "public TelaInicio() {\n initComponents();\n //j[0] - Jogador 1\n //j[1] - Jogador 2\n j[0] = Jogador.getInstance();\n j[1] = Jogador.getInstance2();\n p[0] = Personagem.getInstance();\n String nomeP1 = p[0].getNome();\n p[0].GetPersonagem(nomeP1);\n Icon icon = new ImageIcon(\"../images/f3.png\");\n txtNomeJ1.setText(j[0].getNome());\n txtApelidoJ1.setText(j[0].getApelido());\n J2Nome.setText(j[1].getNome());\n J2Apelido.setText(j[1].getApelido());\n if(!jRPar.isSelected() && !jRImpar.isSelected())\n btnComecar.setEnabled(false);\n\n }", "public ventana2 () {\n initComponents();\n setLocationRelativeTo(null);\n \n \n ventana1 cont1= new ventana1();\n \n totalvendidos = cont1.totalvendidos;\n totalgeneralvendido = cont1.totalgeneralvendido;\n medvendidos = cont1.medvendidos;\n totalmedvendido = cont1.totalmedvendido;\n medreguladosvendidos = cont1.medreguladosvendidos;\n mednoreguladosvendidos = cont1.mednoreguladosvendidos;\n utilesvendidos = cont1.utilesvendidos;\n totalutilesvendido = cont1.totalutilesvendido;\n totalclientes = cont1.totalclientes;\n \njTextArearegistro.setText(\"Productos vendidos: \"+ totalvendidos+\"\\n\"+\n \"Total de ventas Bs: \"+totalgeneralvendido+\"\\n\"+\"Medicamentos vendidos: \"\n +medvendidos+\"\\n\"+\"Medicamentos regulados vendidos: \"+medreguladosvendidos+\n \"\\n\"+\"Medicamentos no regulados vendidos: \"+mednoreguladosvendidos+\"\\n\"+\n \"Venta de medicamentos Bs: \"+totalmedvendido+\"\\n\"+\"Utiles vendidos: \"\n +utilesvendidos+\"\\n\"+\"Venta de utiles Bs: \"+totalutilesvendido+\n \"\\n\"+\"Total general de ventas Bs: \"+totalgeneralvendido+\"\\n\"+\"Clientes atendidos: \"\n +totalclientes);\n }", "public ServidorScrabbleJ()\n\t {\n\t super( \"ServidorScrabbleJ\" ); // establece el título de la ventana\n\n\t // crea objeto ExecutorService con un subproceso para cada jugador\n\t ejecutarJuego = Executors.newFixedThreadPool(2);\n\t bloqueoJuego = new ReentrantLock(); // crea bloqueo para el juego\n\n\t // variable de condición para los dos jugadores conectados\n\t otroJugadorConectado = bloqueoJuego.newCondition();\n\n\t // variable de condición para el turno del otro jugador\n\t turnoOtroJugador = bloqueoJuego.newCondition(); \n\n\t for ( int i = 0; i < 15; i++ )\n\t \t for (int j = 0; j < 15; j++) {\n\t \t tablero[ i ][ j ] = new String( \"\" ); // crea tablero de scrabble\n\t\t\t}\n\t jugadores = new Jugador[2]; // crea arreglo de jugadores\n\t jugadorActual = JUGADOR_1; // establece el primer jugador como el jugador actual\n\t \n\t try\n\t {\n\t \t //establece el puerto y el numero maximo de conexiones permitidas\n\t servidor = new ServerSocket(12345, 2); // establece objeto ServerSocket\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\n\t areaSalida = new JTextArea(); // crea objeto JTextArea para mostrar la salida\n\t add( new JScrollPane(areaSalida), BorderLayout.CENTER );\n\t areaSalida.setText( \"Servidor esperando conexiones\\n\" );\n\n\t setSize( 300, 325 ); // establece el tamaño de la ventana\n\t setVisible( true ); // muestra la ventana\n\t }", "public Tiempo2( int h ) { \n this( h, 0, 0 ); // invoca al constructor de Tiempo2 con tres argumentos\n }", "@Override\n\tpublic void dibujar(Graphics2D g) {\n\n\t\tif (contadorJugador == 0) {\n\t\t\tenemigos.add(enemigo1);\n\t\t\tenemigos.add(enemigo2);\n\t\t\t// Se volverian a generar los objetos\n\t\t\tConstantes.volverTodoCero();\n\t\t\tcontadorJugador++;\n\t\t}\n\t\tg.scale(Constantes.ESCALAX, Constantes.ESCALAY);\n\t\t\n\t\t// Importante\n\t\tmapa.dibujar(g);\n\t\tdibujarArmas(g);\n\t\t//\n\t\tjugador.dibujar(g);\n\t\tenemigo1.dibujar(g);\n\t\tenemigo2.dibujar(g);\n\t\tcasa1.dibujar(g);\n\t\tcasa2.dibujar(g);\n\t\tcasa3.dibujar(g);\n\t\tcasa4.dibujar(g);\n\t\tcasa5.dibujar(g);\n\t\tcasa6.dibujar(g);\n\n\t\ttry {\n\t\t\t// Esto sirve para que no dispare seguido es el contador que va aumentado hasta\n\t\t\t// el tiempo que tenga cada arma\n\t\t\tif (Tecla.esperarArma != ((Armas) Tecla.objetoElegido).esperaDisparo) {\n\t\t\t\tTecla.esperarArma++;\n\t\t\t}\n\t\t} catch (NullPointerException | ClassCastException e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\n\t\t// System.out.println(Tecla.esperarArma);\n\n\t\tMapa.paredAbajo = new Rectangle(Mapa.rectanguloAbx, Mapa.rectanguloAby, Constantes.ANCHOMAPA, 3);\n\t\tMapa.paredIzquierda = new Rectangle(Mapa.rectanguloIx, Mapa.rectanguloIy, 3, Constantes.ALTOMAPA);\n\t\tMapa.paredArriba = new Rectangle(Mapa.rectanguloAx, Mapa.rectanguloAy, Constantes.ANCHOMAPA, 3);\n\t\tMapa.paredDerecha = new Rectangle(Mapa.rectanguloDx, Mapa.rectanguloDy, 3, Constantes.ALTOMAPA);\n\t\t// ---\n\t\t// Prueba\n\t\t// ---\n\n\t\trecorrerArrayBalaMover(g);\n\n\t\tg.drawRect(Mapa.rectanguloAbx, Mapa.rectanguloAby, Constantes.ANCHOMAPA, 3);\n\t\tg.drawRect(Mapa.rectanguloAx, Mapa.rectanguloAy, 3, Constantes.ALTOMAPA);\n\t\tg.drawRect(Mapa.rectanguloDx, Mapa.rectanguloDy, 3, Constantes.ALTOMAPA);\n\t\tg.drawRect(Mapa.rectanguloIx, Mapa.rectanguloIy, Constantes.ANCHOMAPA, 3);\n\n\t}", "public Jugador(String elAlias, String elNombre, int laEdad, int ganadas, int perdidas, int empatadas) {\r\n this.setAlias(elAlias);\r\n this.setNombre(elNombre);\r\n this.setEdad(laEdad);\r\n this.setPartidas(ganadas, perdidas, empatadas);\r\n }", "private void montarBotoesJogo() {\n\r\n\t\tbotoes = new BotaoJogo[dificuldade.getValor()][dificuldade.getValor()];\r\n\r\n\t\tfor (int i = 0; i < botoes.length; i++) {\r\n\t\t\tfor (int j = 0; j < botoes.length; j++) {\r\n\t\t\t\tbotoes[i][j] = new BotaoJogo(i, j);\r\n\t\t\t\tbotoes[i][j].setDisabledIcon(iconBandeira);\r\n\t\t\t\tbotoes[i][j].addActionListener(this);\r\n\t\t\t\tbotoes[i][j].addMouseListener(this);\r\n\t\t\t\tbotoes[i][j].setIcon(iconBotao);\r\n\t\t\t\tthis.painelJogo.add(botoes[i][j]);\r\n\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner lectorInt = new Scanner(System.in);\n\t\tScanner lectorString = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese información de pasajero\");\n\t\tSystem.out.println(\"Ingrese nombre: \");\n\t\tString nombre = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese apellido: \");\n\t\tString apellido = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese edad: \");\n\t\tint edad = lectorInt.nextInt();\n\t\tSystem.out.println(\"Que tipo de pasajero es: 1:Pasajero Vip 2:Pasajero Económico \");\n\t\tint opcion = lectorInt.nextInt();\n\t\tString membresia = \"\";\n\t\tString descuento = \"\";\n\t\tif (opcion == 1) {\n\t\t\tSystem.out.println(\"Ingrese Código de Membresía\");\n\t\t\tmembresia = lectorString.nextLine();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Ingrese Código de Descuento\");\n\t\t\tdescuento = lectorString.nextLine();\n\t\t}\n\n\t\tPasajeroVip pasajero1 = new PasajeroVip();\n\t\tpasajero1.setNombre(nombre);\n\t\tpasajero1.setApellido(apellido);\n\t\tpasajero1.setCodigoMembresia(membresia);\n\t\tpasajero1.setEdad(edad);\n\n\t\tPasajeroVip pasajero2 = new PasajeroVip(\"Juan\", \"Tandre\", \"as2345\", 23);\n\n\t\tPasajeroEconomico pasajeroEconomico1 = new PasajeroEconomico();\n\t\tpasajeroEconomico1.setNombre(\"Helena\");\n\t\tpasajeroEconomico1.setApellido(\"Frias\");\n\t\tpasajeroEconomico1.setCodigoDescuento(\"1234df\");\n\t\tpasajeroEconomico1.setEdad(25);\n\n\t\tPasajero[][] asientos = new Pasajero[4][5];\n\t\tasientos[0][0] = pasajero1;\n\t\tasientos[0][1] = pasajero2;\n\t\tasientos[0][2] = pasajero1;\n\t\tasientos[0][3] = pasajeroEconomico1;\n\t\tasientos[1][0] = pasajero1;\n\t\tasientos[1][1] = pasajeroEconomico1;\n\n\t\tint opcionSalir = 0;\n\t\tdo {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Ingrese datos del asiento, 0:continuar, -1:SALIR\");\n\t\t\topcionSalir = lectorInt.nextInt();\n\t\t\tif (opcionSalir == 0) {\n\t\t\t\tSystem.out.print(\"Ingrese fila del asiento: \");\n\t\t\t\tint fila = lectorInt.nextInt();\n\t\t\t\tSystem.out.print(\"Ingrese columna del asiento: \");\n\t\t\t\tint columna = lectorInt.nextInt();\n\t\t\t\tSystem.out.println(\"Los datos del pasajero son: \");\n\t\t\t\tSystem.out.println(asientos[fila][columna]);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Va ha salir del sistema\");\n\t\t\t}\n\t\t} while (opcionSalir != -1);\n\n\t}", "public static void main(String[] args) {\n Alumno aaDatos []; // El identificador es nulo\n \n aaDatos = new Alumno[tam];//Creamos un arreglo de 10 \n //alumnos - AQUI HABRA PREGUNTA\n for (int i = 0; i < aaDatos.length; i++) {\n aaDatos[i]= new Alumno(\"Dany\",\"16550518\", 0);//Para cada lugar de arreglo se crea un objeto de la clase alumno\n \n }\n for (Alumno aaDatos1: aaDatos) {\n System.out.println(\"Nombre: \"+ aaDatos1.getsNom());\n System.out.println(\"Marticula: \"+ aaDatos1.getsMatri());\n System.out.println(\"Carrera: \"+ aaDatos1.getiCar());\n \n }\n \n \n //CREAMOS UNA COPIA DEL ARREGLO\n Alumno aaCopiaDatos [];\n aaCopiaDatos = new Alumno [tam];\n \n for (int i = 0; i < aaCopiaDatos.length; i++) {\n aaCopiaDatos[i]= new Alumno(aaDatos[i].getsNom(), // <<<Se llenan todos los datos que pide el constructor por argumentos\n aaDatos[i].getsMatri(), \n aaDatos[i].getiCar());\n \n }\n for (Alumno aaCopiaDatos1 : aaCopiaDatos) {\n System.out.println(\"Nombre: \"+ aaCopiaDatos1.getsNom());\n System.out.println(\"Marticula: \"+ aaCopiaDatos1.getsMatri());\n System.out.println(\"Carrera: \"+ aaCopiaDatos1.getiCar());\n }\n System.out.println(aaDatos);\n System.out.println(aaCopiaDatos);\n }", "public JuegoDragon() {\r\n//\t\tfile = new File(arg0)\r\n\t\tjugadorActual = new Jugador(\"Felipe\", 0);\r\n\t\tjugadorRaiz = null;\r\n\t\tprimerDragon = null;\r\n\t\tultimoDragon = null;\r\n\t\traizPodio = null;\r\n\t\tdatos = new ArrayList<Jugador>();\r\n\t\tnumDragones = 0;\r\n\t\tnivel = 0;\r\n\t\tfondo = \"img/fondo_P.gif\";\r\n\t\tcargarDatos();\r\n\t}", "public static void main(String[] args) {\n\t\tConsola consola = ConsolaTeclado.getConsola();\n\t\t\n\t\t//Cargo una lista de jugadores\n\t\tList <Jugador> jugadores = new LinkedList<Jugador>();\n\t\tjugadores.add(new Jugador(\"J1\"));\n\t\tjugadores.add(new Jugador(\"J2\"));\n\t\tjugadores.add(new Jugador(\"J3\"));\n\t\tjugadores.add(new Jugador(\"J4\"));\n\t\t\n\t\t//Juego j = new JuegoSupervivencia( consola, jugadores);\n\t\tJuego j = new JuegoConquista(consola,jugadores);\n\t\t\n\t\tj.jugar();\n\t\t\n\t\t//\n\t\t\n\t\tconsola.finalizar();\n\t}", "public Jugador(String nick)\n {\n nombre = nick;\n mano = new Carta[5];\n cartasDeMano = 0; \n }", "public Personaje(Juego juego,Celda c) {\r\n\t\tsuper(juego,c);\r\n\t}", "public Partido(Equipo equipo1, Equipo equipo2, String campo, String fecha) {\n\t\tthis.jugado = false;\n\t\tthis.equipo1 = equipo1;\n\t\tthis.equipo2 = equipo2;\n\t\tthis.golesEquipo1 = -1;\n\t\tthis.golesEquipo2 = -1;\n\t\tthis.campo = campo;\n\t\tthis.fecha = fecha;\n\t\tthis.notas = \"\";\n\t\tthis.arbitro = null;\n\t}", "public static void main(String[] args) {\n\t\tEmpleado DesarrolladorJava = new Empleado(\"Julio\", 35, 60000);\n\t\tEmpleado Seguridad = new Empleado(\"Jose\", 52, 45000);\n\t\tJefe GerenteDesarrollo = new Jefe(\"Hernan\", 45, 150000);\n\n\t\tEmpleado LejagoBancario1 = Seguridad;\n\t\tEmpleado LegajoBancario2 = GerenteDesarrollo;\n\t\tEmpleado LegajoBancario3 = DesarrolladorJava;\n\n//\t\tEjemplo de herencia generica, demuestra que no funciona igual.\n\t\tPareja<Empleado> DesarrolladorReact = new Pareja<Empleado>();\n\t\tPareja<Jefe> GerenteFinanzas = new Pareja<Jefe>();\n\n//\t\tError Type mismatch: Cannot convert from Pareja<Jefe> to Pareja<Empleado> \n//\t\tPareja<Empleado> LegajoBancario4 = GerenteFinanzas;\n\n//\t\tAdmite herencia generica agregando tipos comodin en el metodo imprimirTrabajador\n\t\tPareja.imprimirTrabajador(DesarrolladorReact);\n\t\tPareja.imprimirTrabajador(GerenteFinanzas);\n\n\t}", "public Retangulo(double[] pLados) {\n super(pLados);\n /* invoca o construtor da classe Pai passando pLados como parametros. */\n }", "public P2() {\n \n initComponents();\n grupo1.add(rb1);\n grupo1.add(rb2);\n grupo1.add(rb3);\n }", "public Persona(){\n /*super(nombresPosibles\n [r.nextInt(nombresPosibles.length)],(byte)r.nextInt(101));\n */\n super(\"Anónimo\",(byte)5);\n String[] nombresPosibles={\"Patracio\",\"Eusequio\",\"Bartolo\",\"Mortadelo\",\"Piorroncho\",\"Tiburcio\"};\n String[] apellidosPosibles={\"Sánchez\",\"López\",\"Martínez\",\"González\",\"Páramos\",\"Jiménez\",\"Parra\"};\n String[] nacionalidadesPosibles={\"Española\",\"Francesa\",\"Alemana\",\"Irlandesa\",\"Japonesa\",\"Congoleña\",\"Bielorrusa\",\"Mauritana\"};\n Random r=new Random();\n this.apellido=apellidosPosibles\n [r.nextInt(apellidosPosibles.length)];\n this.nacionalidad=nacionalidadesPosibles\n [r.nextInt(nacionalidadesPosibles.length)];\n mascota=new Mascota[5];\n this.saldo=r.nextInt(101);\n }", "public Joueur(String nom2, String prenom2, Date dateDeNaissance2, String motDePasse2, int numbreJ,\n\t\t\tint dernierNiveau2, LinkedList<PartieJeu> list) {\n\t\tnom = nom2;\n\t\tprenom = prenom2;\n\t\tdateDeNaissance = dateDeNaissance2;\n\t\tmotDePasse = motDePasse2;\n\t\tdernierNiveau = dernierNiveau2;\n\t\tnumerojouer = numbreJ;\n\t\tListPartie = list;\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public static void main(String[] args) {\n\t\t\r\n\t\tVozac v1 = new Vozac(\"Petar Petrovic\", \"vozac\");\r\n\t\tVozac v2 = new Vozac(\"Marko Markovic\", \"visi vozac\");\r\n\t\t\r\n\t\tPutnik p1 = new Putnik(\"Mara Maric\", 1000);\r\n\t\tPutnik p2 = new Putnik(\"Zora Zoric\", 1520);\r\n\t\tPutnik p3 = new Putnik(\"Rade Radic\", 854);\r\n\t\tPutnik p4 = new Putnik(\"Mile Milic\", 3150);\r\n\t\tPutnik p5 = new Putnik(\"Joka Jokic\", 2100);\r\n\t\t\r\n\t\tAutobus a1 = new Autobus(\"Novi Sad - Beograd\", 700);\r\n\t\t\r\n\t\ta1.postaviVozaca(v1);\r\n\t\ta1.dodajPutnika(p1);\r\n\t\ta1.dodajPutnika(p2);\r\n\t\ta1.dodajPutnika(p3);\r\n\t\ta1.dodajPutnika(p4);\r\n\t\ta1.dodajPutnika(p5);\r\n\t\t\r\n\t\tSystem.out.println(\"Autobus na relaciji: \" + a1.getNaziv() + \" vozi \" + a1.getVozac().getImeIPrezime() + \", a cena karte je: \" + a1.getCenaKarte() + \" dinara\");\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println(\"Lista putnika koju putuju autobusom: \");\r\n\t\tfor (int i = 0; i < a1.getListaPutnika().size(); i++) {\r\n\t\t\ta1.getListaPutnika().get(i).oduzmiNovac(a1.getCenaKarte());\r\n\t\t\tSystem.out.println(a1.getListaPutnika().get(i).getImeIPrezime() + \", a preostala svota novca je \" + a1.getListaPutnika().get(i).getSvotaNovca());\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "public JugContents (int amt0, int amt1, int amt2) {\n jugs = new int [3];\n jugs[0] = amt0;\n jugs[1] = amt1;\n jugs[2] = amt2;\n }", "public Jugador( Socket socket, int numero )\n\t {\n\t numeroJugador = numero; // almacena el número de este jugador\n\t marca = MARCAS[ numeroJugador ]; // especifica la marca del jugador\n\t conexion = socket; // almacena socket para el cliente\n\t \n\t try // obtiene los flujos del objeto Socket\n\t {\n\t entrada = new Scanner( conexion.getInputStream() );\n\t salida = new Formatter( conexion.getOutputStream() );\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit( 1 );\n\t } // fin de catch\n\t }", "public Jefatura(String nom,double sue, int agno,int mes,int dia){\r\n \r\n super(nom,sue,agno,mes,dia); \r\n \r\n }", "public Jugador obtenerJugador();", "public BurbujaInmaculada(){\n\t\tthis.afectador = new AfectadorPorTurnos(2, new EfectoBurbujaInmaculada());\n\t}", "public void codigo(String cadena, String codigo,int codigos,Reserva2 reserva,JDateChooser dateFechaIda,JDateChooser dateFechaVuelta,JTextField DineroFaltante) {\n\t\tcadena=codigo.split(\",\")[1];\n\t\tubicacion=codigo.split(\",\")[5];\n\t\tnombre=codigo.split(\",\")[3];\n\t\tprecio=codigo.split(\",\")[8];\n\t\tcodigos=Integer.parseInt(cadena);\n\t\tSystem.out.println(\"hola\");\n\t\tSystem.out.println(Modelo1.contador);\n\t\t\n\t\tif(Modelo1.contador==1) {\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigohotel(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==2) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigocasa(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigocasa());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==3) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigoapatamento(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigoapatamento());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t}\n\t\t\n\t}", "public Bodega(@JsonProperty(value=\"id\") int id, @JsonProperty(value=\"estado\") char estado, @JsonProperty(value=\"tipo\") char tipo,@JsonProperty(value=\"ancho\") double ancho\r\n\t\t\t,@JsonProperty(value=\"largo\") double largo,@JsonProperty(value=\"plataformaExterna\") boolean plataformaExterna\r\n\t\t\t,@JsonProperty(value=\"tipoDeCarga\")TipoDeCarga tipoDeCarga,@JsonProperty(value=\"separacion\") double separacion\r\n\t\t\t, @JsonProperty(value=\"cuartosFrios\") List<CuartoFrio> cuartosFrios,@JsonProperty(value=\"entradas\") List<Operacion>entradas, @JsonProperty(value=\"salidas\") List<Operacion>salidas)\r\n\t{\r\n\t\tsuper(id,estado,tipo,entradas,salidas);\r\n\t\t\r\n\t\tthis.ancho=ancho;\r\n\t\tthis.largo=largo;\r\n\t\tthis.plataformaExterna=plataformaExterna;\r\n\t\tthis.tipoDeCarga=tipoDeCarga;\r\n\t\tthis.separacion=separacion;\r\n\t\tthis.setCuartosFrios(cuartosFrios);\r\n\t}", "@SuppressWarnings(\"static-access\")\n\tpersonaje(int vida, int ataque, int personajes_creados)\n\t{\n\t\t// estableciendo parametros iguales a las variables\n\t\tthis.vida = vida;\n\t\tthis.ataque = ataque;\n\t\tthis.personajes_creados = personajes_creados;\n\t\t\n\t}", "public Tiempo2( int h, int m ) { \n this( h, m, 0 ); // invoca al constructor de Tiempo2 con tres argumentos\n }", "public static void main(String[] args) {\n\t\t\n\t\tBanco banco1;\n\t\t\n\t\tbanco1 = new BancoPatagonia();\n\t\tSystem.out.println(BancoPatagonia.CODIGOBANCARIO);\n\t System.out.println(banco1.tasaInteres());\n\t \n\t System.out.println(banco1.tasaInteresDolar());\n\t \n\t banco1 = new BancoNacion();\n\t\t\n\t System.out.println(banco1.tasaInteres());\n\t \n\t System.out.println(banco1.tasaInteresDolar());\n\n\t}", "public Celda(int x, int y) {\n this.x=x;\n this.y=y;\n this.tipo=CAMINO;\n this.celdaSelec =false;\n\n indexSprite = 0; //indice que corresponde a una subimagen de frente\n\n try {\n jugador = ImageIO.read(new File(\"images/jugador.png\"));\n obstaculo = ImageIO.read(new File(\"images/obstaculo.png\"));\n obstaculo20 = ImageIO.read(new File(\"images/obstaculo-2.png\"));\n obstaculo21 = ImageIO.read(new File(\"images/obstaculo-3.png\"));\n obstaculo22 = ImageIO.read(new File(\"images/obstaculo-4.png\"));\n obstaculo23 = ImageIO.read(new File(\"images/obstaculo-5.png\"));\n obstaculo24 = ImageIO.read(new File(\"images/obstaculo-6.png\"));\n obstaculo25 = ImageIO.read(new File(\"images/obstaculo-7.png\"));\n adversario = ImageIO.read(new File(\"images/adversario.png\"));\n recompensa = ImageIO.read(new File(\"images/recompensa.png\"));\n casa = ImageIO.read(new File(\"images/casa.png\"));\n\n imagenSprites = ImageIO.read(new File(\"images/sprite_jugador.png\"));\n imagenSpritesAdversario = ImageIO.read(new File(\"images/sprite_adversario.png\"));\n //creo una array de 4 x 1\n sprites = new BufferedImage[4 * 1];\n spritesAdversario = new BufferedImage[4 * 1];\n //lo recorro separando las imagenes\n for (int i = 0; i < 1; i++) {\n for (int j = 0; j < 4; j++) {\n sprites[(i * 4) + j] = imagenSprites.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA,PIXEL_CELDA, PIXEL_CELDA);\n spritesAdversario[(i * 4) + j] = imagenSpritesAdversario.getSubimage(i * PIXEL_CELDA, j * PIXEL_CELDA, PIXEL_CELDA, PIXEL_CELDA);\n }\n }\n //adversario = spritesAdversario[indexSprite];\n } catch (IOException error) {\n System.out.println(\"Error: \" + error.toString());\n }\n }", "public Jogador getJogador1() {\r\n return jogador1;\r\n }", "VentanaPrincipal(InterfazGestorFF principal, InterfazEsquema estructura) {\n initComponents();\n setTitle(BufferDeRegistro.titulo);\n this.principal=principal;\n this.estructura=estructura;\n cargar_campos(); \n cargar_menu_listados();\n \n botones=new javax.swing.JButton[]{\n jBAbrirSGFF,jBActualizarRegistro,jBAyuda,jBBorrarRegistro,\n jBComenzarConsulta,jBGuardarSGFF,jBGuardarSGFF,jBImportarSGFF,\n jBInsertarRegistro,jBIrAlHV,jBIrAlHijo,\n jBIrAlPV,jBIrAlPadre,jBNuevaFicha,jBRegistroAnterior,jBRegistroSiguiente,jBSSGFF,jBCaracteres, jBAccInv, jBListar\n };\n combos=new javax.swing.JComboBox[]{\n jCBArchivos, jCBHijos, jCBPadresV, jCBHijosV\n };\n abrir(false);//Pongo en orden la barra de herramientas\n \n }", "public MainMultiEmpresa(String arch1, String arch2)\n {\n prop1 = arch1;\n prop2 = arch2;\n if (readFileProperties() && readFilePasswordProperties())\n {\n JFrame frame = new FrmMultiEmpresa();\n frame.setVisible(true);\n }\n }", "public static void main(String[] args) {\n\t\tJugador j1 = new Jugador(\"Jugador 1\", \"Venom\");\n\t\tJugador j2 = new Jugador(\"Jugador 2\", \"Carnage\");\n\t\tPelea pelea = new Pelea();\n\t\tpelea.imprimeAvancePelea(j1, j2);\n\t\tpelea.ataque(j1, j2);\n\t\tpelea.ataque(j2, j1);\n\t\tpelea.ataque(j1, j2);\n\t\tpelea.imprimeAvancePelea(j1, j2);\n\t}", "public Componente(Image image, Componente entrada1, Componente entrada2,String name) {\n Image = image;\n Entrada1=entrada1;\n Entrada2=entrada2;\n Name=name;\n Output=2;\n ID=IDt;\n IDt++;\n input=false;\n input1=2;\n input2=2;\n }", "public Jogador(int nLinhas, int nCols, List<Par<Integer,Integer>> obstaculos) {\n\t\tthis.ambiente = new Ambiente(nLinhas, nCols, obstaculos);\n\t\tthis.pontuacao = 0;\n\t}", "public Plateau(int largeur, int hauteur) {\r\n\t\tplateau = new Cellule[hauteur][largeur];\r\n\t\tint equipe = 1;\r\n\t\tfor (int i=0; i<hauteur; i++) {\r\n\t\t\tfor (int j=0; j<largeur; j++) {\r\n\t\t\t\tif ((i == 0 && j == 0) || (i == hauteur-1 && j == largeur -1))\r\n\t\t\t\t\tplateau[i][j] = new Base(j,i,equipe++);\r\n\t\t\t\telse\r\n\t\t\t\t\tplateau[i][j] = new Case(j,i);\r\n\t\t\t}\r\n\t\t}\r\n\t\tthis.hauteur = hauteur;\r\n\t\tthis.largeur = largeur;\r\n\t}", "public FuncionMultiplicacion(String operador, int hijos) {\n super(operador, hijos);\n }", "public JuegoUI(ScrabbleJugador jugador, ScrabbleServidorInt servidor) throws IOException {\n\t\tthis.jugador = jugador;\n\t\tthis.servidor = servidor;\n // this.Palabra = Palabra;\n \n\t\ttry {\n\t\t\tmarcoJuego.setTitle(\"Scrabble: \" + jugador.getNombre());\n\t\t} catch (RemoteException e) {\n\t\t\t// TODO Bloque de captura generado automáticamente\n\t\t\te.printStackTrace();\n\t\t}\n\t\tField.setLayout(new GridLayout(20, 20, 0, 0));\n\t\tField.setBounds(20, 20, 20 * 30, 20 * 30);\n\t\tField.setOpaque(false);\n\t\tmarcoJuego.setSize(20 + 20 * 30 + 320, 20 + 20 * 30 + 40);\n\t\tmarcoJuego.setLayout(null);\n\t\t\n\t\testablecerBotonEnCuadrícula(Field);\n\t\testablecerBarraLetras(marcoJuego);\n\t\tsetBotonBorrar(marcoJuego);\n\t\tsetBotonConfirmacion(marcoJuego);\n\t\tsetBotonPaso(marcoJuego);\n\t\tsetBotonSalir(marcoJuego);\n\t\taddIntroduccion(marcoJuego);\n\t\taddAreaVotacionLabel(marcoJuego);\n\t\taddAreaVotacionLabel(marcoJuego);\n\t\taddAreaVotacion(marcoJuego);\n\t\t\n\t\tmarcoJuego.add(Field);\n\t\tmarcoJuego.setLocationRelativeTo(null);\n\t\tmarcoJuego.setVisible(true);\n\t\tmarcoJuego.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n\t\tmarcoJuego.addWindowListener(new java.awt.event.WindowAdapter() {\n\t\t @Override\n\t\t public void windowClosing(java.awt.event.WindowEvent windowEvent) {\n\t\t if (JOptionPane.showConfirmDialog(marcoJuego, \"¿Estás seguro de que quieres cerrar esta ventana?\", \"¿Cerrar ventana?\", \n\t\t JOptionPane.YES_NO_OPTION,\n\t\t JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION){\n\t\t \tSystem.exit(0);\n\t\t }\n\t\t }\n\t\t});\n\t}", "public static void main(String[] args) {\n Animal a1 = new Animal();\n \n //objeto animal parametrizado\n Animal a2 = new Animal(LocalDate.of(2020, 6, 4), \"Saphi\", Animal.Tipo.GATO, 400, Animal.Estado.DURMIENDO);\n \n //imprimir a1 y a2\n System.out.println(\"Animal a1:\\n \" + a1.toString());\n System.out.println(\"Animal a2:\\n \" + a2.toString());\n \n \n //clonar a2 en a3\n Animal a3 = Animal.clonar(a2);\n System.out.println(\"Animal a3:\\n\" + a3.toString());\n \n //contador de instancias\n System.out.println(\"N de instancias: \" + Animal.getContadorInstancias());\n \n //creacion de dos personas\n Persona p1 = new Persona(\"Juan\", 33);\n Persona p2 = new Persona(\"Alba\", 21);\n \n //p1 despierta a los animales\n p1.llamar(a1);\n p1.llamar(a2);\n p1.llamar(a3);\n\n //p2 juega con a2 12m min\n p2.jugar(a2, 120);\n System.out.println(\"Peso de a2 despues de jugar con p2: \" + a2.getGramos());\n \n \n //p1 alimenta a a1 1000 gramos, nuevo peso\n p1.alimentar(a1, 1000);\n System.out.println(\"Peso de a1 despues de comer: \" + a1.getGramos());\n \n //FALTA CONTROLAR EXCEPCION\n \n //p1 juega con a1 200 min, nuevo peso\n// p1.jugar(a1, 200);\n// System.out.println(\"El animal a1 pesa \" + a1.getGramos() + \" después de jugar\");\n \n \n }", "public void init() {\n setSize(466, 700); // Hago el applet de un tamaño 900, 500\n bAvanzaBloque = false;\n iNumBloques = 54; // Cantidad exacta para que se forme la figura\n iVidas = 3; // El jugador tendra 3 oportunidades\n iScore = 0; // El score empieza en 0\n iNivel = 1; // Empezara en el 1er nivel\n // La direccion que nos interesa es: false: Abajo true: Arriba.\n bDireccionY = false;\n // La direccion que nos interesa es: false: Izq. true: Dererecha\n bDireccionX = true;\n\n // El juego empieza pausado\n bPausado = true;\n // El juego no empieza hasta que el usuario lo desee\n bEmpieza = false;\n // El jugador no ha perdido\n bPerdio = false;\n\n // se obtiene la imagen para la barra\n URL urlImagenBarra = this.getClass().getResource(\"remolqueBB.png\");\n // se crea la barra tipo Objeto\n objBarra = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenBarra));\n // se posiciona la barra centrada en la parte de abajo\n objBarra.setX((getWidth() / 2) - (objBarra.getAncho() / 2));\n objBarra.setY(getHeight() - objBarra.getAlto());\n // se le asigna una velocidad de 9\n objBarra.setVelocidad(20);\n\n // se carga la imagen para el proyectil\n URL urlImagenProyectil\n = this.getClass().getResource(\"cristalAzulBB2.png\");\n // se crea al objeto Proyectil de la clase objeto\n objProyectil = new Objeto(0, 0,\n Toolkit.getDefaultToolkit().getImage(urlImagenProyectil));\n // se posiciona el proyectil en el centro arriba de barra\n objProyectil.setX((getWidth() / 2) - (objProyectil.getAncho() / 2));\n objProyectil.setY(objBarra.getY() - objProyectil.getAlto());\n // se le asigna una velocidad de 5\n objProyectil.setVelocidad(5);\n\n // se crea la lista de bloques a destruir\n lnkBloques = new LinkedList();\n // se llena y acomoda la lista de bloques\n try {\n acomodaBloques();\n } catch (IOException ioeError) {\n System.out.println(\"Hubo un error al cargar el juego: \"\n + ioeError.toString());\n }\n\n // se crea el sonido para el choque de con la barra\n socSonidoChoqueBarra = new SoundClip(\"ChoqueBarra.wav\");\n\n // se crea el sonido para el choque con los bloques\n socSonidoChoqueBloque = new SoundClip(\"ChoqueBloque.wav\");\n\n /* se le añade la opcion al applet de ser escuchado por los eventos\n /* del teclado */\n addKeyListener(this);\n }", "public Joueur(String nomJoueur){\n\t\tthis.nom= nomJoueur;\n\t\tthis.cartesEnMain=new Main();\n\t\tthis.pileCartes=new Pile();\n\t\tthis.estDansPartie = true;\n\t\tthis.estDansBataille = true;\n\t}", "public void abrir(String name, String rfc, Double sueldo, Double aguinaldo2,// Ya esta hecho es el vizualizador\r\n\t\t\tDouble primav2, Double myH2, Double gF, Double sGMM2, Double hip, Double donat, Double subR,\r\n\t\t\tDouble transp, String NivelE, Double colegiatura2) {\r\n\t\tthis.nombre=name;//\r\n\t\tthis.RFC=rfc;//\r\n\t\tthis.SueldoM=sueldo;//\r\n\t\tthis.Aguinaldo=aguinaldo2;//\r\n\t\tthis.PrimaV=primav2;//\r\n\t\tthis.MyH=myH2;//\r\n\t\tthis.GatsosFun=gF;//\r\n\t\tthis.SGMM=sGMM2;//\r\n\t\tthis.Hipotecarios=hip;//\r\n\t\tthis.Donativos=donat;//\r\n\t\tthis.SubRetiro=subR;//\r\n\t\tthis.TransporteE=transp;//\r\n\t\tthis.NivelE=NivelE;//\r\n\t\tthis.Colegiatura=colegiatura2;//\r\n\t\t\r\n\t\tthis.calculo(this.nombre, this.RFC, this.SueldoM, this.Aguinaldo, this.PrimaV,this.MyH,this.GatsosFun,\r\n\t\t\t\tthis.SGMM,this.Hipotecarios,this.Donativos,this.SubRetiro,this.TransporteE,this.NivelE,this.Colegiatura);\r\n\t\t\r\n\t\tpr.Imprimir(this.nombre, this.RFC, this.SueldoM,this.IngresoA,this.Aguinaldo,this.PrimaV,this.MyH,this.GatsosFun,this.SGMM,this.Hipotecarios,this.Donativos,this.SubRetiro,this.TransporteE,this.NivelE,this.Colegiatura,this.AguinaldoE,this.AguinaldoG,this.PrimaVE,this.PrimaVG,this.TotalIngresosG,this.MaxDedColeg,this.TotalDedNoRetiro,this.DedPerm,this.MontoISR,this.CuotaFija,this.PorcExced,this.PagoEx,this.Total);\r\n\t\t\r\n\t}", "public bebedor(String nombre)\n {\n // initialise instance variables\n this.nombre = nombre;\n alcoholimetro = 0;\n }", "public Bombas(int x,int y) {\n \tsuper(x,y);\n }", "private void setupEscenario3( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,3,7,9\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"2,4,6,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"5\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "public Jugador getJugador1() {\n\t\treturn jugador1;\n\t}", "public Individuo Recombinar(Individuo padre, Individuo madre) {\n Individuo hijo = new Individuo(padre.getCAMINOS());\r\n Individuo hijo2 = new Individuo(madre.getCAMINOS());\r\n for (int i = 0; i < padre.getEntradas_individuo().size(); i++) {\r\n if (i < padre.getCAMINOS() / 2) {\r\n Entradas entrada_1 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_1.setValores((ArrayList<Integer>) padre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_1.setEntradas((ArrayList<String>) padre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_1.setCamino_cubierto(padre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n Entradas entrada_2 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_2.setValores((ArrayList<Integer>) madre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_2.setEntradas((ArrayList<String>) madre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_2.setCamino_cubierto(madre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n hijo.getEntradas_individuo().add(entrada_1); \r\n hijo2.getEntradas_individuo().add(entrada_2);\r\n } else {\r\n Entradas entrada_1 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_1.setValores((ArrayList<Integer>) madre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_1.setEntradas((ArrayList<String>) madre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_1.setCamino_cubierto(madre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n Entradas entrada_2 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_2.setValores((ArrayList<Integer>) padre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_2.setEntradas((ArrayList<String>) padre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_2.setCamino_cubierto(padre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n hijo.getEntradas_individuo().add(entrada_1); \r\n hijo2.getEntradas_individuo().add(entrada_2);\r\n }\r\n }\r\n hijo.caminos_posibles = padre.caminos_posibles;\r\n hijo.caminos_cubiertos = padre.caminos_cubiertos;\r\n hijo2.caminos_posibles = madre.caminos_posibles;\r\n hijo2.caminos_cubiertos = madre.caminos_cubiertos;\r\n Document doc_copy_1 = (Document) this.doc.cloneNode(true);\r\n Document doc_copy_2 = (Document) this.doc.cloneNode(true);\r\n //Mutar(hijo);\r\n //Mutar(hijo2);\r\n hijo.EvaluarIndividuo(doc_copy_1);\r\n hijo2.EvaluarIndividuo(doc_copy_2);\r\n individuos.add(hijo);\r\n individuos.add(hijo2);\r\n if(hijo.getEvaluacion() > hijo2.getEvaluacion())\r\n {\r\n return hijo;\r\n }\r\n else\r\n {\r\n return hijo2;\r\n }\r\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "public Alojamiento() {\r\n\t}", "public Tequisquiapan()\n {\n nivel = new Counter(\"Barrio Tequisquiapan: \");\n \n nivel.setValue(5);\n hombre.escenario=5;\n\n casa5.creaCasa(4);\n addObject(casa5, 2, 3);\n \n arbol2.creaArbol(2);\n addObject(arbol2, 20, 3);\n arbol3.creaArbol(3);\n addObject(arbol3, 20, 16); \n \n addObject(letrero5, 15, 8);\n\n addObject(hombre, 11, 1);\n \n arbol4.creaArbol(4);\n addObject(arbol4, 20, 20);\n arbol5.creaArbol(5);\n addObject(arbol5, 3, 17);\n \n fuente2.creaAfuera(6);\n addObject(fuente2, 11, 19);\n \n lampara1.creaAfuera(2);\n addObject(lampara1, 8, 14);\n lampara2.creaAfuera(1);\n addObject(lampara2, 8, 7);\n \n addObject(nivel, 5, 0);\n addObject(atras, 20, 2); \n }", "public Proion(String x,String y)\n {\n perigrafh=y;\n katasthma=x;\n }", "public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }" ]
[ "0.76471144", "0.7186292", "0.6670487", "0.642396", "0.6382762", "0.636958", "0.6339476", "0.62204254", "0.5981113", "0.5977977", "0.5962522", "0.59591734", "0.59472245", "0.59300536", "0.59228164", "0.58865875", "0.585599", "0.58550704", "0.5852841", "0.5850001", "0.58449906", "0.58297", "0.58208436", "0.58158225", "0.58052105", "0.5750919", "0.57487136", "0.57439744", "0.57328653", "0.57322013", "0.57287776", "0.56907743", "0.56809384", "0.5664878", "0.5658642", "0.5629611", "0.5628117", "0.56257737", "0.56118405", "0.5603752", "0.56034136", "0.56026137", "0.5596325", "0.55720836", "0.5551369", "0.5550306", "0.5545701", "0.55418026", "0.55083007", "0.5505678", "0.5504624", "0.54970455", "0.5494633", "0.5483457", "0.5482062", "0.5478257", "0.5476784", "0.547647", "0.5466953", "0.5466759", "0.5464172", "0.5457791", "0.5453925", "0.54413825", "0.5436047", "0.5424965", "0.5415532", "0.54146546", "0.5410381", "0.54079825", "0.5407532", "0.5404321", "0.53956616", "0.5384859", "0.53791285", "0.5377458", "0.53670925", "0.53658676", "0.5363254", "0.53628266", "0.5362112", "0.5361287", "0.53603524", "0.5353708", "0.5351581", "0.5350334", "0.53391695", "0.5332476", "0.53317857", "0.53312725", "0.53305274", "0.5324276", "0.53201896", "0.5316961", "0.53106207", "0.5296791", "0.5294998", "0.52945143", "0.52942777", "0.5272225" ]
0.7357558
1
Lee el jugador1 de la partida
public Jugador getJugador1() { return jugador1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setJugador1(Jugador jugador1) {\n\t\tthis.jugador1 = jugador1;\n\t}", "public Jugador obtenerJugador();", "Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) {\n\t\tthis.jugador1 = jugador1;\n\t\tthis.jugador2 = jugador2;\n\t\tthis.baraja = baraja;\n\t}", "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public void setJoueur1(String joueur1) {\r\n\t\tthis.joueur1 = joueur1;\r\n\t}", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "private static void tourJeu(){\n\n\t\twhile(true){\n\t\t\tconsole.afficherEtatJoueurs();\n\t\t\tpasserTour();\n\t\t\tconsole.quelJoueurJoue(tour);\n\t\t\tconsole.afficherJeu();\n\t\t\tconsole.afficherDirectionAssam();\n\n\t\t\tint n;\n\t\t\twhile ((n = console.demanderNbDeplacement()) == -1 );\n\n\t\t\tconsole.afficherDirectionChoisie(n);\n\t\t\tdemanderDeplacerAssam(n);\n\n\n\t\t\tif(joueurElimine == jeu.getJoueurs().length-1){\n\t\t\t\tpasserTour();\n\t\t\t\tconsole.afficherGagnant(tour);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(verifTapis()){\n\t\t\t\tstatistique();\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}", "Jugador consultarGanador();", "public Jugador jugador() {\r\n\treturn jugador;\r\n }", "public Juego(String nombreJ1, String nombreJ2){\r\n\t\tMINATR = 3;\r\n\t\tMAXATR = 6;\r\n\t\tjugador1 = new Jugador(nombreJ1);\r\n\t\tjugador2 = new Jugador(nombreJ2);\r\n\t\tjugadorEnTurno = jugador1;\r\n\t}", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public Jogador getJogador1() {\r\n return jogador1;\r\n }", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "public void setJugador2(Jugador jugador2) {\n\t\tthis.jugador2 = jugador2;\n\t}", "public Jugador ganador(){\n return partida.ganador();\n }", "public static void main(String[] args) \n {\n Equipo Boca = new Equipo(2);\n \n //Crear objeto jugador, pasando por parametro sus atributos\n Jugador j1 = new Jugador(\"Andrada\", 1, 1, 20, 100);\n Jugador j2 = new Jugador(\"Salvio\", 4, 7, 20, 100);\n \n // cargar objeto Equipo\n Boca.agregarJugador(j1);\n Boca.agregarJugador(j2);\n \n //Mostrar objeto Equipo\n System.out.println(Boca.listarJugador());\n \n \n \n //Cantidad de jugadores con menos de 10 partidos jugados.\n System.out.print(\"Cantidad de Jugadores con menos de 10 partidos jugados: \");\n System.out.println(Boca.cantidadJugadores());\n \n \n //Nombre del jugador con mayor cantidad de partidos jugados.\n System.out.print(\"Nombre del jugador con mas partidos jugados: \");\n System.out.println(Boca.jugadorMasPartidos());\n \n \n\n //Promedio de estado físico de todo el equipo.\n \n System.out.print(\"Promedio de estado fisico del equipo:\");\n System.out.println(Boca.promedioEstadoFisicoEquipo() + \"%\");\n \n\n //Estado físico de un jugador particular identificado por número de camiseta. \n \n System.out.print(\"Estado fisico de un juegador dado su numero de camiseta: \");\n System.out.println(Boca.estadoFisicoJugador(7) +\"%\");\n \n //Promedio de partidos jugados de los jugadores de cada posición (4resultados).\n \n System.out.println(\"Promedio de partidos jugados de los jugadores de cada posición:\");\n System.out.println(Boca.promedioPartidosJugadosporPuesto());\n \n \n \n \n }", "private Jugador oponente(Jugador jugador,Jugador[] jugadores){\r\n for (Jugador jugador1 : jugadores) {\r\n if (jugador1!=jugador){\r\n return jugador1;\r\n }\r\n }\r\n return null;\r\n }", "public Jogador jogadorDaVez() {\r\n Jogador jogadorvez = null;\r\n \r\n if (this.vezDoJogador1 ){\r\n jogadorvez = jogador1; \r\n }else{\r\n jogadorvez = jogador2;\r\n }\r\n return jogadorvez;\r\n }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public List<Partida> getNextPartida(String partidaId,String jugadorId){\n String consulta = \"SELECT p FROM Partida p WHERE p.id > \" + partidaId + \" AND p.jugador1.id = \"+ \"'\" + jugadorId +\"' OR p.jugador2 = \"+ \"'\" + jugadorId+\"' ORDER BY p.id ASC\";\n\n List<Partida> partida = em.createQuery(consulta, Partida.class).getResultList();\n\n return partida;\n }", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "public Jugador getJugador2() {\n\t\treturn jugador2;\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public static void passerTour(){\n\t\tif(tour<jeu.getJoueurs().length){\n\t\t\ttour++;\n\t\t}\n\t\telse {\n\t\t\ttour = 1;\n\t\t}\n\t\tfor(int i=0;i<joueurElimine;i++){\n\t\t\tif(jeu.getJoueurs()[tour-1].getMonnaie()==0){\n\t\t\t\tif(tour<jeu.getJoueurs().length){\n\t\t\t\t\ttour++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttour = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void testCasillasJugador1( )\n {\n setupEscenario1( );\n int tamanho = casillasJugador1.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador1.get( i ) ).intValue( );\n assertEquals( marcaJugador1, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public void golpearJugador(Jugador j) {\n\t\t\n\t}", "public void changerJoueur() {\r\n\t\t\r\n\t}", "public void lancerJeu () {\n switch (choixModeJeu) {\n case \"C\":\n Jeu jeuJoueC = new JeuChallenger(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueC.unJeu();\n break;\n case \"U\":\n Jeu jeuJoueU = new JeuDuel(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueU.unJeu();\n break;\n case \"D\":\n Jeu jeuJoueD = new JeuDefenseur(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueD.unJeu();\n break;\n default:\n LOG.error(\"Cas du choix du mode de jeu non géré\");\n break;\n }\n }", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "private void iniciarRondaJuego() {\n\n\t\tthis.mostrarMensaje(\"bloqueando al servidor para despertar al jugador 1\");\n\t\tbloqueoJuego.lock();\n\n\t\t// despertar al jugador 1 porque es su turno\n\t\ttry {\n\t\t\tthis.mostrarMensaje(\"Despertando al jugador 1 para que inicie el juego\");\n\t\t\tjugadores[0].setSuspendido(false);\n\t\t\tjugadores[1].setSuspendido(false);\n\t\t\tesperarInicio.signalAll();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tthis.mostrarMensaje(\"Desbloqueando al servidor luego de despertar al jugador 1 para que inicie el juego\");\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\t}", "public void modificarPlayer1(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador1=p;\n }\n }", "public JogoVelha(Jogador jogador1, Jogador jogador2) {\r\n // recebe os jogadores\r\n this.jogador1 = jogador1;\r\n this.jogador2 = jogador2;\r\n this.sncpu = false;\r\n \r\n }", "public void repartirGananciasDealer() {\n\t\t if(contieneJugador(ganador,\"dealer\")) {\n\t\t\t if(verificarJugadaBJ(manosJugadores.get(3))) {\n\t\t\t\t System.out.println(\"Pareja nombre agregado dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores() + 15;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\", cantidadGanancia));\n\t\t\t }else {\n\t\t\t\t System.out.println(\"Pareja nombre agregado --> dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores()+10;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t\t }\n\t\t }else {\n\t\t\t int cantidadGanancia = verificarCantidadGanadores();\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t }\n\t\t \n\t }", "public void jouer(Joueur joueur, int posX1, int posY1, int posX2, int posY2){\n\t\t\n\t\tcoefficientCombo = 1;\n\t\t\n\t\t\n\t\t\n\t\tif(joueur == joueurCourant){\t\t\t\t\t//On vérifie si c'est son tour de jouer\n\t\t\tif( verifVoisin(posX1, posY1, posX2, posY2)){\t\t\t\t//On vérifie si les cristaux joués sont voisins\n\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\t\t\t\t//On switch les cristaux dans le tableau \n\t\t\t\tArrayList<ArrayList<Integer>> tabs = chercheBlock(posX1, posY1);\t//On cherche si des blocks de cristaux de même couleur ont été formés et on stocks leurs coordonnées dans tab\n\t\t\t\tArrayList<ArrayList<Integer>> tabs2 = chercheBlock(posX2, posY2);\n\t\t\t\t\n\t\t\t\t/*for (ArrayList<Integer> arrayList : tabs) { //Affichage des coordonnées stockées dans tab\n\t\t\t\t\tfor(Integer i : arrayList){\n\t\t\t\t\t\tSystem.out.print(i);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tfaireLeMenage(tabs2);\n\t\t\t\tfaireLeMenage(tabs);\t\t//On \"supprime\" les cristaux listés dans tab\n\t\t\t\trestructurer();\t\t\t\t//On réagence le tableau en supprimant les cases vides, les cristaux au dessus glissent vers le bas, les cases hautes laissées vides sont remplies aléatoirement\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//trouverCombo();\n\t\t\t\t\n\t\t\t\tif(tabs.size() == 0 && tabs2.size()==0)\t\t//Aucun block n'a été renvoyé\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"reswitch\");\n\t\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Ces deux cristaux ne sont pas voisins\");\n\t\t\t}\n\t\t\t\t\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Ce n'est pas à \" + joueur.getNom() + \" de jouer...\");\n\t\t\tSystem.out.println(\"C'est au tour de \" + joueurCourant.getNom() + \" de jouer...\");\n\t\t}\n\t\t\n\t}", "public void asignarPersona(Jugador j){\r\n this.jugador = j;\r\n }", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "public Joueur(String nomJoueur){\n\t\tthis.nom= nomJoueur;\n\t\tthis.cartesEnMain=new Main();\n\t\tthis.pileCartes=new Pile();\n\t\tthis.estDansPartie = true;\n\t\tthis.estDansBataille = true;\n\t}", "private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}", "public Jugador(String nombreJugador)\n {\n this.nombreJugador = nombreJugador;\n cartasQueTieneEnLaMano = new Carta[5];\n numeroCartasEnLaMano = 0;\n }", "protected static Object DesarrolloJugada(Duelo juego, PlayView view, Sansano jugador, Sansano jugador2){\n juego.advanceTurno();\n if(juego.getTurno() <= 60 && juego.getGanador().equals(\"\")) {\n\n if(juego.getTurno() % 2 == 0){\n view.setNombreJugador(jugador2.getName());\n }\n else{\n view.setNombreJugador(jugador.getName());\n }\n\n view.setNumeroTurno(String.valueOf(juego.getTurno()));\n JButton atacarButton = view.getAtacarButton();\n JButton defendermeButton = view.getDefendermeButton();\n\n view.setprioridadUsuario(String.valueOf(jugador.getPrioridad()));\n view.setprioridadEnemigo(String.valueOf(jugador2.getPrioridad()));\n Object carta;\n if(juego.getTurno() % 2 == 0 && Globales.getmodoJuego().equals(\"conunamigo\")){\n carta = jugador2.getCard();\n }\n else{\n carta = jugador.getCard();\n }\n view.setCartaActual(((Carta) carta).getNombre());\n view.setCardDescription(((Carta) carta).getDescripcion());\n if (carta instanceof Curso) {\n defendermeButton.setText(\"Defenderme\");\n atacarButton.setEnabled(true);\n defendermeButton.setEnabled(true);\n view.setValorAtaque(String.valueOf(((Curso) carta).getAtaque()));\n view.setValorDefensa(String.valueOf(((Curso) carta).getDefensa()));\n } else if (carta instanceof Profesor) {\n atacarButton.setEnabled(false);\n defendermeButton.setEnabled(true);\n defendermeButton.setText(\"Utilizar Carta\");\n\n view.setValorAtaque(String.valueOf(((Profesor) carta).getPuntosHabilidad()));\n view.setValorDefensa(\" \");\n } else if (carta instanceof Carrete) {\n atacarButton.setEnabled(false);\n defendermeButton.setEnabled(true);\n defendermeButton.setText(\"Utilizar Carta\");\n view.setValorDefensa(String.valueOf(((Carrete) carta).getPuntosHabilidad()));\n view.setValorAtaque(\" \");\n\n }\n\n if (jugador.getPrioridad() == 0) {\n juego.setGanador(jugador2.getName());\n view.setVisible(false);\n }\n if (jugador2.getPrioridad() == 0) {\n juego.setGanador(jugador.getName());\n view.setVisible(false);\n }\n return carta;\n }\n else {\n if (jugador.getPrioridad() > jugador2.getPrioridad()) {\n juego.setGanador(jugador.getName());\n view.setVisible(false);\n }\n else if(jugador.getPrioridad() < jugador2.getPrioridad()) {\n juego.setGanador(jugador2.getName());\n view.setVisible(false);\n }\n else {\n juego.setGanador(\"EMPATE\");\n view.setVisible(false);\n }\n return null;\n }\n }", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "public static void jugador(BufferedReader lee) throws IOException {\n ODB odb = ODBFactory.open(\"jugadores.db\");\n \n Jugador j = null;\n Pais p = null;\n IQuery query = null;\n \n System.out.println(\"Nombre\");\n String nombre = lee.readLine();\n nombre = nombre.substring(0, 1).toUpperCase() + nombre.substring(1).toLowerCase();\n \n System.out.println(\"Deporte\");\n String deporte = lee.readLine();\n \n System.out.println(\"Ciudad\");\n String ciudad = lee.readLine();\n \n System.out.println(\"Edad\");\n int edad = Integer.parseInt(lee.readLine());\n \n System.out.println(\"Pais\");\n String npais = lee.readLine();\n \n query = new CriteriaQuery(Pais.class, Where.equal(\"nombrepais\", npais));\n Objects<Pais> objects = odb.getObjects(query);\n \n if (objects.isEmpty()) {\n System.out.println(\"No existe el pais seleccionado\");\n \n System.out.println(\"ID\");\n int id = Integer.parseInt(lee.readLine());\n \n p = new Pais(id, npais);\n \n odb.store(p);\n } else {\n p = objects.getFirst();\n }\n \n j = new Jugador(nombre, deporte, ciudad, edad, p);\n \n odb.store(j);\n \n odb.close();\n }", "public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "public String retirarJugador(Jugador jugadorParaRetirar) {\n\n\t\tboolean retirado = false;\n\n\t\tfor (int i = 0; !retirado && i < this.jugadoresEnMesa.size(); i++) {\n\t\t\tif (this.jugadoresEnMesa.get(i).getId() == jugadorParaRetirar.getId()) {\n\n\t\t\t\tListaJugadores.jugadoresRetirados.add(jugadorParaRetirar);\n\n\t\t\t\tthis.jugadoresEnMesa.remove(i);\n\t\t\t\ti--;\n\t\t\t\tretirado = true;\n\n\t\t\t}\n\t\t}\n\n\t\tString mensajeRetirada;\n\t\tif (retirado) {\n\t\t\tmensajeRetirada = \"%s ha sido retirado.%s\";\n\t\t\tif (jugadorParaRetirar.getCredito() < 0)\n\t\t\t\tEasterEgg.huevoDePascua(jugadorParaRetirar.getNombre());\n\n\t\t\telse {\n\n\t\t\t\tif (jugadorParaRetirar.getCredito() == 0)\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Se le ha agotado el crédito.\");\n\n\t\t\t\telse if (jugadorParaRetirar.getCredito() >= jugadorParaRetirar.getCreditoObjetivo())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado su crédito objetivo\");\n\n\t\t\t\telse if (jugadorParaRetirar.getRondas() >= jugadorParaRetirar.getRondasMaximas())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado sus rondas máximas\");\n\n\t\t\t\telse\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(), \"\");\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tmensajeRetirada = \"No se ha podido retirar al jugador.\";\n\t\t}\n\n\t\treturn mensajeRetirada;\n\n\t}", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public static void EjecutaEjercicio1PD(String entrada) {\n\t\tEjercicio1.iniDatos(entrada);\n\t\t\n\t\t// Declarar vértice de inicio para el grafo:\n\t\tVerticeAlumno verticeInicial = VerticeAlumno.verticeInicial();\n\t\n\t\t// Inicializar el grafo virtual:\n\t\t/*\n\t\t * 2 vías:\n\t\t * \t· Con peso en el vértice.\n\t\t * \t· Con peso en las aristas. \n\t\t*/ \n\t\t\n\t\t// Inicializa un grafo virtual de tipo simpleVirtualGraph a partir del vértice inicial con peso:\n\t\tEGraph<VerticeAlumno, AristaAlumno> grafoVirtual = Graphs2.simpleVirtualGraph(verticeInicial, x -> x.getEdgeWeight());\t\n\t\t\n\t\t// Invocar el algoritmo de Programación Dinámica: \n\t\t/*\n\t\t * 2 vías: \n\t\t * · Expresando el vértice final de destino.\n\t\t * · Mediante un predicado objetivo.\n\t\t*/\n\t\tDynamicProgrammingReduction<VerticeAlumno, AristaAlumno> algoritmoPD = DPR.dynamicProgrammingReductionGoal(\n\t\t\t\t\t\tgrafoVirtual,\n\t\t\t\t\t\tVerticeAlumno.objetivo(),\n\t\t\t\t\t\tHeuristicaAlumno::heuristica,\n\t\t\t\t\t\tPDType.Max\n\t\t\t\t\t\t);\n\t\t\n\t\t// Proporciona un camino devuelto por PD desde el vértice inicial al objetivo:\n\t\tGraphPath<VerticeAlumno, AristaAlumno> caminoPD = algoritmoPD.search().get();\n\t\t\n\t\t// Solución: lista de aristas recorridos del grafo: \n\t\tList<AristaAlumno> aristas = caminoPD.getEdgeList();\n\t\tSystem.out.println(\"$$$$$$$$$$$$$$$$$ PROGRAMACIÓN DINÁMICA $$$$$$$$$$$$$$$$$$\");\n\t\tSolucion1.solucion(aristas, entrada);\n\t\t\n\t\t// DEBUG:\n\t\t/*\n\t\t * List<VerticeAlumno> vertices = caminoA.getVertexList();\n\t\t * System.out.println(vertices);\n\t\t*/\n\t\t\n\t}", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "@Override\n public void selectionnerJoueurs(EnsJoueurs joueursGagnantsPhase1) {\n this.participantsDeLaPhase = joueursGagnantsPhase1; // Joueurs actifs\n }", "public static void main(String[] args) {\n\n\t\tDepartamento dep40= new Departamento ( 40, \"Formacion\", null );\n\t\t\n\t\t\n\t\tEmpleado emp1 =new Empleado(1,\"paco\",\"perez\",\"h\", 5000, 28, 5, dep40) ;\n\t\t\n\t\t// para introducir el departaementp \n\t\t\n\t\t//primer metodo\n\t\t\n\t\t\n\t\t\t\t\n\t\tEmpleado emp2 =new Empleado(2,\"luis\",\"sanchez\",\"h\", 4000, 45, 2, dep40) ;\t\n\t\tEmpleado emp3 =new Empleado(4, \"javi\", \"perez\", \"h\", 8000, 54, 0.2, dep40);\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\tSystem.out.println(emp1);\n\t\tSystem.out.println(emp2);\t\n\t\tSystem.out.println(emp3);\n\t\t\n\t\tdep40.setJefe(emp1); // adjudico el Jefe al departamento 40\n\t\t\n\t\t\n\t\t// creo un departaemnto nuevo adjudicado a un empleado ade un departamento inicial ( no tienen por que ser el departamento del que ahora le reclama) usando el constructoe directamente ne vez de la variable que alude a la clase\n\t\t//departamento= new Departamento(120, \"formacion\", jefe)\n\t\tDepartamento dep120 = new Departamento (120, \"formacion\", new Empleado(5, \"luisa\", \"sanchez\", \"M\", 14000, 35, 2, dep40)); //he creado un empleado del depto 30 y luego le hago jefe del 120\n\t\t dep120.getJefe().setDepartamento(dep120); /* actuando con dos variables. como ese new empleado no tiene variable adjudicada \n\t\t *y tengo que hacer alusion a Úl para cambiaer en el empleado su departaemento , me valgo del un metodo dep120.getJefe()que averigua qcual es la direccion de ese empleado en la tabla departamento y con un set le ingerso el departaento nuievo\n\t\t \n\t\t \n\t\t */\n\t\t System.out.println (\"departaqmento 120\" + dep120.getJefe().getNombre());\n\t\t\n\t/* SALIDA POR CONSOLA :\n\t * el niombre del emp2, su salario y el nombre del departamento al que pertenence.\t// \n\t\t* como el nombre departamento no es un atributo normal sino que es NDE una clase relacionada .SE INVOCA AL GET DE LL ATRIBUTO INCLUIDO CONN LA CLASE Y TRAS EL LOS METODOS GET DE LA CLASE DEPARTAMENTO EN ESTE CLASO EL DEL CAMPO NOMBRE DEL DEPARTAMENTO\n\t*/\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre().toUpperCase());\n\t\t/*\n\t\t * el empleado \n\t\t * \n\t\t * */\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre());\n\tSystem.out.println(dep120);\n\t// OJO SE BUCLA POR QUE LOS TO STRING DE DEPARTAEMNTO Y CLIENTE SE CRIUZARIAN DEBORDANDO LA MEMORIA. PUEDO HACER VARIAS COSAS\n\t/* PUEDO QUITAR DEUNO DE LOS TO STRING DE UNA CLASE O DE LA OTRA SEGUN ME INTERESE EL CAMPO QUE LAS LIGA ( PEJ DEPARTAMENTO EN EMPLEADO)\n\t * PUEDO CREAR UN METODO QUE SALVE LA CONDICION DE NULL SI ALGUNA VARIABLE ESTA VACICA.\n\t * \n\t * \n\t */\n\t//SALIDA DEL NOMBRE DEL JEFE DEL DEAPARTAEMENTO QUE SEA POR EJEMPLO DE UN EMPLEADO ()\n\t\n\tSystem.out.println ( dep120.getJefe().getNombre()); //get jefe me dedevuelve el monbre de jefe dela tabala departaemnto. get Nombre me devuelve de la tabla empleados el nombre que estaba como jefe en departamento.\n\tSystem.out.println (\"el jefe de emp2 luis: \"+ emp2.getDepartamento().getJefe().getNombre());\n\tSystem.out.println(dep120);\n\t\n\t\n\t\n\t\n\t}", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "public FaseDescartes faseJuego();", "private void setupEscenario2( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,2,3,4\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"5,6,7,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"9\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "public static void main(String[] args) {\n //variable tipo local que recibe la opcion de nombre para el jugador\n int numeroDeOpcion;\n //acreditacion de los puntos iniciales\n puntosDeVida= 150*(nivel+1);\n puntosDeMana= 10*(nivel+1);\n //inicializacion del juego y preguntando si desea un nombre para el personaje\n \tSystem.out.println(\" ---->BIENVENIDO AL JUEGO<----\");\n \tSystem.out.println(\"\\nDesea ingresar un nombre a su personaje [S]si, [N]no\");\n \tScanner caracterNombre=new Scanner(System.in);\n \tString opcionTemp = caracterNombre.nextLine();\n \topcion = opcionTemp.charAt(0); //leyendo opcion\n \t//Ingresando un nombre por el jugador\n \tif(opcion=='s'||opcion=='S'){\n \t\tSystem.out.println(\"Ingrese el nombre:\");\n \t\tScanner cadenaNombre=new Scanner(System.in);\n \t\tnombrePersonaje=cadenaNombre.nextLine();\n \t}\n //Estableciendo nombre predeterminado por el juego\n else{\n \tnombrePersonaje=\"Jugador1\";\n \tSystem.out.printf(\"\\nSe le a asignado el personaje:\\t\"+nombrePersonaje); \n \t}\n do{\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n //Menu de opciones principales para el jugador\n System.out.println(\"\\n..MENU DE OPCIONES..\");\n System.out.println(\"1. A la carga.\"); //Inicia la battalla\n System.out.println(\"2.Tienda.\"); //Permite comprar articulos para la batalla\n System.out.println(\"3.zzZzzZzzZ(Dormir).\");//Permite recuperar al jugador a su estado inicial \n System.out.println(\"4.Status.\"); //Muestra las estadisticas del juego\n System.out.println(\"5.Mas Poder!!!.\"); //Para aumento de nivel del juego \n System.out.println(\"6.Salir.\"); //finaliza las acciones y sale del juego\n do{//validando el numero de opcion\n System.out.println(\"Ingrese el numero de opcion:\");\n numeroDeOpcion= scanner.nextInt();\n }\n while(numeroDeOpcion<1 || numeroDeOpcion>6);\n //comparando la opcion ingresada\n switch(numeroDeOpcion){\n //mostrando los casos existentes por comparar\n case 1:{\n do{\n batalla();//llamando a la funcion batalla\n //Validando la repeticion de la fuencion o su finalizacion\n System.out.println(\"\\nDesea otra Batalla? [S]i, [N]o\");\n Scanner caracterBatalla=new Scanner(System.in);\n String opcionTemp1 = caracterBatalla.nextLine();\n repetirOpcion = opcionTemp1.charAt(0);\n opcionMiedo=0; //reiniciando la opcion miedo\n } \n //condicion del bucle para la funcion batalla \n while(repetirOpcion=='s'||repetirOpcion=='S');\n break;\n }\n case 2:{\n do{\n tienda();//llamando a la funcion tienda\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea realizar otra compra? [S]i, [N]o\");\n Scanner caracterTienda=new Scanner(System.in);\n String opcionTemp2 = caracterTienda.nextLine();\n repetirOpcion2 = opcionTemp2.charAt(0);\n }\n //condicion de bucle para la funcion tienda\n while(repetirOpcion2=='s'||repetirOpcion2=='S');\n break;\n }\n case 3:{\n do{\n dormir();//llamando a la funcion dormir\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea volver a dormir? [S]i, [N]o\");\n Scanner caracterDormir=new Scanner(System.in);\n String opcionTemp3 = caracterDormir.nextLine();\n repetirOpcion3 = opcionTemp3.charAt(0);\n }\n //condicion de bucle para la funcion dormir \n while(repetirOpcion3=='s'||repetirOpcion3=='S');\n break;\n }\n case 4:{\n do{\n status();//llamando a la funcion status\n //validando su repeticion\n System.out.println(\"\\nMostrar nuevamente? [S]i, [N]o\");\n Scanner caracterStatus=new Scanner(System.in);\n String opcionTemp4 = caracterStatus.nextLine();\n repetirOpcion4 = opcionTemp4.charAt(0);\n }\n //condicion de bucle para la funcion status \n while(repetirOpcion4=='s'||repetirOpcion4=='S');\n break;\n }\n case 5:{\n do{\n poder();//llamando a la funcion poder\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea mas poder? [S]i, [N]o\");\n Scanner caracterPoder=new Scanner(System.in);\n String opcionTemp5 = caracterPoder.nextLine();\n repetirOpcion5 = opcionTemp5.charAt(0);\n }\n //condion de bucle para la funcion poder \n while(repetirOpcion5=='s'||repetirOpcion5=='S');\n break;\n }\n \tdefault:{\n System.exit(0);//saliendo del juego\n break;\n }\n }\n //validacion del retorno al menu principal\n System.out.println(\"volver al menu [S]si, [N]no?\");\n Scanner caracterVolver=new Scanner(System.in);\n String opcionTemp6 = caracterVolver.nextLine();\n opcionSalir=opcionTemp6.charAt(0);\n }\n //condicion del bucle para menu principal\n while(opcionSalir=='S'||opcionSalir=='s'); \n }", "public void lanzarJuegoPianino(View view){\n\n puntuacion=0;\n notasTocadas=0;\n mensaje.setText(R.string.repite);\n switch(pref.getString(\"dificultad\", \"1\")){\n case \"0\": nuevaSecuencia=generarSecuencia(4);\n nuevaSecuencia[3]=nuevaSecuencia[0];\n secuenciaJugador= new int[4];\n break;\n case \"1\": nuevaSecuencia=generarSecuencia(7);\n nuevaSecuencia[6]=nuevaSecuencia[0];\n secuenciaJugador= new int[7];\n break;\n case \"2\": nuevaSecuencia=generarSecuencia(10);\n secuenciaJugador= new int[10];\n break;\n default: nuevaSecuencia= new int[7];\n }\n\n reproducirSecuencia(nuevaSecuencia,false);\n\n }", "public Player getPlayer1(){\n return jugador1;\n }", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "public Joueur(String nom2, String prenom2, Date dateDeNaissance2, String motDePasse2, int numbreJ,\n\t\t\tint dernierNiveau2, LinkedList<PartieJeu> list) {\n\t\tnom = nom2;\n\t\tprenom = prenom2;\n\t\tdateDeNaissance = dateDeNaissance2;\n\t\tmotDePasse = motDePasse2;\n\t\tdernierNiveau = dernierNiveau2;\n\t\tnumerojouer = numbreJ;\n\t\tListPartie = list;\n\t}", "public static void establecerMano(Monton todas,Mano[] jugadores){\n int pos;\n Pieza pieza;\n for (int i = 0; i < jugadores.length; i++) {\n for (int j = 0; j < Ajustes.PIEZAS_MANO; j++) {\n if(todas.getNPiezasMonton()>0){\n pos=(int) (Math.random()*todas.getNPiezasMonton());\n pieza=todas.getUnaPieza(pos);\n jugadores[i].setUnaPieza(pieza);\n todas.eliminarPiezaMonton(pieza); \n }\n \n }\n }\n System.out.println(\"\\nCada jugador tiene \"+jugadores[0].getNPiezas()+\" piezas.\");\n if(todas.getNPiezasMonton()!=0)\n System.out.println(\"Y en el monton quedan \"+todas.getNPiezasMonton());\n else\n System.out.println(\"No quedan piezas en el monton\");\n }", "public String gIngresarMesa(int idMesa, int idJugador){\n PaquetePk pk = new PaquetePk(String.valueOf(idMesa) + \"-\" + String.valueOf(idJugador) , TipoPaquete.INGRESAR_A_MESA);\n return Parser.objectToString(pk);\n }", "public static void jogar(int numeroJogador) {\n\t\tint ponto = 0;\r\n\t\t\r\n\t\t//em quanto jogador nao fizer 5 pontos ele vai repetir o laço\r\n\t\twhile (ponto < 5) {\r\n\t\t\t//joga o dado1 e dao2 (gerando valor aleatorio de 1 a 6)\r\n\t\t\tint dado1 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\tint dado2 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\t//se o valor da soma do dado1 e dado2 for 7 ou 11, ele ganha 1 ponto\r\n\t\t\tif (((dado1 + dado2) == 7) || ((dado1 + dado2) == 11)) {\r\n\t\t\t\tponto++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"jogador \"+numeroJogador+\"º. Ponto = \"+ ponto);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//depois de fazer os 5 pontos, é verificado em que posição o jogador esta.\r\n\t\tif (posicao == 0) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Primeiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 5000,00\");\t\t\t\r\n\t\t} else if (posicao == 1) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Segundo jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 4000,00\");\t\t\t\r\n\t\t} else if (posicao == 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Terceiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 3000,00\");\t\t\t\r\n\t\t} else if (posicao > 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"jogador \" + numeroJogador + \"º esta em \" + posicao + \"º posicao. Não ganhou nada\");\r\n\t\t}\r\n\t}", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\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\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}", "public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}", "public Arquero(Jugador jugador){\n this.propietario = jugador;\n this.vida = 75;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "public FrmPartida(JugadorPartida jp){\n initComponents();\n PnlPartida.setVisible(false);\n jugadorPartida = jp;\n this.setTitle(\"Jugador: \" + jp.getJugador().getNombreUsuario() + \" - Esperando en Lobby...\"); \n controller = new PartidaController(this, jugadorPartida);\n lblNumeroJugadores.setText(\"Jugadores esperando: \" + jp.getPartida().getColJugadores().size()); \n btnTirarCarta.setEnabled(false);\n pozo = (jugadorPartida.getPartida().getValorApuesta() * 3);\n \n \n \n \n }", "public void actualizarPantallaJuego(float delta)\r\n {\r\n //recuadroInfoJuego.actualizarTiempo(delta); // Con esto actualizamos el tiempo del HUD\r\n\r\n // Con el siguiente ciclo actualizamos el movimiento o posicion de los monstruos\r\n for (int i=0; i < enemigos.size(); i++)\r\n {\r\n // Metodo encargado de renovar las posiciones dado un diferencial de tiempo\r\n enemigos.get(i).actualizarPosicion(delta);\r\n\r\n // En caso que el enemigo haya muerto entonces\r\n if (enemigos.get(i).haMuerto())\r\n {\r\n // Se lo pasamos al jugador contrario de modo que\r\n try\r\n {\r\n // Le enviamos un mensaje sobre que tipo de enemigo debe generar de manera aleatoria\r\n String aux = \"Transferir enemigo: \" + enemigos.get(i).getTipo() + \"\\n\";\r\n socketCliente.getOutputStream().write(aux.getBytes());\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n // Se suma su valor en puntaje al puntaje general obtenido por el usuario\r\n recuadroInfoJuego.agregarPuntaje(enemigos.get(i).getPuntaje());\r\n\r\n // Luego, se suma uno al numero total de enemigos eliminados por el jugador\r\n recuadroInfoJuego.anotarEnemigo();\r\n\r\n // Y se elimina el monstruo de la lista de enemigos\r\n enemigos.remove(i);\r\n i = i - 1;\r\n }\r\n }\r\n\r\n // Si ya se cumplio el tiempo para generar otro monstruo entonces\r\n if (contaTiempo >= tiempoParaGeneracion)\r\n {\r\n // Agregamos un nuevo enemigo aleatorio en coordenas generadas tambien de manera aleatoria\r\n enemigos.add(new Monstruo(MathUtils.random(0, MainGame.ANCHO_VIRTUAL), MathUtils.random(0, MainGame.ALTO_VIRTUAL), MathUtils.random(1,5), true));\r\n\r\n // Y reseteamos el contador de tiempo\r\n contaTiempo = 0;\r\n }\r\n\r\n // O si se detecto que me pasaron un monstruo entonces\r\n if (enemigoTransferido != -1)\r\n {\r\n // Genero el tipo de monstruo especificado en coordenadas aleatorias\r\n enemigos.add(new Monstruo(MathUtils.random(0, MainGame.ANCHO_VIRTUAL), MathUtils.random(0, MainGame.ALTO_VIRTUAL), enemigoTransferido, true));\r\n\r\n // Y reinicio el dectector de monstruos tranferidos\r\n enemigoTransferido = -1;\r\n }\r\n\r\n contaTiempo = contaTiempo + delta; // Por ultimo se cuenta el tiempo\r\n }", "public ListaJugadores recuperarJugadores() throws SQLException {\n ListaJugadores listaJugadores = null;\n try {\n getConexion();\n String consulta = \"SELECT nombre FROM JUGADORES\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n while (registros.next()) {\n String nombre = registros.getString(\"nombre\");\n Jugador jugador = new Jugador(nombre);\n listaJugadores.agregarJugador(jugador);\n }\n } finally {\n closeConexion();\n }\n return listaJugadores;\n }", "public void leerPacientes (int id_nutricionista);", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "public void demarrerPartie(long idPartie) {\n Partie p = daocrud.findOne(idPartie);\r\n\r\n // Erreur si pas au moins 2 joueurs dans la partie\r\n if (jService.recupererNbJoueursParPartieId(idPartie) < 2) {\r\n throw new RuntimeException(\"Erreur : nb joueurs moins 2\");\r\n }\r\n\r\n // passe le joueur d'ordre 1 à etat a la main\r\n jService.passeJoueurOrdre1EtatALaMain(idPartie);\r\n\r\n // distribue 7 cartes d'ingrédients au hasard à chaque joueur de la partie\r\n for (Joueur j : p.getJoueurs()) {\r\n\r\n cService.distribue7CartesParJoueurIdEtPartieId(j.getId(), idPartie);\r\n }\r\n\r\n }", "private static void eliminarJugador() {\n\t\ttry {\n\t\t\tSystem.out.println(jugadores.toString());\n\t\t\tjugadores.borrar(Teclado.leerCadena(\"Nombre:\"));//indica el nombre del jugador que se desea borrar\n\t\t} catch (JugadorNoExisteException | NombreNoValidoException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public int encerraPartidaComResultado(Integer idJogador) throws RemoteException;", "public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }", "public static void main(String[] args) {\n\t\tSecretario s1 = new Secretario(\"Mauro\", \"Pérez\", \"2168\", \"Calle Falsa\", 999, 500, true, \"Fax\");\n\t\tVendedor v1 = new Vendedor(\"Pepe\", \"Martinez\", \"2177\", \"Calle de atras\", 998, 750, 669, \"Alguna\", 0.10);\n\t\tVendedor v2 = new Vendedor(\"Antonio\", \"Martinez\", \"2144\", \"Calle de delante\", 996, 750, 669, \"Alguna\", 0.10);\n\t\tJefeZona j1 = new JefeZona(\"Manolo\", \"Ortega\", \"2155\", \"Una calle\", 997, 1000, true);\n\t\t\n\t\tClientes c1 = new Clientes(\"Cliente 1\");\n\t\tClientes c2 = new Clientes(\"Cliente 2\");\n\t\t\n\t\ts1.setSupervisor(v1);\n\t\t\n\t\tv1.agregarCliente(c1);\n\t\tv1.agregarCliente(c2);\n\t\tv1.eliminarCliente(c1);\n\t\t\n\t\tj1.agregarVendedor(v1);\n\t\tj1.agregarVendedor(v2);\n\t\t\n\t\tSystem.out.println(v1.toString());\n\t\tv1.incrementarSalario();\n\t\tSystem.out.println(v1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(s1.toString());\n\t\ts1.incrementarSalario();\n\t\tSystem.out.println(s1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(j1.toString());\n\t\tj1.incrementarSalario();\n\t\tSystem.out.println(j1.toString());\n\t}", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "public static void actualizarCreencias(int id) {\n\t\tint j =0;\t\t\n\t\t//Actualizamos las creecias del jugador \n\t\tint i =0;\n\t\tfor(j =0; j < GestorPartida.getContJugadores();j++) {\n\t\t\t\n\t\t\t\n\t\t\tif(GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t//Filtramos que los jugadores que vayan a actualizar sus creencias sean los de la sala del jugador que acaba de realizar una accion, excepto las suyas propias\t\t\t\n\t\t\t\tif(GestorPartida.getJugadores()[j].getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala()) && GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t\t//Actualizamos la sala por si el jugador se acaba de mover\n\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setSalaPersona(GestorPartida.getJugadores()[j].getSala(), i);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosJugador();j++) {\n\t\t\t//Comprobamos que el jugador coincida con un poseedor de un objeto\n\t\t\tif(GestorPartida.getObjetoJugador()[j].getJugador().getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoJugador()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoJugador()[j].getJugador().getNombre(), x);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosSala();j++) {\n\t\t\t//Comprobamos si hay objetos en la sala del jugador\n\t\t\tif(GestorPartida.getObjetoSala()[j].getSala().getNombre().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoSala()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoSala()[j].getSala().getNombre(), x);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public IJoueur quiEstMonMaitre();", "public void identificacion(){\n System.out.println(\"¡Bienvenido gamer!\\nSe te solcitaran algunos datos con el fin de personalizar tu experiencia :)\");\n System.out.println(\"Porfavor, ingresa tu nombre\");\n nombre = entrada.nextLine();\n System.out.println(\"Bien, ahora, ingresa tu gamertag\");\n gamertag = entrada.nextLine();\n System.out.println(\"Ese es un gran gamertag, ahora, diseña tu id, recuerda que tiene que ser un numero entero\");\n id = entrada.nextInt();\n //se le pide al usuario que elija la dificultad del juego, cada dificultad invocara a un metodo distinto\n System.out.println(\"Instrucciones:\\nTienes un numero limitado de intentos, tendras que encontrar las minas para asi desactivarlas\\n¿Quien no queria ser un Desactivador de minas de niño?\");\n System.out.println(\"Selecciona la dificultad\\n1. Facil\\n2. Intermedia\\n3 .Dificil\\n4. Imposible\");\n decision = entrada.nextInt();\n //creo el objeto que me llevara al juego, mandandolo con mis variables recopiladas\n Buscaminas dear = new Buscaminas(nombre, gamertag, id);\n if (decision==1){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Facil\");\n //vamos para el juego\n dear.juego();\n }else if(decision==2){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Intermedia\");\n dear.juego1();\n\n }else if(decision==3){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Dificil\");\n dear.juego2();\n\n }else if(decision==4){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Imposible\");\n dear.juego3();\n\n }\n\n\n\n }", "public static void main(String[] args) {\n\t\tint posIndi = 1;\n\t\tint posLara = 4;\n\n\t\t// Position de la bague\n\t\tint posBague = 7;\n\t\tboolean laraEstSurLaBague = false;\n\t\tboolean indiEstSurLaBague = false;\n\n\t\t// Position de la bombe, le joueur qui tombe sur cette case, voit sa partie\n\t\t// renitialisée\n\t\tint posBombe = 11;\n\n\t\t// Position du passage secret, si un joueur atteint cette case il est direct\n\t\t// propulsé à la case 14\n\t\tint posPassageSecret = 6;\n\n\t\t// Etat du jeu, vrai si personne n'a encore atteint le trésor\n\t\tboolean estEnCours = true;\n\n\t\t// Joueur Courant Indi --> 1 Lara --> 2\n\t\tint joueurCourant = 1;\n\n\t\tPlateauJeu jeu = new PlateauJeu();\n\t\tjeu.placerIndi(posIndi);\n\t\tjeu.placerLara(posLara);\n\t\tjeu.placerBague(posBague);\n\t\tjeu.placerPassage(posPassageSecret);\n\t\tjeu.placerBombe(posBombe);\n\n\t\t// Jeu\n\t\twhile (estEnCours) {\n\t\t\tif (joueurCourant == 1) {\n\t\t\t\tjeu.afficherInformation(\"Tour d'Indi!\");\n\t\t\t\tint de = jeu.lancerDe();\n\t\t\t\tposIndi += de;\n\t\t\t\tif (posIndi == posLara) {\n\t\t\t\t\tposIndi++;\n\t\t\t\t}\n\t\t\t\t// Si Indi est sur la case du passage, on supprime le passage et on empêche tout autre personne de marcher sur le passage\n\t\t\t\tif (posIndi == posPassageSecret) {\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Indi a pris le passage secret, il sera à la case 14, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tposIndi = 14;\n\t\t\t\t\tjeu.supprimerPassage();\n\t\t\t\t\tposPassageSecret = -1;\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Indi est sur la case de la bombe, on supprime la bombe et on empêche tout autre personne de marcher sur une bombe\n\t\t\t\tif (posIndi == posBombe) {\n\t\t\t\t\tjeu.supprimerIndi();\n\t\t\t\t\tposIndi = 1;\n\t\t\t\t\tjeu.placerIndi(posIndi);\n\t\t\t\t\tjeu.supprimerBombe();\n\t\t\t\t\tposBombe = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Indi a pris la bombe, sa partie est renitialisée, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Indi est sur la case de la bague, on supprime la bague et on empêche tout autre personne de marcher sur une bague\n\t\t\t\tif (posIndi == posBague) {\n\t\t\t\t\tindiEstSurLaBague = true;\n\t\t\t\t\tjeu.supprimerBague();\n\t\t\t\t\tjeu.placerIndi(posIndi);\n\t\t\t\t\tposBague = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Indi a pris la bague, il perd un tour, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tposIndi = (posIndi > 16) ? 16 : posIndi;\n\t\t\t\tjeu.deplacerIndi(posIndi);\n\t\t\t\t\n\t\t\t\t// Si Lara n'a pas marché sur la bague, le tour prochain est le sien\n\t\t\t\tif (!laraEstSurLaBague) {\n\t\t\t\t\tjoueurCourant = 2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Si Lara a marché sur la bague, elle perd un tour\n\t\t\t\tif (laraEstSurLaBague) {\n\t\t\t\t\tlaraEstSurLaBague = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tjeu.afficherInformation(\"Tour de Lara!\");\n\t\t\t\tint de = jeu.lancerDe();\n\t\t\t\tposLara += de;\n\t\t\t\tif (posLara == posIndi) {\n\t\t\t\t\tposLara++;\n\t\t\t\t}\n\t\t\t\t// Si Lara est sur la case du passage, on supprime le passage et on empêche tout autre personne de marcher sur le passage\n\t\t\t\tif (posLara == posPassageSecret) {\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Lara a pris le passage secret, elle sera à la case 14, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tposLara = 14;\n\t\t\t\t\tjeu.supprimerPassage();\n\t\t\t\t\tposPassageSecret = -1;\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Lara est sur la case de la bombe, on supprime la bombe et on empêche tout autre personne de marcher sur une bombe\n\t\t\t\tif (posLara == posBombe) {\n\t\t\t\t\tjeu.supprimerLara();\n\t\t\t\t\tposLara = 4;\n\t\t\t\t\tjeu.placerLara(posLara);\n\t\t\t\t\tjeu.supprimerBombe();\n\t\t\t\t\tposBombe = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Lara a pris la bombe, sa partie est renitialisée, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\t// Si Lara est sur la case de la bague, on supprime la bague et on empêche tout autre personne de marcher sur une bague\n\t\t\t\tif (posLara == posBague) {\n\t\t\t\t\tlaraEstSurLaBague = true;\n\t\t\t\t\tjeu.supprimerBague();\n\t\t\t\t\tjeu.placerLara(posLara);\n\t\t\t\t\tposBague = -1;\n\t\t\t\t\tjeu.afficherInformation(\n\t\t\t\t\t\t\t\"Lara a pris la bague, elle perd un tour, cliquez \\\"suivant\\\" pour continuer\");\n\t\t\t\t\tjeu.suivant();\n\t\t\t\t}\n\t\t\t\tposLara = (posLara > 16) ? 16 : posLara;\n\t\t\t\tjeu.deplacerLara(posLara);\n\t\t\t\t\n\t\t\t\t// Si Indi n'a pas marché sur la bague, le tour prochain est le sien\n\t\t\t\tif (!indiEstSurLaBague) {\n\t\t\t\t\tjoueurCourant = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Si Indi a marché sur la bague, il perd un tour\n\t\t\t\tif (indiEstSurLaBague) {\n\t\t\t\t\tindiEstSurLaBague = false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Condition de continuation du jeu\n\t\t\testEnCours = posLara < 16 && posIndi < 16;\n\t\t}\n\n\t\tif (posLara == 16) {\n\t\t\tjeu.afficherInformation(\"Lara a gagné! La partie est terminée\");\n\t\t} else {\n\t\t\tjeu.afficherInformation(\"Indi a gagné! La partie est terminée\");\n\t\t}\n\n\t}", "public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public String generaIDPortalEmpleo(EmpresaPorAutorizarVO vo){\n\t\tString idPortalEmpleo = \"\";\t\t\n\t\tint digitoVerificador = 1;\n\t\tFormat formatter = new SimpleDateFormat(\"yyMMdd\");\t\t\n\t\ttry {\n\t\t\tDomicilioVO domicilio = vo.getDomicilio();\n\t\t\tif(vo.getIdTipoPersona() == Constantes.TIPO_PERSONA.PERSONA_FISICA.getIdTipoPersona()){\n\t\t\t\t//Tipo de Persona Física\n\t\t\t\tif(vo.getApellido2().isEmpty()){\n\t\t\t\t\t//Primeras tres letras del apellido paterno\n\t\t\t\t\t//System.out.println(\"--original--strApellido1:\" + vo.getApellido1());\n\t\t\t\t\tString strApellido1 = convertAccents(vo.getApellido1());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido1:\" + strApellido1);\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido1.substring(0, 3);\t\n\t\t\t\t} else {\n\t\t\t\t\t//Primeras dos letras del apellido paterno\n\t\t\t\t\t//Primera letra del apellido materno\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"--original--strApellido1:\" + vo.getApellido1());\n\t\t\t\t\tString strApellido1 = convertAccents(vo.getApellido1());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido1:\" + strApellido1);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"--original--strApellido2:\" + vo.getApellido2());\n\t\t\t\t\tString strApellido2 = convertAccents(vo.getApellido2());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido2:\" + strApellido2);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido1.substring(0, 2);\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido2.substring(0, 1);\n\t\t\t\t}\n\t\t\t\t//Primera letra del nombre\n\t\t\t\t//System.out.println(\"--original--strNombre:\" + vo.getNombre());\n\t\t\t\tString strNombre = convertAccents(vo.getNombre());\n\t\t\t\t//System.out.println(\"--modificado--strNombre:\" + strNombre);\t\t\t\t\t\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + strNombre.substring(0, 1);\n\t\t\t\t//Fecha de nacimiento en formato yymmdd\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + formatter.format(vo.getFechaNacimiento());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//Tipo de Persona Moral\t\t\t\t\t\n\t\t\t\tString strRazonSocial = convertAccents(vo.getRazonSocial());\n\t\t\t\t//Primeras tres letras de razón social\n\t\t\t\t//COMENTAR EN PRODUCCION\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (strRazonSocial.length() < 3) \n\t\t\t\t\tstrRazonSocial = StringUtils.rightPad(strRazonSocial, 3, \"X\");\n\t\t\t\t/**/\t\t\n\t\t\t\t//TERMINA COMENTAR EN PRODUCCION\t\t\t\t\n\t\t\t\t//\n\t\t\t\t//System.out.println(\"--modificado--strRazonSocial:\" + strRazonSocial);\t\t\t\t\t\t\t\t\t\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + strRazonSocial.substring(0, 3);\t\n\t\t\t\t//Fecha de acta en formato yymmdd\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + formatter.format(vo.getFechaActa());\n\t\t\t}\n\t\t\tidPortalEmpleo = idPortalEmpleo + domicilio.getCodigoPostal();\t\t\t\n\t\t\t//Código verificador (1)\t\t\t\t\n\t\t\tEmpresaPorAutorizarDAO epaDAO = new EmpresaPorAutorizarDAO();\n\t\t\tdigitoVerificador = epaDAO.obtenerDigitoVerificador(idPortalEmpleo, vo.getIdTipoPersona());\t\n\t\t\t//rellenar\n\t\t\tint lenId = idPortalEmpleo.length();\n\t\t\t//System.out.println(\"------digitoVerificador:\" + digitoVerificador);\n\t\t\tint lenDigito = String.valueOf(digitoVerificador).length();\n\t\t\t//System.out.println(\"------lenDigito:\" + lenDigito);\n\t\t\tint intRelleno = PORTAL_ID_SIZE - (lenId + lenDigito);\n\t\t\t//System.out.println(\"------intRelleno:\" + intRelleno);\n\t\t\tString strRelleno = \"\";\n\t\t\tif(intRelleno>0){\n\t\t\t\tfor(int i=0; i<intRelleno; i++){\n\t\t\t\t\tstrRelleno = strRelleno + \"0\";\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t//System.out.println(\"------strRelleno:\" + strRelleno);\n\t\t\tidPortalEmpleo = idPortalEmpleo + strRelleno + digitoVerificador;\n\t\t\t//System.out.println(\"------idPortalEmpleo:\" + idPortalEmpleo);\n\t\t\n\t\t} catch (RuntimeException e) {\n\t\t\tlogger.error(e.toString());\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e.toString());\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.toString());\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t}\t\t\n\t\treturn idPortalEmpleo;\n\t}", "public void FaltaJugador(Falta Fa,Jugador Player,int Cometida,int Tarjeta, Chronometer Cronometro){\n Faltas.add(new FaltaPartido(Fa,Player.getIdJugador(),Cometida,Tarjeta,Cronometro.getTime()));\n PartidoCanchaActivity.ACCION_PRINCIPAL = null;\n PartidoCanchaActivity.ENVIA_PASE = null;\n }", "@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }", "private Malote buscaMaloteDestino(Localidade destinoMalote) {\n\t\tlogger.info(\"buscar Malote Destino:\"+destinoMalote.getDescricao());\r\n\t\t\t\t\t\t \r\n\t\tLocalidade destinoFinal = destinoMalote;\r\n\t\tTipoMalote tipoMalote = TipoMalote.SEPEX;\r\n\t\t\r\n\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.VARAS_INT) &&\r\n\t\t\t\tdestinoMalote.temCodUnidadeAdmCentral()) {\r\n\t\t\tlogger.info(\"<<< malote seadm interior >>\");\r\n\t\t\tdestinoFinal = destinoMalote.getUnidadeAdmCentral();\r\n\t\t\ttipoMalote = TipoMalote.SEADM_INT;\r\n\t\t} else {\r\n\t\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.INTERNO) && destinoMalote.isAgrupado()) {\r\n\t\t\t\tlogger.info(\"<<< malote agrupado >>\");\r\n\t\t\t\tdestinoFinal = destinoMalote.getMaloteAgrupado();\r\n\t\t\t} else {\t\t\r\n\t\t\t\tlogger.info(\"<<< malote interno nao agrupado>>>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tStringBuilder sb = new StringBuilder(\"from Malote m \");\r\n\t\tsb.append(\"where m.fechado = false and \");\r\n\t\tsb.append(\"m.tipoMalote = :pTipoMalote \");\r\n\t\tsb.append(\"and m.destino = :pDestino\");\r\n\t\tQuery q = em.createQuery(sb.toString());\r\n\t\tq.setParameter(\"pTipoMalote\", tipoMalote);\r\n\t\tq.setParameter(\"pDestino\", destinoFinal);\r\n\t\t\r\n\t\tMalote maloteEnviar = (Malote) q.getSingleResult();\r\n\t\t\r\n\t\tif (null == maloteEnviar) {\r\n\t\t\tlogger.info(\"<<<bmd - malote novo>>\");\r\n\t\t\tLocalidadeManager locDAO = new LocalidadeManager();\r\n\t\t\tmaloteEnviar = new Malote();\r\n\t\t\tmaloteEnviar.setDestino(destinoFinal);\r\n\t\t\t// rem : sepex ou sistema\r\n\t\t\tmaloteEnviar.setRemetente(locDAO.remetenteSepex());\r\n\t\t\tmaloteEnviar.setTipoMalote(tipoMalote);\r\n\t\t\tmaloteEnviar.setDtEnvio(Calendar.getInstance().getTime());\r\n\t\t\tsalva(maloteEnviar);\r\n\t\t\t//closeSession();\r\n\t\t}\r\n\t\treturn maloteEnviar;\r\n\t}", "public Jogador getJogador2() {\r\n return jogador2;\r\n }", "public void introducirhora(){\n int horadespertar; \n }", "public Joueur(int id, int pa)\r\n/* */ {\r\n/* 34 */ this.id_joueur = id;\r\n/* 35 */ this.points_action = pa;\r\n/* */ }", "private Jogador proximoAJogar(Jogador j){\n Game game = Game.getGame();\n if(game.getDupla(1).getJogadorA()==j)\n return game.getDupla(2).getJogadorA();\n if(game.getDupla(2).getJogadorA()==j)\n return game.getDupla(1).getJogadorB();\n if(game.getDupla(1).getJogadorB()==j)\n return game.getDupla(2).getJogadorB();\n if(game.getDupla(2).getJogadorB()==j)\n return game.getDupla(1).getJogadorA();\n \n return null;\n }", "public void pararPersonaje(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Derecha\";//Guarda en la variable jugadorVista hacia donde miramos\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Abajo\";\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Izquierda\";\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Arriba\";\n }\n break;\n }\n\n }", "public void PrepareNextJogada() {\n if (vez == listaJogadores.size() - 1) {\n vez = 0;\n\n } else {\n vez++;\n }\n }" ]
[ "0.7061503", "0.67391115", "0.6704006", "0.66561383", "0.6553491", "0.64758164", "0.6453385", "0.6318098", "0.6318093", "0.62822545", "0.62820184", "0.62683946", "0.6228716", "0.61931205", "0.61586577", "0.61514616", "0.61501515", "0.61231595", "0.6122823", "0.61086756", "0.6100047", "0.6055408", "0.60383564", "0.60333896", "0.60188186", "0.6016544", "0.6004693", "0.59922975", "0.59768665", "0.59684664", "0.5954561", "0.5932898", "0.5918601", "0.5911051", "0.5908962", "0.5907772", "0.59047943", "0.58949935", "0.58810204", "0.5873186", "0.5867319", "0.5863368", "0.58525425", "0.5851619", "0.5843771", "0.58426166", "0.58391905", "0.5826831", "0.58257407", "0.5823368", "0.58145195", "0.57728773", "0.5769006", "0.5762569", "0.5756863", "0.57521856", "0.5746577", "0.5742999", "0.5725684", "0.5696902", "0.5694464", "0.568985", "0.5682644", "0.56800103", "0.5677304", "0.5671462", "0.56640667", "0.5663116", "0.56580245", "0.56464785", "0.5633347", "0.5623425", "0.561913", "0.5615918", "0.5610242", "0.5598337", "0.5596831", "0.5586776", "0.5580638", "0.5554605", "0.5546785", "0.55467147", "0.5545472", "0.55425465", "0.55416983", "0.5539602", "0.55377626", "0.55370116", "0.55336994", "0.55336815", "0.55322295", "0.5528519", "0.55215555", "0.55180615", "0.55155367", "0.55091166", "0.549775", "0.5488224", "0.54864156", "0.5486126" ]
0.67192984
2
Escribe el jugador1 de la partida
public void setJugador1(Jugador jugador1) { this.jugador1 = jugador1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setJoueur1(String joueur1) {\r\n\t\tthis.joueur1 = joueur1;\r\n\t}", "Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) {\n\t\tthis.jugador1 = jugador1;\n\t\tthis.jugador2 = jugador2;\n\t\tthis.baraja = baraja;\n\t}", "public Jugador getJugador1() {\n\t\treturn jugador1;\n\t}", "public Juego(String nombreJ1, String nombreJ2){\r\n\t\tMINATR = 3;\r\n\t\tMAXATR = 6;\r\n\t\tjugador1 = new Jugador(nombreJ1);\r\n\t\tjugador2 = new Jugador(nombreJ2);\r\n\t\tjugadorEnTurno = jugador1;\r\n\t}", "public Jugador obtenerJugador();", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public void setJugador2(Jugador jugador2) {\n\t\tthis.jugador2 = jugador2;\n\t}", "public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }", "private void iniciarRondaJuego() {\n\n\t\tthis.mostrarMensaje(\"bloqueando al servidor para despertar al jugador 1\");\n\t\tbloqueoJuego.lock();\n\n\t\t// despertar al jugador 1 porque es su turno\n\t\ttry {\n\t\t\tthis.mostrarMensaje(\"Despertando al jugador 1 para que inicie el juego\");\n\t\t\tjugadores[0].setSuspendido(false);\n\t\t\tjugadores[1].setSuspendido(false);\n\t\t\tesperarInicio.signalAll();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tthis.mostrarMensaje(\"Desbloqueando al servidor luego de despertar al jugador 1 para que inicie el juego\");\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\t}", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "@Override\n public void selectionnerJoueurs(EnsJoueurs joueursGagnantsPhase1) {\n this.participantsDeLaPhase = joueursGagnantsPhase1; // Joueurs actifs\n }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void modificarPlayer1(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador1=p;\n }\n }", "public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\r\n\t\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}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public void testCasillasJugador1( )\n {\n setupEscenario1( );\n int tamanho = casillasJugador1.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador1.get( i ) ).intValue( );\n assertEquals( marcaJugador1, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public Jogador getJogador1() {\r\n return jogador1;\r\n }", "public List<Partida> getNextPartida(String partidaId,String jugadorId){\n String consulta = \"SELECT p FROM Partida p WHERE p.id > \" + partidaId + \" AND p.jugador1.id = \"+ \"'\" + jugadorId +\"' OR p.jugador2 = \"+ \"'\" + jugadorId+\"' ORDER BY p.id ASC\";\n\n List<Partida> partida = em.createQuery(consulta, Partida.class).getResultList();\n\n return partida;\n }", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "public Jugador getJugador2() {\n\t\treturn jugador2;\n\t}", "public void asignarPersona(Jugador j){\r\n this.jugador = j;\r\n }", "public Jugador jugador() {\r\n\treturn jugador;\r\n }", "public static void turnoJugador(){\n //variables locales\n int opcionBatalla;\n Scanner scannerDos=new Scanner(System.in);//nuevo scanner vara no recargar al anterior\n //menu de opciones para el turno del jugador\n System.out.println(\"\\nturno de:\"+nombrePersonaje);\n\tSystem.out.println(\"\\n1.Atacar\\t\\t\\t\\t\\tnombre:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.println(\"2.Curar\\t\\t\\t\\t\\t\\tPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.println(\"3.Item\\t\\t\\t\\t\\t\\tPuntos De mana (MP):\\t\"+puntosDeMana);\n\tSystem.out.println(\"4.Tengo Miedo\\t\\t\\t\\t\\tOro: \\t\\t\"+oro);\n System.out.println(\"\\t\\t\\t\\t\\t\\tVida del enemigo:\\t\"+puntosDeVidaEnemigo);\n\n do{//validando la opcion seleccionada\n System.out.println(\"Numero de opcion:\");\n opcionBatalla= scannerDos.nextInt();\n \n }while(opcionBatalla<1||opcionBatalla>4);\n //comparacion de la opcion seleccionada\n switch(opcionBatalla){\n case 1:{\n atacar();//llamando funcion atacar\n break;\n }\n case 2:{\n curar();//llamando funcion curar\n break;\n }\n case 3:{\n item();//llamando funcion item\n break;\n }\n \tdefault:{\n miedo();//llamando funcion miedo\n break;\n } \n }\n }", "public Jugador(String nombreJugador)\n {\n this.nombreJugador = nombreJugador;\n cartasQueTieneEnLaMano = new Carta[5];\n numeroCartasEnLaMano = 0;\n }", "public void codigo(String cadena, String codigo,int codigos,Reserva2 reserva,JDateChooser dateFechaIda,JDateChooser dateFechaVuelta,JTextField DineroFaltante) {\n\t\tcadena=codigo.split(\",\")[1];\n\t\tubicacion=codigo.split(\",\")[5];\n\t\tnombre=codigo.split(\",\")[3];\n\t\tprecio=codigo.split(\",\")[8];\n\t\tcodigos=Integer.parseInt(cadena);\n\t\tSystem.out.println(\"hola\");\n\t\tSystem.out.println(Modelo1.contador);\n\t\t\n\t\tif(Modelo1.contador==1) {\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigohotel(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==2) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigocasa(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigocasa());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==3) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigoapatamento(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigoapatamento());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t}\n\t\t\n\t}", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public static void EjecutaEjercicio1PD(String entrada) {\n\t\tEjercicio1.iniDatos(entrada);\n\t\t\n\t\t// Declarar vértice de inicio para el grafo:\n\t\tVerticeAlumno verticeInicial = VerticeAlumno.verticeInicial();\n\t\n\t\t// Inicializar el grafo virtual:\n\t\t/*\n\t\t * 2 vías:\n\t\t * \t· Con peso en el vértice.\n\t\t * \t· Con peso en las aristas. \n\t\t*/ \n\t\t\n\t\t// Inicializa un grafo virtual de tipo simpleVirtualGraph a partir del vértice inicial con peso:\n\t\tEGraph<VerticeAlumno, AristaAlumno> grafoVirtual = Graphs2.simpleVirtualGraph(verticeInicial, x -> x.getEdgeWeight());\t\n\t\t\n\t\t// Invocar el algoritmo de Programación Dinámica: \n\t\t/*\n\t\t * 2 vías: \n\t\t * · Expresando el vértice final de destino.\n\t\t * · Mediante un predicado objetivo.\n\t\t*/\n\t\tDynamicProgrammingReduction<VerticeAlumno, AristaAlumno> algoritmoPD = DPR.dynamicProgrammingReductionGoal(\n\t\t\t\t\t\tgrafoVirtual,\n\t\t\t\t\t\tVerticeAlumno.objetivo(),\n\t\t\t\t\t\tHeuristicaAlumno::heuristica,\n\t\t\t\t\t\tPDType.Max\n\t\t\t\t\t\t);\n\t\t\n\t\t// Proporciona un camino devuelto por PD desde el vértice inicial al objetivo:\n\t\tGraphPath<VerticeAlumno, AristaAlumno> caminoPD = algoritmoPD.search().get();\n\t\t\n\t\t// Solución: lista de aristas recorridos del grafo: \n\t\tList<AristaAlumno> aristas = caminoPD.getEdgeList();\n\t\tSystem.out.println(\"$$$$$$$$$$$$$$$$$ PROGRAMACIÓN DINÁMICA $$$$$$$$$$$$$$$$$$\");\n\t\tSolucion1.solucion(aristas, entrada);\n\t\t\n\t\t// DEBUG:\n\t\t/*\n\t\t * List<VerticeAlumno> vertices = caminoA.getVertexList();\n\t\t * System.out.println(vertices);\n\t\t*/\n\t\t\n\t}", "public Arquero(Jugador jugador){\n this.propietario = jugador;\n this.vida = 75;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "public Joueur(String nom2, String prenom2, Date dateDeNaissance2, String motDePasse2, int numbreJ,\n\t\t\tint dernierNiveau2, LinkedList<PartieJeu> list) {\n\t\tnom = nom2;\n\t\tprenom = prenom2;\n\t\tdateDeNaissance = dateDeNaissance2;\n\t\tmotDePasse = motDePasse2;\n\t\tdernierNiveau = dernierNiveau2;\n\t\tnumerojouer = numbreJ;\n\t\tListPartie = list;\n\t}", "private void analizarMensaje(String entrada, int indexJugador) {\n\t\tSystem.out.println(\"Analizando el mensaje del jugador con index \"+indexJugador+\" que dice \"+entrada);\n\t\t// TODO Auto-generated method stub\n\t\t// garantizar que solo se analice la petición del jugador en turno.\n\t\twhile (indexJugador != jugadorEnTurno && !entrada.equals(\"reiniciar\") && !entrada.equals(\"abandonar\")) {\n\t\t\tbloqueoJuego.lock();\n\t\t\ttry {\n\t\t\t\tesperarTurno.await();\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\tbloqueoJuego.unlock();\n\t\t}\n\n\t\t// valida turnos para jugador 0 o 1\n\n\t\tif (entrada.equals(\"pedir\")) {\n\t\t\t// dar carta\n\t\t\tmostrarMensaje(\"Se envió carta al jugador \" + idJugadores[indexJugador]);\n\t\t\tCarta carta = mazo.getCarta();\n\t\t\t// adicionar la carta a la mano del jugador en turno\n\t\t\tmanosJugadores.get(indexJugador).add(carta);\n\t\t\tcalcularValorMano(carta, indexJugador);\n\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setCarta(carta);\n\t\t\t// datosEnviar.ponerImagen(carta);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\t// determinar qué sucede con la carta dada en la mano del jugador y\n\t\t\t// mandar mensaje a todos los jugadores\n\t\t\tif (valorManos[indexJugador] > 21) {\n\t\t\t\t// jugador Voló\n\t\t\t\tdatosEnviar\n\t\t\t\t\t\t.setMensaje(idJugadores[indexJugador] + \" tienes \" + valorManos[indexJugador] + \" volaste :(\");\n\t\t\t\tdatosEnviar.setJugadorEstado(\"voló\");\n\t\t\t\tfor (int i = 0; i < jugadores.length; i++) {\n\t\t\t\t\tif (indexJugador == i) {\n\t\t\t\t\t\tdatosEnviar.setMensaje(\n\t\t\t\t\t\t\t\tidJugadores[indexJugador] + \" tienes \" + valorManos[indexJugador] + \" volaste\");\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatosEnviar.setMensaje(\n\t\t\t\t\t\t\t\tidJugadores[indexJugador] + \" ahora tiene \" + valorManos[indexJugador] + \" volo\");\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// notificar a todos que jugador sigue\n\t\t\t\tif (jugadorEnTurno == 0) {\n\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(idJugadores[1]);\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\n\t\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[1] + \" y tiene: \" + valorManos[1]);\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[1] + \" te toca jugar y tienes \" + valorManos[1]);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\t\tbloqueoJuego.lock();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\t\tjugadores[0].setSuspendido(true);\n\t\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t} else if (jugadorEnTurno == 1) {\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(idJugadores[2]);\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[2] + \" y tiene: \" + valorManos[2]);\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[2] + \" te toca jugar y tienes \" + valorManos[2]);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\t\t\tbloqueoJuego.lock();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\t\tjugadores[1].setSuspendido(true);\n\t\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t} else {// era el jugador 3 entonces se debe iniciar el dealer\n\t\t\t\t\t\t// notificar a todos que le toca jugar al dealer\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(\"dealer\");\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\t\tdatosEnviar.setMensaje(\"Dealer se repartirá carta\");\n\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tiniciarDealer();\n\t\t\t\t}\n\n\t\t\t} else {// jugador no se pasa de 21 puede seguir jugando\n\t\t\t\tdatosEnviar.setCarta(carta);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tienes \" + valorManos[indexJugador]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"sigue\");\n\n\t\t\t\tfor (int i = 0; i < jugadores.length; i++) {\n\t\t\t\t\tif (indexJugador == i) {\n\t\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tienes \" + valorManos[indexJugador]);\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tiene \" + valorManos[indexJugador]);\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Plantar\n\t\t} else if (entrada.equals(\"plantar\")) {\n\t\t\t// jugador en turno plantó\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" se plantó\");\n\t\t\tdatosEnviar.setJugadorEstado(\"plantó\");\n\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\t// notificar a todos el jugador que sigue en turno\n\t\t\tif (jugadorEnTurno == 0) {\n\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[1]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[1] + \" te toca jugar y tienes \" + valorManos[1]);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[1] + \" y tiene: \" + valorManos[1]);\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\tjugadores[indexJugador].setSuspendido(true);\n\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\t\t\t} else if (jugadorEnTurno == 1) {\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[2]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[2] + \" te toca jugar y tienes \" + valorManos[2]);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[2] + \" y tiene: \" + valorManos[2]);\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\n\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\tjugadores[indexJugador].setSuspendido(true);\n\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// notificar a todos que le toca jugar al dealer\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(\"dealer\");\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(\"Dealer se repartirá carta\");\n\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\tiniciarDealer();\n\t\t\t}\n\t\t\t// APUESTA\n\t\t}\n\t\telse if(entrada.equals(\"abandonar\")) {\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tterminarJuego();\n\t\t}\n\t\telse if(entrada.equals(\"salgo\")) {\n\t\t\t\n\t\t}\n\t\telse if(entrada.equals(\"reiniciar\")) {\n\t\t\tnumeroJugadoresReiniciando++;\n\t\t\tif(numeroJugadoresReiniciando==3) {\n\t\t\t\treiniciar();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdatosEnviar.setJugadorEstado(\"reiniciando\");\n\t\t\t\tjugadores[indexJugador].enviarMensajeCliente(datosEnviar);\n\t\t\t\tSystem.out.println(\"Enviando reiniciar al jugador con index \"+indexJugador);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tapuestasJugadores[indexJugador] = Integer.parseInt(entrada);\n\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" aposto \" + entrada);\n\t\t\tSystem.out.println(indexJugador+\" aposto \"+entrada);\n\t\t\tdatosEnviar.setEstadoJuego(true);\n\t\t\tdatosEnviar.setJugadorEstado(\"apuesta\");\n\t\t\tdatosEnviar.setApuestas(apuestasJugadores);\n\t\t\tSystem.out.println(\"Apuestas a enviar:\");\n\t\t\tfor(int i=0; i<apuestasJugadores.length;i++) {\n\t\t\t\tSystem.out.println(\"[\"+i+\",\"+apuestasJugadores[i]+\"]\");\n\t\t\t}\n\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\tdatosEnviar.setMensaje(\"\");\n\t\t\tdatosEnviar.setEstadoJuego(false);// Ronda de pedir cartas.\n\t\t\tdatosEnviar.setApuestas(apuestasJugadores);\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t}\n\t}", "void jugar(Jugada jugada);", "public void lanzarJuegoPianino(View view){\n\n puntuacion=0;\n notasTocadas=0;\n mensaje.setText(R.string.repite);\n switch(pref.getString(\"dificultad\", \"1\")){\n case \"0\": nuevaSecuencia=generarSecuencia(4);\n nuevaSecuencia[3]=nuevaSecuencia[0];\n secuenciaJugador= new int[4];\n break;\n case \"1\": nuevaSecuencia=generarSecuencia(7);\n nuevaSecuencia[6]=nuevaSecuencia[0];\n secuenciaJugador= new int[7];\n break;\n case \"2\": nuevaSecuencia=generarSecuencia(10);\n secuenciaJugador= new int[10];\n break;\n default: nuevaSecuencia= new int[7];\n }\n\n reproducirSecuencia(nuevaSecuencia,false);\n\n }", "Jugador consultarGanador();", "private static void tourJeu(){\n\n\t\twhile(true){\n\t\t\tconsole.afficherEtatJoueurs();\n\t\t\tpasserTour();\n\t\t\tconsole.quelJoueurJoue(tour);\n\t\t\tconsole.afficherJeu();\n\t\t\tconsole.afficherDirectionAssam();\n\n\t\t\tint n;\n\t\t\twhile ((n = console.demanderNbDeplacement()) == -1 );\n\n\t\t\tconsole.afficherDirectionChoisie(n);\n\t\t\tdemanderDeplacerAssam(n);\n\n\n\t\t\tif(joueurElimine == jeu.getJoueurs().length-1){\n\t\t\t\tpasserTour();\n\t\t\t\tconsole.afficherGagnant(tour);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(verifTapis()){\n\t\t\t\tstatistique();\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}", "public Jugador ganador(){\n return partida.ganador();\n }", "public void jouer(Joueur joueur, int posX1, int posY1, int posX2, int posY2){\n\t\t\n\t\tcoefficientCombo = 1;\n\t\t\n\t\t\n\t\t\n\t\tif(joueur == joueurCourant){\t\t\t\t\t//On vérifie si c'est son tour de jouer\n\t\t\tif( verifVoisin(posX1, posY1, posX2, posY2)){\t\t\t\t//On vérifie si les cristaux joués sont voisins\n\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\t\t\t\t//On switch les cristaux dans le tableau \n\t\t\t\tArrayList<ArrayList<Integer>> tabs = chercheBlock(posX1, posY1);\t//On cherche si des blocks de cristaux de même couleur ont été formés et on stocks leurs coordonnées dans tab\n\t\t\t\tArrayList<ArrayList<Integer>> tabs2 = chercheBlock(posX2, posY2);\n\t\t\t\t\n\t\t\t\t/*for (ArrayList<Integer> arrayList : tabs) { //Affichage des coordonnées stockées dans tab\n\t\t\t\t\tfor(Integer i : arrayList){\n\t\t\t\t\t\tSystem.out.print(i);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tfaireLeMenage(tabs2);\n\t\t\t\tfaireLeMenage(tabs);\t\t//On \"supprime\" les cristaux listés dans tab\n\t\t\t\trestructurer();\t\t\t\t//On réagence le tableau en supprimant les cases vides, les cristaux au dessus glissent vers le bas, les cases hautes laissées vides sont remplies aléatoirement\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//trouverCombo();\n\t\t\t\t\n\t\t\t\tif(tabs.size() == 0 && tabs2.size()==0)\t\t//Aucun block n'a été renvoyé\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"reswitch\");\n\t\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Ces deux cristaux ne sont pas voisins\");\n\t\t\t}\n\t\t\t\t\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Ce n'est pas à \" + joueur.getNom() + \" de jouer...\");\n\t\t\tSystem.out.println(\"C'est au tour de \" + joueurCourant.getNom() + \" de jouer...\");\n\t\t}\n\t\t\n\t}", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "public static PerPpal tomarPocion(PerPpal pj1, Pocion pocion1) {\n\t\tint vidaMax = 100;\n\t\tif (pj1.getVida() < vidaMax) {// si la vida no está al máximo entonces suma la pociĂłn\n\t\t\tpj1.setVida(pj1.getVida() + pocion1.getVida());\n\t\t\tif (pj1.getVida() > vidaMax) {// y si supera la vida máxima, setea a vida máxima, no más.\n\t\t\t\tpj1.setVida(vidaMax);\n\t\t\t}\n\t\t}\n\t\treturn pj1;\n\t}", "private Jugador oponente(Jugador jugador,Jugador[] jugadores){\r\n for (Jugador jugador1 : jugadores) {\r\n if (jugador1!=jugador){\r\n return jugador1;\r\n }\r\n }\r\n return null;\r\n }", "public static void asignarPunteo(int puntos, String nombreJugador) {\n for (int sizeNombres = 0; sizeNombres < nombres.length - 1; sizeNombres++) {\n if ((nombreJugador.equals(nombres[sizeNombres])) && (puntos == 1)) {\n punteos[sizeNombres] += 1;\n break;\n }\n\n }\n\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public static void main(String[] args) \n {\n Equipo Boca = new Equipo(2);\n \n //Crear objeto jugador, pasando por parametro sus atributos\n Jugador j1 = new Jugador(\"Andrada\", 1, 1, 20, 100);\n Jugador j2 = new Jugador(\"Salvio\", 4, 7, 20, 100);\n \n // cargar objeto Equipo\n Boca.agregarJugador(j1);\n Boca.agregarJugador(j2);\n \n //Mostrar objeto Equipo\n System.out.println(Boca.listarJugador());\n \n \n \n //Cantidad de jugadores con menos de 10 partidos jugados.\n System.out.print(\"Cantidad de Jugadores con menos de 10 partidos jugados: \");\n System.out.println(Boca.cantidadJugadores());\n \n \n //Nombre del jugador con mayor cantidad de partidos jugados.\n System.out.print(\"Nombre del jugador con mas partidos jugados: \");\n System.out.println(Boca.jugadorMasPartidos());\n \n \n\n //Promedio de estado físico de todo el equipo.\n \n System.out.print(\"Promedio de estado fisico del equipo:\");\n System.out.println(Boca.promedioEstadoFisicoEquipo() + \"%\");\n \n\n //Estado físico de un jugador particular identificado por número de camiseta. \n \n System.out.print(\"Estado fisico de un juegador dado su numero de camiseta: \");\n System.out.println(Boca.estadoFisicoJugador(7) +\"%\");\n \n //Promedio de partidos jugados de los jugadores de cada posición (4resultados).\n \n System.out.println(\"Promedio de partidos jugados de los jugadores de cada posición:\");\n System.out.println(Boca.promedioPartidosJugadosporPuesto());\n \n \n \n \n }", "public Individuo Recombinar(Individuo padre, Individuo madre) {\n Individuo hijo = new Individuo(padre.getCAMINOS());\r\n Individuo hijo2 = new Individuo(madre.getCAMINOS());\r\n for (int i = 0; i < padre.getEntradas_individuo().size(); i++) {\r\n if (i < padre.getCAMINOS() / 2) {\r\n Entradas entrada_1 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_1.setValores((ArrayList<Integer>) padre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_1.setEntradas((ArrayList<String>) padre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_1.setCamino_cubierto(padre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n Entradas entrada_2 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_2.setValores((ArrayList<Integer>) madre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_2.setEntradas((ArrayList<String>) madre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_2.setCamino_cubierto(madre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n hijo.getEntradas_individuo().add(entrada_1); \r\n hijo2.getEntradas_individuo().add(entrada_2);\r\n } else {\r\n Entradas entrada_1 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_1.setValores((ArrayList<Integer>) madre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_1.setEntradas((ArrayList<String>) madre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_1.setCamino_cubierto(madre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n Entradas entrada_2 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_2.setValores((ArrayList<Integer>) padre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_2.setEntradas((ArrayList<String>) padre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_2.setCamino_cubierto(padre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n hijo.getEntradas_individuo().add(entrada_1); \r\n hijo2.getEntradas_individuo().add(entrada_2);\r\n }\r\n }\r\n hijo.caminos_posibles = padre.caminos_posibles;\r\n hijo.caminos_cubiertos = padre.caminos_cubiertos;\r\n hijo2.caminos_posibles = madre.caminos_posibles;\r\n hijo2.caminos_cubiertos = madre.caminos_cubiertos;\r\n Document doc_copy_1 = (Document) this.doc.cloneNode(true);\r\n Document doc_copy_2 = (Document) this.doc.cloneNode(true);\r\n //Mutar(hijo);\r\n //Mutar(hijo2);\r\n hijo.EvaluarIndividuo(doc_copy_1);\r\n hijo2.EvaluarIndividuo(doc_copy_2);\r\n individuos.add(hijo);\r\n individuos.add(hijo2);\r\n if(hijo.getEvaluacion() > hijo2.getEvaluacion())\r\n {\r\n return hijo;\r\n }\r\n else\r\n {\r\n return hijo2;\r\n }\r\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "public static void passerTour(){\n\t\tif(tour<jeu.getJoueurs().length){\n\t\t\ttour++;\n\t\t}\n\t\telse {\n\t\t\ttour = 1;\n\t\t}\n\t\tfor(int i=0;i<joueurElimine;i++){\n\t\t\tif(jeu.getJoueurs()[tour-1].getMonnaie()==0){\n\t\t\t\tif(tour<jeu.getJoueurs().length){\n\t\t\t\t\ttour++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttour = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n //variable tipo local que recibe la opcion de nombre para el jugador\n int numeroDeOpcion;\n //acreditacion de los puntos iniciales\n puntosDeVida= 150*(nivel+1);\n puntosDeMana= 10*(nivel+1);\n //inicializacion del juego y preguntando si desea un nombre para el personaje\n \tSystem.out.println(\" ---->BIENVENIDO AL JUEGO<----\");\n \tSystem.out.println(\"\\nDesea ingresar un nombre a su personaje [S]si, [N]no\");\n \tScanner caracterNombre=new Scanner(System.in);\n \tString opcionTemp = caracterNombre.nextLine();\n \topcion = opcionTemp.charAt(0); //leyendo opcion\n \t//Ingresando un nombre por el jugador\n \tif(opcion=='s'||opcion=='S'){\n \t\tSystem.out.println(\"Ingrese el nombre:\");\n \t\tScanner cadenaNombre=new Scanner(System.in);\n \t\tnombrePersonaje=cadenaNombre.nextLine();\n \t}\n //Estableciendo nombre predeterminado por el juego\n else{\n \tnombrePersonaje=\"Jugador1\";\n \tSystem.out.printf(\"\\nSe le a asignado el personaje:\\t\"+nombrePersonaje); \n \t}\n do{\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n //Menu de opciones principales para el jugador\n System.out.println(\"\\n..MENU DE OPCIONES..\");\n System.out.println(\"1. A la carga.\"); //Inicia la battalla\n System.out.println(\"2.Tienda.\"); //Permite comprar articulos para la batalla\n System.out.println(\"3.zzZzzZzzZ(Dormir).\");//Permite recuperar al jugador a su estado inicial \n System.out.println(\"4.Status.\"); //Muestra las estadisticas del juego\n System.out.println(\"5.Mas Poder!!!.\"); //Para aumento de nivel del juego \n System.out.println(\"6.Salir.\"); //finaliza las acciones y sale del juego\n do{//validando el numero de opcion\n System.out.println(\"Ingrese el numero de opcion:\");\n numeroDeOpcion= scanner.nextInt();\n }\n while(numeroDeOpcion<1 || numeroDeOpcion>6);\n //comparando la opcion ingresada\n switch(numeroDeOpcion){\n //mostrando los casos existentes por comparar\n case 1:{\n do{\n batalla();//llamando a la funcion batalla\n //Validando la repeticion de la fuencion o su finalizacion\n System.out.println(\"\\nDesea otra Batalla? [S]i, [N]o\");\n Scanner caracterBatalla=new Scanner(System.in);\n String opcionTemp1 = caracterBatalla.nextLine();\n repetirOpcion = opcionTemp1.charAt(0);\n opcionMiedo=0; //reiniciando la opcion miedo\n } \n //condicion del bucle para la funcion batalla \n while(repetirOpcion=='s'||repetirOpcion=='S');\n break;\n }\n case 2:{\n do{\n tienda();//llamando a la funcion tienda\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea realizar otra compra? [S]i, [N]o\");\n Scanner caracterTienda=new Scanner(System.in);\n String opcionTemp2 = caracterTienda.nextLine();\n repetirOpcion2 = opcionTemp2.charAt(0);\n }\n //condicion de bucle para la funcion tienda\n while(repetirOpcion2=='s'||repetirOpcion2=='S');\n break;\n }\n case 3:{\n do{\n dormir();//llamando a la funcion dormir\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea volver a dormir? [S]i, [N]o\");\n Scanner caracterDormir=new Scanner(System.in);\n String opcionTemp3 = caracterDormir.nextLine();\n repetirOpcion3 = opcionTemp3.charAt(0);\n }\n //condicion de bucle para la funcion dormir \n while(repetirOpcion3=='s'||repetirOpcion3=='S');\n break;\n }\n case 4:{\n do{\n status();//llamando a la funcion status\n //validando su repeticion\n System.out.println(\"\\nMostrar nuevamente? [S]i, [N]o\");\n Scanner caracterStatus=new Scanner(System.in);\n String opcionTemp4 = caracterStatus.nextLine();\n repetirOpcion4 = opcionTemp4.charAt(0);\n }\n //condicion de bucle para la funcion status \n while(repetirOpcion4=='s'||repetirOpcion4=='S');\n break;\n }\n case 5:{\n do{\n poder();//llamando a la funcion poder\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea mas poder? [S]i, [N]o\");\n Scanner caracterPoder=new Scanner(System.in);\n String opcionTemp5 = caracterPoder.nextLine();\n repetirOpcion5 = opcionTemp5.charAt(0);\n }\n //condion de bucle para la funcion poder \n while(repetirOpcion5=='s'||repetirOpcion5=='S');\n break;\n }\n \tdefault:{\n System.exit(0);//saliendo del juego\n break;\n }\n }\n //validacion del retorno al menu principal\n System.out.println(\"volver al menu [S]si, [N]no?\");\n Scanner caracterVolver=new Scanner(System.in);\n String opcionTemp6 = caracterVolver.nextLine();\n opcionSalir=opcionTemp6.charAt(0);\n }\n //condicion del bucle para menu principal\n while(opcionSalir=='S'||opcionSalir=='s'); \n }", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "public int encerraPartidaComResultado(Integer idJogador) throws RemoteException;", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "public String retirarJugador(Jugador jugadorParaRetirar) {\n\n\t\tboolean retirado = false;\n\n\t\tfor (int i = 0; !retirado && i < this.jugadoresEnMesa.size(); i++) {\n\t\t\tif (this.jugadoresEnMesa.get(i).getId() == jugadorParaRetirar.getId()) {\n\n\t\t\t\tListaJugadores.jugadoresRetirados.add(jugadorParaRetirar);\n\n\t\t\t\tthis.jugadoresEnMesa.remove(i);\n\t\t\t\ti--;\n\t\t\t\tretirado = true;\n\n\t\t\t}\n\t\t}\n\n\t\tString mensajeRetirada;\n\t\tif (retirado) {\n\t\t\tmensajeRetirada = \"%s ha sido retirado.%s\";\n\t\t\tif (jugadorParaRetirar.getCredito() < 0)\n\t\t\t\tEasterEgg.huevoDePascua(jugadorParaRetirar.getNombre());\n\n\t\t\telse {\n\n\t\t\t\tif (jugadorParaRetirar.getCredito() == 0)\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Se le ha agotado el crédito.\");\n\n\t\t\t\telse if (jugadorParaRetirar.getCredito() >= jugadorParaRetirar.getCreditoObjetivo())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado su crédito objetivo\");\n\n\t\t\t\telse if (jugadorParaRetirar.getRondas() >= jugadorParaRetirar.getRondasMaximas())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado sus rondas máximas\");\n\n\t\t\t\telse\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(), \"\");\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tmensajeRetirada = \"No se ha podido retirar al jugador.\";\n\t\t}\n\n\t\treturn mensajeRetirada;\n\n\t}", "public void voegStartkaartenToe(Speler speler) {\n try (Connection conn = DriverManager.getConnection(Connectie.JDBC_URL)) {\n PreparedStatement spelerlijst = conn.prepareStatement(\"SELECT * FROM ID222177_g14.Speler WHERE gebruikersnaam = ?\");\n spelerlijst.setString(1, speler.getGebruikersnaam());\n ResultSet rs = spelerlijst.executeQuery();\n rs.next();\n int spelerId = rs.getInt(\"spelerID\");\n\n for (Kaart kaart : speler.getKaartLijst()) {\n PreparedStatement query = conn.prepareStatement(\"INSERT INTO ID222177_g14.Kaart (spelerID, omschrijving)\"\n + \"VALUES (?, ?)\");\n query.setInt(1, spelerId);\n query.setString(2, kaart.getOmschrijving());\n query.executeUpdate();\n }\n } catch (SQLException ex) {\n throw new RuntimeException(ex);\n }\n }", "public ListaJugadores recuperarJugadores() throws SQLException {\n ListaJugadores listaJugadores = null;\n try {\n getConexion();\n String consulta = \"SELECT nombre FROM JUGADORES\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n while (registros.next()) {\n String nombre = registros.getString(\"nombre\");\n Jugador jugador = new Jugador(nombre);\n listaJugadores.agregarJugador(jugador);\n }\n } finally {\n closeConexion();\n }\n return listaJugadores;\n }", "public void dorcsd2by1_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);", "public void setKota1(String tempatKerja) {\n\t\t\n\t}", "public void changerJoueur() {\r\n\t\t\r\n\t}", "public String salvar(PessoaJuridica pessoaJuridica) {\n\t\t\r\n\t\treturn \"Salvo\";\r\n\t}", "public Jogador jogadorDaVez() {\r\n Jogador jogadorvez = null;\r\n \r\n if (this.vezDoJogador1 ){\r\n jogadorvez = jogador1; \r\n }else{\r\n jogadorvez = jogador2;\r\n }\r\n return jogadorvez;\r\n }", "public void repartirGananciasDealer() {\n\t\t if(contieneJugador(ganador,\"dealer\")) {\n\t\t\t if(verificarJugadaBJ(manosJugadores.get(3))) {\n\t\t\t\t System.out.println(\"Pareja nombre agregado dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores() + 15;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\", cantidadGanancia));\n\t\t\t }else {\n\t\t\t\t System.out.println(\"Pareja nombre agregado --> dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores()+10;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t\t }\n\t\t }else {\n\t\t\t int cantidadGanancia = verificarCantidadGanadores();\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t }\n\t\t \n\t }", "public void agregarVictoria(Jugador jugador) {\r\n if (!this.isReplay()) {\r\n jugador.setVictorias(jugador.getVictorias() + 1);\r\n }\r\n }", "public void PrepareNextJogada() {\n if (vez == listaJogadores.size() - 1) {\n vez = 0;\n\n } else {\n vez++;\n }\n }", "public static void quienHaGanado(Mano[] jugadores, int actual,int carro){\n if(jugadores[actual].getNPiezas()!=0){\n boolean dosIguales=false;\n actual=0;\n for (int i = 1; i < jugadores.length; i++) {\n if(jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()){//El jug i y el actual tienen la misma putnuacion\n if(i==carro){//el jugador i es el carro\n actual=i;\n dosIguales=false;\n }\n else if(actual==carro){//el jugador actual es el carro\n dosIguales=false;\n }\n else{//ninguno es el carro y hay que acudir a un metodo para nombrar a los dos ganadores.\n dosIguales=true;\n }\n }\n if(jugadores[i].getPuntuacion()<jugadores[actual].getPuntuacion()){//el jugador i tiene menor puntuacion que el jugador actual\n actual=i;\n dosIguales=false;\n }\n }\n if(dosIguales){\n System.out.println(\"pene\");\n Excepciones.cambiarColorAzul(\"Y los GANADORES SON....\");\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i].getPuntuacion()==jugadores[actual].getPuntuacion()) {\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(i+1)+\": \"+jugadores[i].getNombre());\n }\n }\n System.out.println(\"\\u001B[30m\");\n }\n else{\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }\n else {\n Excepciones.cambiarColorAzul(\"Y el GANADOR ES....\");\n //System.out.println(\"\\t\\t\\u001B[34mEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre()+\"\\u001B[30m\");\n Excepciones.cambiarColorAzul(\"\\t\\tEl jugador nº- \"+(actual+1)+\": \"+jugadores[actual].getNombre());\n }\n }", "public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }", "public static void jogar(int numeroJogador) {\n\t\tint ponto = 0;\r\n\t\t\r\n\t\t//em quanto jogador nao fizer 5 pontos ele vai repetir o laço\r\n\t\twhile (ponto < 5) {\r\n\t\t\t//joga o dado1 e dao2 (gerando valor aleatorio de 1 a 6)\r\n\t\t\tint dado1 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\tint dado2 = (int) (new Random().nextInt(6) + 1);\r\n\t\t\t//se o valor da soma do dado1 e dado2 for 7 ou 11, ele ganha 1 ponto\r\n\t\t\tif (((dado1 + dado2) == 7) || ((dado1 + dado2) == 11)) {\r\n\t\t\t\tponto++;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"jogador \"+numeroJogador+\"º. Ponto = \"+ ponto);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t//depois de fazer os 5 pontos, é verificado em que posição o jogador esta.\r\n\t\tif (posicao == 0) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Primeiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 5000,00\");\t\t\t\r\n\t\t} else if (posicao == 1) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Segundo jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 4000,00\");\t\t\t\r\n\t\t} else if (posicao == 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"Terceiro jogador a fazer 5 pontos: \"+numeroJogador+\". Ganhou 3000,00\");\t\t\t\r\n\t\t} else if (posicao > 2) {\r\n\t\t\tposicao++;\r\n\t\t\tSystem.out.println(\"jogador \" + numeroJogador + \"º esta em \" + posicao + \"º posicao. Não ganhou nada\");\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tif (indexJugador == 0) {\n\t\t\t\t// es jugador 1, debe ponerse en espera a la llegada del otro jugador\n\n\t\t\t\ttry {\n\t\t\t\t\t// guarda el nombre del primer jugador\n\t\t\t\t\tidJugadores[0] = (String) in.readObject();\n\n\t\t\t\t\tmostrarMensaje(\"Hilo establecido con jugador (1) \" + idJugadores[0]);\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tmostrarMensaje(\"bloquea servidor para poner en espera de inicio al jugador 1\");\n\t\t\t\tbloqueoJuego.lock(); // bloquea el servidor\n\n\t\t\t\twhile (suspendido) {\n\t\t\t\t\tmostrarMensaje(\"Parando al Jugador 1 en espera del otro jugador...\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tesperarInicio.await();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tmostrarMensaje(\"Desbloquea Servidor luego de bloquear al jugador 1\");\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// ya se conectó el otro jugador,\n\t\t\t\t// le manda al jugador 1 todos los datos para montar la sala de Juego\n\t\t\t\t// le toca el turno a jugador 1\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tmostrarMensaje(\"jugador 1 manda al jugador 1 todos los datos para montar SalaJuego\");\n\t\t\t\t//Le envía al jugador los datos que debe mostrar su ventana\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setManoDealer(manosJugadores.get(3));\n\t\t\t\tdatosEnviar.setManoJugador1(manosJugadores.get(0));\n\t\t\t\tdatosEnviar.setManoJugador2(manosJugadores.get(1));\n\t\t\t\tdatosEnviar.setManoJugador3(manosJugadores.get(2));\n\t\t\t\tdatosEnviar.setMazo(mazo);\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setEstadoJuego(true); // Ronda de apuestas activado.\n\t\t\t\tdatosEnviar.setMensaje(\"Inicias \" + idJugadores[0] + \" tienes \" + valorManos[0]);\n\t\t\t\tenviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadorEnTurno = 0;\n\t\t\t} else if (indexJugador == 1) {\n\t\t\t\t//Es jugador 2\n\t\t\t\ttry {\n\t\t\t\t\t// guarda el nombre del primer jugador\n\t\t\t\t\tidJugadores[1] = (String) in.readObject();\n\t\t\t\t\n\t\t\t\t\tmostrarMensaje(\"Hilo establecido con jugador (2) \" + idJugadores[1]);\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tmostrarMensaje(\"bloquea servidor para poner en espera de inicio al jugador 2\");\n\t\t\t\tbloqueoJuego.lock(); // bloquea el servidor\n\n\t\t\t\twhile (suspendido) {\n\t\t\t\t\tmostrarMensaje(\"Parando al Jugador 2 en espera del otro jugador...\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tesperarInicio.await();\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tmostrarMensaje(\"Desbloquea Servidor luego de bloquear al jugador 2\");\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tmostrarMensaje(\"jugador 2 manda al jugador 1 todos los datos para montar SalaJuego\");\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setManoDealer(manosJugadores.get(3));\n\t\t\t\tdatosEnviar.setManoJugador1(manosJugadores.get(0));\n\t\t\t\tdatosEnviar.setManoJugador2(manosJugadores.get(1));\n\t\t\t\tdatosEnviar.setManoJugador3(manosJugadores.get(2));\n\t\t\t\tdatosEnviar.setMazo(mazo);\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setEstadoJuego(true); // Ronda de apuestas activado.\n\t\t\t\tdatosEnviar.setMensaje(\"Inicia \" + idJugadores[0] + \" tiene \" + valorManos[0]);\n\t\t\t\tenviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadorEnTurno = 0;\n\t\t\t} else {\n\t\t\t\t// Es jugador 3\n\t\t\t\ttry {\n\t\t\t\t\tidJugadores[2] = (String) in.readObject();\n\t\t\t\t\t\n\t\t\t\t\tmostrarMensaje(\"Hilo jugador (3)\" + idJugadores[2]);\n\t\t\t\t} catch (ClassNotFoundException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tmostrarMensaje(\"manda al jugador 2 el nombre del jugador 1\");\n\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setManoDealer(manosJugadores.get(3));\n\t\t\t\tdatosEnviar.setManoJugador1(manosJugadores.get(0));\n\t\t\t\tdatosEnviar.setManoJugador2(manosJugadores.get(1));\n\t\t\t\tdatosEnviar.setManoJugador3(manosJugadores.get(2));\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setEstadoJuego(true); // Ronda de apuestas activado.\n\t\t\t\tdatosEnviar.setMensaje(\"Inicia \" + idJugadores[0] + \" tiene \" + valorManos[0]);\n\t\t\t\tenviarMensajeCliente(datosEnviar);\n\n\t\t\t\tiniciarRondaJuego(); // despertar al jugador 1 para iniciar el juego\n\t\t\t\tmostrarMensaje(\"Bloquea al servidor para poner en espera de turno al jugador 2\");\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\tmostrarMensaje(\"Pone en espera de turno al jugador 2\");\n\t\t\t\t\tesperarTurno.await();\n\t\t\t\t\tmostrarMensaje(\"Despierta de la espera de inicio del juego al jugador 1\");\n\t\t\t\t\t//\n\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Mientras ningún jugador decida retirarse del juego al final de la partida\n\t\t\twhile (jugar) {\n\t\t\t\ttry {\n\t\t\t\t\tentrada = (String) in.readObject();\n\t\t\t\t\tanalizarMensaje(entrada, indexJugador);\n\t\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t// controlar cuando se cierra un cliente\n\t\t\t\t}\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tin.close();\n\t\t\t\tout.close();\n\t\t\t\tconexionCliente.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}\n\t\t\tSystem.out.println(\"Un hilo muere\");\n\t\t\t// cerrar conexión\n\n\t\t}", "public Coup coupIA() {\n\n int propriete = TypeCoup.CONT.getValue();\n int bloque = Bloque.NONBLOQUE.getValue();\n Term A = intArrayToList(plateau1);\n Term B = intArrayToList(plateau2);\n Term C = intArrayToList(piecesDispos);\n Variable D = new Variable(\"D\");\n Variable E = new Variable(\"E\");\n Variable F = new Variable(\"F\");\n Variable G = new Variable(\"G\");\n Variable H = new Variable(\"H\");\n org.jpl7.Integer I = new org.jpl7.Integer(co.getValue());\n q1 = new Query(\"choixCoupEtJoue\", new Term[] {A, B, C, D, E, F, G, H, I});\n\n\n if (q1.hasSolution()) {\n Map<String, Term> solution = q1.oneSolution();\n int caseJ = solution.get(\"D\").intValue();\n int pion = solution.get(\"E\").intValue();\n Term[] plateau1 = listToTermArray(solution.get(\"F\"));\n Term[] plateau2 = listToTermArray(solution.get(\"G\"));\n Term[] piecesDispos = listToTermArray(solution.get(\"H\"));\n for (int i = 0; i < 16; i++) {\n if (i < 8) {\n this.piecesDispos[i] = piecesDispos[i].intValue();\n }\n this.plateau1[i] = plateau1[i].intValue();\n this.plateau2[i] = plateau2[i].intValue();\n }\n\n int ligne = caseJ / 4;\n int colonne = caseJ % 4;\n\n if (pion == 1 || pion == 5) {\n pion = 1;\n }\n if (pion == 2 || pion == 6) {\n pion = 0;\n }\n if (pion == 3 || pion == 7) {\n pion = 2;\n }\n if (pion == 4 || pion == 8) {\n pion = 3;\n }\n\n\n Term J = intArrayToList(this.plateau1);\n q1 = new Query(\"gagne\", new Term[] {J});\n System.out.println(q1.hasSolution() ? \"Gagné\" : \"\");\n if (q1.hasSolution()) {\n propriete = 1;\n }\n return new Coup(bloque,ligne, colonne, pion, propriete);\n }\n System.out.println(\"Bloqué\");\n return new Coup(1,0, 0, 0, 3);\n }", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "private static void eliminarJugador() {\n\t\ttry {\n\t\t\tSystem.out.println(jugadores.toString());\n\t\t\tjugadores.borrar(Teclado.leerCadena(\"Nombre:\"));//indica el nombre del jugador que se desea borrar\n\t\t} catch (JugadorNoExisteException | NombreNoValidoException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}", "public void golpearJugador(Jugador j) {\n\t\t\n\t}", "public static void jugador(BufferedReader lee) throws IOException {\n ODB odb = ODBFactory.open(\"jugadores.db\");\n \n Jugador j = null;\n Pais p = null;\n IQuery query = null;\n \n System.out.println(\"Nombre\");\n String nombre = lee.readLine();\n nombre = nombre.substring(0, 1).toUpperCase() + nombre.substring(1).toLowerCase();\n \n System.out.println(\"Deporte\");\n String deporte = lee.readLine();\n \n System.out.println(\"Ciudad\");\n String ciudad = lee.readLine();\n \n System.out.println(\"Edad\");\n int edad = Integer.parseInt(lee.readLine());\n \n System.out.println(\"Pais\");\n String npais = lee.readLine();\n \n query = new CriteriaQuery(Pais.class, Where.equal(\"nombrepais\", npais));\n Objects<Pais> objects = odb.getObjects(query);\n \n if (objects.isEmpty()) {\n System.out.println(\"No existe el pais seleccionado\");\n \n System.out.println(\"ID\");\n int id = Integer.parseInt(lee.readLine());\n \n p = new Pais(id, npais);\n \n odb.store(p);\n } else {\n p = objects.getFirst();\n }\n \n j = new Jugador(nombre, deporte, ciudad, edad, p);\n \n odb.store(j);\n \n odb.close();\n }", "public String turno(){\n return partida.turno();\n }", "public void anazitisiSintagisVaseiHmerominias() {\n\t\tDate firstDt = null, lastDt = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t\t\t\tprescription[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t// Zitaw apo ton xrhsth to xroniko euros kata to opoio exei graftei sintagh\n\t\t\tfirstDt = sir.readDate(\"DWSTE ARXIKH HMEROMHNIA: \");\n\t\t\tlastDt = sir.readDate(\"DWSTE TELIKH HMEROMHNIA: \");\n\t\t\tSystem.out.println();\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t// An h hmeromhnia eggrafhs ths syntaghs einai anamesa sta xronika oria pou exei dwsei o xrhsths ektypwnetai\n\t\t\t\tif(firstDt.before(prescription[i].getDate()) && (lastDt.after(prescription[i].getDate()))) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH METAKSY:\" + firstDt + \" KAI: \" + lastDt);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public JogoVelha(Jogador jogador1, Jogador jogador2) {\r\n // recebe os jogadores\r\n this.jogador1 = jogador1;\r\n this.jogador2 = jogador2;\r\n this.sncpu = false;\r\n \r\n }", "protected void jouerOrdinateur() {\n Random rdmPropoOrdi = new Random();\n\n for (int i = 0; i < nbrPosition; i++) {\n int min = 0;\n int max = propositionHaute[i];\n if (propositionBasse[i] != 0) {\n min = propositionBasse[i] + 1;\n }\n\n if (propositionOrdinateur[i] != combinaisonJoueur[i]) {\n int propoOrdi = min + rdmPropoOrdi.nextInt(max - min);\n propositionOrdinateur[i] = (byte) (propoOrdi);\n\n if (propositionOrdinateur[i] < combinaisonJoueur[i]) {\n propositionBasse[i] = propositionOrdinateur[i];\n } else {\n propositionHaute[i] = propositionOrdinateur[i];\n }\n }\n }\n }", "public void jugarMaquinaSola(int turno) {\n if (suspenderJuego) {\n return;\n }\n CuadroPieza cuadroActual;\n CuadroPieza cuadroDestino;\n CuadroPieza MovDestino = null;\n CuadroPieza MovActual = null;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n cuadroActual = tablero[x][y];\n if (cuadroActual.getPieza() != null) {\n if (cuadroActual.getPieza().getColor() == turno) {\n for (int x1 = 0; x1 < 8; x1++) {\n for (int y1 = 0; y1 < 8; y1++) {\n cuadroDestino = tablero[x1][y1];\n if (cuadroDestino.getPieza() != null) {\n if (cuadroActual.getPieza().validarMovimiento(cuadroDestino, this)) {\n if (MovDestino == null) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n } else {\n if (cuadroDestino.getPieza().getPeso() > MovDestino.getPieza().getPeso()) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n if (cuadroDestino.getPieza().getPeso() == MovDestino.getPieza().getPeso()) {\n //Si es el mismo, elijo al azar si moverlo o no\n if (((int) (Math.random() * 3) == 1)) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n }\n }\n }\n\n }\n }\n }\n }\n }\n }\n }\n if (MovActual == null) {\n boolean b = true;\n do {//Si no hay mov recomendado, entonces genero uno al azar\n int x = (int) (Math.random() * 8);\n int y = (int) (Math.random() * 8);\n tablero[x][y].getPieza();\n int x1 = (int) (Math.random() * 8);\n int y1 = (int) (Math.random() * 8);\n\n MovActual = tablero[x][y];\n MovDestino = tablero[x1][y1];\n if (MovActual.getPieza() != null) {\n if (MovActual.getPieza().getColor() == turno) {\n b = !MovActual.getPieza().validarMovimiento(MovDestino, this);\n //Si mueve la pieza, sale del while.\n }\n }\n } while (b);\n }\n if (MovActual.getPieza().MoverPieza(MovDestino, this)) {\n this.setTurno(this.getTurno() * -1);\n if (getRey(this.getTurno()).isInJacke(this)) {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Hacke Mate!!! - te lo dije xD\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n } else {\n JOptionPane.showMessageDialog(null, \"Rey en Hacke - ya t kgste\");\n }\n } else {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Empate!!!\\nComputadora: Solo por que te ahogaste...!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n if (Pieza.getCantMovimientosSinCambios() >= 50) {\n JOptionPane.showMessageDialog(null, \"Empate!!! \\nComputadora: Vaya, han pasado 50 turnos sin comernos jeje!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Otra Partida Amistosa¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n }\n }\n if (this.getTurno() == turnoComputadora) {\n jugarMaquinaSola(this.getTurno());\n }\n }", "public void pararPersonaje(char letra) {\n switch (letra) {\n case 'd':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Derecha\";//Guarda en la variable jugadorVista hacia donde miramos\n }\n break;\n case 's':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Abajo\";\n }\n break;\n case 'a':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Izquierda\";\n }\n break;\n case 'w':\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n jugadorVista = \"Arriba\";\n }\n break;\n }\n\n }", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "@Override\n public void setJugadoresEsperando(int i) {\n lblNumeroJugadores.setText(Integer.toString(i));\n }", "static void jugadorAJugar(String nombre) throws NombreNoValidoException, JugadorYaExisteException, JugadorNoExisteException{\n\t\tif(jugadores.contains(nombre)&&!participantes.contains(nombre))\n\t\t\tparticipantes.volcarJugadorALista(jugadores.get(jugadores.indexOf(nombre)));\n\t\telse if(!jugadores.contains(nombre))\n\t\t\tthrow new JugadorNoExisteException(\"Jugador no existe en la lista.\");\n\t\telse\n\t\t\tthrow new JugadorYaExisteException(\"Jugador ya existe.\");\n\t\t\t\n\t}", "public FaseDescartes faseJuego();", "public void receberJogada(Jogada jogada);", "public String getPilihanJawaban1(int x){\n String jawaban1 = pilihanJawaban[x][0];\n return jawaban1;\n }", "public void modificarPlayer2(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador2=p;\n }\n }", "private void cpu_jogada(){\n\n for(i=0;i<8;i++){\n for(j=0;j<8;j++){\n if(matriz[i][j] == jd2){\n // verificarAtaque(i,j,jd2);\n //verificarAtaque as posssibilidades de\n // ataque : defesa : aleatorio\n //ataque tem prioridade 1 - ve se tem como comer quem ataca\n //defesa tem prioridade 2 - ou movimenta a peca que esta sob ataque ou movimenta a outa para ajudar\n //aleatorio nao tem prioridade -- caso nao esteja sob ataque ou defesa\n }\n }\n }\n }", "private void gerarLaudoPermanenciaMaior(MpmPrescricaoMedica prescricao,\r\n\t\t\tList<MpmLaudo> laudoList, FatConvenioSaudePlano convenioSaudePlano,\r\n\t\t\tAghParametros seqLaudoMaiorPermanencia) {\r\n\t\tMpmTipoLaudoConvenio tipoLaudoConvenio = this\r\n\t\t\t\t.getMpmTipoLaudoConvenioDAO()\r\n\t\t\t\t.obterTempoValidadeTipoLaudoPermanenciaMaior(\r\n\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico().shortValue(),\r\n\t\t\t\t\t\tconvenioSaudePlano);\r\n\r\n\t\tif (tipoLaudoConvenio != null) {\r\n\r\n\t\t\tShort quantidadeDiasFaturamento = 0;\r\n\t\t\tShort diasPermanenciaMaior = 0;\r\n\r\n\t\t\tMpmTipoLaudo tipoLaudoMaiorPermanencia = this.getMpmTipoLaudoDAO()\r\n\t\t\t\t\t.obterPorChavePrimaria(\r\n\t\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico()\r\n\t\t\t\t\t\t\t\t\t.shortValue());\r\n\r\n\t\t\tif (prescricao.getAtendimento().getInternacao() != null) {\r\n\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar() != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getQuantDiasFaturamento() != null){\r\n\t\t\t\t\t\tquantidadeDiasFaturamento = prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t\t.getQuantDiasFaturamento();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdiasPermanenciaMaior = prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getDiasPermanenciaMaior();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (diasPermanenciaMaior == null || diasPermanenciaMaior > 0){\r\n\t\t\t\t\r\n\t\t\t\tInteger adicionalDias = 0;\r\n\t\t\t\tif (quantidadeDiasFaturamento != null) {\r\n\t\t\t\t\tadicionalDias = (quantidadeDiasFaturamento * 2) + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.validaDataTruncadaMaiorIgual(new Date(), DateUtil\r\n\t\t\t\t\t\t.adicionaDias(prescricao.getAtendimento().getInternacao()\r\n\t\t\t\t\t\t\t\t.getDthrInternacao(), adicionalDias))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.getMpmLaudoDAO()\r\n\t\t\t\t\t\t\t.obterCountLaudosPorTipoEAtendimento(\r\n\t\t\t\t\t\t\t\t\tprescricao.getAtendimento(),\r\n\t\t\t\t\t\t\t\t\ttipoLaudoMaiorPermanencia) <= 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMpmLaudo laudo = new MpmLaudo();\r\n\t\t\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getAtendimento()\r\n\t\t\t\t\t\t\t\t.getInternacao().getDthrInternacao());\r\n\t\t\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\t\t\tlaudo.setTipoLaudo(tipoLaudoMaiorPermanencia);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlaudoList.add(laudo);\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}", "public void enemigosCatacumba(){\n esq81 = new Esqueleto(1, 8, 400, 160, 30);\n esq82 = new Esqueleto(2, 8, 400, 160, 30);\n esq111 = new Esqueleto(1, 11, 800, 255, 50);\n esq112 = new Esqueleto(2, 11, 800, 255, 50);\n esq141 = new Esqueleto(1, 14, 1000, 265, 60);\n esq142 = new Esqueleto(2, 14, 1000, 265, 60);\n //\n zom81 = new Zombie(1, 8, 1000, 170, 40);\n zom82 = new Zombie(2, 8, 1000, 170, 40);\n zom111 = new Zombie(1, 11, 1300, 250, 50);\n zom112 = new Zombie(2, 11, 1300, 250, 50);\n zom141 = new Zombie(1, 14, 1700, 260, 60);\n zom142 = new Zombie(2, 14, 1700, 260, 60);\n //\n fana81 = new Fanatico(1, 8, 400, 190, 40);\n fana82 = new Fanatico(2, 8, 400, 190, 40);\n fana111 = new Fanatico(1, 11, 700, 250, 50);\n fana112 = new Fanatico(2, 11, 700, 250, 50);\n fana141 = new Fanatico(1, 14, 900, 260, 60);\n fana142 = new Fanatico(2, 14, 900, 260, 60);\n //\n mi81 = new Mimico(1, 8, 3, 1, 3000);\n mi111 = new Mimico(1, 11, 4, 1, 3000);\n mi141 = new Mimico(1, 14, 5, 1, 3200);\n }" ]
[ "0.6408069", "0.63899297", "0.61917454", "0.6158044", "0.6130575", "0.5929364", "0.5927171", "0.59236765", "0.58392733", "0.58290905", "0.57395935", "0.5710916", "0.5668816", "0.5648642", "0.55824107", "0.5582018", "0.5578569", "0.55404365", "0.5534625", "0.55334216", "0.552744", "0.55257", "0.5524796", "0.5500853", "0.5493049", "0.5490128", "0.54772455", "0.5467242", "0.5455334", "0.5445716", "0.5415711", "0.5412082", "0.5400902", "0.5397882", "0.5387354", "0.53771555", "0.53691673", "0.5349512", "0.53484064", "0.5343598", "0.53298974", "0.5328568", "0.53239185", "0.53205633", "0.53151256", "0.5299399", "0.5298682", "0.52923965", "0.5281785", "0.52798647", "0.5278446", "0.52749866", "0.5259526", "0.52523595", "0.52484345", "0.5244875", "0.52448124", "0.52319825", "0.5225075", "0.52123284", "0.52070206", "0.5202721", "0.51860136", "0.51855415", "0.51839405", "0.5181882", "0.51809084", "0.51793593", "0.51727486", "0.5167193", "0.5166024", "0.5154149", "0.5147751", "0.5136598", "0.51271653", "0.51263463", "0.5125347", "0.51223713", "0.5115038", "0.51112884", "0.50957304", "0.5094285", "0.50936955", "0.50936335", "0.5091635", "0.5077785", "0.5072333", "0.5071057", "0.50699896", "0.50674736", "0.50602776", "0.50561523", "0.50559", "0.50394917", "0.503322", "0.50313044", "0.5017807", "0.5001065", "0.49967703", "0.49956784" ]
0.6776013
0
Lee el jugador2 de la partida
public Jugador getJugador2() { return jugador2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setJugador2(Jugador jugador2) {\n\t\tthis.jugador2 = jugador2;\n\t}", "Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) {\n\t\tthis.jugador1 = jugador1;\n\t\tthis.jugador2 = jugador2;\n\t\tthis.baraja = baraja;\n\t}", "public Jugador obtenerJugador();", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "public void setJugador1(Jugador jugador1) {\n\t\tthis.jugador1 = jugador1;\n\t}", "public static void main(String[] args) \n {\n Equipo Boca = new Equipo(2);\n \n //Crear objeto jugador, pasando por parametro sus atributos\n Jugador j1 = new Jugador(\"Andrada\", 1, 1, 20, 100);\n Jugador j2 = new Jugador(\"Salvio\", 4, 7, 20, 100);\n \n // cargar objeto Equipo\n Boca.agregarJugador(j1);\n Boca.agregarJugador(j2);\n \n //Mostrar objeto Equipo\n System.out.println(Boca.listarJugador());\n \n \n \n //Cantidad de jugadores con menos de 10 partidos jugados.\n System.out.print(\"Cantidad de Jugadores con menos de 10 partidos jugados: \");\n System.out.println(Boca.cantidadJugadores());\n \n \n //Nombre del jugador con mayor cantidad de partidos jugados.\n System.out.print(\"Nombre del jugador con mas partidos jugados: \");\n System.out.println(Boca.jugadorMasPartidos());\n \n \n\n //Promedio de estado físico de todo el equipo.\n \n System.out.print(\"Promedio de estado fisico del equipo:\");\n System.out.println(Boca.promedioEstadoFisicoEquipo() + \"%\");\n \n\n //Estado físico de un jugador particular identificado por número de camiseta. \n \n System.out.print(\"Estado fisico de un juegador dado su numero de camiseta: \");\n System.out.println(Boca.estadoFisicoJugador(7) +\"%\");\n \n //Promedio de partidos jugados de los jugadores de cada posición (4resultados).\n \n System.out.println(\"Promedio de partidos jugados de los jugadores de cada posición:\");\n System.out.println(Boca.promedioPartidosJugadosporPuesto());\n \n \n \n \n }", "protected static Object DesarrolloJugada(Duelo juego, PlayView view, Sansano jugador, Sansano jugador2){\n juego.advanceTurno();\n if(juego.getTurno() <= 60 && juego.getGanador().equals(\"\")) {\n\n if(juego.getTurno() % 2 == 0){\n view.setNombreJugador(jugador2.getName());\n }\n else{\n view.setNombreJugador(jugador.getName());\n }\n\n view.setNumeroTurno(String.valueOf(juego.getTurno()));\n JButton atacarButton = view.getAtacarButton();\n JButton defendermeButton = view.getDefendermeButton();\n\n view.setprioridadUsuario(String.valueOf(jugador.getPrioridad()));\n view.setprioridadEnemigo(String.valueOf(jugador2.getPrioridad()));\n Object carta;\n if(juego.getTurno() % 2 == 0 && Globales.getmodoJuego().equals(\"conunamigo\")){\n carta = jugador2.getCard();\n }\n else{\n carta = jugador.getCard();\n }\n view.setCartaActual(((Carta) carta).getNombre());\n view.setCardDescription(((Carta) carta).getDescripcion());\n if (carta instanceof Curso) {\n defendermeButton.setText(\"Defenderme\");\n atacarButton.setEnabled(true);\n defendermeButton.setEnabled(true);\n view.setValorAtaque(String.valueOf(((Curso) carta).getAtaque()));\n view.setValorDefensa(String.valueOf(((Curso) carta).getDefensa()));\n } else if (carta instanceof Profesor) {\n atacarButton.setEnabled(false);\n defendermeButton.setEnabled(true);\n defendermeButton.setText(\"Utilizar Carta\");\n\n view.setValorAtaque(String.valueOf(((Profesor) carta).getPuntosHabilidad()));\n view.setValorDefensa(\" \");\n } else if (carta instanceof Carrete) {\n atacarButton.setEnabled(false);\n defendermeButton.setEnabled(true);\n defendermeButton.setText(\"Utilizar Carta\");\n view.setValorDefensa(String.valueOf(((Carrete) carta).getPuntosHabilidad()));\n view.setValorAtaque(\" \");\n\n }\n\n if (jugador.getPrioridad() == 0) {\n juego.setGanador(jugador2.getName());\n view.setVisible(false);\n }\n if (jugador2.getPrioridad() == 0) {\n juego.setGanador(jugador.getName());\n view.setVisible(false);\n }\n return carta;\n }\n else {\n if (jugador.getPrioridad() > jugador2.getPrioridad()) {\n juego.setGanador(jugador.getName());\n view.setVisible(false);\n }\n else if(jugador.getPrioridad() < jugador2.getPrioridad()) {\n juego.setGanador(jugador2.getName());\n view.setVisible(false);\n }\n else {\n juego.setGanador(\"EMPATE\");\n view.setVisible(false);\n }\n return null;\n }\n }", "Jugador consultarGanador();", "private static void tourJeu(){\n\n\t\twhile(true){\n\t\t\tconsole.afficherEtatJoueurs();\n\t\t\tpasserTour();\n\t\t\tconsole.quelJoueurJoue(tour);\n\t\t\tconsole.afficherJeu();\n\t\t\tconsole.afficherDirectionAssam();\n\n\t\t\tint n;\n\t\t\twhile ((n = console.demanderNbDeplacement()) == -1 );\n\n\t\t\tconsole.afficherDirectionChoisie(n);\n\t\t\tdemanderDeplacerAssam(n);\n\n\n\t\t\tif(joueurElimine == jeu.getJoueurs().length-1){\n\t\t\t\tpasserTour();\n\t\t\t\tconsole.afficherGagnant(tour);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(verifTapis()){\n\t\t\t\tstatistique();\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public JogoVelha(Jogador jogador1, Jogador jogador2) {\r\n // recebe os jogadores\r\n this.jogador1 = jogador1;\r\n this.jogador2 = jogador2;\r\n this.sncpu = false;\r\n \r\n }", "public Juego(String nombreJ1, String nombreJ2){\r\n\t\tMINATR = 3;\r\n\t\tMAXATR = 6;\r\n\t\tjugador1 = new Jugador(nombreJ1);\r\n\t\tjugador2 = new Jugador(nombreJ2);\r\n\t\tjugadorEnTurno = jugador1;\r\n\t}", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "public Jogador jogadorDaVez() {\r\n Jogador jogadorvez = null;\r\n \r\n if (this.vezDoJogador1 ){\r\n jogadorvez = jogador1; \r\n }else{\r\n jogadorvez = jogador2;\r\n }\r\n return jogadorvez;\r\n }", "public void lancerJeu () {\n switch (choixModeJeu) {\n case \"C\":\n Jeu jeuJoueC = new JeuChallenger(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueC.unJeu();\n break;\n case \"U\":\n Jeu jeuJoueU = new JeuDuel(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueU.unJeu();\n break;\n case \"D\":\n Jeu jeuJoueD = new JeuDefenseur(modeDev, choixJeu, nbdeCouleur, nbessaiPossible, longueurduSecret);\n jeuJoueD.unJeu();\n break;\n default:\n LOG.error(\"Cas du choix du mode de jeu non géré\");\n break;\n }\n }", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "public Joueur(String nom2, String prenom2, Date dateDeNaissance2, String motDePasse2, int numbreJ,\n\t\t\tint dernierNiveau2, LinkedList<PartieJeu> list) {\n\t\tnom = nom2;\n\t\tprenom = prenom2;\n\t\tdateDeNaissance = dateDeNaissance2;\n\t\tmotDePasse = motDePasse2;\n\t\tdernierNiveau = dernierNiveau2;\n\t\tnumerojouer = numbreJ;\n\t\tListPartie = list;\n\t}", "public Jugador jugador() {\r\n\treturn jugador;\r\n }", "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "public Jugador getJugador1() {\n\t\treturn jugador1;\n\t}", "public Jugador ganador(){\n return partida.ganador();\n }", "private void iniciarRondaJuego() {\n\n\t\tthis.mostrarMensaje(\"bloqueando al servidor para despertar al jugador 1\");\n\t\tbloqueoJuego.lock();\n\n\t\t// despertar al jugador 1 porque es su turno\n\t\ttry {\n\t\t\tthis.mostrarMensaje(\"Despertando al jugador 1 para que inicie el juego\");\n\t\t\tjugadores[0].setSuspendido(false);\n\t\t\tjugadores[1].setSuspendido(false);\n\t\t\tesperarInicio.signalAll();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tthis.mostrarMensaje(\"Desbloqueando al servidor luego de despertar al jugador 1 para que inicie el juego\");\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\t}", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "private Jugador oponente(Jugador jugador,Jugador[] jugadores){\r\n for (Jugador jugador1 : jugadores) {\r\n if (jugador1!=jugador){\r\n return jugador1;\r\n }\r\n }\r\n return null;\r\n }", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public Jogador getJogador2() {\r\n return jogador2;\r\n }", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "public void changerJoueur() {\r\n\t\t\r\n\t}", "public void jouer(Joueur joueur, int posX1, int posY1, int posX2, int posY2){\n\t\t\n\t\tcoefficientCombo = 1;\n\t\t\n\t\t\n\t\t\n\t\tif(joueur == joueurCourant){\t\t\t\t\t//On vérifie si c'est son tour de jouer\n\t\t\tif( verifVoisin(posX1, posY1, posX2, posY2)){\t\t\t\t//On vérifie si les cristaux joués sont voisins\n\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\t\t\t\t//On switch les cristaux dans le tableau \n\t\t\t\tArrayList<ArrayList<Integer>> tabs = chercheBlock(posX1, posY1);\t//On cherche si des blocks de cristaux de même couleur ont été formés et on stocks leurs coordonnées dans tab\n\t\t\t\tArrayList<ArrayList<Integer>> tabs2 = chercheBlock(posX2, posY2);\n\t\t\t\t\n\t\t\t\t/*for (ArrayList<Integer> arrayList : tabs) { //Affichage des coordonnées stockées dans tab\n\t\t\t\t\tfor(Integer i : arrayList){\n\t\t\t\t\t\tSystem.out.print(i);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tfaireLeMenage(tabs2);\n\t\t\t\tfaireLeMenage(tabs);\t\t//On \"supprime\" les cristaux listés dans tab\n\t\t\t\trestructurer();\t\t\t\t//On réagence le tableau en supprimant les cases vides, les cristaux au dessus glissent vers le bas, les cases hautes laissées vides sont remplies aléatoirement\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//trouverCombo();\n\t\t\t\t\n\t\t\t\tif(tabs.size() == 0 && tabs2.size()==0)\t\t//Aucun block n'a été renvoyé\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"reswitch\");\n\t\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Ces deux cristaux ne sont pas voisins\");\n\t\t\t}\n\t\t\t\t\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Ce n'est pas à \" + joueur.getNom() + \" de jouer...\");\n\t\t\tSystem.out.println(\"C'est au tour de \" + joueurCourant.getNom() + \" de jouer...\");\n\t\t}\n\t\t\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "public void golpearJugador(Jugador j) {\n\t\t\n\t}", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "private void setupEscenario2( )\n {\n String todasMarcadas, casillasSinMarca;\n String[] marcadas, noMarcadas;\n int casilla;\n // Prepara el tablero\n triqui = new Triqui( );\n\n // Primer jugador\n\n marcaJugador1 = \"X\";\n todasMarcadas = \"1,2,3,4\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador1 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador1 );\n casillasJugador1.add( new Integer( casilla ) );\n }\n\n // Segundo jugador\n\n marcaJugador2 = \"O\";\n todasMarcadas = \"5,6,7,8\";\n marcadas = todasMarcadas.split( \",\" );\n casillasJugador2 = new ArrayList( );\n\n for( int i = 0; i < marcadas.length; i++ )\n {\n casilla = Integer.parseInt( marcadas[ i ] );\n triqui.marcarCasilla( casilla, marcaJugador2 );\n casillasJugador2.add( new Integer( casilla ) );\n }\n\n // Casillas sin marcar\n\n casillasSinMarca = \"9\";\n noMarcadas = casillasSinMarca.split( \",\" );\n casillasSinMarcar = new ArrayList( );\n\n for( int i = 0; i < noMarcadas.length; i++ )\n {\n casilla = Integer.parseInt( noMarcadas[ i ] );\n casillasSinMarcar.add( new Integer( casilla ) );\n }\n }", "private static void menuManejoJugadores() {\n\t\tint opcion;\n\t\tdo{\n\t\t\topcion=menuManejoJugadores.gestionar();\n\t\t\tgestionarMenuManejoJugador(opcion);\n\t\t}while(opcion!=menuManejoJugadores.getSALIR());\n\t}", "public List<Partida> getNextPartida(String partidaId,String jugadorId){\n String consulta = \"SELECT p FROM Partida p WHERE p.id > \" + partidaId + \" AND p.jugador1.id = \"+ \"'\" + jugadorId +\"' OR p.jugador2 = \"+ \"'\" + jugadorId+\"' ORDER BY p.id ASC\";\n\n List<Partida> partida = em.createQuery(consulta, Partida.class).getResultList();\n\n return partida;\n }", "public void setJoueur1(String joueur1) {\r\n\t\tthis.joueur1 = joueur1;\r\n\t}", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public FaseDescartes faseJuego();", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "public static void EjecutaEjercicio1PD(String entrada) {\n\t\tEjercicio1.iniDatos(entrada);\n\t\t\n\t\t// Declarar vértice de inicio para el grafo:\n\t\tVerticeAlumno verticeInicial = VerticeAlumno.verticeInicial();\n\t\n\t\t// Inicializar el grafo virtual:\n\t\t/*\n\t\t * 2 vías:\n\t\t * \t· Con peso en el vértice.\n\t\t * \t· Con peso en las aristas. \n\t\t*/ \n\t\t\n\t\t// Inicializa un grafo virtual de tipo simpleVirtualGraph a partir del vértice inicial con peso:\n\t\tEGraph<VerticeAlumno, AristaAlumno> grafoVirtual = Graphs2.simpleVirtualGraph(verticeInicial, x -> x.getEdgeWeight());\t\n\t\t\n\t\t// Invocar el algoritmo de Programación Dinámica: \n\t\t/*\n\t\t * 2 vías: \n\t\t * · Expresando el vértice final de destino.\n\t\t * · Mediante un predicado objetivo.\n\t\t*/\n\t\tDynamicProgrammingReduction<VerticeAlumno, AristaAlumno> algoritmoPD = DPR.dynamicProgrammingReductionGoal(\n\t\t\t\t\t\tgrafoVirtual,\n\t\t\t\t\t\tVerticeAlumno.objetivo(),\n\t\t\t\t\t\tHeuristicaAlumno::heuristica,\n\t\t\t\t\t\tPDType.Max\n\t\t\t\t\t\t);\n\t\t\n\t\t// Proporciona un camino devuelto por PD desde el vértice inicial al objetivo:\n\t\tGraphPath<VerticeAlumno, AristaAlumno> caminoPD = algoritmoPD.search().get();\n\t\t\n\t\t// Solución: lista de aristas recorridos del grafo: \n\t\tList<AristaAlumno> aristas = caminoPD.getEdgeList();\n\t\tSystem.out.println(\"$$$$$$$$$$$$$$$$$ PROGRAMACIÓN DINÁMICA $$$$$$$$$$$$$$$$$$\");\n\t\tSolucion1.solucion(aristas, entrada);\n\t\t\n\t\t// DEBUG:\n\t\t/*\n\t\t * List<VerticeAlumno> vertices = caminoA.getVertexList();\n\t\t * System.out.println(vertices);\n\t\t*/\n\t\t\n\t}", "public FrmPartida(JugadorPartida jp){\n initComponents();\n PnlPartida.setVisible(false);\n jugadorPartida = jp;\n this.setTitle(\"Jugador: \" + jp.getJugador().getNombreUsuario() + \" - Esperando en Lobby...\"); \n controller = new PartidaController(this, jugadorPartida);\n lblNumeroJugadores.setText(\"Jugadores esperando: \" + jp.getPartida().getColJugadores().size()); \n btnTirarCarta.setEnabled(false);\n pozo = (jugadorPartida.getPartida().getValorApuesta() * 3);\n \n \n \n \n }", "public Player getPlayer2(){\n return jugador2;\n }", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "private Malote buscaMaloteDestino(Localidade destinoMalote) {\n\t\tlogger.info(\"buscar Malote Destino:\"+destinoMalote.getDescricao());\r\n\t\t\t\t\t\t \r\n\t\tLocalidade destinoFinal = destinoMalote;\r\n\t\tTipoMalote tipoMalote = TipoMalote.SEPEX;\r\n\t\t\r\n\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.VARAS_INT) &&\r\n\t\t\t\tdestinoMalote.temCodUnidadeAdmCentral()) {\r\n\t\t\tlogger.info(\"<<< malote seadm interior >>\");\r\n\t\t\tdestinoFinal = destinoMalote.getUnidadeAdmCentral();\r\n\t\t\ttipoMalote = TipoMalote.SEADM_INT;\r\n\t\t} else {\r\n\t\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.INTERNO) && destinoMalote.isAgrupado()) {\r\n\t\t\t\tlogger.info(\"<<< malote agrupado >>\");\r\n\t\t\t\tdestinoFinal = destinoMalote.getMaloteAgrupado();\r\n\t\t\t} else {\t\t\r\n\t\t\t\tlogger.info(\"<<< malote interno nao agrupado>>>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tStringBuilder sb = new StringBuilder(\"from Malote m \");\r\n\t\tsb.append(\"where m.fechado = false and \");\r\n\t\tsb.append(\"m.tipoMalote = :pTipoMalote \");\r\n\t\tsb.append(\"and m.destino = :pDestino\");\r\n\t\tQuery q = em.createQuery(sb.toString());\r\n\t\tq.setParameter(\"pTipoMalote\", tipoMalote);\r\n\t\tq.setParameter(\"pDestino\", destinoFinal);\r\n\t\t\r\n\t\tMalote maloteEnviar = (Malote) q.getSingleResult();\r\n\t\t\r\n\t\tif (null == maloteEnviar) {\r\n\t\t\tlogger.info(\"<<<bmd - malote novo>>\");\r\n\t\t\tLocalidadeManager locDAO = new LocalidadeManager();\r\n\t\t\tmaloteEnviar = new Malote();\r\n\t\t\tmaloteEnviar.setDestino(destinoFinal);\r\n\t\t\t// rem : sepex ou sistema\r\n\t\t\tmaloteEnviar.setRemetente(locDAO.remetenteSepex());\r\n\t\t\tmaloteEnviar.setTipoMalote(tipoMalote);\r\n\t\t\tmaloteEnviar.setDtEnvio(Calendar.getInstance().getTime());\r\n\t\t\tsalva(maloteEnviar);\r\n\t\t\t//closeSession();\r\n\t\t}\r\n\t\treturn maloteEnviar;\r\n\t}", "public static void main(String[] args) {\n\n\t\tDepartamento dep40= new Departamento ( 40, \"Formacion\", null );\n\t\t\n\t\t\n\t\tEmpleado emp1 =new Empleado(1,\"paco\",\"perez\",\"h\", 5000, 28, 5, dep40) ;\n\t\t\n\t\t// para introducir el departaementp \n\t\t\n\t\t//primer metodo\n\t\t\n\t\t\n\t\t\t\t\n\t\tEmpleado emp2 =new Empleado(2,\"luis\",\"sanchez\",\"h\", 4000, 45, 2, dep40) ;\t\n\t\tEmpleado emp3 =new Empleado(4, \"javi\", \"perez\", \"h\", 8000, 54, 0.2, dep40);\n\t\t\t\t\n\t\t\n\t\t\t\t\n\t\t\n\t\tSystem.out.println(emp1);\n\t\tSystem.out.println(emp2);\t\n\t\tSystem.out.println(emp3);\n\t\t\n\t\tdep40.setJefe(emp1); // adjudico el Jefe al departamento 40\n\t\t\n\t\t\n\t\t// creo un departaemnto nuevo adjudicado a un empleado ade un departamento inicial ( no tienen por que ser el departamento del que ahora le reclama) usando el constructoe directamente ne vez de la variable que alude a la clase\n\t\t//departamento= new Departamento(120, \"formacion\", jefe)\n\t\tDepartamento dep120 = new Departamento (120, \"formacion\", new Empleado(5, \"luisa\", \"sanchez\", \"M\", 14000, 35, 2, dep40)); //he creado un empleado del depto 30 y luego le hago jefe del 120\n\t\t dep120.getJefe().setDepartamento(dep120); /* actuando con dos variables. como ese new empleado no tiene variable adjudicada \n\t\t *y tengo que hacer alusion a Úl para cambiaer en el empleado su departaemento , me valgo del un metodo dep120.getJefe()que averigua qcual es la direccion de ese empleado en la tabla departamento y con un set le ingerso el departaento nuievo\n\t\t \n\t\t \n\t\t */\n\t\t System.out.println (\"departaqmento 120\" + dep120.getJefe().getNombre());\n\t\t\n\t/* SALIDA POR CONSOLA :\n\t * el niombre del emp2, su salario y el nombre del departamento al que pertenence.\t// \n\t\t* como el nombre departamento no es un atributo normal sino que es NDE una clase relacionada .SE INVOCA AL GET DE LL ATRIBUTO INCLUIDO CONN LA CLASE Y TRAS EL LOS METODOS GET DE LA CLASE DEPARTAMENTO EN ESTE CLASO EL DEL CAMPO NOMBRE DEL DEPARTAMENTO\n\t*/\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre().toUpperCase());\n\t\t/*\n\t\t * el empleado \n\t\t * \n\t\t * */\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\" nombre emp2:\"+emp2.getNombre()+ \" su salalrio es\"+ emp2.getSalario()+\" , su departamento es: \"+emp2.getDepartamento().getNombre());\n\tSystem.out.println(dep120);\n\t// OJO SE BUCLA POR QUE LOS TO STRING DE DEPARTAEMNTO Y CLIENTE SE CRIUZARIAN DEBORDANDO LA MEMORIA. PUEDO HACER VARIAS COSAS\n\t/* PUEDO QUITAR DEUNO DE LOS TO STRING DE UNA CLASE O DE LA OTRA SEGUN ME INTERESE EL CAMPO QUE LAS LIGA ( PEJ DEPARTAMENTO EN EMPLEADO)\n\t * PUEDO CREAR UN METODO QUE SALVE LA CONDICION DE NULL SI ALGUNA VARIABLE ESTA VACICA.\n\t * \n\t * \n\t */\n\t//SALIDA DEL NOMBRE DEL JEFE DEL DEAPARTAEMENTO QUE SEA POR EJEMPLO DE UN EMPLEADO ()\n\t\n\tSystem.out.println ( dep120.getJefe().getNombre()); //get jefe me dedevuelve el monbre de jefe dela tabala departaemnto. get Nombre me devuelve de la tabla empleados el nombre que estaba como jefe en departamento.\n\tSystem.out.println (\"el jefe de emp2 luis: \"+ emp2.getDepartamento().getJefe().getNombre());\n\tSystem.out.println(dep120);\n\t\n\t\n\t\n\t\n\t}", "@Override\n public synchronized void demarrer(){\n if(modele.getQuiterJeu()){return;}\n modele.getMoteurJeu().setEtapeJeu(this);\n // apercu dans le termial pour debuger\n System.out.println(\"-----------------nom joueur: \"+modele.getJoueurCourant().getNom());\n System.out.print(\" humain: \"+modele.getJoueurCourant().estHumain());\n System.out.print(\" stand: \"+modele.getJoueurCourant().getMainCourant().getStand());\n System.out.print(\" perdu: \"+modele.getJoueurCourant().getMainCourant().estPerdu());\n System.out.print(\" blackjack: \"+modele.getJoueurCourant().getMainCourant().estBlackJack());\n System.out.println(\" jeu: \"+modele.getJoueurCourant().getMainCourant().getJeu().toString());\n //-------------------------------------------------\n // On ne fait pas une boucle ici pour que l'observer\n // puisse acceder a son observé et se mettre a jour\n //-------------------------------------------------\n new Thread(){\n @Override\n public void run() {\n try {\n // si plus de carte\n if(modele.getPioche().getCartes().size() < 1){\n for(Carte carte:modele.getDefausse().getCartes()){\n carte.setFaceCarte(Face.VERSO);\n modele.getPioche().ajouterDessous(carte);\n }\n modele.getDefausse().vider();\n modele.getPioche().melanger();\n }\n \n \n // si il peut plus jouer\n if(modele.getJoueurCourant().getMainCourant().estBlackJack() || modele.getJoueurCourant().getMainCourant().estPerdu() \n || modele.getJoueurCourant().getMainCourant().getStand() || modele.getJoueurCourant().getMainCourant().est21()\n || modele.getJoueurCourant().getMainCourant().getAAbandonner() || modele.getJoueurCourant().getAPerduJeu()){\n \n // si le joueur a une autre main\n if(modele.getJoueurCourant().mainSuivant()){\n Thread.sleep(2000);\n demarrer();\n \n }\n // sinon si il y a un joueur suivant on fait joueur suivant\n else if(modele.joueurSuivant()){\n Thread.sleep(2000);\n demarrer();\n }else{\n modele.getMoteurJeu().setEtapeJeu(etapeSuivant);\n Thread.sleep(2000);\n modele.setMessage(modele.getCroupier().getNom()+\" plays\");\n // on affiche les carte du croupier\n for(Carte carte: modele.getCroupier().getMainCourant().getJeu().getCartes()){\n carte.setFaceCarte(Face.RECTO);\n }\n System.out.println(\"+++++++++++++++++++++++++++++++++++++++++++++++++\");\n Thread.sleep(3000);\n demarrerEtapeSuivant();\n\n }\n\n }\n // sinon\n else{\n modele.setMessage(modele.getJoueurCourant().getNom()+\" plays\");\n if(!modele.getJoueurCourant().estHumain()){\n modele.getJoueurCourant().jouer(modele.getPioche(),modele.getDefausse());\n Thread.sleep(3000);\n demarrer();\n }\n \n\n }\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }.start();\n \n }", "public Jogador getJogador1() {\r\n return jogador1;\r\n }", "public List<Listas_de_las_Solicitudes> Mostrar_las_peticiones_que_han_llegado_al_Usuario_Administrador(int cedula) {\n\t\t//paso3: Obtener el listado de peticiones realizadas por el usuario\n\t\tEntityManagerFactory entitymanagerfactory = Persistence.createEntityManagerFactory(\"LeyTransparencia\");\n\t\tEntityManager entitymanager = entitymanagerfactory.createEntityManager();\n\t\tentitymanager.getEntityManagerFactory().getCache().evictAll();\n\t\tQuery consulta4=entitymanager.createQuery(\"SELECT g FROM Gestionador g WHERE g.cedulaGestionador =\"+cedula);\n\t\tGestionador Gestionador=(Gestionador) consulta4.getSingleResult();\n\t\t//paso4: Obtener por peticion la id, fecha y el estado\n\t\tList<Peticion> peticion=Gestionador.getEmpresa().getPeticions();\n\t\tList<Listas_de_las_Solicitudes> peticion2 = new ArrayList();\n\t\t//paso5: buscar el area de cada peticion\n\t\tfor(int i=0;i<peticion.size();i++){\n\t\t\tString almcena=\"\";\n\t\t\tString sarea=\"no posee\";\n\t\t\tBufferedReader in;\n\t\t\ttry{\n\t\t\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\"C:/area/area\"+String.valueOf(peticion.get(i).getIdPeticion())+\".txt\"), \"utf-8\"));\n\t\t\t\ttry {\n\t\t\t\t\twhile((sarea=in.readLine())!=null){\n\t\t\t\t\t\tint s=0;\n\t\t\t\t\t\talmcena=sarea;\n\t\t\t\t\t}\n\t\t\t\t\tin.close();\n\t\t\t\t\tSystem.out.println(almcena);\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\t\n\t\t\t\n\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\t//paso6: Mostrar un listado de peticiones observando el id, la fecha de realizacion de la peticion, hora de realizacion de la peticion, y el estado actual de la peticion\n\t\t\tListas_de_las_Solicitudes agregar=new Listas_de_las_Solicitudes();\n\t\t\tagregar.setId(String.valueOf(peticion.get(i).getIdPeticion()));\n\t\t\tagregar.setFechaPeticion(peticion.get(i).getFechaPeticion());\n\t\t\tagregar.setNombreestado(peticion.get(i).getEstado().getTipoEstado());\n\t\t\tagregar.setArea(almcena);\n\t\t\tpeticion2.add(agregar);\n\t\t\t\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"el usuario existe\");\n\t\treturn peticion2;\n\t\t//aun no se\n\t}", "public Joueur(String nomJoueur){\n\t\tthis.nom= nomJoueur;\n\t\tthis.cartesEnMain=new Main();\n\t\tthis.pileCartes=new Pile();\n\t\tthis.estDansPartie = true;\n\t\tthis.estDansBataille = true;\n\t}", "public void actualizarPantallaJuego(float delta)\r\n {\r\n //recuadroInfoJuego.actualizarTiempo(delta); // Con esto actualizamos el tiempo del HUD\r\n\r\n // Con el siguiente ciclo actualizamos el movimiento o posicion de los monstruos\r\n for (int i=0; i < enemigos.size(); i++)\r\n {\r\n // Metodo encargado de renovar las posiciones dado un diferencial de tiempo\r\n enemigos.get(i).actualizarPosicion(delta);\r\n\r\n // En caso que el enemigo haya muerto entonces\r\n if (enemigos.get(i).haMuerto())\r\n {\r\n // Se lo pasamos al jugador contrario de modo que\r\n try\r\n {\r\n // Le enviamos un mensaje sobre que tipo de enemigo debe generar de manera aleatoria\r\n String aux = \"Transferir enemigo: \" + enemigos.get(i).getTipo() + \"\\n\";\r\n socketCliente.getOutputStream().write(aux.getBytes());\r\n }\r\n catch (Exception e)\r\n {\r\n e.printStackTrace();\r\n }\r\n\r\n // Se suma su valor en puntaje al puntaje general obtenido por el usuario\r\n recuadroInfoJuego.agregarPuntaje(enemigos.get(i).getPuntaje());\r\n\r\n // Luego, se suma uno al numero total de enemigos eliminados por el jugador\r\n recuadroInfoJuego.anotarEnemigo();\r\n\r\n // Y se elimina el monstruo de la lista de enemigos\r\n enemigos.remove(i);\r\n i = i - 1;\r\n }\r\n }\r\n\r\n // Si ya se cumplio el tiempo para generar otro monstruo entonces\r\n if (contaTiempo >= tiempoParaGeneracion)\r\n {\r\n // Agregamos un nuevo enemigo aleatorio en coordenas generadas tambien de manera aleatoria\r\n enemigos.add(new Monstruo(MathUtils.random(0, MainGame.ANCHO_VIRTUAL), MathUtils.random(0, MainGame.ALTO_VIRTUAL), MathUtils.random(1,5), true));\r\n\r\n // Y reseteamos el contador de tiempo\r\n contaTiempo = 0;\r\n }\r\n\r\n // O si se detecto que me pasaron un monstruo entonces\r\n if (enemigoTransferido != -1)\r\n {\r\n // Genero el tipo de monstruo especificado en coordenadas aleatorias\r\n enemigos.add(new Monstruo(MathUtils.random(0, MainGame.ANCHO_VIRTUAL), MathUtils.random(0, MainGame.ALTO_VIRTUAL), enemigoTransferido, true));\r\n\r\n // Y reinicio el dectector de monstruos tranferidos\r\n enemigoTransferido = -1;\r\n }\r\n\r\n contaTiempo = contaTiempo + delta; // Por ultimo se cuenta el tiempo\r\n }", "@Override\n\tpublic void ingresarFicha(VideoJuego juego) {\n\t\t\n\t}", "public static void jugador(BufferedReader lee) throws IOException {\n ODB odb = ODBFactory.open(\"jugadores.db\");\n \n Jugador j = null;\n Pais p = null;\n IQuery query = null;\n \n System.out.println(\"Nombre\");\n String nombre = lee.readLine();\n nombre = nombre.substring(0, 1).toUpperCase() + nombre.substring(1).toLowerCase();\n \n System.out.println(\"Deporte\");\n String deporte = lee.readLine();\n \n System.out.println(\"Ciudad\");\n String ciudad = lee.readLine();\n \n System.out.println(\"Edad\");\n int edad = Integer.parseInt(lee.readLine());\n \n System.out.println(\"Pais\");\n String npais = lee.readLine();\n \n query = new CriteriaQuery(Pais.class, Where.equal(\"nombrepais\", npais));\n Objects<Pais> objects = odb.getObjects(query);\n \n if (objects.isEmpty()) {\n System.out.println(\"No existe el pais seleccionado\");\n \n System.out.println(\"ID\");\n int id = Integer.parseInt(lee.readLine());\n \n p = new Pais(id, npais);\n \n odb.store(p);\n } else {\n p = objects.getFirst();\n }\n \n j = new Jugador(nombre, deporte, ciudad, edad, p);\n \n odb.store(j);\n \n odb.close();\n }", "public static void passerTour(){\n\t\tif(tour<jeu.getJoueurs().length){\n\t\t\ttour++;\n\t\t}\n\t\telse {\n\t\t\ttour = 1;\n\t\t}\n\t\tfor(int i=0;i<joueurElimine;i++){\n\t\t\tif(jeu.getJoueurs()[tour-1].getMonnaie()==0){\n\t\t\t\tif(tour<jeu.getJoueurs().length){\n\t\t\t\t\ttour++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttour = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public String retirarJugador(Jugador jugadorParaRetirar) {\n\n\t\tboolean retirado = false;\n\n\t\tfor (int i = 0; !retirado && i < this.jugadoresEnMesa.size(); i++) {\n\t\t\tif (this.jugadoresEnMesa.get(i).getId() == jugadorParaRetirar.getId()) {\n\n\t\t\t\tListaJugadores.jugadoresRetirados.add(jugadorParaRetirar);\n\n\t\t\t\tthis.jugadoresEnMesa.remove(i);\n\t\t\t\ti--;\n\t\t\t\tretirado = true;\n\n\t\t\t}\n\t\t}\n\n\t\tString mensajeRetirada;\n\t\tif (retirado) {\n\t\t\tmensajeRetirada = \"%s ha sido retirado.%s\";\n\t\t\tif (jugadorParaRetirar.getCredito() < 0)\n\t\t\t\tEasterEgg.huevoDePascua(jugadorParaRetirar.getNombre());\n\n\t\t\telse {\n\n\t\t\t\tif (jugadorParaRetirar.getCredito() == 0)\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Se le ha agotado el crédito.\");\n\n\t\t\t\telse if (jugadorParaRetirar.getCredito() >= jugadorParaRetirar.getCreditoObjetivo())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado su crédito objetivo\");\n\n\t\t\t\telse if (jugadorParaRetirar.getRondas() >= jugadorParaRetirar.getRondasMaximas())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado sus rondas máximas\");\n\n\t\t\t\telse\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(), \"\");\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tmensajeRetirada = \"No se ha podido retirar al jugador.\";\n\t\t}\n\n\t\treturn mensajeRetirada;\n\n\t}", "public static void actualizarCreencias(int id) {\n\t\tint j =0;\t\t\n\t\t//Actualizamos las creecias del jugador \n\t\tint i =0;\n\t\tfor(j =0; j < GestorPartida.getContJugadores();j++) {\n\t\t\t\n\t\t\t\n\t\t\tif(GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t//Filtramos que los jugadores que vayan a actualizar sus creencias sean los de la sala del jugador que acaba de realizar una accion, excepto las suyas propias\t\t\t\n\t\t\t\tif(GestorPartida.getJugadores()[j].getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala()) && GestorPartida.getJugadores()[j].getId() != id) {\n\t\t\t\t\t//Actualizamos la sala por si el jugador se acaba de mover\n\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setSalaPersona(GestorPartida.getJugadores()[j].getSala(), i);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosJugador();j++) {\n\t\t\t//Comprobamos que el jugador coincida con un poseedor de un objeto\n\t\t\tif(GestorPartida.getObjetoJugador()[j].getJugador().getSala().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoJugador()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoJugador()[j].getJugador().getNombre(), x);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(j = 0; j < GestorPartida.getContObjetosSala();j++) {\n\t\t\t//Comprobamos si hay objetos en la sala del jugador\n\t\t\tif(GestorPartida.getObjetoSala()[j].getSala().getNombre().equalsIgnoreCase(GestorPartida.getJugadores()[id].getSala())) {\n\t\t\t\tfor(int x =0; GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x]!=null ; x++) {\n\t\t\t\t\t//Cogemos la posicion del objeto donde esta el objeto dentro de las creencias\n\t\t\t\t\tif(GestorPartida.getJugadores()[id].getCreencias().getNombreObjeto()[x].equalsIgnoreCase(GestorPartida.getObjetoSala()[j].getNombreObjeto())) {\n\t\t\t\t\t\tGestorPartida.getJugadores()[id].getCreencias().setLugarObjeto(GestorPartida.getObjetoSala()[j].getSala().getNombre(), x);\n\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t}", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "public static void main(String[] args) {\n\t\tSecretario s1 = new Secretario(\"Mauro\", \"Pérez\", \"2168\", \"Calle Falsa\", 999, 500, true, \"Fax\");\n\t\tVendedor v1 = new Vendedor(\"Pepe\", \"Martinez\", \"2177\", \"Calle de atras\", 998, 750, 669, \"Alguna\", 0.10);\n\t\tVendedor v2 = new Vendedor(\"Antonio\", \"Martinez\", \"2144\", \"Calle de delante\", 996, 750, 669, \"Alguna\", 0.10);\n\t\tJefeZona j1 = new JefeZona(\"Manolo\", \"Ortega\", \"2155\", \"Una calle\", 997, 1000, true);\n\t\t\n\t\tClientes c1 = new Clientes(\"Cliente 1\");\n\t\tClientes c2 = new Clientes(\"Cliente 2\");\n\t\t\n\t\ts1.setSupervisor(v1);\n\t\t\n\t\tv1.agregarCliente(c1);\n\t\tv1.agregarCliente(c2);\n\t\tv1.eliminarCliente(c1);\n\t\t\n\t\tj1.agregarVendedor(v1);\n\t\tj1.agregarVendedor(v2);\n\t\t\n\t\tSystem.out.println(v1.toString());\n\t\tv1.incrementarSalario();\n\t\tSystem.out.println(v1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(s1.toString());\n\t\ts1.incrementarSalario();\n\t\tSystem.out.println(s1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(j1.toString());\n\t\tj1.incrementarSalario();\n\t\tSystem.out.println(j1.toString());\n\t}", "public void modificarPlayer2(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador2=p;\n }\n }", "public void repartirGananciasDealer() {\n\t\t if(contieneJugador(ganador,\"dealer\")) {\n\t\t\t if(verificarJugadaBJ(manosJugadores.get(3))) {\n\t\t\t\t System.out.println(\"Pareja nombre agregado dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores() + 15;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\", cantidadGanancia));\n\t\t\t }else {\n\t\t\t\t System.out.println(\"Pareja nombre agregado --> dealer\");\n\t\t\t\t int cantidadGanancia = verificarCantidadGanadores()+10;\n\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t\t }\n\t\t }else {\n\t\t\t int cantidadGanancia = verificarCantidadGanadores();\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"dealer\",cantidadGanancia));\n\t\t }\n\t\t \n\t }", "private static boolean juega() {\r\n\t\tv.setMensaje( \"Empieza el nivel \" + nivel + \". Puntuación = \" + puntuacion + \r\n\t\t\t\". Dejar menos de \" + (tamanyoTablero-2) + \" pelotas de cada color. \" + (tamanyoTablero-1) + \" o más seguidas se quitan.\" );\r\n\t\t// v.setDibujadoInmediato( false ); // Notar la mejoría de \"vibración\" si se hace esto y (2)\r\n\t\twhile (!v.estaCerrada() && !juegoAcabado()) {\r\n\t\t\tPoint puls = v.getRatonPulsado();\r\n\t\t\tif (puls!=null) {\r\n\t\t\t\t// Pelota pelotaPulsada = hayPelotaPulsadaEn( puls, tablero ); // Sustituido por el objeto:\r\n\t\t\t\tPelota pelotaPulsada = tablero.hayPelotaPulsadaEn( puls );\r\n\t\t\t\tif (pelotaPulsada!=null) {\r\n\t\t\t\t\tdouble coordInicialX = pelotaPulsada.getX();\r\n\t\t\t\t\tdouble coordInicialY = pelotaPulsada.getY();\r\n\t\t\t\t\tv.espera(20); // Espera un poquito (si no pasa todo demasiado rápido)\r\n\t\t\t\t\t// Hacer movimiento hasta que se suelte el ratón\r\n\t\t\t\t\tPoint drag = v.getRatonPulsado();\r\n\t\t\t\t\twhile (drag!=null && drag.x>0 && drag.y>0 && drag.x<v.getAnchura() && drag.y<v.getAltura()) { // EN CORTOCIRCUITO - no se sale de los bordes\r\n\t\t\t\t\t\tpelotaPulsada.borra( v );\r\n\t\t\t\t\t\tpelotaPulsada.incXY( drag.x - puls.x, drag.y - puls.y );\r\n\t\t\t\t\t\tpelotaPulsada.dibuja( v );\r\n\t\t\t\t\t\trepintarTodas(); // Notar la diferencia si no se hace esto (se van borrando las pelotas al pintar otras que pasan por encima)\r\n\t\t\t\t\t\t// v.repaint(); // (2)\r\n\t\t\t\t\t\tpuls = drag;\r\n\t\t\t\t\t\tdrag = v.getRatonPulsado();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// Recolocar pelota en un sitio válido\r\n\t\t\t\t\trecolocar( pelotaPulsada, coordInicialX, coordInicialY );\r\n\t\t\t\t\tquitaPelotasSiLineas( true );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tpuntuacion -= (numMovimientos*PUNTOS_POR_MOVIMIENTO); // Se penaliza por el número de movimientos\r\n\t\tif (v.estaCerrada()) return false; // Se acaba el juego cerrando la ventana\r\n\t\tif (nivelPasado()) return true; // Se ha pasado el nivel\r\n\t\treturn false; // No se ha pasado el nivel\r\n\t}", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "private UsineJoueur() {}", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "private void pojedi (int i, int j) {\n\t\trezultat++;\n\t\tthis.zmija.add(0, new Cvor(i,j));\n\t\tthis.dodajZmiju();\n\t\tthis.dodajHranu();\n\t}", "public static void main(String[] args) {\n\t\tnew Ventana();\n/*\n\t\tCollection<MuroDeEnergia> muros = new ArrayList<MuroDeEnergia>();\n\t\tCollection<NaveInvasora> naves = new ArrayList<NaveInvasora>();\n\t\tBateria jugador = new Bateria();\n\t\t\n\t\tJuego.getInstancia();\n\t\tmuros = Juego.getInstancia().getMuros();\n\t\tnaves = Juego.getInstancia().getEnemigos();\n\t\tjugador = Juego.getInstancia().getJugador();\n\t\t\n\t\tIterator<MuroDeEnergia> i;\n\t\tfor (i = muros.iterator(); i.hasNext();) {\n\t\t\tMuroDeEnergia act = i.next();\n\t\t\tSystem.out.println(\"El muro \" + act.getCodigoMuro() + \" esta ubicado en: (\" + act.getCoordenadaX() + \", \" + act.getCoordenadaY() + \")\");\n\t\t}\n\t\t\n\t\tIterator<NaveInvasora> j;\n\t\tfor (j = naves.iterator(); j.hasNext();) {\n\t\t\tNaveInvasora act = j.next();\n\t\t\tSystem.out.println(\"El enemigo \" + act.getCodigoNave() + \" esta ubicado en: (\" + act.getCoordenadaX() + \", \" + act.getCoordenadaY() + \")\");\n\t\t}\n\t\t\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\n\t\tSystem.out.println(\"Hay \" + muros.size() + \" muros de energia.\");\n\t\tJuego.getInstancia().destruirMuro(1);\n\t\tSystem.out.println(\"El muro 1 fue destruido.\");\n\t\tmuros = Juego.getInstancia().getMuros();\n\t\tSystem.out.println(\"Hay \" + muros.size() + \" muros de energia.\");\n\t\t\n\t\tSystem.out.println(\"Hay \" + naves.size() + \" enemigos. El jugador tiene \" + jugador.getPuntos() + \" puntos.\");\n\t\tJuego.getInstancia().destruirNave(9);\n\t\tSystem.out.println(\"La nave 9 fue destruida.\");\n\t\tnaves = Juego.getInstancia().getEnemigos();\n\t\tSystem.out.println(\"Hay \" + naves.size() + \" enemigos. El jugador tiene \" + jugador.getPuntos() + \" puntos.\");\n\t\tSystem.out.println(\"Usted esta en el nivel \" + Juego.getInstancia().getDificultad());\n\t\tSystem.out.println(\"Destruyendo naves...\");\n\t\tint idNave = 0;\n\t\twhile(idNave < 15) {\n\n\t\t\tJuego.getInstancia().destruirNave(idNave);\n\n\t\t\tidNave++;\n\n\t\t}\n\t\tSystem.out.println(\"Todas las naves fueron destruidas. Usted esta en el nivel \" + Juego.getInstancia().getDificultad() + \".\");\n\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\t\t\n\t\tSystem.out.println(\"El jugador se mueve a la izquierda\");\n\t\tJuego.getInstancia().presionaFlechaIzq();\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\t\t\n\t\tSystem.out.println(\"El jugador se mueve a la izquierda\");\n\t\tJuego.getInstancia().presionaFlechaIzq();\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\n\t\tSystem.out.println(\"El jugador se mueve a la derecha\");\n\t\tJuego.getInstancia().presionaFlechaDer();\n\t\tSystem.out.println(\"El jugador esta ubicado en (\" + jugador.getCoordenadaX() + \", \" + jugador.getCoordenadaY() + \")\" );\n\n\t\tSystem.out.println(\"Se termina el juego:\");\n\t\tJuego.getInstancia().finalizarJuego();\n\t\t\n*/\n\t}", "public void asignarPersona(Jugador j){\r\n this.jugador = j;\r\n }", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public void Jouer(ThemeType themeDeJeu) throws Exception {\n\t\tEUREKA.listeQuestionffile();\n\t\tEUREKA.ChargerThemeDef();\n\t\t// On affiche la fenetre de partie Jeu apres ca on lance la partie\n\n\t\tif (!this.getListPartie().isEmpty()) {\n\n\t\t\tPartieJeu part = getListPartie().getLast();\n\n\t\t\tif (part != null && part.isPartieTermine() == false) {\n\t\t\t\t// Mettre les dernier Score et Cp de la dernier partie\n\n\t\t\t\tnew PartieJeu(part.getCp(), part.getScore());\n\t\t\t\t// Supprime la dernier partie qui pars complite\n\t\t\t\tthis.getListPartie().removeLast();\n\t\t\t}\n\t\t}\n\t\t// Instance la Partie Jeu par Interface\n\t\tnew PartieDeJeuInt(this, getQuestions(themeDeJeu), themeDeJeu);\n\t}", "public void updateJoueurs();", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "private void acabarJogo() {\n\t\tif (mapa.isFimDeJogo() || mapa.isGanhouJogo()) {\r\n\r\n\t\t\tthis.timer.paraRelogio();\r\n\r\n\t\t\tif (mapa.isFimDeJogo()) {//SE PERDEU\r\n\t\t\t\tJOptionPane.showMessageDialog(this, \"VOCÊ PERDEU\", \"FIM DE JOGO\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t} else {//SE GANHOU\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\r\n\t\t\t\t\t\t\"PARABÉNS \" + this.nomeJogador + \"! \" + \"TODAS AS BOMBAS FORAM ENCONTRADAS\", \"VOCÊ GANHOU\",\r\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\r\n\t\t\t\tiniciarRanking();//SE VENCEU MANDA O JOGADOR PRO RANKING\r\n\t\t\t}\r\n\t\t\tthis.voltarMenu();//VOLTA PRO MENU\r\n\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n //variable tipo local que recibe la opcion de nombre para el jugador\n int numeroDeOpcion;\n //acreditacion de los puntos iniciales\n puntosDeVida= 150*(nivel+1);\n puntosDeMana= 10*(nivel+1);\n //inicializacion del juego y preguntando si desea un nombre para el personaje\n \tSystem.out.println(\" ---->BIENVENIDO AL JUEGO<----\");\n \tSystem.out.println(\"\\nDesea ingresar un nombre a su personaje [S]si, [N]no\");\n \tScanner caracterNombre=new Scanner(System.in);\n \tString opcionTemp = caracterNombre.nextLine();\n \topcion = opcionTemp.charAt(0); //leyendo opcion\n \t//Ingresando un nombre por el jugador\n \tif(opcion=='s'||opcion=='S'){\n \t\tSystem.out.println(\"Ingrese el nombre:\");\n \t\tScanner cadenaNombre=new Scanner(System.in);\n \t\tnombrePersonaje=cadenaNombre.nextLine();\n \t}\n //Estableciendo nombre predeterminado por el juego\n else{\n \tnombrePersonaje=\"Jugador1\";\n \tSystem.out.printf(\"\\nSe le a asignado el personaje:\\t\"+nombrePersonaje); \n \t}\n do{\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n //Menu de opciones principales para el jugador\n System.out.println(\"\\n..MENU DE OPCIONES..\");\n System.out.println(\"1. A la carga.\"); //Inicia la battalla\n System.out.println(\"2.Tienda.\"); //Permite comprar articulos para la batalla\n System.out.println(\"3.zzZzzZzzZ(Dormir).\");//Permite recuperar al jugador a su estado inicial \n System.out.println(\"4.Status.\"); //Muestra las estadisticas del juego\n System.out.println(\"5.Mas Poder!!!.\"); //Para aumento de nivel del juego \n System.out.println(\"6.Salir.\"); //finaliza las acciones y sale del juego\n do{//validando el numero de opcion\n System.out.println(\"Ingrese el numero de opcion:\");\n numeroDeOpcion= scanner.nextInt();\n }\n while(numeroDeOpcion<1 || numeroDeOpcion>6);\n //comparando la opcion ingresada\n switch(numeroDeOpcion){\n //mostrando los casos existentes por comparar\n case 1:{\n do{\n batalla();//llamando a la funcion batalla\n //Validando la repeticion de la fuencion o su finalizacion\n System.out.println(\"\\nDesea otra Batalla? [S]i, [N]o\");\n Scanner caracterBatalla=new Scanner(System.in);\n String opcionTemp1 = caracterBatalla.nextLine();\n repetirOpcion = opcionTemp1.charAt(0);\n opcionMiedo=0; //reiniciando la opcion miedo\n } \n //condicion del bucle para la funcion batalla \n while(repetirOpcion=='s'||repetirOpcion=='S');\n break;\n }\n case 2:{\n do{\n tienda();//llamando a la funcion tienda\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea realizar otra compra? [S]i, [N]o\");\n Scanner caracterTienda=new Scanner(System.in);\n String opcionTemp2 = caracterTienda.nextLine();\n repetirOpcion2 = opcionTemp2.charAt(0);\n }\n //condicion de bucle para la funcion tienda\n while(repetirOpcion2=='s'||repetirOpcion2=='S');\n break;\n }\n case 3:{\n do{\n dormir();//llamando a la funcion dormir\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea volver a dormir? [S]i, [N]o\");\n Scanner caracterDormir=new Scanner(System.in);\n String opcionTemp3 = caracterDormir.nextLine();\n repetirOpcion3 = opcionTemp3.charAt(0);\n }\n //condicion de bucle para la funcion dormir \n while(repetirOpcion3=='s'||repetirOpcion3=='S');\n break;\n }\n case 4:{\n do{\n status();//llamando a la funcion status\n //validando su repeticion\n System.out.println(\"\\nMostrar nuevamente? [S]i, [N]o\");\n Scanner caracterStatus=new Scanner(System.in);\n String opcionTemp4 = caracterStatus.nextLine();\n repetirOpcion4 = opcionTemp4.charAt(0);\n }\n //condicion de bucle para la funcion status \n while(repetirOpcion4=='s'||repetirOpcion4=='S');\n break;\n }\n case 5:{\n do{\n poder();//llamando a la funcion poder\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea mas poder? [S]i, [N]o\");\n Scanner caracterPoder=new Scanner(System.in);\n String opcionTemp5 = caracterPoder.nextLine();\n repetirOpcion5 = opcionTemp5.charAt(0);\n }\n //condion de bucle para la funcion poder \n while(repetirOpcion5=='s'||repetirOpcion5=='S');\n break;\n }\n \tdefault:{\n System.exit(0);//saliendo del juego\n break;\n }\n }\n //validacion del retorno al menu principal\n System.out.println(\"volver al menu [S]si, [N]no?\");\n Scanner caracterVolver=new Scanner(System.in);\n String opcionTemp6 = caracterVolver.nextLine();\n opcionSalir=opcionTemp6.charAt(0);\n }\n //condicion del bucle para menu principal\n while(opcionSalir=='S'||opcionSalir=='s'); \n }", "public Arquero(Jugador jugador){\n this.propietario = jugador;\n this.vida = 75;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "public static void main(String[] args) {\n System.out.println(\"***************** bojouuur //////////////////\");\n EmloyeeFix p1 = new EmloyeeFix(\"ghali\",700);\n System.out.println(\"votre salaire fix c'est : \" + p1.salaireMensuelle );\n \n EmployeeComission p2 = new EmployeeComission(\"ghali\" , 700,10,100);\n System.out.println(\"le salair vc votre commision c'est :\" + p2.salaireMensuelle *(p2.vent * p2.commisionF*0.1));\n \n EmployeeHoraire p3 = new EmployeeHoraire(\"ghali\",200,56,700);\n System.out.println(\"votre salaire et votre taux horaire c'est :\" + p3.tauxHauraire * p3.heuresPrestés);\n \n\t}", "@Override\n public void action(Jugador jugador) {\n\n }", "public void mostrarLectura(TomarLectura tomarLectura, Lectura lecturaActual);", "Vaisseau_longueur createVaisseau_longueur();", "public interface IGestorFaseDescartes {\n\t\n\t/**\n\t * Devuelve el jugador al que le toca jugar respecto\n\t * a su posición en la mesa de juego.\n\t * @return posición\n\t */\n\tpublic int getTurnoJuego();\n\n\t/**\n\t * Devuelve la fase de juego en la que se encuentra la mano\n\t * @return Fase del Juego (MUS, DESCARTE, REPARTO, GRANDE)\n\t */\n\tpublic FaseDescartes faseJuego();\n\t\n\t/**\n\t * Controla si se puede pedir mus o no.\n\t * @param j\n\t * @return boolean\n\t */\n\tpublic boolean pedirMus(Jugador j);\n\t\n\t/**\n\t * Controla si se ha cortado el mus o no para determinar\n\t * si se puede iniciar el descarte.\n\t * @param j\n\t * @return boolean\n\t */\n\tpublic boolean cortarMus(Jugador j);\n\t\n\t/**\n\t * Controla los descartes (nº de cartas y cuales) del jugador\n\t * \n\t * @param j\n\t * @param cartas\n\t * @return boolean\n\t */\n\tpublic boolean pedirDescarte(Jugador j, Carta... cartas);\n\n\t/**\n\t * Una vez que todos han solicitado su descarte utiliza la\n\t * interface de descartes para que lo haga efectivo.\n\n\t * @return\n\t */\n\tpublic boolean ejecutarDescartar();\n\t\n\t/**\n\t * Se encarga de controlar el reparto de cargas teniendo en cuenta los\n\t * descartes realizados.\n\t * @param j\n\t * @return El número de cartas recibidas o -1 en caso de error\n\t */\n\tpublic int reparte(Jugador j);\n\n\t/**\n\t * Inicializa los contadores del gestor\n\t */\n\tpublic void inicializar();\n\t\n}", "public void test2(){\r\n\t\tZug zug1 = st.zugErstellen(2, 2, \"Zug 1\");\r\n\t\tst.fahren();\r\n\t}", "public ListaJugadores recuperarJugadores() throws SQLException {\n ListaJugadores listaJugadores = null;\n try {\n getConexion();\n String consulta = \"SELECT nombre FROM JUGADORES\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n while (registros.next()) {\n String nombre = registros.getString(\"nombre\");\n Jugador jugador = new Jugador(nombre);\n listaJugadores.agregarJugador(jugador);\n }\n } finally {\n closeConexion();\n }\n return listaJugadores;\n }", "public String getJoueur2() {\r\n\t\treturn joueur2;\r\n\t}", "public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "public String obtemOponente(Integer idJogador) throws RemoteException;", "public void actionsTouches () {\n\t\t//Gestion des deplacements du mineur si demande\n\t\tif (Partie.touche == 'g' || Partie.touche == 'd' || Partie.touche == 'h' || Partie.touche == 'b') deplacements();\n\n\t\t//Affichage du labyrinthe et des instructions, puis attente de consignes clavier.\n\t\tpartie.affichageLabyrinthe();\n\n\t\t//Quitte la partie si demande.\n\t\tif (Partie.touche == 'q') partie.quitter();\n\n\t\t//Trouve et affiche une solution si demande.\n\t\tif (Partie.touche == 's') affichageSolution();\n\n\t\t//Recommence la partie si demande.\n\t\tif (Partie.touche == 'r') {\n\t\t\tgrille.removeAll();\n\t\t\tpartie.initialisation();\n\t\t}\n\n\t\t//Affichage de l'aide si demande\n\t\tif (Partie.touche == 'a') {\n\t\t\tString texteAide = new String();\n\t\t\tswitch(themeJeu) {\n\t\t\tcase 2 : texteAide = \"Le but du jeu est d'aider Link à trouver la sortie du donjon tout en récupérant le(s) coffre(s).\\n Link doit egalement recuperer la Master Sword qui permet de tuer le monstre bloquant le chemin.\\n\\nLink se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 3 : texteAide = \"Le but du jeu est d'aider Samus à trouver la sortie du vaisseau tout en récupérant le(s) émeraude(s).\\nSamus doit egalement recuperer la bombe qui permet de tuer le metroid qui bloque l'accès à la sortie.\\n\\nSamus se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 4 : texteAide = \"Le but du jeu est d'aider le pompier à trouver la sortie du batiment tout en sauvant le(s) rescapé(s).\\nLe pompier doit egalement recuperer l'extincteur qui permet d'éteindre le feu qui bloque l'accès à la sortie.\\n\\nLe pompier se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\tcase 5 : texteAide = \"Le but du jeu est d'aider Mario à trouver le drapeau de sortie tout en ramassant le(s) pièce(s).\\nMario doit egalement recuperer l'étoile d'invincibilité qui permet de se débarasser du Goomba qui l'empêche de sortir.\\n\\nMario se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Here we gooo !\"; break;\n\t\t\tdefault : texteAide = \"Le but du jeu est d'aider le mineur à trouver la sortie du labyrinthe tout en extrayant le(s) filon(s).\\nLe mineur doit egalement recuperer la clef qui permet l'ouverture de le porte qui bloque l'accès à la sortie.\\n\\nLe mineur se déplace à l'aide des touches directionnelles.\\nUne solution peut-être affichée en appuyant sur la touche (s).\\nLa touche (r) permet de recommencer, (q) de quitter.\\n\\n Bon jeu !\"; break;\n\t\t\t}\n\t\t\tSystem.out.println(\"\\n============================================ AIDE ========================================\\n\\n\" + texteAide + \"\\n\\n==========================================================================================\\n\");\n\t\t\tJOptionPane.showMessageDialog(null, texteAide, \"Aide\", JOptionPane.QUESTION_MESSAGE);\n\t\t\tPartie.touche = ' ';\n\t\t}\n\n\t\t//Affichage de les infos si demande\n\t\tif (Partie.touche == 'i') {\n\t\t\tSystem.out.println(\"\\n============================================ INFOS =======================================\\n\\nCe jeu a ete developpe par Francois ADAM et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\\n\\n==========================================================================================\\n\");\n\t\t\tPartie.touche = ' ';\n\t\t\tJOptionPane.showMessageDialog(null, \"Ce jeu a été développé par François Adam et Benjamin Rancinangue\\ndans le cadre du projet IPIPIP 2015.\", \"Infos\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/EMN.png\")));\n\t\t}\n\n\t\t//Nettoyage de l'ecran de console\n\t\tSystem.out.println(\"\\n==========================================================================================\\n\");\n\t}", "public void setJoueurActuel(JoueurReversi j) {\r\n\t\tthis.joueurActuel = j;\r\n\t}", "private void modificarViaje(Viaje vje2, Boolean estabaCargado2,\r\n\t\t\tBoolean estabaPago2, Boolean estabaDescargado2,\r\n\t\t\tBoolean estabaCobrado2, Boolean estabaPagoFlete2,\r\n\t\t\tBoolean estabaPagoDescargador2) {\r\n\t\tgreetingService.ModificarViaje(vje2, estabaCargado2, estabaPago2,\r\n\t\t\t\testabaDescargado2, estabaCobrado2, estabaPagoFlete2,\r\n\t\t\t\testabaPagoDescargador2, new AsyncCallback<String>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\terrorLabel.setText(\"Error al modificar el viaje.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\tif (chkDescargarPago.getValue()\r\n\t\t\t\t\t\t\t\t|| chkDescargar.getValue()) {\r\n\t\t\t\t\t\t\tDouble tonOrigen = Double.parseDouble(tbToneladas\r\n\t\t\t\t\t\t\t\t\t.getText());\r\n\t\t\t\t\t\t\tDouble tonRealDescargadas = Double\r\n\t\t\t\t\t\t\t\t\t.parseDouble(tbDescargaRealToneladas\r\n\t\t\t\t\t\t\t\t\t\t\t.getText());\r\n\t\t\t\t\t\t\tif (tonOrigen > tonRealDescargadas) {\r\n\t\t\t\t\t\t\t\tvje.setKilos(String.valueOf(tonOrigen\r\n\t\t\t\t\t\t\t\t\t\t- tonRealDescargadas));\r\n\t\t\t\t\t\t\t\t//TODO Al cerrar el viaje sobrante \r\n\t\t\t\t\t\t\t\t//se debe cerrar la ventana.\r\n\t\t\t\t\t\t\t\tCrearViaje viajeSobrante = new CrearViaje(vje,\r\n\t\t\t\t\t\t\t\t\t\tlv);\r\n\t\t\t\t\t\t\t\tdialogBox = createDialogBox(\"Crear viaje.\",\r\n\t\t\t\t\t\t\t\t\t\tviajeSobrante);\r\n\t\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlv.cerrarDialogBox();\r\n\t\t\t\t\t\t// Window.alert(\"Se modifico el viaje correctamente.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}", "public static void main(String[] args) {\n \n //Joueur zidane=new Joueur(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,34,Sponsor.FLY_EMIRATES);\n // Attaquant messi=new Attaquant(\"zidane\",\"zinedine\",\"zizou\", \"12/07/1995\",\"marseille\",\"francais\",75.5f,1.82f, Sexe.HOMME,Pied.AMBIDEXTRE,Tenue.SHORT,10,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Milieu xavi=new Milieu(\"xavi\",\"xava\",\"go\", \"12/07/1990\",\"barcelone\",\"espagnol\",78.5f,1.85f, Sexe.HOMME,Pied.DROIT,Tenue.JOGGING,15,Sponsor.FLY_EMIRATES,PosteJoueur.DEFENSEUR);\n //Defenseur ramos=new Defenseur(\"xavi\",\"ramos\",\"ifjiej\", \"18/07/1990\",\"madrid\",\"espagnol\",78.5f,1.88f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES,PosteJoueur.MILIEU);\n //ramos.celebrer();\n //ramos.defendre();\n //Gardien neuer=new Gardien(\"neuer\",\"manuel\",\"ifjiej\", \"18/07/1991\",\"Bayern\",\"bayern\",88.5f,1.95f, Sexe.HOMME,Pied.GAUCHE,Tenue.SHORT,15,Sponsor.FLY_EMIRATES);\n //neuer.sortir();\n //Spectateur paul=new Spectateur(\"bollart\",12,false,false);\n //Arbitre guillaume=new Arbitre(\"ovigneur\",\"guillaume\",\"guigou\",\"12/07/1676\",\"Lille\", \"France\", 1.98f,1.67f,Sexe.HOMME,Pied.DROIT,Tenue.SHORT,48,Sponsor.MORELLE);\n Equipe marseille= new Equipe (NomEquipe.OM);\n Equipe paris= new Equipe (NomEquipe.PSG);\n Match match=new Match(TypeTerrain.GAZON,marseille,paris);\n match.simulerMatch();\n System.out.println(match.equipeGagnante);\n System.out.println(marseille.attaquants[2].getStatTir());\n \n Tournoi tournoi = new Tournoi(); \n tournoi.qualificaionsTournoi();\n tournoi.huitiemes();\n tournoi.quarts();\n tournoi.demi();\n tournoi.finale();\n \n System.out.println(tournoi.getEquipeEnLis());\n System.out.println(tournoi.getEquipeQualifie());\n System.out.println(tournoi.getEquipePerdanteHuit());\n System.out.println(tournoi.getEquipeGagnanteHuit());\n System.out.println(tournoi.getEquipePerdanteQuarts());\n System.out.println(tournoi.getEquipeGagnanteQuarts());\n System.out.println(tournoi.getEquipePerdanteDemi());\n System.out.println(tournoi.getEquipeGagnanteDemi());\n System.out.println(tournoi.getEquipeFinale());\n\n \n \n //Mise en place de \"l'interface\"\n Scanner sc = new Scanner(System.in);\n \n //Choix du mode de jeu\n System.out.println(\"\\n *** Choix du mode de jeu *** \\n\\t| tournoi : taper 1|\\n\\t| mode solo : taper 2|\");\n int modeDeJeu = sc.nextInt();\n sc.nextLine(); //On vide la ligne\n \n //AJOUTER UNE EXCEPTION POUR LE MODE DE JEU\n \n \n \n //Choix de l'equipe a l'aide d'un scanner\n// System.out.println(\"Choisissez votre équipe :\");\n// NomEquipe equipe;\n// Equipe equipeChoisit = new Equipe(nomEquipe);\n \n\n\n /*Scanner sc = new Scanner(System.in);\n System.out.println(\"Voulez vous disputer un match ? Oui=1 ou NON=2 \");\n int i = sc.nextInt();\n System.out.println(\"Saisissez le numéro de l'equipe avec laquelle vous voulez Jouez \"\n + \"PSG :1\"\n + \"MARSEILLE:2 \");\n //On vide la ligne avant d'en lire une autre\n sc.nextLine();\n int equipe = sc.nextInt(); \n System.out.println(\"FIN ! \");\n \n switch(equipe) {\n case 1:\n Equipe paris= new Equipe (NomEquipe.PSG);\n System.out.println(paris.stade);\n break;\n case 2 :\n Equipe marseille= new Equipe (NomEquipe.OM);\n System.out.println(marseille.stade);\n \n }*/\n }", "public static void main(String[] args) {\n\t\tScanner lectorInt = new Scanner(System.in);\n\t\tScanner lectorString = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese información de pasajero\");\n\t\tSystem.out.println(\"Ingrese nombre: \");\n\t\tString nombre = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese apellido: \");\n\t\tString apellido = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese edad: \");\n\t\tint edad = lectorInt.nextInt();\n\t\tSystem.out.println(\"Que tipo de pasajero es: 1:Pasajero Vip 2:Pasajero Económico \");\n\t\tint opcion = lectorInt.nextInt();\n\t\tString membresia = \"\";\n\t\tString descuento = \"\";\n\t\tif (opcion == 1) {\n\t\t\tSystem.out.println(\"Ingrese Código de Membresía\");\n\t\t\tmembresia = lectorString.nextLine();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Ingrese Código de Descuento\");\n\t\t\tdescuento = lectorString.nextLine();\n\t\t}\n\n\t\tPasajeroVip pasajero1 = new PasajeroVip();\n\t\tpasajero1.setNombre(nombre);\n\t\tpasajero1.setApellido(apellido);\n\t\tpasajero1.setCodigoMembresia(membresia);\n\t\tpasajero1.setEdad(edad);\n\n\t\tPasajeroVip pasajero2 = new PasajeroVip(\"Juan\", \"Tandre\", \"as2345\", 23);\n\n\t\tPasajeroEconomico pasajeroEconomico1 = new PasajeroEconomico();\n\t\tpasajeroEconomico1.setNombre(\"Helena\");\n\t\tpasajeroEconomico1.setApellido(\"Frias\");\n\t\tpasajeroEconomico1.setCodigoDescuento(\"1234df\");\n\t\tpasajeroEconomico1.setEdad(25);\n\n\t\tPasajero[][] asientos = new Pasajero[4][5];\n\t\tasientos[0][0] = pasajero1;\n\t\tasientos[0][1] = pasajero2;\n\t\tasientos[0][2] = pasajero1;\n\t\tasientos[0][3] = pasajeroEconomico1;\n\t\tasientos[1][0] = pasajero1;\n\t\tasientos[1][1] = pasajeroEconomico1;\n\n\t\tint opcionSalir = 0;\n\t\tdo {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Ingrese datos del asiento, 0:continuar, -1:SALIR\");\n\t\t\topcionSalir = lectorInt.nextInt();\n\t\t\tif (opcionSalir == 0) {\n\t\t\t\tSystem.out.print(\"Ingrese fila del asiento: \");\n\t\t\t\tint fila = lectorInt.nextInt();\n\t\t\t\tSystem.out.print(\"Ingrese columna del asiento: \");\n\t\t\t\tint columna = lectorInt.nextInt();\n\t\t\t\tSystem.out.println(\"Los datos del pasajero son: \");\n\t\t\t\tSystem.out.println(asientos[fila][columna]);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Va ha salir del sistema\");\n\t\t\t}\n\t\t} while (opcionSalir != -1);\n\n\t}", "public void pararJugador() {\n texture = new Texture(Gdx.files.internal(\"recursos/character.png\"));\n rectangle=new Rectangle(x,y,texture.getWidth(),texture.getHeight());\n tmp = TextureRegion.split(texture, texture.getWidth() / 4, texture.getHeight() / 4);\n switch (jugadorVista) {\n case \"Derecha\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[1][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Izquierda\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[3][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Abajo\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[0][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n case \"Arriba\":\n for (int b = 0; b < regions.length; b++) {\n regions[b] = tmp[2][0];\n animation = new Animation((float) 0.2, regions);\n tiempo = 0f;\n }\n break;\n }\n }" ]
[ "0.66417694", "0.6596943", "0.65483767", "0.65287787", "0.6346459", "0.6332266", "0.6283035", "0.6229103", "0.62170774", "0.62038517", "0.6189799", "0.61854213", "0.61513907", "0.6011278", "0.59651774", "0.59467953", "0.59163016", "0.5905568", "0.5903387", "0.5900627", "0.58804333", "0.58751935", "0.587065", "0.58676404", "0.5861182", "0.5858884", "0.5857334", "0.58564025", "0.5847584", "0.58471984", "0.58451927", "0.58331025", "0.5825818", "0.582188", "0.5810996", "0.57971853", "0.5792894", "0.57645595", "0.5753947", "0.57538676", "0.57527745", "0.57475734", "0.5737144", "0.5721952", "0.5718565", "0.5715043", "0.5695892", "0.568516", "0.567891", "0.5677142", "0.56760794", "0.5675516", "0.56677055", "0.5651828", "0.5627072", "0.5615551", "0.5615017", "0.5610958", "0.5610796", "0.55988324", "0.55901796", "0.5571631", "0.5570018", "0.55676675", "0.55597126", "0.55572563", "0.5550578", "0.55337447", "0.5531524", "0.55310464", "0.5528042", "0.5523163", "0.5510814", "0.5508973", "0.55048406", "0.550426", "0.550115", "0.5498464", "0.5495315", "0.5494797", "0.5485362", "0.54841304", "0.54836375", "0.54816216", "0.54774517", "0.5476931", "0.54710186", "0.54707325", "0.54702806", "0.5468362", "0.5459061", "0.5441763", "0.5439263", "0.54348505", "0.54337263", "0.54330575", "0.5432692", "0.5431629", "0.54298633", "0.5424851" ]
0.6271446
7
Escribe el jugador2 de la partida
public void setJugador2(Jugador jugador2) { this.jugador2 = jugador2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int enfrentarJugadores(int J1, int J2) {\n if ((J1 == 0 && J2 == 2) || (J1 == 1 && J2 == 0) || (J1 == 2 && J2 == 1)) {\n return 1;\n } else if ((J2 == 0 && J1 == 2) || (J2 == 1 && J1 == 0) || (J2 == 2 && J1 == 1)) {\n return 2;\n } else {\n return 0;\n }\n }", "Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) {\n\t\tthis.jugador1 = jugador1;\n\t\tthis.jugador2 = jugador2;\n\t\tthis.baraja = baraja;\n\t}", "public Juego(String nombreJ1, String nombreJ2){\r\n\t\tMINATR = 3;\r\n\t\tMAXATR = 6;\r\n\t\tjugador1 = new Jugador(nombreJ1);\r\n\t\tjugador2 = new Jugador(nombreJ2);\r\n\t\tjugadorEnTurno = jugador1;\r\n\t}", "public Jugador getJugador2() {\n\t\treturn jugador2;\n\t}", "public void setJugador1(Jugador jugador1) {\n\t\tthis.jugador1 = jugador1;\n\t}", "public Jugador obtenerJugador();", "public void setJoueur1(String joueur1) {\r\n\t\tthis.joueur1 = joueur1;\r\n\t}", "public Joueur(String nom2, String prenom2, Date dateDeNaissance2, String motDePasse2, int numbreJ,\n\t\t\tint dernierNiveau2, LinkedList<PartieJeu> list) {\n\t\tnom = nom2;\n\t\tprenom = prenom2;\n\t\tdateDeNaissance = dateDeNaissance2;\n\t\tmotDePasse = motDePasse2;\n\t\tdernierNiveau = dernierNiveau2;\n\t\tnumerojouer = numbreJ;\n\t\tListPartie = list;\n\t}", "private void iniciarRondaJuego() {\n\n\t\tthis.mostrarMensaje(\"bloqueando al servidor para despertar al jugador 1\");\n\t\tbloqueoJuego.lock();\n\n\t\t// despertar al jugador 1 porque es su turno\n\t\ttry {\n\t\t\tthis.mostrarMensaje(\"Despertando al jugador 1 para que inicie el juego\");\n\t\t\tjugadores[0].setSuspendido(false);\n\t\t\tjugadores[1].setSuspendido(false);\n\t\t\tesperarInicio.signalAll();\n\t\t} catch (Exception e) {\n\n\t\t} finally {\n\t\t\tthis.mostrarMensaje(\"Desbloqueando al servidor luego de despertar al jugador 1 para que inicie el juego\");\n\t\t\tbloqueoJuego.unlock();\n\t\t}\n\t}", "public void distribuirAportes2(){\n\n if(comprobanteSeleccionado.getAporteorganismo().floatValue() > 0f){\n comprobanteSeleccionado.setAportecomitente(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad().add(comprobanteSeleccionado.getAporteorganismo())));\n }\n }", "private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}", "public void testCasillasJugador2( )\n {\n setupEscenario2( );\n int tamanho = casillasJugador2.size( );\n int casilla;\n int i = 0;\n while( i < tamanho )\n {\n casilla = ( ( Integer )casillasJugador2.get( i ) ).intValue( );\n assertEquals( marcaJugador2, triqui.obtenerMarcaCasilla( casilla ) );\n i++;\n }\n }", "public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\r\n\t\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}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "private static void eligeJugadores() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.print(\"Elige el numero de jugadores [2,6]: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion < 2 || eleccion > 6);\r\n\t\tnJugadores = eleccion;\r\n\t\tjugadores = new JugadorM[nJugadores];\r\n\t\tjugadores[0] = new JugadorM(\"Jugador\", true);\r\n\t\tfor (int i = 1; i < jugadores.length; i++)\r\n\t\t\tjugadores[i] = new JugadorM(\"Maquina\" + i, false);\r\n\t}", "public String getJoueur2() {\r\n\t\treturn joueur2;\r\n\t}", "private void cargarJugadoresRetirados() {\n\n\t\tString nombreFichero = \"jugadoresRetirados.csv\";\n\n\t\tListaJugadores.jugadoresRetirados = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void usar(Jugador jugador){\n System.out.println(\"\\n\" + jugador.masHambreIVitales(this.calorias) + \"\\n\");\n }", "public String getPassageiro2() {\r\n\r\n if (passageiro == null) {\r\n return \"Poltrona Vazia\";\r\n } else {\r\n return passageiro.getNome();\r\n }\r\n }", "private static void eligeJuego() {\r\n\t\tint eleccion;\r\n\t\tdo {\r\n\t\t\tSystem.out.println(\"Elige el tipo de juego\\n1-\"\r\n\t\t\t\t\t+ optionsTiposJuegos[0]/*\r\n\t\t\t\t\t\t\t\t\t\t\t * + \"\\n2-\" + optionsTiposJuegos[1]\r\n\t\t\t\t\t\t\t\t\t\t\t */);\r\n\t\t\tSystem.out.print(\"Opcion: \");\r\n\t\t\teleccion = Teclado.leerInt();\r\n\t\t} while (eleccion != 1 /* && eleccion != 2 */);\r\n\t\tif (eleccion == 1)\r\n\t\t\tjuego = new PPT(jugadores, jugadores.length);\r\n\t\telse\r\n\t\t\tjuego = new Chinos(jugadores, jugadores.length);\r\n\t}", "public JogoVelha(Jogador jogador1, Jogador jogador2) {\r\n // recebe os jogadores\r\n this.jogador1 = jogador1;\r\n this.jogador2 = jogador2;\r\n this.sncpu = false;\r\n \r\n }", "public static int seleccionarCarro(Mano[] jug){//error no vio la 0,0\n int numeroDoble=6;\n int toret=0;\n while(numeroDoble>=0){\n int n=0;\n while(n<jug.length){\n int f=0;\n while( f<jug[n].getNPiezas() && \n (jug[n].getUnaPieza(f).getN1()!=numeroDoble || jug[n].getUnaPieza(f).getN2()!=numeroDoble))\n f++;\n \n if(f<jug[n].getNPiezas()){\n System.out.println(\"Encontrada la \"+numeroDoble+\",\"+numeroDoble\n +\", la tiene él jugador \"+(n+1)+\" y el tiene \"\n + \"el primer turno\");\n toret=n;\n numeroDoble=-10;\n \n }\n n++;\n }\n numeroDoble-=1;\n }\n if(numeroDoble==-1){\n toret=(int) (Math.random()*jug.length);\n System.out.println(\"No se ha encontrado ningun jugador con alguna pieza doble.\\n\"\n + \"Empieza el jugador \"+toret);\n }\n return toret;\n }", "public void jugar(){\r\n System.out.println(\"\\n\\n\\n\");\r\n // reiniciar llena el array de gato des espacios en blanco para que el tablero este en blanco\r\n reiniciar(); \r\n //pedir nombres de los jugadores\r\n System.out.println(\"Para tirar solo escribe las coordenadas (x,y) de la casilla que quieres\"); \r\n System.out.println(\"(o) Nombre de Jugador 1: \");\r\n nom1=entrada.nextLine();\r\n System.out.println(\"(x) Nombre de Jugador 2: \");\r\n nom2=entrada.nextLine();\r\n System.out.println(\"\\n\\n\\n\");\r\n //imprime el tablero\r\n tablero(); \r\n //deja que los jugadores tiren\r\n tirar(); \r\n //confirma victorias o empates \r\n if(ganador=='o'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom1);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(ganador=='x'){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"GANA \"+ nom2);\r\n System.out.println(\"\\n\\n\");\r\n }\r\n if(contador==9){\r\n System.out.println(\"\\n\\n\");\r\n System.out.println(\"EMPATE, sean panas \"+nom1+\" y \"+nom2+\" :)\");\r\n System.out.println(\"\\n\\n\");\r\n }\r\n\r\n }", "public void modificarPlayer2(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador2=p;\n }\n }", "public static void turnoJugador(){\n //variables locales\n int opcionBatalla;\n Scanner scannerDos=new Scanner(System.in);//nuevo scanner vara no recargar al anterior\n //menu de opciones para el turno del jugador\n System.out.println(\"\\nturno de:\"+nombrePersonaje);\n\tSystem.out.println(\"\\n1.Atacar\\t\\t\\t\\t\\tnombre:\\t\\t\\t\"+nombrePersonaje);\n\tSystem.out.println(\"2.Curar\\t\\t\\t\\t\\t\\tPuntos De Vida (HP):\\t\"+puntosDeVida);\n\tSystem.out.println(\"3.Item\\t\\t\\t\\t\\t\\tPuntos De mana (MP):\\t\"+puntosDeMana);\n\tSystem.out.println(\"4.Tengo Miedo\\t\\t\\t\\t\\tOro: \\t\\t\"+oro);\n System.out.println(\"\\t\\t\\t\\t\\t\\tVida del enemigo:\\t\"+puntosDeVidaEnemigo);\n\n do{//validando la opcion seleccionada\n System.out.println(\"Numero de opcion:\");\n opcionBatalla= scannerDos.nextInt();\n \n }while(opcionBatalla<1||opcionBatalla>4);\n //comparacion de la opcion seleccionada\n switch(opcionBatalla){\n case 1:{\n atacar();//llamando funcion atacar\n break;\n }\n case 2:{\n curar();//llamando funcion curar\n break;\n }\n case 3:{\n item();//llamando funcion item\n break;\n }\n \tdefault:{\n miedo();//llamando funcion miedo\n break;\n } \n }\n }", "public Jugador getJugador1() {\n\t\treturn jugador1;\n\t}", "public Individuo Recombinar(Individuo padre, Individuo madre) {\n Individuo hijo = new Individuo(padre.getCAMINOS());\r\n Individuo hijo2 = new Individuo(madre.getCAMINOS());\r\n for (int i = 0; i < padre.getEntradas_individuo().size(); i++) {\r\n if (i < padre.getCAMINOS() / 2) {\r\n Entradas entrada_1 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_1.setValores((ArrayList<Integer>) padre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_1.setEntradas((ArrayList<String>) padre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_1.setCamino_cubierto(padre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n Entradas entrada_2 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_2.setValores((ArrayList<Integer>) madre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_2.setEntradas((ArrayList<String>) madre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_2.setCamino_cubierto(madre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n hijo.getEntradas_individuo().add(entrada_1); \r\n hijo2.getEntradas_individuo().add(entrada_2);\r\n } else {\r\n Entradas entrada_1 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_1.setValores((ArrayList<Integer>) madre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_1.setEntradas((ArrayList<String>) madre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_1.setCamino_cubierto(madre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n Entradas entrada_2 = new Entradas(this.ENTRADAS,this.SUPERIOR,this.INFERIOR);\r\n entrada_2.setValores((ArrayList<Integer>) padre.getEntradas_individuo().get(i).getValores().clone());\r\n entrada_2.setEntradas((ArrayList<String>) padre.getEntradas_individuo().get(i).getEntradas().clone());\r\n entrada_2.setCamino_cubierto(padre.getEntradas_individuo().get(i).getCamino_cubierto());\r\n hijo.getEntradas_individuo().add(entrada_1); \r\n hijo2.getEntradas_individuo().add(entrada_2);\r\n }\r\n }\r\n hijo.caminos_posibles = padre.caminos_posibles;\r\n hijo.caminos_cubiertos = padre.caminos_cubiertos;\r\n hijo2.caminos_posibles = madre.caminos_posibles;\r\n hijo2.caminos_cubiertos = madre.caminos_cubiertos;\r\n Document doc_copy_1 = (Document) this.doc.cloneNode(true);\r\n Document doc_copy_2 = (Document) this.doc.cloneNode(true);\r\n //Mutar(hijo);\r\n //Mutar(hijo2);\r\n hijo.EvaluarIndividuo(doc_copy_1);\r\n hijo2.EvaluarIndividuo(doc_copy_2);\r\n individuos.add(hijo);\r\n individuos.add(hijo2);\r\n if(hijo.getEvaluacion() > hijo2.getEvaluacion())\r\n {\r\n return hijo;\r\n }\r\n else\r\n {\r\n return hijo2;\r\n }\r\n }", "@Override\n public void selectionnerJoueurs(EnsJoueurs joueursGagnantsPhase1) {\n this.participantsDeLaPhase = joueursGagnantsPhase1; // Joueurs actifs\n }", "private void teletransportar(Personaje p, Celda destino) {\n // TODO implement here\n }", "public void comienzo(Jugador jugador, Estado estado) {\r\n\t\tthis.jugador = jugador;\r\n }", "public Jogador getJogador2() {\r\n return jogador2;\r\n }", "private void moverJogadorDaVez(int dado1, int dado2) throws Exception {\n // System.out.println(\"moverJogadorDaVez\" + dado1 + \" , \" + dado2);\n\n print(\"\\ttirou nos dados: \" + dado1 + \" , \" + dado2);\n int valorDados = dado1 + dado2;\n\n int jogador = this.jogadorAtual();\n\n boolean ValoresIguais = false;\n\n\n //preciso saber se o jogador vai passar pela posição 40, o que significa\n //ganhar dinheiro\n this.completouVolta(jogador, valorDados);\n\n if (dado1 == dado2) {\n ValoresIguais = true;\n } else {\n ValoresIguais = false;\n }\n\n //movendo à posição\n this.moverJogadorAPosicao(jogador, valorDados, ValoresIguais);\n this.print(\"\\tAtual dinheiro antes de ver a compra:\" + this.listaJogadores.get(jogador).getDinheiro());\n this.print(\"\\tVai até a posição \" + this.posicoes[jogador]);\n\n //vendo se caiu na prisao\n if (this.posicoes[this.jogadorAtual()] == 30 && this.prisao == true) {\n adicionaNaPrisao(listaJogadores.get(jogadorAtual()));\n DeslocarJogador(jogador, 10);\n listaJogadores.get(jogadorAtual()).adicionarComandoPay();\n }\n\n\n\n Lugar lugar = this.tabuleiro.get(this.posicoes[jogador] - 1);//busca em -1, pois eh um vetor\n\n\n if (this.isCompraAutomatica()) {\n this.realizarCompra(jogador, lugar);\n }\n\n if (!this.posicaoCompravel(this.posicoes[jogador])) {\n this.print(\"\\t\" + lugar.getNome() + \" não está à venda!\");\n\n\n String nomeDono = (String) Donos.get(this.posicoes[jogador]);\n //não cobrar aluguel de si mesmo\n if (!nomeDono.equals(this.listaJogadores.get(this.jogadorAtual()).getNome())) {\n\n if (this.isUmJogador(nomeDono)) {\n Jogador possivelDono = this.getJogadorByName(nomeDono);\n\n if (this.isPosicaoFerrovia(this.posicoes[jogador])) {\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n if (!lugar.estaHipotecada()) {\n this.pagarFerrovia(possivelDono.getId(), jogador, 25, lugar.getNome());\n }\n } else {\n\n this.print(\"\\tO dono eh \" + possivelDono.getNome());\n int valorAluguel = 0;\n if (this.posicoes[this.jogadorAtual()] != 12 && this.posicoes[this.jogadorAtual()] != 28) {\n valorAluguel = this.tabuleiro.getLugarPrecoAluguel(this.posicoes[jogador]);\n\n } else {\n if (possivelDono.getQuantidadeCompanhias() == 1) {\n valorAluguel = 4 * valorDados;\n\n }\n if (possivelDono.getQuantidadeCompanhias() == 2) {\n valorAluguel = 10 * valorDados;\n\n }\n }\n if (!lugar.estaHipotecada()) {\n this.pagarAluguel(possivelDono.getId(), jogador, valorAluguel, lugar.getNome());\n }\n\n }\n\n }\n }\n\n }\n\n\n this.pagarEventuaisTaxas(jogador);\n\n if ((this.posicoes[this.jogadorAtual()] == 2 || this.posicoes[jogadorAtual()] == 17 || this.posicoes[jogadorAtual()] == 33) && cards == true) {\n realizaProcessamentoCartaoChest();\n }\n\n if ((this.posicoes[this.jogadorAtual()] == 7 || this.posicoes[jogadorAtual()] == 22 || this.posicoes[jogadorAtual()] == 36) && cards == true) {\n realizaProcessamentoCartaoChance();\n }\n\n\n\n\n this.print(\"\\tAtual dinheiro depois:\" + this.listaJogadores.get(jogador).getDinheiro());\n\n\n\n }", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "private void cargarJugadoresEnMesa() {\n\n\t\tString nombreFichero = String.format(\"jugadoresEnMesa%d.csv\", id);\n\n\t\tthis.jugadoresEnMesa = GestionCSV.obtenerJugadores(nombreFichero);\n\n\t}", "public void choixduJeu() {\n afficheMessage(\"*- Choisissez le jeu auquel vous voulez jouer : \\n- R pour Recherche +/-\\n- M pour Mastermind\");\n choixJeu = Console.saisieListeDeChoix(\"R|M\");\n afficheMessage(\"*- Choisissez le mode de jeu auquel vous voulez jouer :\\n- C pour Challenger,\\n- U pour Duel\\n- D pour Defense\");\n choixModeJeu = Console.saisieListeDeChoix(\"C|U|D\");\n }", "public static void main(String[] args) \n {\n Equipo Boca = new Equipo(2);\n \n //Crear objeto jugador, pasando por parametro sus atributos\n Jugador j1 = new Jugador(\"Andrada\", 1, 1, 20, 100);\n Jugador j2 = new Jugador(\"Salvio\", 4, 7, 20, 100);\n \n // cargar objeto Equipo\n Boca.agregarJugador(j1);\n Boca.agregarJugador(j2);\n \n //Mostrar objeto Equipo\n System.out.println(Boca.listarJugador());\n \n \n \n //Cantidad de jugadores con menos de 10 partidos jugados.\n System.out.print(\"Cantidad de Jugadores con menos de 10 partidos jugados: \");\n System.out.println(Boca.cantidadJugadores());\n \n \n //Nombre del jugador con mayor cantidad de partidos jugados.\n System.out.print(\"Nombre del jugador con mas partidos jugados: \");\n System.out.println(Boca.jugadorMasPartidos());\n \n \n\n //Promedio de estado físico de todo el equipo.\n \n System.out.print(\"Promedio de estado fisico del equipo:\");\n System.out.println(Boca.promedioEstadoFisicoEquipo() + \"%\");\n \n\n //Estado físico de un jugador particular identificado por número de camiseta. \n \n System.out.print(\"Estado fisico de un juegador dado su numero de camiseta: \");\n System.out.println(Boca.estadoFisicoJugador(7) +\"%\");\n \n //Promedio de partidos jugados de los jugadores de cada posición (4resultados).\n \n System.out.println(\"Promedio de partidos jugados de los jugadores de cada posición:\");\n System.out.println(Boca.promedioPartidosJugadosporPuesto());\n \n \n \n \n }", "public void jouer(Joueur joueur, int posX1, int posY1, int posX2, int posY2){\n\t\t\n\t\tcoefficientCombo = 1;\n\t\t\n\t\t\n\t\t\n\t\tif(joueur == joueurCourant){\t\t\t\t\t//On vérifie si c'est son tour de jouer\n\t\t\tif( verifVoisin(posX1, posY1, posX2, posY2)){\t\t\t\t//On vérifie si les cristaux joués sont voisins\n\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\t\t\t\t//On switch les cristaux dans le tableau \n\t\t\t\tArrayList<ArrayList<Integer>> tabs = chercheBlock(posX1, posY1);\t//On cherche si des blocks de cristaux de même couleur ont été formés et on stocks leurs coordonnées dans tab\n\t\t\t\tArrayList<ArrayList<Integer>> tabs2 = chercheBlock(posX2, posY2);\n\t\t\t\t\n\t\t\t\t/*for (ArrayList<Integer> arrayList : tabs) { //Affichage des coordonnées stockées dans tab\n\t\t\t\t\tfor(Integer i : arrayList){\n\t\t\t\t\t\tSystem.out.print(i);\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tfaireLeMenage(tabs2);\n\t\t\t\tfaireLeMenage(tabs);\t\t//On \"supprime\" les cristaux listés dans tab\n\t\t\t\trestructurer();\t\t\t\t//On réagence le tableau en supprimant les cases vides, les cristaux au dessus glissent vers le bas, les cases hautes laissées vides sont remplies aléatoirement\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//trouverCombo();\n\t\t\t\t\n\t\t\t\tif(tabs.size() == 0 && tabs2.size()==0)\t\t//Aucun block n'a été renvoyé\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"reswitch\");\n\t\t\t\t\tswitchCristals(posX1, posY1, posX2, posY2);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Ces deux cristaux ne sont pas voisins\");\n\t\t\t}\n\t\t\t\t\n\t\t}else\n\t\t{\n\t\t\tSystem.out.println(\"Ce n'est pas à \" + joueur.getNom() + \" de jouer...\");\n\t\t\tSystem.out.println(\"C'est au tour de \" + joueurCourant.getNom() + \" de jouer...\");\n\t\t}\n\t\t\n\t}", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "private static void gestionarMenuManejoJugador(int opcion) {\n\t\tswitch(opcion){\n\t\tcase 1:annadirJugador();\n\t\t\tbreak;\n\t\tcase 2:eliminarJugador();\n\t\t\tbreak;\n\t\tcase 3: System.out.println(jugadores.toString());\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}", "protected static Object DesarrolloJugada(Duelo juego, PlayView view, Sansano jugador, Sansano jugador2){\n juego.advanceTurno();\n if(juego.getTurno() <= 60 && juego.getGanador().equals(\"\")) {\n\n if(juego.getTurno() % 2 == 0){\n view.setNombreJugador(jugador2.getName());\n }\n else{\n view.setNombreJugador(jugador.getName());\n }\n\n view.setNumeroTurno(String.valueOf(juego.getTurno()));\n JButton atacarButton = view.getAtacarButton();\n JButton defendermeButton = view.getDefendermeButton();\n\n view.setprioridadUsuario(String.valueOf(jugador.getPrioridad()));\n view.setprioridadEnemigo(String.valueOf(jugador2.getPrioridad()));\n Object carta;\n if(juego.getTurno() % 2 == 0 && Globales.getmodoJuego().equals(\"conunamigo\")){\n carta = jugador2.getCard();\n }\n else{\n carta = jugador.getCard();\n }\n view.setCartaActual(((Carta) carta).getNombre());\n view.setCardDescription(((Carta) carta).getDescripcion());\n if (carta instanceof Curso) {\n defendermeButton.setText(\"Defenderme\");\n atacarButton.setEnabled(true);\n defendermeButton.setEnabled(true);\n view.setValorAtaque(String.valueOf(((Curso) carta).getAtaque()));\n view.setValorDefensa(String.valueOf(((Curso) carta).getDefensa()));\n } else if (carta instanceof Profesor) {\n atacarButton.setEnabled(false);\n defendermeButton.setEnabled(true);\n defendermeButton.setText(\"Utilizar Carta\");\n\n view.setValorAtaque(String.valueOf(((Profesor) carta).getPuntosHabilidad()));\n view.setValorDefensa(\" \");\n } else if (carta instanceof Carrete) {\n atacarButton.setEnabled(false);\n defendermeButton.setEnabled(true);\n defendermeButton.setText(\"Utilizar Carta\");\n view.setValorDefensa(String.valueOf(((Carrete) carta).getPuntosHabilidad()));\n view.setValorAtaque(\" \");\n\n }\n\n if (jugador.getPrioridad() == 0) {\n juego.setGanador(jugador2.getName());\n view.setVisible(false);\n }\n if (jugador2.getPrioridad() == 0) {\n juego.setGanador(jugador.getName());\n view.setVisible(false);\n }\n return carta;\n }\n else {\n if (jugador.getPrioridad() > jugador2.getPrioridad()) {\n juego.setGanador(jugador.getName());\n view.setVisible(false);\n }\n else if(jugador.getPrioridad() < jugador2.getPrioridad()) {\n juego.setGanador(jugador2.getName());\n view.setVisible(false);\n }\n else {\n juego.setGanador(\"EMPATE\");\n view.setVisible(false);\n }\n return null;\n }\n }", "public void dorcsd2by1_(CHARACTER JOBU1,CHARACTER JOBU2,CHARACTER JOBV1T,INTEGER M,INTEGER P,INTEGER Q,double[] X11,INTEGER LDX11,double[] X21,INTEGER LDX21,double[] THETA,double[] U1,INTEGER LDU1,double[] U2,INTEGER LDU2,double[] V1T,INTEGER LDV1T,double[] WORK,INTEGER LWORK,int[] IWORK,INTEGER INFO);", "public void codigo(String cadena, String codigo,int codigos,Reserva2 reserva,JDateChooser dateFechaIda,JDateChooser dateFechaVuelta,JTextField DineroFaltante) {\n\t\tcadena=codigo.split(\",\")[1];\n\t\tubicacion=codigo.split(\",\")[5];\n\t\tnombre=codigo.split(\",\")[3];\n\t\tprecio=codigo.split(\",\")[8];\n\t\tcodigos=Integer.parseInt(cadena);\n\t\tSystem.out.println(\"hola\");\n\t\tSystem.out.println(Modelo1.contador);\n\t\t\n\t\tif(Modelo1.contador==1) {\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigohotel(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==2) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigocasa(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigocasa());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t\t\n\t\t}\n\t\telse if(Modelo1.contador==3) {\n\t\t\t\n\t\t\totroprecio=Double.parseDouble(precio);\n\t\t\treserva.setUbicacion(ubicacion);\n\t\t\treserva.setCodigoapatamento(codigos);\n\t\t\treserva.setNombreAlojamiento(nombre);\n\t\t\tpreciofinal=metodos.preciototal(dateFechaIda, dateFechaVuelta, otroprecio);\n\t\t\treserva.setPrecio(preciofinal);\n\t\t\tSystem.out.println(reserva.getUbicacion());\n\t\t\tSystem.out.println(reserva.getCodigoapatamento());\n\t\t\tSystem.out.println(reserva.getNombreAlojamiento());\n\t\t\tSystem.out.println(reserva.getPrecio());\n\t\t\tDineroFaltante.setText(reserva.getPrecio()+\" \\u20ac\");\n\t\t\tModelo1.total_faltante = reserva.getPrecio();\n\t\t}\n\t\t\n\t}", "public String retirarJugador(Jugador jugadorParaRetirar) {\n\n\t\tboolean retirado = false;\n\n\t\tfor (int i = 0; !retirado && i < this.jugadoresEnMesa.size(); i++) {\n\t\t\tif (this.jugadoresEnMesa.get(i).getId() == jugadorParaRetirar.getId()) {\n\n\t\t\t\tListaJugadores.jugadoresRetirados.add(jugadorParaRetirar);\n\n\t\t\t\tthis.jugadoresEnMesa.remove(i);\n\t\t\t\ti--;\n\t\t\t\tretirado = true;\n\n\t\t\t}\n\t\t}\n\n\t\tString mensajeRetirada;\n\t\tif (retirado) {\n\t\t\tmensajeRetirada = \"%s ha sido retirado.%s\";\n\t\t\tif (jugadorParaRetirar.getCredito() < 0)\n\t\t\t\tEasterEgg.huevoDePascua(jugadorParaRetirar.getNombre());\n\n\t\t\telse {\n\n\t\t\t\tif (jugadorParaRetirar.getCredito() == 0)\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Se le ha agotado el crédito.\");\n\n\t\t\t\telse if (jugadorParaRetirar.getCredito() >= jugadorParaRetirar.getCreditoObjetivo())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado su crédito objetivo\");\n\n\t\t\t\telse if (jugadorParaRetirar.getRondas() >= jugadorParaRetirar.getRondasMaximas())\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(),\n\t\t\t\t\t\t\t\" Ha alcanzado sus rondas máximas\");\n\n\t\t\t\telse\n\t\t\t\t\tmensajeRetirada = String.format(mensajeRetirada, jugadorParaRetirar.getNombre(), \"\");\n\n\t\t\t}\n\n\t\t} else {\n\t\t\tmensajeRetirada = \"No se ha podido retirar al jugador.\";\n\t\t}\n\n\t\treturn mensajeRetirada;\n\n\t}", "public void alquilarMultimediaAlSocio(){\n lector = new Scanner(System.in);\n int opcion = -1;\n int NIF = 0;\n int pedirElemento;\n String titulo;\n Socio socio;\n\n\n\n NIF = pedirNIF(); // pido el NIF por teclado\n\n if(tienda.exiteSocio(NIF)){ // Si exite, continuo\n socio = tienda.getSocioWithNIF(NIF); // Si exite el socio, busco en la tienda y lo asigno.\n if(!socio.isAlquilando()) { // si el socio no está actualmente alquilando, no continuo\n opcion = pedirElemento(); // Pido el elemento\n\n switch (opcion) {\n case 1:\n tienda.imprimirDatos(tienda.getPeliculas());\n System.out.println(\"Introduce el titulo de la pelicula que quieres: \");\n titulo = lector.nextLine();\n if (tienda.exitePelicula(titulo)) {\n\n tienda.alquilarPeliculaSocio(NIF, titulo);\n System.out.println(\"PELICULA ANYADIDO EN EL MAIN\");\n\n\n } else {\n System.out.println(\"No exite la pelicula \" + titulo + \".\");\n }\n\n\n break;\n case 2:\n tienda.imprimirDatos(tienda.getVideojuegos());\n System.out.println(\"Introduce el titulo del videojuego que quieres: \");\n titulo = lector.nextLine();\n if (tienda.existeVideojuego(titulo)) {\n\n tienda.alquilarVideojuegoSocio(NIF, titulo);\n System.out.println(\"VIDEOJUEGO ANYADIDO EN EL MAIN\");\n\n\n } else {\n System.out.println(\"No exite el videojuego \" + titulo + \".\");\n }\n break;\n default:\n break;\n }\n }else{\n System.out.println(\"El socio \" + socio.getNombre() + \" tiene recargos pendientes.\");\n }\n\n }else{\n System.out.println(\"El socio con NIF \" + NIF + \" no exite.\");\n }\n\n\n\n\n\n\n }", "private IOferta buildOfertaEjemplo2() {\n\t\tPredicate<Compra> condicion = Predicates.compose(\n\t\t\t\tnew PredicadoDiaSemana(Calendar.THURSDAY),\n\t\t\t\tnew ExtraerFechaCreacion());\n\t\tFunction<Compra, Float> descuento = Functions.compose(\n\t\t\t\tnew DescuentoPorcentual(10.0f), \n\t\t\t\tnew ExtraerTotalBrutoProductos(new PredicadoRubro(\"11\")));\n\t\treturn new OfertaDinero(\"10% descuento comida los jueves\", condicion,\n\t\t\t\tdescuento);\n\t}", "public static void EjecutaEjercicio1PD(String entrada) {\n\t\tEjercicio1.iniDatos(entrada);\n\t\t\n\t\t// Declarar vértice de inicio para el grafo:\n\t\tVerticeAlumno verticeInicial = VerticeAlumno.verticeInicial();\n\t\n\t\t// Inicializar el grafo virtual:\n\t\t/*\n\t\t * 2 vías:\n\t\t * \t· Con peso en el vértice.\n\t\t * \t· Con peso en las aristas. \n\t\t*/ \n\t\t\n\t\t// Inicializa un grafo virtual de tipo simpleVirtualGraph a partir del vértice inicial con peso:\n\t\tEGraph<VerticeAlumno, AristaAlumno> grafoVirtual = Graphs2.simpleVirtualGraph(verticeInicial, x -> x.getEdgeWeight());\t\n\t\t\n\t\t// Invocar el algoritmo de Programación Dinámica: \n\t\t/*\n\t\t * 2 vías: \n\t\t * · Expresando el vértice final de destino.\n\t\t * · Mediante un predicado objetivo.\n\t\t*/\n\t\tDynamicProgrammingReduction<VerticeAlumno, AristaAlumno> algoritmoPD = DPR.dynamicProgrammingReductionGoal(\n\t\t\t\t\t\tgrafoVirtual,\n\t\t\t\t\t\tVerticeAlumno.objetivo(),\n\t\t\t\t\t\tHeuristicaAlumno::heuristica,\n\t\t\t\t\t\tPDType.Max\n\t\t\t\t\t\t);\n\t\t\n\t\t// Proporciona un camino devuelto por PD desde el vértice inicial al objetivo:\n\t\tGraphPath<VerticeAlumno, AristaAlumno> caminoPD = algoritmoPD.search().get();\n\t\t\n\t\t// Solución: lista de aristas recorridos del grafo: \n\t\tList<AristaAlumno> aristas = caminoPD.getEdgeList();\n\t\tSystem.out.println(\"$$$$$$$$$$$$$$$$$ PROGRAMACIÓN DINÁMICA $$$$$$$$$$$$$$$$$$\");\n\t\tSolucion1.solucion(aristas, entrada);\n\t\t\n\t\t// DEBUG:\n\t\t/*\n\t\t * List<VerticeAlumno> vertices = caminoA.getVertexList();\n\t\t * System.out.println(vertices);\n\t\t*/\n\t\t\n\t}", "private void modificarViaje(Viaje vje2, Boolean estabaCargado2,\r\n\t\t\tBoolean estabaPago2, Boolean estabaDescargado2,\r\n\t\t\tBoolean estabaCobrado2, Boolean estabaPagoFlete2,\r\n\t\t\tBoolean estabaPagoDescargador2) {\r\n\t\tgreetingService.ModificarViaje(vje2, estabaCargado2, estabaPago2,\r\n\t\t\t\testabaDescargado2, estabaCobrado2, estabaPagoFlete2,\r\n\t\t\t\testabaPagoDescargador2, new AsyncCallback<String>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\terrorLabel.setText(\"Error al modificar el viaje.\");\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\tif (chkDescargarPago.getValue()\r\n\t\t\t\t\t\t\t\t|| chkDescargar.getValue()) {\r\n\t\t\t\t\t\t\tDouble tonOrigen = Double.parseDouble(tbToneladas\r\n\t\t\t\t\t\t\t\t\t.getText());\r\n\t\t\t\t\t\t\tDouble tonRealDescargadas = Double\r\n\t\t\t\t\t\t\t\t\t.parseDouble(tbDescargaRealToneladas\r\n\t\t\t\t\t\t\t\t\t\t\t.getText());\r\n\t\t\t\t\t\t\tif (tonOrigen > tonRealDescargadas) {\r\n\t\t\t\t\t\t\t\tvje.setKilos(String.valueOf(tonOrigen\r\n\t\t\t\t\t\t\t\t\t\t- tonRealDescargadas));\r\n\t\t\t\t\t\t\t\t//TODO Al cerrar el viaje sobrante \r\n\t\t\t\t\t\t\t\t//se debe cerrar la ventana.\r\n\t\t\t\t\t\t\t\tCrearViaje viajeSobrante = new CrearViaje(vje,\r\n\t\t\t\t\t\t\t\t\t\tlv);\r\n\t\t\t\t\t\t\t\tdialogBox = createDialogBox(\"Crear viaje.\",\r\n\t\t\t\t\t\t\t\t\t\tviajeSobrante);\r\n\t\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tlv.cerrarDialogBox();\r\n\t\t\t\t\t\t// Window.alert(\"Se modifico el viaje correctamente.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t}", "public void jugar_con_el() {\n System.out.println(nombre + \" esta jugando contigo :D\");\n }", "public Arquero(Jugador jugador){\n this.propietario = jugador;\n this.vida = 75;\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "private static void etapa2Urna() {\n\t\t\n\t\tint opcaoNumero = 0;\n\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\tSystem.out.println(\"Votação\");\n\t\t\tSystem.out.println(\"1 - Votar\");\n\t\t\tSystem.out.println(\"2 - Justificar ausencia\");\n\t\t\tSystem.out.println(\"Digite o número da etapa ou -1 para sair: \");\n\t\t\t\n\t\t\ttry {\n\t\t\n\t\t\t\topcaoNumero = Integer.parseInt(br.readLine());\n\t\t\n\t\t\t\tswitch( opcaoNumero ) {\n\t\t\n\t\t\t\tcase 1: \n\t\t\t\t\t// Abrir Etapa 1: Configurar Urna\n\t\t\t\t\tlimparConsole();\n\t\t\t\t\trealizarVotacao();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 2: \n\t\t\t\t\t// Abrir Etapa 2: Realizar Votacao na Urna\n\t\t\t\t\tlimparConsole();\n\t\t\t\t\tSystem.out.println(\"Insira o numero do seu titulo de eleitor\");\n\t\t\t\t\tint tituloEleitor = Integer.parseInt(br.readLine());\n\t\t\t\t\turna.justificarVoto(tituloEleitor);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\n\t\t\t} catch(IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\n\t\t}while(opcaoNumero != -1);\n\t}", "public void jugar(){\n\t\tdo {\n\t\t\t\n\t\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\t\tdibujar();\n\t\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\t\tescribir();\n\t\t\tSystem.out.printf(\"Ingrese una letra: \\n\");\n\t\t\tlectura = entrada.nextLine();\n\t\t\tletra = lectura.charAt(0);\n\t\t\tpartida.accionar(letra);\n\t\t\t\n\t\t} while(!partida.parada());\n\t\t\n\t\t//Aquí se dibuja el estado final del juego.\n\t\t\n\t\tSystem.out.printf(\"\\n-------- HANGMAN --------\\n\");\n\t\tdibujar();\n\t\tSystem.out.printf(\"\\n Errores: %d \\n\\n\", partida.getErrores());\n\t\tescribir();\n\t\tSystem.out.printf(\"\\nTerminó el juego!!\\n\");\n\t\tif(partida.getErrores() == 10){\n\t\t\tSystem.out.printf(\"\\nPerdiste!!\\n\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.printf(\"\\nGanaste!!\\n\");\n\t\t}\n\t}", "public List<Partida> getNextPartida(String partidaId,String jugadorId){\n String consulta = \"SELECT p FROM Partida p WHERE p.id > \" + partidaId + \" AND p.jugador1.id = \"+ \"'\" + jugadorId +\"' OR p.jugador2 = \"+ \"'\" + jugadorId+\"' ORDER BY p.id ASC\";\n\n List<Partida> partida = em.createQuery(consulta, Partida.class).getResultList();\n\n return partida;\n }", "public void repartirGanancias() {\n\t\t \n\t\t System.out.println(\"JUGADORES EN GANANCIAS:\");\n\t\t for(int i = 0; i < idJugadores.length;i++) {\n\t\t\t System.out.println(\"idJugador [\"+i+\"] : \"+idJugadores[i]);\n\t\t }\n\t\t System.out.println(\"GANADORES EN GANANCIA\");\n\t\t for(int i = 0; i < ganador.size();i++) {\n\t\t\t System.out.println(\"Ganador [\"+i+\"] : \"+ganador.get(i));\n\t\t }\n\t\t if(ganador.size() >= 1) {\n\t\t\t for(int i = 0; i < idJugadores.length; i++) {\n\n\t\t\t\t if(contieneJugador(ganador, idJugadores[i])) {\n\t\t\t\t\t System.out.println(\"Entra ganador \"+idJugadores[i]);\n\t\t\t\t\t if(verificarJugadaBJ(manosJugadores.get(i))) {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado: \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],25));\n\t\t\t\t\t }else {\n\t\t\t\t\t\t System.out.println(\"Pareja nombre agregado --> \"+idJugadores[i]);\n\t\t\t\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(idJugadores[i],20));\n\t\t\t\t\t }\n\t\t\t\t }\n\t\t\t } \n\t\t }else {\n\t\t\t System.out.println(\"no ganó nadie\");\n\t\t\t parejaNombreGanancia.add(new Pair<String, Integer>(\"null\",0));\n\t\t }\n\t }", "public void modificarPlayer1(String alias){\n ListIterator itr=listaJugadores.listIterator();\n while(itr.hasNext()){\n Player p=(Player)itr.next();\n if(p.getAlias().equals(alias))\n jugador1=p;\n }\n }", "private void analizarMensaje(String entrada, int indexJugador) {\n\t\tSystem.out.println(\"Analizando el mensaje del jugador con index \"+indexJugador+\" que dice \"+entrada);\n\t\t// TODO Auto-generated method stub\n\t\t// garantizar que solo se analice la petición del jugador en turno.\n\t\twhile (indexJugador != jugadorEnTurno && !entrada.equals(\"reiniciar\") && !entrada.equals(\"abandonar\")) {\n\t\t\tbloqueoJuego.lock();\n\t\t\ttry {\n\t\t\t\tesperarTurno.await();\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\tbloqueoJuego.unlock();\n\t\t}\n\n\t\t// valida turnos para jugador 0 o 1\n\n\t\tif (entrada.equals(\"pedir\")) {\n\t\t\t// dar carta\n\t\t\tmostrarMensaje(\"Se envió carta al jugador \" + idJugadores[indexJugador]);\n\t\t\tCarta carta = mazo.getCarta();\n\t\t\t// adicionar la carta a la mano del jugador en turno\n\t\t\tmanosJugadores.get(indexJugador).add(carta);\n\t\t\tcalcularValorMano(carta, indexJugador);\n\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setCarta(carta);\n\t\t\t// datosEnviar.ponerImagen(carta);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\t// determinar qué sucede con la carta dada en la mano del jugador y\n\t\t\t// mandar mensaje a todos los jugadores\n\t\t\tif (valorManos[indexJugador] > 21) {\n\t\t\t\t// jugador Voló\n\t\t\t\tdatosEnviar\n\t\t\t\t\t\t.setMensaje(idJugadores[indexJugador] + \" tienes \" + valorManos[indexJugador] + \" volaste :(\");\n\t\t\t\tdatosEnviar.setJugadorEstado(\"voló\");\n\t\t\t\tfor (int i = 0; i < jugadores.length; i++) {\n\t\t\t\t\tif (indexJugador == i) {\n\t\t\t\t\t\tdatosEnviar.setMensaje(\n\t\t\t\t\t\t\t\tidJugadores[indexJugador] + \" tienes \" + valorManos[indexJugador] + \" volaste\");\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatosEnviar.setMensaje(\n\t\t\t\t\t\t\t\tidJugadores[indexJugador] + \" ahora tiene \" + valorManos[indexJugador] + \" volo\");\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// notificar a todos que jugador sigue\n\t\t\t\tif (jugadorEnTurno == 0) {\n\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(idJugadores[1]);\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\n\t\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[1] + \" y tiene: \" + valorManos[1]);\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[1] + \" te toca jugar y tienes \" + valorManos[1]);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\t\tbloqueoJuego.lock();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\t\tjugadores[0].setSuspendido(true);\n\t\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t} else if (jugadorEnTurno == 1) {\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(idJugadores[2]);\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[2] + \" y tiene: \" + valorManos[2]);\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[2] + \" te toca jugar y tienes \" + valorManos[2]);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\t\t\tbloqueoJuego.lock();\n\t\t\t\t\ttry {\n\t\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\t\tjugadores[1].setSuspendido(true);\n\t\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t\t}\n\t\t\t\t} else {// era el jugador 3 entonces se debe iniciar el dealer\n\t\t\t\t\t\t// notificar a todos que le toca jugar al dealer\n\t\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\t\tdatosEnviar.setJugador(\"dealer\");\n\t\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\t\tdatosEnviar.setMensaje(\"Dealer se repartirá carta\");\n\n\t\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\tiniciarDealer();\n\t\t\t\t}\n\n\t\t\t} else {// jugador no se pasa de 21 puede seguir jugando\n\t\t\t\tdatosEnviar.setCarta(carta);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tienes \" + valorManos[indexJugador]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"sigue\");\n\n\t\t\t\tfor (int i = 0; i < jugadores.length; i++) {\n\t\t\t\t\tif (indexJugador == i) {\n\t\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tienes \" + valorManos[indexJugador]);\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" ahora tiene \" + valorManos[indexJugador]);\n\t\t\t\t\t\tjugadores[i].enviarMensajeCliente(datosEnviar);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Plantar\n\t\t} else if (entrada.equals(\"plantar\")) {\n\t\t\t// jugador en turno plantó\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" se plantó\");\n\t\t\tdatosEnviar.setJugadorEstado(\"plantó\");\n\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\t// notificar a todos el jugador que sigue en turno\n\t\t\tif (jugadorEnTurno == 0) {\n\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[1]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[1] + \" te toca jugar y tienes \" + valorManos[1]);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[1] + \" y tiene: \" + valorManos[1]);\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\tjugadores[indexJugador].setSuspendido(true);\n\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\t\t\t} else if (jugadorEnTurno == 1) {\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(idJugadores[2]);\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(idJugadores[2] + \" te toca jugar y tienes \" + valorManos[2]);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\tdatosEnviar.setMensaje(\"Juega \" + idJugadores[2] + \" y tiene: \" + valorManos[2]);\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\n\t\t\t\t// levantar al jugador en espera de turno\n\n\t\t\t\tbloqueoJuego.lock();\n\t\t\t\ttry {\n\t\t\t\t\t// esperarInicio.await();\n\t\t\t\t\tjugadores[indexJugador].setSuspendido(true);\n\t\t\t\t\tesperarTurno.signalAll();\n\t\t\t\t\tjugadorEnTurno++;\n\t\t\t\t} finally {\n\t\t\t\t\tbloqueoJuego.unlock();\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\t// notificar a todos que le toca jugar al dealer\n\t\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\t\tdatosEnviar.setJugador(\"dealer\");\n\t\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\t\tdatosEnviar.setMensaje(\"Dealer se repartirá carta\");\n\n\t\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\t\t\t\tiniciarDealer();\n\t\t\t}\n\t\t\t// APUESTA\n\t\t}\n\t\telse if(entrada.equals(\"abandonar\")) {\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tterminarJuego();\n\t\t}\n\t\telse if(entrada.equals(\"salgo\")) {\n\t\t\t\n\t\t}\n\t\telse if(entrada.equals(\"reiniciar\")) {\n\t\t\tnumeroJugadoresReiniciando++;\n\t\t\tif(numeroJugadoresReiniciando==3) {\n\t\t\t\treiniciar();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdatosEnviar.setJugadorEstado(\"reiniciando\");\n\t\t\t\tjugadores[indexJugador].enviarMensajeCliente(datosEnviar);\n\t\t\t\tSystem.out.println(\"Enviando reiniciar al jugador con index \"+indexJugador);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tdatosEnviar = new DatosBlackJack();\n\t\t\tapuestasJugadores[indexJugador] = Integer.parseInt(entrada);\n\n\t\t\tdatosEnviar.setIdJugadores(idJugadores);\n\t\t\tdatosEnviar.setValorManos(valorManos);\n\t\t\tdatosEnviar.setJugador(idJugadores[indexJugador]);\n\t\t\tdatosEnviar.setMensaje(idJugadores[indexJugador] + \" aposto \" + entrada);\n\t\t\tSystem.out.println(indexJugador+\" aposto \"+entrada);\n\t\t\tdatosEnviar.setEstadoJuego(true);\n\t\t\tdatosEnviar.setJugadorEstado(\"apuesta\");\n\t\t\tdatosEnviar.setApuestas(apuestasJugadores);\n\t\t\tSystem.out.println(\"Apuestas a enviar:\");\n\t\t\tfor(int i=0; i<apuestasJugadores.length;i++) {\n\t\t\t\tSystem.out.println(\"[\"+i+\",\"+apuestasJugadores[i]+\"]\");\n\t\t\t}\n\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t\tdatosEnviar.setJugadorEstado(\"iniciar\");\n\t\t\tdatosEnviar.setMensaje(\"\");\n\t\t\tdatosEnviar.setEstadoJuego(false);// Ronda de pedir cartas.\n\t\t\tdatosEnviar.setApuestas(apuestasJugadores);\n\t\t\tjugadores[0].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[1].enviarMensajeCliente(datosEnviar);\n\t\t\tjugadores[2].enviarMensajeCliente(datosEnviar);\n\n\t\t}\n\t}", "private static String generarIdUsuario(String correo2) {\n\t\tString idUsuariogen=\"\";\n\t\tString[] divCorreo=null;\n\t\tString[] divCorreo2=null;\n\t\t\n\t\tif(correo2.contains(\"@ucentral.edu.co\"))\n\t\t{\n\t\t\tdivCorreo=correo2.split(\"@\");\n\t\t\tidUsuariogen = divCorreo[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdivCorreo=correo2.split(\"@\");\n\t\t\tdivCorreo2=divCorreo[1].split(\"\\\\.\");\n\t\t\tidUsuariogen = divCorreo[0]+divCorreo2[0];\n\t\t\tSystem.out.print(idUsuariogen);\n\t\t}\n\t\treturn idUsuariogen;\n\t}", "public FaseDescartes faseJuego();", "public void changerJoueur() {\r\n\t\t\r\n\t}", "public void anazitisiSintagisVaseiHmerominias() {\n\t\tDate firstDt = null, lastDt = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t\t\t\tprescription[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\t// Zitaw apo ton xrhsth to xroniko euros kata to opoio exei graftei sintagh\n\t\t\tfirstDt = sir.readDate(\"DWSTE ARXIKH HMEROMHNIA: \");\n\t\t\tlastDt = sir.readDate(\"DWSTE TELIKH HMEROMHNIA: \");\n\t\t\tSystem.out.println();\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t// An h hmeromhnia eggrafhs ths syntaghs einai anamesa sta xronika oria pou exei dwsei o xrhsths ektypwnetai\n\t\t\t\tif(firstDt.before(prescription[i].getDate()) && (lastDt.after(prescription[i].getDate()))) \n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH METAKSY:\" + firstDt + \" KAI: \" + lastDt);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public Partido(Equipo equipo1, Equipo equipo2, String campo, String fecha) {\n\t\tthis.jugado = false;\n\t\tthis.equipo1 = equipo1;\n\t\tthis.equipo2 = equipo2;\n\t\tthis.golesEquipo1 = -1;\n\t\tthis.golesEquipo2 = -1;\n\t\tthis.campo = campo;\n\t\tthis.fecha = fecha;\n\t\tthis.notas = \"\";\n\t\tthis.arbitro = null;\n\t}", "private void jButton2ActionPerformed(ActionEvent evt) {\n\t \ttry{\n\t \t\tenseigne_client = jComboBox1.getSelectedItem().toString();\n\t \t\tcodeProduit = jComboBox2.getSelectedItem().toString();\n\t\t \tDouble nvTauxReprise = Double.parseDouble(jTextField1.getText());\n\t\t \t\n\t\t \ttry{\n\t\t \t\tmd.updateTauxReprise(nvTauxReprise, enseigne_client, codeProduit);\n\t\t \t} catch (Exception e){\n\t\t \t\tmd.insertNvTxReprise(nvTauxReprise, enseigne_client, codeProduit, false);\n\t\t \t}\n\t\t \t\n\t \t} catch (Exception e){}\n\t \t/*\n\t \tdouble pourcentage = 0.0;\n\t \tdouble tauxreprise = 0.0;\n\t \tjLabel1.setText(\"Taux de reprise actuel : \");\n\t \tString nomprofil = \"\";\n\t \tString nomproduit = \"\";\n\t \t\n\t\t\tpourcentage = Integer.parseInt(jTextField1.getText());\n\t\t\tnomprofil = (String) jComboBox1.getSelectedItem();\n\t\t\tnomproduit = (String) jComboBox2.getSelectedItem();\n\t\t\t\n\t\t\tmd.updateTauxReprise(pourcentage, nomprofil, nomproduit);\n\t\t\ttauxreprise = rd.recuperationTxReprise(codeProduit, enseigne_client);\n\t\t\tjLabel1.setText(jLabel1.getText() + \" \" + tauxreprise + \" %\");\n\t\t\t*/\n\t\t}", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "String[] chiediSecondaScommessa();", "private Jugador oponente(Jugador jugador,Jugador[] jugadores){\r\n for (Jugador jugador1 : jugadores) {\r\n if (jugador1!=jugador){\r\n return jugador1;\r\n }\r\n }\r\n return null;\r\n }", "private LecturasSensor sacarLecturas(byte[] bufferResp2) {\n\t// Le quito el signo a los bytes.\n\tfor (int j = 0; j < bufferrespint.length; j++) {\n\n\t bufferrespint[j] = bufferResp2[j] & 0xFF;\n\n\t}\n\n\tint medicion = ((bufferrespint[4] * 65536) + (bufferrespint[3] * 256))\n\t\t+ bufferrespint[2];\n\n\tif (logger.isInfoEnabled()) {\n\t logger.info(\"Comando_Anemometro: \" + bufferrespint[0]);\n\t logger.info(\"Borna: \" + bufferrespint[1]);\n\t logger.info(\"Parametro1: \" + bufferrespint[2]);\n\t logger.info(\"PArametro2: \" + bufferrespint[3]);\n\t logger.info(\"Parametro3: \" + bufferrespint[4]);\n\t logger.info(\"Checksum: \" + bufferrespint[5]);\n\t}\n\n\tlectura.setVelocidadAnemometro((((((sens.getRang_med_max() - sens\n\t\t.getRang_med_min()) / (sens.getRang_sal_max() - sens\n\t\t.getRang_sal_min())) * (medicion - sens.getRang_sal_min())) + sens\n\t\t.getRang_med_min()) / ((System.nanoTime() - tiempoini) / Math\n\t\t.pow(10, 9))));\n\n\t// Le pongo sólo tres decimales\n\tlectura.setVelocidadAnemometro(Math.rint(lectura\n\t\t.getVelocidadAnemometro() * 1000) / 1000);\n\n\tlogger.warn(\"Valor del Anemometro: \" + lectura.getVelocidadAnemometro());\n\t// Meto las lecturas al sensor\n\tsens.setPulsos(medicion);\n\tsens.setLectura(lectura.getVelocidadAnemometro());\n\n\treturn lectura;\n }", "public String turno(){\n return partida.turno();\n }", "private String reserver() {\n\t\tScanner scan2 = new Scanner(System.in);\n\t\tSystem.out.println(\"\\n---------------------------------------\\nNotre première chambre libre est : |\\n\"+this.chambresVides().get(0).toString()+\"\\n\");\n\t\tSystem.out.print(\"Pourtant, pour réserver une chambre, il faut que vous soiez inscrit ou admin!\\nEtes vous admin ? O/N : \");\n\t\tString rep = scan2.next();\n\t\tString inscription=\"\";\n\t\tif(rep.equalsIgnoreCase(\"o\")) {\n\t\t\tint check = this.adminLogin();\n\t\t\tif(check==1) {\n\t\t\t\tSystem.out.println(\"\\n------------------\\n| Bonjour Ibobai |\\n------------------\");\n\t\t\t\tthis.reserveChambre();\n\t\t\t\tinscription = \"\\n-------------------------------\\nC'est bien fait Admin, bon travail!\\n-------------------------------\";\n\t\t\t}else {\n\t\t\t\tSystem.err.print(\"\\n-------------------------------\\n\\t XXX\\nVous n'êtes pas un admin!\\n-------------------------------\");\n\t\t\t}\n\t\t}else if (rep.equalsIgnoreCase(\"n\")) {\n\t\t\tSystem.out.print(\"\\nVoulez vous vous inscrire O/N ? \");\n\t\t\tinscription = scan2.next();\n\t\t\tif(inscription.equalsIgnoreCase(\"o\")) {\n\t\t\t\tif(this.userLoing() == 1) {\n\t\t\t\t\tSystem.out.println(\"\\n-----------------------------------------------\\nInscription fini!\\n-----------------------------------------------\");\n\t\t\t\t\t//if the user wanted to reserve a room\n\t\t\t\t\t\tSystem.out.println(\"Mr/Mme Utilisateur.\");\n\t\t\t\t\t\tthis.reserveChambre();\n\t\t\t\t\t\tinscription=\"\\n-------------------------------\\nMerci pour votre réservation!\\n-------------------------------\";\n\t\t\t\t\t\t\n\t\t\t\t}else {\n\t\t\t\t\tinscription=\"\\n-------------------------------\\nVotre inscription a été annulée\\n-------------------------------\";\n\t\t\t\t}\n\t\t\t}else if(inscription.equalsIgnoreCase(\"n\")) {\n\t\t\t\tinscription= \"\\n-------------------------------\\nVotre inscription a été annulée\\n-------------------------------\";\n\t\t\t} else {\n\t\t\t\tinscription = \"-------------------------------\\nVotre saisie n'est pas correct!\\n-------------------------------\";\n\t\t\t}\n\t\t}else if(rep.equalsIgnoreCase(\"q\") || rep.equalsIgnoreCase(\"quit\")) {\n\t\t\tinscription = \"q\";\n\t\t}\n\t\t\n\t\telse {\n\t\t\tSystem.out.println();\n\t\t\tSystem.err.print(\"---------------------------\\nVotre saisie est incorrect!\\n---------------------------\");\n\t\t}\n\t\t\n\t\treturn inscription;\n\t\t\n\t}", "private static void tourJeu(){\n\n\t\twhile(true){\n\t\t\tconsole.afficherEtatJoueurs();\n\t\t\tpasserTour();\n\t\t\tconsole.quelJoueurJoue(tour);\n\t\t\tconsole.afficherJeu();\n\t\t\tconsole.afficherDirectionAssam();\n\n\t\t\tint n;\n\t\t\twhile ((n = console.demanderNbDeplacement()) == -1 );\n\n\t\t\tconsole.afficherDirectionChoisie(n);\n\t\t\tdemanderDeplacerAssam(n);\n\n\n\t\t\tif(joueurElimine == jeu.getJoueurs().length-1){\n\t\t\t\tpasserTour();\n\t\t\t\tconsole.afficherGagnant(tour);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(verifTapis()){\n\t\t\t\tstatistique();\n\t\t\t\treturn;\n\t\t\t}\n\n\n\t\t}\n\t}", "public void somaTempo(Tempo tempo2) {\n\t\tint tempo1EmSec = this.horas*3600 + this.minutos*60 + this.segundos;\n\t\tint tempo2EmSec = tempo2.horas*3600 + tempo2.minutos*60 + tempo2.segundos; \n\t\tint resultado = tempo1EmSec + tempo2EmSec;\n\t\t\n\t\t//Atribuindo o resultado da soma dos tempos em horas, minutos e segundos.\n\t\tthis.horas = resultado / 3600;\n\t\tint aux = resultado % 3600;\n\t\tthis.minutos = aux / 60;\n\t\tthis.segundos = aux % 60;\n\t}", "public Jeu(){\n Saisie.Initialiser();\n this.premierJoueur = CreationDePersonnage(\"joueur1\");\n this.secondJoueur = CreationDePersonnage(\"joueur2\");\n Combat();\n Saisie.Terminer();\n }", "public void guardarJugadores() {\n\n\t\tString ficheroEnMesa = String.format(\"jugadoresEnMesa%d.csv\", id);\n\t\tString ficheroRetirados = \"jugadoresRetirados.csv\";\n\n\t\tGestionCSV.escribirCSV(ficheroEnMesa, jugadoresEnMesa);\n\t\tGestionCSV.escribirCSV(ficheroRetirados, jugadoresRetirados);\n\n\t}", "public jugador(){\n\t\tnombre=\"Dave\";\n\t\ttipo=\"jugador\";\n\t\tpoderataque=6;\n\t\tpuntosvida=20;\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public static void main(String[] args) {\n //variable tipo local que recibe la opcion de nombre para el jugador\n int numeroDeOpcion;\n //acreditacion de los puntos iniciales\n puntosDeVida= 150*(nivel+1);\n puntosDeMana= 10*(nivel+1);\n //inicializacion del juego y preguntando si desea un nombre para el personaje\n \tSystem.out.println(\" ---->BIENVENIDO AL JUEGO<----\");\n \tSystem.out.println(\"\\nDesea ingresar un nombre a su personaje [S]si, [N]no\");\n \tScanner caracterNombre=new Scanner(System.in);\n \tString opcionTemp = caracterNombre.nextLine();\n \topcion = opcionTemp.charAt(0); //leyendo opcion\n \t//Ingresando un nombre por el jugador\n \tif(opcion=='s'||opcion=='S'){\n \t\tSystem.out.println(\"Ingrese el nombre:\");\n \t\tScanner cadenaNombre=new Scanner(System.in);\n \t\tnombrePersonaje=cadenaNombre.nextLine();\n \t}\n //Estableciendo nombre predeterminado por el juego\n else{\n \tnombrePersonaje=\"Jugador1\";\n \tSystem.out.printf(\"\\nSe le a asignado el personaje:\\t\"+nombrePersonaje); \n \t}\n do{\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n //Menu de opciones principales para el jugador\n System.out.println(\"\\n..MENU DE OPCIONES..\");\n System.out.println(\"1. A la carga.\"); //Inicia la battalla\n System.out.println(\"2.Tienda.\"); //Permite comprar articulos para la batalla\n System.out.println(\"3.zzZzzZzzZ(Dormir).\");//Permite recuperar al jugador a su estado inicial \n System.out.println(\"4.Status.\"); //Muestra las estadisticas del juego\n System.out.println(\"5.Mas Poder!!!.\"); //Para aumento de nivel del juego \n System.out.println(\"6.Salir.\"); //finaliza las acciones y sale del juego\n do{//validando el numero de opcion\n System.out.println(\"Ingrese el numero de opcion:\");\n numeroDeOpcion= scanner.nextInt();\n }\n while(numeroDeOpcion<1 || numeroDeOpcion>6);\n //comparando la opcion ingresada\n switch(numeroDeOpcion){\n //mostrando los casos existentes por comparar\n case 1:{\n do{\n batalla();//llamando a la funcion batalla\n //Validando la repeticion de la fuencion o su finalizacion\n System.out.println(\"\\nDesea otra Batalla? [S]i, [N]o\");\n Scanner caracterBatalla=new Scanner(System.in);\n String opcionTemp1 = caracterBatalla.nextLine();\n repetirOpcion = opcionTemp1.charAt(0);\n opcionMiedo=0; //reiniciando la opcion miedo\n } \n //condicion del bucle para la funcion batalla \n while(repetirOpcion=='s'||repetirOpcion=='S');\n break;\n }\n case 2:{\n do{\n tienda();//llamando a la funcion tienda\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea realizar otra compra? [S]i, [N]o\");\n Scanner caracterTienda=new Scanner(System.in);\n String opcionTemp2 = caracterTienda.nextLine();\n repetirOpcion2 = opcionTemp2.charAt(0);\n }\n //condicion de bucle para la funcion tienda\n while(repetirOpcion2=='s'||repetirOpcion2=='S');\n break;\n }\n case 3:{\n do{\n dormir();//llamando a la funcion dormir\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea volver a dormir? [S]i, [N]o\");\n Scanner caracterDormir=new Scanner(System.in);\n String opcionTemp3 = caracterDormir.nextLine();\n repetirOpcion3 = opcionTemp3.charAt(0);\n }\n //condicion de bucle para la funcion dormir \n while(repetirOpcion3=='s'||repetirOpcion3=='S');\n break;\n }\n case 4:{\n do{\n status();//llamando a la funcion status\n //validando su repeticion\n System.out.println(\"\\nMostrar nuevamente? [S]i, [N]o\");\n Scanner caracterStatus=new Scanner(System.in);\n String opcionTemp4 = caracterStatus.nextLine();\n repetirOpcion4 = opcionTemp4.charAt(0);\n }\n //condicion de bucle para la funcion status \n while(repetirOpcion4=='s'||repetirOpcion4=='S');\n break;\n }\n case 5:{\n do{\n poder();//llamando a la funcion poder\n //validando la repeticion de la funcion\n System.out.println(\"\\nDesea mas poder? [S]i, [N]o\");\n Scanner caracterPoder=new Scanner(System.in);\n String opcionTemp5 = caracterPoder.nextLine();\n repetirOpcion5 = opcionTemp5.charAt(0);\n }\n //condion de bucle para la funcion poder \n while(repetirOpcion5=='s'||repetirOpcion5=='S');\n break;\n }\n \tdefault:{\n System.exit(0);//saliendo del juego\n break;\n }\n }\n //validacion del retorno al menu principal\n System.out.println(\"volver al menu [S]si, [N]no?\");\n Scanner caracterVolver=new Scanner(System.in);\n String opcionTemp6 = caracterVolver.nextLine();\n opcionSalir=opcionTemp6.charAt(0);\n }\n //condicion del bucle para menu principal\n while(opcionSalir=='S'||opcionSalir=='s'); \n }", "Jugador consultarGanador();", "public Regla2(){ /*ESTE ES EL CONSTRUCTOR POR DEFECTO */\r\n\r\n /* TODAS LAS CLASES TIENE EL CONSTRUCTOR POR DEFECTO, A VECES SE CREAN AUTOMATICAMENTE, PERO\r\n PODEMOS CREARLOS NOSOTROS TAMBIEN SI NO SE HUBIERAN CREADO AUTOMATICAMENTE\r\n */\r\n \r\n }", "private Malote buscaMaloteDestino(Localidade destinoMalote) {\n\t\tlogger.info(\"buscar Malote Destino:\"+destinoMalote.getDescricao());\r\n\t\t\t\t\t\t \r\n\t\tLocalidade destinoFinal = destinoMalote;\r\n\t\tTipoMalote tipoMalote = TipoMalote.SEPEX;\r\n\t\t\r\n\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.VARAS_INT) &&\r\n\t\t\t\tdestinoMalote.temCodUnidadeAdmCentral()) {\r\n\t\t\tlogger.info(\"<<< malote seadm interior >>\");\r\n\t\t\tdestinoFinal = destinoMalote.getUnidadeAdmCentral();\r\n\t\t\ttipoMalote = TipoMalote.SEADM_INT;\r\n\t\t} else {\r\n\t\t\tif (destinoMalote.getTipoRemessa().equals(TipoRemessa.INTERNO) && destinoMalote.isAgrupado()) {\r\n\t\t\t\tlogger.info(\"<<< malote agrupado >>\");\r\n\t\t\t\tdestinoFinal = destinoMalote.getMaloteAgrupado();\r\n\t\t\t} else {\t\t\r\n\t\t\t\tlogger.info(\"<<< malote interno nao agrupado>>>\");\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tStringBuilder sb = new StringBuilder(\"from Malote m \");\r\n\t\tsb.append(\"where m.fechado = false and \");\r\n\t\tsb.append(\"m.tipoMalote = :pTipoMalote \");\r\n\t\tsb.append(\"and m.destino = :pDestino\");\r\n\t\tQuery q = em.createQuery(sb.toString());\r\n\t\tq.setParameter(\"pTipoMalote\", tipoMalote);\r\n\t\tq.setParameter(\"pDestino\", destinoFinal);\r\n\t\t\r\n\t\tMalote maloteEnviar = (Malote) q.getSingleResult();\r\n\t\t\r\n\t\tif (null == maloteEnviar) {\r\n\t\t\tlogger.info(\"<<<bmd - malote novo>>\");\r\n\t\t\tLocalidadeManager locDAO = new LocalidadeManager();\r\n\t\t\tmaloteEnviar = new Malote();\r\n\t\t\tmaloteEnviar.setDestino(destinoFinal);\r\n\t\t\t// rem : sepex ou sistema\r\n\t\t\tmaloteEnviar.setRemetente(locDAO.remetenteSepex());\r\n\t\t\tmaloteEnviar.setTipoMalote(tipoMalote);\r\n\t\t\tmaloteEnviar.setDtEnvio(Calendar.getInstance().getTime());\r\n\t\t\tsalva(maloteEnviar);\r\n\t\t\t//closeSession();\r\n\t\t}\r\n\t\treturn maloteEnviar;\r\n\t}", "public Jogador jogadorDaVez() {\r\n Jogador jogadorvez = null;\r\n \r\n if (this.vezDoJogador1 ){\r\n jogadorvez = jogador1; \r\n }else{\r\n jogadorvez = jogador2;\r\n }\r\n return jogadorvez;\r\n }", "public void jugarMaquinaSola(int turno) {\n if (suspenderJuego) {\n return;\n }\n CuadroPieza cuadroActual;\n CuadroPieza cuadroDestino;\n CuadroPieza MovDestino = null;\n CuadroPieza MovActual = null;\n for (int x = 0; x < 8; x++) {\n for (int y = 0; y < 8; y++) {\n cuadroActual = tablero[x][y];\n if (cuadroActual.getPieza() != null) {\n if (cuadroActual.getPieza().getColor() == turno) {\n for (int x1 = 0; x1 < 8; x1++) {\n for (int y1 = 0; y1 < 8; y1++) {\n cuadroDestino = tablero[x1][y1];\n if (cuadroDestino.getPieza() != null) {\n if (cuadroActual.getPieza().validarMovimiento(cuadroDestino, this)) {\n if (MovDestino == null) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n } else {\n if (cuadroDestino.getPieza().getPeso() > MovDestino.getPieza().getPeso()) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n if (cuadroDestino.getPieza().getPeso() == MovDestino.getPieza().getPeso()) {\n //Si es el mismo, elijo al azar si moverlo o no\n if (((int) (Math.random() * 3) == 1)) {\n MovActual = cuadroActual;\n MovDestino = cuadroDestino;\n }\n }\n }\n }\n\n }\n }\n }\n }\n }\n }\n }\n if (MovActual == null) {\n boolean b = true;\n do {//Si no hay mov recomendado, entonces genero uno al azar\n int x = (int) (Math.random() * 8);\n int y = (int) (Math.random() * 8);\n tablero[x][y].getPieza();\n int x1 = (int) (Math.random() * 8);\n int y1 = (int) (Math.random() * 8);\n\n MovActual = tablero[x][y];\n MovDestino = tablero[x1][y1];\n if (MovActual.getPieza() != null) {\n if (MovActual.getPieza().getColor() == turno) {\n b = !MovActual.getPieza().validarMovimiento(MovDestino, this);\n //Si mueve la pieza, sale del while.\n }\n }\n } while (b);\n }\n if (MovActual.getPieza().MoverPieza(MovDestino, this)) {\n this.setTurno(this.getTurno() * -1);\n if (getRey(this.getTurno()).isInJacke(this)) {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Hacke Mate!!! - te lo dije xD\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n } else {\n JOptionPane.showMessageDialog(null, \"Rey en Hacke - ya t kgste\");\n }\n } else {\n if (Pieza.isJugadorAhogado(turno, this)) {\n JOptionPane.showMessageDialog(null, \"Empate!!!\\nComputadora: Solo por que te ahogaste...!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Deseas Empezar una nueva Partida¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n if (Pieza.getCantMovimientosSinCambios() >= 50) {\n JOptionPane.showMessageDialog(null, \"Empate!!! \\nComputadora: Vaya, han pasado 50 turnos sin comernos jeje!!!\");\n if (JOptionPane.showConfirmDialog(null, \"Otra Partida Amistosa¿?\", \"Nueva Partida\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {\n ordenarTablero();\n } else {\n suspenderJuego = true;\n }\n return;\n }\n }\n }\n if (this.getTurno() == turnoComputadora) {\n jugarMaquinaSola(this.getTurno());\n }\n }", "@Override\n\tpublic void ingresarFicha(VideoJuego juego) {\n\t\t\n\t}", "public static void EjecutaEjercicio2A(String entrada) {\n\t\tEjercicio2.iniDatos(entrada);\n\t\t\n\t\t// Declarar vértice de inicio para el grafo:\n\t\tVerticeAbogado verticeInicial = VerticeAbogado.verticeInicial();\n\t\t\n\t\t// Inicializar el grafo virtual:\n\t\t/*\n\t\t * 2 vías: \n\t\t * \t· Con peso en el vértice. \n\t\t * \t· Con peso en las aristas.\n\t\t*/\n\t\t\t\t\n\t\t// Inicializa un grafo virtual de tipo simpleVirtualGraph a partir del vértice inicial con peso:\n\t\tEGraph<VerticeAbogado, AristaAbogado> grafoVirtual = Graphs2.simpleVirtualGraph(verticeInicial, x -> x.getEdgeWeight());\n\n\t\t// Invocar el algoritmo de A*: \n\t\t/*\n\t\t * 2 vías: \n\t\t * · Expresando el vértice final de destino.\n\t\t * · Mediante un predicado objetivo.\n\t\t */\n\t\tAStar<VerticeAbogado, AristaAbogado> algoritmoA = GraphAlg.aStarGoal(\n\t\t\t\tgrafoVirtual,\n\t\t\t\tVerticeAbogado.objetivo(),\n\t\t\t\tHeuristicaAbogado::heuristica\n\t\t\t\t);\n\n\t\t// Proporciona un camino devuelto por A* desde el vértice inicial al objetivo:\n\t\tGraphPath<VerticeAbogado, AristaAbogado> caminoA = algoritmoA.search().get();\n\t\t\n\t\t// Solución: lista de aristas recorridos del grafo: \n\t\tList<AristaAbogado> aristas = caminoA.getEdgeList();\n\t\tSystem.out.println(\"$$$$$$$$$$$$$$$$$$$$$$$ A ESTRELLA $$$$$$$$$$$$$$$$$$$$$$$\");\n\t\tSolucion2.solucion(aristas, entrada);\n\t\t\n\t\t// DEBUG!\n\t\t/*\n\t\t * List<VerticeAbogado> vertices = caminoA.getVertexList();\n\t\t * System.out.println(vertices);\n\t\t*/\n\t\t\n\t}", "public void asignarPersona(Jugador j){\r\n this.jugador = j;\r\n }", "public boolean jeu() {\n int k;\n\n String compJoueur = \"\";\n String compOrdi = \"\";\n String reponse;\n\n boolean victoireJoueur = false;\n boolean victoireOrdi = false;\n String mystJoueur = challenger.nbMystere(); /**nb que le joueur doit trouver*/\n String mystOrdi = defenseur.nbMystere(); /**nb que l'ordinateur doit trouver*/\n String propOrdi = defenseur.proposition(); /**ordinateur genere un code aleatoire en premiere proposition*/\n log.info(\"Proposition ordinateur : \" + propOrdi); /**afficher proposition ordinateur*/\n String propJoueur = \"\";\n String goodResult = MethodesRepetitives.bonResultat();\n\n\n for (k = 1; !victoireJoueur && !victoireOrdi && k <= nbEssais; k++) { /**si ni le joueur ou l'ordinateur n'ont gagne et si le nombre d'essais n'est pas atteind, relancer*/\n\n compOrdi = MethodesRepetitives.compare(mystOrdi, propOrdi); /**lancer la methode de comparaison du niveau defenseur*/\n log.info(\"Reponse Ordinateur :\" + compOrdi); /**afficher la comparaison*/\n propJoueur = challenger.proposition(); /**demander une saisie au joueur selon le mode challenger*/\n compJoueur = MethodesRepetitives.compare(mystJoueur, propJoueur); /**comparer selon le mode challenger*/\n log.info(\"Reponse Joueur :\" + compJoueur); /**afficher la comparaison*/\n\n if (compOrdi.equals(goodResult)) { /**si l'ordinateur a gagne, changement de la valeur victoireOrdi*/\n victoireOrdi = true;\n }else if(compJoueur.equals(goodResult)) {/**si le joueur a gagne changement de la valeur victoireJoeur*/\n victoireJoueur = true;\n } else if (k < nbEssais) { /**sinon redemander un code a l'ordinateur selon les symboles de comparaison*/\n propOrdi = defenseur.ajuste(propOrdi, compOrdi);\n log.info(\"Proposition Ordinateur :\" + propOrdi);\n }\n }\n\n if (victoireOrdi || !victoireJoueur)/**si l'ordinateur ou le joueur perdent alors perdu sinon gagne*/\n victoireJoueur = false;\n else\n victoireJoueur = true;\n\n return victoireJoueur;\n\n\n }", "public void run() {\t\n\t\tScanner s = new Scanner(System.in);\n\t\tString message = null;\n\t\tString NewMess = null;\n\t\t\ttry {\n\t\t\t\t\t// Flux entrant du Joueur1\n\t\t\t\t\tBufferedReader bw1 = new BufferedReader(new InputStreamReader(socket1.getInputStream()));\n\t\t\t\t\t\n\t\t\t\t\t// Flux entrant du Joueur2\n\t\t\t\t\tBufferedReader bw2 = new BufferedReader( new InputStreamReader(socket2.getInputStream()));\n\t\t\t\t\t\n\t\t\t\t\t// Flux sortant du Joueur1\n\t\t\t\t\tPrintWriter out1 = new PrintWriter(socket1.getOutputStream(),true);\n\t\t\t\t\t\n\t\t\t\t\t// Flux sortant du Joueur2\n\t\t\t\t\tPrintWriter out2 = new PrintWriter(socket2.getOutputStream(),true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Renvoie le mot-but au joueur 1.\n\t\t\t\t\tString mot1 = \"Le mot à faire découvrir est : \" ;\n\t\t\t\t\tlemot = this.getTab();\n\t\t\t\t\tmot = mot1 + lemot;\n\t\t\t\t\tout1.println( mot);\n\t\t\t\t\tSystem.out.println(mot); // On affiche au serveur le mot à faire découvrir.\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Renvoie au Joueur 2 le message du Joueur1 avec les 30% de caractères en moins. \n\t\t\t\t\tString J1 = \"Recu de Joueur 1 : \";\n\t\t\t\t\tString J1Serveur = \"Message du Joueur1 (sans modification) : \";\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tString accent = newFormat(bw1.readLine());\n\t\t\t\t\t\tNewMess=SuppressionMot(lemot,accent);\n\t\t\t\t\t\tmessage=getSuppr30(NewMess);\n\t\t\t\t\t\tout2.println(J1 + message);\n\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(J1Serveur + accent);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}catch (IOException e ) {\n\t\t\t\t\n\t\t\t\t//'Déconnexion' lorsque un des joueurs quitte la partie.\n\t\t\t\tSystem.out.println(\"Déconnexion\");\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n\t\t}", "public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON IATRO ME EPWNYMO: \" + doctorName);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void setNomorSK2 (String NomorSK2);", "public static void main (String [] args){\r\n Jefatura jefe_RR=new Jefatura(\"Jeanpool\",55000,2006,9,25);\r\n jefe_RR.estableceIncentivo(2570);\r\n Empleado [] misEmpleados=new Empleado[6];\r\n misEmpleados[0]=new Empleado(\"Paco Gomez\",85000,1990,12,17);\r\n misEmpleados[1]=new Empleado(\"Ana Lopez\",95000,1995,06,02);\r\n misEmpleados[2]=new Empleado(\"Maria Martin\",105000,2002,03,15);\r\n misEmpleados[3]=new Empleado(\"Jeanpool Guerrero\");\r\n misEmpleados[4]=jefe_RR;/**--Polimorfismo: Prinicipio de sustitucion*/\r\n misEmpleados[5]=new Jefatura(\"Maria\",95000,1999,5,26);\r\n Jefatura jefa_Finanzas=(Jefatura)misEmpleados[5];/** CASTING CONVERTIR UN OBJETO A otro */\r\n jefa_Finanzas.estableceIncentivo(55000);\r\n \r\n \r\n \r\n /** for(int i=0;i<3; i++){\r\n misEmpleados[i].subeSueldo(5);\r\n \r\n }\r\n \r\n for(int i=0;i<3;i++){\r\n System.out.println(\"Nombre \"+misEmpleados[i].dimeNombre() + \"Sueldo: \"+misEmpleados[i].dimeSueldo()+ \"Fecha Alta: \"+misEmpleados[i].dameFechaContrato());\r\n }\r\n */\r\n\r\n for(Empleado elementos:misEmpleados){\r\n \r\n elementos.subeSueldo(5);\r\n \r\n }\r\n \r\n for(Empleado elementos:misEmpleados){\r\n System.out.println(\"Nombre: \"+elementos.dimeNombre()+ \" Sueldo: \"+elementos.dimeSueldo()+ \" Alta Contrato: \"+elementos.dameFechaContrato());\r\n }\r\n \r\n }", "public Jugador jugadorMasPartidos() {\n Jugador ju = new Jugador(\"\", 0, 0, 0, 0);\n for (int i = 0; i < jugadores.length; i++) {\n if (jugadores[i] != null && jugadores[i].getCantPartidosJugados() > ju.getCantPartidosJugados()) {\n ju = jugadores[i];\n }\n\n }\n return ju;\n }", "@Override\n\tpublic void visit(DisparoJugadorMaximo disparoJugadorMaximo) {\n\t\t\n\t}", "public Player getPlayer2(){\n return jugador2;\n }", "public Coup coupIA() {\n\n int propriete = TypeCoup.CONT.getValue();\n int bloque = Bloque.NONBLOQUE.getValue();\n Term A = intArrayToList(plateau1);\n Term B = intArrayToList(plateau2);\n Term C = intArrayToList(piecesDispos);\n Variable D = new Variable(\"D\");\n Variable E = new Variable(\"E\");\n Variable F = new Variable(\"F\");\n Variable G = new Variable(\"G\");\n Variable H = new Variable(\"H\");\n org.jpl7.Integer I = new org.jpl7.Integer(co.getValue());\n q1 = new Query(\"choixCoupEtJoue\", new Term[] {A, B, C, D, E, F, G, H, I});\n\n\n if (q1.hasSolution()) {\n Map<String, Term> solution = q1.oneSolution();\n int caseJ = solution.get(\"D\").intValue();\n int pion = solution.get(\"E\").intValue();\n Term[] plateau1 = listToTermArray(solution.get(\"F\"));\n Term[] plateau2 = listToTermArray(solution.get(\"G\"));\n Term[] piecesDispos = listToTermArray(solution.get(\"H\"));\n for (int i = 0; i < 16; i++) {\n if (i < 8) {\n this.piecesDispos[i] = piecesDispos[i].intValue();\n }\n this.plateau1[i] = plateau1[i].intValue();\n this.plateau2[i] = plateau2[i].intValue();\n }\n\n int ligne = caseJ / 4;\n int colonne = caseJ % 4;\n\n if (pion == 1 || pion == 5) {\n pion = 1;\n }\n if (pion == 2 || pion == 6) {\n pion = 0;\n }\n if (pion == 3 || pion == 7) {\n pion = 2;\n }\n if (pion == 4 || pion == 8) {\n pion = 3;\n }\n\n\n Term J = intArrayToList(this.plateau1);\n q1 = new Query(\"gagne\", new Term[] {J});\n System.out.println(q1.hasSolution() ? \"Gagné\" : \"\");\n if (q1.hasSolution()) {\n propriete = 1;\n }\n return new Coup(bloque,ligne, colonne, pion, propriete);\n }\n System.out.println(\"Bloqué\");\n return new Coup(1,0, 0, 0, 3);\n }", "private void cpu_jogada(){\n\n for(i=0;i<8;i++){\n for(j=0;j<8;j++){\n if(matriz[i][j] == jd2){\n // verificarAtaque(i,j,jd2);\n //verificarAtaque as posssibilidades de\n // ataque : defesa : aleatorio\n //ataque tem prioridade 1 - ve se tem como comer quem ataca\n //defesa tem prioridade 2 - ou movimenta a peca que esta sob ataque ou movimenta a outa para ajudar\n //aleatorio nao tem prioridade -- caso nao esteja sob ataque ou defesa\n }\n }\n }\n }", "public void ComprarEdificio(int tipo){\n if(edificios[tipo].tipoCompra.equals(\"oro\")){\n if(aldea.oro >= edificios[tipo].precioCompraMejora()){\n if(aldea.constructoresLibres() > 0){\n // Bloquear constructor\n aldea.bloquearConstructor();\n // Obtener tiempo actual\n Date tiempo = new Date();\n // Gastar oro de edificio\n aldea.gastarOro(edificios[tipo].precioCompraMejora());\n // Construir edificio y obtener evento futuro de culminacion\n // Agregar evento a la LEF\n LEF.add(aldea.construirEdificio(tiempo, edificios[tipo]));\n jTextFieldOro.setText(String.valueOf((int)aldea.oro));\n }\n }\n }else{\n if(aldea.elixir >= edificios[tipo].precioCompraMejora()){\n if(aldea.constructoresLibres() > 0){\n // Bloquear constructor\n aldea.bloquearConstructor();\n // Obtener tiempo actual\n Date tiempo = new Date();\n // Gastar elixir de edificio\n aldea.gastarElixir(edificios[tipo].precioCompraMejora());\n // Construir edificio y obtener evento futuro\n // Agregar evento a la LEF\n LEF.add(aldea.construirEdificio(tiempo, edificios[tipo]));\n jTextFieldElixir.setText(String.valueOf((int)aldea.elixir));\n }\n }\n }\n }", "public void receberJogada(Jogada jogada);", "public ListaJugadores recuperarJugadores() throws SQLException {\n ListaJugadores listaJugadores = null;\n try {\n getConexion();\n String consulta = \"SELECT nombre FROM JUGADORES\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n while (registros.next()) {\n String nombre = registros.getString(\"nombre\");\n Jugador jugador = new Jugador(nombre);\n listaJugadores.agregarJugador(jugador);\n }\n } finally {\n closeConexion();\n }\n return listaJugadores;\n }", "public Jugador jugador() {\r\n\treturn jugador;\r\n }", "public static void main(String[] args) {\n\t\tSecretario s1 = new Secretario(\"Mauro\", \"Pérez\", \"2168\", \"Calle Falsa\", 999, 500, true, \"Fax\");\n\t\tVendedor v1 = new Vendedor(\"Pepe\", \"Martinez\", \"2177\", \"Calle de atras\", 998, 750, 669, \"Alguna\", 0.10);\n\t\tVendedor v2 = new Vendedor(\"Antonio\", \"Martinez\", \"2144\", \"Calle de delante\", 996, 750, 669, \"Alguna\", 0.10);\n\t\tJefeZona j1 = new JefeZona(\"Manolo\", \"Ortega\", \"2155\", \"Una calle\", 997, 1000, true);\n\t\t\n\t\tClientes c1 = new Clientes(\"Cliente 1\");\n\t\tClientes c2 = new Clientes(\"Cliente 2\");\n\t\t\n\t\ts1.setSupervisor(v1);\n\t\t\n\t\tv1.agregarCliente(c1);\n\t\tv1.agregarCliente(c2);\n\t\tv1.eliminarCliente(c1);\n\t\t\n\t\tj1.agregarVendedor(v1);\n\t\tj1.agregarVendedor(v2);\n\t\t\n\t\tSystem.out.println(v1.toString());\n\t\tv1.incrementarSalario();\n\t\tSystem.out.println(v1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(s1.toString());\n\t\ts1.incrementarSalario();\n\t\tSystem.out.println(s1.toString());\n\t\tSystem.out.println();\n\t\tSystem.out.println(j1.toString());\n\t\tj1.incrementarSalario();\n\t\tSystem.out.println(j1.toString());\n\t}", "public ListaPartidas recuperarPartidas() throws SQLException {\n ListaPartidas listaPartidas = null;\n try {\n getConexion();\n String consulta = \"SELECT MANOS.id_mano, CARTAS.valor, CARTAS.palo, JUGADORES.nombre, PARTIDAS.id_partida \" +\n \"FROM MANOS \" +\n \"LEFT JOIN PARTIDAS ON PARTIDAS.id_mano = MANOS.id_mano \" +\n \"LEFT JOIN CARTAS ON CARTAS.id_carta = MANOS.id_carta \" +\n \"LEFT JOIN JUGADORES ON JUGADORES.id_jug = PARTIDAS.id_jug \" +\n \"ORDER BY PARTIDAS.id_mano\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n // Compruebo que se han devuelto datos\n if (registros.next()) {\n // Inicializo el contenedor que se devolverá\n listaPartidas = new ListaPartidas();\n // Declaro e inicializo los objetos que servirán de buffer para añadir datos a cada partida\n LinkedList<Jugador> listaJugadores = new LinkedList<Jugador>();\n LinkedList<Mano> resultado = new LinkedList<Mano>();\n Mano mano = new Mano();\n // Variable que sirve para controlar cuando hay una nueva partida\n int numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n // Variable que sirve para controlar cuando hay una nueva mano\n int numMano = registros.getInt(\"MANOS.id_mano\");\n // Devuelvo el cursor del ResultSet a su posición inicial\n registros.beforeFirst();\n // Bucle encargado de añadir datos a los contenedores\n while (registros.next()) {\n // Declaración de variables\n String palo = registros.getString(\"CARTAS.palo\");\n String valor = registros.getString(\"CARTAS.valor\");\n String nombre = registros.getString(\"JUGADORES.nombre\");\n // Se crea una carta con el palo y el valor devuelto por la consulta SQL\n Carta carta = new Carta(palo, valor);\n // Agrego la carta a la mano\n mano.agregarCarta(carta);\n // Agrego jugadores al contenedor de jugadores controlando si hay duplicados\n if (!listaJugadores.contains(nombre) || listaJugadores.isEmpty()) {\n Jugador jugador = new Jugador(nombre);\n listaJugadores.add(jugador);\n }\n // Cuando hay una nueva mano, la añado al contenedor resultados y creo una nueva Mano\n if (numMano != registros.getInt(\"MANOS.id_mano\") || registros.isLast()) {\n numMano = registros.getInt(\"MANOS.id_mano\");\n mano.setPropietario(nombre);\n resultado.add(mano);\n mano = new Mano();\n }\n // Cuando hay una nueva partida, guardo un objeto Partida en el contenedor de partidas\n if (numPartida != registros.getInt(\"PARTIDAS.id_partida\") || registros.isLast()) {\n numPartida = registros.getInt(\"PARTIDAS.id_partida\");\n Partida partida = new Partida(numPartida, listaJugadores, resultado);\n listaPartidas.agregarPartida(partida);\n // Reinicio los buffers de datos\n listaJugadores = new LinkedList<Jugador>();\n resultado = new LinkedList<Mano>();\n }\n }\n }\n } finally {\n closeConexion();\n }\n return listaPartidas;\n }", "void jugar(Jugada jugada);", "public void setActividad2(Actividad actividad2) {\r\n\t\tthis.actividad2 = actividad2;\r\n\t}", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }" ]
[ "0.6209033", "0.616267", "0.6036375", "0.5886414", "0.58692706", "0.57492954", "0.563751", "0.55853295", "0.55841494", "0.553163", "0.55092716", "0.5482392", "0.54678977", "0.54607755", "0.53857577", "0.5379545", "0.53764445", "0.5375492", "0.53483033", "0.5337708", "0.5337092", "0.5328901", "0.5315857", "0.5282677", "0.52600926", "0.52465427", "0.52364725", "0.521656", "0.5215338", "0.52122784", "0.5210732", "0.5198436", "0.5180496", "0.51672405", "0.51570547", "0.51511407", "0.5133522", "0.5130544", "0.5129897", "0.5126349", "0.5120073", "0.5111303", "0.5097664", "0.50771344", "0.5066343", "0.5060341", "0.50588673", "0.50557804", "0.50546914", "0.5054223", "0.5042198", "0.5041005", "0.5040066", "0.50341296", "0.5032369", "0.5029718", "0.502489", "0.5023321", "0.50202364", "0.50163746", "0.5015508", "0.5012566", "0.5011615", "0.5010736", "0.4999535", "0.4992688", "0.49885178", "0.49879602", "0.49808937", "0.49746847", "0.49737182", "0.4962935", "0.49620426", "0.4956953", "0.49533173", "0.495147", "0.49487093", "0.49485582", "0.49460068", "0.49444914", "0.49384344", "0.4927994", "0.49258816", "0.49219334", "0.49200106", "0.49110097", "0.49099895", "0.49097407", "0.49089816", "0.49061996", "0.4904886", "0.49035183", "0.4899874", "0.48874557", "0.4886048", "0.4885772", "0.48846614", "0.48797503", "0.48764646", "0.48738936" ]
0.65278924
0
Lee la baraja de la partida
public Baraja getBaraja() { return baraja; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "private void cargarFichaLepra_convivientes() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "public void billeBarre() { \t\t\t\t\t\t\t\t\t\t\t\n\t\tint contact = 0;\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Étude des contacts avec les 8 points de la bille\n\t\t// Contact GaucheHaut de la bille\n\n\t\t// Contact haut de la bille\n\t\tint[] p = billeEnCours.MH();\n\t\tif (p[1] <= barreEnCours.bas() && p[1] >= barreEnCours.haut() && p[0] <= barreEnCours.droite() && p[0] >= barreEnCours.gauche()) {\n\t\t\tcontact = 3;\n\t\t}\n\n\t\t// Contact bas de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.MB();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 7;\n\t\t\t}\n\t\t}\n\n\t\t// Contact droite de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.DM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact gauche de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.GM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 1;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 4;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 8;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 6;\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse \n\n\t\t// Rencontre d'un coin\n\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\tbilleEnCours.demiTour();\n\t\t}\n\n\t\t// Contact Classique\n\t\t// Gauche - Droite\n\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\t// Haut - Bas : Déviation de la balle\n\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\tint[] nv = new int[] {1,1};\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4 && billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] - 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] + 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\t\t\t\n\n\n\t}", "private static void benvenuto() {\n\t\tUtilityIO.header(MSG_BENVENUTO, SIMBOLO_MESSAGGIO_BENV_USCITA);\n\t\tSystem.out.println();\n\t\t\n\t}", "public void bajarBloque() {\n\t\tif (piezaActual != null) {\n\t\t\tif (Mapa.getInstance().estaLibre(piezaActual.getBloque3().getX(),\n\t\t\t\t\tpiezaActual.getBloque3().getY() + 1)) {\n\t\t\t\tpiezaActual.getBloque3().bajar(); // Dejar en ese orden\n\t\t\t\tpiezaActual.getBloque2().bajar();\n\t\t\t\tpiezaActual.getBloque1().bajar();\n\t\t\t} else {\n\t\t\t\tthis.piezaNueva();\n\t\t\t}\n\t\t}\n\t}", "protected void elaboraPagina() {\n testoPagina = VUOTA;\n\n //header\n testoPagina += this.elaboraHead();\n\n //body\n testoPagina += this.elaboraBody();\n\n //footer\n //di fila nella stessa riga, senza ritorno a capo (se inizia con <include>)\n testoPagina += this.elaboraFooter();\n\n //--registra la pagina principale\n if (dimensioniValide()) {\n testoPagina = testoPagina.trim();\n\n if (pref.isBool(FlowCost.USA_DEBUG)) {\n testoPagina = titoloPagina + A_CAPO + testoPagina;\n titoloPagina = PAGINA_PROVA;\n }// end of if cycle\n\n //--nelle sottopagine non eseguo il controllo e le registro sempre (per adesso)\n if (checkPossoRegistrare(titoloPagina, testoPagina) || pref.isBool(FlowCost.USA_DEBUG)) {\n appContext.getBean(AQueryWrite.class, titoloPagina, testoPagina, summary);\n logger.info(\"Registrata la pagina: \" + titoloPagina);\n } else {\n logger.info(\"Non modificata la pagina: \" + titoloPagina);\n }// end of if/else cycle\n\n //--registra eventuali sottopagine\n if (usaBodySottopagine) {\n uploadSottoPagine();\n }// end of if cycle\n }// end of if cycle\n\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) {\n\t\tthis.jugador1 = jugador1;\n\t\tthis.jugador2 = jugador2;\n\t\tthis.baraja = baraja;\n\t}", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }", "public void acheter(){\n\t\t\n\t\t// Achete un billet si il reste des place\n\t\ttry {\n\t\t\tthis.maBilleterie.vendre();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tthis.status.put('B', System.currentTimeMillis());\n\t\tSystem.out.println(\"STATE B - Le festivalier \" + this.numFestivalier + \" a acheté sa place\");\n\t}", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "public void iniciarNovaPartida(Integer posicao);", "private void cargarNotasEnfermeria() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/notas_enfermeria.zul\", \"NOTAS DE ENFERMERIA\",\r\n\t\t\t\tparametros);\r\n\t}", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "@Override\n\tpublic void buildPartB() {\n\t\tproduct.add(\"部件Y\");\n\t}", "void Planificar(Reserva unaReserva);", "public void sauvegarderPointPartie (){\n\t\t\n\t\tint menage = (Integer) pointPartieEnCours.get(THEMES.MENAGE);\n\t\tint maths = (Integer) pointPartieEnCours.get(THEMES.MATHS);\n\t\tint francais = (Integer) pointPartieEnCours.get(THEMES.FRANCAIS);\n\t\t\n\t\tmenage += (Integer) level.get(THEMES.MENAGE);\n\t\tmaths += (Integer) level.get(THEMES.MATHS);\n\t\tfrancais += (Integer) level.get(THEMES.FRANCAIS);\n\t\t\n\t\tlevel.remove(THEMES.MENAGE); \n\t\tlevel.remove(THEMES.MATHS); \n\t\tlevel.remove(THEMES.FRANCAIS); \n\t\t\n\t\t\n\t\tlevel.put(THEMES.MENAGE ,menage); \n\t\tlevel.put(THEMES.MATHS ,maths); \n\t\tlevel.put(THEMES.FRANCAIS ,francais); \n\t\t\n\t}", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "public void precio4e(){\n precioHabitaciones = precioHabitaciones + (cantidadHabitaciones * numeroCamas);\n\n //Restaurante\n if(capacidadRestaurant < 30){\n precioHabitaciones = precioHabitaciones + 10;\n } else if (capacidadRestaurant > 29 && capacidadRestaurant < 51){\n precioHabitaciones = precioHabitaciones + 30;\n } else if (capacidadRestaurant > 50){\n precioHabitaciones = precioHabitaciones + 50;\n }\n\n //Gimnasio\n switch (gimnasio){\n case \"A\":\n precioHabitaciones = precioHabitaciones + 50;\n break;\n case \"B\":\n precioHabitaciones = precioHabitaciones + 30;\n break;\n }\n\n }", "public void finePartita() {\n\r\n }", "public void partieEnCour(int niveau){\n\t\t\t\n\t\t\tif(niveau<=0){\n\t\t\t\tSystem.out.println(\"Quel niveau ?\");\n\t\t\t\tniveau=lire.nextInt();\n\t\t\t}\n\t\t\tthis.niveau=niveau;\n\t\t\tthis.terrainDeLaPartie=this.EnsembleNiveau.listeMap.get(niveau-1);\n\t\t\tSystem.out.println(terrainDeLaPartie.getCave().toString());\n\t\t\tthis.terrainDeLaPartie.afficherMap();\n\t\t\tboolean heroEnVie=true;\n\t\t\twhile(sortieNonAtteint()&& tempsNonEcoule() && heroEnVie==true){\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(ObjetVivant eleViv:terrainDeLaPartie.getPersonnageSurLeTerrain()){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tif(eleViv.estEnVie()){\n\t\t\t\t\t\t\teleViv.seDeplacer(terrainDeLaPartie);\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(DeplacementInvalideException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tfor(ObjetNonVivant eleNonViv:terrainDeLaPartie.getObjetSurLeTerrain()){\n\t\t\t\t\teleNonViv.tomber(terrainDeLaPartie);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tquiEstMort();\n\t\t\t\tquiEstDetruit();\n\t\t\t\tthis.terrainDeLaPartie.getObjetSurLeTerrain().addAll(this.terrainDeLaPartie.reinitialisationObjet());\n\t\t\t\tthis.terrainDeLaPartie.afficherMap();\n\t\t\t\tCave a=this.terrainDeLaPartie.getCave();\n\t\t\t\ta.setCaveTime(a.getCaveTime()-1);\t\t\t\n\t\t\t\tSystem.out.println(this.terrainDeLaPartie.getPersonnageSurLeTerrain().size()-1+\" enemie\");\n\t\t\t\tSystem.out.println(this.terrainDeLaPartie.getObjetSurLeTerrain().size()-1+\" objet\");\n\t\t\t\t\n\t\t\t\theroEnVie=heroEncoreDansListe(this.terrainDeLaPartie.getPersonnageSurLeTerrain());\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif(heroEnVie && !sortieNonAtteint()){\n\t\t\t\tthis.terrainDeLaPartie=this.EnsembleNiveau.listeMap.get(niveau);\n\t\t\t\tpartieEnCour(niveau+1);\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"Vous avez perdu ! Voulez vous rejouer ?\");\n\t\t\t\tSystem.out.println(\"1:rejouer\");\n\t\t\t\tSystem.out.println(\"2:quitter \");\n\t\t\t\tint rep=lire.nextInt();\n\t\t\t\tif(rep==1){\n\t\t\t\t\tFile f=new File(\"BD01plus.bdcff\");\n\t\t\t\t\tEnsembleNiveau=new Univers();\n\t\t\t\t\tLireFichier.lire(f, EnsembleNiveau);\n\t\t\t\t\tthis.partieEnCour(niveau);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public void cambioLigas(){\n\t\ttry{\n\t\t\tmodelo.updatePartidosEmaitzak(ligasel.getSelectionModel().getSelectedItem().getIdLiga());\n\t\t}catch(ManteniException e){\n\t\t\t\n\t\t}\n\t\t\n\t}", "private void BajarPieza1posicion() {\n for (int i = 0; i < 4; ++i) {\r\n int x = posicionX + piezaActual.x(i);\r\n int y = posicionY - piezaActual.y(i);\r\n piezas[(y * anchoTablero) + x] = piezaActual.getPieza();\r\n }\r\n\r\n BorrarLineas();\r\n\r\n if (!finalizoQuitarFilas) {\r\n nuevaPieza();\r\n }\r\n }", "public void ordenaPontos(){\r\n\t\tloja.ordenaPontos();\r\n\t}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public void limpiar() {\n\t//txtBuscar.setText(\"\");\n\n\t// codTemporal.setText(\"\");\n\thabilita(true, false, false, false, false, true, false, true, true);\n }", "public void demarrerPartie(long idPartie) {\n Partie p = daocrud.findOne(idPartie);\r\n\r\n // Erreur si pas au moins 2 joueurs dans la partie\r\n if (jService.recupererNbJoueursParPartieId(idPartie) < 2) {\r\n throw new RuntimeException(\"Erreur : nb joueurs moins 2\");\r\n }\r\n\r\n // passe le joueur d'ordre 1 à etat a la main\r\n jService.passeJoueurOrdre1EtatALaMain(idPartie);\r\n\r\n // distribue 7 cartes d'ingrédients au hasard à chaque joueur de la partie\r\n for (Joueur j : p.getJoueurs()) {\r\n\r\n cService.distribue7CartesParJoueurIdEtPartieId(j.getId(), idPartie);\r\n }\r\n\r\n }", "private void abreContasPagas() {\n FiltroDataListaFornecedor dataListaFornecedor\n = new FiltroDataListaFornecedor(\n new String[]{\n \"/br/rel/caixa/ContasPagas.jasper\",\n \"MES\",\n \"0\"});\n dataListaFornecedor.setVisible(true);\n }", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "public double Baricentro() {\n if (puntos.size() <= 2) {\n return 0;\n } else {\n // Inicializacion de las areas\n double areaPonderada = 0;\n double areaTotal = 0;\n double areaLocal;\n // Recorrer la lista conservando 2 puntos\n Punto2D antiguoPt = null;\n for (Punto2D pt : puntos) {\n if (antiguoPt != null) {\n // Cálculo deñ baricentro local\n if (antiguoPt.y == pt.y) {\n // Es un rectángulo, el baricentro esta en\n // centro\n areaLocal = pt.y * (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n } else {\n // Es un trapecio, que podemos descomponer en\n // un reactangulo con un triangulo\n // rectangulo adicional\n // Separamos ambas formas\n // Primer tiempo: rectangulo\n areaLocal = Math.min(pt.y, antiguoPt.y) + (pt.x - antiguoPt.x);\n areaTotal += areaLocal;\n areaPonderada += areaLocal * ((pt.x - antiguoPt.x) / 2.0 + antiguoPt.x);\n //Segundo tiempo: triangulo rectangulo\n areaLocal = (pt.x - antiguoPt.x) * Math.abs(pt.y - antiguoPt.y) / 2.0;\n areaTotal += areaLocal;\n if (pt.y > antiguoPt.y) {\n // Baricentro a 1/3 del lado pt\n areaPonderada += areaLocal * (2.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n } else {\n // Baricentro a 1/3 dek lado antiguoPt\n areaPonderada += areaLocal * (1.0 / 3.0 * (pt.x - antiguoPt.x) + antiguoPt.x);\n }\n }\n }\n antiguoPt = pt;\n }\n // Devolvemos las coordenadas del baricentro\n return areaPonderada / areaTotal;\n }\n }", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "private void procedureBasePrDessin(){\n if(courante == null){\n reset();\n courante = new Tortue(simpleLogo.getFeuille(), true);\n simpleLogo.setBarreOutilsVisible(true);\n }\n }", "public EnemigoGenerico[] cargaBichos()\n {\n \n //Crear la bicheria (hardCoded)\n CoordCasilla[] origen={new CoordCasilla(1,1), new CoordCasilla(18,1), new CoordCasilla(14,8), new CoordCasilla(17,17), new CoordCasilla(13,5)};\n CoordCasilla[] destino={new CoordCasilla(6,18) , new CoordCasilla(1,1), new CoordCasilla(1,8), new CoordCasilla(18,1) , new CoordCasilla(13,18) };\n \n \n DefBicho pelota=this.atlasBicheria.get(\"Pelota Maligna\");\n EnemigoGenerico bichos[]=new EnemigoGenerico[origen.length];\n \n for(int x=0;x<origen.length;x++)\n {\n List<CoordCasilla> camino = this.getCamino(origen[x], destino[x]);\n Gdx.app.log(\"CAMINO:\", \"DESDE (\"+origen[x].x+\",\"+origen[x].y+\") HASTA ( \"+destino[x].x+\",\"+destino[x].y+\")\");\n for (CoordCasilla cc : camino)\n Gdx.app.log(\"CASILLA.\", String.format(\"(%2d ,%2d )\", cc.x, cc.y));\n \n \n bichos[x] = new EnemigoGenerico(pelota, this.mapaAnimaciones.get(pelota.archivoAnim), pelota.pv, pelota.tasaRegen, pelota.velocidad, camino, pelota.distanciaPercepcion, pelota.ataques);\n }\n \n return bichos;\n }", "public Fenetre_resultats_plaque(float debit_m_1, float debit_m_2, float capacite_th_1, float capacite_th_2, float viscosite_1, float viscosite_2, float conductivite_th_1, float conductivite_th_2, float masse_volumique_1, float masse_volumique_2, float tempc, float tempf, float longueur, float largeur, float hauteur) {\n\n Plaques plaque1;\n Finance F1;\n\n plaque1 = new Plaques(longueur, largeur, hauteur, debit_m_1, debit_m_2, capacite_th_1, capacite_th_2, tempc, tempf, masse_volumique_1, masse_volumique_2, viscosite_1, viscosite_2, conductivite_th_1, conductivite_th_2);\n F1 = new Finance();\n\n int nbre_plaques_total_main = plaque1.calcul_nbre_plaques_total();\n double surface_plaque_main = plaque1.calcul_surface_plaques();\n\n plaque1.calcul_surface_contact();\n\n double smod_main = plaque1.calcul_smod();\n\n plaque1.calcul_coeff_convection_h();\n plaque1.calcul_rth();\n plaque1.calcul_densite_couple();\n plaque1.calcul_rcharge();\n \n double pe_main = plaque1.calcul_Pe();\n\n int nbre_modules_main = plaque1.getter_nbre_modules();\n\n double prix_modules_main = F1.calcul_prix_modules(nbre_modules_main);\n if (prix_modules_main < 0) {\n prix_modules_main = 0;\n }\n \n F1.calcul_volume_plaques(surface_plaque_main, plaque1.getter_diam_tube(), plaque1.getter_epaisseur_plaque(), nbre_plaques_total_main, plaque1.getter_inter_plaque());\n \n double prix_materiaux_main = F1.calcul_prix_matiere();\n if (prix_materiaux_main < 0) {\n prix_materiaux_main = 0;\n }\n \n double prix_total_main = prix_modules_main + prix_materiaux_main;\n\n double energie_produite_main = F1.conversion_kwh(pe_main);\n double revenu_horaire_main = F1.calcul_revenu_horaire();\n double nbre_heures_main = F1.calcul_nbre_heures();\n \n DecimalFormat df2 = new DecimalFormat(\"#.##\");\n DecimalFormat df4 = new DecimalFormat(\"#.####\");\n DecimalFormat df5 = new DecimalFormat(\"#.#####\");\n DecimalFormat df7 = new DecimalFormat(\"#.#######\");\n \n\n String entetes[] = {\"Résultat\", \"Valeur\"};\n Object donnees[][] = {\n {\"Nombre de modules\", plaque1.getter_nbre_modules()},\n {\"Surface proposée (en m²)\", df5.format(plaque1.getter_surface_contact())},\n {\"Surface utilisée par les modules (en m²)\", df5.format(smod_main)},\n {\"Débit massique chaud(en m3/h)\", debit_m_1},\n {\"Débit massique froid(en m3/h)\", debit_m_2},\n {\"Température chaude (en °C)\", tempc},\n {\"Différence de température\", plaque1.getter_diff_temperature()},\n {\"Puissance électrique générée (en W)\", df2.format(pe_main)}};\n\n DefaultTableModel modele = new DefaultTableModel(donnees, entetes) {\n @Override\n public boolean isCellEditable(int row, int col) {\n return false;\n }\n };\n\n tableau = new JTable(modele);\n\n String entetes2[] = {\"Caractéristiques\", \"Valeurs\"};\n Object donnees2[][] = {\n {\"Surface d'un module (en m²)\", plaque1.getter_surface_module()},\n {\"Longueur d'une jambe (en m)\", df4.format(plaque1.getter_longueur_jambe())},\n {\"Surface d'une jambe (en m²)\", df7.format(plaque1.getter_surface_jambe())},\n {\"Densité de couple\", df5.format(plaque1.getter_densite_couple())},\n {\"Conductivité thermique du module (en W/m/K)\", df2.format(plaque1.getter_conduct_th_module())}\n };\n\n DefaultTableModel modele2 = new DefaultTableModel(donnees2, entetes2) {\n @Override\n public boolean isCellEditable(int row, int col) {\n return false;\n }\n };\n\n Object donnees3[][] = {\n {\"Prix des modules (en €)\", df2.format(prix_modules_main)},\n {\"Prix de la matière première (en €)\", df2.format(prix_materiaux_main)},\n {\"Prix total échangeur (en €)\", df2.format(prix_total_main)},\n {\"Prix du kilowatt-heure\", F1.getter_prix_elec()},\n {\"Revenu horaire\", df2.format(revenu_horaire_main)},\n {\"Nbre d'heures pour remboursement\", df2.format(nbre_heures_main)}\n\n };\n String entetes3[] = {\"Caractéristiques\", \"Valeurs\"};\n\n DefaultTableModel modele3 = new DefaultTableModel(donnees3, entetes3) {\n @Override\n public boolean isCellEditable(int row, int col) {\n return false;\n }\n };\n\n tableau3 = new JTable(modele3);\n\n // Pour le graphique en camembert\n final JFXPanel fxPanel = new JFXPanel(); // On crée un panneau FX car on peut pas mettre des objet FX dans un JFRame\n final PieChart chart = new PieChart(); // on crée un objet de type camembert\n chart.setTitle(\"Répartition du prix de l'échangeur\"); // on change le titre de ce graph\n chart.getData().setAll(new PieChart.Data(\"Prix des modules \" + prix_modules_main + \" €\", prix_modules_main), new PieChart.Data(\"Prix du matériau \" + df2.format(prix_materiaux_main) + \" €\", prix_materiaux_main)\n ); // on implémente les différents case du camebert\n final Scene scene = new Scene(chart); // on crée une scene (FX) où l'on met le graph camembert\n fxPanel.setScene(scene);\n\n // a partir de là c'est plus le camembert\n tableau2 = new JTable(modele2);\n\n JScrollPane tableau_entete = new JScrollPane(tableau);\n JScrollPane tableau_entete2 = new JScrollPane(tableau2);\n JScrollPane tableau_entete3 = new JScrollPane(tableau3);\n\n tableau_entete.setViewportView(tableau);\n tableau_entete2.setViewportView(tableau2);\n tableau_entete3.setViewportView(tableau3);\n\n tableau_entete.setPreferredSize(new Dimension(550, 170));\n tableau_entete2.setPreferredSize(new Dimension(550, 110));\n tableau_entete3.setPreferredSize(new Dimension(550, 120));\n\n JLabel label_resultat = new JLabel(\"Resultat de la simulation\");\n JLabel label_module = new JLabel(\"Caractéristiques du module utilisé\");\n JLabel label_prix = new JLabel(\"Prix de l'échangeur\");\n \n setBounds(0, 0, 600, 950);\n setTitle(\"Résultats Technologie Plaques\");\n \n panneau = new JPanel();\n panneau.add(label_resultat);\n panneau.add(tableau_entete);\n panneau.add(label_module);\n panneau.add(tableau_entete2);\n panneau.add(label_prix);\n panneau.add(tableau_entete3);\n panneau.add(fxPanel); // on ajoute au Jframe notre panneau FX (qui contient donc UNE \"scene\" qui elle contient les object FX, ici notre camembert)\n getContentPane().add(panneau);\n \n this.setLocation(600, 0);\n this.setResizable(false);\n }", "@Listen(\"onClick =#asignarEspacio\")\n\tpublic void Planificacion() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-recursos-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "@Override\n public void cantidad_Punteria(){\n punteria=69.5+05*nivel+aumentoP;\n }", "private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public void recibir_estado_partida(){\n\n }", "final void formar(final Campbatalla campB) {\n\n int numFiles = campB.obtenirFiles();\n double alcadaSoldat = soldats.get(0).getImatge().getHeight();\n double ampladaSoldat = soldats.get(0).getImatge().getHeight();\n int indexFila = 0;\n\n double xActual = soldats.get(0).getImatge().getX();\n double yActual = 0;\n\n for (int s = 0; s < soldats.size(); s++) {\n if (indexFila <= numFiles) {\n\n soldats.get(s).getImatge().setLocation(xActual, yActual);\n yActual += alcadaSoldat;\n indexFila++;\n if (indexFila == numFiles) {\n indexFila = 0;\n yActual = 0;\n\n // Si l'ubicació es igual -1 posicionem els soldats a\n // l'esquerra.\n if (ubicacio == -1) {\n xActual += ampladaSoldat;\n\n // Si l'ubicació es igual a 1 els posicionem a la\n // dreta.\n } else if (ubicacio == 1) {\n xActual -= ampladaSoldat;\n }\n\n }\n }\n\n }\n\n }", "public void bayar() {\n transaksi.setStatus(\"lunas\");\n setLunas(true);\n }", "public void pintarBloques() {\r\n for (int i = 0; i < this.PrimeraFilaDeBloques.length; i++) {\r\n if (this.PrimeraFilaDeBloques[i] == this.ES_BLOQUE) {\r\n this.pintor.setColor(Color.RED);\r\n } else {\r\n this.pintor.setColor(this.color);\r\n }\r\n this.pintor.clearRect((i * 65) + 40, 60, 60, 40);\r\n this.pintor.fillRect((i * 65) + 40, 60, 60, 40);\r\n }\r\n\r\n for (int i = 0; i < this.SegundaFilaDeBloques.length; i++) {\r\n if (this.SegundaFilaDeBloques[i] == this.ES_BLOQUE) {\r\n this.pintor.setColor(Color.RED);\r\n } else {\r\n this.pintor.setColor(this.color);\r\n }\r\n this.pintor.clearRect((i * 65) + 40, 120, 60, 40);\r\n this.pintor.fillRect((i * 65) + 40, 120, 60, 40);\r\n }\r\n }", "private void gerarLaudoPermanenciaMaior(MpmPrescricaoMedica prescricao,\r\n\t\t\tList<MpmLaudo> laudoList, FatConvenioSaudePlano convenioSaudePlano,\r\n\t\t\tAghParametros seqLaudoMaiorPermanencia) {\r\n\t\tMpmTipoLaudoConvenio tipoLaudoConvenio = this\r\n\t\t\t\t.getMpmTipoLaudoConvenioDAO()\r\n\t\t\t\t.obterTempoValidadeTipoLaudoPermanenciaMaior(\r\n\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico().shortValue(),\r\n\t\t\t\t\t\tconvenioSaudePlano);\r\n\r\n\t\tif (tipoLaudoConvenio != null) {\r\n\r\n\t\t\tShort quantidadeDiasFaturamento = 0;\r\n\t\t\tShort diasPermanenciaMaior = 0;\r\n\r\n\t\t\tMpmTipoLaudo tipoLaudoMaiorPermanencia = this.getMpmTipoLaudoDAO()\r\n\t\t\t\t\t.obterPorChavePrimaria(\r\n\t\t\t\t\t\t\tseqLaudoMaiorPermanencia.getVlrNumerico()\r\n\t\t\t\t\t\t\t\t\t.shortValue());\r\n\r\n\t\t\tif (prescricao.getAtendimento().getInternacao() != null) {\r\n\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar() != null){\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getQuantDiasFaturamento() != null){\r\n\t\t\t\t\t\tquantidadeDiasFaturamento = prescricao.getAtendimento()\r\n\t\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t\t.getQuantDiasFaturamento();\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tdiasPermanenciaMaior = prescricao.getAtendimento()\r\n\t\t\t\t\t.getInternacao().getItemProcedimentoHospitalar()\r\n\t\t\t\t\t.getDiasPermanenciaMaior();\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (diasPermanenciaMaior == null || diasPermanenciaMaior > 0){\r\n\t\t\t\t\r\n\t\t\t\tInteger adicionalDias = 0;\r\n\t\t\t\tif (quantidadeDiasFaturamento != null) {\r\n\t\t\t\t\tadicionalDias = (quantidadeDiasFaturamento * 2) + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (DateUtil.validaDataTruncadaMaiorIgual(new Date(), DateUtil\r\n\t\t\t\t\t\t.adicionaDias(prescricao.getAtendimento().getInternacao()\r\n\t\t\t\t\t\t\t\t.getDthrInternacao(), adicionalDias))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (this.getMpmLaudoDAO()\r\n\t\t\t\t\t\t\t.obterCountLaudosPorTipoEAtendimento(\r\n\t\t\t\t\t\t\t\t\tprescricao.getAtendimento(),\r\n\t\t\t\t\t\t\t\t\ttipoLaudoMaiorPermanencia) <= 0) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tMpmLaudo laudo = new MpmLaudo();\r\n\t\t\t\t\t\tlaudo.setDthrInicioValidade(prescricao.getAtendimento()\r\n\t\t\t\t\t\t\t\t.getInternacao().getDthrInternacao());\r\n\t\t\t\t\t\tlaudo.setContaDesdobrada(false);\r\n\t\t\t\t\t\tlaudo.setImpresso(false);\r\n\t\t\t\t\t\tlaudo.setLaudoManual(false);\r\n\t\t\t\t\t\tlaudo.setAtendimento(prescricao.getAtendimento());\r\n\t\t\t\t\t\tlaudo.setTipoLaudo(tipoLaudoMaiorPermanencia);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tlaudoList.add(laudo);\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}", "public void restaurarPartida() throws FileNotFoundException, IOException, ClassNotFoundException {\n\t\tjuego.restaurarPartida(jugador.getID());\t\r\n\t}", "public finestrabenvinguda() {\n //inciem componets misatge ,la seva localitzacio, i diem que sigui un misatge que ens apareixi de manera temporal\n initComponents();\n this.setLocationRelativeTo(null);\n ac = new ActionListener() {\n\n @Override\n /**\n * Controlem la barra de carregue la cual li diem el que socceix una vegada\n * tenim el temps establert en el qual volem carreguar el nostre projecte,es a di,\n * que fara una vegada tenim carreguada completament la carregua de la taula\n */\n public void actionPerformed(ActionEvent e) {\n x = x + 1;\n jProgressBar1.setValue(x);\n if (jProgressBar1.getValue() == 100) {\n dispose();\n t.stop();\n }\n }\n };\n // seleccionem el temps que tardara aquesta barra en carregar completament\n t = new Timer(50, ac);\n t.start();\n }", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "public static void MostrarPerroSegunEstadia(Perro BaseDeDatosPerros[], int codPerro){\n String razaDeceada, razaPerro;\r\n int diasDeEstadia; \r\n razaDeceada=IngresarRazaCorrecta();\r\n \r\n for (int i = 0; i < codPerro; i++) {\r\n razaPerro=BaseDeDatosPerros[i].getRaza();\r\n diasDeEstadia=BaseDeDatosPerros[i].getCantDias();\r\n if (razaDeceada.equalsIgnoreCase(razaPerro)&&(diasDeEstadia>20)) {\r\n System.out.println(\"____________________________________________\");\r\n System.out.println(BaseDeDatosPerros[i].toString());\r\n System.out.println(\"____________________________________________\");\r\n \r\n }\r\n }\r\n \r\n }", "public void billeMurs() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\tint mur = 0;\n\n\t\t// Contact Gauche de la bille\n\t\tif (billeEnCours.GM()[0] <= 0) {\n\t\t\tmur = 1;\n\t\t}\n\n\t\t// Contact Droite de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.DM()[0] >= limiteDroite) {\n\t\t\t\tmur = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact Haut de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.MH()[1] <= 0) {\n\t\t\t\tmur = 3;\n\t\t\t}\n\t\t}\n\n\t\t// Contact Bas de la bille\n\t\tif (mur == 0) {\n\t\t\tif (billeEnCours.MB()[1] >= limiteHaut) {\n\t\t\t\tmur = 7;\n\t\t\t\tperteDeVie();\n\t\t\t\tbilleEnCours.changeVitesse(vitBilleInitiale);\n\t\t\t\tbilleEnCours.changePosition(posBilleInitiale);\n\t\t\t\tbarreEnCours.changePosition(posBarreInitiale);\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse\n\n\t\tif ((mur == 1)||(mur == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\tif (mur == 3) {\n\t\t\tint[] nv = {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t}", "public void abrirManoMaximo()\n {\n brazo.manoAbrirMaximo();\n }", "public void cargarDimensionPadre()\r\n/* 230: */ {\r\n/* 231:296 */ if (getMascara(this.dimension).equals(this.dimensionContable.getMascara())) {\r\n/* 232:297 */ this.dimensionContable.setIndicadorMovimiento(true);\r\n/* 233: */ } else {\r\n/* 234:299 */ this.dimensionContable.setIndicadorMovimiento(false);\r\n/* 235: */ }\r\n/* 236:302 */ this.listaDimensionContablePadre = this.servicioDimensionContable.obtenerListaDimensionPadre(this.dimensionContable);\r\n/* 237: */ }", "public void calculoPersonal(){\n ayudantes = getAyudantesNecesarios();\n responsables = getResponsablesNecesarios();\n \n //Calculo atencion al cliente (30% total trabajadores) y RRPP (10% total trabajadores):\n \n int total = ayudantes + responsables;\n \n atencion_al_cliente = (total * 30) / 100;\n \n RRPP = (total * 10) / 100;\n \n //Creamos los trabajadores\n \n gestor_trabajadores.crearTrabajadores(RRPP, ayudantes,responsables,atencion_al_cliente);\n \n }", "public void distribuirAportes1(){\n\n if(null == comprobanteSeleccionado.getAporteuniversidad()){\n System.out.println(\"comprobanteSeleccionado.getAporteuniversidad() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getAporteorganismo()){\n System.out.println(\"comprobanteSeleccionado.getAporteorganismo() >> NULO\");\n }\n\n if(null == comprobanteSeleccionado.getMontoaprobado()){\n System.out.println(\"comprobanteSeleccionado.getMontoaprobado() >> NULO\");\n }\n\n try{\n if(comprobanteSeleccionado.getAporteuniversidad().floatValue() > 0f){\n comprobanteSeleccionado.setAporteorganismo(comprobanteSeleccionado.getMontoaprobado().subtract(comprobanteSeleccionado.getAporteuniversidad()));\n comprobanteSeleccionado.setAportecomitente(BigDecimal.ZERO);\n }\n } catch(NullPointerException npe){\n System.out.println(\"Error de NullPointerException\");\n npe.printStackTrace();\n }\n\n }", "public void aplicarDescuento();", "public void ektypwsiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tfor(int i = 0; i < numOfMedicine; i++)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"INFO FOR MEDICINE No.\" + (i+1) + \":\");\n\t\t\t\tmedicine[i].print();\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMA FARMAKA PROS EMFANISH!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void limpiarDatos() {\n\t\t\n\t}", "@Override\n\tpublic void apagar() {\n\t\tSystem.out.println(\"Apagando Computadora\");\n\t}", "@Override\n public void doPartido(String tcuarto, String tpartido, final String equipos) {\n\n int num = Integer.parseInt(tcuarto);\n int tpart = (num * 4);\n result = String.valueOf(tpart);\n presentador.pshowResult(result);\n\n // *************************************************************\n\n\n Map<String, Object> datosPartido = new HashMap<>();\n\n datosPartido.put(\"equipos\", equipos);\n datosPartido.put(\"Tiempodepartido\",tpart);\n datosPartido.put(\"tiempoporcuarto\",tcuarto);\n\n reference.child(\"Partidos\").push().setValue(datosPartido).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n\n presentador.presultFireb(equipos);\n escuchoPartidos();\n } else {\n if (task.getException() != null)\n\n presentador.perrorFirebase(task.getException().getMessage());\n }\n\n }\n });\n\n }", "public void deplacements () {\n\t\t//Efface de la fenetre le mineur\n\t\t((JLabel)grille.getComponents()[this.laby.getMineur().getY()*this.laby.getLargeur()+this.laby.getMineur().getX()]).setIcon(this.laby.getLabyrinthe()[this.laby.getMineur().getY()][this.laby.getMineur().getX()].imageCase(themeJeu));\n\t\t//Deplace et affiche le mineur suivant la touche pressee\n\t\tpartie.laby.deplacerMineur(Partie.touche);\n\t\tPartie.touche = ' ';\n\n\t\t//Operations effectuees si la case ou se trouve le mineur est une sortie\n\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Sortie) {\n\t\t\t//On verifie en premier lieu que tous les filons ont ete extraits\n\t\t\tboolean tousExtraits = true;\t\t\t\t\t\t\t\n\t\t\tfor (int i = 0 ; i < partie.laby.getHauteur() && tousExtraits == true ; i++) {\n\t\t\t\tfor (int j = 0 ; j < partie.laby.getLargeur() && tousExtraits == true ; j++) {\n\t\t\t\t\tif (partie.laby.getLabyrinthe()[i][j] instanceof Filon) {\n\t\t\t\t\t\ttousExtraits = ((Filon)partie.laby.getLabyrinthe()[i][j]).getExtrait();\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Si c'est le cas alors la partie est terminee et le joueur peut recommencer ou quitter, sinon le joueur est averti qu'il n'a pas recupere tous les filons\n\t\t\tif (tousExtraits == true) {\n\t\t\t\tpartie.affichageLabyrinthe ();\n\t\t\t\tSystem.out.println(\"\\nFelicitations, vous avez trouvé la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire à present : [r]ecommencer ou [q]uitter ?\");\n\t\t\t\tString[] choixPossiblesFin = {\"Quitter\", \"Recommencer\"};\n\t\t\t\tint choixFin = JOptionPane.showOptionDialog(null, \"Felicitations, vous avez trouve la sortie, ainsi que tous les filons en \" + partie.laby.getNbCoups() + \" coups !\\n\\nQue voulez-vous faire a present :\", \"Fin de la partie\", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, choixPossiblesFin, choixPossiblesFin[0]);\n\t\t\t\tif ( choixFin == 1) {\n\t\t\t\t\tPartie.touche = 'r';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tPartie.touche = 'q';\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\telse {\n\t\t\t\tpartie.enTete.setText(\"Tous les filons n'ont pas ete extraits !\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t//Si la case ou se trouve le mineur est un filon qui n'est pas extrait, alors ce dernier est extrait.\n\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Filon && ((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getExtrait() == false) {\n\t\t\t\t((Filon)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setExtrait();\n\t\t\t\tSystem.out.println(\"\\nFilon extrait !\");\n\t\t\t}\n\t\t\t//Sinon si la case ou se trouve le mineur est une clef, alors on indique que la clef est ramassee, puis on cherche la porte et on l'efface de la fenetre, avant de rendre la case quelle occupe vide\n\t\t\telse {\n\t\t\t\tif (partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()] instanceof Clef && ((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).getRamassee() == false) {\n\t\t\t\t\t((Clef)partie.laby.getLabyrinthe()[partie.laby.getMineur().getY()][partie.laby.getMineur().getX()]).setRamassee();\n\t\t\t\t\tint[] coordsPorte = {-1,-1};\n\t\t\t\t\tfor (int i = 0 ; i < this.laby.getHauteur() && coordsPorte[1] == -1 ; i++) {\n\t\t\t\t\t\tfor (int j = 0 ; j < this.laby.getLargeur() && coordsPorte[1] == -1 ; j++) {\n\t\t\t\t\t\t\tif (this.laby.getLabyrinthe()[i][j] instanceof Porte) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tcoordsPorte[0] = j;\n\t\t\t\t\t\t\t\tcoordsPorte[1] = i;\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\tpartie.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].setEtat(true);\n\t\t\t\t\t((JLabel)grille.getComponents()[coordsPorte[1]*this.laby.getLargeur()+coordsPorte[0]]).setIcon(this.laby.getLabyrinthe()[coordsPorte[1]][coordsPorte[0]].imageCase(themeJeu));\n\t\t\t\t\tSystem.out.println(\"\\nClef ramassee !\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void placerBateauSurVue() {\n\t\tint compteur = 1;\n\t\tif (partie.verifierSiPoseBateauPossible()) {\n\t\t\tfor (int i : partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()].getCaseOnId()) {\n\t\t\t\tif (i != -1)\n\t\t\t\t\tvue.setfield(i, partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()]\n\t\t\t\t\t\t\t.getImageDirectoryFinal(), compteur, true);\n\n\t\t\t\tcompteur++;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int i : partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()].getCaseOnId()) {\n\t\t\t\tif (i != -1)\n\t\t\t\t\tvue.setfield(i, partie.getJoueur().getBateau()[partie.getJoueur().getIndiceBateauEnCours()]\n\t\t\t\t\t\t\t.getImageDirectoryFinal(), compteur, false);\n\n\t\t\t\tcompteur++;\n\t\t\t}\n\t\t}\n\t}", "@Override\n\tpublic void buildPartA() {\n\t\tproduct.add(\"部件X\");\n\t}", "public void abrir(String name, String rfc, Double sueldo, Double aguinaldo2,// Ya esta hecho es el vizualizador\r\n\t\t\tDouble primav2, Double myH2, Double gF, Double sGMM2, Double hip, Double donat, Double subR,\r\n\t\t\tDouble transp, String NivelE, Double colegiatura2) {\r\n\t\tthis.nombre=name;//\r\n\t\tthis.RFC=rfc;//\r\n\t\tthis.SueldoM=sueldo;//\r\n\t\tthis.Aguinaldo=aguinaldo2;//\r\n\t\tthis.PrimaV=primav2;//\r\n\t\tthis.MyH=myH2;//\r\n\t\tthis.GatsosFun=gF;//\r\n\t\tthis.SGMM=sGMM2;//\r\n\t\tthis.Hipotecarios=hip;//\r\n\t\tthis.Donativos=donat;//\r\n\t\tthis.SubRetiro=subR;//\r\n\t\tthis.TransporteE=transp;//\r\n\t\tthis.NivelE=NivelE;//\r\n\t\tthis.Colegiatura=colegiatura2;//\r\n\t\t\r\n\t\tthis.calculo(this.nombre, this.RFC, this.SueldoM, this.Aguinaldo, this.PrimaV,this.MyH,this.GatsosFun,\r\n\t\t\t\tthis.SGMM,this.Hipotecarios,this.Donativos,this.SubRetiro,this.TransporteE,this.NivelE,this.Colegiatura);\r\n\t\t\r\n\t\tpr.Imprimir(this.nombre, this.RFC, this.SueldoM,this.IngresoA,this.Aguinaldo,this.PrimaV,this.MyH,this.GatsosFun,this.SGMM,this.Hipotecarios,this.Donativos,this.SubRetiro,this.TransporteE,this.NivelE,this.Colegiatura,this.AguinaldoE,this.AguinaldoG,this.PrimaVE,this.PrimaVG,this.TotalIngresosG,this.MaxDedColeg,this.TotalDedNoRetiro,this.DedPerm,this.MontoISR,this.CuotaFija,this.PorcExced,this.PagoEx,this.Total);\r\n\t\t\r\n\t}", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}", "void rozpiszKontraktyPart2NoEV(int index,float wolumenHandlu, float sumaKupna,float sumaSprzedazy )\n\t{\n\t\tArrayList<Prosument> listaProsumentowTrue =listaProsumentowWrap.getListaProsumentow();\n\t\t\n\n\t\tint a=0;\n\t\twhile (a<listaProsumentowTrue.size())\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// ustala bianrke kupuj\n\t\t\t// ustala clakowita sprzedaz (jako consumption)\n\t\t\t//ustala calkowite kupno (jako generacje)\n\t\t\tDayData constrainMarker = new DayData();\n\t\t\t\n\t\t\tArrayList<Point> L1\t=listaFunkcjiUzytecznosci.get(a);\n\t\t\t\n\t\t\t//energia jaka zadeklarowal prosument ze sprzeda/kupi\n\t\t\tfloat energia = L1.get(index).getIloscEnergiiDoKupienia();\n\t\t\t\n\t\t\tif (energia>0)\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoKupienia = energia/sumaKupna*wolumenHandlu;\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(1);\n\t\t\t\tconstrainMarker.setGeneration(iloscEnergiiDoKupienia);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoKupienia,a);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tfloat iloscEnergiiDoSprzedania = energia/sumaSprzedazy*wolumenHandlu;\n\n\t\t\t\t\n\t\t\t\tconstrainMarker.setKupuj(0);\n\t\t\t\tconstrainMarker.setConsumption(iloscEnergiiDoSprzedania);\n\t\t\t\t\n\t\t\t\trynekHistory.ustawBetaDlaWynikowHandlu(iloscEnergiiDoSprzedania,a);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tArrayList<Float> priceVector = priceVectorsList.get(priceVectorsList.size()-1);\n\t\t\t\n\t\t\t//poinformuj prosumenta o wyniakch handlu i dostosuj go do wynikow\n\t\t\tlistaProsumentowTrue.get(a).getKontrakt(priceVector,constrainMarker);\n\t\t\t\n\t\t\ta++;\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tPessoa PF1 = new PessoaFisica(1,\"Michel\",\"31/03/1988\",\"15785465-01\",\"145.217.365-54\");\n\t\tPF1.AdicionaContato(\"898\",\"222\");\n\t\tPF1.AdicionaEndereco(\"avenida das gar�as\", 1110, \"padre cicero\", \"petrolina\", \"PE\", \"56326000\");\n\t\t\n\t\t// criando cliente pessoa Juridica\n\t\tPessoa PJ1 = new PessoaJuridica(2,\"Tectronic\",\"TECLTDA\",\"10-1009290/0001\");\n\t\tPJ1.AdicionaContato(\"00000\",\"11111\");\n\t\tPJ1.AdicionaEndereco(\"avenida do bambu\", 878, \"jo�oo pio 10\", \"juazeiro\", \"BA\", \"56326000\");\n\t\t\n\t\t// criando objetos produtoodutos\n\t\t/*Produto produto1 = new Produto(10, \"impressora\",35,1,100);\n\t\tProduto produto2 = new Produto(11, \"MicroSystem\",550, 2,80);\n\t\tProduto produto3 = new Produto(12, \"Faqueiro Ipanema\",75, 3,70);\n\t\tProduto produto4 = new Produto(13, \"Mangueira de Jardim\",19, 4,80);\n\t\tProduto produto5 = new Produto(14, \"Mouse multilaser\",25,5,90);*/\n \n Facade fachada = new Facade();\n fachada.incializarProdutos();\n \n\n\t\t// algumas forma de pagamento\n\t\t/*FormaPagamento Pagamento1 = new CartaoCredito(1,\"visa\",\"credito\", 3, \"Mariano Ribeiro\", \"10/10/23\", \"54212345212\",\"132\");\n\t\tFormaPagamento Pagamento2 = new CartaoCredito(2,\"mastercard\",\"debito\", 1, \"Juliana Marinalva\", \"12/09/29\", \"232356789\",\"787\");\n\t\tFormaPagamento Pagamento3 = new Boleto(3,\"19/04/2017\",\"12345678912\",\"Sanatander\");\n\t\tFormaPagamento Pagamento4 = new Boleto(4,\"20/04/2017\",\"12232344423\",\"Banco do Brasil\");\t\t*/\n \n \n\t\t//------------------------------------------------------------------------------------------------------------------------\n\t\t// criando um pedido com cliente e numero de itemens\n\t\tPedido pedido1 = new Pedido(30,PF1,3);\n\t\t\t\t\n\t\t// adicionando produtos como itens da lista de pedido\n\t\t/*ItemPedido item1 = new ItemPedido(20,produto1,3);\n\t\tItemPedido item2 = new ItemPedido(21,produto2,9);\n\t\tItemPedido item3 = new ItemPedido(22,produto3,2);\n\t\tItemPedido item4 = new ItemPedido(23,produto4,4);\n\t\tItemPedido item5 = new ItemPedido(24,produto5,1);*/\n\t\t\n\t\t// adicionando itens a lista de pedido\n\t\t/*pedido1.AdicionandoItemLista(item1,0);\n\t\tpedido1.AdicionandoItemLista(item3,1);\n\t\tpedido1.AdicionandoItemLista(item5,2);*/\n\t\t\t\t\n\t\t//forma de pagamento para o pedido 1\n\t\t//pedido1.setPagamento(Pagamento3);\n\n\t\t// Mostrar dados\n\t\tpedido1.mostrarPedido();\n\t\tSystem.out.println(\"Valor total com desconto: \" + Pedido.desconto(pedido1.getValorTotal(),(float)0.1));\n\t\tpedido1.getPagamento().realizaPagamento(true, \"16/04/17\");\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void cargarBateria() {\n\n\t}", "private void esconderBotao() {\n\t\tfor (int i = 0; i < dificuldade.getValor(); i++) {// OLHAM TODOS OS BOTOES\r\n\t\t\tfor (int j = 0; j < dificuldade.getValor(); j++) {\r\n\t\t\t\tif (celulaEscolhida(botoes[i][j]).isVisivel() && botoes[i][j].isVisible()) {// SE A CELULA FOR VISIVEL E\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// O BOTAO FOR VISIVEL,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// ESCONDE O BOTAO\r\n\t\t\t\t\tbotoes[i][j].setVisible(false);//DEIXA BOTAO INVISIVEL\r\n\t\t\t\t\tlblNumeros[i][j].setVisible(true);//DEIXA O LABEL ATRAS DO BOTAO VISIVEL\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static Resultado MBBR(Demanda d, GrafoMatriz G, GrafoMatriz Gaux, ArrayList<ListaEnlazadaAsignadas> lea, int capacidadE, ListaEnlazada [] ksp){\n \n int caminoMasCorto = 0;\n ArrayList<Integer> caminosMovidos = new ArrayList<>();\n ListaEnlazada [] kspResults;\n \n //se busca el caminos mas corto\n for (int i=1; i<ksp.length; i++){\n if (Utilitarios.calcularSaltos(ksp[i])<Utilitarios.calcularSaltos(ksp[caminoMasCorto])){\n caminoMasCorto = i;\n }\n }\n \n caminosMovidos = Utilitarios.obtenerCaminosMovidos(ksp[caminoMasCorto], G, d);\n \n if (caminosMovidos.size()==0)\n System.out.println(\"Que bola\");\n \n Resultado [] results = Utilitarios.buscarCaminosAlternativos(caminosMovidos, lea, G, Gaux, capacidadE);\n \n if (results!=null){\n for (int i=0; i<results.length; i++){\n kspResults = Utilitarios.KSP(G, lea.get(caminosMovidos.get(i)).getDemanda().getOrigen(), \n lea.get(caminosMovidos.get(i)).getDemanda().getDestino(), 5);\n Utilitarios.asignarFS_saveRoute(kspResults, results[i], G, d, lea, -1);\n \n Utilitarios.limpiarCaminoAnterior(lea.get(caminosMovidos.get(i)),G,caminosMovidos.get(i),capacidadE, lea);\n }\n Resultado r = new Resultado();\n r.setCamino(caminoMasCorto);\n r.setInicio(0);\n r.setFin(d.getNroFS()-1);\n \n return r;\n }\n return null;\n }", "public void cargarEpicrisis() {\r\n\t\tif (admision_seleccionada != null\r\n\t\t\t\t&& admision_seleccionada.getAtendida()) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_HC_EPICRISIS,\r\n\t\t\t\t\tIRutas_historia.LABEL_HC_EPICRISIS, parametros);\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic void crearNuevaPoblacion() {\n\t\t/* Nos quedamos con los mejores individuos. Del resto, cruzamos la mitad, los mejores,\n\t\t * y el resto los borramos.*/\n\t\tList<IIndividuo> poblacion2 = new ArrayList<>();\n\t\tint numFijos = (int) (poblacion.size()/2);\n\t\t/* Incluimos el 50%, los mejores */\n\t\tpoblacion2.addAll(this.poblacion.subList(0, numFijos));\n\t\t\n\t\t/* De los mejores, mezclamos la primera mitad \n\t\t * con todos, juntandolos de forma aleatoria */\n\t\tList<IIndividuo> temp = poblacion.subList(0, numFijos+1);\n\t\tfor(int i = 0; i < temp.size()/2; i++) {\n\t\t\tint j;\n\t\t\tdo {\n\t\t\t\tj = Individuo.aleatNum(0, temp.size()-1);\n\t\t\t}while(j != i);\n\t\t\t\n\t\t\ttry {\n\t\t\t\tpoblacion2.addAll(cruce(temp.get(i), temp.get(j)));\n\t\t\t} catch (CruceNuloException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//this.poblacion.clear();\n\t\tthis.poblacion = poblacion2;\n\t}", "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public void creaAziendaAgricola(){\n\t\tCantina nipozzano = creaCantina(\"Nipozzano\");\t\n\t\tBotte[] bottiNipozzano = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiNipozzano.length; i++){\n\t\t\tbottiNipozzano[i] = creaBotte(nipozzano, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\t\t\n\t\tVigna mormoreto = creaVigna(\"Mormoreto\", 330, 25, EsposizioneVigna.sud, \"Terreni ricchi di sabbia, ben drenati. Discreta presenza di calcio. pH neutro o leggermente alcalino\");\n\t\tFilare[] filariMormoreto = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMormoreto.length;i++){\n\t\t\tfilariMormoreto[i] = creaFilare(mormoreto, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\t\n\t\tVigna montesodi = creaVigna(\"Montesodi\", 400, 20, EsposizioneVigna.sud_ovest, \"Arido e sassoso, di alberese, argilloso e calcareo, ben drenato, poco ricco di sostanza organica\");\n\t\tFilare[] filariMontesodi = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariMontesodi.length;i++){\n\t\t\tfilariMontesodi[i] = creaFilare(montesodi, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t/*\n\t\t * CANTINA: POMINO - VIGNETO BENEFIZIO\n\t\t */\n\t\t\n\t\tCantina pomino = creaCantina(\"Pomino\");\n\t\tBotte[] bottiPomino = new Botte[5+(int)(Math.random()*10)];\t\n\t\tfor(int i=0; i<bottiPomino.length; i++){\n\t\t\tbottiPomino[i] = creaBotte(pomino, i, (int)(Math.random()*10+1), tipologiaBotte[(int)(Math.random()*tipologiaBotte.length)]);\n\t\t}\n\t\tVigna benefizio = creaVigna(\"Benefizio\", 700, 9, EsposizioneVigna.sud_ovest, \"Terreni ricchi di sabbia, forte presenza di scheletro. Molto drenanti. Ricchi in elementi minerali. PH acido o leggermente acido.\");\n\t\tFilare[] filariBenefizio = new Filare[5+(int)(Math.random()*10)];\n\t\tfor(int i=0; i<filariBenefizio.length;i++){\n\t\t\tfilariBenefizio[i] = creaFilare(benefizio, i, tipologiaFilare[(int)(Math.random()*tipologiaFilare.length)]);\n\t\t}\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(nipozzano);\n\t\taziendaAgricolaDAO.saveLuogo(mormoreto);\n\t\taziendaAgricolaDAO.saveLuogo(montesodi);\n\t\t\n\t\taziendaAgricolaDAO.saveLuogo(pomino);\n\t\taziendaAgricolaDAO.saveLuogo(benefizio);\n\t\t\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Giulio d'Afflitto\"));\n\t\taziendaAgricolaDAO.saveResponsabile(responsabile(\"Francesco Ermini\"));\n\n\t\t\n\t}", "public FiltroBoletoBancarioLancamentoEnvio() {\n\n\t}", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Campo campoDataInizio;\n Campo campoDataFine;\n Campo campoConto;\n Date dataIniziale;\n Date dataFinale;\n int numPersone;\n ContoModulo modConto;\n\n\n String titolo = \"Esecuzione addebiti fissi\";\n AddebitoFissoPannello pannello;\n Date dataInizio;\n Pannello panDate;\n Campo campoStato;\n Filtro filtro;\n int codConto;\n int codCamera;\n\n\n try { // prova ad eseguire il codice\n\n /* recupera dati generali */\n modConto = Albergo.Moduli.Conto();\n codConto = this.getCodConto();\n codCamera = modConto.query().valoreInt(Conto.Cam.camera.get(), codConto);\n numPersone = CameraModulo.getNumLetti(codCamera);\n\n /* crea il pannello servizi e vi registra la camera\n * per avere l'anteprima dei prezzi*/\n pannello = new AddebitoFissoPannello();\n this.setPanServizi(pannello);\n pannello.setNumPersone(numPersone);\n this.setTitolo(titolo);\n\n// /* regola date suggerite */\n// dataFinale = Progetto.getDataCorrente();\n// dataInizio = Lib.Data.add(dataFinale, -1);\n\n /* pannello date */\n campoDataInizio = CampoFactory.data(nomeDataIni);\n campoDataInizio.decora().obbligatorio();\n// campoDataInizio.setValore(dataInizio);\n\n campoDataFine = CampoFactory.data(nomeDataFine);\n campoDataFine.decora().obbligatorio();\n// campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = CampoFactory.comboLinkSel(nomeConto);\n campoConto.setNomeModuloLinkato(Conto.NOME_MODULO);\n campoConto.setLarScheda(180);\n campoConto.decora().obbligatorio();\n campoConto.decora().etichetta(\"conto da addebitare\");\n campoConto.setUsaNuovo(false);\n campoConto.setUsaModifica(false);\n\n /* inizializza e assegna il valore (se non inizializzo\n * il combo mi cambia il campo dati e il valore si perde)*/\n campoConto.inizializza();\n campoConto.setValore(this.getCodConto());\n\n /* filtro per vedere solo i conti aperti dell'azienda corrente */\n campoStato = modConto.getCampo(Conto.Cam.chiuso.get());\n filtro = FiltroFactory.crea(campoStato, false);\n filtro.add(modConto.getFiltroAzienda());\n campoConto.getCampoDB().setFiltroCorrente(filtro);\n\n panDate = PannelloFactory.orizzontale(this.getModulo());\n panDate.creaBordo(\"Periodo da addebitare\");\n panDate.add(campoDataInizio);\n panDate.add(campoDataFine);\n panDate.add(campoConto);\n\n this.addPannello(panDate);\n this.addPannello(this.getPanServizi());\n\n this.regolaCamera();\n\n /* recupera la data iniziale (oggi) */\n dataIniziale = AlbergoLib.getDataProgramma();\n\n /* recupera la data di partenza prevista dal conto */\n modConto = ContoModulo.get();\n dataFinale = modConto.query().valoreData(Conto.Cam.validoAl.get(),\n this.getCodConto());\n\n /* recupera il numero di persone dal conto */\n numPersone = modConto.query().valoreInt(Conto.Cam.numPersone.get(),\n this.getCodConto());\n\n /* regola date suggerite */\n campoDataInizio = this.getCampo(nomeDataIni);\n campoDataInizio.setValore(dataIniziale);\n\n campoDataFine = this.getCampo(nomeDataFine);\n campoDataFine.setValore(dataFinale);\n\n /* conto */\n campoConto = this.getCampo(nomeConto);\n campoConto.setAbilitato(false);\n\n /* regola la data iniziale di riferimento per l'anteprima dei prezzi */\n Date data = (Date)campoDataInizio.getValore();\n this.getPanServizi().setDataPrezzi(data);\n\n /* regola il numero di persone dal conto */\n this.getPanServizi().setNumPersone(numPersone);\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "private void iniciarPartida ()\n {\n //Pre:\n //Post: Se inicia una ventana con una partida de buscaminas\n\n try {\n //Se inicia el tablero\n Tablero.getTablero().iniciarTablero();\n\n //Se carga la pantalla y se introduce en el Stage\n Parent root = FXMLLoader.load(Partida.class.getResource(\"ui/fxml/ventanaPartidaBase.fxml\"));\n ventanaAct.setScene(new Scene(root));\n\n //Se activa el boolean que indica que existe una partida activa\n partidaActiva = true;\n\n //Se muestra el stage una vez cargado\n ventanaAct.show();\n }\n catch (Exception e) {\n // Si existe algún error al cargar el fxml se indica y se cierra la aplicación\n Alert errorDeCarga = new Alert(Alert.AlertType.ERROR);\n errorDeCarga.setTitle(\"Error carga FXML\");\n errorDeCarga.setHeaderText(\"Error al cargar el archivo FXML: ui/fxml/ventanaPartidaBase.fxml\");\n errorDeCarga.setContentText(e.toString() + \"\\n\\nLa aplicación se cerrará\");\n errorDeCarga.setOnCloseRequest((handler) -> System.exit(-1));\n errorDeCarga.show();\n }\n }", "public void pridejNovePivo ()\n\t{\n\t\n\t\tpivo = pivo + PRODUKCE;\n\t\t\n\t}", "protected void creaPagine() {\n Pagina pag;\n Pannello pan;\n\n try { // prova ad eseguire il codice\n\n /* crea la pagina e aggiunge campi e pannelli */\n pag = this.addPagina(\"generale\");\n\n pan = PannelloFactory.orizzontale(this);\n pan.add(Cam.data);\n pan.add(Cam.importo.get());\n pan.add(Cam.note.get());\n pag.add(pan);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}", "private void carregaAvisosGerais() {\r\n\t\tif (codWcagEmag == WCAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.1\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.4\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"14.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"12.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"4.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"9.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"11.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.7\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\t// comentado por n�o ter achado equi\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\t// erroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO,\r\n\t\t\t// codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"13.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t} else if (codWcagEmag == EMAG) {\r\n\t\t\t/*\r\n\t\t\t * Mudan�as de idioma\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Ignorar arte ascii\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Utilizar a linguagem mais clara e simples poss�vel\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * navega��o de maneira coerente\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.21\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"1.24\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer mapa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"2.17\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Abreviaturas\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.2\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Fornecer atalho\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.3\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Prefer�ncias (por ex., por idioma ou por tipo de conte�do).\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.5\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * BreadCrumb\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.6\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * fun��es de pesquisa\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.8\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * front-loading\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.9\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Documentos compostos por mais de uma p�gina\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.10\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Complementar o texto com imagens, etc.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.11\", AVISO, codWcagEmag, \"\"));\r\n\t\t\t/*\r\n\t\t\t * Forne�a metadados.\r\n\t\t\t */\r\n\t\t\terroOuAviso.add(new ArmazenaErroOuAviso(\"3.14\", AVISO, codWcagEmag, \"\"));\r\n\t\t}\r\n\r\n\t}", "public void limpiarMemoria();", "public void colocarBomba() \r\n {\r\n \tBomba bom;\r\n \tCelda c= miJuego.getNivel(0).getCelda(this.posX, this.posY);\r\n \tif(!dios)\r\n \t{\r\n \t\tif(misBombas.size()>0)\r\n \t\t{\r\n \t\t\tif(c.getBomba()==null){\r\n \t\t\t\tbom=misBombas.remove(misBombas.size()-1);\r\n \t\t\t\tbom.setUbicacion(c);\r\n \t\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\t\t\tbom.getGrafico().setPos(posX, posY);\r\n \t\t\t\tc.colocarBomba(bom);\r\n \t\t\t\tbom=null;\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \telse\r\n \t{\r\n \t\tbom=new Bomba(this);\r\n \t\tbom.setUbicacion(c);\r\n\t\t\tmiJuego.getGui().agregarJuego(bom.getGrafico().getGrafico(),20);\r\n \t\tbom.getGrafico().setPos(posX, posY);\r\n \t\tc.colocarBomba(bom);\r\n \t\tbom=null;\r\n \t}\r\n \r\n }", "public boolean realizarApartado(PanelApartado panel) {\r\n try {\r\n //Creamos la instancia del subsistema.\r\n IntAdmApartados apartados = new FacAdmApartados();\r\n\r\n //Creamos la base del apartado y lo llenamos de datos basicos.\r\n Apartado apartado = new Apartado();\r\n\r\n apartado.setEstado('A');\r\n apartado.setIdUsuario(new Usuario(\"0\"));\r\n apartado.setFechaInicio(panel.getFechaInicio());\r\n apartado.setFechaFin(panel.getFechaVencimiento());\r\n apartado.setIdApartado(String.valueOf(apartados.obtenApartadosRegistrados().size()));\r\n\r\n //Creamos objetos que usaremos despues.\r\n Map<Talla, String[]> tallas = panel.getDetallesTabla();\r\n List<TallaApartado> tallasApartadas = new ArrayList();\r\n\r\n //Para cada talla del apartado, vamos a añadirla a una coleccion\r\n //el cual se le dara al apartado.\r\n for (Talla t : tallas.keySet()) {\r\n String[] detalles = tallas.get(t);\r\n\r\n float precio = Float.parseFloat(detalles[0]);\r\n int cantidad = Integer.parseInt(detalles[1]);\r\n System.out.println(cantidad);\r\n TallaApartado tallaApartada = new TallaApartado();\r\n tallaApartada.setIdApartado(apartado);\r\n tallaApartada.setIdTalla(t);\r\n tallaApartada.setPrecio(precio);\r\n tallasApartadas.add(tallaApartada);\r\n\r\n for (int i = 0; i < cantidad; i++) {\r\n tallasApartadas.add(tallaApartada);\r\n }\r\n }\r\n\r\n apartado.setTallaApartadoList(tallasApartadas);\r\n apartado.setNombreCliente(panel.getNombreCliente());\r\n apartado.setTelefono(panel.getTelefonoCliente());\r\n apartado.setPrecioTotal(panel.getTotal());\r\n\r\n //Se agrega a la base de datos.\r\n apartados.realizarApartado(apartado);\r\n\r\n //Abonamos inicial.\r\n abonarApartado(apartado, Float.parseFloat(panel.getCantidadAbonada()));\r\n\r\n //Retorna como verdadero.\r\n return true;\r\n } catch (Exception e) {\r\n JOptionPane.showMessageDialog(null, \"Ocurrio un error al realizar un apartado. \" + e.getMessage());\r\n e.printStackTrace();\r\n }\r\n return false;\r\n }", "public void publicarPropuestas() {\n try {\n //SISTEMA VERIFICA QUE LOS COMPROMISOS PARA EL PERIODO HAYAN SIDO INGRESADO\n if (this.listaCompromiso == null || this.listaCompromiso.isEmpty()) {\n //MUESTRA MENSAJE: 'DEBE INGRESAR LOS COMPROMISOS PARA PODER PUBLICAR ', NO ES POSIBLE PUBLICAR LOS RESULTADOS \n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_add_comprimiso_faltantes\"));\n return;\n }\n String mensajeValidacion = validarCompromisosPeriodoByPropuestaNacesidad(this.propuestaSeleccionada);\n if (mensajeValidacion != null) {\n addErrorMessage(keyPropertiesFactory.value(mensajeValidacion));\n return;\n }\n if (IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA.compareTo(this.propuestaSeleccionada.getConstantes().getIdConstantes()) != 0) {\n addErrorMessage(\"La propuesta debe estar en estado Pre-Aprobado\");\n return;\n }\n /*byte[] bitesPdf;\n //GENERAMOS EL REPORTE - CREADOR DE REPORTES\n try {\n HashMap mapa = new HashMap();\n mapa.put(\"p_id_periodo\", periodoSeleccionado.getIdPeriodo().intValue());\n bitesPdf = GeneradorReportesServicio.getInstancia().generarReporte(mapa, \"reporte15.jasper\");\n } catch (Exception e) {\n adicionaMensajeError(\"ERROR, Se presentaron errores al general el reporte JASPER\");\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE, \"CU-NE-06(publicarPropuestas)\", e);\n return;\n }*/\n String iniciaCodigoVic = keyPropertiesFactory.value(\"cu_ne_6_codigo_proyecto_inicia_generacion\");\n if (iniciaCodigoVic.contains(\"-----NOT FOUND-----\")) {\n addErrorMessage(keyPropertiesFactory.value(\"cu_ne_6_error_no_existe_codigo_proyecto_inicia_generacion\"));\n return;\n }\n //EL SISTEMA CAMBIA EL ESTADO DE TODAS LAS PROPUESTAS DEL LISTADO DE ''PRE-APROBADA ' A 'APROBADA' \n //Y LOS DE ESTADO 'REVISADA' A 'NO APROBADA' \n List<SieduPropuestaAsignada> lstPropuestaasignada = this.servicePropuestaAsignada.findByVigencia(this.propuestaSeleccionada);\n List<Long> lstLong = new ArrayList<>();\n for (SieduPropuestaAsignada s : lstPropuestaasignada) {\n lstLong.add(s.getPropuestaNecesidad().getIdPropuestaNecesidad());\n }\n Proyecto proyecto = new Proyecto();\n int contarProyecto = iProyectoLocal.contarProyectoByVigencia(lstLong);\n Constantes constantes = iConstantesLocal.getConstantesPorIdConstante(IConstantes.DURACION_PROYECTOS_INSTITUCIONALES);\n int numeroMesesEstimacionProyecto = Integer.parseInt(constantes.getValor());\n UsuarioRol usuarioRol = new UsuarioRol(loginFaces.getPerfilUsuarioDTO().getRolUsuarioPorIdRolDTO(IConstantesRole.EVALUADOR_DE_PROPUESTAS_DE_NECESIDADES_EN_LA_VICIN).getIdUsuarioRol());\n if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_PRE_APROBADA)) {\n EjecutorNecesidad ejecutorNecesidadResponsable = iEjecutorNecesidadLocal.getEjecutorNecesidadPorPropuestaNecesidadYRolResponsable(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n if (ejecutorNecesidadResponsable == null || ejecutorNecesidadResponsable.getUnidadPolicial() == null || ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica() == null) {\n addErrorMessage(\"Error, Verifique la sigla física de la Unidad Policial asociada a la propuesta: \" + this.propuestaSeleccionada.getTema());\n return;\n }\n\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_APROBADA));\n //POR CADA PROPROPUESTA APROBADA SE CREA UN PROYECTO\n //CREA UN PROYECTO DE INVESTIGACIÓN POR CADA PROPUESTA CON EL ESTADO 'APROBADA', \n //ASIGNÁNDOLE EL CÓDIGO DE INVESTIGACIÓN DE ACUERDO AL MÉTODO ESTABLECIDO(VER REQUERIMIENTOS ESPECIALES), \n //ASIGNÁNDOLE EL ÁREA Y LA LÍNEA DE INVESTIGACIÓN Y EL TEMA PROPUESTO COMO TITULO PROPUESTO\n //VIC - [Consecutivo de proyectos en el periodo][Año]- [Código interno de la Unidad Policial o Escuela]\n String codigoInternoUnidad = ejecutorNecesidadResponsable.getUnidadPolicial().getSiglaFisica();\n String codigoProyecto = iniciaCodigoVic.concat(\"-\");//VIC \n contarProyecto += 1;\n codigoProyecto = codigoProyecto.concat(String.valueOf(contarProyecto));//[Consecutivo de proyectos en el periodo]\n codigoProyecto = codigoProyecto.concat(String.valueOf(lstPropuestaasignada.get(0).getSieduPropuestaAsignadaPK().getVigencia()));//[Año]\n codigoProyecto = codigoProyecto.concat(\"-\");\n codigoProyecto = codigoProyecto.concat(codigoInternoUnidad);//[Código interno de la Unidad Policial o Escuela]\n Date fechaHoy = new Date();\n proyecto.setCodigoProyecto(codigoProyecto);\n proyecto.setLinea(this.propuestaSeleccionada.getLinea());\n proyecto.setTituloPropuesto(this.propuestaSeleccionada.getTema());\n proyecto.setTema(this.propuestaSeleccionada.getTema());\n proyecto.setPeriodo(this.propuestaSeleccionada.getPeriodo());\n proyecto.setUsuarioRol(usuarioRol);\n proyecto.setEstado(new Constantes(IConstantes.TIPO_ESTADO_PROYECTO_EN_EJECUCION));\n proyecto.setUnidadPolicial(ejecutorNecesidadResponsable.getUnidadPolicial());\n proyecto.setPropuestaNecesidad(this.propuestaSeleccionada);\n proyecto.setFechaEstimadaInicio(fechaHoy);\n Calendar fechaFinalEstimadaProyecto = Calendar.getInstance();\n fechaFinalEstimadaProyecto.setTime(fechaHoy);\n fechaFinalEstimadaProyecto.add(Calendar.MONTH, numeroMesesEstimacionProyecto);\n proyecto.setFechaEstimadaFinalizacion(fechaFinalEstimadaProyecto.getTime());\n proyecto.setFechaActualizacion(fechaHoy);\n //CREAMOS LOS COMPROMISOS PROYECTOS\n List<CompromisoProyecto> listaCompromisosProyecto = new ArrayList<CompromisoProyecto>();\n //CONSULTAMOS LOS COMPROMISOS DE ESTE PERIODO\n List<CompromisoPeriodo> listaComprimiso = iCompromisoPeriodoLocal.buscarCompromisoPeriodoByIdPropuestaNecesidad(this.propuestaSeleccionada);\n for (CompromisoPeriodo unCompromisoPeriodo : listaComprimiso) {\n CompromisoProyecto compromisoProyecto = new CompromisoProyecto();\n compromisoProyecto.setCompromisoPeriodo(unCompromisoPeriodo);\n compromisoProyecto.setProyecto(proyecto);\n compromisoProyecto.setEstado(new Constantes(IConstantes.ESTADO_COMPROMISO_PROYECTO_PENDIENTE));\n compromisoProyecto.setFechaCreacion(new Date());\n compromisoProyecto.setMaquina(loginFaces.getPerfilUsuarioDTO().getMaquinaDTO().getIpLoginRemotoUsuario());\n compromisoProyecto.setUsuarioRegistro(loginFaces.getPerfilUsuarioDTO().getIdentificacion());\n compromisoProyecto.setUsuarioRolRegistra(usuarioRol);\n listaCompromisosProyecto.add(compromisoProyecto);\n }\n //CREAMOS LAS UNIDADES EJECUTORAS PARA EL PROYECTO\n List<EjecutorNecesidadDTO> listadoEjecutorNecesidadDTOPropuesta = iEjecutorNecesidadLocal.getEjecutorNecesidadDTOPorPropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad());\n List<EjecutorNecesidad> listaEjecutorNecesidadProyecto = new ArrayList<EjecutorNecesidad>();\n for (EjecutorNecesidadDTO unaEjecutorNecesidadDTO : listadoEjecutorNecesidadDTOPropuesta) {\n EjecutorNecesidad ejecutorNecesidadLocal = new EjecutorNecesidad();\n ejecutorNecesidadLocal.setPropuestaNecesidad(new PropuestaNecesidad(this.propuestaSeleccionada.getIdPropuestaNecesidad()));\n ejecutorNecesidadLocal.setProyecto(proyecto);\n ejecutorNecesidadLocal.setRol(new Constantes(unaEjecutorNecesidadDTO.getIdRol()));\n ejecutorNecesidadLocal.setUnidadPolicial(this.iUnidadPolicialLocal.obtenerUnidadPolicialPorId(unaEjecutorNecesidadDTO.getIdUnidadPolicial()));\n listaEjecutorNecesidadProyecto.add(ejecutorNecesidadLocal);\n }\n proyecto.setEjecutorNecesidadList(listaEjecutorNecesidadProyecto);\n proyecto.setCompromisoProyectoList(listaCompromisosProyecto);\n\n } else if (this.propuestaSeleccionada.getConstantes().getIdConstantes().equals(\n IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_REVISADA)) {\n this.propuestaSeleccionada.setConstantes(new Constantes(IConstantes.CONSTANTES_ESTADO_PROPUESTA_NECESIDAD_NO_APROBADA));\n }\n\n //ACTUALIZAMOS EL CAMPO ROL_ACTUAL\n //CON EL OBJETIVO SE SABER EN DONDE SE ENCUENTRA LA PROPUESTA\n //ESTO SE REALIZA PARA CORREGIR \n //LA INCIDENCIA #0002754: Mientras no se publiquen los resultados de las necesidades, el estado debe ser 'Enviada a VICIN'.\n this.propuestaSeleccionada.setRolActual(IConstantes.PROPUESTA_NECESIDAD_PUBLICADA_JEFE_UNIDAD);\n /* \n\n //GENERAMOS EL NOMBRE DEL ARCHIVO DEL REPORTE\n String nombreReporteUnico = \"PROP_NECES_PERIODO\".concat(\"_\").concat(String.valueOf(System.currentTimeMillis())).concat(\".pdf\");\n String nombreReporte = \"PROP_NECES_PERIODO_\" + (periodoSeleccionado.getAnio() == null ? periodoSeleccionado.getIdPeriodo().toString() : periodoSeleccionado.getAnio().toString()) + \".pdf\";\n */\n //SE ACTUALIZAN LAS PROPUESTAS DE NECESIDAD\n servicePropuestaNecesidad.guardarPropuestaYgenerarProyecto(\n this.propuestaSeleccionada,\n proyecto);\n\n addInfoMessage(keyPropertiesFactory.value(\"cu_ne_6_lbl_mensaje_propuestas_actualizadas_ok_publicar\"));\n\n navigationFaces.redirectFacesCuNe01();\n\n } catch (Exception e) {\n\n addErrorMessage(keyPropertiesFactory.value(\"general_mensaje_error_exception\"));\n Logger.getLogger(this.getClass().getName()).log(Level.SEVERE,\n \"CU-NE-06 Evaluar propuestas de necesidades de investigación - (publicarPropuestas)\", e);\n\n }\n\n }", "private static void cajas() {\n\t\t\n\t}", "public void cargarPantalla() throws Exception {\n Long oidCabeceraMF = (Long)conectorParametroSesion(\"oidCabeceraMF\");\n\t\tthis.pagina(\"contenido_matriz_facturacion_consultar\");\n\n DTOOID dto = new DTOOID();\n dto.setOid(oidCabeceraMF);\n dto.setOidPais(UtilidadesSession.getPais(this));\n dto.setOidIdioma(UtilidadesSession.getIdioma(this));\n MareBusinessID id = new MareBusinessID(\"PRECargarPantallaConsultarMF\"); \n Vector parametros = new Vector();\n \t\tparametros.add(dto);\n parametros.add(id);\n \t\tDruidaConector conector = conectar(\"ConectorCargarPantallaConsultarMF\", parametros);\n if (oidCabeceraMF!=null)\n asignarAtributo(\"VAR\",\"varOidCabeceraMF\",\"valor\",oidCabeceraMF.toString());\n\t\t asignar(\"COMBO\", \"cbTiposOferta\", conector, \"dtoSalida.resultado_ROWSET\");\n\t\t///* [1]\n\n\n\n\t\ttraza(\" >>>>cargarEstrategia \");\n\t\t//this.pagina(\"contenido_catalogo_seleccion\"); \n\t\t \n\t\tComposerViewElementList cv = crearParametrosEntrada();\n\t\tConectorComposerView conectorV = new ConectorComposerView(cv, this.getRequest());\n\t\tconectorV.ejecucion();\n\t\ttraza(\" >>>Se ejecuto el conector \");\n\t\tDruidaConector resultados = conectorV.getConector();\n\t\tasignar(\"COMBO\", \"cbEstrategia\", resultados, \"PRECargarEstrategias\");\n\t\ttraza(\" >>>Se asignaron los valores \");\n\t\t// */ [1]\n\t\t\n\n }", "@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "public void diagrafiFarmakou() {\n\t\t// Elegxw an yparxoun farmaka sto farmakeio\n\t\tif(numOfMedicine != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA FARMAKWN\");\n\t\t\t// Emfanizw ola ta famraka tou farmakeiou\n\t\t\tfor(int j = 0; j < numOfMedicine; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA FARMAKOU: \");\n\t\t\t\tSystem.out.println();\n\t \t \tmedicine[j].print();\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\ttmp_1 = sir.readPositiveInt(\"DWSTE TON ARITHMO TOU FARMAKOU POU THELETAI NA DIAGRAFEI: \");\n\t\t\tSystem.out.println();\n\t\t\t// Elegxos egkyrotitas tou ari8mou pou edwse o xristis\n\t\t\twhile(tmp_1 < 0 || tmp_1 > numOfMedicine)\n\t\t\t{\n\t\t\t\ttmp_1 = sir.readPositiveInt(\"KSANAEISAGETAI ARITHMO FARMAKOU: \");\n\t\t\t}\n\t\t\t// Metakinw ta epomena farmaka mia 8esi pio aristera\n\t\t\tfor(int k = tmp_1; k < numOfMedicine - 1; k++)\n\t\t\t{\n\t\t\t\tmedicine[k] = medicine[k+1]; // Metakinw to farmako sti 8esi k+1 pio aristera\n\t\t\t}\n\t\t\tnumOfMedicine--; // Meiwse ton ari8mo twn farmakwn\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.print(\"\\nDEN YPARXOUN DIATHESIMA FARMAKA PROS DIAGRAFH!\\n\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "public void afegirABultoSortida(Number iddoc, Number idlin, String idart, Number cantot, Number pes, boolean absolut)\n {\n Object [] obj = {getIdexped(), getIdbulto(), iddoc, idlin};\n Key key = new Key(obj);\n Row [] rows = getSgaexpedlbulto().findByKey(key, 1);\n if (rows != null && rows.length > 0)\n {\n SgaexpedlbultoImpl lbulto = (SgaexpedlbultoImpl)((ViewRowImpl)rows[0]).getEntity(0); \n if (!absolut)\n {\n // cantidades parciales\n lbulto.setCantot(lbulto.getCantot().add(cantot)); \n lbulto.setPeso(lbulto.getPeso().add(pes));\n }\n else\n {\n // cantidades totales\n lbulto.setCantot(cantot); \n lbulto.setPeso(pes);\n\n }\n // Retrieve cantot, may be needed below\n cantot = lbulto.getCantot();\n\n }\n else\n {\n SgaexpedlbultoImpl noulbulto = (SgaexpedlbultoImpl)getSgaexpedlbulto().createRow();\n noulbulto.setIdexped(getIdexped());\n noulbulto.setIddoc(iddoc);\n noulbulto.setIdlin(idlin);\n noulbulto.setCantot(cantot);\n noulbulto.setPeso(pes);\n \n \n getSgaexpedlbulto().insertRow(noulbulto);\n \n // Michael: Ja no correspond amb el bulto original\n setIdbultoOri(null);\n \n \n }\n // Veure si podem trobar tipus d'embalum, dimensions, i pes per comanda d'export,\n// SgacdocImpl cdoc = getSgacdoc();\n// if (cdoc.isExport()) \n// {\n// AppModuleImpl appModule = (AppModuleImpl)getDBTransaction().getRootApplicationModule();\n// \n// SgatipobultoParamViewRowImpl row = appModule.getSgatipobultoRow(idart, cantot);\n// if (row != null) \n// {\n// setAlto(row.getAlto());\n// setAncho(row.getAncho());\n// setLargo(row.getLargo());\n// setPesocont(row.getPeso());\n// setIdtipobulto(row.getIdtip());\n// }\n// \n// }\n\n }", "@Override\r\n\tpublic void BulidPartA() {\n\t product.add(\"part A\");\r\n\r\n\t}", "public void mostrarCompra() {\n }", "public static void MostrarPerroSegunCodigo( Perro BaseDeDatosPerros[]){\n int codigo;\r\n System.out.println(\"Ingrese el codigo del perro del cual decea saber la informacion\");\r\n codigo=TecladoIn.readLineInt();\r\n System.out.println(\"____________________________________________\");\r\n System.out.println(\"El nombre del Dueño es: \"+BaseDeDatosPerros[codigo].getNombreDuenio());\r\n System.out.println(\"El telefono del Dueño es :\"+BaseDeDatosPerros[codigo].getTelefonoDuenio());\r\n System.out.println(\"____________________________________________\");\r\n \r\n }" ]
[ "0.6401771", "0.63704383", "0.63317996", "0.63076377", "0.62935734", "0.6245728", "0.62285805", "0.6212311", "0.61368537", "0.61328", "0.6010979", "0.60102385", "0.59516716", "0.5913449", "0.5909638", "0.58975244", "0.5887565", "0.5878692", "0.5870196", "0.5866694", "0.5839802", "0.5808327", "0.58020234", "0.57818985", "0.5781844", "0.5748126", "0.5740673", "0.5736413", "0.5735054", "0.5731626", "0.57284313", "0.57282156", "0.57241815", "0.57241315", "0.57203484", "0.5711026", "0.5706034", "0.5702393", "0.56901187", "0.5685104", "0.5680563", "0.56754065", "0.56704897", "0.5667756", "0.5658589", "0.56582206", "0.56517124", "0.5647", "0.5632345", "0.56291384", "0.5623877", "0.5622043", "0.5617211", "0.5615952", "0.55984116", "0.5596781", "0.55933774", "0.5592341", "0.5589019", "0.55849516", "0.5584355", "0.558414", "0.55801946", "0.5575138", "0.557165", "0.5567685", "0.5567465", "0.55653554", "0.5563548", "0.556123", "0.5559102", "0.5557771", "0.55523527", "0.55437386", "0.55437154", "0.5538578", "0.5531272", "0.552982", "0.55297714", "0.5525117", "0.5519906", "0.5517884", "0.5512065", "0.5508622", "0.55077565", "0.55034286", "0.5499967", "0.54960346", "0.54919505", "0.54891825", "0.5487565", "0.54865587", "0.54817873", "0.5475174", "0.54739106", "0.5473627", "0.5473264", "0.54719394", "0.5465991", "0.54638755", "0.5461398" ]
0.0
-1
Escribe la baraja de la partida
public void setBaraja(Baraja baraja) { this.baraja = baraja; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void transcribir() \r\n\t{\r\n\t\tpalabras = new ArrayList<List<CruciCasillas>>();\r\n\t\tmanejadorArchivos = new CruciSerializacion();\r\n\t\tint contador = 0;\r\n\t\t\r\n\t\tmanejadorArchivos.leer(\"src/Archivos/crucigrama.txt\");\r\n\t\t\r\n\t\tfor(int x = 0;x<manejadorArchivos.getPalabras().size();x++){\r\n\t\t\t\r\n\t\t\tcontador++;\r\n\t\t\t\r\n\t\t\tif (contador == 4) {\r\n\t\t\t\r\n\t\t\t\tList<CruciCasillas> generico = new ArrayList<CruciCasillas>();\r\n\t\t\t\t\r\n\t\t\t\tfor(int y = 0; y < manejadorArchivos.getPalabras().get(x).length();y++)\r\n\t\t\t\t{\r\n\t\t\t\t\t\tgenerico.add(new CruciCasillas(manejadorArchivos.getPalabras().get(x).charAt(y)));\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif (y == (manejadorArchivos.getPalabras().get(x).length() - 1)) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tpalabras.add(generico);\r\n\t\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}\r\n\t\t\t\tcontador = 0;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "public void iniciarBatalha() {\r\n\t\trede.iniciarPartidaRede();\r\n\t}", "public void caricaPartita(String partita) {\n\r\n }", "@Override\n\tpublic void preparar() {\n\t\tSystem.out.println(\"massa, presunto, queijo, calabreza e cebola\");\n\t\t\n\t}", "private static void benvenuto() {\n\t\tUtilityIO.header(MSG_BENVENUTO, SIMBOLO_MESSAGGIO_BENV_USCITA);\n\t\tSystem.out.println();\n\t\t\n\t}", "Partida(Jugador jugador1, Jugador jugador2, Baraja baraja) {\n\t\tthis.jugador1 = jugador1;\n\t\tthis.jugador2 = jugador2;\n\t\tthis.baraja = baraja;\n\t}", "public void recibir_estado_partida(){\n\n }", "private void comerFantasma(Fantasma fantasma) {\n // TODO implement here\n }", "private void cargarFichaLepra_convivientes() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_CONTROL_CONVIVIENTES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "@Override\n public void doPartido(String tcuarto, String tpartido, final String equipos) {\n\n int num = Integer.parseInt(tcuarto);\n int tpart = (num * 4);\n result = String.valueOf(tpart);\n presentador.pshowResult(result);\n\n // *************************************************************\n\n\n Map<String, Object> datosPartido = new HashMap<>();\n\n datosPartido.put(\"equipos\", equipos);\n datosPartido.put(\"Tiempodepartido\",tpart);\n datosPartido.put(\"tiempoporcuarto\",tcuarto);\n\n reference.child(\"Partidos\").push().setValue(datosPartido).addOnCompleteListener(new OnCompleteListener<Void>() {\n\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n\n presentador.presultFireb(equipos);\n escuchoPartidos();\n } else {\n if (task.getException() != null)\n\n presentador.perrorFirebase(task.getException().getMessage());\n }\n\n }\n });\n\n }", "void Planificar(Reserva unaReserva);", "private void cargarFichaLepra_control() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\r\n\t\tficha_inicio_lepraService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean ficha_inicio = ficha_inicio_lepraService\r\n\t\t\t\t.existe_paciente_lepra(parameters);\r\n\t\t// log.info(\"ficha_inicio>>>>\" + ficha_inicio);\r\n\r\n\t\tif (ficha_inicio) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_SEGUIMIENTO_TRATAMIENTO_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "@Listen(\"onClick =#asignarEspacioCita\")\n\tpublic void asginarEspacioCita() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "private void cargarPreescripcionMedica() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(\"tipo_hc\", \"\");\r\n\t\tparametros.put(\"ocultaValor\", \"\");\r\n\t\tparametros.put(\"admision\", admision_seleccionada);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false, \"/pages/receta_rips.zul\",\r\n\t\t\t\t\"PRESCRIPCION MEDICA\", parametros);\r\n\t}", "@Listen(\"onClick =#asignarEspacio\")\n\tpublic void Planificacion() {\n\t\tString dir = \"gc/espacio/frm-asignar-espacio-recursos-catalogo.zul\";\n\t\tclearDivApp(dir);\n\t\t// Clients.evalJavaScript(\"document.title = 'ServiAldanas'; \");\n\t}", "private void cargarFichaLepra_inicio() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\tparametros.put(\"nro_ingreso\", admision_seleccionada.getNro_ingreso());\r\n\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE, admision_seleccionada);\r\n\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\tIRutas_historia.PAGINA_INICIO_TRATAMIENTO_LEPRA,\r\n\t\t\t\tIRutas_historia.LABEL_INICIO_TRATAMIENTO_LEPRA, parametros);\r\n\t}", "private void cargarFichaLepra_discapacidades() {\r\n\r\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\r\n\t\tparameters.put(\"codigo_empresa\", codigo_empresa);\r\n\t\tparameters.put(\"codigo_sucursal\", codigo_sucursal);\r\n\t\tparameters.put(\"nro_identificacion\", tbxNro_identificacion.getValue());\r\n\t\tparameters.put(\"fecha_actual\", new Date());\r\n\r\n\t\t// log.info(\"parameters\" + parameters);\r\n\t\tseguimiento_control_pqtService.setLimit(\"limit 25 offset 0\");\r\n\r\n\t\t// log.info(\"parameters>>>>\" + parameters);\r\n\t\tBoolean fecha_tratamiento = seguimiento_control_pqtService\r\n\t\t\t\t.existe_fecha_fin_tratamiento(parameters);\r\n\t\t// log.info(\"fecha_tratamiento>>>>\" + fecha_tratamiento);\r\n\r\n\t\tif (fecha_tratamiento) {\r\n\t\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\t\tparametros.put(\"nro_identificacion\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_identificacion());\r\n\t\t\tparametros.put(\"nro_ingreso\",\r\n\t\t\t\t\tadmision_seleccionada.getNro_ingreso());\r\n\t\t\tparametros.put(\"estado\", admision_seleccionada.getEstado());\r\n\t\t\tparametros.put(\"codigo_administradora\",\r\n\t\t\t\t\tadmision_seleccionada.getCodigo_administradora());\r\n\t\t\tparametros.put(\"id_plan\", admision_seleccionada.getId_plan());\r\n\t\t\tparametros.put(IVias_ingreso.ADMISION_PACIENTE,\r\n\t\t\t\t\tadmision_seleccionada);\r\n\t\t\tparametros.put(IVias_ingreso.OPCION_VIA_INGRESO,\r\n\t\t\t\t\tOpciones_via_ingreso.REGISTRAR);\r\n\t\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\tIRutas_historia.PAGINA_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tIRutas_historia.LABEL_VALORACION_DISCAPACIDADES_LEPRA,\r\n\t\t\t\t\tparametros);\r\n\t\t}\r\n\t}", "@Override\n\tpublic void buildPartB() {\n\t\tproduct.add(\"部件Y\");\n\t}", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "String getCADENA_TRAMA();", "public void billeBarre() { \t\t\t\t\t\t\t\t\t\t\t\n\t\tint contact = 0;\n\n\t\t// Décomposition de la bille\n\t\t// 2 3 4\n\t\t// 1 5\n\t\t// 8 7 6 \n\n\t\t// Étude des contacts avec les 8 points de la bille\n\t\t// Contact GaucheHaut de la bille\n\n\t\t// Contact haut de la bille\n\t\tint[] p = billeEnCours.MH();\n\t\tif (p[1] <= barreEnCours.bas() && p[1] >= barreEnCours.haut() && p[0] <= barreEnCours.droite() && p[0] >= barreEnCours.gauche()) {\n\t\t\tcontact = 3;\n\t\t}\n\n\t\t// Contact bas de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.MB();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 7;\n\t\t\t}\n\t\t}\n\n\t\t// Contact droite de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.DM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 5;\n\t\t\t}\n\t\t}\n\n\t\t// Contact gauche de la bille\n\t\tif (contact == 0) {\n\t\t\tp = billeEnCours.GM();\n\t\t\tif (((p[1] <= barreEnCours.bas()) && (p[1] >= barreEnCours.haut())) && ((p[0] <= barreEnCours.droite()) && (p[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 1;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 2;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteHaut de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DH();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 4;\n\t\t\t}\n\t\t}\n\n\t\t// Contact GaucheBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.GB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 8;\n\t\t\t}\n\t\t}\n\n\t\t// Contact DroiteBas de la bille\n\t\tif (contact == 0) {\n\t\t\tdouble[] q = billeEnCours.DB();\n\t\t\tif (((q[1] <= barreEnCours.bas()) && (q[1] >= barreEnCours.haut())) && ((q[0] <= barreEnCours.droite()) && (q[0] >= barreEnCours.gauche()))) {\n\t\t\t\tcontact = 6;\n\t\t\t}\n\t\t}\n\n\t\t// Mise à jour de la vitesse \n\n\t\t// Rencontre d'un coin\n\t\tif ((((contact == 2) || (contact == 4))) || ((contact == 8) || (contact == 6))) {\n\t\t\tbilleEnCours.demiTour();\n\t\t}\n\n\t\t// Contact Classique\n\t\t// Gauche - Droite\n\t\tif ((contact == 1) || (contact == 5)) {\n\t\t\tint[] nv = {- billeEnCours.renvoyerVitesse()[0], billeEnCours.renvoyerVitesse()[1]};\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\n\n\t\t// Haut - Bas : Déviation de la balle\n\t\tif ((contact == 3) || (contact == 7)) {\n\t\t\tint[] nv = new int[] {1,1};\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4 && billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0], - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] <= barreEnCours.renvoyerPosition()[0] - barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] - 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tif (billeEnCours.renvoyerPosition()[0] >= barreEnCours.renvoyerPosition()[0] + barreEnCours.renvoyerLargeur()/4) {\n\t\t\t\tnv = new int[] {billeEnCours.renvoyerVitesse()[0] + 1, - billeEnCours.renvoyerVitesse()[1]};\n\t\t\t}\n\t\t\tbilleEnCours.changeVitesse(nv);\n\t\t}\t\t\t\n\n\n\t}", "public int q1(int op,int band,int acum2)\n {\n \n int reslt=0;\n if(opBebidad!=0){//op Bebiba corresponde a si al menos una de las bebidas has sido seleccionada\n \n \n if(band==1)//Parametro band corresponde a varias operaciones\n {// 1. Si el boton de cancelar ha sido seleccionado\n // 2. Si ha sido ingresada una moneda\n \n //---------------------------------------------------------------------\n //Mostrar precio de cada producto, al presionar su imagen mediante la llamada al metodo valorBeb()\n Set<String> quipu = new HashSet<String>(monedas);\n for (String key : quipu) \n {\n if(key.equals(\"25\"))\n {\n cant25=Integer.parseInt(Collections.frequency(monedas, key)+\"\");\n\n }else\n if(key.equals(\"5\"))\n {\n cant5=Integer.parseInt(Collections.frequency(monedas, key)+\"\"); \n\n }else\n if(key.equals(\"10\"))\n {\n cant10=Integer.parseInt(Collections.frequency(monedas, key)+\"\");\n\n }\n }\n valorBeb(op);\n Ventana_Principal.arrow.setVisible(false);\n Ventana_Principal.txtA.setText(\"Por Favor Retirar su Dinero...Gracias\");\n Ventana_Principal.txtA.append(\"\\nEntregando...\");\n Cambio hilo=new Cambio(Ventana_Principal.txtA,monedas.size(),monedas);\n hilo.start();\n\n Ventana_Principal.lbl5.setText(cant5+\"\");\n Ventana_Principal.lbl10.setText(cant10+\"\");\n Ventana_Principal.lbl25.setText(cant25+\"\");\n\n //Luego de un minuto el hilo vuelve a ejecutarse\n //ScheduledExecutorService timer = Executors.newSingleThreadScheduledExecutor();\n //timer.scheduleAtFixedRate(hilo, 1, 1, TimeUnit.MINUTES);\n \n }\n else\n if(band==2)\n {\n hilo=new Publicidad(txtA,true);\n Ventana_Principal.hilo.stop();\n //Se detiene el hilo para mostrar el valor del producto vs el valor que se va ingresando\n //Mediante acum2, se acumulan las monedas ingresadas\n double dif=0; \n System.out.println(\"----------------------------------------------------------------------\");\n System.out.println(\"Precio: \"+valor+\"| Ingreso:\"+acum);\n monedas.add(acum2+\"\");//Se van guardando cada una de las monedas ingresadas, para poder ser contadas\n \n dif=valor-acum;\n if(dif<0)\n {\n \n if(acum==100)\n {\n String aux=Integer.toString(acum);\n Ventana_Principal.txtA.setText(\"Ha Ingresado: \"+aux.substring(0,1)+\".0 dolar/es\");\n Ventana_Principal.txtMon.setText(\"\");\n }else\n {\n if(acum>100)\n {\n String aux=Integer.toString(acum);\n String aux2=aux.substring(0,1);\n Ventana_Principal.txtA.setText(\"Ha Ingresado: \"+aux2.concat(\".\").concat(aux.substring(1))+\" dolar/es\");\n Ventana_Principal.txtMon.setText(\"\");\n }else\n {\n Ventana_Principal.txtA.setText(\"Ha Ingresado: \"+acum+\" centavos\");\n Ventana_Principal.txtMon.setText(\"\");\n }\n }\n \n }else\n {\n if(acum==valor)\n {\n if(acum==100)\n {\n String aux=Integer.toString(acum);\n Ventana_Principal.txtA.setText(\"Ha Ingresado: \"+aux.substring(0,1)+\".0 dolar/es\");\n Ventana_Principal.txtMon.setText(\"\");\n }else\n {\n Ventana_Principal.txtA.setText(\"Ha Ingresado: \"+acum+\" centavos\");\n Ventana_Principal.txtMon.setText(\"\");\n }\n }else\n {\n Ventana_Principal.txtA.setText(\"Ha Ingresado: \"+acum+ \" centavos\\nFaltan \"+dif+\" centavos\");\n Ventana_Principal.txtMon.setText(\"\");\n }\n \n }\n if(acum>=valor)\n {\n if(acum==valor)\n {\n Ventana_Principal.txtA.append(\"\\nPor Favor, Retire su Bebida...\");\n Ventana_Principal.txtMon.setEnabled(false);\n Ventana_Principal.arrow.setVisible(true);\n Ventana_Principal.lblPush.setEnabled(true);\n }else\n {\n Ventana_Principal.txtMon.setEnabled(false);\n q2(1);\n Ventana_Principal.txtA.append(\"\\nPor Favor, Retire su Bebida...\");\n Ventana_Principal.lblPush.setEnabled(true);\n }\n }\n //Se llama a cantMonedas, que muestra la cantidad de cada moneda ingresada\n cantMonedas();//Cuenta las monedas y las clasifica\n \n }\n }\n reslt=acum;\n return reslt; \n }", "public void sacarPaseo(){\r\n\t\t\tSystem.out.println(\"Por las tardes me saca de paseo mi dueño\");\r\n\t\t\t\r\n\t\t}", "public void armarPreguntas(){\n preguntas = file.listaPreguntas(\"Preguntas.txt\");\n }", "String getAnnoPubblicazione();", "public void salvaPartita(String file) {\n\r\n }", "@Override\n\tpublic void cargarBateria() {\n\n\t}", "public void setPartitaIva(String partitaIva) {\n this.partitaIva = partitaIva;\n }", "@Override\r\n\tpublic void BulidPartA() {\n\t product.add(\"part A\");\r\n\r\n\t}", "@Override\n\tpublic void buildPartA() {\n\t\tproduct.add(\"部件X\");\n\t}", "@Override\r\n\tpublic void BulidPartB() {\n\t\tproduct.add(\"part B\");\r\n\t}", "public void aplicarDescuento();", "public static void promedioBoletaCliente() {\r\n\t\tPailTap clienteBoleta = getDataTap(\"C:/Paula/masterset/data/9\");\r\n\t\tPailTap boletaProperty = getDataTap(\"C:/Paula/masterset/data/4\");\r\n\t\t\r\n\t\tSubquery promedio = new Subquery(\"?Cliente_id\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(clienteBoleta, \"_\", \"?data\")\r\n\t\t\t\t.predicate(boletaProperty, \"_\", \"?data2\")\r\n\t\t\t\t.predicate(new ExtractClienteBoleta(), \"?data\").out(\"?Cliente_id\", \"?Boleta_id\", \"?Dia\")\r\n\t\t\t\t.predicate(new ExtractBoletaTotal(), \"?data2\").out(\"?Boleta_id\",\"?Total\")\r\n\t\t\t\t.predicate(new Avg(), \"?Total\").out(\"?Promedio\");\r\n\t\t\r\n\t\tSubquery tobatchview = new Subquery(\"?json\")\r\n\t\t\t\t.predicate(promedio, \"?Cliente\", \"?Promedio\", \"?Dia\")\r\n\t\t\t\t.predicate(new ToJSON(), \"?Cliente\", \"?Promedio\", \"?Dia\").out(\"?json\");\r\n\t\tApi.execute(new batchview(), tobatchview);\r\n\t\t//Api.execute(new StdoutTap(), promedio);\r\n\t}", "public void ventaBilleteMaquina2()\n {\n maquina2.insertMoney(600);\n maquina1.printTicket();\n }", "public void ventaBilleteMaquina1()\n {\n maquina1.insertMoney(500);\n maquina1.printTicket();\n }", "public void chocoContraBomba(Bomba bomba){}", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "@Override\n\tpublic void pausaParaComer() {\n\n\t}", "public void enviarValoresCabecera(){\n }", "private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }", "public String getPartitaIva() {\n return partitaIva;\n }", "Batiment choixBatiment(Partie partie, int nbDoublon, Plateau plateau);", "public void bajarBloque() {\n\t\tif (piezaActual != null) {\n\t\t\tif (Mapa.getInstance().estaLibre(piezaActual.getBloque3().getX(),\n\t\t\t\t\tpiezaActual.getBloque3().getY() + 1)) {\n\t\t\t\tpiezaActual.getBloque3().bajar(); // Dejar en ese orden\n\t\t\t\tpiezaActual.getBloque2().bajar();\n\t\t\t\tpiezaActual.getBloque1().bajar();\n\t\t\t} else {\n\t\t\t\tthis.piezaNueva();\n\t\t\t}\n\t\t}\n\t}", "public void venceuRodada () {\n this.pontuacaoPartida++;\n }", "void pasarALista();", "public void finePartita() {\n\r\n }", "private void agregarDiccionario(Palabra palabra){\n if (!dic.contiene(palabra)) {\n boolean su = sugerencia(palabra);\n if(su){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea agregar: ´\"+palabra.getCadena()+\"´ al diccionario?\", \"Agregar!\", JOptionPane.YES_NO_OPTION);\n if (d == 0) \n dic.agrega(palabra);\n }\n }else {\n JOptionPane.showMessageDialog(null,\"--La palabra ya se encuentra en el diccionario.--\\n --\"+dic.busca(palabra).toString());\n }\n }", "private void cargarNotasEnfermeria() {\r\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\r\n\t\tparametros.put(\"admision_seleccionada\", admision_seleccionada);\r\n\t\tparametros.put(\"rol_medico\", \"S\");\r\n\t\ttabboxContendor.abrirPaginaTabDemanda(false,\r\n\t\t\t\t\"/pages/notas_enfermeria.zul\", \"NOTAS DE ENFERMERIA\",\r\n\t\t\t\tparametros);\r\n\t}", "public void restaurarPartida() throws FileNotFoundException, IOException, ClassNotFoundException {\n\t\tjuego.restaurarPartida(jugador.getID());\t\r\n\t}", "private int[] enquadramentoContagemDeCaracteres(int[] quadro) throws Exception {\n System.out.println(\"\\n\\t[Contagem de Caracteres]\");\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"\\n\\t[Contagem de Caracteres]\\n\");\n Thread.sleep(velocidade);\n\n int informacaoDeControle = ManipuladorDeBit.getPrimeiroByte(quadro[0]);//Quantidade de Bits do quadro\n //Quantidade de Bits de carga util do quadro\n int quantidadeDeBitsCargaUtil = informacaoDeControle;\n System.out.println(\"IC: \" + informacaoDeControle);\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"\\n\\tIC [\"+informacaoDeControle+\"] \");\n\n\n int novoTamanho = quantidadeDeBitsCargaUtil/8;\n\n int[] quadroDesenquadrado = new int[novoTamanho];//Novo vetor de Carga Util\n int posQuadro = 0;//Posicao do Vetor de Quadros\n\n int cargaUtil = 0;//Nova Carga Util\n\n quadro[0] = ManipuladorDeBit.deslocarBits(quadro[0]);//Deslocando os bits 0's a esquerda\n //Primeiro inteiro do Quadro - Contem a informacao de Controle IC nos primeiros 8 bits\n quadro[0] <<= 8;//Deslocando 8 bits para a esquerda, descartar a IC\n\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"Carga Util [ \");\n for (int i=1; (i<=3) && (i<=novoTamanho); i++) {\n cargaUtil = ManipuladorDeBit.getPrimeiroByte(quadro[0]);\n quadroDesenquadrado[posQuadro++] = cargaUtil;\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(cargaUtil + \" \");\n quadro[0] <<= 8;//Desloca 8 bits para a esquerda\n }\n\n Thread.sleep(velocidade);\n\n //Caso o quadro for composto por mais de um inteiro do vetor\n for (int i=1, quantidadeByte; posQuadro<novoTamanho; i++) {\n quantidadeByte = ManipuladorDeBit.quantidadeDeBytes(quadro[i]);\n quadro[i] = ManipuladorDeBit.deslocarBits(quadro[i]);\n\n for (int x=1; (x<=quantidadeByte) && (x<=4); x++) {\n cargaUtil = ManipuladorDeBit.getPrimeiroByte(quadro[i]);\n quadroDesenquadrado[posQuadro++] = cargaUtil;\n Painel.CAMADAS_RECEPTORAS.camadaEnlace(cargaUtil + \" \");\n quadro[i] <<= 8;//Desloca 8 bits para a esquerda\n }\n Thread.sleep(velocidade);\n }\n \n Painel.CAMADAS_RECEPTORAS.camadaEnlace(\"]\\n\");\n Thread.sleep(velocidade);\n\n return quadroDesenquadrado;\n }", "public void LecturaEscrituraOBjetosManual(File rutaEscribir) throws IOException {\n ObjectOutputStream escribir = new ObjectOutputStream(\n new BufferedOutputStream(\n new FileOutputStream(rutaEscribir)));\n\n Scanner read = new Scanner(System.in);\n System.out.println(\"¿Cuántas carteleras agregarás?\");\n //se ingresa cantidad de carteleras, para generar el array\n //se crea el array y se piden los datos de cada objeto\n //se agrega cada objeto al array y lo devuelve con la información rellenada\n Cartelera[] lista = Cartelera.listaCartelera(read.nextInt());\n\n //se escribe un array de cartelera. \n escribir.writeObject(lista);\n escribir.close();\n }", "public String turno(){\n return partida.turno();\n }", "public void brazoSubir( int presicion )\n {\n brazo.brazoSubir( presicion );\n }", "public void BuscarTarea () throws IOException, InterruptedException {\n sleep(1000);\n waitVisibilityOfElement(Searchtask);\n Searchtask.sendKeys(\"Tarea Zeus Automatizar_TesZai\");\n //driver.findElement(By.xpath(\"//*[@text='Tarea Automatización Zeus']\")).click();\n }", "private static void kapazitaetPruefen(){\n\t\tList<OeffentlichesVerkehrsmittel> loev = new ArrayList<OeffentlichesVerkehrsmittel>();\n\t\t\n\t\tLinienBus b1 = new LinienBus();\n\t\tFaehrschiff f1 = new Faehrschiff();\n\t\tLinienBus b2 = new LinienBus();\t\n\t\t\n\t\tloev.add(b1);\n\t\tloev.add(b2);\n\t\tloev.add(f1);\n\t\t\n\t\tint zaehlung = 500;\n\t\tboolean ausreichend = kapazitaetPruefen(loev,500);\n\t\tp(\"Kapazitaet ausreichend? \" + ausreichend);\n\t\t\n\t}", "public void asignarVida();", "private void hienThiMaPDK(){\n ThuePhongService thuePhongService = new ThuePhongService();\n thuePhongModels = thuePhongService.layToanBoPhieuDangKyThuePhong();\n cbbMaPDK.removeAllItems();\n for (ThuePhongModel thuePhongModel : thuePhongModels) {\n cbbMaPDK.addItem(thuePhongModel.getMaPDK());\n }\n }", "private void generarDocP(){\n generarPdf(this.getNombre());\n }", "public static void main(String[] args) {\n char [] letra = new char [27];\n letra [0] = 'A';\n letra [1] = 'B';\n letra [2] = 'C';\n letra [3] = 'D';\n letra [4] = 'E';\n letra [5] = 'F';\n letra [6] = 'G';\n letra [7] = 'H';\n letra [8] = 'I';\n letra [9] = 'J';\n letra [10] = 'K';\n letra [11] = 'L';\n letra [12] = 'M';\n letra [13] = 'N';\n letra [14] = 'Ñ';\n letra [15] = 'O';\n letra [16] = 'P';\n letra [17] = 'Q';\n letra [18] = 'R';\n letra [19] = 'S';\n letra [20] = 'T';\n letra [21] = 'U';\n letra [22] = 'V';\n letra [23] = 'W';\n letra [24] = 'X';\n letra [25] = 'Y';\n letra [26] = 'Z';\n int [] contadores = new int [27];\n pedirCadena();\n comprobarvocales(letra,contadores);\n }", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "public void pedirValoresCabecera(){\n \r\n \r\n \r\n \r\n }", "public synchronized void abilitarAbordaje() {\n abordar = true;\r\n notifyAll();\r\n while(pedidoAbordaje != 0){//Mientras los pasajeros esten abordando\r\n try {\r\n wait();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Vuelo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n //Cuando los pasajeros hayan abordado el vuelo sale\r\n salio = true;\r\n System.out.println(\"El vuelo \" + nro + \" de \" + aerolinea + \" ha despegado\");\r\n }", "private void aumentarPuntos() {\r\n this.puntos++;\r\n this.form.AumentarPuntos(this.puntos);\r\n }", "public void oldPartita(String partita) {\n\r\n }", "public static void RF2() {\r\n System.out.print(\"Gracias,Tenga un Buen Dia \");\r\n\tSystem.out.print(\"Adios :D\");\r\n }", "public void mostrarCompra() {\n }", "public void AudioColumna() {\r\n\t\ttry {\r\n\t\t\treprocol.AbrirFichero(\"C:\\\\Temp\\\\Sonidos\\\\Column.wav\");\r\n\t\t} catch (Exception ex) {\r\n\t\t\tSystem.out.println(\"Error: \" + ex.getMessage());\r\n\t\t}\r\n\r\n\t}", "public void borra() {\n dib.borra();\n dib.dibujaImagen(limiteX-60,limiteY-60,\"tierra.png\");\n dib.pinta(); \n }", "public Resposta(String palavraChave){\n this.palavraChave = palavraChave;\n }", "public void abrirCaja() {\n\n\t\tthis.ventas.clear();\n\t\tthis.estadoDeCaja = true;\n\t}", "public String nuevaSubasta() {\n\t\tofer_id = null;\n\t\tofer_valor_oferta = null;\n\t\tofer_fecha_oferta = null;\n\t\tpostulante = null;\n\t\titem_nombre = \"\";\n\t\titem_caracteristicas = \"\";\n\t\titem_imagen = \"\";\n\t\tpos_nombre = \"\";\n\t\tpos_apellido = \"\";\n\t\tpos_direccion = \"\";\n\t\tpos_correo = \"\";\n\t\tpos_telefono = \"\";\n\t\tpos_celular = \"\";\n\t\tpos_institucion = \"\";\n\t\tpos_gerencia = \"\";\n\t\tpos_area = \"\";\n\t\treturn \"nitem?faces-redirect=true\";\n\t}", "public void busqueda() {\r\n\r\n try {\r\n\r\n String preg = JOptionPane.showInputDialog(\"Buscar:\");\r\n Query query = new Query(preg);\r\n QueryResult result = twitter.search(query);\r\n for (Status status : result.getTweets()) {\r\n System.out.println(\"@\" + status.getUser().getScreenName() + \":\" + status.getText());\r\n }\r\n } catch (TwitterException ex) {\r\n java.util.logging.Logger.getLogger(MetodosTwit.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }", "private void cargarRegistro() {\n\t\tif (filaId != null) {\n\t\t\tCursor bar = bdHelper.getBar(filaId);\n // Indicamos que queremos controlar el Cursor\n\t\t\tstartManagingCursor(bar);\n\n\t\t\t// Obtenemos el campo categoria\n\t\t\tString categoria = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_CATEGORIA));\n\t\t\t// Seleccionamos la categoría en el Spinner\n\t\t\tfor (int i=0; i<categoriaSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) categoriaSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(categoria)){\n\t\t\t\t\tcategoriaSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Obtenemos el campo relacion calidad-precio\n\t\t\tString relacion = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_RELACION));\n\t\t\t// Seleccionamos en el Spinner la relacion c-p\n\t\t\tfor (int i=0; i<relacionSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) relacionSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(relacion)){\n\t\t\t\t\trelacionSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Obtenemos el campo del acompañante\n\t\t\tString acompanante = bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_ACOMPANANTE));\n\t\t\t// Seleccionamos el formato en el Spinner\n\t\t\tfor (int i=0; i<acompananteSpinner.getCount();i++){\n\t\t\t\t// Cargamos una de la opciones del listado desplegable\n\t\t\t\tString s = (String) acompananteSpinner.getItemAtPosition(i);\n\t\t\t\t// Si coindice con la que está en la BD la seleccionamos en el listado desplegable\n\t\t\t\tif (s.equalsIgnoreCase(acompanante)){\n\t\t\t\t\tacompananteSpinner.setSelection(i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Rellenamos las Vistas\n\t\t\tnombreText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_NOMBRE)));\n\t\t\tdireccionText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_DIRECCION)));\n\t\t\tnotasText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_NOTAS)));\n\t\t\tprecioText.setText(bar.getString(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_PRECIO)));\n\t\t\tvaloracionRB.setRating(bar.getFloat(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_VALORACION)));\n\n // Tratamos las fechas del registro\n\t\t\tlong fecha = bar.getLong(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_FEC_ULT_VIS));\n\t\t\tprimeraFecha.setTimeInMillis(fecha);\n\t\t\tfecha = bar.getLong(bar.getColumnIndexOrThrow(BaresBDAdapter.CAMPO_FEC_PRI_VIS));\n\t\t\tif (fecha>0) {\n\t\t\t\tultimaFecha=Calendar.getInstance();\n\t\t\t\tultimaFecha.setTimeInMillis(fecha);\n\t\t\t}\n\t\t\t// Dejamos de controlar el cursor de la BD\n\t\t\tstopManagingCursor(bar);\n\t\t}\n\t}", "public void limpiarProcesoBusqueda() {\r\n parametroEstado = 1;\r\n parametroNombre = null;\r\n parametroApellido = null;\r\n parametroDocumento = null;\r\n parametroTipoDocumento = null;\r\n parametroCorreo = null;\r\n parametroUsuario = null;\r\n parametroEstado = 1;\r\n parametroGenero = 1;\r\n listaTrabajadores = null;\r\n inicializarFiltros();\r\n }", "private static void saluti() {\n\t\tUtilityIO.header(MSG_CHIUSURA, SIMBOLO_MESSAGGIO_BENV_USCITA);\n\t\tSystem.out.println();\n\t}", "public void generarContrato() {\r\n\t\ttry {\r\n\t\t\tString nombre = Contrato.generarContrato(estudiante, periodo, reserva.getArrSitioPeriodo().getSitNombre());\r\n\t\t\tnombre = \"Contrato_\" + estudiante.getId().getPerDni() + \".zip\";\r\n\t\t\tthis.zip(estudiante.getId().getPerDni(), periodo.getPrdId());\r\n\t\t\tFunciones.descargarZip(url_contrato+ nombre);\r\n\t\t\t// MODIFICAR NOMBRE CONTRATO\r\n\t\t\tmngRes.agregarContratoReserva(estudiante, periodo.getPrdId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tFunciones.descargarPdf(url_contrato + \"error.pdf\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\r\n\t}", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "void tampilKarakterA();", "public void btnGenerarReporteDestruccionPDF() {\n try {\n byte[] bytesFile;\n bytesFile = null;\n Map parameters = new HashMap();\n\n parameters.put(\"rfc\", produccionCigarrosHelper.getTabacalera().getRfc());\n parameters.put(\"incidencia\", \"Desperdicios y destrucción\");\n parameters.put(\"fecha\", new Date());\n parameters.put(\"folio\", desperdiciosHelper.getIdAcuseRecibo());\n parameters.put(\"cadenaOriginal\", firmaFormHelper.getCadenaOriginal());\n parameters.put(\"selloDigital\", selloDigital.generaSelloDigital(firmaFormHelper.getCadenaOriginal()));\n parameters.put(\"codigo_qr\", QRCodeUtil.getQr(desperdiciosHelper.getIdAcuseRecibo(), produccionCigarrosHelper.getTabacalera().getRfc(), Constantes.CINCUENTA, Constantes.CINCUENTA, Constantes.ARCHIVO_PNG));\n\n if (reporterService != null) {\n bytesFile = reporterService.makeReport(ReportesTabacosEnum.REPORTE_ACUSE_DESPERDICIO_DESTRUCCION, ARCHIVO_PDF, parameters, null);\n if (bytesFile != null) {\n generaDocumento(bytesFile, MIMETypesEnum.PDF, \"AcuseDescargapDesperdiciosDestruccion_\" + desperdiciosHelper.getIdAcuseRecibo(), FileExtensionEnum.PDF);\n }\n }\n } catch (ReporterJasperException e) {\n super.addErrorMessage(ERROR, \"Error al generar el acuse\");\n LOGGER.error(\"Error al generar el Reporte en PDF\" + e.getMessage());\n } catch (QRCodeUtilException ex) {\n super.addErrorMessage(ERROR, \"Error al generar el acuse\");\n LOGGER.error(\"Error al generar el Reporte en PDF\" + ex.getMessage());\n } catch (SelloDigitalException ex) {\n super.addErrorMessage(ERROR, \"Error al generar el acuse\");\n LOGGER.error(\"Error al generar el Reporte en PDF\" + ex.getMessage());\n }\n\n }", "public void limpiarCamposFormBusqueda() {\n\t}", "public void binPelicual(Noticia p) {\n txtTitulo.setText(p.getTitulo());\n\n }", "public void setTipoPartida( String tipoPartida ) {\n this.tipoPartida = tipoPartida;\n }", "public static void main(String[] args) {\n String asNombres[]=new String[TAMA];\r\n //CAPTURAR 5 NNOMBRES \r\n Scanner sCaptu = new Scanner (System.in);\r\n for (int i = 0; i < TAMA; i++) {\r\n System.out.println(\"Tu nombre :\");\r\n asNombres[i]=sCaptu.nextLine();\r\n }\r\n for (String asNombre : asNombres) {\r\n System.out.println(\"Nombre: \" + asNombre);\r\n \r\n }\r\n //CREAR UNA COPIA DEL ARREGLO\r\n /*String asCopia[]=asNombre;//Esto no funciona\r\n asNombre[0]=\"HOLA MUNDO\";\r\n System.out.println(asCopia[0]);*/\r\n \r\n String asCopia[]=new String[TAMA];\r\n for (int i = 0; i < TAMA; i++) {\r\n asCopia[i]=asNombres[i];\r\n \r\n }\r\n asNombres[0]=\"HOLA MUNDO\";\r\n System.out.println(\"Nombre = \" + asNombres[0]);\r\n System.out.println(\"Copia = \" + asCopia[0]);\r\n }", "private void elegiCasillaQueNoEsBomba(Casilla casilla) {\n\t\tif( !this.getJugadorDeTurno().equals( casilla.getJugador() ) && casilla.getJugador() != null )\t\t\t\n\t\t\tthis.getTablero().voltearTodasLasCasillasDelJugador( casilla.getJugador(), casilla );\n\t\t\n\t\t//Fuerzo el jugador a la casilla para evaluar si gane\n\t\tcasilla.setJugador( this.getJugadorDeTurno() );\n\t\t\n\t\tif( this.terminoJuego() )\n\t\t\tthis.mostrarGanador( this.getJugadorDeTurno() );\n\t}", "public void verComprobante() {\r\n if (tab_tabla1.getValorSeleccionado() != null) {\r\n if (!tab_tabla1.isFilaInsertada()) {\r\n Map parametros = new HashMap();\r\n parametros.put(\"ide_cnccc\", Long.parseLong(tab_tabla1.getValorSeleccionado()));\r\n parametros.put(\"ide_cnlap_debe\", p_con_lugar_debe);\r\n parametros.put(\"ide_cnlap_haber\", p_con_lugar_haber);\r\n vpdf_ver.setVisualizarPDF(\"rep_contabilidad/rep_comprobante_contabilidad.jasper\", parametros);\r\n vpdf_ver.dibujar();\r\n } else {\r\n utilitario.agregarMensajeInfo(\"Debe guardar el comprobante\", \"\");\r\n }\r\n\r\n } else {\r\n utilitario.agregarMensajeInfo(\"No hay ningun comprobante seleccionado\", \"\");\r\n }\r\n }", "public void anuncio() {\n\n\t\tapp.image(pantallaEncontrado, 197, 115, 300, 150);\n\n\t\tapp.image(botonContinuar, 253, 285);\n\n\t}", "String[] chiediSecondaScommessa();", "private void inQuyetDinhv4(HttpServletRequest request, HttpServletResponse reponse, GiaHanForm giaHanForm, ApplicationContext appConText) throws Exception {\r\n\t\tString fileIn = request.getRealPath(\"/docin/v4\") + \"\\\\TTNB11.doc\";\r\n\t\tString fileOut = request.getRealPath(\"/docout\") + \"\\\\TTNB11_Out\" + System.currentTimeMillis() + request.getSession().getId() + \".doc\";\r\n\r\n\t\tString fileTemplate = null;\r\n\t\tfileTemplate = \"ttnb11\"; // (ngon, chuan)\r\n\t\tString idCuocTtkt = giaHanForm.getIdCuocTtKt();\r\n\t\tTtktKhCuocTtkt cuocTtkt = CuocTtktService.getCuocTtktWithoutNoiDung(appConText, idCuocTtkt);\r\n\r\n\t\tTtktCbQd cbQd = TtktService.getQuyetDinh(idCuocTtkt, appConText);\r\n\t\tString hinhThuc = (cuocTtkt.getHinhThuc().booleanValue()) ? \"ki\\u1EC3m tra\" : \"thanh tra\";\r\n\t\tStringBuffer sb = new StringBuffer(hinhThuc);\r\n\t\t//giaHanForm.setSoQd(KtnbUtil.getMaNvu(appConText, \"Q\\u0110\"));\r\n\t\t//if (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t//sb.append(\"....../Q\\u0110-.......\");\r\n\t\t//} else {\r\n\t\t\t//sb.append(giaHanForm.getSoQd() + KtnbUtil.getMaNvu(appConText, \"Q\\u0110\") );\r\n\t\t//}\r\n\t\tMsWordUtils word = new MsWordUtils(fileIn, fileOut);\r\n\t\ttry {\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText).toUpperCase());\r\n\t\t\tword.put(\"[cqt_ra_quyet_dinh]\", cuocTtkt.getTenDonViTh().toUpperCase());\r\n\t\t\tif (Formater.isNull(giaHanForm.getSoQd())) {\r\n\t\t\t\tword.put(\"[so_qd]\", \"....../Q\\u0110-.......\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[so_qd]\", giaHanForm.getSoQd().toString()+KtnbUtil.getMaNvu1(appConText, \"Q\\u0110\") );\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t//word.put(\"[so_qd]\", sb.toString().toUpperCase());\r\n\t\t\tString ngaylap = giaHanForm.getNgayRaQd();\r\n\t\t\tString[] arrngaylap = ngaylap.split(\"/\");\r\n\t\t\tif (giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (giaHanForm.getNoiRaQd().equals(\"\") && !giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", \".....\");\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y \" + arrngaylap[0] + \" th\\u00E1ng \" + arrngaylap[1] + \" n\\u0103m \" + arrngaylap[2]);\r\n\t\t\t} else if (!giaHanForm.getNoiRaQd().equals(\"\") && giaHanForm.getNgayRaQd().equals(\"\")) {\r\n\t\t\t\tword.put(\"[noi_ra_qd]\", giaHanForm.getNoiRaQd());\r\n\t\t\t\tword.put(\"[ngay_ra_qd]\", \"ng\\u00E0y.....th\\u00E1ng.....n\\u0103m.....\");\r\n\t\t\t}\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi());\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText).toUpperCase());\r\n\t\t\tword.put(\"[luat_so]\", giaHanForm.getCanCuLuat());\r\n\t\t\tif (CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()).equals(\"N/A\")) {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", KtnbUtil.inFieldNull(104) + \";\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[van_ban_quy_dinh]\", CatalogService.getTenDanhMucById(giaHanForm.getVbQdCnNv()));\r\n\t\t\t}\r\n\t\t\tword.put(\"[qdinh_so]\", giaHanForm.getCanCuQd());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tString ngayxet = Formater.date2str(cbQd.getNgayRaQuyetDnh());\r\n\t\t\tString[] arrngayxet = ngayxet.split(\"/\");\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[qd_so]\", cbQd.getSoQuyetDinh());\r\n\t\t\tword.put(\"[ngay_qd]\", \"ng\\u00E0y \" + arrngayxet[0] + \" th\\u00E1ng \" + arrngayxet[1] + \" n\\u0103m \" + arrngayxet[2]);\r\n\t\t\tword.put(\"[thu_truong_cqt]\", KtnbUtil.getTenThuTruongCqtForMauin(appConText));\r\n\t\t\t//word.put(\"[ttkt1]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tword.put(\"[ngay_lv]\", giaHanForm.getSoNgayRaHan());\r\n\t\t\t// tu ngay\r\n\t\t\tString tungay = giaHanForm.getRaHanTuNgay();\r\n\t\t\tString[] arrtungay = tungay.split(\"/\");\r\n\t\t\tword.put(\"[tu_ngay]\", \"ng\\u00E0y \" + arrtungay[0] + \" th\\u00E1ng \" + arrtungay[1] + \" n\\u0103m \" + arrtungay[2]);\r\n\t\t\t// den ngay\r\n\t\t\tString denngay = giaHanForm.getRaHanDenNgay();\r\n\t\t\tString[] arrdenngay = denngay.split(\"/\");\r\n\t\t\tword.put(\"[den_ngay]\", \"ng\\u00E0y \" + arrdenngay[0] + \" th\\u00E1ng \" + arrdenngay[1] + \" n\\u0103m \" + arrdenngay[2]);\r\n\t\t\t//word.put(\"[ttkt]\", hinhThuc);\r\n\t\t\tword.put(\"[dv_dc_ttkt]\", cuocTtkt.getTenDonViBi().toString());\r\n\t\t\tif (Formater.isNull(giaHanForm.getDvCaNhanLq())) {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \"\");\r\n\t\t\t} else {\r\n\t\t\t\tword.put(\"[dv_lien_quan]\", \", \" + giaHanForm.getDvCaNhanLq());\r\n\t\t\t}\r\n\t\t\tword.put(\"[ten_cqt]\", KtnbUtil.getTenCqtCapTrenTt(appConText));\r\n\t\t\tword.put(\"[chuc_danh_thu_truong]\", KtnbUtil.getChucVuThuTruongByMaCqt(appConText.getMaCqt()).toUpperCase());\r\n\t\t\t// if (Formater.isNull(appConText.getTenThuTruong())) {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", \"\");\r\n\t\t\t// } else {\r\n\t\t\t// word.put(\"[ten_thu_truong]\", appConText.getTenThuTruong());\r\n\t\t\t// }\r\n\t\t\tword.saveAndClose();\r\n\t\t\tword.downloadFile(fileOut, \"Mau TTNB11\", \".doc\", reponse);\r\n\t\t} catch (Exception ex) {\r\n\t\t\t// ex.printStackTrace();\r\n\t\t\tSystem.out.println(\"Download Error: \" + ex.getMessage());\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tword.saveAndClose();\r\n\t\t\t} catch (Exception e) {\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void stampaScacchiera(String titolo)\n {\n System.out.println(titolo);\n System.out.println(\"=== Scacchiera \" +DIM_LATO+ \"x\" +DIM_LATO+ \" ===\");\n int r,c;\n for (r=0; r<DIM_LATO; r++)\n {\n for (c=0; c<DIM_LATO; c++) System.out.print(\"--\");\n System.out.println(\"-\");\n for (c=0; c<DIM_LATO; c++)\n {\n switch (contenuto(r,c))\n {\n case PEDINA_BIANCA: System.out.print(\"|b\"); break;\n case PEDINA_NERA: System.out.print(\"|n\"); break; \n case DAMA_BIANCA: System.out.print(\"|B\"); break; \n case DAMA_NERA: System.out.print(\"|N\"); break; \n case VUOTA: System.out.print(\"| \"); break;\n }\n }\n System.out.println(\"|\");\n }\n for (c=0; c<DIM_LATO; c++) System.out.print(\"--\");\n System.out.println(\"-\");\n }", "public void solicitudPisoArriba(int pisoDesde) {\n\t\t\r\n\t\tAscensor ascensorDesignado = null;\r\n\t\tfor (int i=0;i<ascensores.length && ascensorDesignado==null;i++) {\r\n\t\t\tAscensor a = ascensores[i];\r\n\t\t\t\r\n\t\t\tif (a.piso() <= pisoDesde && a.direccion()==Direccion.arriba) {\r\n\t\t\t\tascensorDesignado = a;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (ascensorDesignado==null) {\r\n\t\t\tascensorDesignado = ascensores[0];\r\n\t\t}\r\n\r\n\t\t//msgs(\"solicitudPisoArriba ASIGNADO \" + ascensorDesignado + \" a piso \" + pisoDesde);\r\n\t\tsolicitudAscensor(ascensorDesignado, pisoDesde);\r\n\t}", "Object obtenerPolizasPorFolioSolicitudNoCancelada(int folioSolicitud,String formatoSolicitud);", "public static void crearPartida() throws FileNotFoundException, IOException, ExcepcionesFich {\n\t\tLecturaFicheros.AllLecture(\"C:\\\\Users\\\\Erick\\\\pruebaPOO.txt\");\n\t\tinterfaz = new GUI(0);\t\t\n\t}", "public Arquero(Casillero casillero){\n this.vida = 75;\n this.danioAUnidad = 15;\n this.danioAEdificio = 10;\n ubicacion = new ArrayList<Casillero>();\n this.ubicacion.add(casillero);\n this.rangoAtaque = 3;\n this.estadoAccion = new EstadoDisponible();\n }", "public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }", "public Polipara() {\n // Iniciar el programa cargando el archivo de propiedades si existe.\n\n if (this.validarSerializacion()) {\n int response = JOptionPane.showConfirmDialog(null, \"Hay una versión anterior de una copa,\\n\"\n + \"¿Desea cargar esa versión? (Al seleccionar \\\"No\\\", se eliminará el avance anterior y se cargará una copa nueva.)\");\n if (response == 0) {\n this.cargarSerializacion();\n } else {\n this.iniciarCopa();\n }\n } else {\n this.iniciarCopa();\n }\n }", "public List<String> pntbajas(ReportePlazaDTO reportePlazaDTO) {\n List<CustomOutputFile> lista = new ArrayList<CustomOutputFile>();\n List<String> listaString = new ArrayList<String>();\n\n String qnaCaptura = reportePlazaDTO.getQnaCaptura();\n String qnaCaptura2 = \"\";\n\n if (new Integer(qnaCaptura) % 2 == 0) {\n qnaCaptura2 = String.valueOf((new Integer(qnaCaptura) - 1));\n } else {\n qnaCaptura2 = qnaCaptura;\n }\n\n lista = \n super.persistence().get(QueryTdPlazaDAO.class).findBypotBajas(qnaCaptura, \n qnaCaptura2);\n listaString.add(\"ID del Servidor Público\");\n\n if (lista != null) {\n for (CustomOutputFile row: lista) {\n listaString.add(row.getRegistro());\n }\n } else\n listaString = null;\n return listaString;\n\n }", "public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }", "public void faiBagnetto() {\n System.out.println(\"Scrivere 1 per Bagno lungo, al costo di 150 Tam\\nSeleziona 2 per Bagno corto, al costo di 70 Tam\\nSeleziona 3 per Bide', al costo di 40 Tam\");\n\n switch (creaturaIn.nextInt()) {\n case 1 -> {\n puntiVita += 50;\n puntiFelicita -= 30;\n soldiTam -= 150;\n }\n case 2 -> {\n puntiVita += 30;\n puntiFelicita -= 15;\n soldiTam -= 70;\n }\n case 3 -> {\n puntiVita += 10;\n puntiFelicita -= 5;\n soldiTam -= 40;\n }\n }\n checkStato();\n }", "private void reserveChambre() {\n\t\tfor(Chambre chambre : this.getChambres()) {\n\t\t\tif(chambre.equals(this.chambresVides().get(0))) {\n\t\t\t\tchambre.setReserve(true);\n\t\t\t\tSystem.out.println(\"\\n---------------------------------------\\nVous avez bien réservé cette chambre: |\");\n\t\t\t\tSystem.out.println(chambre.toString());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void finalizarPartida (boolean pVictoria)\n {\n partidaActiva = false;\n\n //Se avisa a los observers que ha finalizado la partida y cual ha sido el resultado\n lObservers.firePropertyChange(\"estadoPartida\", null, pVictoria);\n\n Contador.getContador().parar();\n\n //Si el usuario ha ganado la partida se envían los datos para actualizar el ranking\n if (pVictoria) {\n Ranking.getRanking().addJugadorRanking(dificultad, nombreUsuario);\n\n //Se abre la ventana del ranking\n this.mostrarRanking();\n SFXPlayer.getSFXPlayer().stopBackground();\n SFXPlayer.getSFXPlayer().playSFX(\"victory\");\n }\n\n //Se para y resetea el contador\n Contador.getContador().reset();\n }" ]
[ "0.61669195", "0.591328", "0.5766881", "0.5752663", "0.57018", "0.56666297", "0.56431043", "0.5610741", "0.5608938", "0.55868715", "0.5559272", "0.550493", "0.54883516", "0.5478783", "0.5478292", "0.5472217", "0.54099995", "0.5408864", "0.53842765", "0.53815633", "0.5377952", "0.5364613", "0.5352689", "0.534306", "0.5334076", "0.5314856", "0.5307483", "0.53013134", "0.52981526", "0.52906066", "0.5270544", "0.5270081", "0.52603006", "0.524958", "0.5247959", "0.52197343", "0.5218892", "0.5217089", "0.5214751", "0.5200764", "0.5191269", "0.51868844", "0.5183348", "0.5180517", "0.5176282", "0.51747286", "0.5174267", "0.5174052", "0.5170441", "0.5166959", "0.51603657", "0.51571476", "0.51557326", "0.5150756", "0.5150062", "0.51457775", "0.51246566", "0.5124117", "0.51235193", "0.51135325", "0.510851", "0.50899523", "0.50893265", "0.508674", "0.5086312", "0.5083925", "0.5078743", "0.5075027", "0.50691926", "0.50619453", "0.5057541", "0.50546926", "0.50538355", "0.505361", "0.5045591", "0.5042135", "0.50414824", "0.5040978", "0.5040296", "0.5039947", "0.50393105", "0.5035978", "0.5034028", "0.5031605", "0.50180876", "0.5011784", "0.5004171", "0.5002304", "0.49959376", "0.4980699", "0.4980619", "0.49782416", "0.49769083", "0.49756262", "0.4974953", "0.49729842", "0.49717733", "0.4971269", "0.49672952", "0.49648017", "0.49629563" ]
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { winTransporte = new javax.swing.JDialog(); jPanel2 = new javax.swing.JPanel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); cbo_Fecha_Trans = new datechooser.beans.DateChooserCombo(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); txtMatricula = new javax.swing.JTextField(); txtCosto = new javax.swing.JTextField(); txtKilom = new javax.swing.JTextField(); txtDestino = new javax.swing.JTextField(); txtId = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); btnCancel = new javax.swing.JButton(); btnAceptar = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jToolBar1 = new javax.swing.JToolBar(); btnGuardar = new javax.swing.JButton(); btnEditar = new javax.swing.JButton(); btnEliminar = new javax.swing.JButton(); btnActualizar = new javax.swing.JButton(); btnImprimir = new javax.swing.JButton(); btnClose = new javax.swing.JButton(); escritorio = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); tblTransporte = new javax.swing.JTable(); lblTotal = new javax.swing.JLabel(); jLabel2.setText("Destino"); jLabel3.setText("Id Transporte"); jLabel4.setText("Costo"); jLabel5.setText("Matrucula"); jLabel6.setText("Fecha Transporte"); jLabel7.setText("Kilometros"); txtMatricula.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtMatriculaActionPerformed(evt); } }); txtId.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtIdActionPerformed(evt); } }); jLabel8.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel8.setText("Registro"); btnCancel.setText("Cancelar"); btnCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelActionPerformed(evt); } }); btnAceptar.setText("Aceptar"); btnAceptar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAceptarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(64, 64, 64) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(btnAceptar) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cbo_Fecha_Trans, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtMatricula) .addComponent(txtCosto) .addComponent(txtKilom) .addComponent(txtDestino) .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 155, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnCancel, javax.swing.GroupLayout.Alignment.TRAILING))) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(160, 160, 160) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(95, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtId, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtDestino, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(23, 23, 23) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtKilom, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(14, 14, 14) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCosto, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(15, 15, 15) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtMatricula, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(31, 31, 31) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cbo_Fecha_Trans, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(26, 26, 26) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnCancel) .addComponent(btnAceptar)) .addContainerGap(78, Short.MAX_VALUE)) ); javax.swing.GroupLayout winTransporteLayout = new javax.swing.GroupLayout(winTransporte.getContentPane()); winTransporte.getContentPane().setLayout(winTransporteLayout); winTransporteLayout.setHorizontalGroup( winTransporteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); winTransporteLayout.setVerticalGroup( winTransporteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); jToolBar1.setRollover(true); btnGuardar.setText("Guardar"); btnGuardar.setFocusable(false); btnGuardar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnGuardar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnGuardar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnGuardarActionPerformed(evt); } }); jToolBar1.add(btnGuardar); btnEditar.setText("Editar"); btnEditar.setFocusable(false); btnEditar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnEditar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnEditar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditarActionPerformed(evt); } }); jToolBar1.add(btnEditar); btnEliminar.setText("Eliminar"); btnEliminar.setFocusable(false); btnEliminar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnEliminar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnEliminar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEliminarActionPerformed(evt); } }); jToolBar1.add(btnEliminar); btnActualizar.setText("Actualizar"); btnActualizar.setFocusable(false); btnActualizar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnActualizar.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnActualizar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnActualizarActionPerformed(evt); } }); jToolBar1.add(btnActualizar); btnImprimir.setText("Imprimir"); btnImprimir.setFocusable(false); btnImprimir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnImprimir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnImprimir.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnImprimirActionPerformed(evt); } }); jToolBar1.add(btnImprimir); btnClose.setText("Cerrar"); btnClose.setFocusable(false); btnClose.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btnClose.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); btnClose.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCloseActionPerformed(evt); } }); jToolBar1.add(btnClose); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 619, javax.swing.GroupLayout.PREFERRED_SIZE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); tblTransporte.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Id Trasporte", "Destino", "Costo", "Matricula", "Fecha Trasporte" } )); jScrollPane1.setViewportView(tblTransporte); lblTotal.setText("Total: 0"); javax.swing.GroupLayout escritorioLayout = new javax.swing.GroupLayout(escritorio); escritorio.setLayout(escritorioLayout); escritorioLayout.setHorizontalGroup( escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, escritorioLayout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane1) .addContainerGap()) .addGroup(escritorioLayout.createSequentialGroup() .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); escritorioLayout.setVerticalGroup( escritorioLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(escritorioLayout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 277, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 26, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(escritorio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(escritorio, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public quotaGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public Oddeven() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public FrmMenu() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public JFFornecedores() {\n initComponents();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }", "public frmAddIncidencias() {\n initComponents();\n }" ]
[ "0.73192346", "0.7290526", "0.7290526", "0.7290526", "0.7285891", "0.72480357", "0.7213616", "0.7207808", "0.71955067", "0.71891475", "0.71844363", "0.7159038", "0.71474695", "0.7092269", "0.7079923", "0.70560205", "0.69864315", "0.697697", "0.69552195", "0.6953691", "0.69458604", "0.6942849", "0.6935743", "0.6930747", "0.69286084", "0.6924837", "0.69246644", "0.6911876", "0.69103247", "0.68922365", "0.6891582", "0.68904996", "0.68901706", "0.6888661", "0.68829393", "0.6881672", "0.6880505", "0.68782157", "0.6875765", "0.6874406", "0.68711114", "0.6859388", "0.6856025", "0.68551815", "0.6855079", "0.6855076", "0.68530315", "0.68524104", "0.68524104", "0.6843717", "0.68364704", "0.6836458", "0.6828335", "0.68279964", "0.6826276", "0.68240345", "0.6823631", "0.68171996", "0.6816324", "0.68097955", "0.68088883", "0.68078303", "0.6807776", "0.680721", "0.680251", "0.6795605", "0.6794452", "0.67921954", "0.67907083", "0.678904", "0.6787817", "0.6787755", "0.67814714", "0.67663145", "0.6765024", "0.67649895", "0.6756559", "0.6754775", "0.6751848", "0.67506975", "0.67435455", "0.6738591", "0.6737042", "0.6735227", "0.6732907", "0.6726301", "0.6726003", "0.67197675", "0.67156976", "0.6714806", "0.6713657", "0.6708582", "0.67078584", "0.6705488", "0.6700733", "0.6699659", "0.6698679", "0.66974026", "0.6693979", "0.66902804", "0.6690275" ]
0.0
-1
End of variables declaration//GENEND:variables
private void limpiarCampos(){ txtId.setText(""); txtCosto.setText(""); txtDestino.setText(""); txtKilom.setText(""); txtMatricula.setText(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void assignment() {\n\n\t\t\t}", "private void kk12() {\n\n\t}", "public void gored() {\n\t\t\n\t}", "public void mo21779D() {\n }", "@Override\n public void func_104112_b() {\n \n }", "public final void mo51373a() {\n }", "protected boolean func_70041_e_() { return false; }", "public void mo4359a() {\n }", "public void mo21782G() {\n }", "private void m50366E() {\n }", "public void mo12930a() {\n }", "public void mo115190b() {\n }", "public void method_4270() {}", "public void mo1403c() {\n }", "public void mo3376r() {\n }", "public void mo3749d() {\n }", "public void mo21793R() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo21787L() {\n }", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo21780E() {\n }", "public void mo21792Q() {\n }", "public void mo21791P() {\n }", "public void mo12628c() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "public void mo97908d() {\n }", "public void mo21878t() {\n }", "public void mo9848a() {\n }", "public void mo21825b() {\n }", "public void mo23813b() {\n }", "public void mo3370l() {\n }", "public void mo21879u() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo21785J() {\n }", "public void mo21795T() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void m23075a() {\n }", "public void mo21789N() {\n }", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo21794S() {\n }", "public final void mo12688e_() {\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "public void mo6944a() {\n }", "public static void listing5_14() {\n }", "public final void mo91715d() {\n }", "public void mo1405e() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo9137b() {\n }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public void func_70295_k_() {}", "void mo57277b();", "public void mo21877s() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void Tyre() {\n\t\t\r\n\t}", "void berechneFlaeche() {\n\t}", "public void mo115188a() {\n }", "public void mo21880v() {\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public void mo21784I() {\n }", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "public void mo56167c() {\n }", "public void mo44053a() {\n }", "public void mo21781F() {\n }", "public void mo2740a() {\n }", "public void mo21783H() {\n }", "public void mo1531a() {\n }", "double defendre();", "private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }", "public void stg() {\n\n\t}", "void m1864a() {\r\n }", "private void poetries() {\n\n\t}", "public void skystonePos4() {\n }", "public void mo2471e() {\n }", "private void yy() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }", "static void feladat4() {\n\t}", "@Override\n\tpublic void verkaufen() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }", "public void furyo ()\t{\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "protected void mo6255a() {\n }" ]
[ "0.63615173", "0.6281746", "0.61903405", "0.60961616", "0.6093657", "0.60717505", "0.60532993", "0.6052408", "0.6004846", "0.5988544", "0.5972297", "0.596838", "0.59683335", "0.5966663", "0.5962469", "0.59415865", "0.5909242", "0.58975977", "0.5891806", "0.58837473", "0.5879874", "0.5854533", "0.58518475", "0.5851649", "0.5842805", "0.58401376", "0.58360773", "0.58236176", "0.58097124", "0.5803588", "0.57948536", "0.578661", "0.5784314", "0.5784258", "0.5782948", "0.57760525", "0.57626706", "0.57585657", "0.574631", "0.5743756", "0.57346207", "0.57346207", "0.57346207", "0.57346207", "0.57346207", "0.57346207", "0.57346207", "0.5733534", "0.5730636", "0.572607", "0.5723889", "0.5718552", "0.5705557", "0.5700238", "0.56981224", "0.56910896", "0.56886435", "0.5688384", "0.567536", "0.5662277", "0.5652377", "0.56452495", "0.5643817", "0.5643116", "0.56417453", "0.5641388", "0.56321377", "0.56304944", "0.5629054", "0.56224847", "0.5619116", "0.56143737", "0.561299", "0.5611894", "0.5606912", "0.56038845", "0.5603016", "0.56007785", "0.5592362", "0.55855376", "0.5577249", "0.55719876", "0.55693316", "0.55578834", "0.555347", "0.5551844", "0.554936", "0.554819", "0.5547509", "0.5546215", "0.5546181", "0.5544751", "0.5543266", "0.55426043", "0.5540581", "0.55369", "0.5528463", "0.55245715", "0.55166906", "0.55036914", "0.5503229" ]
0.0
-1
Creates new form AdminAgentMeny
public AdminAgentMeny() { initComponents(); jPanelRegAgent.setVisible(false); jPanelDelAgent.setVisible(false); jPanelAlterAgent.setVisible(false); jPanelMerInställningar.setVisible(false); try { idb = new InfDB("mibdb", "3306", "mibdba", "mibkey"); } catch (InfException ettUndantag) { JOptionPane.showMessageDialog(null, "Något gick fel" + ettUndantag); } fetchComboBox(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/showNewDeliveryManForm\")\n\tpublic String showNewDeliveryManForm(Model model){\n\t\tDeliveryMan dm = new DeliveryMan();\n\t\tmodel.addAttribute(\"deliveryMan\",dm);\n\t\tmodel.addAttribute(\"cities\", City.values());\n\t\treturn \"new_deliveryMan\";\n\t}", "public Result addNewRoomType() {\n\n DynamicForm dynamicform = Form.form().bindFromRequest();\n if (dynamicform.get(\"AdminAddRoom\") != null) {\n\n return ok(views.html.AddRoomType.render());\n }\n\n\n return ok(\"Something went wrong\");\n }", "@Command\n\tpublic void nuevoAnalista(){\n\t\tMap<String, Object> parametros = new HashMap<String, Object>();\n\n\t\t//parametros.put(\"recordMode\", \"NEW\");\n\t\tllamarFormulario(\"formularioAnalistas.zul\", null);\n\t}", "public String actionCreateNew() {\r\n \t\tsetBook(new Book());\r\n \t\treturn \"new\";\r\n \t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tADMLE.Admin_DDL_Create();\n\t\t\t\tADML.setVisible(false);\n\t\t\t}", "public void addNewAnimalAction() {\n\t\tAnimalModel newAnimalModel = new AnimalModel(\"\", \"\");\n\n\t\teditAnimalDetail(newAnimalModel, AnimalDetailPanel.NEW_ANIMAL);\n\t}", "@RequestMapping(params = \"new\", method = RequestMethod.GET)\n\t@PreAuthorize(\"hasRole('ADMIN')\")\n\tpublic String createProductForm(Model model) { \t\n \t\n\t\t//Security information\n\t\tmodel.addAttribute(\"admin\",security.isAdmin()); \n\t\tmodel.addAttribute(\"loggedUser\", security.getLoggedInUser());\n\t\t\n\t model.addAttribute(\"product\", new Product());\n\t return \"products/newProduct\";\n\t}", "@RequestMapping(value = \"/new\", method = RequestMethod.GET)\n public String newRole(Model model) {\n model.addAttribute(\"roleCreate\", new CreateRoleDTO());\n return (WebUrls.URL_ROLE+\"/new\");\n }", "public Agent createNewAgent() throws MaceException{\r\n\t\tAgent agent = new Agent(\"n\" + maxAgentId, Agent.AGENT_BUYER);\r\n\t\taddAgent(agent);\r\n\t\tmaxAgentId++;\r\n\t\treturn agent;\r\n\t}", "@GetMapping(value = \"/create\") // https://localhost:8080/etiquetasTipoDisenio/create\n\tpublic String create(Model model) {\n\t\tetiquetasTipoDisenio etiquetasTipoDisenio = new etiquetasTipoDisenio();\n\t\tmodel.addAttribute(\"title\", \"Registro de una nuev entrega\");\n\t\tmodel.addAttribute(\"etiquetasTipoDisenio\", etiquetasTipoDisenio); // similar al ViewBag\n\t\treturn \"etiquetasTipoDisenio/form\"; // la ubicacion de la vista\n\t}", "@RequestMapping(value = \"/create\", method = RequestMethod.GET)\n public String create(Model model) {\n model.addAttribute(\"roles\", getAllRoles());\n return \"object/create\";\n }", "public void registrarMateria() {\n materia.setIdDepartamento(departamento);\n ejbFacade.create(materia);\n RequestContext requestContext = RequestContext.getCurrentInstance();\n requestContext.execute(\"PF('MateriaCreateDialog').hide()\");\n items = ejbFacade.findAll();\n departamento = new Departamento();\n materia = new Materia();\n\n FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, \"Información\", \"La materia se registró con éxito\");\n FacesContext.getCurrentInstance().addMessage(null, msg);\n requestContext.update(\"msg\");//Actualiza la etiqueta growl para que el mensaje pueda ser mostrado\n\n requestContext.update(\"MateriaListForm\");\n requestContext.update(\"MateriaCreateForm\");\n }", "@GetMapping(\"/directorForm\")\n public String addDirectors(Model model) {\n\n model.addAttribute(\"newDirector\", new Director());\n return \"directorForm\";\n }", "@RequestMapping(value = { \"/new\"}, method = RequestMethod.GET)\n\tpublic String newEntity(ModelMap model) {\n\t\tENTITY entity = createEntity();\n\n\t\tmodel.addAttribute(\"entity\", entity);\n\t\tmodel.addAttribute(\"edit\", false);\n\t\tmodel.addAttribute(\"loggedinuser\", getPrincipal());\n\t\treturn viewBaseLocation + \"/form\";\n\t}", "@Override\n public void buttonClick(ClickEvent event) {\n \n \ttry {\n\t\t\t\t\tUI.getCurrent().getNavigator().addView(_nombreSeccion + \"Adm/\" + _titulo.getCaption(), new AdministradorClase(new Lista_Mensaje_V_Administrador(it.getIdTema())));\n\t\t\t\t} catch (PersistentException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tUI.getCurrent().getNavigator().navigateTo(_nombreSeccion+ \"Adm/\" + _titulo.getCaption());\n \t\n \t\n }", "public void prepareAgent(Agent agent) {\n\t\t\t\tRole userRole = new Role();\n\t\t\t\tuserRole.role = Roles.AGENT;\n\t\t\t\tuserRole.user = agent.user;\n\t\t\t\tagent.user.roles.add(userRole);\n\t\t\t\tEbean.save(userRole);\n\t\t\t\tLOG.info(\"Adding role as an agent\");\n\t\t\t\tuserDao.save(agent.user);\n\t\t\t\tagent.form.status = FormStatus.PAID;\n\t\t}", "@Override\n public ResultMessage createNewAdmin(NewAdminCommand command) {\n String currentAdmin = command.getCurrentAdmin();\n if (!adminDao.hasHighestAuthority(currentAdmin))\n return ResultMessage.failure(\"Permission denied\");\n\n // Permission passed\n if (adminDao.addAdmin(command.getNewAdminName(),\n encryptor.encrypt(command.getPassword(), command.getNewAdminName()))) {\n log.info(\"New administrator is created successfully\");\n return ResultMessage.success();\n }\n\n return ResultMessage.failure();\n }", "public Result createRoom() {\n\n DynamicForm dynamicForm = Form.form().bindFromRequest();\n String roomType = dynamicForm.get(\"roomType\");\n Double price = Double.parseDouble(dynamicForm.get(\"price\"));\n int bedCount = Integer.parseInt(dynamicForm.get(\"beds\"));\n String wifi = dynamicForm.get(\"wifi\");\n String smoking = dynamicForm.get(\"smoking\");\n\n RoomType roomTypeObj = new RoomType(roomType, price, bedCount, wifi, smoking);\n\n if (dynamicForm.get(\"AddRoomType\") != null) {\n\n Ebean.save(roomTypeObj);\n String message = \"New Room type is created Successfully\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n } else{\n\n String message = \"Failed to create a new Room type\";\n\n return ok(views.html.RoomTypeUpdateSuccess.render(message));\n\n }\n\n\n\n }", "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationForm = new AssessmentCreationForm();\n creationForm.fillAssessmentInformation(new User(Roles.STAFF), assm);\n\n return new AssessmentCreationForm();\n }", "@RequestMapping(value = \"/report.create\", method = RequestMethod.GET)\n @ResponseBody public ModelAndView newreportForm(HttpSession session) throws Exception {\n ModelAndView mav = new ModelAndView();\n mav.setViewName(\"/sysAdmin/reports/details\");\n\n //Create a new blank provider.\n reports report = new reports();\n \n mav.addObject(\"btnValue\", \"Create\");\n mav.addObject(\"reportdetails\", report);\n\n return mav;\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n staff.setID(regID.getText());\n staff.setPassword(regPwd.getText());\n staff.setPosition(regPos.getSelectedItem().toString());\n staff.setGender(regGender.getSelectedItem().toString());\n staff.setEmail(regEmail.getText());\n staff.setPhoneNo(regPhone.getText());\n staff.addStaff();\n if (staff.getPosition().equals(\"Vet\")) {\n Vet vet = new Vet();\n vet.setExpertise(regExp.getSelectedItem().toString());\n vet.setExpertise_2(regExp2.getSelectedItem().toString());\n vet.addExpertise(staff.getID());\n }\n JOptionPane.showMessageDialog(null, \"User added to database\");\n updateJTable();\n }", "public void create(ActionEvent actionEvent) {\n String grName = groupName.getText();\n ObservableList memList = addList.getCheckModel().getCheckedItems();\n\n if (memList == null) return;\n\n String memName = \"\";\n for (Object obj : memList ) {\n memName += obj.toString() + \"\\n\";\n }\n if (memName != \"\") {\n sender.requestNewGroup(grName, memName);\n chatUIController.newGr(grName);\n }\n return;\n }", "public void CrearNew(ActionEvent e) {\n List<Pensum> R = ejbFacade.existePensumID(super.getSelected().getIdpensum());\n if(R.isEmpty()){\n super.saveNew(e);\n }else{\n new Auxiliares().setMsj(3,\"PENSUM ID YA EXISTE\");\n }\n }", "public void createAgent(ConfigDialogInfo info) {\n configDialogInfo = info;\n createAgent = true;\n }", "@GetMapping(\"/students/new\")\r\n\tpublic String createStudentForm(Model model) {\n\t\tStudent student =new Student();\r\n\t\tmodel.addAttribute(\"student\",student);\r\n\t\treturn \"create_student\";\r\n\t}", "public void createAd(/*Should be a form*/){\n Ad ad = new Ad();\n User owner = this.user;\n Vehicle vehicle = this.vehicle;\n String \n// //ADICIONAR\n ad.setOwner();\n ad.setVehicle();\n ad.setDescription();\n ad.setPics();\n ad.setMain_pic();\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Empregados m1= new Menu_Empregados();\r\n \r\n }", "public void createAgendamento() {\n\n if (tbagendamento.getTmdataagendamento().after(TimeControl.getDateIni())) {\n if (agendamentoLogic.createTbagendamento(tbagendamento)) {\n AbstractFacesContextUtils.redirectPage(PagesUrl.URL_AGENDAMENTO_LIST);\n AbstractFacesContextUtils.addMessageInfo(\"Agendamento cadastrado com sucesso.\");\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"Falhar ao realizado cadastro do agendamento.\");\n }\n } else {\n AbstractFacesContextUtils.addMessageWarn(\"verifique se a data de agendamento esta correta.\");\n }\n }", "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "@Command\n public void nuevaMateria() {\n\t\t\n\t\tWindow window = (Window)Executions.createComponents(\n \"/WEB-INF/include/Mantenimiento/Materias/vtnMaterias.zul\", null, null);\n window.doModal();\n }", "public void createMenu() {\n deleteMenuGroupError = false;\n createMenuGroupError = true;\n if (menu.createMenu()) {\n updateMenuError = false;\n deleteMenuError = false;\n createMenuError = true;\n } else {\n createMenuError = false;\n }\n }", "@FXML\n\tvoid createAdministratorAccount(ActionEvent event) throws IOException,Exception {\n\t\tString adEmail = emailAdmin.getText();\n\t\tString adPassword = passwordAdmin.getText(); \n\t\t\n\t\tif(adEmail.isBlank()) {\n\t\t\tInfoBox.infoBoxW(\"A valid email must be provided\",\"Missing email\",\"Missing information\");\n\t\t}else {\n\t\t\tif(adPassword.isBlank()) {\n\t\t\t\tInfoBox.infoBoxW(\"A valid password must be provided\",\"Missing password\",\"Missing information\");\n\t\t\t}else {\n\t\t\t\tif(!adEmail.matches(\"^([a-zA-Z0-9_\\\\-\\\\.]+)@([a-zA-Z0-9_\\\\-\\\\.]+)\\\\.([a-zA-Z]{2,5})$\")) {\n\t\t\t\t\tInfoBox.infoBoxW(\"An email with valid syntax expected\",\"Email syntax invalid\",\"Invalid syntax\");\n\t\t\t\t}else {\n\t\t\t\t\tif(!adPassword.matches(\"([a-z]|[A-Z]|[0-9])*\")){\n\t\t\t\t\t\tInfoBox.infoBoxW(\"A password with valid syntax expected\",\"Password syntax invalid\",\"Invalid syntax\");\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tUserFacade uf = new UserFacade();\n\t\t\t\t\t\tboolean isDone = uf.registerAdministrator(adEmail, HashPassword.hashPassword(adPassword));\n\t\t\t\t\t\tif(isDone) {\n\t\t\t\t\t\t\tInfoBox.infoBoxI(\"Admin created\", \"Admin created\", \"Admin Created\");\n\t\t\t\t\t\t\tTheWerewolvesOfMillersHollow.setScene(getClass().getResource(\"../view/AdministratorMenuView.fxml\"));\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tInfoBox.infoBoxE(\"Creation failed, retry later\",\"Creation failed\",\"Creation Error\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void mmCreateClick(ActionEvent event) throws Exception{\r\n displayCreateProfile();\r\n }", "public String nuevo() {\n\n\t\tLOG.info(\"Submitado formulario, accion nuevo\");\n\t\tString view = \"/alumno/form\";\n\n\t\t// las validaciones son correctas, por lo cual los datos del formulario estan en\n\t\t// el atributo alumno\n\n\t\t// TODO simular index de la bbdd\n\t\tint id = this.alumnos.size();\n\t\tthis.alumno.setId(id);\n\n\t\tLOG.debug(\"alumno: \" + this.alumno);\n\n\t\t// TODO comprobar edad y fecha\n\n\t\talumnos.add(alumno);\n\t\tview = VIEW_LISTADO;\n\t\tmockAlumno();\n\n\t\t// mensaje flash\n\t\tFacesContext facesContext = FacesContext.getCurrentInstance();\n\t\tExternalContext externalContext = facesContext.getExternalContext();\n\t\texternalContext.getFlash().put(\"alertTipo\", \"success\");\n\t\texternalContext.getFlash().put(\"alertMensaje\", \"Alumno \" + this.alumno.getNombre() + \" creado con exito\");\n\n\t\treturn view + \"?faces-redirect=true\";\n\t}", "@GetMapping(\"/cliente/new\")\n\tpublic String newCliente(Model model) {\n\t\tmodel.addAttribute(\"cliente\", new Cliente());\n\t\tControllerHelper.setEditMode(model, false);\n\t\t\n\t\t\n\t\treturn \"cadastro-cliente\";\n\t\t\n\t}", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public void clickCreate() {\n\t\tbtnCreate.click();\n\t}", "public int create(Esysmeudef menu);", "public void addAgent(String name)\r\n {\n \r\n }", "private void jBtnKerjaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnKerjaActionPerformed\n if(roles.equals(\"employeer\") || roles.equals(\"admin\")){\n// TAMBAH KERJA UNTUK ADMIN HRD\n TambahLowonganForm lf;\n lf = new TambahLowonganForm();\n lf.setVisible(true);\n }else{\n// CARI KERJA UNTUK ADMIN HRD\n try {\n LamarForm join;\n join = new LamarForm();\n join.setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n } \n }\n \n \n }", "@Override\n\tpublic void create() {\n\t\tAssets.load();\n\t\t\n\t\t//creo pantallas y cargo por defecto menuPrincipal\n\t\tscreenJuego = new JuegoScreen(this);\n\t\tmenuPrincipal = new MenuPrincipal(this);\n\t\tsetScreen(menuPrincipal);\n\t}", "public Frame_Ajouter_Administrateur() {\n initComponents();\n }", "public void createActionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\n\t}", "@RequestMapping(\"Home1\")\r\n\tpublic String createUser1(Model m) \r\n\t{\n\t\tm.addAttribute(\"employee\",new Employee());\r\n\t\treturn \"register\";//register.jsp==form action=register\r\n\t}", "@GetMapping(\"/showNewEmpForm\")\n\tpublic String showNewEmpForm(Model model) {\n\t\tEmployees employee = new Employees();\n\t\tmodel.addAttribute(\"employee\", employee);\n\t\treturn \"new_employee\";\n\t}", "@RequestMapping(value = { \"/newModule\" }, method = RequestMethod.GET)\n\t\tpublic String newModule(ModelMap model) {\n\t\t\tModule module = new Module();\n\t\t\tmodel.addAttribute(\"module\", module);\n\t\t\tmodel.addAttribute(\"edit\", false);\n\t\t\t\n\t\t\treturn \"addNewModule\";\n\t\t}", "public frmAdministracion() {\n initComponents();\n skin();\n DaoAdministracion da = new DaoAdministracion();\n da.setAdministracion(txtMedioAdministracion.getText());\n tblAdministracion.setModel(da.listar());\n\n }", "@RequestMapping(\"/book/new\")\n public String newBook(Model model){\n model.addAttribute(\"book\", new Book ());\n return \"bookform\";\n }", "public void crearPersonaje(ActionEvent event) {\r\n\r\n\t\tthis.personaje.setAspecto(url);\r\n\r\n\t\tDatabaseOperaciones.guardarPersonaje(stats, personaje);\r\n\r\n\t\tvisualizaPersonajes();\r\n\t}", "public CrearGrupoDeContactosMenuActionListener() {\n }", "@GetMapping(\"/restaurante/new\")\n\tpublic String newRestaurante(Model model) {\n\t\tmodel.addAttribute(\"restaurante\", new Restaurante());\n\t\tControllerHelper.setEditMode(model, false);\n\t\tControllerHelper.addCategoriasToRequest(categoriaRestauranteRepository, model);\n\t\t\n\t\treturn \"restaurante-cadastro\";\n\t\t\n\t}", "IFormManager createFormManagerForMenu(IForm menu);", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public void actionPerformed(ActionEvent event) {\n try {\n anEmplist.add(new Manager(nameField.getText(),\n Double.parseDouble(salaryField.getText()),\n Double.parseDouble(bonusField.getText())));\n System.out.println(\"New manager successfully added.\");\n frame.dispose();\n }\n catch (Exception e) {\n System.out.println(\"Unable to add Employee. Please make\"\n + \" sure that all fields are filled out with valid\"\n + \" input.\");\n frame.dispose();\n }\n }", "private static void createAdmin(SecurityService service,\n\t\t\tString securityDomainId, Actor requestingActor, Actor adminActor,\n\t\t\tString groupId) {\n\t\tBooleanResultResponse boolResp = service.createAceActionByActorIdByRoleId(securityDomainId, adminActor, \"USRGADM\", groupId, requestingActor);\n\t\tSystem.out.println(\"after inserting admins>>>>\" + boolResp);\n\t}", "private void jBtnLamarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jBtnLamarActionPerformed\n if(roles.equals(\"employeer\") || roles.equals(\"admin\")){\n// LIHAT PELAMAR UNTUK ADMIN HRD\n try {\n LamarForm join;\n join = new LamarForm();\n join.setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n } \n }else{\n// LIHAT LAMARANKU UNTUK JOBSEEKER\n \n try {\n Lamaranku lm = new Lamaranku();\n lm.setVisible(true);\n } catch (SQLException ex) {\n Logger.getLogger(Dashboard.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }\n \n \n }", "private void createMenu(){\n\n JMenuBar mbar = new JMenuBar();\n setJMenuBar(mbar);\n JMenu Opcje = new JMenu(\"Opcje\");\n mbar.add(Opcje);\n JMenuItem Ustawienia = new JMenuItem(\"Ustawienia\");\n /** Obsluga zdarzen wcisniecia przycisku ustawien w menu */\n Ustawienia.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n if(Justawienia==null)\n Justawienia =new JUstawienia();\n Justawienia.setVisible(true);\n if (controller.timer!=null)\n controller.timer.stop();\n }\n });\n Opcje.add(Ustawienia);\n Opcje.addSeparator();\n JMenuItem Info = new JMenuItem(\"Info\");\n /** Obsluga zdarzen wcisniecia przycisku info w menu */\n Info.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n controller.WyswietlInfo();\n }\n });\n Opcje.add(Info);\n }", "@Override\r\n\t\tpublic void onClick(ClickEvent event) {\n\t\t\tRootPanel.get(\"details\").clear();\r\n\t\t\thome = new AdminDashboardForm();\r\n\t\t\tRootPanel.get(\"details\").add(home);\r\n\t\t}", "public static void create(Formulario form){\n daoFormulario.create(form);\n }", "public NewItemDlg(Bundle args) {\n this.setArguments(args);}", "@GetMapping( value = {\"/add\"} )\n public String roleAddFrom(Model model) {\n model.addAttribute(\"addStatus\", true);\n model.addAttribute(\"role\", new Role());\n return \"role/addRole\";\n }", "public void createNewTeam(ActionEvent actionEvent) throws IOException {\n createTeamPane.setDisable(false);\n createTeamPane.setVisible(true);\n darkPane.setDisable(false);\n darkPane.setVisible(true);\n\n teamNameCreateField.setText(\"\");\n abbrevationCreateField.setText(\"\");\n chooseCityBoxCreate.getSelectionModel().clearSelection();\n chooseLeagueBoxCreate.getSelectionModel().clearSelection();\n chooseAgeGroupCreate.getSelectionModel().clearSelection();\n chooseLeagueTeamBoxCreate.getSelectionModel().clearSelection();\n\n chooseLeagueBoxCreate.setDisable(true);\n chooseLeagueTeamBoxCreate.setDisable(true);\n }", "@GetMapping(\"/students/new\")\n\tpublic String createStudentForm(Model model) throws ParseException\n\t{\n\t\t\n\t\tStudent student=new Student(); //To hold form Data.\n\t\t\n\t\tmodel.addAttribute(\"student\",student);\n\t\t\n\t\t// go to create_student.html page\n\t\treturn \"create_student\";\n\t}", "public newRelationship() {\n initComponents();\n }", "FORM createFORM();", "public Form getCreationForm() throws ProcessManagerException {\r\n try {\r\n Action creation = processModel.getCreateAction();\r\n return processModel.getPublicationForm(creation.getName(), currentRole,\r\n getLanguage());\r\n } catch (WorkflowException e) {\r\n throw new ProcessManagerException(\"SessionController\",\r\n \"processManager.ERR_NO_CREATION_FORM\", e);\r\n }\r\n }", "public Administrator() {\n // no-agrs constructor (ham dung khong tham so)\n }", "public void buildAndShowMenuForm() {\n SimpleForm.Builder builder =\n SimpleForm.builder()\n .translator(MinecraftLocale::getLocaleString, session.locale())\n .title(\"gui.advancements\");\n\n List<String> rootAdvancementIds = new ArrayList<>();\n for (Map.Entry<String, GeyserAdvancement> advancement : storedAdvancements.entrySet()) {\n if (advancement.getValue().getParentId() == null) { // No parent means this is a root advancement\n builder.button(MessageTranslator.convertMessage(advancement.getValue().getDisplayData().getTitle(), session.locale()));\n rootAdvancementIds.add(advancement.getKey());\n }\n }\n\n if (rootAdvancementIds.isEmpty()) {\n builder.content(\"advancements.empty\");\n }\n\n builder.validResultHandler((response) -> {\n String id = rootAdvancementIds.get(response.clickedButtonId());\n if (!id.equals(\"\")) {\n if (id.equals(currentAdvancementCategoryId)) {\n // The server thinks we are already on this tab\n buildAndShowListForm();\n } else {\n // Send a packet indicating that we intend to open this particular advancement window\n ServerboundSeenAdvancementsPacket packet = new ServerboundSeenAdvancementsPacket(id);\n session.sendDownstreamPacket(packet);\n // Wait for a response there\n }\n }\n });\n\n session.sendForm(builder);\n }", "@FXML\n\tprivate void createGroup(ActionEvent event){\n\t\tif(subgroup_menu.getValue().equals(\"--- INGEN ---\")){\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tdb.setGroup(GroupName_field.getText(), findInvited());\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t//-------This kicks in if a user chose a group in the dropdown menu-----\\\\\n\t\t} else {\n\t\t\tif(GroupName_field.getText().equals(\"\")){\n\t\t\t\tmakeDialog(\"Du må gi gruppen et navn.\");\n\t\t\t} else {\n\t\t\t\tDatabaseInterface db = new DatabaseInterface();\n\t\t\t\tString supergroup_name = (String) subgroup_menu.getValue();\n\t\t\t\tint SubGroupId = db.setGroup(GroupName_field.getText(), findInvited()).getGroup_id();\n\t\t\t\tint SuperGroupId = getSupergroupID(supergroup_name);\n\t\t\t\tdb.setSubGroup(SuperGroupId, SubGroupId);\n\t\t\t\tStage stage = (Stage) create_btn.getScene().getWindow();\n\t\t\t stage.close();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@RequestMapping(value={\"/projects/add\"}, method= RequestMethod.GET)\r\n\tpublic String createProjectForm(Model model) {\r\n\t\tUser loggedUser= sessionData.getLoggedUser();\r\n\t\tmodel.addAttribute(\"loggedUser\", loggedUser);\r\n\t\tmodel.addAttribute(\"projectForm\", new Project());\r\n\t\treturn \"addProject\";\r\n\t}", "public void saveAndCreateNew() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"saveAndCreateNewButton\").click();\n\t}", "public PDMRelationshipForm() {\r\n initComponents();\r\n }", "public void actionPerformed(ActionEvent e) {\n \t\t\t\tscreen.setScene(new CreateAccount(screen));\n \t\t\t}", "public AdministradorView() {\n initComponents();\n }", "@Transactional\r\n\tpublic void newAgente(List listaAgentes)\r\n\t{\r\n\t\tfor (Object entiy : listaAgentes) {\r\n\t\t\tresAgenteDAO.newAgente(entiy);\r\n\t\t}\r\n\t}", "@GetMapping(\"/ninjas/new\")\n\tpublic String newNinja(@ModelAttribute(\"ninja\") Ninja ninja, Model model) {\n\t\tmodel.addAttribute(\"dojos\", dojoService.allDojos());\n\t\treturn \"newninja.jsp\";\n\t}", "public void add_admin(String admin_id, String admin_name, String admin_address, String admin_designation,\n\t\t\t double salary, String contact, boolean status_vacancy, String password,String admin_project_key)\n {\n\t\t\n \tadm_list.insert(new Admin(admin_id,admin_name,admin_address,admin_designation, salary,contact,status_vacancy,password,admin_project_key));\n \twrite_adm_file();\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\n\n\t\t\t\t\tString nomSaisi = txtNomPersonnel.getText();\n\t\t\t\t\tString motDePasseSaisi = txtMotDePassePersonnel.getText();\n\t\t\t\t\tString roleChoisi = comboRoles.getSelectedItem().toString();\n\n\t\t\t\t\tif (!nomSaisi.isEmpty() && !motDePasseSaisi.isEmpty() && !roleChoisi.isEmpty()) {\n\t\t\t\t\t\t//ajout d'un nouveau personnel dans la bdd\n\t\t\t\t\t\tPersonnelMger.getInstance().addPersonnel(nomSaisi, motDePasseSaisi, roleChoisi);\n\t\t\t\t\t\t//fermer la boite de dialogue\n\t\t\t\t\t\tNewPersonnelDialog.this.setVisible(false);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e1) {\n\t\t\t\t\talert.showMessageDialog(null, \"Cet identifiant existe déjà !\", \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tCoachManagement coachManagement = new CoachManagement();\n\t\t\t\tcoachManagement.setModal(true);\n\t\t\t\tcoachManagement.setVisible(true);\n\t\t\t}", "RentalAgency createRentalAgency();", "@GetMapping(\"/showFormForAddRoom\")\r\n\tpublic String showFormForAddRoom(Model theModel) {\n\t\tRoom theRoom = new Room();\r\n\t\t\r\n\t\ttheModel.addAttribute(\"room\", theRoom);\r\n\t\t\r\n\t\treturn \"/rooms/room-form\";\r\n\t}", "@Create\n public void create()\n {\n \n log.debug(\"Creating users and mailboxes\");\n //MailboxService ms = MMJMXUtil.getMBean(\"meldware.mail:type=MailboxManager,name=MailboxManager\", MailboxService.class);\n AdminTool at = MMJMXUtil.getMBean(\"meldware.mail:type=MailServices,name=AdminTool\", AdminTool.class);\n \n for (MeldwareUser meldwareUser : getUsers())\n {\n at.createUser(meldwareUser.getUsername(), meldwareUser.getPassword(), meldwareUser.getRoles());\n // TODO This won't work on AS 4.2\n /*Mailbox mbox = ms.createMailbox(meldwareUser.getUsername());\n for (String alias : meldwareUser.getAliases())\n {\n ms.createAlias(mbox.getId(), alias);\n }*/\n log.debug(\"Created #0 #1 #2\", meldwareUser.isAdministrator() ? \"administrator\" : \"user\", meldwareUser.getUsername(), meldwareUser.getAliases() == null || meldwareUser.getAliases().size() == 0 ? \"\" : \"with aliases \" + meldwareUser.getAliases());\n }\n }", "@RequestMapping(\"/recipe/new\")\n public String newRecipe(Model model){\n model.addAttribute(\"recipe\", new RecipeCommand());\n \n return \"recipe/recipeForm\";\n }", "@Override\r\n public void actionPerformed(ActionEvent e) {\n Menu_Contabilidade m3= new Menu_Contabilidade();\r\n \r\n }", "@RequestMapping(method=RequestMethod.GET)\n\tpublic String intializeForm(Model model) {\t\t\n\t\tlog.info(\"GET method is called to initialize the registration form\");\n\t\tEmployeeManagerRemote employeeManager = null;\n\t\tEmployeeRegistrationForm employeeRegistrationForm = new EmployeeRegistrationForm();\n\t\tList<Supervisor> supervisors = null;\n\t\ttry{\n\t\t\temployeeManager = (EmployeeManagerRemote) ApplicationUtil.getEjbReference(emplManagerRef);\n\t\t\tsupervisors = employeeManager.getAllSupervisors();\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tmodel.addAttribute(\"supervisors\", supervisors);\n\t\tmodel.addAttribute(\"employeeRegistrationForm\", employeeRegistrationForm);\n\t\t\n\t\treturn FORMVIEW;\n\t}", "public CreateAccount() {\n initComponents();\n selectionall();\n }", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tvista.FormInsertarUsuario formInsertarUser = new FormInsertarUsuario();\r\n\t\t\t\tformInsertarUser.main();\r\n\t\t\t}", "public Add_E() {\n initComponents();\n this.setTitle(\"Add Engineer\");\n }", "private void createAgent() {\n logger.info(\"Creating agent\");\n iteration = 0;\n aiManager = new AIManager(configDialogInfo);\n aiManager.getAgent().addObserver(\"gameEngine\", this);\n AIBirth.generate(aiManager.getAgent());\n aiManager.start();\n }", "public String createAgent(String type, String name, List args){\n \t\tPlatformController container = getContainerController();\t\t\t\t\n \n \t\tArgument[] args1 = new Argument[0];\n Argument[] args2 = new Argument[0];\n \n \t\tif (agentTypes.get(type).getOptions() != null){\n \t\t\targs1 = agentTypes.get(type).getOptions();\n \t\t}\n \t\t\n \t\tif (args != null){\n args2=new Argument[args.size()];\n for (int i=0;i<args.size();i++)\n {\n args2[i]=(Argument)args.get(i);\n }\n \t\t}\n \t\t\n \t\tint size = args1.length + args2.length;\n \t\tArgument[] Args = new Argument[size];\n System.arraycopy(args1,0,Args,0,args1.length);\n System.arraycopy(args2,0,Args,args1.length,args2.length);\n \t\tString nameToGenerate=name = generateName(name);\n \t\t\ttry {\n String agentType=agentTypes.get(type).getTypeName();\n if (agentType==null){\n agentType=type;\n }\n \t\t\t\tAgentController agent = container.createNewAgent(name, agentType, Args);\n \t\t\t\tagent.start();\n \t\t\t} catch (ControllerException e) {\n \t\t\t\t e.printStackTrace();\n }\n \t\t// provide agent time to register with DF etc.\n \t\tdoWait(300);\n \t\treturn nameToGenerate;\n \t}", "public FormMenu() {\n initComponents();\n menuController = new MenuController(this);\n menuController.nonAktif();\n }", "public void createAndShowGUI() {\n frame= new JFrame(\"TabAdmin\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n frame.setLocation(200,50);\n //Create and set up the content pane.\n \n addComponentToPane(frame.getContentPane());\n \n //Display the window.\n frame.pack();\n frame.setVisible(true);\n //create admin to operate \n \n }", "public C_AdminForm() {\n initComponents();\n }", "public frmNewArtist() {\n initComponents();\n lblID.setText(Controller.Agent.ManageController.getNewArtistID());\n lblGreeting.setText(\"Dear \"+iMuzaMusic.getLoggedUser().getFirstName()+\", please use the form below to add an artist to your ranks.\");\n \n }", "public void onNew() {\t\t\n\t\tdesignWidget.addNewForm();\n\t}", "@Override\r\n\t\tpublic void create() {\n\t\t\tsuper.create();\r\n\t\t\tsuper.getOKButton().setEnabled(false);\r\n\t\t\tsuper.setTitle(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t\tsuper.setMessage(Messages.MoveUnitsWizardPage1_Select_a_name_source_folder_and_a_);\r\n\t\t\tsuper.getShell().setText(Messages.MoveUnitsWizardPage1_Topolog__2);\r\n\t\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tfrmAddStudentGroup.dispose();\n\t\t\t\tnew Home();\n\t\t\t\t\n\t\t\t}", "@RequestMapping(\"/new\")\n\tpublic String displayProjectForm(Model model) {\n\t\tProject aproject = new Project();\n\t//Iterable<Employee> employees = \tpro.getall();\n\t\n\t\tmodel.addAttribute(\"project\", aproject);\n\n\t\t//model.addAttribute(\"allEmployees\", employees);\n\t\t\n\t\t\n\t\treturn \"newproject\";\n\t\t\n\t}", "public VCrearGerente(JFrame vAnterior, Administrador admin) {\n this.vAnterior = vAnterior; \n this.admin = admin;\n initComponents();\n }", "@RequestMapping(value=\"admin/agregar_agencias\", method=RequestMethod.GET)\n\tpublic ModelAndView formAgencias(ModelAndView model) throws IOException{\n\n\t\tModelAndView model2 = new ModelAndView();\n\t\tmodel2.setViewName(\"agregar_agencia_admin\");\t \n\t\t\n\t\treturn model2;\n\n\t}" ]
[ "0.6261268", "0.596593", "0.59535944", "0.59431326", "0.58509743", "0.58393097", "0.57853997", "0.57748765", "0.5753762", "0.57392013", "0.5715472", "0.568056", "0.5671957", "0.5654125", "0.56419057", "0.5636452", "0.5616119", "0.56088305", "0.5602279", "0.56020975", "0.55945283", "0.5588714", "0.5583964", "0.55822223", "0.55768365", "0.55419874", "0.5532084", "0.55292404", "0.5524333", "0.5520357", "0.55096275", "0.5501322", "0.54984754", "0.54844856", "0.5477207", "0.54611355", "0.54542327", "0.5449568", "0.5440939", "0.54380274", "0.54281384", "0.53927577", "0.53725976", "0.53511477", "0.53508127", "0.5350496", "0.5344028", "0.53358096", "0.5330838", "0.53255665", "0.53232086", "0.53225565", "0.53111017", "0.52981573", "0.5297197", "0.5294703", "0.52803075", "0.527488", "0.5261169", "0.5259703", "0.5253178", "0.5252993", "0.52525324", "0.5250397", "0.52459806", "0.5242838", "0.52403027", "0.52237743", "0.52237374", "0.5222498", "0.5215034", "0.52051526", "0.5198434", "0.51961297", "0.5192863", "0.5191248", "0.518811", "0.51881045", "0.51853365", "0.5183149", "0.51820785", "0.5181082", "0.5174084", "0.51700157", "0.51616395", "0.51577973", "0.5156199", "0.5154518", "0.5153434", "0.51488656", "0.51425576", "0.5139886", "0.51392424", "0.5136776", "0.51359206", "0.5135384", "0.51332355", "0.51299965", "0.5128506", "0.5122728" ]
0.63254297
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton4 = new javax.swing.JButton(); jTextField3 = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); jButtonRegAgent = new javax.swing.JButton(); jButtonDelAgent = new javax.swing.JButton(); jButtonAlterAgent = new javax.swing.JButton(); jLayeredPane1 = new javax.swing.JLayeredPane(); jPanelRegAgent = new javax.swing.JPanel(); jLabelRegAgent = new javax.swing.JLabel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jTextFieldAgentRegAgentID = new javax.swing.JTextField(); jTextFieldAgentRegNamn = new javax.swing.JTextField(); jTextFieldAgentRegTelNr = new javax.swing.JTextField(); jTextFieldAgentRegPW = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButtonAgentRegRensa = new javax.swing.JButton(); jComboBoxAdmin = new javax.swing.JComboBox<>(); jComboBoxOmrade = new javax.swing.JComboBox<>(); jTextFieldDatum = new javax.swing.JTextField(); jPanelDelAgent = new javax.swing.JPanel(); jLabelDelAgent = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jButtonTaBortAgent = new javax.swing.JButton(); txtFieldTaBortAgent = new javax.swing.JTextField(); jLabelFelMeddelande = new javax.swing.JLabel(); jPanelAlterAgent = new javax.swing.JPanel(); jLabelAlterAgent = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jTextFieldRedigeraAgent = new javax.swing.JTextField(); jComboBoxRedigeraAgent = new javax.swing.JComboBox<>(); jTxtRedigeraAgent = new javax.swing.JTextField(); jButtonUppdateraAgent = new javax.swing.JButton(); jButtonRensaRedigeraAgent = new javax.swing.JButton(); jPanelMerInställningar = new javax.swing.JPanel(); jLabel10 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel11 = new javax.swing.JLabel(); jCheckBox1 = new javax.swing.JCheckBox(); jCheckBox2 = new javax.swing.JCheckBox(); jCheckBox3 = new javax.swing.JCheckBox(); jButton2 = new javax.swing.JButton(); jButtonTillbaka = new javax.swing.JButton(); jButtonMerInställningar = new javax.swing.JButton(); jButton4.setText("jButton1"); jTextField3.setText("jTextField1"); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jButtonRegAgent.setText("Registrera en Agent"); jButtonRegAgent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonRegAgentActionPerformed(evt); } }); jButtonDelAgent.setText("Ta bort Agent"); jButtonDelAgent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonDelAgentActionPerformed(evt); } }); jButtonAlterAgent.setText("Ändra Agent"); jButtonAlterAgent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAlterAgentActionPerformed(evt); } }); jLabelRegAgent.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N jLabelRegAgent.setText("Agent registrering"); jLabelRegAgent.setSize(new java.awt.Dimension(45, 20)); jLabel1.setText("Agent ID"); jLabel2.setText("Namn"); jLabel3.setText("Telefon"); jLabel4.setText("Anställningsdatum"); jLabel5.setText("Administrator"); jLabel6.setText("Lösenord"); jLabel7.setText("Område"); jButton1.setText("Spara"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButtonAgentRegRensa.setText("Rensa"); jButtonAgentRegRensa.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonAgentRegRensaActionPerformed(evt); } }); jComboBoxAdmin.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "J", "N" })); javax.swing.GroupLayout jPanelRegAgentLayout = new javax.swing.GroupLayout(jPanelRegAgent); jPanelRegAgent.setLayout(jPanelRegAgentLayout); jPanelRegAgentLayout.setHorizontalGroup( jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addGap(44, 44, 44) .addComponent(jLabelRegAgent)) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addGap(77, 77, 77) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addComponent(jButton1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonAgentRegRensa)) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel4) .addComponent(jLabel5) .addComponent(jLabel6) .addComponent(jLabel7)) .addGap(24, 24, 24) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextFieldAgentRegTelNr) .addComponent(jTextFieldAgentRegNamn) .addComponent(jTextFieldAgentRegAgentID) .addComponent(jTextFieldAgentRegPW) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addComponent(jComboBoxAdmin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jTextFieldDatum, javax.swing.GroupLayout.PREFERRED_SIZE, 145, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 8, Short.MAX_VALUE)) .addComponent(jComboBoxOmrade, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))))) .addContainerGap(67, Short.MAX_VALUE)) ); jPanelRegAgentLayout.setVerticalGroup( jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelRegAgent) .addGap(18, 18, 18) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(jTextFieldAgentRegAgentID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelRegAgentLayout.createSequentialGroup() .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jTextFieldAgentRegNamn, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3)) .addComponent(jTextFieldAgentRegTelNr, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelRegAgentLayout.createSequentialGroup() .addComponent(jLabel4) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(jComboBoxAdmin, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel6) .addComponent(jTextFieldAgentRegPW, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel7) .addComponent(jComboBoxOmrade, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanelRegAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonAgentRegRensa) .addComponent(jButton1))) .addComponent(jTextFieldDatum, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(156, Short.MAX_VALUE)) ); jLabelDelAgent.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N jLabelDelAgent.setText("Ta bort Agent"); jLabel8.setText("Agent namn :"); jButtonTaBortAgent.setText("Ta bort"); jButtonTaBortAgent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonTaBortAgentActionPerformed(evt); } }); javax.swing.GroupLayout jPanelDelAgentLayout = new javax.swing.GroupLayout(jPanelDelAgent); jPanelDelAgent.setLayout(jPanelDelAgentLayout); jPanelDelAgentLayout.setHorizontalGroup( jPanelDelAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelDelAgentLayout.createSequentialGroup() .addGroup(jPanelDelAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanelDelAgentLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabelFelMeddelande, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelDelAgentLayout.createSequentialGroup() .addGap(15, 15, 15) .addGroup(jPanelDelAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabelDelAgent) .addGroup(jPanelDelAgentLayout.createSequentialGroup() .addComponent(jLabel8) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanelDelAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButtonTaBortAgent) .addComponent(txtFieldTaBortAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)))))) .addContainerGap(33, Short.MAX_VALUE)) ); jPanelDelAgentLayout.setVerticalGroup( jPanelDelAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelDelAgentLayout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jLabelDelAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(28, 28, 28) .addGroup(jPanelDelAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(txtFieldTaBortAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabelFelMeddelande, javax.swing.GroupLayout.PREFERRED_SIZE, 23, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonTaBortAgent) .addContainerGap(97, Short.MAX_VALUE)) ); jLabelAlterAgent.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N jLabelAlterAgent.setText("Redigera Agent"); jLabel9.setText("Agent ID"); jComboBoxRedigeraAgent.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Namn", "Telefon", "Anställningsdatum", "Administrator", "Losenord", "Område", " " })); jButtonUppdateraAgent.setText("Uppdatera"); jButtonUppdateraAgent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonUppdateraAgentActionPerformed(evt); } }); jButtonRensaRedigeraAgent.setText("Rensa"); jButtonRensaRedigeraAgent.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonRensaRedigeraAgentActionPerformed(evt); } }); javax.swing.GroupLayout jPanelAlterAgentLayout = new javax.swing.GroupLayout(jPanelAlterAgent); jPanelAlterAgent.setLayout(jPanelAlterAgentLayout); jPanelAlterAgentLayout.setHorizontalGroup( jPanelAlterAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelAlterAgentLayout.createSequentialGroup() .addContainerGap() .addGroup(jPanelAlterAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabelAlterAgent) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 90, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jPanelAlterAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jTextFieldRedigeraAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanelAlterAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jButtonRensaRedigeraAgent, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonUppdateraAgent, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jTxtRedigeraAgent, javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jComboBoxRedigeraAgent, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) .addContainerGap(75, Short.MAX_VALUE)) ); jPanelAlterAgentLayout.setVerticalGroup( jPanelAlterAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelAlterAgentLayout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jLabelAlterAgent) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelAlterAgentLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextFieldRedigeraAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addComponent(jComboBoxRedigeraAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jTxtRedigeraAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButtonUppdateraAgent) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonRensaRedigeraAgent) .addContainerGap(90, Short.MAX_VALUE)) ); jLabel10.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N jLabel10.setText("Mer inställningar"); jLabel11.setText("Agent namn:"); jCheckBox1.setText("Admin status"); jCheckBox2.setText("Områdeschef"); jCheckBox3.setText("Kontorschef"); jButton2.setText("SPARA"); javax.swing.GroupLayout jPanelMerInställningarLayout = new javax.swing.GroupLayout(jPanelMerInställningar); jPanelMerInställningar.setLayout(jPanelMerInställningarLayout); jPanelMerInställningarLayout.setHorizontalGroup( jPanelMerInställningarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMerInställningarLayout.createSequentialGroup() .addGroup(jPanelMerInställningarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMerInställningarLayout.createSequentialGroup() .addContainerGap() .addComponent(jLabel11) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanelMerInställningarLayout.createSequentialGroup() .addGap(14, 14, 14) .addGroup(jPanelMerInställningarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jCheckBox2) .addComponent(jCheckBox1) .addComponent(jCheckBox3) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanelMerInställningarLayout.createSequentialGroup() .addGap(34, 34, 34) .addComponent(jLabel10))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanelMerInställningarLayout.setVerticalGroup( jPanelMerInställningarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanelMerInställningarLayout.createSequentialGroup() .addGap(12, 12, 12) .addComponent(jLabel10) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanelMerInställningarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jTextField1)) .addGap(18, 18, 18) .addComponent(jCheckBox1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jCheckBox3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton2) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLayeredPane1.setLayer(jPanelRegAgent, javax.swing.JLayeredPane.DEFAULT_LAYER); jLayeredPane1.setLayer(jPanelDelAgent, javax.swing.JLayeredPane.DEFAULT_LAYER); jLayeredPane1.setLayer(jPanelAlterAgent, javax.swing.JLayeredPane.DEFAULT_LAYER); jLayeredPane1.setLayer(jPanelMerInställningar, javax.swing.JLayeredPane.DEFAULT_LAYER); javax.swing.GroupLayout jLayeredPane1Layout = new javax.swing.GroupLayout(jLayeredPane1); jLayeredPane1.setLayout(jLayeredPane1Layout); jLayeredPane1Layout.setHorizontalGroup( jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup() .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelRegAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(jLayeredPane1Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanelMerInställningar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanelDelAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanelAlterAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(129, 129, 129)) ); jLayeredPane1Layout.setVerticalGroup( jLayeredPane1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jLayeredPane1Layout.createSequentialGroup() .addComponent(jPanelRegAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelMerInställningar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jLayeredPane1Layout.createSequentialGroup() .addComponent(jPanelDelAgent, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanelAlterAgent, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(98, 98, 98)) ); jButtonTillbaka.setText("Tillbaka"); jButtonTillbaka.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonTillbakaActionPerformed(evt); } }); jButtonMerInställningar.setText("Mer Inställningar"); jButtonMerInställningar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButtonMerInställningarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButtonAlterAgent) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonDelAgent, javax.swing.GroupLayout.PREFERRED_SIZE, 132, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonRegAgent) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jButtonMerInställningar) .addGap(44, 44, 44) .addComponent(jButtonTillbaka) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap(15, Short.MAX_VALUE) .addComponent(jLayeredPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButtonAlterAgent) .addComponent(jButtonDelAgent) .addComponent(jButtonRegAgent) .addComponent(jButtonTillbaka) .addComponent(jButtonMerInställningar)) .addContainerGap()) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 682, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(20, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }", "public FormListRemarking() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public FormPemilihan() {\n initComponents();\n }", "public GUIForm() { \n initComponents();\n }", "public FrameForm() {\n initComponents();\n }", "public TorneoForm() {\n initComponents();\n }", "public FormCompra() {\n initComponents();\n }", "public muveletek() {\n initComponents();\n }", "public Interfax_D() {\n initComponents();\n }", "public quanlixe_form() {\n initComponents();\n }", "public SettingsForm() {\n initComponents();\n }", "public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }", "public Soru1() {\n initComponents();\n }", "public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }", "public soal2GUI() {\n initComponents();\n }", "public EindopdrachtGUI() {\n initComponents();\n }", "public MechanicForm() {\n initComponents();\n }", "public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }", "public quotaGUI() {\n initComponents();\n }", "public BloodDonationGUI() {\n initComponents();\n }", "public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }", "public PatientUI() {\n initComponents();\n }", "public myForm() {\n\t\t\tinitComponents();\n\t\t}", "public Oddeven() {\n initComponents();\n }", "public intrebarea() {\n initComponents();\n }", "public Magasin() {\n initComponents();\n }", "public RadioUI()\n {\n initComponents();\n }", "public NewCustomerGUI() {\n initComponents();\n }", "public ZobrazUdalost() {\n initComponents();\n }", "public FormUtama() {\n initComponents();\n }", "public p0() {\n initComponents();\n }", "public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }", "public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }", "public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }", "public form2() {\n initComponents();\n }", "public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}", "public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }", "public kunde() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }", "public MusteriEkle() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public frmMain() {\n initComponents();\n }", "public DESHBORDPANAL() {\n initComponents();\n }", "public frmVenda() {\n initComponents();\n }", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "public FrmMenu() {\n initComponents();\n }", "public Botonera() {\n initComponents();\n }", "public OffertoryGUI() {\n initComponents();\n setTypes();\n }", "public JFFornecedores() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }", "public EnterDetailsGUI() {\n initComponents();\n }", "public vpemesanan1() {\n initComponents();\n }", "public Kost() {\n initComponents();\n }", "public FormHorarioSSE() {\n initComponents();\n }", "public UploadForm() {\n initComponents();\n }", "public frmacceso() {\n initComponents();\n }", "public HW3() {\n initComponents();\n }", "public Managing_Staff_Main_Form() {\n initComponents();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }", "public sinavlar2() {\n initComponents();\n }", "public P0405() {\n initComponents();\n }", "public IssueBookForm() {\n initComponents();\n }", "public MiFrame2() {\n initComponents();\n }", "public Choose1() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }", "public GUI_StudentInfo() {\n initComponents();\n }", "public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }", "public JFrmPrincipal() {\n initComponents();\n }", "public bt526() {\n initComponents();\n }", "public Pemilihan_Dokter() {\n initComponents();\n }", "public Ablak() {\n initComponents();\n }", "@Override\n\tprotected void initUi() {\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}", "public Pregunta23() {\n initComponents();\n }", "public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }", "public AvtekOkno() {\n initComponents();\n }", "public busdet() {\n initComponents();\n }", "public ViewPrescriptionForm() {\n initComponents();\n }", "public Ventaform() {\n initComponents();\n }", "public Kuis2() {\n initComponents();\n }", "public CreateAccount_GUI() {\n initComponents();\n }", "public POS1() {\n initComponents();\n }", "public Carrera() {\n initComponents();\n }", "public EqGUI() {\n initComponents();\n }", "public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }", "public nokno() {\n initComponents();\n }", "public dokter() {\n initComponents();\n }", "public ConverterGUI() {\n initComponents();\n }", "public hitungan() {\n initComponents();\n }", "public Modify() {\n initComponents();\n }", "public frmAddIncidencias() {\n initComponents();\n }", "public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }" ]
[ "0.73195875", "0.7291065", "0.7291065", "0.7291065", "0.7286258", "0.7248489", "0.7213822", "0.7208757", "0.7195916", "0.7190243", "0.7184025", "0.71591616", "0.7148041", "0.70930153", "0.7080625", "0.7056986", "0.6987694", "0.69770867", "0.6955136", "0.69538426", "0.69452894", "0.6942365", "0.6935255", "0.69317245", "0.6928022", "0.6924961", "0.6924691", "0.6911908", "0.6911051", "0.6892464", "0.6892285", "0.6890819", "0.6890592", "0.688895", "0.6882979", "0.68822217", "0.688142", "0.68779635", "0.68758005", "0.6873809", "0.6871587", "0.68597937", "0.6855975", "0.68553025", "0.685517", "0.68546903", "0.6853679", "0.6852941", "0.6852941", "0.68433666", "0.6837067", "0.68358743", "0.6828493", "0.68284714", "0.6826015", "0.6824099", "0.68229824", "0.68168867", "0.6816564", "0.6810073", "0.68090576", "0.6808398", "0.68083", "0.68070155", "0.6803015", "0.6794736", "0.67938805", "0.6792195", "0.6790488", "0.67894924", "0.67889225", "0.6787931", "0.67813647", "0.6766285", "0.676601", "0.6765171", "0.67574227", "0.6755563", "0.6752438", "0.6752084", "0.6742885", "0.67392796", "0.6737635", "0.6736323", "0.67334515", "0.67276573", "0.67266935", "0.6719731", "0.6715714", "0.6715036", "0.67141175", "0.6708368", "0.6707287", "0.6703903", "0.67010856", "0.6700051", "0.6698535", "0.66982317", "0.66940516", "0.6691627", "0.6689702" ]
0.0
-1
number of words ignored for stats
public void runDisplay() { scFrame = new SpellCheckFrame(); scFrame.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int getNumberOfWords() {\n return 0;\n }", "int totalWords();", "public int numWords(int length) {\r\n return 0;\r\n }", "public int getWordCount() {\n\t\treturn 10;\n\t}", "public int getNumWords() {\n // TODO: count the number of distinct words,\n // ie. the number of non-null counter objects.\n int count = 0;\n for (int i = 0; i < counters.length; i++){\n if (counters[i] != null) {\n count++;\n }\n }\n return count;\n }", "public int getNumWords() {\n return wordMap.get(\"TOTAL_WORDS\").intValue();\n }", "WordCounter(){\r\n }", "@Override\n public int getNumberOfWords(int count) {\n return restOfSentence.getNumberOfWords(count + 1);\n }", "public int count(){\r\n\t\tint sum = 0;\r\n for(Integer value: words.values()){\r\n sum += value;\r\n }\r\n return sum;\r\n\t}", "public int getWordCount(){\r\n\t\treturn wordCount;\r\n\t}", "public int numWordsCurrent() {\r\n return 0;\r\n }", "public int getWordsQuantity(){\n\t\treturn counter;\n\t}", "private WordCounting() {\r\n }", "public long getNumberOfWords() {\n return numberOfWords;\n }", "public int size(){\n return words.size();\n }", "public int getWordCount() {\n return totalWords;\n }", "@Override\r\n public Integer numberOfWords(InputStream ins, boolean isWordModel) throws Exception {\n return null;\r\n }", "private void getWordCounts() {\n Map<String, List<String>> uniqueWordsInClass = new HashMap<>();\n List<String> uniqueWords = new ArrayList<>();\n\n for (ClassificationClass classificationClass : classificationClasses) {\n uniqueWordsInClass.put(classificationClass.getName(), new ArrayList<>());\n }\n\n for (Document document : documents) {\n String[] terms = document.getContent().split(\" \");\n\n for (String term : terms) {\n if (term.isEmpty()) {\n continue;\n }\n if (!uniqueWords.contains(term)) {\n uniqueWords.add(term);\n }\n\n for (ClassificationClass docClass : document.getClassificationClasses()) {\n if (!uniqueWordsInClass.get(docClass.getName()).contains(term)) {\n uniqueWordsInClass.get(docClass.getName()).add(term);\n }\n if (totalWordsInClass.containsKey(docClass.getName())) {\n this.totalWordsInClass.put(docClass.getName(), this.totalWordsInClass.get(docClass.getName()) + document.getFeatures().get(term));\n } else {\n this.totalWordsInClass.put(docClass.getName(), document.getFeatures().get(term));\n }\n }\n }\n }\n\n this.totalUniqueWords = uniqueWords.size();\n }", "public int countOfUnknownWord() {\n\t\tint count = 0;\t\t\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"SELECT count(*) countWordLevel from \" + tbl_USER_DIC + \" WHERE \" + Constants.FLD_KNOW + \" = \" + Constants.WORD_UNKNOWN + \";\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount = rs.getInt(\"countWordLevel\");\n\t\t\t}\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\t\n\t}", "public void countWord() {\n\t\tiniStorage();\n\t\tWordTokenizer token = new WordTokenizer(\"models/jvnsensegmenter\",\n\t\t\t\t\"data\", true);\n\t\t// String example =\n\t\t// \"Nếu bạn đang tìm kiếm một chiếc điện thoại Android? Đây là, những smartphone đáng để bạn cân nhắc nhất. Thử linh tinh!\";\n\t\t// token.setString(example);\n\t\t// System.out.println(token.getString());\n\n\t\tSet<Map.Entry<String, String>> crawlData = getCrawlData().entrySet();\n\t\tIterator<Map.Entry<String, String>> i = crawlData.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tMap.Entry<String, String> pageContent = i.next();\n\t\t\tSystem.out.println(pageContent.getKey());\n\t\t\tPageData pageData = gson.fromJson(pageContent.getValue(),\n\t\t\t\t\tPageData.class);\n\t\t\ttoken.setString(pageData.getContent().toUpperCase());\n\t\t\tString wordSegment = token.getString();\n\t\t\tString[] listWord = wordSegment.split(\" \");\n\t\t\tfor (String word : listWord) {\n\t\t\t\taddToDictionary(word, 1);\n\t\t\t\tDate date;\n\t\t\t\ttry {\n\t\t\t\t\tdate = simpleDateFormat.parse(pageData.getTime().substring(\n\t\t\t\t\t\t\t0, 10));\n\t\t\t\t} catch (ParseException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\taddToStatByDay(date, word, 1);\n\t\t\t}\n\t\t}\n\t}", "public int getLength() { return this.words.size(); }", "public int getWordCount() {\n return wordCount;\n }", "public int count(String word);", "public abstract void overallWords(long ms, int n);", "int getWordCount() {\r\n return entrySet.size();\r\n }", "public void testCountWordLengths() {\n FileResource fr = new FileResource(\"data/smallHamlet.txt\");\n int[] counts = new int[31];\n countWordLengths(fr, counts);\n }", "public int getTotalUniqueWords() {\n return totalUniqueWords;\n }", "public int getWordLength();", "int size() {\r\n\t\treturn m_words.size();\r\n\t}", "private void initiateWordCount(){\n for(String key: DataModel.bloomFilter.keySet()){\n WordCountHam.put(key, 0);\n WordCountSpam.put(key, 0);\n }\n }", "public double getNormalizedCount(String word1, String word2) {\n// double normalizedCount = 0;\n// // YOUR CODE HERE\n// return normalizedCount;\n \n double normalizedCount = 0;\n // YOUR CODE HERE\n if (KnownWord(word1) && KnownWord(word2)) {\n normalizedCount = bi_grams_normalized[NDTokens.indexOf(word1)][NDTokens.indexOf(word2)];\n } else {\n if(smooth) {\n double temp = (!KnownWord(word1)) ? 0 : uni_grams[NDTokens.indexOf(word1)];\n double sum = temp+NDTokens_size;\n normalizedCount = 1/sum;\n }\n }\n return normalizedCount;\n \n }", "public int getWordCount()\n {\n return m_iWordCount;\n }", "int countByExample(WdWordDictExample example);", "int count(String s) {\r\n\t\tif (m_words.containsKey(s)) {\r\n\t\t\treturn m_words.get(s);\r\n\t\t} else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public void addWordCount(){\r\n\t\twordCount = wordCount + 1;\r\n\t}", "public static String wordCounting(File file)\n {\n return null;\n }", "public int total() {\n\t \treturn totalWords;\n\t }", "private void initializeSentimentFeaturesCount() {\n\t\tint count = 0;\n\n\t\t// Number of positive words\n\t\tif (Features.isNumberOfPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of negative words\n\t\tif (Features.isNumberOfNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of highly emotional positive words\n\t\tif (Features.isNumberOfHighlyEmoPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of highly emotional negative words\n\t\tif (Features.isNumberOfHighlyEmoNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Capitalized positive words\n\t\tif (Features.isNumberOfCapitalizedPositiveWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Capitalized Negative Words\n\t\tif (Features.isNumberOfCapitalizedNegativeWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Ratio of Emotional Words\n\t\tif (Features.isRatioOfEmotionalWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Positive Emoticons\n\t\tif (Features.isNumberOfPositiveEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Negative Emoticons\n\t\tif (Features.isNumberOfNegativeEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of \"Neutral\" Emoticons\n\t\tif (Features.isNumberOfNeutralEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of \"Joking\" Emoticons\n\t\tif (Features.isNumberOfJokingEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Positive Slangs\n\t\tif (Features.isNumberOfPositiveSlangs()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number of Negative Slangs\n\t\tif (Features.isNumberOfNegativeSlangs()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Positive Hashtags\n\t\tif (Features.isNumberOfPositiveHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Number Of Negative Hashtags\n\t\tif (Features.isNumberOfNegativeHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Words\n\t\tif (Features.isContrastWordsVsWords()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Hashtags\n\t\tif (Features.isContrastWordsVsHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Words Vs Emoticons\n\t\tif (Features.isContrastWordsVsEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Hashtags Vs Hashtags\n\t\tif (Features.isContrastHashtagsVsHashtags()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\t// Contrast Hashtags Vs Emoticons\n\t\tif (Features.isContrastHashtagsVsEmoticons()) {\n\t\t\tcount++;\n\t\t}\n\t\t\n\t\tSelectBasicFeaturesWindow.setNumberOfSentimentRelatedFeatures(count);\n\t\tSelectBasicFeaturesWindow.countOfSentimentRelatedFeatures.set(count);\n\t}", "public int distinctCount(){\r\n int distinct = 0;\r\n //Loop through each key in words\r\n for(String key: words.keySet()){\r\n //If they appear in the file\r\n if(words.get(key) != 0){\r\n //count it\r\n distinct++;\r\n }\r\n }\r\n return distinct;\r\n\t}", "@Override\n public int size() {\n return wordsArray.length;\n }", "private int numEnglishWords(String str) {\n int numWords = 0;\n String[] strings = str.split(\" \");\n for (String word : strings) {\n if (english.contains(word)) {\n numWords ++;\n }\n }\n return numWords;\n }", "public double getCount(String word1, String word2) {\n double count = 0;\n // YOUR CODE HERE\n if (KnownWord(word1) && KnownWord(word2)) {\n count = bi_grams[NDTokens.indexOf(word1)][NDTokens.indexOf(word2)];\n } else {\n count = smooth ? 1 : 0;\n }\n return count;\n }", "@Test\n public void countNumberOfCharactersInWords() {\n final long count = 0; //TODO\n\n assertEquals(105, count);\n }", "protected final static int numWords( final long size ) {\n\t\tif ( ASSERTS ) assert ( size + WORD_MASK ) >>> LOG2_BITS_PER_WORD <= Integer.MAX_VALUE;\n\t\treturn (int)( ( size + WORD_MASK ) >>> LOG2_BITS_PER_WORD );\n\t}", "public int getWordSize(){\n\t\treturn word.length;\n\t}", "public void print_words_per_label_count() {\n\t\tSystem.out.println(\"SPORTS=\" + m_sports_word_count);\n\t\tSystem.out.println(\"BUSINESS=\" + m_business_word_count);\n\t}", "@Test\n public void countNumberOfWords() {\n final long count = 0; //TODO\n\n assertEquals(20, count);\n }", "public int getWordsPerTopic() {\n return topicWords == null ? 0 : topicWords.size();\n }", "public int totalWordsTree() {\r\n\t\treturn count;\r\n\t}", "public void setWordCount(int countIn) {\n this.wordCount = countIn;\n }", "public void countWordLengthsWithIsLettermethod(FileResource resource, int[] counts) {\r\n for (String word : resource.words()) {\r\n String trim = word.trim();\r\n int wordSize = trim.length();\r\n char firstChar = trim.charAt(0);\r\n char endChar = trim.charAt(trim.length()-1);\r\n if (!Character.isLetter(firstChar) && !Character.isLetter(endChar)) {\r\n wordSize -= 2;\r\n } else \r\n if (!Character.isLetter(firstChar) || !Character.isLetter(endChar)) {\r\n wordSize -= 1;\r\n }\r\n if(wordSize>=counts.length) {\r\n counts[counts.length-1] += 1; \r\n } else\r\n //right algorithm\r\n if( wordSize> 0 && counts[wordSize] != 0 ) {\r\n counts[wordSize] += 1;\r\n \r\n } else if ( wordSize> 0) {\r\n counts[wordSize] = 1;\r\n }\r\n }\r\n \r\n //test\r\n for(int i : counts) {\r\n System.out.println(i);\r\n }\r\n }", "private static void printMostUsedWords(){\n\t\tMap<String, Integer> words = getWords();\n\t\t\n\t\tString max_count_string[] = new String[3];\n\t\tint max_counts[] = new int[3];\n\t\t\n\t\tfor(String str : words.keySet()){\n\t\t\tint count = words.get(str);\n\t\t\tint index = getMinIndex(max_counts);\n\t\t\t\n\t\t\tif(count > max_counts[index]){\n\t\t\t\tmax_counts[index] = count;\n\t\t\t\tmax_count_string[index] = str;\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* printing top 3 most frequently used words */\n\t\tSystem.out.println(\"top 3 most frequently used words : \");\n\t\tfor(int i=0; i<3; i++){\n\t\t\tSystem.out.println(\"Word : \\\"\" + max_count_string[i] + \"\\\" is used \"+ max_counts[i] +\" times\" );\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void countWords(String source) {\n Scanner wordScanner = new Scanner(source);\n// wordScanner.useDelimiter(\"[^A-Za-z]+\");\n wordScanner.useDelimiter(\"(?!')[^A-Za-z]+\");\n addWordToMap(wordScanner);\n }", "WordCounter(String inputText){\r\n \r\n wordSource = inputText;\r\n }", "private static Map<String, Integer> getWords(){\n\t\tMap<String, Integer> map = new HashMap<String, Integer>();\n\t\t\n\t\tfor(Status status : statusList){\n\t\t\tStringTokenizer tokens = new StringTokenizer(status.getText());\n\t\t\twhile(tokens.hasMoreTokens()){\n\t\t\t\tString token = tokens.nextToken();\n\t\t\t\tif(!token.equals(\"RT\")){\n\t\t\t\t\tif(map.containsKey(token)){\n\t\t\t\t\t\tint count = map.get(token);\n\t\t\t\t\t\tmap.put(token, ++count);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tmap.put(token, 1);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn map;\n\t}", "private void countWords(String text, String ws) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(new ByteArrayInputStream(text.getBytes(StandardCharsets.UTF_8))));\n String line;\n\n // Get words and respective count\n while (true) {\n try {\n if ((line = reader.readLine()) == null)\n break;\n String[] words = line.split(\"[ ,;:.?!“”(){}\\\\[\\\\]<>']+\");\n for (String word : words) {\n word = word.toLowerCase();\n if (\"\".equals(word)) {\n continue;\n }\n if (lista.containsKey(word)){\n lista.get(word).add(ws);\n }else{\n HashSet<String> temp = new HashSet<>();\n temp.add(ws);\n lista.put(word, temp);\n }\n\n /*if (!countMap.containsKey(word)) {\n countMap.put(word, 1);\n }\n else {\n countMap.put(word, countMap.get(word) + 1);\n }*/\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n // Close reader\n try {\n reader.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n // Display words and counts\n /*for (String word : countMap.keySet()) {\n if (word.length() >= 3) { // Shall we ignore small words?\n //System.out.println(word + \"\\t\" + countMap.get(word));\n }\n }*/\n }", "@Override\n public int getTermFrequency(String term) {\n return 0;\n }", "public int getWordCount() {\n\t\treturn list.size();\n\t}", "private String getWordStatsFromList(List<String> wordList) {\n\t\tif (wordList != null && !wordList.isEmpty()) {\n\t\t\tList<String> wordsUsedCaps = new ArrayList<>(); \n\t\t\tList<String> wordsExcludedCaps = new ArrayList<>(); \n\t\t\tListIterator<String> iterator = wordList.listIterator();\n\t\t\tMap<String, Integer> wordToFreqMap = new HashMap<>();\n\t\t\t// iterate on word List using listIterator to enable edits and removals\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tString origWord = iterator.next();\n\t\t\t\t// remove quotes from word e.g. change parents' to parents; \n\t\t\t\t// change children's to children; change mark'd to mark\n\t\t\t\tString curWord = stripQuotes(origWord);\n\t\t\t\tif (!curWord.equals(origWord)) {\n\t\t\t\t\titerator.set(curWord);\n\t\t\t\t}\n\t\t\t\tString curWordCaps = curWord.toUpperCase();\n\t\t\t\t// remove words previously used (to prevent duplicates) or previously\n\t\t\t\t// excluded (compare capitalized version)\n\t\t\t\tif (wordsExcludedCaps.contains(curWordCaps)) {\n\t\t\t\t\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse if (wordsUsedCaps.contains(curWordCaps)) {\n\t\t\t\t\t// if word was previously used then update wordToFreqMap to increment\n\t\t\t\t\t// its usage frequency\n\t\t\t\t\tSet<String> wordKeys = wordToFreqMap.keySet();\n\t\t\t\t\tfor (String word : wordKeys) {\n\t\t\t\t\t\tif (curWord.equalsIgnoreCase(word)) {\n\t\t\t\t\t\t\twordToFreqMap.put(word, wordToFreqMap.get(word).intValue() + 1);\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\titerator.remove();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// invoke checkIfEligible() with algorithm described in Challenge 2 to see if word not\n\t\t\t\t\t// previously used/excluded should be kept. If kept in list \n\t\t\t\t\t// then add to wordsUsedCaps list; if not qualified then add to\n\t\t\t\t\t// wordsExcludedCaps list to prevent checkIfEligible() having to be \n\t\t\t\t\t// called again\n\t\t\t\t\tif (checkIfEligible(curWordCaps)) {\n\t\t\t\t\t\twordsUsedCaps.add(curWordCaps);\n\t\t\t\t\t\twordToFreqMap.put(curWord, 1);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\twordsExcludedCaps.add(curWordCaps);\n\t\t\t\t\t\titerator.remove();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t// sort words in list in order of length\n\t\t\twordList.sort(Comparator.comparingInt(String::length));\n\t\t\t// sort wordToFreqMap by value (frequency) and choose the last sorted map element\n\t\t\t// to get most frequently used word\n\t\t\tList<Map.Entry<String, Integer>> mapEntryWtfList = new ArrayList<>(wordToFreqMap.entrySet());\n\t\t\tmapEntryWtfList.sort(Map.Entry.comparingByValue());\n\t\t\tMap<String, Integer> sortedWordToFreqMap = new LinkedHashMap<>();\n\t\t\tsortedWordToFreqMap.put(mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey(), mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\t\n\t\t\t// set up Json object to be returned as string\n\t\t\t// the code below is self-explaining\n\t\t\tJSONObject json = new JSONObject();\n\t\t\ttry {\n\t\t\t\tjson.put(\"remaining words ordered by length\", wordList);\n\t\t\t\tjson.put(\"most used word\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getKey());\n\t\t\t\tjson.put(\"number of uses\", mapEntryWtfList.get(mapEntryWtfList.size()-1).getValue());\n\t\t\t} catch(JSONException je) {\n\t\t\t\tje.printStackTrace();\n\t\t\t}\n\t\t\treturn json.toString();\n\t\t\t\n\t\t}\n\t\treturn \"\";\n\t}", "private static int numberOfWordsInFile(SimpleReader fileReader) {\r\n int numberOfWordsInFile = 0;\r\n Set<Character> separators = createSeparators();\r\n /*\r\n * Above: creates the set of characters used to determine what is and is\r\n * not a word\r\n */\r\n /*\r\n * Below: begin to read through the file and count the words\r\n */\r\n while (!fileReader.atEOS()) {\r\n String toRead = fileReader.nextLine();\r\n int position = 0;\r\n\r\n while (position < toRead.length()) {\r\n String nextWordOrSep = nextWordOrSeparator(toRead, position,\r\n separators);\r\n position += nextWordOrSep.length();\r\n if (!separators.contains(nextWordOrSep.charAt(0))\r\n && !nextWordOrSep.equals(\"\")) {\r\n numberOfWordsInFile++;\r\n }\r\n /*\r\n * if the word contains a separator then it's not a word, so\r\n * don't add to the word count.\r\n */\r\n }\r\n\r\n }\r\n return numberOfWordsInFile;\r\n }", "public static void main(String[] args) {\n\t\tString s = \"Sharma is a good player and he is so punctual\"; \n String words[] = s.split(\" \"); \n System.out.println(\"The Number of words present in the string are : \"+words.length);\n\n\t}", "public void dictionarySize() {\r\n\t\tSystem.out.println(\"There are currently \" + dictionary.size() + \" words in the dictionary.\");\t\r\n\t}", "int getGrammarMatchCount();", "public int size() {\n return this.wordNumber;\n }", "private static void wordCount(File fileEntry) throws FileNotFoundException {\n\t\tScanner sc = new Scanner(new FileInputStream(fileEntry));\n\t\t int count=0;\n\t\t while(sc.hasNext()){\n\t\t sc.next();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"Number of words: \" + count);\n\t\t\n\t\t\n\t}", "public int countOfKnownWord() {\n\t\tint count = 0;\t\t\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n\t\t\tString sql;\n\t\t\tsql = \"SELECT count(*) countWordLevel from \" + tbl_USER_DIC + \" WHERE \" + Constants.FLD_KNOW + \" = \" + Constants.WORD_KNOWN + \";\";\n\t\t\tResultSet rs = stmt.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tcount = rs.getInt(\"countWordLevel\");\n\t\t\t}\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn count;\t\n\t}", "public static int getNumWords( List<String> words ) {\n if ( words != null && ! words.isEmpty() ) \n return words.size();\n else \n return 0;\n }", "public int getEntryCount() {\n return wordFrequency.size();\n }", "public WordCount()\n {\n //initializes common variables.\n lineNums = new CircularList();\n count = 1;\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner (System.in);\n System.out.println(\"Please enter a sentence:\");\n String sentence = sc.nextLine();\n System.out.println(numberOfWords(sentence));\n\n\n }", "private double countWordFrequencyScore(Page page, String[] queryWords) {\n double score = 0;\n for (String word : queryWords) {\n int wordId = this.pb.getIdForWord(word);\n for (double pageWordId : page.getWords()) {\n if (wordId == pageWordId) score++;\n }\n }\n\n return score;\n }", "public String[] topHotWords( int count ){\r\n //If the number put in the arguments is greater than the number of distinct hotwords\r\n //in the document, limit it to distinctCount\r\n if (count > distinctCount()){\r\n count = distinctCount();\r\n }\r\n //Creating the array that will hold all the hotwords in order of number of appearances \r\n String[] topWord = new String[words.size()];\r\n //This is the subset of the array above that will return the amount specified by the count argument\r\n String[] output = new String[count];\r\n //Fills the array with blank strings\r\n Arrays.fill(topWord, \"\");\r\n //Iterator for moving through topWord for assignment\r\n int iterator = 0;\r\n //Loop through every hotword in words and puts those words in topWord\r\n for(String key: words.keySet()){\r\n topWord[iterator] = key;\r\n iterator++;\r\n }\r\n //Sorts the words in topword\r\n for(int i = 0; i < words.size(); i++){\r\n for(int j = words.size()-1; j > 0; j-- ){\r\n \r\n if(count(topWord[j]) > count(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n \r\n }\r\n }\r\n //Does a secondary check to be certain all words are in proper appearance number order\r\n for(int i = words.size()-1; i >0; i--){\r\n if(count(topWord[i]) > count(topWord[i-1])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[i-1];\r\n topWord[i-1] = temp;\r\n }\r\n }\r\n //Orders the words with the same number of appearances by order of appearance in the document\r\n for (int i = 0; i < words.size(); i++){\r\n for(int j = i+1; j < words.size(); j++){\r\n if (count(topWord[i]) == count(topWord[j])){\r\n if (consec.indexOf(topWord[j]) < consec.indexOf(topWord[i])){\r\n String temp = topWord[i];\r\n topWord[i] = topWord[j];\r\n topWord[j] = temp;\r\n }\r\n }\r\n }\r\n }\r\n //Gets the subset requested for return\r\n for (int i = 0; i < count; i++){\r\n output[i] = topWord[i];\r\n }\r\n return output;\r\n\t}", "@Override\r\n\tpublic int searchkuncCount(String text) {\n\t\treturn productRaw_StoreDao.searchCount(text);\r\n\t}", "public WordCount(String word, int count){\n this.word = word;\n this.count = count;\n }", "static int size_of_cm(String passed){\n\t\treturn 3;\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}", "public WordCount() {\n }", "public void setNumberOfWords(long numberOfWords) {\n this.numberOfWords = numberOfWords;\n }", "public static void main(String[] args) {\n\t\tNumberOfWords obj=new NumberOfWords();\n\t\tint a=obj.wordnum(\"Today is java and i am very tried.\");\n\t\tSystem.out.println(\"Number of words in the string: \"+a);\n\t\n\t}", "static int size_of_lda(String passed){\n\t\treturn 3;\n\t}", "public static void main(String[] args) {\n Scanner input = null;\r\n int allWords = 0;\r\n int threeLetterWords = 0;\r\n try {\r\n input = new Scanner(new File(\"prog512h.dat\"));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n \r\n while(input.hasNext()){\r\n if (input.next().length() == 3){\r\n threeLetterWords++;\r\n }\r\n allWords++;\r\n }\r\n System.out.println(\"Three letter words comprised \" + 100*(threeLetterWords+0.0)/allWords + \"% of all words.\");\r\n \r\n }", "public int numWords(int length) {\r\n int numOfLength = 0;\r\n \r\n //Check amt. of words in this dictionary that are == to length input\r\n \tfor (int word = 0; word < dictionary.size(); word++) {\r\n \tif (dictionary.get(word).length() == length)\r\n \t\tnumOfLength++;\r\n }\r\n \treturn numOfLength;\r\n }", "int retrieveNumberOfSadKeywords(String comment)\n\t{\n\t\tint numberOfSadWordsInComment = 0;\n\n\t\tfor (String sadWord : sadWords)\n\t\t{\n\t\t\tif (comment.indexOf(sadWord) != -1)\n\t\t\t{\n\t\t\t\tnumberOfSadWordsInComment++;\n\t\t\t}\n\t\t}\n\t\treturn numberOfSadWordsInComment;\n\t}", "public static int getWordlenght() {\r\n\t\treturn lenght;\r\n\t}", "public void theDude() {\n\t\ttotal_targets = 0;\n\t\ttotal = 0;\n\t\tint target_count = 0;\n\t\tresult.clear();\n\t\t\n\t\tfor(int k=0; k<input.getWords().size();k++) {\n\t\t\tWord currentWordStat = input.getWordStatistics().get(k);\n\t\t\ttarget_count = 0;\n\t\t\t\n\t\t\tfor(int i=0;i<input.getWords().get(k).length();i++) {\n\t\t\t\tif(target.contains(input.getWords().get(k).charAt(i))) {\n\t\t\t\t\ttarget_count++;\n\t\t\t\t\ttotal_targets++;\n\t\t\t\t}\n\t\t\t\ttotal++;\n\t\t\t}\n\t\t\t\n\t\t\tif(result.containsKey(currentWordStat)) {\n\t\t\t\tresult.put(currentWordStat, result.get(currentWordStat)+target_count);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tresult.put(currentWordStat, target_count);\n\t\t\t}\n\t\t}\t\n\t}", "private int scoreFor(String keyword) {\n return keyword.length();\n }", "public int cardinality() {\n\t\tint counter = 0;\n\t\tfinal EWAHIterator i =\n\t\t\t\tnew EWAHIterator(this.buffer, this.actualsizeinwords);\n\t\twhile (i.hasNext()) {\n\t\t\tRunningLengthWord localrlw = i.next();\n\t\t\tif (localrlw.getRunningBit()) {\n\t\t\t\tcounter += wordinbits * localrlw.getRunningLength();\n\t\t\t}\n\t\t\tfor (int j = 0; j < localrlw.getNumberOfLiteralWords(); ++j) {\n\t\t\t\tcounter += Long.bitCount(i.buffer()[i.dirtyWords() + j]);\n\t\t\t}\n\t\t}\n\t\treturn counter;\n\t}", "private static int countSyllables(String word) {\r\n\t\tint count = 0;\r\n\t\tword = word.toLowerCase();\r\n\r\n\t\tif (word.length()>0 && word.charAt(word.length() - 1) == 'e') {\r\n\t\t\tif (silente(word)) {\r\n\t\t\t\tString newword = word.substring(0, word.length()-1);\r\n\t\t\t\tcount = count + countit(newword);\r\n\t\t\t} else {\r\n\t\t\t\tcount++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcount = count + countit(word);\r\n\t\t}\r\n\t\treturn count;\r\n\t}", "public static int countWords(String text) throws UIMAException { \n JCas jCas = JCasFactory.createJCas();\n jCas.setDocumentText(text);\n jCas.setDocumentLanguage(\"en\");\n initEngines();\n\n runPipeline(jCas, segmenter); \n \n int cnt = 0; \n for (Token tok : select(jCas, Token.class)) {\n String token = tok.getCoveredText();\n if (token.matches(\"\\\\p{Alpha}*\")) cnt++;\n }\n \n return cnt;\n }", "private static int num_konsonan(String word) {\n int i;\n int jumlah_konsonan = 0;\n\n for (i = 0; i < word.length(); i++) {\n if (word.charAt(i) != 'a' &&\n word.charAt(i) != 'i' &&\n word.charAt(i) != 'u' &&\n word.charAt(i) != 'e' &&\n word.charAt(i) != 'o') {\n jumlah_konsonan++;\n }\n }\n return jumlah_konsonan;\n }", "public synchronized int getMissed() {\n\t\treturn missedWords.get();\n\t}", "public int numWordsOfLength(int len){\n int n=0;\n for(int i=0;i<size();i++)\n if(get(i).length()==len)n++;\n return n;\n }", "@Test\n public void testGetCountNonEmpty() {\n ArrayList<String> testArray;\n testArray =\n new ArrayList<String>(Arrays.asList(\"one\", \"two\", \"two\", \"three\", \"three\", \"three\"));\n\n fixture.countWords(testArray.iterator());\n\n assertEquals(fixture.getCount(\"one\"), 1);\n assertEquals(fixture.getCount(\"two\"), 2);\n assertEquals(fixture.getCount(\"three\"), 3);\n assertEquals(fixture.getCount(\"aRandomWord\"), -1);\n assertEquals(fixture.getCount(\"notEvenAWord\"), -1);\n assertEquals(fixture.getCount(\"password\"), -1);\n assertEquals(fixture.getCount(\"Habibi\"), -1);\n }", "public void testCount()\n\t{\n\t\tinfo.append(a1);\n\t\tinfo.append(a2);\n\t\tinfo.append(a3);\n\t\tassertEquals(3,info.getSynonymsCount());\n\t}", "public int getSizeWord(){\r\n\t\tint size;\r\n\t\tif (wordSelected != null)\r\n\t\t\tsize = wordSelected.length();\t\t\r\n\t\telse\r\n\t\t\tsize = 0;\r\n\t\t\r\n\t\treturn size;\t\t\r\n\t}", "public void countWords(String path) {\n\t\n//\t\tdeclaration and initialization\n\t\tFile file = new File(path);\n\t\tString str = \"\",word = \"\";\n\t\tBufferedReader br;\n\t\tint counter = 1;\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(file));\n\t\t\t\n//\t\t\tReads the file lines until eof\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\tword = word.concat(str);\n\t\t\t}\n\t\t\t\n//\t\t\tReplace both comma and dot with whitespace\n\t\t\tword = word.replace(',',' ');\n\t\t\tword = word.replace('.',' ');\n\t\t\t\n//\t\t\tSplit the string using space\n\t\t\tString[] words = word.split(\"\\\\s+\");\n\t\n//\t\t\tCompare the words and if they are same words increase the counter\n\t\t\tfor (int i = 0; i < words.length; i++){\n\t\t\t\tfor(int j = i+1; j < words.length; j++){\n\t\t\t\t\tif(words[i] != null && words[i].equals(words[j]) ){\n\t\t\t\t\t\tcounter++;\n\t\t\t\t\t\twords[j] = null; //replace the repeated word with null\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tdisplays the count of the words\n\t\t\t\tif(words[i] != null)\n\t\t\t\tSystem.out.println(words[i]+\": \"+counter);\n\t\t\t\tcounter = 1;\n\t\t\t}\n\t\t\tbr.close();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IO Exception\");\n\t\t}\n\t}", "public int numWords(int length) {\r\n \tint num = 0;\r\n \tfor (String s : words) {\r\n \t\tif (s.length() == length) {\r\n \t\t\tnum++;\r\n \t\t}\r\n \t}\r\n return num;\r\n }", "static int numCommonWords (int m, int n)\n {\n\tint numCommon = 0;\n\tfor (int j=0; j<M; j++) {\n\t if ((data[j][m] > 0) && (data[j][n] > 0)) {\n\t\tnumCommon ++;\n\t }\n\t}\n\treturn numCommon;\n }", "public int getNumberOfConcatenatedWords() {\n return concatenatedWords.size();\n }", "private Map<String, Integer> getWordCountPerSentenceMap(List<String> sentences) {\n Map<String, Integer> wordCountPerSentenceMap = new LinkedHashMap<>();\n sentences.stream().forEach(sentence -> wordCountPerSentenceMap.put(sentence.trim(), sentence.trim().split(\" \").length));\n return wordCountPerSentenceMap;\n }", "int countTypedFeatures();" ]
[ "0.75482935", "0.7117944", "0.7027906", "0.7011641", "0.6872629", "0.6864433", "0.68425137", "0.6812373", "0.67879784", "0.6783278", "0.67506135", "0.6742474", "0.67329484", "0.6696922", "0.6612024", "0.6595738", "0.6559454", "0.6557404", "0.6518111", "0.6514071", "0.64978456", "0.6488127", "0.6475194", "0.6469087", "0.64646065", "0.6435143", "0.6427217", "0.64250106", "0.64115685", "0.64059675", "0.63811177", "0.6365174", "0.63497984", "0.6346869", "0.63442487", "0.6333277", "0.629", "0.6283954", "0.6279748", "0.6274102", "0.6269908", "0.62380195", "0.623638", "0.6216385", "0.6198314", "0.6195023", "0.6152339", "0.61363643", "0.6128534", "0.6123101", "0.6110945", "0.6108312", "0.60822403", "0.60694295", "0.60642886", "0.6059199", "0.6057135", "0.60515124", "0.60394806", "0.6032844", "0.6032605", "0.60215706", "0.6017285", "0.60154086", "0.60136485", "0.6009557", "0.59907156", "0.5990363", "0.59854925", "0.5978741", "0.59618664", "0.59569645", "0.5955147", "0.59536856", "0.5940983", "0.5937855", "0.59354526", "0.59266984", "0.5920815", "0.59173757", "0.59045714", "0.5894664", "0.5893491", "0.5892663", "0.5880032", "0.5876682", "0.58747345", "0.58725756", "0.586015", "0.58568776", "0.58520037", "0.5851239", "0.58505124", "0.5845329", "0.584336", "0.5839439", "0.58243215", "0.58201337", "0.58185947", "0.58157694", "0.5812068" ]
0.0
-1
used to assign dialog box option at fileClose Constructor Sets up the menu bar
public SpellCheckMenuBar() { // menu bar set up file = new JMenu("File"); help = new JMenu("Help"); newFile = new JMenuItem("New File(s)"); fileClose = new JMenuItem("Close"); howToUse = new JMenuItem("How to use Spell Checker"); stats = new JMenu("Statistics"); printStats = new JMenuItem("Print Statistics"); //ad items to menubar file.add(newFile); file.add(fileClose); help.add(howToUse); stats.add(printStats); add(file); add(help); add(stats); // menu bar listeners /* * closes program */ fileClose.addActionListener ( new ActionListener() { public void actionPerformed(ActionEvent event) { //System exits only if user responds with yes end = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?"); if (end == JOptionPane.YES_OPTION) { System.exit(0); } } } ); /** * opens text file with instructions on how to use the program */ howToUse.addActionListener ( new ActionListener() { JFrame helpFrame; JTextField helpText; FileReader reader; JScrollPane scroller; public void actionPerformed(ActionEvent event) { // Creates the frame for the help instructions helpFrame = new JFrame(); helpText = new JTextField(); scroller = new JScrollPane(helpText, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); helpFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); helpFrame.setTitle("Help Instructions"); helpFrame.add(helpText, BorderLayout.CENTER); helpFrame.getContentPane().add(scroller, BorderLayout.CENTER); /** * Reads the help.txt file with the instructions */ reader = null; try { reader = new FileReader("help.txt"); helpText.read(reader, "help.txt"); helpText.setEditable(false); } /** * @exception IOException signals that the help file was not found */ catch (IOException exception) { System.err.println("Help file not found"); exception.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } /** * @exception IOException signals that there was an error close the help file */ catch (IOException exception) { System.out.println("Error closing file"); exception.printStackTrace(); } } } // displays help.txt on the helpframe helpFrame.setLocation(10, 270); helpFrame.setSize(700, 400); helpFrame.setVisible(true); } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpMenuBar_FileMenu(){\r\n\t\t// Add the file menu.\r\n\t\tthis.fileMenu = new JMenu(STR_FILE);\r\n\t\tthis.openMenuItem = new JMenuItem(STR_OPEN);\r\n\t\tthis.openMenuItem2 = new JMenuItem(STR_OPEN2);\r\n\t\tthis.resetMenuItem = new JMenuItem(STR_RESET);\r\n\t\tthis.saveMenuItem = new JMenuItem(STR_SAVE);\r\n\t\tthis.saveAsMenuItem = new JMenuItem(STR_SAVEAS);\r\n\t\tthis.exitMenuItem = new JMenuItem(STR_EXIT);\r\n\t\t\r\n\t\t// Add the action listeners for the file menu.\r\n\t\tthis.openMenuItem.addActionListener(this);\r\n\t\tthis.openMenuItem2.addActionListener(this);\r\n\t\tthis.resetMenuItem.addActionListener(this);\r\n\t\tthis.saveMenuItem.addActionListener(this);\r\n\t\tthis.saveAsMenuItem.addActionListener(this);\r\n\t\tthis.exitMenuItem.addActionListener(this);\r\n\t\t\r\n\t\t// Add the menu items to the file menu.\r\n\t\tthis.fileMenu.add(openMenuItem);\r\n\t\tthis.fileMenu.add(openMenuItem2);\r\n\t\tthis.fileMenu.add(resetMenuItem);\r\n\t\tthis.fileMenu.addSeparator();\r\n\t\tthis.fileMenu.add(saveMenuItem);\r\n\t\tthis.fileMenu.add(saveAsMenuItem);\r\n\t\tthis.fileMenu.addSeparator();\r\n\t\tthis.fileMenu.add(exitMenuItem);\r\n\t\tthis.menuBar.add(fileMenu);\r\n\t}", "public FileMenu(final CalcMenuBar menuBar){\n\t\tsetText(\"File\");\n\t\tsetBackground(Color.gray);\n\t\tthis.menuBar = menuBar;\n\t\t//init items\n\t\tmiOpen = new JMenuItem(\"Open\");\n\t\tmiOpen.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\topenPressed();\n\t\t\t}\n\t\t});\n\t\tadd(miOpen);\n\t\tmiSave = new JMenuItem(\"Save\");\n\t\tmiSave.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tsavePressed();\n\t\t\t}\n\t\t});\n\t\tadd(miSave);\n\t\tmiClearFormulas = new JMenuItem(\"Clear Functions\");\n\t\tmiClearFormulas.setToolTipText(\"Erases all User Functions\");\n\t\tmiClearFormulas.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(JOptionPane.showConfirmDialog(null, \"Are you sure you want to erase all user created functions?\", \"Are you sure?\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){\n\t\t\t\t\tSystem.out.println(\"Removing Functions\");\n\t\t\t\t\tUserFunction.getFunctions().clear();\n\t\t\t\t\tSystem.out.println(UserFunction.getFunctions());\n\t\t\t\t\tmenuBar.updateFunctions();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tadd(miClearFormulas);\n\t\tmiClearMem = new JMenuItem(\"Clear Variables\");\n\t\tmiClearMem.setToolTipText(\"Erases all User craeted variables\");\n\t\tmiClearMem.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tif(JOptionPane.showConfirmDialog(null, \"Are you sure you want to erase all user created variables?\", \"Are you sure?\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION){\n\t\t\t\t\tSystem.out.println(\"Removing Variables\");\n\t\t\t\t\tVariable.getVariables().clear();\n\t\t\t\t\tmenuBar.updateFunctions();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tadd(miClearMem);\n\t\t\n\t}", "private void initMenuBar() {\r\n\t\t// file menu\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tfileMenu.setMnemonic(KeyEvent.VK_F);\r\n\t\tadd(fileMenu);\r\n\r\n\t\tJMenuItem fileNewMenuItem = new JMenuItem(new NewAction(parent, main));\r\n\t\tfileNewMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileNewMenuItem);\r\n\t\tJMenuItem fileOpenMenuItem = new JMenuItem(new OpenAction(parent, main));\r\n\t\tfileOpenMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileOpenMenuItem);\r\n\r\n\t\tJMenuItem fileSaveMenuItem = new JMenuItem(new SaveAction(main));\r\n\t\tfileSaveMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveMenuItem);\r\n\t\tJMenuItem fileSaveAsMenuItem = new JMenuItem(new SaveAsAction(main));\r\n\t\tfileSaveAsMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_A,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(fileSaveAsMenuItem);\r\n\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.addSeparator();\r\n\r\n\t\tJMenuItem exitMenuItem = new JMenuItem(new ExitAction(main));\r\n\t\texitMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\tfileMenu.add(exitMenuItem);\r\n\r\n\t\t// tools menu\r\n\t\tJMenu toolsMenu = new JMenu(\"Application\");\r\n\t\ttoolsMenu.setMnemonic(KeyEvent.VK_A);\r\n\t\tadd(toolsMenu);\r\n\r\n\t\tJMenuItem defineCategoryMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineCategoryAction());\r\n\t\tdefineCategoryMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_C, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineCategoryMenuItem);\r\n\t\tJMenuItem defineBehaviorNetworkMenuItem = new JMenuItem(\r\n\t\t\t\tnew DefineBehaviorNetworkAction());\r\n\t\tdefineBehaviorNetworkMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_B, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(defineBehaviorNetworkMenuItem);\r\n\t\tJMenuItem startSimulationMenuItem = new JMenuItem(\r\n\t\t\t\tnew StartSimulationAction(main));\r\n\t\tstartSimulationMenuItem.setAccelerator(KeyStroke.getKeyStroke(\r\n\t\t\t\tKeyEvent.VK_E, Event.CTRL_MASK));\r\n\t\ttoolsMenu.add(startSimulationMenuItem);\r\n\r\n\t\t// help menu\r\n\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\thelpMenu.setMnemonic(KeyEvent.VK_H);\r\n\t\tadd(helpMenu);\r\n\r\n\t\tJMenuItem helpMenuItem = new JMenuItem(new HelpAction(parent));\r\n\t\thelpMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_H,\r\n\t\t\t\tEvent.CTRL_MASK));\r\n\t\thelpMenu.add(helpMenuItem);\r\n\r\n\t\t// JCheckBoxMenuItem clock = new JCheckBoxMenuItem(new\r\n\t\t// ScheduleSaveAction(parent));\r\n\t\t// helpMenu.add(clock);\r\n\t\thelpMenu.addSeparator();\r\n\t\tJMenuItem showMemItem = new JMenuItem(new ShowMemAction(parent));\r\n\t\thelpMenu.add(showMemItem);\r\n\r\n\t\tJMenuItem aboutMenuItem = new JMenuItem(new AboutAction(parent));\r\n\t\thelpMenu.add(aboutMenuItem);\r\n\t}", "private void fixFileOption() {\n\t\t\n\t\tnewFileOption.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tnew CreateFileFrame(main, true , controller);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t\topenFileOption.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tJFileChooser fileSelector = new JFileChooser();\n\t\t\t\tFileNameExtensionFilter fileFilter = new FileNameExtensionFilter(\"ASM , IN, OUT\", \"asm\", \"in\",\"out\");\n\t\t\t\tfileSelector.setFileFilter(fileFilter);\n\t\t\t\t\n\t\t\t\tint option = fileSelector.showOpenDialog(openFileOption);\n\t\t\t\t\n\t\t\t\tif(option == JFileChooser.APPROVE_OPTION){\n\t\t\t\t\tString path = fileSelector.getSelectedFile().getPath();\n\t\t\t\t\tString extension = path.substring(path.lastIndexOf('.') + 1);\n\t\t\t\t\t\n\t\t\t\t\tif (extension.equalsIgnoreCase(\"in\")) {\n\t\t\t\t\t\tcontroller.changeIn(path);\n\t\t\t\t\t}\n\t\t\t\t\telse if (extension.equalsIgnoreCase(\"out\")) {\n\t\t\t\t\t\tcontroller.changeOut(path);\n\t\t\t\t\t}\n\t\t\t\t\telse if (extension.equalsIgnoreCase(\"asm\")) {\n\t\t\t\t\t\tcontroller.changeProgram(path);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\texitOption.addActionListener(new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent arg0){\n\t\t\t\toptionExit();\n\t\t\t}\n\t\t});\n\t}", "private JMenu createFileMenu() {\n\t\tJMenu menu = new JMenu(\"File\"); \n\t\tmenu.add(createDetectiveNotes());\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}", "@Override\n\tpublic void windowClosing(WindowEvent arg0)\n\t{\n\t\tMenu ini = new Menu();\n\t\tini.frmInicio.setVisible(true);\n\t\tthis.frame.setVisible(false);\n\t}", "@Override\n\t\tpublic void closeMenu() {\n\t\t}", "public Menu createFileMenu();", "private JMenu getFileMenu() {\n\t\tif (fileMenu == null) {\n\t\t\tfileMenu = new JMenu();\n\t\t\tfileMenu.setText(\"Súbor\");\n\t\t\t//fileMenu.add(getSaveMenuItem());\n\t\t\tfileMenu.add(getExitMenuItem());\n\t\t\tfileMenu.addActionListener(new java.awt.event.ActionListener() {\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\n\t\t\t\t\tSystem.out.println(\"actionPerformed()\"); // TODO Auto-generated Event stub actionPerformed()\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn fileMenu;\n\t}", "public void jMenuFileExit_actionPerformed(ActionEvent e) {\n System.exit(0);\n }", "@SuppressWarnings( \"unchecked\" )\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n menubarMain = new javax.swing.JMenuBar();\n menuFile = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jMenuItem3 = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JSeparator();\n menuitemExit = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n menuFile.setText(\"File\");\n\n jMenuItem1.setText(\"jMenuItem1\");\n menuFile.add(jMenuItem1);\n\n jMenuItem2.setText(\"jMenuItem2\");\n menuFile.add(jMenuItem2);\n\n jMenuItem3.setText(\"jMenuItem3\");\n menuFile.add(jMenuItem3);\n menuFile.add(jSeparator1);\n\n menuitemExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.CTRL_MASK));\n menuitemExit.setText(\"Exit\");\n menuitemExit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n menuitemExitActionPerformed(evt);\n }\n });\n menuFile.add(menuitemExit);\n\n menubarMain.add(menuFile);\n\n setJMenuBar(menubarMain);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 279, Short.MAX_VALUE)\n );\n\n pack();\n }", "MenuItem getMenuItemClose();", "private JMenu getFileMenu() {\n if (fileMenu == null) {\n fileMenu = new JMenu();\n fileMenu.setText(\"File\");\n fileMenu.add(getExitMenuItem());\n }\n return fileMenu;\n }", "public void menu()\n {\n CMenu cMenu = new CMenu();\n window.dispose();\n }", "MenuBar setMenu() {\r\n\t\t// initially set up the file chooser to look for cfg files in current directory\r\n\t\tMenuBar menuBar = new MenuBar(); // create main menu\r\n\r\n\t\tMenu mFile = new Menu(\"File\"); // add File main menu\r\n\t\tMenuItem mExit = new MenuItem(\"Exit\"); // whose sub menu has Exit\r\n\t\tmExit.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\tpublic void handle(ActionEvent t) { // action on exit\r\n\t\t\t\ttimer.stop(); // stop timer\r\n\t\t\t\tSystem.exit(0); // exit program\r\n\t\t\t}\r\n\t\t});\r\n\t\tmFile.getItems().addAll(mExit); // add load, save and exit to File menu\r\n\r\n\t\tMenu mHelp = new Menu(\"Help\"); // create Help menu\r\n\t\tMenuItem mAbout = new MenuItem(\"About\"); // add Welcome sub menu item\r\n\t\tmAbout.setOnAction(new EventHandler<ActionEvent>() {\r\n\t\t\t@Override\r\n\t\t\tpublic void handle(ActionEvent actionEvent) {\r\n\t\t\t\tshowAbout(); // whose action is to give welcome message\r\n\t\t\t}\r\n\t\t});\r\n\t\tmHelp.getItems().addAll(mAbout); // add Welcome and About to Run main item\r\n\r\n\t\tmenuBar.getMenus().addAll(mFile, mHelp); // set main menu with File, Config, Run, Help\r\n\t\treturn menuBar; // return the menu\r\n\t}", "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}", "private JMenu getFileMenu() {\n\t\tif (fileMenu == null) {\n\t\t\tfileMenu = new JMenu();\n\t\t\tfileMenu.setText(\"File\");\n\t\t\tfileMenu.add(getExitMenuItem());\n\t\t}\n\t\treturn fileMenu;\n\t}", "private void exitNoFileButActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitNoFileButActionPerformed\n noFile.setVisible(false);\n }", "public void setUpFileMenu() {\n add(fileMenu);\n fileMenu.add(new OpenAction(parent));\n fileMenu.add(new SaveAction(parent));\n fileMenu.add(new SaveAsAction(parent));\n fileMenu.addSeparator();\n fileMenu.add(new ShowWorldPrefsAction(parent.getWorldPanel()));\n fileMenu.add(new CloseAction(parent.getWorkspaceComponent()));\n }", "private JMenuBar createMenubar() {\n\t\t\tJFrame error = new JFrame();\n\t\t\tJMenuBar menubar = new JMenuBar(); //creates new menu bar\n\t\t\tJMenu mnuFile = new JMenu(\"File\"); //creates file option\n\t\t\tmnuFile.setMnemonic(KeyEvent.VK_F);\n\t\t\tJMenuItem mniFileExit = new JMenuItem(\"Exit\"); //creates exit button\n\t\t\tmniFileExit.setMnemonic(KeyEvent.VK_E);\n\t\t\tmniFileExit.setToolTipText(\"Exit application\"); //sets tool tip\n\t\t\tmniFileExit.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) { //when clicked\n\t\t\t\t\n\t\t\t\t System.exit(0); } //exit program\n\t\t\t});\n\t\t\t\n\t\t\t//Reset StartUp Location\n\t\t\tJMenuItem reset = new JMenuItem(\"Reset Current\");\n\t\t\treset.setMnemonic(KeyEvent.VK_R);\n\t\t\treset.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) {\n\t\t\t\t JFrame frame = new JFrame();\n\t\t\t\t String txt = JOptionPane.showInputDialog(frame, \"Enter the city name of your new current location:\"); //prompts user for their current location\n\t\t\t\t\tArrayList<location> simLoc = dataBase.search(txt);\n\t\t\t\t\tif (simLoc == null) JOptionPane.showMessageDialog(frame, \"'\" + txt + \"' not found.\");\n\t\t\t\t\telse if (simLoc.size() == 1){\n\t\t\t\t\t\tlocation searchedLoc = simLoc.get(0);\n\t\t\t\t\t\tapp.setCurrentLocation(searchedLoc);\n\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\trefreshPanels();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tString [] possibilities = new String[simLoc.size()];\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int i = 0; i < simLoc.size(); i ++){\n\t\t\t\t\t\t\tpossibilities[i] = i + 1 + \". \" + simLoc.get(i).getName() + \", \" + simLoc.get(i).getCountryCode() + \" Lat: \" \n\t\t\t\t\t\t\t\t\t+ simLoc.get(i).getLatitude() + \" Long: \" + simLoc.get(i).getLongitude();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString response = (String) JOptionPane.showInputDialog(frame, \"Which '\" + txt + \"' did you mean?\", \"Search Location\", \n\t\t\t\t\t\t\t\tJOptionPane.QUESTION_MESSAGE, null, possibilities, \"Titan\");\n\t\t\t\t\t\n\t\t\t\t\t\tif (response != null) {\n\t\t\t\t\t\t\t\tlocation searchedLoc = simLoc.get(Integer.parseInt(response.substring(0, response.indexOf('.'))) - 1);\n\t\t\t\t\t\t\t\tapp.setCurrentLocation(searchedLoc);\n\t\t\t\t\t\t\t\tapp.setVisibleLocation(searchedLoc);\n\t\t\t\t\t\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\t\t\t\t\t\tpopulateMyLocationsBox();\n\t\t\t\t\t\t\t\trefreshPanels();\n\t\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t }\n\t\t\t \t\n\t\t\t});\n\t\t\t\n\t\t\tJMenuItem switchTo = new JMenuItem(\"Switch to Current\");\n\t\t\tswitchTo.setMnemonic(KeyEvent.VK_S);\n\t\t\tswitchTo.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) {\n\t\t\t\t app.setVisibleLocation(app.getCurrentLocation());\n\t\t\t\t refreshPanels();\n\t\t\t }\n\t\t\t\t \n\t\t\t });\n\t\t\t\n\t\t\t//Refresh button\n\t\t\tJMenuItem refresh = new JMenuItem(\"Refresh\");\n\t\t\trefresh.setMnemonic(KeyEvent.VK_F);\n\t\t\tupdateRefreshTime();\n\t\t\trefresh.addActionListener(new ActionListener() {\n\t\t\t @Override\n\t\t\t public void actionPerformed(ActionEvent event) {\t\n\t\t\t\t refreshPanels(); \n\t\t\t \t}\n\t\t\t});\n\t\t\tmnuFile.add(switchTo);\n\t\t\tmnuFile.add(reset);\n\t\t\tmnuFile.add(refresh);\n\t\t\tmnuFile.add(mniFileExit); //adds it to the menubar\n\t\t\tmenubar.add(mnuFile);\n\t\t\t\n\t\t\t//oF/oC check box\n\t\t\tJCheckBox degree = new JCheckBox();\n\t\t\tdegree.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent event){\n\t\t\t\t\tif(((JCheckBox) event.getSource()).isSelected()){\n\t\t\t\t\t\tapp.setUnits(\"imperial\");\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tapp.setUnits(\"metric\");\n\t\t\t\t\t}\n\t\t\t\t\trefreshPanels();\n\t\t\t\t}\n\t\t\t});\n\t\t\tmenubar.add(degree);\n\t\t\tJLabel degLabel = new JLabel(\"oF\");\n\t\t\tmenubar.add(degLabel);\n\t\t\tmenubar.add(new JLabel(\" \"));\n\t\t\t\n\t\t\t//Locations -> MyLocations\n\t\t\tlocBar.removeActionListener(Jcombo);\n\t\t\tpopulateMyLocationsBox();\n\t\t\tmenubar.add(locBar);\n\t\t\t\t\t\t\n\t\t\t//Search text box\n\t\t\tJTextField txtBar = new JTextField(\"Search Location\");\n\t\t\ttxtBar.addActionListener(new ActionListener() {\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent event){\n\t\t\t\t\tsearchBoxUsed(((JTextField) event.getSource()).getText());\n\t\t\t\t}\n\t\t\t});\n\t\t\tmenubar.add(txtBar);\n\t\t\t\t\n\t\t\t\n\t\t\treturn menubar;\n\t\t}", "public JMenu createFileMenu(){\n\t\tJMenu menu = new JMenu(\"File\");\n\t\tmenu.add(createFileResetItem());\n\t\tmenu.add(createFilePracticeItem());\t\t\n\t\tmenu.add(createFileExitItem());\n\t\treturn menu;\n\t}", "public void InitializeMenu(){\n\t\tmnbBar = new JMenuBar();\n\t\tmnuFile = new JMenu(\"File\");\n\t\tmnuFormat = new JMenu(\"Format\");\n\t\tmniOpen = new JMenuItem(\"Open\");\n\t\tmniExit = new JMenuItem(\"Exit\");\n\t\tmniSave = new JMenuItem(\"Save\");\n\t\tmniSaveAs = new JMenuItem(\"Save as\");\n\t\tmniSaveAs.setMnemonic(KeyEvent.VK_A);\n\t\tmniSave.setMnemonic(KeyEvent.VK_S);\n\t\tmniChangeBgColor = new JMenuItem(\"Change Backgroud Color\");\n\t\tmniChangeFontColor = new JMenuItem(\"Change Font Color\");\n\t\t//them menu item vao menu file\n\t\tmnuFile.add(mniOpen);\n\t\tmnuFile.addSeparator();\n\t\tmnuFile.add(mniExit);\n\t\tmnuFile.add(mniSaveAs);\n\t\tmnuFile.add(mniSave);\n\t\t//them menu item vao menu format\n\t\tmnuFormat.add(mniChangeBgColor);\n\t\tmnuFormat.addSeparator();\n\t\tmnuFormat.add(mniChangeFontColor);\n\t\t//them menu file va menu format vao menu bar\n\t\tmnbBar.add(mnuFile);\n\t\tmnbBar.add(mnuFormat);\n\t\t//thiet lap menubar thanh menu chinh cua frame\n\t\tsetJMenuBar(mnbBar);\n\t}", "public FileMenu(ChatWindow parentWindow) {\r\n\r\n super(Messages.getI18NString(\"file\").getText());\r\n\r\n this.parentWindow = parentWindow;\r\n\r\n this.setForeground(new Color(\r\n ColorProperties.getColor(\"chatMenuForeground\")));\r\n\r\n this.add(saveMenuItem);\r\n this.add(printMenuItem);\r\n\r\n this.addSeparator();\r\n\r\n this.add(closeMenuItem);\r\n\r\n this.saveMenuItem.setName(\"save\");\r\n this.printMenuItem.setName(\"print\");\r\n this.closeMenuItem.setName(\"close\");\r\n\r\n this.saveMenuItem.addActionListener(this);\r\n this.printMenuItem.addActionListener(this);\r\n this.closeMenuItem.addActionListener(this);\r\n\r\n this.setMnemonic(Messages.getI18NString(\"file\").getMnemonic());\r\n this.saveMenuItem.setMnemonic(saveString.getMnemonic());\r\n this.printMenuItem.setMnemonic(printString.getMnemonic());\r\n this.closeMenuItem.setMnemonic(closeString.getMnemonic());\r\n \r\n this.saveMenuItem.setAccelerator(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_S,\r\n KeyEvent.CTRL_MASK));\r\n \r\n this.printMenuItem.setAccelerator(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_R,\r\n KeyEvent.CTRL_MASK));\r\n \r\n // Disable all menu items that do nothing.\r\n this.saveMenuItem.setEnabled(false);\r\n this.printMenuItem.setEnabled(false);\r\n }", "public MenuBar(TrcAttendance parent)\n {\n this.parent = parent;\n\n fileMenu.setFont(parent.smallFont);\n fileNewItem.setFont(parent.smallFont);\n fileOpenItem.setFont(parent.smallFont);\n fileEditItem.setFont(parent.smallFont);\n fileCloseItem.setFont(parent.smallFont);\n fileAboutItem.setFont(parent.smallFont);\n fileExitItem.setFont(parent.smallFont);\n\n fileMenu.setMnemonic(KeyEvent.VK_F);\n menuBar.add(fileMenu);\n\n fileNewItem.setMnemonic(KeyEvent.VK_N);\n fileNewItem.addActionListener(this);\n fileMenu.add(fileNewItem);\n\n fileOpenItem.setMnemonic(KeyEvent.VK_O);\n fileOpenItem.addActionListener(this);\n fileMenu.add(fileOpenItem);\n\n fileEditItem.setMnemonic(KeyEvent.VK_E);\n fileEditItem.addActionListener(this);\n fileMenu.add(fileEditItem);\n\n fileCloseItem.setMnemonic(KeyEvent.VK_C);\n fileCloseItem.addActionListener(this);\n fileMenu.add(fileCloseItem);\n\n fileMenu.addSeparator();\n\n fileAboutItem.setMnemonic(KeyEvent.VK_A);\n fileAboutItem.addActionListener(this);\n fileMenu.add(fileAboutItem);\n\n fileExitItem.setMnemonic(KeyEvent.VK_X);\n fileExitItem.addActionListener(this);\n fileMenu.add(fileExitItem);\n\n //\n // We start with New/Open enabled and Edit/Close disabled.\n //\n setMenuItemsEnabled(true, true, false, false);\n parent.frame.setJMenuBar(menuBar);\n }", "public ExitMenu(){\n\t\tint n = showConfirmDialog(null,\"Exit Game\", \"Exiting Game\",JOptionPane.YES_NO_OPTION);\n\t\tif(n==0)\n\t\t\tSystem.exit(0);\t\t\n\t}", "private void addExitMenuItem(JMenu fileMenu) {\n JMenuItem exitItem = new JMenuItem(\"Exit\");\n fileMenu.add(exitItem);\n exitItem.addActionListener(e -> System.exit(0));\n }", "public void exitToMenu()\n {\n exitToMenuFlag = true;\n }", "private void btCancelarActionPerformed(java.awt.event.ActionEvent evt) {\n new Menu().setVisible(true);\n this.dispose();\n }", "private void btCancelarActionPerformed(java.awt.event.ActionEvent evt) {\n new Menu().setVisible(true);\n this.dispose();\n }", "public JMenuBar createMenuBar ()\n {\n MenuListener menuListener = new MenuListener ();\n\t //-----------------------------Menu options.--------------------------------------------------------------\n JMenu fileMenu = new JMenu (\"File\");\n JMenu editMenu = new JMenu (\"Edit\");\n JMenu viewMenu = new JMenu (\"View\");\n JMenu colorMenu = new JMenu (\"Colors\");\n JMenu filterMenu = new JMenu (\"Filter\");\n JMenu helpMenu = new JMenu (\"Help\");\n\n //----------------------------Submenu options.-------------------------------------------------------------\n JMenuItem newMenuItem = new JMenuItem (\"New\",new ImageIcon(\"../img/new.gif\"));\n newMenuItem.addActionListener (menuListener);\n newMenuItem.setEnabled (true);\n\n JMenuItem openMenuItem = new JMenuItem (\"Open\",new ImageIcon(\"../img/open.gif\"));\n openMenuItem.addActionListener (menuListener);\n openMenuItem.setEnabled (true);\n\n JMenuItem saveMenuItem = new JMenuItem (\"Save\",new ImageIcon(\"../img/save.gif\"));\n saveMenuItem.addActionListener (menuListener);\n saveMenuItem.setEnabled (true);\n \n JMenuItem exitMenuItem = new JMenuItem (\"Exit\",new ImageIcon(\"../img/close.gif\"));\n exitMenuItem.addActionListener (menuListener);\n exitMenuItem.setEnabled (true);\n \n fileMenu.add (newMenuItem);\n fileMenu.add (openMenuItem);\n fileMenu.add (saveMenuItem);\n fileMenu.add (exitMenuItem);\n\n //---------------------------------------------End of File Menu--------------------------------------------\n JMenuItem undoMenuItem = new JMenuItem (\"Undo\",new ImageIcon(\"../img/undo.gif\"));\n undoMenuItem.addActionListener (menuListener);\n undoMenuItem.setEnabled (true);\n\n JMenuItem redoMenuItem = new JMenuItem (\"Redo\",new ImageIcon(\"../img/redo.gif\"));\n redoMenuItem.addActionListener (menuListener);\n redoMenuItem.setEnabled (true);\n\n JMenuItem clearMenuItem = new JMenuItem (\"Clear All\",new ImageIcon(\"../img/clear.gif\"));\n clearMenuItem.addActionListener (menuListener);\n clearMenuItem.setEnabled (true);\n\n editMenu.add (undoMenuItem);\n editMenu.add (redoMenuItem);\n editMenu.add (clearMenuItem);\n\n //----------------------------------------End of Edit Menu-------------------------------------------------\n JMenuItem toolboxMenuItem = new JMenuItem (\"Tool Box\",new ImageIcon(\"../img/tool.gif\"));\n toolboxMenuItem.addActionListener(menuListener);\n toolboxMenuItem.setEnabled (true);\n\n JMenuItem colorboxMenuItem = new JMenuItem (\"Color Box\",new ImageIcon(\"../img/cbox.gif\"));\n colorboxMenuItem.addActionListener(menuListener);\n colorboxMenuItem.setEnabled (true);\n\n JMenuItem cursorMenuItem = new JMenuItem (\"Cursor Position\",new ImageIcon(\"../img/pos.gif\"));\n cursorMenuItem.addActionListener(menuListener);\n cursorMenuItem.setEnabled (true);\n \n viewMenu.add (toolboxMenuItem);\n viewMenu.add (colorboxMenuItem);\n viewMenu.add (cursorMenuItem);\n\n //--------------------------------------End of View Menu-------------------------------------------------- \n JMenuItem editcolorMenuItem = new JMenuItem (\"Edit Colors\",new ImageIcon(\"../img/color.gif\"));\n editcolorMenuItem.addActionListener(menuListener);\n editcolorMenuItem.setEnabled (true);\n \n colorMenu.add (editcolorMenuItem);\n\n //------------------------------------End of Color Menu--------------------------------------------------- \n JMenuItem brightnessMenuItem = new JMenuItem (\"Brightness\",new ImageIcon(\"../img/bright.gif\"));\n brightnessMenuItem.addActionListener(menuListener);\n brightnessMenuItem.setEnabled (true);\n \n JMenuItem blurMenuItem = new JMenuItem (\"Blur\",new ImageIcon(\"../img/blur.gif\"));\n blurMenuItem.addActionListener(menuListener);\n blurMenuItem.setEnabled (true);\n \n filterMenu.add (brightnessMenuItem);\n filterMenu.add (blurMenuItem);\n\n //--------------------------------------End of Filter Menu------------------------------------------------ \n JMenuItem helpMenuItem = new JMenuItem (\"Help Topics\",new ImageIcon(\"../img/help.gif\"));\n helpMenuItem.addActionListener(menuListener);\n helpMenuItem.setEnabled (true); \n JMenuItem aboutMenuItem = new JMenuItem (\"About Multi Brush\",new ImageIcon(\"../img/license.gif\"));\n aboutMenuItem.addActionListener(menuListener);\n aboutMenuItem.setEnabled (true);\n \n helpMenu.add (helpMenuItem);\n helpMenu.add (aboutMenuItem);\n\n //-----------------------------------------End of Help Menu----------------------------------------------- \t \n JMenuBar menubar = new JMenuBar ();\n menubar.add (fileMenu);\n menubar.add (editMenu);\n menubar.add (viewMenu);\n menubar.add (colorMenu);\n //menubar.add (filterMenu);\n menubar.add (helpMenu);\n\n return menubar;\n }", "private void initialize() {\r\n this.setJMenuBar(getMainMenuBar());\r\n this.setContentPane(getPaneContent());\r\n\r\n this.setSize(800, 600);\r\n this.setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);\r\n this.addWindowListener(new java.awt.event.WindowAdapter() { \r\n\r\n \tpublic void windowClosing(java.awt.event.WindowEvent e) { \r\n\r\n \t\tgetMainMenuBar().getMenuFileControl().exit();\r\n \t}\r\n });\r\n\r\n this.setVisible(false);\r\n\t}", "private void onMenuClickCNF() {\r\n\t\tswitchMainPanelTo(CARDTYPE_CREATENEWFILE);\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\ttxtCNFName.grabFocus();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "private void initDialog() {\n\t\tint res = JOptionPane.showConfirmDialog(this,\n\t\t\t\tString.format(\"Are you sure you want to delete the file \\\"%s\\\" from your %s account?\",\n\t\t\t\t\t\t this.fileToDelete.getPath(), this.fileToDelete.getRemoteDrive().getServiceNiceName()));\n\t\tif (res == JOptionPane.YES_OPTION) {\n\t\t\tDelMethodWorker dmw = new DelMethodWorker(this.fileToDelete);\n\t\t\tdmw.execute();\n\t\t\tboolean succ;\n\t\t\tint delResult;\n\t\t\t\n\t\t\ttry {\n\t\t\t\tsucc = dmw.get(); //TODO: This will block until the file is deleted!\n\t\t\t\tif (succ) {\n\t\t\t\t\t//TODO\n\t\t\t\t\t// I think this should be done by callback, but I\n\t\t\t\t\t// can't get it to work so I've passed in the\n\t\t\t\t\t// model to this dialog... -Cam\n\t\t\t\t\tmodel.removeElement(fileToDelete);\n\t\t\t\t\t\n\t\t\t\t\tdelResult = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\t\"File had been deleted.\", \"Delete file success\",\n\t\t\t\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\tdelResult = JOptionPane.showConfirmDialog(this,\n\t\t\t\t\t\t\t\"Delete file failed...\" + \"Try again.\",\n\t\t\t\t\t\t\t\"Delete file failure\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t}\n\n\t\t\t\tif (delResult == JOptionPane.YES_OPTION) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} catch (InterruptedException | ExecutionException e1) {\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "@Override\n public void propertyChange(PropertyChangeEvent evt) {\n if (evt.getPropertyName().equals(CLOSE_EVENT)) {\n getFileChooser().updateUI();\n }\n }", "protected void initializeFileMenu() {\n\t\tfinal JMenu fileMenu = new JMenu(\"File\");\n\t\tthis.add(fileMenu);\n\t\t// Status\n\t\tfinal JMenuItem sysStatusItem = new JMenuItem();\n\t\tsysStatusItem.setAction(this.commands.findById(CmdStatus.DEFAULT_ID));\n\t\tsysStatusItem.setAccelerator(KeyStroke.getKeyStroke('S',\n\t\t\t\tInputEvent.CTRL_DOWN_MASK));\n\t\tfileMenu.add(sysStatusItem);\n\t\t// Log\n\t\tfinal JMenuItem sysLogItem = new JMenuItem();\n\t\tsysLogItem.setAction(this.commands.findById(CmdLog.DEFAULT_ID));\n\t\tsysLogItem.setAccelerator(KeyStroke.getKeyStroke('L',\n\t\t\t\tInputEvent.CTRL_DOWN_MASK));\n\t\tfileMenu.add(sysLogItem);\n\t\t// Separator\n\t\tfileMenu.add(new JSeparator());\n\t\t// Exit\n\t\tfinal JMenuItem exitItem = new JMenuItem(\"Exit\");\n\t\texitItem.setAction(this.commands.findById(CmdExit.DEFAULT_ID));\n\t\texitItem.setAccelerator(KeyStroke.getKeyStroke('Q',\n\t\t\t\tInputEvent.CTRL_DOWN_MASK));\n\t\tfileMenu.add(exitItem);\n\t}", "public void setFileMenu(JMenu fileMenu) {\n this.fileMenu = fileMenu;\n }", "private MenuManager createFileMenu(\tIWorkbenchWindow window) {\n\t\tMenuManager menu = new MenuManager(Messages.getString(\"IU.Strings.39\"),IWorkbenchActionConstants.M_FILE); //$NON-NLS-1$\n\t\t\n\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_START));\n\n\t\tIContributionItem[] items=menu.getItems();\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.NEW_EXT));\n\t\t/**/\n\t\t/**/\n\t\tmenu.add(getAction(ActionFactory.CLOSE.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.CLOSE_EXT));\n\n\t\tmenu.add(new Separator());\n\n\t\tmenu.add(getAction(ActionFactory.SAVE.getId()));\n\t\tmenu.add(getAction(ActionFactory.SAVE_AS.getId()));\n\t\t//menu.add(getAction(ActionFactory.REVERT.getId()));\n\t\tmenu.add(new Separator());\n\t\tmenu.add(getAction(ActionFactory.PRINT.getId()));\n\t\t\n\t\tmenu.add(ContributionItemFactory.REOPEN_EDITORS.create(window));\n\n\t\tmenu.add(new Separator());\n\n\t\tmenu.add(getAction(ActionFactory.QUIT.getId()));\n\t\tmenu.add(new GroupMarker(IWorkbenchActionConstants.FILE_END));\n\n\t\t\n\t\t//remove convert line delimiter and open file doublon\n\t\tActionSetRegistry reg = WorkbenchPlugin.getDefault().getActionSetRegistry();\n\t\tIActionSetDescriptor[] actionSets = reg.getActionSets();\n\t\t//String actionSetId = \"org.eclipse.ui.edit.text.actionSet.navigation\"; //$NON-NLS-1$\n\t\tString actionSetId = \"org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo\"; //$NON-NLS-1$\n\t\tString actionSetId2 = \"org.eclipse.ui.actionSet.openFiles\"; //$NON-NLS-1$\n\t\t// Removing convert line delimiters menu.\n\n\t\tfor (int i = 0; i <actionSets.length; i++)\n\t\t{\n\t\t\tif ((!actionSets[i].getId().equals(actionSetId)) && (!actionSets[i].getId().equals(actionSetId2)))\n\t\t\t\tcontinue;\n\t\t\tIExtension ext = actionSets[i].getConfigurationElement()\n\t\t\t\t.getDeclaringExtension();\n\t\t\treg.removeExtension(ext, new Object[] { actionSets[i] });\n\t\t}\n\t\treturn menu;\n\t}", "private void startMenuBar() no topo\n {\n //Inicializa a barra de menus\n JMenuBar menuBar = new JMenuBar();\n JMenu menuFile = new JMenu(\"File\");\n JMenu menuProgram = new JMenu(\"Program\");\n JMenuItem fileOpen = new JMenuItem(\"Open\");\n fileOpen.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n setFileName();\n }\n });\n menuFile.add(fileOpen);\n \n JMenuItem programClose = new JMenuItem(\"Close\");\n programClose.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e)\n {\n System.exit(0);\n }\n });\n menuProgram.add(programClose);\n \n menuBar.add(menuFile);\n menuBar.add(menuProgram);\n mainFrame.add(menuBar, BorderLayout.PAGE_START);\n }", "void fileNewEmptyWindowActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent e)\n\t{\n\t\t// Handle The Various Menu Item Actions\n\t\tswitch (e.getActionCommand())\n\t\t{\n\t\t\t// File Menu Options\n\t\t\tcase \"New Window\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'File' > 'New Window'\");\n\n\t\t\t\t// Remove Action Listener's From Old Window Menu Bar And Close The Window\n\t\t\t\tNEW_WINDOW.removeActionListener(this);\n\t\t\t\tCLOSE.removeActionListener(this);\n\t\t\t\tUNDO.removeActionListener(this);\n\t\t\t\tREDO.removeActionListener(this);\n\t\t\t\tINSTRUCTIONS.removeActionListener(this);\n\t\t\t\tABOUT.removeActionListener(this);\n\t\t\t\tDEBUG.removeActionListener(this);\n\t\t\t\tWindow.close();\n\n\t\t\t\t// Call Main In The Launcher Class To Run A New Paint Window On The Event-Dispatch Thread\n\t\t\t\tLauncher.main(null);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Close\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'File' > 'Close'\");\n\n\t\t\t\t// Close The Paint Application Window And Quit The Application\n\t\t\t\tWindow.close();\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Edit Menu Options\n\t\t\tcase \"Undo\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Edit' > 'Undo'\");\n\n\t\t\t\t// Call The Undo Function In The Window Class\n\t\t\t\tWindow.undo();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Redo\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Edit' > 'Redo'\");\n\n\t\t\t\t// Call The Redo Function In The Window Class\n\t\t\t\tWindow.redo();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Help Menu Options\n\t\t\tcase \"Instructions\":\n\t\t\tcase \"About\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Help' > '\" + e.getActionCommand() + \"'\");\n\n\t\t\t\t// Call The Show Help Function In The Window Class\n\t\t\t\tWindow.showHelp(e);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"Debug\":\n\t\t\t{\n\t\t\t\tSystem.out.println(\"User Selected 'Help' > 'Debug'\");\n\n\t\t\t\t// Call The Debug Function In The Window Class\n\t\t\t\tWindow.debug();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault:\n\t\t\t{\n\t\t\t\t// Print The Un-Recognized Menu Item That Was Selected\n\t\t\t\tSystem.out.println(e.getActionCommand());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "public void backMenu() {\n openWindowGeneral(\"/gui/administrator/fxml/FXMLMenuAdministrator.fxml\", btnCancel);\n }", "private void exitForm(java.awt.event.WindowEvent evt) {\n int aux = Funcoes.voltar(\"Deseja voltar ao menu de opções?\",\"SIM\",\"NÃO\");\n if (aux == 1){\n new MenuOpcoes().setVisible(true);\n this.dispose();\n }\n }", "public Menu() {\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tMenu.setAlwaysOnTop(true);\r\n\t\tMenu.setBackground(Color.LIGHT_GRAY);\r\n\t\tMenu.setResizable(false);\r\n\t\t\r\n\t\tMenu.setIconImage(Toolkit.getDefaultToolkit().getImage(Menu.class.getResource(\"/images/iconoTT.png\")));\r\n\t\t\r\n\t\tMenu.setTitle(\"TText v1.0\");\r\n\t\tMenu.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\t\tMenu.setBounds(100, 100, 405, 293);\r\n\t\t\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBackground(Color.DARK_GRAY);\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tcontentPane.setLayout(new BorderLayout(0, 0));\r\n\t\t\r\n\t\tMenu.setContentPane(contentPane);\r\n\t\t\r\n\t\tJPanel panel = new JPanel();\t\r\n\t\tpanel.setBackground(Color.DARK_GRAY);\r\n\t\tcontentPane.add(panel, BorderLayout.CENTER);\r\n\t\tpanel.setLayout(null);\r\n\t\t\r\n\t\tJButton btnNewFile = new JButton(\"\");\r\n\t\tbtnNewFile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfunc.NewFile(Menu);\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tbtnNewFile.setToolTipText(\"New file...\");\r\n\t\tbtnNewFile.setIcon(new ImageIcon(Menu.class.getResource(\"/images/new_document.png\")));\r\n\t\tbtnNewFile.setBounds(72, 35, 42, 51);\r\n\t\tpanel.add(btnNewFile);\r\n\t\t\r\n\t\tJButton Button_OpenFile = new JButton(\"\");\r\n\t\tButton_OpenFile.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tfunc.OpenFileIni(Menu);\r\n\t\t\t}\r\n\t\t});\r\n\t\tButton_OpenFile.setToolTipText(\"Open file...\");\r\n\t\tButton_OpenFile.setIcon(new ImageIcon(Menu.class.getResource(\"/images/open_document.png\")));\r\n\t\tButton_OpenFile.setBounds(276, 35, 62, 51);\r\n\t\tpanel.add(Button_OpenFile);\r\n\t\t\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setToolTipText(\"Menu\");\r\n\t\tlabel.setBounds(0, 0, 389, 255);\r\n\t\tlabel.setIcon(new ImageIcon(Menu.class.getResource(\"/images/home.png\")));\r\n\t\tpanel.add(label);\r\n\t\t\r\n\t\tImageIcon background = new ImageIcon(Menu.class.getResource(\"/images/home.png\"));\r\n\t\t\r\n\t\tMenu.setVisible(true);\r\n\t}", "public void onOpenFile() {\n\t\t\n\t\t//if things are dirty, ask if they're sure they want to do this\n\t\tif(FormDesignerController.getIsDirty())\n\t\t{\n\t\t\t//if the use says no, then bounce\n\t\t\tif(!Window.confirm(LocaleText.get(\"newFormConfirm\")))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\tOpenFromFileDialog dlg = OpenFromFileDialog.getInstnace(controller);\n\t\tdlg.center();\n\t\t\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jSeparator4 = new javax.swing.JSeparator();\n desktopPane = new javax.swing.JDesktopPane();\n menuBar = new javax.swing.JMenuBar();\n fileMenu = new javax.swing.JMenu();\n openMenuItem = new javax.swing.JMenuItem();\n saveMenuItem = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JPopupMenu.Separator();\n CadPro = new javax.swing.JMenuItem();\n jSeparator5 = new javax.swing.JPopupMenu.Separator();\n jMenuItem6 = new javax.swing.JMenuItem();\n jSeparator2 = new javax.swing.JPopupMenu.Separator();\n exitMenuItem = new javax.swing.JMenuItem();\n jMenu1 = new javax.swing.JMenu();\n jMenuItem1 = new javax.swing.JMenuItem();\n jMenuItem10 = new javax.swing.JMenuItem();\n jMenuItem11 = new javax.swing.JMenuItem();\n helpMenu = new javax.swing.JMenu();\n contentMenuItem = new javax.swing.JMenuItem();\n jMenu3 = new javax.swing.JMenu();\n jMenuItem8 = new javax.swing.JMenuItem();\n jMenuItem3 = new javax.swing.JMenuItem();\n jMenuItem7 = new javax.swing.JMenuItem();\n jMenuItem2 = new javax.swing.JMenuItem();\n jSeparator6 = new javax.swing.JPopupMenu.Separator();\n jMenuItem5 = new javax.swing.JMenuItem();\n jMenuItem9 = new javax.swing.JMenuItem();\n jMenuItem4 = new javax.swing.JMenuItem();\n jMenu2 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"System Hardsearch - CONTROLE DPESSOAL - Versão: 1.0-20.0813.0\");\n\n fileMenu.setBorder(null);\n fileMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/register.png\"))); // NOI18N\n fileMenu.setMnemonic('f');\n fileMenu.setText(\"Cadrastrar\");\n\n openMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_U, java.awt.event.InputEvent.SHIFT_MASK));\n openMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/user.png\"))); // NOI18N\n openMenuItem.setMnemonic('o');\n openMenuItem.setText(\"Cadastrar Usuario\");\n openMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n openMenuItemActionPerformed(evt);\n }\n });\n fileMenu.add(openMenuItem);\n\n saveMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F, java.awt.event.InputEvent.SHIFT_MASK));\n saveMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/funcionario.png\"))); // NOI18N\n saveMenuItem.setMnemonic('s');\n saveMenuItem.setText(\"Cadastrar Funcionário\");\n saveMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveMenuItemActionPerformed(evt);\n }\n });\n fileMenu.add(saveMenuItem);\n fileMenu.add(jSeparator1);\n\n CadPro.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.SHIFT_MASK));\n CadPro.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/procedimento.png\"))); // NOI18N\n CadPro.setMnemonic('y');\n CadPro.setText(\"Cadastrar Procedimento\");\n CadPro.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n CadProActionPerformed(evt);\n }\n });\n fileMenu.add(CadPro);\n fileMenu.add(jSeparator5);\n\n jMenuItem6.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_E, java.awt.event.InputEvent.SHIFT_MASK));\n jMenuItem6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/company.png\"))); // NOI18N\n jMenuItem6.setText(\"Cadastrar Empresa\");\n jMenuItem6.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem6ActionPerformed(evt);\n }\n });\n fileMenu.add(jMenuItem6);\n fileMenu.add(jSeparator2);\n\n exitMenuItem.setForeground(new java.awt.Color(255, 0, 51));\n exitMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/exit_black.png\"))); // NOI18N\n exitMenuItem.setMnemonic('x');\n exitMenuItem.setText(\"Exit\");\n exitMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n exitMenuItemActionPerformed(evt);\n }\n });\n fileMenu.add(exitMenuItem);\n\n menuBar.add(fileMenu);\n\n jMenu1.setBorder(null);\n jMenu1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/coparti.png\"))); // NOI18N\n jMenu1.setText(\"Recursos Humanos\");\n\n jMenuItem1.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/controle.png\"))); // NOI18N\n jMenuItem1.setText(\"Controle de Coparticipação\");\n jMenuItem1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem1ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem1);\n\n jMenuItem10.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/integracao.png\"))); // NOI18N\n jMenuItem10.setText(\"Controle de Contratos\");\n jMenuItem10.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem10ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem10);\n\n jMenuItem11.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/calendar.png\"))); // NOI18N\n jMenuItem11.setText(\"Controle de Cotistas\");\n jMenuItem11.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem11ActionPerformed(evt);\n }\n });\n jMenu1.add(jMenuItem11);\n\n menuBar.add(jMenu1);\n\n helpMenu.setBorder(null);\n helpMenu.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/seguranca.png\"))); // NOI18N\n helpMenu.setMnemonic('h');\n helpMenu.setText(\"Seg. Trabalho\");\n\n contentMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/integracao.png\"))); // NOI18N\n contentMenuItem.setMnemonic('c');\n contentMenuItem.setText(\"Controle Integração\");\n contentMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n contentMenuItemActionPerformed(evt);\n }\n });\n helpMenu.add(contentMenuItem);\n\n menuBar.add(helpMenu);\n\n jMenu3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/relatorios.png\"))); // NOI18N\n jMenu3.setText(\"Consultas e Relatórios\");\n\n jMenuItem8.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem8.setText(\"Relat. Parcelas\");\n jMenuItem8.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem8ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem8);\n\n jMenuItem3.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem3.setText(\"Relat. Coparticipações Cadastradas\");\n jMenuItem3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem3ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem3);\n\n jMenuItem7.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem7.setText(\"Relatório Razão Pagamento x Arrecadação Coparti.\");\n jMenuItem7.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem7ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem7);\n\n jMenuItem2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/controlepro.png\"))); // NOI18N\n jMenuItem2.setText(\"Listagem de Coparticipações P/Conferência\");\n jMenuItem2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem2ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem2);\n jMenu3.add(jSeparator6);\n\n jMenuItem5.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem5.setText(\"Relatório de Integrações Vencidas\");\n jMenuItem5.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem5ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem5);\n\n jMenuItem9.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/rela.png\"))); // NOI18N\n jMenuItem9.setText(\"Relatório de Integrações Cadastradas\");\n jMenuItem9.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem9ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem9);\n\n jMenuItem4.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/alert.png\"))); // NOI18N\n jMenuItem4.setText(\"Alertas DP\");\n jMenuItem4.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuItem4ActionPerformed(evt);\n }\n });\n jMenu3.add(jMenuItem4);\n\n menuBar.add(jMenu3);\n\n jMenu2.setForeground(new java.awt.Color(255, 0, 0));\n jMenu2.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/img/exit_black.png\"))); // NOI18N\n jMenu2.setText(\"Exit\");\n jMenu2.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n jMenu2MouseClicked(evt);\n }\n });\n menuBar.add(jMenu2);\n\n setJMenuBar(menuBar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 1220, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(desktopPane, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 800, Short.MAX_VALUE)\n );\n\n pack();\n }", "private void createMenus() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\t\r\n\t\tJMenu fileMenu = new LJMenu(\"file\", flp);\r\n\t\tmenuBar.add(fileMenu);\r\n\t\t\r\n\t\tfileMenu.add(new JMenuItem(createBlankDocument));\r\n\t\tfileMenu.add(new JMenuItem(openDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAction));\r\n\t\tfileMenu.add(new JMenuItem(saveDocumentAsAction));\r\n\t\tfileMenu.add(new JMenuItem(closeCurrentTabAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(getStatsAction));\r\n\t\tfileMenu.addSeparator();\r\n\t\tfileMenu.add(new JMenuItem(exitAction));\r\n\t\t\r\n\t\tJMenu editMenu = new LJMenu(\"edit\", flp);\r\n\t\tmenuBar.add(editMenu);\r\n\t\t\r\n\t\teditMenu.add(new JMenuItem(copyAction));\r\n\t\teditMenu.add(new JMenuItem(pasteAction));\r\n\t\teditMenu.add(new JMenuItem(cutAction));\r\n\t\t\r\n\t\tJMenu langMenu = new LJMenu(\"lang\", flp);\r\n\t\tJMenuItem hr = new LJMenuItem(\"cro\", flp);\r\n\t\thr.addActionListener((l) -> { \r\n\t\t\tLocalizationProvider.getInstance().setLanguage(\"hr\");\r\n\t\t\tcurrentLang = \"hr\";\r\n\t\t});\r\n\t\t\r\n\t\tlangMenu.add(hr);\r\n\t\tJMenuItem en = new LJMenuItem(\"eng\", flp);\r\n\t\ten.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"en\");\r\n\t\t\t currentLang = \"en\";\r\n\t\t});\r\n\t\tlangMenu.add(en);\r\n\t\tJMenuItem de = new LJMenuItem(\"de\", flp);\r\n\t\tde.addActionListener((l) -> { \r\n\t\t\t LocalizationProvider.getInstance().setLanguage(\"de\");\r\n\t\t\t currentLang = \"de\";\r\n\t\t});\r\n\t\tlangMenu.add(de);\r\n\t\tmenuBar.add(langMenu);\r\n\t\t\r\n\t\tJMenu toolsMenu = new LJMenu(\"tools\", flp);\r\n\t\tJMenuItem toUp = new JMenuItem(toUpperCaseAction);\r\n\t\ttoolsMenu.add(toUp);\r\n\t\ttoggable.add(toUp);\r\n\t\ttoUp.setEnabled(false);\r\n\t\tJMenuItem toLow = new JMenuItem(toLowerCaseAction);\r\n\t\ttoolsMenu.add(toLow);\r\n\t\ttoggable.add(toLow);\r\n\t\ttoLow.setEnabled(false);\r\n\t\tJMenuItem inv = new JMenuItem(invertSelected);\r\n\t\ttoolsMenu.add(inv);\r\n\t\ttoggable.add(inv);\r\n\t\tinv.setEnabled(false);\r\n\t\tmenuBar.add(toolsMenu);\r\n\t\t\r\n\t\tJMenu sort = new LJMenu(\"sort\", flp);\r\n\t\tJMenuItem sortAsc = new JMenuItem(sortAscAction);\r\n\t\tsort.add(sortAsc);\r\n\t\ttoggable.add(sortAsc);\r\n\t\tJMenuItem sortDesc = new JMenuItem(sortDescAction);\r\n\t\tsort.add(sortDesc);\r\n\t\ttoggable.add(sortDesc);\r\n\t\tJMenuItem uniq = new JMenuItem(uniqueLinesAction);\r\n\t\ttoolsMenu.add(uniq);\r\n\t\ttoggable.add(uniq);\r\n\t\t\r\n\t\ttoolsMenu.add(sort);\r\n\t\tsetJMenuBar(menuBar);\r\n\r\n\t}", "void cancelButton_actionPerformed(ActionEvent e)\n\t{\n\t\tcloseDlg();\n }", "@Override\n\t\t\t\tpublic void notifyOnRightButtonClick(Button b)\n\t\t\t\t{\n\t\t\t\t\tfilesBrowser.obtainShowDialog().hide();\n\t\t\t\t}", "private void closeDialog(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_closeDialog\n setVisible(false); \n actionCommand = false;\n dispose();\n }", "private void setDefaultCloseOperation() {\n\t\t\r\n\t}", "private void createMenus() {\r\n\t\t// File menu\r\n\t\tmenuFile = new JMenu(Constants.C_FILE_MENU_TITLE);\r\n\t\tmenuBar.add(menuFile);\r\n\t\t\r\n\t\tmenuItemExit = new JMenuItem(Constants.C_FILE_ITEM_EXIT_TITLE);\r\n\t\tmenuItemExit.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\r\n\t\t\t\tactionOnClicExit();\t\t// Action triggered when the Exit item is clicked.\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuFile.add(menuItemExit);\r\n\t\t\r\n\t\t// Help menu\r\n\t\tmenuHelp = new JMenu(Constants.C_HELP_MENU_TITLE);\r\n\t\tmenuBar.add(menuHelp);\r\n\t\t\r\n\t\tmenuItemHelp = new JMenuItem(Constants.C_HELP_ITEM_HELP_TITLE);\r\n\t\tmenuItemHelp.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemHelp);\r\n\t\t\r\n\t\tmenuItemAbout = new JMenuItem(Constants.C_HELP_ITEM_ABOUT_TITLE);\r\n\t\tmenuItemAbout.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicAbout();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemAbout);\r\n\t\t\r\n\t\tmenuItemReferences = new JMenuItem(Constants.C_HELP_ITEM_REFERENCES_TITLE);\r\n\t\tmenuItemReferences.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tactionOnClicReferences();\r\n\t\t\t}\r\n\t\t});\r\n\t\tmenuHelp.add(menuItemReferences);\r\n\t}", "private void buildMenu() {\r\n\t\tJMenuBar mainmenu = new JMenuBar();\r\n\t\tsetJMenuBar(mainmenu);\r\n\r\n\t\tui.fileMenu = new JMenu(\"File\");\r\n\t\tui.editMenu = new JMenu(\"Edit\");\r\n\t\tui.viewMenu = new JMenu(\"View\");\r\n\t\tui.helpMenu = new JMenu(\"Help\");\r\n\t\t\r\n\t\tui.fileNew = new JMenuItem(\"New...\");\r\n\t\tui.fileOpen = new JMenuItem(\"Open...\");\r\n\t\tui.fileImport = new JMenuItem(\"Import...\");\r\n\t\tui.fileSave = new JMenuItem(\"Save\");\r\n\t\tui.fileSaveAs = new JMenuItem(\"Save as...\");\r\n\t\tui.fileExit = new JMenuItem(\"Exit\");\r\n\r\n\t\tui.fileOpen.setAccelerator(KeyStroke.getKeyStroke('O', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.fileSave.setAccelerator(KeyStroke.getKeyStroke('S', InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.fileImport.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doImport(); } });\r\n\t\tui.fileExit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { dispose(); doExit(); } });\r\n\t\t\r\n\t\tui.fileOpen.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoLoad();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSave.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSave();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.fileSaveAs.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoSaveAs();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editUndo = new JMenuItem(\"Undo\");\r\n\t\tui.editUndo.setEnabled(undoManager.canUndo()); \r\n\t\t\r\n\t\tui.editRedo = new JMenuItem(\"Redo\");\r\n\t\tui.editRedo.setEnabled(undoManager.canRedo()); \r\n\t\t\r\n\t\t\r\n\t\tui.editCut = new JMenuItem(\"Cut\");\r\n\t\tui.editCopy = new JMenuItem(\"Copy\");\r\n\t\tui.editPaste = new JMenuItem(\"Paste\");\r\n\t\t\r\n\t\tui.editCut.addActionListener(new Act() { @Override public void act() { doCut(true, true); } });\r\n\t\tui.editCopy.addActionListener(new Act() { @Override public void act() { doCopy(true, true); } });\r\n\t\tui.editPaste.addActionListener(new Act() { @Override public void act() { doPaste(true, true); } });\r\n\t\t\r\n\t\tui.editPlaceMode = new JCheckBoxMenuItem(\"Placement mode\");\r\n\t\t\r\n\t\tui.editDeleteBuilding = new JMenuItem(\"Delete building\");\r\n\t\tui.editDeleteSurface = new JMenuItem(\"Delete surface\");\r\n\t\tui.editDeleteBoth = new JMenuItem(\"Delete both\");\r\n\t\t\r\n\t\tui.editClearBuildings = new JMenuItem(\"Clear buildings\");\r\n\t\tui.editClearSurface = new JMenuItem(\"Clear surface\");\r\n\r\n\t\tui.editUndo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doUndo(); } });\r\n\t\tui.editRedo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doRedo(); } });\r\n\t\tui.editClearBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearBuildings(true); } });\r\n\t\tui.editClearSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doClearSurfaces(true); } });\r\n\t\t\r\n\r\n\t\tui.editUndo.setAccelerator(KeyStroke.getKeyStroke('Z', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editRedo.setAccelerator(KeyStroke.getKeyStroke('Y', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCut.setAccelerator(KeyStroke.getKeyStroke('X', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editCopy.setAccelerator(KeyStroke.getKeyStroke('C', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPaste.setAccelerator(KeyStroke.getKeyStroke('V', InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editPlaceMode.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F3, 0));\r\n\t\t\r\n\t\tui.editDeleteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0));\r\n\t\tui.editDeleteSurface.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.editDeleteBoth.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editDeleteBuilding.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBuilding(); } });\r\n\t\tui.editDeleteSurface.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteSurface(); } });\r\n\t\tui.editDeleteBoth.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDeleteBoth(); } });\r\n\t\tui.editPlaceMode.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doPlaceMode(ui.editPlaceMode.isSelected()); } });\r\n\t\t\r\n\t\tui.editPlaceRoads = new JMenu(\"Place roads\");\r\n\t\t\r\n\t\tui.editResize = new JMenuItem(\"Resize map\");\r\n\t\tui.editCleanup = new JMenuItem(\"Remove outbound objects\");\r\n\t\t\r\n\t\tui.editResize.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoResize();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.editCleanup.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoCleanup();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.editCutBuilding = new JMenuItem(\"Cut: building\");\r\n\t\tui.editCutSurface = new JMenuItem(\"Cut: surface\");\r\n\t\tui.editPasteBuilding = new JMenuItem(\"Paste: building\");\r\n\t\tui.editPasteSurface = new JMenuItem(\"Paste: surface\");\r\n\t\tui.editCopyBuilding = new JMenuItem(\"Copy: building\");\r\n\t\tui.editCopySurface = new JMenuItem(\"Copy: surface\");\r\n\t\t\r\n\t\tui.editCutBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editCopyBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\tui.editPasteBuilding.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_V, InputEvent.CTRL_DOWN_MASK | InputEvent.SHIFT_DOWN_MASK));\r\n\t\t\r\n\t\tui.editCutBuilding.addActionListener(new Act() { @Override public void act() { doCut(false, true); } });\r\n\t\tui.editCutSurface.addActionListener(new Act() { @Override public void act() { doCut(true, false); } });\r\n\t\tui.editCopyBuilding.addActionListener(new Act() { @Override public void act() { doCopy(false, true); } });\r\n\t\tui.editCopySurface.addActionListener(new Act() { @Override public void act() { doCopy(true, false); } });\r\n\t\tui.editPasteBuilding.addActionListener(new Act() { @Override public void act() { doPaste(false, true); } });\r\n\t\tui.editPasteSurface.addActionListener(new Act() { @Override public void act() { doPaste(true, false); } });\r\n\t\t\r\n\t\tui.viewZoomIn = new JMenuItem(\"Zoom in\");\r\n\t\tui.viewZoomOut = new JMenuItem(\"Zoom out\");\r\n\t\tui.viewZoomNormal = new JMenuItem(\"Zoom normal\");\r\n\t\tui.viewBrighter = new JMenuItem(\"Daylight (1.0)\");\r\n\t\tui.viewDarker = new JMenuItem(\"Night (0.5)\");\r\n\t\tui.viewMoreLight = new JMenuItem(\"More light (+0.05)\");\r\n\t\tui.viewLessLight = new JMenuItem(\"Less light (-0.05)\");\r\n\t\t\r\n\t\tui.viewShowBuildings = new JCheckBoxMenuItem(\"Show/hide buildings\", renderer.showBuildings);\r\n\t\tui.viewShowBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewSymbolicBuildings = new JCheckBoxMenuItem(\"Minimap rendering mode\", renderer.minimapMode);\r\n\t\tui.viewSymbolicBuildings.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_M, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewTextBackgrounds = new JCheckBoxMenuItem(\"Show/hide text background boxes\", renderer.textBackgrounds);\r\n\t\tui.viewTextBackgrounds.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewTextBackgrounds.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleTextBackgrounds(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomIn(); } });\r\n\t\tui.viewZoomOut.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomOut(); } });\r\n\t\tui.viewZoomNormal.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doZoomNormal(); } });\r\n\t\tui.viewShowBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleBuildings(); } });\r\n\t\tui.viewSymbolicBuildings.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doToggleMinimap(); } });\r\n\t\t\r\n\t\tui.viewBrighter.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doBright(); } });\r\n\t\tui.viewDarker.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doDark(); } });\r\n\t\tui.viewMoreLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doMoreLight(); } });\r\n\t\tui.viewLessLight.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { doLessLight(); } });\r\n\t\t\r\n\t\tui.viewZoomIn.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD9, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomOut.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD3, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewZoomNormal.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD0, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewMoreLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD8, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewLessLight.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD2, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewBrighter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD7, InputEvent.CTRL_DOWN_MASK));\r\n\t\tui.viewDarker.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_NUMPAD1, InputEvent.CTRL_DOWN_MASK));\r\n\t\t\r\n\t\tui.viewStandardFonts = new JCheckBoxMenuItem(\"Use standard fonts\", TextRenderer.USE_STANDARD_FONTS);\r\n\t\t\r\n\t\tui.viewStandardFonts.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoStandardFonts();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.viewPlacementHints = new JCheckBoxMenuItem(\"View placement hints\", renderer.placementHints);\r\n\t\tui.viewPlacementHints.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoViewPlacementHints();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.helpOnline = new JMenuItem(\"Online wiki...\");\r\n\t\tui.helpOnline.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoHelp();\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.helpAbout = new JMenuItem(\"About...\");\r\n\t\tui.helpAbout.setEnabled(false); // TODO implement\r\n\t\t\r\n\t\tui.languageMenu = new JMenu(\"Language\");\r\n\t\t\r\n\t\tui.languageEn = new JRadioButtonMenuItem(\"English\", true);\r\n\t\tui.languageEn.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"en\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tui.languageHu = new JRadioButtonMenuItem(\"Hungarian\", false);\r\n\t\tui.languageHu.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tsetLabels(\"hu\");\r\n\t\t\t}\r\n\t\t});\r\n\t\tButtonGroup bg = new ButtonGroup();\r\n\t\tbg.add(ui.languageEn);\r\n\t\tbg.add(ui.languageHu);\r\n\t\t\r\n\t\tui.fileRecent = new JMenu(\"Recent\");\r\n\t\tui.clearRecent = new JMenuItem(\"Clear recent\");\r\n\t\tui.clearRecent.addActionListener(new Act() {\r\n\t\t\t@Override\r\n\t\t\tpublic void act() {\r\n\t\t\t\tdoClearRecent();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\taddAll(ui.fileRecent, ui.clearRecent);\r\n\t\t\r\n\t\taddAll(mainmenu, ui.fileMenu, ui.editMenu, ui.viewMenu, ui.languageMenu, ui.helpMenu);\r\n\t\taddAll(ui.fileMenu, ui.fileNew, null, ui.fileOpen, ui.fileRecent, ui.fileImport, null, ui.fileSave, ui.fileSaveAs, null, ui.fileExit);\r\n\t\taddAll(ui.editMenu, ui.editUndo, ui.editRedo, null, \r\n\t\t\t\tui.editCut, ui.editCopy, ui.editPaste, null, \r\n\t\t\t\tui.editCutBuilding, ui.editCopyBuilding, ui.editPasteBuilding, null, \r\n\t\t\t\tui.editCutSurface, ui.editCopySurface, ui.editPasteSurface, null, \r\n\t\t\t\tui.editPlaceMode, null, ui.editDeleteBuilding, ui.editDeleteSurface, ui.editDeleteBoth, null, \r\n\t\t\t\tui.editClearBuildings, ui.editClearSurface, null, ui.editPlaceRoads, null, ui.editResize, ui.editCleanup);\r\n\t\taddAll(ui.viewMenu, ui.viewZoomIn, ui.viewZoomOut, ui.viewZoomNormal, null, \r\n\t\t\t\tui.viewBrighter, ui.viewDarker, ui.viewMoreLight, ui.viewLessLight, null, \r\n\t\t\t\tui.viewShowBuildings, ui.viewSymbolicBuildings, ui.viewTextBackgrounds, ui.viewStandardFonts, ui.viewPlacementHints);\r\n\t\taddAll(ui.helpMenu, ui.helpOnline, null, ui.helpAbout);\r\n\t\t\r\n\t\taddAll(ui.languageMenu, ui.languageEn, ui.languageHu);\r\n\t\t\r\n\t\tui.fileNew.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdoNew();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tui.toolbar = new JToolBar(\"Tools\");\r\n\t\tContainer c = getContentPane();\r\n\t\tc.add(ui.toolbar, BorderLayout.PAGE_START);\r\n\r\n\t\tui.toolbarCut = createFor(\"res/Cut24.gif\", \"Cut\", ui.editCut, false);\r\n\t\tui.toolbarCopy = createFor(\"res/Copy24.gif\", \"Copy\", ui.editCopy, false);\r\n\t\tui.toolbarPaste = createFor(\"res/Paste24.gif\", \"Paste\", ui.editPaste, false);\r\n\t\tui.toolbarRemove = createFor(\"res/Remove24.gif\", \"Remove\", ui.editDeleteBuilding, false);\r\n\t\tui.toolbarUndo = createFor(\"res/Undo24.gif\", \"Undo\", ui.editUndo, false);\r\n\t\tui.toolbarRedo = createFor(\"res/Redo24.gif\", \"Redo\", ui.editRedo, false);\r\n\t\tui.toolbarPlacementMode = createFor(\"res/Down24.gif\", \"Placement mode\", ui.editPlaceMode, true);\r\n\r\n\t\tui.toolbarUndo.setEnabled(false);\r\n\t\tui.toolbarRedo.setEnabled(false);\r\n\t\t\r\n\t\tui.toolbarNew = createFor(\"res/New24.gif\", \"New\", ui.fileNew, false);\r\n\t\tui.toolbarOpen = createFor(\"res/Open24.gif\", \"Open\", ui.fileOpen, false);\r\n\t\tui.toolbarSave = createFor(\"res/Save24.gif\", \"Save\", ui.fileSave, false);\r\n\t\tui.toolbarImport = createFor(\"res/Import24.gif\", \"Import\", ui.fileImport, false);\r\n\t\tui.toolbarSaveAs = createFor(\"res/SaveAs24.gif\", \"Save as\", ui.fileSaveAs, false);\r\n\t\tui.toolbarZoomNormal = createFor(\"res/Zoom24.gif\", \"Zoom normal\", ui.viewZoomNormal, false);\r\n\t\tui.toolbarZoomIn = createFor(\"res/ZoomIn24.gif\", \"Zoom in\", ui.viewZoomIn, false);\r\n\t\tui.toolbarZoomOut = createFor(\"res/ZoomOut24.gif\", \"Zoom out\", ui.viewZoomOut, false);\r\n\t\tui.toolbarBrighter = createFor(\"res/TipOfTheDay24.gif\", \"Daylight\", ui.viewBrighter, false);\r\n\t\tui.toolbarDarker = createFor(\"res/TipOfTheDayDark24.gif\", \"Night\", ui.viewDarker, false);\r\n\t\tui.toolbarHelp = createFor(\"res/Help24.gif\", \"Help\", ui.helpOnline, false);\r\n\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarNew);\r\n\t\tui.toolbar.add(ui.toolbarOpen);\r\n\t\tui.toolbar.add(ui.toolbarSave);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarImport);\r\n\t\tui.toolbar.add(ui.toolbarSaveAs);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarCut);\r\n\t\tui.toolbar.add(ui.toolbarCopy);\r\n\t\tui.toolbar.add(ui.toolbarPaste);\r\n\t\t\r\n\t\tui.toolbar.add(ui.toolbarRemove);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarUndo);\r\n\t\tui.toolbar.add(ui.toolbarRedo);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarPlacementMode);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarZoomNormal);\r\n\t\tui.toolbar.add(ui.toolbarZoomIn);\r\n\t\tui.toolbar.add(ui.toolbarZoomOut);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarBrighter);\r\n\t\tui.toolbar.add(ui.toolbarDarker);\r\n\t\tui.toolbar.addSeparator();\r\n\t\tui.toolbar.add(ui.toolbarHelp);\r\n\t\t\r\n\t}", "public void exitMenu(){\n }", "private void initComponents() {\n\n fileChooser\t\t\t= new javax.swing.JFileChooser();\n jScrollPane1 \t\t= new javax.swing.JScrollPane();\n editorTextArea \t\t= new javax.swing.JTextArea();\n jToolBar1 \t\t\t= new javax.swing.JToolBar();\n abrirArchivoButton \t= new javax.swing.JButton();\n SalirButton \t\t= new javax.swing.JButton();\n jMenuBar1 \t\t\t= new javax.swing.JMenuBar();\n jMenu1 \t\t\t\t= new javax.swing.JMenu();\n abrirMenuItem \t\t= new javax.swing.JMenuItem();\n salirMenuItem \t\t= new javax.swing.JMenuItem();\n\n\n fileChooser.setFileFilter(new MiFiltroArchivo());\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n editorTextArea.setColumns(20);\n editorTextArea.setRows(5);\n jScrollPane1.setViewportView(editorTextArea);\n\n jToolBar1.setRollover(true);\n\n abrirArchivoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./abrir grande.png\"))); // NOI18N\n abrirArchivoButton.setFocusable(false);\n abrirArchivoButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n abrirArchivoButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n abrirArchivoButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n abrirMenuItemActionPerformed(evt);\n }\n });\n \n jToolBar1.add(abrirArchivoButton);\n\n SalirButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./salir grande.png\"))); // NOI18N\n SalirButton.setFocusable(false);\n SalirButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n SalirButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n SalirButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salirMenuItemActionPerformed(evt);\n }\n });\n jToolBar1.add(SalirButton);\n\n jMenu1.setText(\"Archivo\");\n\n abrirMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_A, java.awt.event.InputEvent.CTRL_MASK));\n abrirMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./abrir chico.png\"))); // NOI18N\n abrirMenuItem.setText(\"Abrir\");\n abrirMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n abrirMenuItemActionPerformed(evt);\n }\n });\n jMenu1.add(abrirMenuItem);\n\n salirMenuItem.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));\n salirMenuItem.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"./salir chico.png\"))); // NOI18N\n salirMenuItem.setText(\"Salir\");\n salirMenuItem.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n salirMenuItemActionPerformed(evt);\n }\n });\n jMenu1.add(salirMenuItem);\n\n jMenuBar1.add(jMenu1);\n\n setJMenuBar(jMenuBar1);\n \n codeTextArea = new JTextArea();\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n layout.setHorizontalGroup(\n \tlayout.createParallelGroup(Alignment.LEADING)\n \t\t.addGroup(layout.createSequentialGroup()\n \t\t\t.addContainerGap()\n \t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n \t\t\t\t.addComponent(codeTextArea, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n \t\t\t\t.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)\n \t\t\t\t.addComponent(jToolBar1, GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE))\n \t\t\t.addContainerGap())\n );\n layout.setVerticalGroup(\n \tlayout.createParallelGroup(Alignment.LEADING)\n \t\t.addGroup(layout.createSequentialGroup()\n \t\t\t.addComponent(jToolBar1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n \t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n \t\t\t.addComponent(jScrollPane1, GroupLayout.DEFAULT_SIZE, 282, Short.MAX_VALUE)\n \t\t\t.addGap(18)\n \t\t\t.addComponent(codeTextArea, GroupLayout.PREFERRED_SIZE, 215, GroupLayout.PREFERRED_SIZE)\n \t\t\t.addContainerGap())\n );\n getContentPane().setLayout(layout);\n \n this.methodsList = new JList<String>();\n \n this.methodsList.addListSelectionListener(new ListSelectionListener() {\n\t\t\t\n \t// Esta funcion se va a ejecutar cada vez que se cambie el estado\n \t// de seleccion de la list.\n\t\t\t@Override\n\t\t\tpublic void valueChanged(ListSelectionEvent e) {\n\t\t\t\tint selectedIndex = methodsList.getSelectedIndex();\n\t\t\t\t\n\t\t\t\tif (selectedIndex == -1) {\n\t\t\t\t\t// Si es -1, es porque no hay nada seleccionado\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// En este caso ya sabemos que hay algo que esta \n\t\t\t\t// seleccionado, de modo que podemos obtener el metodo seleccionado!\n\t\t\t\tMethod selectedMethod = methodFinder.getMethods().get(selectedIndex);\n\t\t\t\t\n\t\t\t\tservicios = new ArrayList<CodeInspectionService>();\n\t\t\t\t\n\t\t\t\t// Agregamos todos los servicios que necesitamos para analizar el codigo.\n\t\t\t\t// Cada vez que el programa pase por una linea, la enviará\n\t\t\t\t// a todos los servicios que esten registrados.\n\t\t\t\t// Los servicios entonces van a procesar esa linea y van a registrar\n\t\t\t\t// los resultados en un objeto CodeMetric.\n\t\t\t\t\n\t\t\t\t// Con este servicio contamos las lineas de codigo.\n\t\t\t\tservicios.add(new CodeLinesNumberInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos las lineas comentadas\n\t\t\t\tservicios.add(new CommentedLinesInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos la complejidad ciclomatica\n\t\t\t\tservicios.add(new CyclomaticComplexityInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos Halstead (?) quizas esto tengamos que separarlo en \n\t\t\t\t// otros servicios mas pequeños, porque hay varias metricas de halstead\n\t\t\t\tservicios.add(new HalsteadInspectionService());\n\t\t\t\t\n\t\t\t\t// Contamos el Fan In del metodo seleccionado\n\t\t\t\t// Fan in es la cantidad de veces que ese metodo\n\t\t\t\t// es invocado desde afuera\n\t\t\t\tservicios.add(new FanInInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\t// Contamos el Fan Out del metodo seleccionado\n\t\t\t\t// Fan out es la cantidad de veces que el metodo seleccionado\n\t\t\t\t// llama a otros metodos.\n\t\t\t\tservicios.add(new FanOutInspectionService(methodFinder.getMethods(), selectedMethod));\n\t\t\t\t\n\t\t\t\tIterator<String> methodLinesIterator = selectedMethod.getLines().iterator();\n\t\t\t\twhile(methodLinesIterator.hasNext()) {\n\t\t\t\t\tString line = methodLinesIterator.next();\n\t\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\t\tservicio.analyzeLine(line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tfor (CodeInspectionService servicio : servicios) {\n\t\t\t\t\tCodeMetric metrica = servicio.getMetric();\n\t\t\t\t\tsb.append(metrica.getName() + \": \" + metrica.getValue() + \"\\n\");\n\t\t\t\t}\n\t\t\t\teditorTextArea.setText(sb.toString());\n\t\t\t\t\n\t\t\t\t// Imprimimos el codigo en pantalla\n\t\t\t\t// para mostrar el metodo que estamos analizando.\n\t\t\t\tcodeTextArea.setText(selectedMethod.toString());\n\t\t\t\t\n\t\t\t}\n\t\t});\n \n jScrollPane1.setColumnHeaderView(methodsList);\n\n pack();\n }", "public void updateMenuFile() {\n\t\tif (fileMenu != null) {\n\t\t\tfileMenu.update();\n\t\t}\n\t}", "@Override\r\n public void actionPerformed(ActionEvent ae) {\r\n String option = ae.getActionCommand();\r\n PracticaProgramacion3Swing.log.append(ae.getActionCommand()+\"\\n\");\r\n switch(option){\r\n \r\n case \"Crear txt\":\r\n \r\n FuncionesMenus.newFile();\r\n FuncionesMenus.listFiles(); \r\n break;\r\n \r\n case \"Crear bin\":\r\n FuncionesMenus.newFileBin();\r\n FuncionesMenus.listFiles(); \r\n break;\r\n \r\n case \"Eliminar txt\":\r\n case \"Eliminar bin\": \r\n FuncionesMenus.delFile();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Renombrar txt\":\r\n case \"Renombrar bin\":\r\n FuncionesMenus.renameFile();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Escribir dni\":\r\n FuncionesMenus.writeLine();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Escribir DNI\":\r\n FuncionesMenus.writeLineBin();\r\n FuncionesMenus.listFiles();\r\n \r\n case \"Buscar dni\":\r\n FuncionesMenus.getID();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n case \"Buscar DNI\":\r\n FuncionesMenus.getIDBin();\r\n FuncionesMenus.listFiles();\r\n \r\n case \"Eliminar dni\":\r\n FuncionesMenus.delLine();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Eliminar DNI\":\r\n FuncionesMenus.delLineBin();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Extraer ficheros\": \r\n FuncionesMenus.getFiles();\r\n FuncionesMenus.listFiles();\r\n break;\r\n case \"Almacenar\":\r\n FuncionesMenus.getAll();\r\n FuncionesMenus.listFiles();\r\n break;\r\n \r\n default:\r\n break;\r\n } \r\n }", "private void openExitWindowConfirmation() {\n\t\t// int opcion = JOptionPane.showConfirmDialog(this, \"Desea salir del\n\t\t// Chat\", \"Confirmación\",\n\t\t// JOptionPane.YES_NO_OPTION);\n\t\t// if (opcion == JOptionPane.YES_OPTION) {\n\t\tthis.setVisible(false);\n\t\t// }\n\t}", "private void createContextMenu(){\r\n\t\tmenu = new JMenuBar();\r\n\t\tint ctrl;\r\n\t\tif(MAC)\r\n\t\t\tctrl = ActionEvent.META_MASK;\r\n\t\telse\r\n\t\t\tctrl = ActionEvent.CTRL_MASK;\r\n\r\n\t\tJMenu fileMenu = new JMenu(\"File\");\r\n\t\tnewMenu = new JMenuItem(\"New\");\r\n\t\tnewMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ctrl));\r\n\t\tnewMenu.addActionListener(this);\r\n\t\topenMenu = new JMenuItem(\"Open\");\r\n\t\topenMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ctrl));\r\n\t\topenMenu.addActionListener(this);\r\n\t\trecentMenu = new JMenu(\"Open Recent\");\r\n\t\tpopulateRecentMenu();\r\n\t\tsaveMenu = new JMenuItem(\"Save\");\r\n\t\tsaveMenu.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ctrl));\r\n\t\tsaveMenu.addActionListener(this);\r\n\t\tsaveAsMenu = new JMenuItem(\"Save As...\");\r\n\t\tsaveAsMenu.addActionListener(this);\r\n\t\tfileMenu.add(newMenu);\r\n\t\tfileMenu.add(openMenu);\r\n\t\tfileMenu.add(recentMenu);\r\n\t\tfileMenu.add(saveMenu);\r\n\t\tfileMenu.add(saveAsMenu);\r\n\r\n\t\tmenu.add(fileMenu);\r\n\r\n\t\tJMenu editMenu = new JMenu(\"Edit\");\r\n\t\tpreferencesMenu = new JMenuItem(\"Preferences\");\r\n\t\tpreferencesMenu.addActionListener(this);\r\n\t\teditMenu.add(preferencesMenu);\r\n\r\n\t\tmenu.add(editMenu);\r\n\r\n\t\tif(!MAC){\r\n\t\t\tJMenu helpMenu = new JMenu(\"Help\");\r\n\t\t\tJMenuItem aboutMenuI = new JMenuItem(\"About\");\r\n\r\n\t\t\taboutMenuI.addActionListener(new ActionListener(){\r\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\t\tshowAboutMenu();\r\n\t\t\t\t}\t\t\r\n\t\t\t});\r\n\t\t\thelpMenu.add(aboutMenuI);\r\n\t\t\tmenu.add(helpMenu);\r\n\t\t}\r\n\t}", "public JMenuItem createFileExitItem()\n {\n JMenuItem item = new JMenuItem(\"Exit\");\n class MenuItemListener implements ActionListener\n {\n public void actionPerformed(ActionEvent event)\n {\n System.exit(0);\n }\n }\n ActionListener listener = new MenuItemListener();\n item.addActionListener(listener);\n return item;\n }", "public MainWindow() {\n\t\tmainWindowInit();\n\t\t\n\t\tsetTitle(\"iRODS\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 757, 568);\n\t\t//Not working here.\n\t\tsetFocusable(true);\n\t\taddKeyListener(new KeyAdapter(){\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ESCAPE) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tJMenuBar menuBar = new JMenuBar();\n\t\tsetJMenuBar(menuBar);\n\n\t\tJMenu mnNewMenu_File = new JMenu(\"File\");\n\t\tmnNewMenu_File.setMnemonic('F');\n\t\tmenuBar.add(mnNewMenu_File);\n\n\t\tJMenuItem mntmNewMenuItem_Open = new JMenuItem(\"Open\");\n\t\tmntmNewMenuItem_Open.setAccelerator(KeyStroke.getKeyStroke(\n\t\t\t\tKeyEvent.VK_O, InputEvent.CTRL_MASK));\n\t\tmnNewMenu_File.add(mntmNewMenuItem_Open);\n\n\t\tJMenuItem mntmNewMenuItem_Exit = new JMenuItem(\"Exit\");\n\t\tmntmNewMenuItem_Exit.setAccelerator(KeyStroke.getKeyStroke(\n\t\t\t\tKeyEvent.VK_F4, InputEvent.ALT_MASK));\n\t\tmntmNewMenuItem_Exit.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tmnNewMenu_File.add(mntmNewMenuItem_Exit);\n\t\tJMenu mnHelp = new JMenu(\"Help\");\n\t\tmnHelp.setMnemonic('H');\n\t\tmenuBar.add(mnHelp);\n\t\tJMenuItem mntm_About = new JMenuItem(\"About\");\n\t\tmntm_About.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0));\n\t\tmntm_About.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"iRODS File Operations\",\n\t\t\t\t\t\t\"About iRODS ImageJ Plugin\", 1);\n\t\t\t}\n\t\t});\n\t\tmnHelp.add(mntm_About);\n\t\tcontentPanePanel = new JPanel();\n\t\tcontentPanePanel.setBorder(new EmptyBorder(0, 0, 0, 0));\n\n\t\tsetContentPane(contentPanePanel);\n\n\t\ttextbox_LoginId = new JTextField();\n\t\ttextbox_LoginId.setHorizontalAlignment(SwingConstants.LEFT);\n\t\ttextbox_LoginId.setToolTipText(\"User Id\");\n\t\ttextbox_LoginId.setColumns(13);\n\t\t\n\t\t\n\n\t\tfinal JButton button_Login = new JButton(\"Login\");\n\t\tbutton_Login.setToolTipText(\"Click to Login\");\n\t\tbutton_Login.setEnabled(true);\n\t\t/*\n\t\t * contentPane.getInputMap().put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER\n\t\t * ,0), button_Login);\n\t\t * contentPane.getRootPane().getActionMap().put(button_Login, new\n\t\t * AbstractAction(){ public void actionPerformed(ActionEvent ae) {\n\t\t * button_Login.doClick(); System.out.println(\"Login button-clicked\"); }\n\t\t * });\n\t\t */\n\n\t\tbutton_Login.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tloginMethod();\n\t\t\t}\n\t\t});\n\n\t\tJButton button_Cancel = new JButton(\"Cancel\");\n\t\tbutton_Cancel.setToolTipText(\"Click to close application\");\n\t\tbutton_Cancel.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\n\t\tJLabel Label_Username = new JLabel(\"User Name:\");\n\t\tLabel_Username.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tJLabel Label_Password = new JLabel(\"Password:\");\n\t\tLabel_Password.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\ttextField_passwordField = new JPasswordField();\n\t\ttextField_passwordField.setHorizontalAlignment(SwingConstants.LEFT);\n\t\ttextField_passwordField.setToolTipText(\"Password\");\n\t\t\n\t\ttextField_passwordField.addKeyListener(new KeyAdapter() {\n\t\t\tpublic void keyPressed(KeyEvent e) {\n\t\t\t\tif (e.getKeyCode() == KeyEvent.VK_ENTER) {\n\t\t\t\t\tloginMethod();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\ttextField_Port = new JTextField();\n\t\ttextField_Port.setText(Constants.PORT);\n\t\ttextField_Port.setToolTipText(\"Port No.\");\n\t\ttextField_Port.setColumns(10);\n\n\t\tJLabel Label_Port = new JLabel(\"Port:\");\n\t\tLabel_Port.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\tJLabel label_Zone = new JLabel(\"Zone:\");\n\t\tlabel_Zone.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\ttextField_Zone = new JTextField();\n\t\ttextField_Zone.setText(Constants.ZONE);\n\t\ttextField_Zone.setToolTipText(\"Zone\");\n\t\ttextField_Zone.setColumns(10);\n\n\t\ttextField_Host = new JTextField();\n\t\ttextField_Host.setHorizontalAlignment(SwingConstants.LEFT);\n\t\ttextField_Host.setToolTipText(\"Host Address\");\n\t\ttextField_Host.setText(Constants.HOST);\n\t\ttextField_Host.setColumns(10);\n\n\t\tJLabel label_Host = new JLabel(\"Host:\");\n\t\tlabel_Host.setHorizontalAlignment(SwingConstants.CENTER);\n\n\t\tJLabel homeDirectory_Label = new JLabel(\"File Selection:\");\n\n\t\tHomeDirectory_CheckBox = new JCheckBox(\"Home Directory\");\n\n\t\ttextField_ImageJCacheFolderPath = new JTextField();\n\t\ttextField_ImageJCacheFolderPath.setColumns(10);\n\t\ttextField_ImageJCacheFolderPath.setText(irodsImagej\n\t\t\t\t.getImageJCacheFolder());\n\n\t\tJLabel lblImagejCacheFolder = new JLabel(\"ImageJ Cache Folder:\");\n\t\tGroupLayout gl_contentPane = new GroupLayout(contentPanePanel);\n\t\t/*progressBar = new JProgressBar(0, 100);\n\t\tprogressBar.setValue(0);\n\t\tcontentPanePanel.addPropertyChangeListener(new PropertyChangeListener(){\n\t\t\tpublic void propertyChange(PropertyChangeEvent arg0) {\n\t\t\t\t\n\t\t\t}});*/\n\t\tgl_contentPane\n\t\t\t\t.setHorizontalGroup(gl_contentPane\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_contentPane.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(269).addComponent(button_Login)\n\t\t\t\t\t\t\t\t\t\t.addGap(18).addComponent(button_Cancel)\n\t\t\t\t\t\t\t\t\t\t.addContainerGap(237, Short.MAX_VALUE))\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(81)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLabel_Password)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLabel_Username)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLabel_Port)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel_Host)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel_Zone)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thomeDirectory_Label)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlblImagejCacheFolder))\n\t\t\t\t\t\t\t\t\t\t.addGap(26)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHomeDirectory_CheckBox)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap())\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_Zone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_Port,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t64)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_Host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t378,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_passwordField,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t378,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextbox_LoginId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t378,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_ImageJCacheFolderPath,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t378,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(10))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(85)))));\n\t\tgl_contentPane\n\t\t\t\t.setVerticalGroup(gl_contentPane\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGap(54)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tfalse)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLabel_Username)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextbox_LoginId,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addGap(17)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLabel_Password)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_passwordField,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLabel_Port)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_Port,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel_Zone)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_Zone,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addGap(15)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel_Host)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_Host,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t.addGap(18)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField_ImageJCacheFolderPath,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlblImagejCacheFolder))\n\t\t\t\t\t\t\t\t\t\t.addGap(15)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tHomeDirectory_CheckBox)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thomeDirectory_Label))\n\t\t\t\t\t\t\t\t\t\t.addGap(31)\n\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tgl_contentPane\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton_Login)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tbutton_Cancel))\n\t\t\t\t\t\t\t\t\t\t.addGap(51)));\n\t\tcontentPanePanel.setLayout(gl_contentPane);\n\t\t\n\t}", "public IOHandlerDialog()\n {\n panel = new JOptionPane();\n }", "public JMenuItem createFileExitItem(){\n\t\tJMenuItem item = new JMenuItem(\"Exit\");\n\t\tclass MenuItemListener implements ActionListener{\n\t\t\tpublic void actionPerformed(ActionEvent event){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t\tActionListener listener = new MenuItemListener();\n\t\titem.addActionListener(listener);\n\t\treturn item;\n\t}", "void close_actionPerformed(ActionEvent e){\n\t System.exit(0);\n\t }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n mi_popup = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n jMenu1.setText(\"File\");\n\n mi_popup.setText(\"Popup\");\n mi_popup.addActionListener(new java.awt.event.ActionListener()\n {\n public void actionPerformed(java.awt.event.ActionEvent evt)\n {\n mi_popupActionPerformed(evt);\n }\n });\n jMenu1.add(mi_popup);\n\n jMenuBar1.add(jMenu1);\n\n setJMenuBar(jMenuBar1);\n\n pack();\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n\t\tString str = String.format(\"Menu %d\", item.getItemId());\r\n\t\tLog.v(\"Debug\", str);\r\n\t\tswitch (item.getItemId()) {\r\n\t\t\t\r\n\t\tcase R.id.About:\r\n\t\t\tAboutDialog myAboutBox = new AboutDialog(this);\r\n\t\t\tmyAboutBox.show();\r\n\t\t\tbreak;\r\n\r\n\t\tcase R.id.settings:\r\n\t\t\tLog.v(\"Debug\", \"Settings dialog - creating\");\r\n\t\t\tSettingsDialog mySettingsBox = new SettingsDialog(this);\r\n\t\t\tLog.v(\"Debug\", \"Settings dialog completed\");\r\n\t\t\t\r\n\t\t\tmySettingsBox.Init();\r\n\t\t\tmySettingsBox.show();\r\n\t\t\tLog.v(\"Debug\", \"Settings shown\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase R.id.user:\r\n//\t\t\tLog.v(\"Debug\", \"Starting file dialog\");\r\n\t\t\t//Intent intent = new Intent(/*getBaseContext()*/C2H.this, FileDialog.class);\r\n//\t\t\tLog.v(\"Debug\", \"Starting file dialog put extra\");\r\n\t\t\t//intent.putExtra(FileDialog.START_PATH, \"/sdcard\");\r\n//\t\t\tLog.v(\"Debug\", \"Starting file dialog start activity\");\r\n\t\t\t//startActivityForResult(intent, REQUEST_SAVE);\r\n\t\t\tLog.v(\"Debug\", \"Starting file dialog done\");\r\n\t\t\t\r\n \t\tIntent fileIntent = new Intent(C2H.this, FileDialog.class);\r\n\t\t\tLog.v(\"Debug\", \"FD - put extra\");\r\n\t\t\tfileIntent.putExtra(FileDialog.START_PATH, \"/sdcard\");\r\n\t\t\tLog.v(\"Debug\", \"FD - start activity\");\r\n \t\tstartActivityForResult(fileIntent, REQUEST_SAVE);\r\n\t\t\tLog.v(\"Debug\", \"Starting file dialog done\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public void promptMenu()\n {\n Object[] options = {\"Display by Albums-First\", \"Display by Artists-First\",\n \"Search by Album Title\", \"Search by Artist Name\",\n \"Add Album to Catalog\"};\n \n String action = (String) JOptionPane.showInputDialog(null, \n \"Select an option:\", \"Music Library Menu\",\n JOptionPane.INFORMATION_MESSAGE,null,options,options[0]);\n try {\n switch(action)\n {\n case \"Display by Albums-First\" : displayByAlbums();\n break;\n case \"Display by Artists-First\" : displayByArtists();\n break;\n case \"Search by Album Title\" : searchByAlbum();\n break;\n case \"Search by Artist Name\" : searchByArtist();\n break;\n case \"Add Album to Catalog\" : addAlbum(fileName);\n break;\n default : //do nothing\n break;\n }\n }\n catch(NullPointerException e) { //NPE is thrown if user Cancels or X's.\n int quit = JOptionPane.showConfirmDialog(null, \"Do you want to quit?\",\n \"Quit Menu\",JOptionPane.YES_NO_OPTION);\n if(quit == 0)\n {\n JOptionPane.showMessageDialog(null, \"Thanks for using the library!\"); \n System.exit(0);\n }\n else\n promptMenu();\n }\n catch (FileNotFoundException e) { //for the case of addAlbum(fileName);\n System.err.println(\"Sorry, no file under the name '\" + fileName + \"' exists!\");\n System.exit(2);\n }\n promptMenu();\n }", "private JMenuBar createMenuBar() {\n\t\tJMenuBar jmb = new JMenuBar();\n\t\tImageIcon icon;\n\n\t\t// Create the File menu.\n\t\tJMenu jmFile = new JMenu(\"File\");\n\t\tthis.imageURL = getClass().getResource(\"/icons/folder-open_16.png\");\n\t\ticon = new ImageIcon(imageURL);\n\t\tJMenuItem jmiOpen = new JMenuItem(\"Open\", icon);\n\t\tjmiOpen.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tthis.imageURL = getClass().getResource(\"/icons/save_16.png\");\n\t\ticon = new ImageIcon(imageURL);\n\t\tJMenuItem jmiSave = new JMenuItem(\"Save\", icon);\n\t\tjmiSave.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tthis.imageURL = getClass().getResource(\"/icons/print_16.png\");\n\t\ticon = new ImageIcon(imageURL);\n\t\tJMenuItem jmiPrint = new JMenuItem(\"Print\", icon);\n\t\tjmiPrint.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tJMenuItem jmiExit = new JMenuItem(\"Exit\");\n\t\tjmiExit.addActionListener(event -> System.exit(0));\n\t\tjmFile.add(jmiOpen);\n\t\tjmFile.add(jmiSave);\n\t\tjmFile.addSeparator();\n\t\tjmFile.add(jmiPrint);\n\t\tjmFile.addSeparator();\n\t\tjmFile.add(jmiExit);\n\t\tjmb.add(jmFile);\n\n\t\t// Create the Options menu.\n\t\tJMenu jmOptions = new JMenu(\"Options\");\n\t\t// Create the Colors submenu.\n\t\tJMenu jmColors = new JMenu(\"Colors\");\n\t\tJRadioButtonMenuItem jmiBlue = new JRadioButtonMenuItem(blueAction);\n\t\tJRadioButtonMenuItem jmiRed = new JRadioButtonMenuItem(redAction);\n\t\tJRadioButtonMenuItem jmiYellow = new JRadioButtonMenuItem(yellowAction);\n\t\tjmColors.add(jmiBlue);\n\t\tjmColors.add(jmiRed);\n\t\tjmColors.add(jmiYellow);\n\t\tjmOptions.add(jmColors);\n\t\tButtonGroup bg = new ButtonGroup();\n\t\tbg.add(jmiBlue);\n\t\tbg.add(jmiRed);\n\t\tbg.add(jmiYellow);\n\t\tjmOptions.addSeparator();\n\t\tJCheckBoxMenuItem jmiSettings = new JCheckBoxMenuItem(\"Settings\");\n\t\tjmiSettings.setSelected(true);\n\t\tjmiSettings.addActionListener(event -> tfStatus.setText(\"Menu item: \" + event.getActionCommand()));\n\t\tjmOptions.add(jmiSettings);\n\t\tjmb.add(jmOptions);\n\t\treturn jmb;\n\t}", "private void initMenu()\n {\n bar = new JMenuBar();\n fileMenu = new JMenu(\"File\");\n crawlerMenu = new JMenu(\"Crawler\"); \n aboutMenu = new JMenu(\"About\");\n \n bar.add(fileMenu);\n bar.add(crawlerMenu);\n bar.add(aboutMenu);\n \n exit = new JMenuItem(\"Exit\");\n preferences = new JMenuItem(\"Preferences\");\n author = new JMenuItem(\"Author\");\n startCrawlerItem = new JMenuItem(\"Start\");\n stopCrawlerItem = new JMenuItem(\"Stop\");\n newIndexItem = new JMenuItem(\"New index\");\n openIndexItem = new JMenuItem(\"Open index\");\n \n stopCrawlerItem.setEnabled(false);\n \n fileMenu.add(newIndexItem);\n fileMenu.add(openIndexItem);\n fileMenu.add(exit);\n aboutMenu.add(author);\n crawlerMenu.add(startCrawlerItem);\n crawlerMenu.add(stopCrawlerItem);\n crawlerMenu.add(preferences);\n \n author.addActionListener(this);\n preferences.addActionListener(this);\n exit.addActionListener(this);\n startCrawlerItem.addActionListener(this);\n stopCrawlerItem.addActionListener(this);\n newIndexItem.addActionListener(this);\n openIndexItem.addActionListener(this);\n \n frame.setJMenuBar(bar);\n }", "private void fileExit() {\n try {\n ConnectWindow.tidyClose();\n }\n catch (Exception e) {\n displayError(e,this);\n }\n }", "private void control()\r\n\t\t{\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\t}", "private void control()\r\n\t\t{\r\n\t\tsetDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t\t}", "public JMenu getFileMenu() {\n return fileMenu;\n }", "void showFileManagerDialog();", "private JMenu fileMenu(final DrawingPanel thePanel) {\r\n myTrue = false;\r\n \r\n final JMenu fileMenu = new JMenu(\"File\");\r\n fileMenu.setMnemonic(KeyEvent.VK_F); \r\n \r\n \r\n \r\n final JMenuItem fileClear = new JMenuItem(\"Clear\");\r\n fileClear.setMnemonic(KeyEvent.VK_C);\r\n fileClear.setEnabled(thePanel.isThereShapes());\r\n \r\n fileMenu.addChangeListener((theEvent) -> {\r\n myTrue = thePanel.isThereShapes();\r\n fileClear.setEnabled(myTrue);\r\n });\r\n \r\n fileClear.addActionListener((theEvent) -> {\r\n if (fileClear.isEnabled()) {\r\n thePanel.clearShapes();\r\n thePanel.isClear();\r\n }\r\n });\r\n \r\n fileMenu.add(fileClear);\r\n fileMenu.addSeparator();\r\n final JMenuItem fileQuit = new JMenuItem(\"Quit\");\r\n fileQuit.setMnemonic(KeyEvent.VK_Q);\r\n fileQuit.addActionListener((theEvent) -> {\r\n System.exit(0);\r\n });\r\n fileMenu.add(fileQuit);\r\n \r\n return fileMenu;\r\n }", "public void onGuiClosed() {\n \tthis.options.saveAll();\n }", "private JMenuBar createbar(){\n\t\tJMenuBar menuBar = new JMenuBar();\n\n\t\t//Add a JMenu\n\t\tJMenu c = new JMenu(\"Create\");\n\t\tJMenu m = new JMenu(\"Manipulate\"); \n\t\tJMenu o = new JMenu(\"Other\");\n\n\t\tmenuBar.add(c);\n\t\tmenuBar.add(m);\n\t\tmenuBar.add(o);\n\n\t\t//Create menu\n\t\tJMenuItem cPyramid = new JMenuItem(\"Pyramid\");\n\t\tJMenuItem cSquare = new JMenuItem(\"Square\");\n\t\tJMenuItem cStar = new JMenuItem(\"Star\");\n\t\tJMenuItem cSphere = new JMenuItem(\"Sphere\");\n\t\tJMenuItem cCube = new JMenuItem(\"Cube\");\n\t\tJMenuItem cLight = new JMenuItem(\"Light\");\n\n\t\tc.add(cPyramid);\n\t\tc.add(cSquare);\n\t\tc.add(cStar);\n\t\tc.add(cSphere);\n\t\tc.add(cCube);\n\t\tc.add(cLight);\n\t\t\n\n\t\t//Manipulate menu\n\t\tJMenuItem mModify = new JMenuItem(\"Modify\");\n\t\tJMenuItem mDelete = new JMenuItem(\"Delete\");\n\n\t\tm.add(mModify);\n\t\tm.add(mDelete);\n\n\t\tJMenuItem oDeleteAll = new JMenuItem(\"Delete All (lights remain but will be overwritten)\"); \n\t\tJMenuItem oPrint = new JMenuItem(\"Print Structure\");\n\n\t\to.add(oPrint);\n\t\to.add(oDeleteAll);\n\n\n\t\tcPyramid.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Pyramid, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\n\t\t});\n\n\t\tcSquare.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Square, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcStar.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Star, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcSphere.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Sphere, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\t\t\n\t\tcCube.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Cube, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tcLight.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfigure_id+=1;\n\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, Fig_type.Light, figure_id);\n\t\t\t\tif (cdialog.getAnswer()!=null)\n\t\t\t\t\tdraw.figurelist.add(cdialog.getAnswer());\n\t\t\t}\n\t\t});\n\n\t\tmModify.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tfor (Figure_deployment_type fig: draw.figurelist) {\n\t\t\t\t\tif (fig.getId()==draw.picked_figure){\n\t\t\t\t\t\tCustomCreateDialog cdialog = new CustomCreateDialog(frame, true, fig.type, draw.picked_figure);\n\t\t\t\t\t\tif (cdialog.getAnswer()!=null){\n\t\t\t\t\t\t\tfig.modify(cdialog.getModify());\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tmDelete.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint n =-1;\n\t\t\t\tfor (int i = 0; i < draw.figurelist.size(); i++) {\n\t\t\t\t\tif(draw.figurelist.get(i).getId()==draw.picked_figure)\n\t\t\t\t\t\tn=i;\n\t\t\t\t}\n\t\t\t\tif (n!=-1)\n\t\t\t\tdraw.figurelist.remove(n);\n\t\t\t}\n\t\t});\n\n\t\toDeleteAll.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tdraw.figurelist.clear();\n\t\t\t}\n\t\t});\n\n\t\toPrint.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"\\nArrayList<Figure_deployment_type> : {\");\n\t\t\t\tfor (Figure_deployment_type fig : draw.figurelist) {\n\t\t\t\t\tSystem.out.print(\"[ \");\n\t\t\t\t\tSystem.out.print(fig.toString());\n\t\t\t\t\tSystem.out.println(\" ]\");\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"}\");\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\treturn menuBar;\n\t}", "private void quitDialog() {\r\n\t\tdispose();\r\n\t}", "public void actionPerformed(ActionEvent e) {\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Go Back?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\r\n if (m == 0)\r\n {\r\n frame.dispose();\r\n new init();\r\n }\r\n }", "private void popupMenuAbout() {\n\t\t//\n\t\t// Display the dialog\n\t\t//\n\t\tAboutDialog aboutDialog = new AboutDialog(parent.getShell(), SWT.APPLICATION_MODAL | SWT.DIALOG_TRIM);\n\t\taboutDialog.open();\n\t}", "public void newFileButtonListener() {\r\n workSpace.setText(null);\r\n fileName = null;\r\n sansSerifButton.setSelected(true);\r\n italicFormatCheckBox.setSelected(false);\r\n boldFormatCheckBox.setSelected(false);\r\n }", "public FileMenuEventHandler(TextEditorGUI frame) {\n\t\tthis.frame = frame;\n\t}", "private void buildFileMenu(){\n //Create a Save menu item\n saveItem = new JMenuItem(\"Save\");\n saveItem.setMnemonic(KeyEvent.VK_S);\n saveItem.addActionListener(new SaveListener());\n \n //Create a Load menu item\n loadItem = new JMenuItem(\"Load\");\n loadItem.setMnemonic(KeyEvent.VK_L);\n loadItem.addActionListener(new LoadListener());\n\n //Create an Exit menu item\n exitItem = new JMenuItem(\"Exit\");\n exitItem.setMnemonic(KeyEvent.VK_X);\n exitItem.addActionListener(new ExitListener());\n \n //Create a JMenu object for the file menu\n fileMenu = new JMenu(\"File\");\n fileMenu.setMnemonic(KeyEvent.VK_F);\n \n //Add the items to the menu\n fileMenu.add(saveItem);\n fileMenu.add(loadItem);\n fileMenu.add(exitItem);\n }", "private void createMenuBar() {\n\t\tmenuBar = new JMenuBar();\n\n\t\tfileMenu = new JMenu(\"Arquivo\");\n\t\tnewMenuItem = new JMenuItem(\"Novo\");\n\n\t\topenMenuItem = new JMenuItem(\"Abrir arquivo\");\n\t\topenMenuItem.addActionListener(new OpenFileHandler());\n\n\t\tsaveMenuItem = new JMenuItem(\"Salvar arquivo\");\n\t\texportMenuItem = new JMenuItem(\"Exportar\");\n\t\texitMenuItem = new JMenuItem(\"Sair\");\n\n\t\t// fileMenu.add(newMenuItem);\n\t\tfileMenu.add(openMenuItem);\n\t\t// fileMenu.add(saveMenuItem);\n\t\t// fileMenu.add(exportMenuItem);\n\t\t// fileMenu.addSeparator();\n\t\t// fileMenu.add(exitMenuItem);\n\n\t\thelpMenu = new JMenu(\"Ajuda\");\n\t\thelpMenuItem = new JMenuItem(\"Ajuda\");\n\t\taboutMenuItem = new JMenuItem(\"Sobre\");\n\n\t\thelpMenu.add(helpMenuItem);\n\t\thelpMenu.add(aboutMenuItem);\n\n\t\tmenuBar.add(fileMenu);\n\t\tmenuBar.add(helpMenu);\n\n\t\tthis.setJMenuBar(menuBar);\n\t}", "public void onMenuOpen() {\n String initialDirectory = getInitialDirectory();\n System.out.println(initialDirectory);\n File file = FileChooserHelper.showOpenDialog(initialDirectory, this);\n\n if (file == null || !file.exists() || !file.isFile()) {\n return;\n }\n\n handleMenuOpen(file.getAbsolutePath());\n }", "@FXML\n\tpublic void handleMenu(){\n\t\tFile file2 = mainApp.getProspectFilePath();\n if (file2 != null) {\n mainApp.saveProspectDataToFile(file2);}\n\t\tmainApp.showMenuPrincipale();\n\t}", "public BailiffFrame (Bailiff managedBf) {\n\n // Set the title of the JFrame.\n super (managedBf.getRoom () + \" : Bailiff\");\n\n // Copy from method argument to instance field.\n bf = managedBf;\n\n // Create a menu bar to hold our menus.\n JMenuBar menuBar = new JMenuBar ();\n\n // Create a menu labelled 'File'.\n JMenu fileMenu = (JMenu) menuBar.add (new JMenu (\"File\"));\n // Bind ALT+F to the File menu.\n fileMenu.setMnemonic (KeyEvent.VK_F);\n\n // Create and add a menu item labelled 'Exit' to the File menu.\n JMenuItem item = (JMenuItem) fileMenu.add (new JMenuItem (\"Exit\"));\n // Bind ALT+X to the Exit item.\n item.setMnemonic (KeyEvent.VK_X);\n // Install the code to execute when the Exit item is selected.\n item.addActionListener (new ActionListener () {\n\tpublic void actionPerformed (ActionEvent e) {\n\t bf.shutdown ();\t// Shut down the Bailiff\n\t System.exit (0);\t// Exit the JVM\n\t}\n });\n\n // Create a menu labelled 'Info'.\n JMenu options = (JMenu) menuBar.add (new JMenu (\"Info\"));\n // Bind ALT+I to the Info menu.\n options.setMnemonic (KeyEvent.VK_I);\n\n // Create and add a menu item labelled 'About...' to the Info menu.\n item = (JMenuItem) options.add (new JMenuItem (\"About...\"));\n // Bind ALT+A to the About item.\n item.setMnemonic (KeyEvent.VK_A);\n // Install the code to execute when the About item is selected.\n // Notice the use of the adapter class ActionListener which is\n // anonymously subclassed as the argument to addActionListener().\n item.addActionListener (new ActionListener () {\n\tpublic void actionPerformed (ActionEvent e) {\n\t showAboutDialog ();\n\t}\n });\n\n // Install the menubar.\n setJMenuBar (menuBar);\n\n // Install code to execute for certain window events.\n // Adapter class WindowAdapter...\n addWindowListener (new WindowAdapter () {\n\t// If the windows is closed, shut down the Bailiff.\n\tpublic void windowClosing (WindowEvent e) {\n\t bf.shutdown ();\n\t System.exit (0);\n\t}\n\t// If we are minimized or maximized, keep working.\n\tpublic void windowDeiconified (WindowEvent e) {}\n\tpublic void windowIconified (WindowEvent e) {}\n });\n\n // Do qualitative layout\n pack ();\n\n // Determine actual sizes.\n Dimension d = Toolkit.getDefaultToolkit ().getScreenSize ();\n // The window is located 1/8th of the screen size from upper left corner.\n setLocation (d.width/8, d.height/8);\n // The window is 1/12th wide, 1/10th high, or screen size.\n setSize (new Dimension ((d.width/8), (d.height/7)));\n // Show it.\n setVisible (true);\n }", "private JMenu createFileMenu()\r\n {\r\n JMenu fileMenu = new JMenu(\"File\");\r\n fileMenu.add(new JMenuItem(openFileAction));\r\n fileMenu.add(new JMenuItem(openUriAction));\r\n fileMenu.add(new JSeparator());\r\n\r\n fileMenu.add(recentUrisMenu.getMenu());\r\n fileMenu.add(new JSeparator());\r\n\r\n fileMenu.add(new JMenuItem(importObjFileAction));\r\n fileMenu.add(new JSeparator());\r\n \r\n fileMenu.add(new JMenuItem(saveAsAction));\r\n fileMenu.add(new JMenuItem(saveAsBinaryAction));\r\n fileMenu.add(new JMenuItem(saveAsEmbeddedAction));\r\n fileMenu.add(new JSeparator());\r\n fileMenu.add(new JMenuItem(exitAction));\r\n return fileMenu;\r\n }", "public void actionPerformed(ActionEvent oEvent) {\n if (oEvent.getActionCommand().equals(\"OK\") ||\n oEvent.getActionCommand().equals(\"Cancel\")) {\n //Close this window\n this.setVisible(false);\n this.dispose();\n }\n else if (oEvent.getActionCommand().equals(\"SummaryOptions\")) {\n ShortOutputFileSetup oOutputFrame = new ShortOutputFileSetup(this,\n m_oOutputBehaviors, m_oWindow);\n oOutputFrame.pack();\n oOutputFrame.setLocationRelativeTo(null);\n oOutputFrame.setVisible(true);\n }\n else if (oEvent.getActionCommand().equals(\"DetailedOutputOptions\")) {\n //Open detailed output file setup window\n DetailedOutputFileSetup outputFrame = new DetailedOutputFileSetup(this,\n m_oOutputBehaviors, m_oWindow);\n outputFrame.pack();\n outputFrame.setLocationRelativeTo(null);\n outputFrame.setVisible(true);\n }\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface arg0, int arg1) {\n\t\t\t\t\t\tif(completeChoose!=null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcompleteChoose.finalfile(rootnow);\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFrame mainF = new Mode_decide(); \n\t\t\t\tdispose();\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFrame mainF = new Mode_decide(); \n\t\t\t\tdispose();\n\t\t\t\t\n\t\t\t}", "protected void closeDialog() { setVisible(false); dispose(); }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jFileChooser1 = new javax.swing.JFileChooser();\n jScrollPane1 = new javax.swing.JScrollPane();\n textArea = new javax.swing.JTextArea();\n menuBar = new javax.swing.JMenuBar();\n fileMenu = new javax.swing.JMenu();\n newFile = new javax.swing.JMenuItem();\n saveFile = new javax.swing.JMenuItem();\n editMenu = new javax.swing.JMenu();\n fixFile = new javax.swing.JMenuItem();\n changeWrongs = new javax.swing.JMenuItem();\n deleteLastLetter = new javax.swing.JMenuItem();\n jMenu1 = new javax.swing.JMenu();\n darkMode = new javax.swing.JMenuItem();\n lightMode = new javax.swing.JMenuItem();\n defaultTheme = new javax.swing.JMenuItem();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"Text Editor\");\n setMinimumSize(new java.awt.Dimension(300, 100));\n\n textArea.setBackground(new java.awt.Color(0, 51, 102));\n textArea.setColumns(20);\n textArea.setFont(new java.awt.Font(\"Tahoma\", 0, 14)); // NOI18N\n textArea.setForeground(new java.awt.Color(255, 255, 255));\n textArea.setLineWrap(true);\n textArea.setRows(5);\n textArea.setWrapStyleWord(true);\n textArea.setMinimumSize(new java.awt.Dimension(75, 10));\n jScrollPane1.setViewportView(textArea);\n\n menuBar.setBackground(new java.awt.Color(153, 153, 153));\n menuBar.setBorder(null);\n\n fileMenu.setForeground(new java.awt.Color(0, 204, 204));\n fileMenu.setText(\"Dosya\");\n fileMenu.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\n fileMenu.setMinimumSize(new java.awt.Dimension(50, 19));\n fileMenu.setPreferredSize(new java.awt.Dimension(50, 19));\n\n newFile.setForeground(new java.awt.Color(0, 204, 204));\n newFile.setText(\"Dosya Aç\");\n newFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n newFileActionPerformed(evt);\n }\n });\n fileMenu.add(newFile);\n\n saveFile.setBackground(new java.awt.Color(255, 255, 255));\n saveFile.setForeground(new java.awt.Color(0, 204, 204));\n saveFile.setText(\"Dosyayı Kaydet\");\n saveFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n saveFileActionPerformed(evt);\n }\n });\n fileMenu.add(saveFile);\n\n menuBar.add(fileMenu);\n\n editMenu.setForeground(new java.awt.Color(0, 204, 204));\n editMenu.setText(\"Düzenle\");\n editMenu.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\n editMenu.setMaximumSize(new java.awt.Dimension(60, 32767));\n editMenu.setMinimumSize(new java.awt.Dimension(60, 19));\n editMenu.setPreferredSize(new java.awt.Dimension(50, 19));\n\n fixFile.setForeground(new java.awt.Color(0, 204, 204));\n fixFile.setText(\"Hataları Düzelt\");\n fixFile.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fixFileActionPerformed(evt);\n }\n });\n editMenu.add(fixFile);\n\n changeWrongs.setForeground(new java.awt.Color(0, 204, 204));\n changeWrongs.setText(\"Kelime Değiştir\");\n changeWrongs.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n changeWrongsActionPerformed(evt);\n }\n });\n editMenu.add(changeWrongs);\n\n deleteLastLetter.setForeground(new java.awt.Color(0, 204, 204));\n deleteLastLetter.setText(\"Son Harf Sil\");\n deleteLastLetter.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n deleteLastLetterActionPerformed(evt);\n }\n });\n editMenu.add(deleteLastLetter);\n\n menuBar.add(editMenu);\n\n jMenu1.setForeground(new java.awt.Color(0, 204, 204));\n jMenu1.setText(\"Tema Seç\");\n jMenu1.setFont(new java.awt.Font(\"Segoe UI\", 1, 12)); // NOI18N\n\n darkMode.setForeground(new java.awt.Color(0, 204, 204));\n darkMode.setText(\"Karanlık\");\n darkMode.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n darkModeActionPerformed(evt);\n }\n });\n jMenu1.add(darkMode);\n\n lightMode.setForeground(new java.awt.Color(0, 204, 204));\n lightMode.setText(\"Aydınlık\");\n lightMode.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n lightModeActionPerformed(evt);\n }\n });\n jMenu1.add(lightMode);\n\n defaultTheme.setForeground(new java.awt.Color(0, 204, 204));\n defaultTheme.setText(\"İlk Haline Dön\");\n defaultTheme.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n defaultThemeActionPerformed(evt);\n }\n });\n jMenu1.add(defaultTheme);\n\n menuBar.add(jMenu1);\n\n setJMenuBar(menuBar);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 524, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 329, Short.MAX_VALUE)\n );\n\n pack();\n setLocationRelativeTo(null);\n }", "private void jbExitActionPerformed(java.awt.event.ActionEvent evt) {\n frame=new JFrame(\"Exit\");\n if(JOptionPane.showConfirmDialog(frame,\"Confirm if you want to exit\",\"Point of Sale-Supplier\",\n JOptionPane.YES_NO_OPTION) == JOptionPane.YES_NO_OPTION){\n this.dispose();\n\n }//GEN-LAST:event_jbExitActionPerformed\n }", "private JMenu getMnuFile() {\r\n\t\tif (mnuFile == null) {\r\n\t\t\tmnuFile = new JMenu();\r\n\t\t\tmnuFile.setText(\"File\");\r\n\t\t\tmnuFile.add(getMniOpen());\r\n\t\t\tmnuFile.add(getSepFile1());\r\n\t\t\tmnuFile.add(getMniExit());\r\n\t\t}\r\n\t\treturn mnuFile;\r\n\t}", "private void menu_ExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menu_ExitActionPerformed\n System.exit(0);\n }", "@Override\n public void handle(ActionEvent event) {\n menu.setVisible(false);\n options.setVisible(true);\n }", "public Menu() { //Menu pannel constructor\n\t\tmenuBar = new JMenuBar();\n\t\tmenu = new JMenu(\"Menu\");\n\t\tabout = new JMenu(\"About\");\n\t\tabout.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Ragnarock Web Browser 2017\\nIvan Mykolenko\\u00AE\", \"About\",\n\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\thistory = new JMenu(\"History\");\n\t\thistory.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"history\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"History\");\n\t\t\t\tlayer.show(userViewPort, \"History\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 2;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tbookmarks = new JMenu(\"Bookmarks\");\n\t\tbookmarks.addMenuListener(new MenuListener() {\n\t\t\tpublic void menuSelected(MenuEvent e) {\n\t\t\t\tcreateList(\"bookmarks\");\n\t\t\t\taddBackButton();\n\t\t\t\tuserViewPort.add(new JScrollPane(list), \"Bookmarks\");\n\t\t\t\tlayer.show(userViewPort, \"Bookmarks\");\n\t\t\t\tmenuBar.remove(removeButton);\n\t\t\t\tmenuBar.revalidate();\n\t\t\t\tviewMode = 3;\n\t\t\t}\n\t\t\tpublic void menuDeselected(MenuEvent e) {\n\t\t\t}\n\t\t\tpublic void menuCanceled(MenuEvent e) {\n\t\t\t}\n\t\t});\n\t\tsettingsMenuItem = new JMenuItem(\"Settings\", KeyEvent.VK_X);\n\t\tsettingsMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tcreateSettings();\n\t\t\t\tsettings.setVisible(true);\n\t\t\t}\n\t\t});\n\t\texitMenuItem = new JMenuItem(\"Exit\");\n\t\texitMenuItem.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t});\n\t\tbackButton = new JButton(\"Back\");\n\t\tremoveButton = new JButton(\"Remove\");\n\t\tmenu.add(settingsMenuItem);\n\t\tmenu.add(exitMenuItem);\n\t\tmenuBar.add(menu);\n\t\tmenuBar.add(history);\n\t\tmenuBar.add(bookmarks);\n\t\tmenuBar.add(about);\n\t\tmenuBar.add(Box.createHorizontalGlue()); // Changing backButton's alignment to right\n\t\tsettings = new JDialog();\n\t\tadd(menuBar);\n\t\tsaveButton = new JButton(\"Save\");\n\t\tclearHistory = new JButton(\"Clear History\");\n\t\tclearBookmarks = new JButton(\"Clear Bookmarks\");\n\t\tbuttonsPanel = new JPanel();\n\t\tpanel = new JPanel();\n\t\turlField = new JTextField(15);\n\t\tedit = new JLabel(\"Edit Homepage:\");\n\t\tviewMode = 1;\n\t\tlistModel = new DefaultListModel<String>();\n\t\tlist = new JList<String>(listModel);\n\t\tlist.setSelectionMode(ListSelectionModel.SINGLE_INTERVAL_SELECTION);\n\t\tlist.setLayoutOrientation(JList.VERTICAL);\n\t}", "private void construireMenuBar() {\r\n\t\tJMenuBar menuBar = new JMenuBar();\r\n\t\tthis.setJMenuBar(menuBar);\r\n\t\t\r\n\t\tJMenu menuFichier = new JMenu(\"Fichier\");\r\n\t\tmenuBar.add(menuFichier);\r\n\t\t\r\n\t\tJMenuItem itemCharger = new JMenuItem(\"Charger\", new ImageIcon(this.getClass().getResource(\"/images/charger.png\")));\r\n\t\tmenuFichier.add(itemCharger);\r\n\t\titemCharger.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemCharger.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\tfc.setDialogTitle(\"Sélectionnez le circuit à charger\");\r\n\t\t\t\tint returnVal = fc.showOpenDialog(EditeurCircuit.this);\r\n\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\tCircuit loadedTrack = (Circuit)Memento.objLoading(file);\r\n\t\t\t\t\tfor(IElement elem : loadedTrack) {\r\n\t\t\t\t\t\telem.setEditeurCircuit(EditeurCircuit.this);\r\n\t\t\t\t\t\tCircuit.getInstance().addElement(elem);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tCircuit.getInstance().estValide();\r\n\t\t\t\t\tEditeurCircuit.this.paint(EditeurCircuit.this.getGraphics());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemSauvegarder = new JMenuItem(\"Sauvegarder\", new ImageIcon(this.getClass().getResource(\"/images/disquette.png\")));\r\n\t\tmenuFichier.add(itemSauvegarder);\r\n\t\titemSauvegarder.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemSauvegarder.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tif(Circuit.getInstance().estValide()) {\r\n\t\t\t\t\tJFileChooser fc = new JFileChooser();\r\n\t\t\t\t\tfc.setDialogTitle(\"Sélectionnez le fichier de destination\");\r\n\t\t\t\t\tint returnVal = fc.showSaveDialog(EditeurCircuit.this);\r\n\t\t\t\t\tif(returnVal == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\tFile file = fc.getSelectedFile();\r\n\t\t\t\t\t\tint returnConfirm = JFileChooser.APPROVE_OPTION;\r\n\t\t\t\t\t\tif(file.exists()) {\r\n\t\t\t\t\t\t\tString message = \"Le fichier \"+file.getName()+\" existe déjà : voulez-vous le remplacer ?\";\r\n\t\t\t\t\t\t\treturnConfirm = JOptionPane.showConfirmDialog(EditeurCircuit.this, message, \"Fichier existant\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif(returnConfirm == JFileChooser.APPROVE_OPTION) {\r\n\t\t\t\t\t\t\tnew Memento(Circuit.getInstance(),file);\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\telse {\r\n\t\t\t\t\tString messageErreur;\r\n\t\t\t\t\tif(Circuit.getInstance().getElementDepart() == null) {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit comporter un élément de départ.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tmessageErreur = \"Le circuit doit être fermé.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tJOptionPane.showMessageDialog(EditeurCircuit.this,messageErreur,\"Erreur de sauvegarde\",JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tmenuFichier.addSeparator();\r\n\t\t\r\n\t\tJMenuItem itemQuitter = new JMenuItem(\"Quitter\", new ImageIcon(this.getClass().getResource(\"/images/quitter.png\")));\r\n\t\tmenuFichier.add(itemQuitter);\r\n\t\titemQuitter.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemQuitter.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenu menuEdition = new JMenu(\"Edition\");\r\n\t\tmenuBar.add(menuEdition);\r\n\t\t\r\n\t\tJMenuItem itemChangerTailleGrille = new JMenuItem(\"Changer la taille de la grille\", new ImageIcon(this.getClass().getResource(\"/images/resize.png\")));\r\n\t\tmenuEdition.add(itemChangerTailleGrille);\r\n\t\titemChangerTailleGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_N,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemChangerTailleGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.dispose();\r\n\t\t\t\tnew MenuEditeurCircuit();\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tJMenuItem itemNettoyerGrille = new JMenuItem(\"Nettoyer la grille\", new ImageIcon(this.getClass().getResource(\"/images/clear.png\")));\r\n\t\tmenuEdition.add(itemNettoyerGrille);\r\n\t\titemNettoyerGrille.setAccelerator( KeyStroke.getKeyStroke(KeyEvent.VK_C,KeyEvent.CTRL_DOWN_MASK));\r\n\t\titemNettoyerGrille.addActionListener(new ActionListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tEditeurCircuit.this.construireGrilleParDefaut();\r\n\t\t\t\tEditeurCircuit.this.repaint();\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void onMenuNew() {\n handleMenuOpen(null);\n }" ]
[ "0.6838301", "0.6741157", "0.6693578", "0.6685039", "0.6608965", "0.6605026", "0.6569696", "0.6564583", "0.6552627", "0.6545493", "0.65409327", "0.65379304", "0.6516455", "0.65051323", "0.6491253", "0.6435709", "0.64252484", "0.64134943", "0.6406183", "0.6369983", "0.636785", "0.63610417", "0.634447", "0.6339113", "0.6331211", "0.6315438", "0.6314728", "0.63126695", "0.63126695", "0.63109386", "0.6280151", "0.6279091", "0.62266195", "0.62243927", "0.6221509", "0.6203397", "0.62018526", "0.6201021", "0.6200017", "0.61981136", "0.61910516", "0.61878675", "0.6161223", "0.6154055", "0.61527413", "0.6152316", "0.6151752", "0.61509275", "0.61485595", "0.6132792", "0.6115064", "0.61127186", "0.6105571", "0.610311", "0.61025167", "0.6101736", "0.6098796", "0.6097765", "0.60976124", "0.6093041", "0.609073", "0.60822123", "0.6080909", "0.6077104", "0.6076816", "0.60736245", "0.6073556", "0.60727656", "0.6065435", "0.6063938", "0.6063938", "0.6062009", "0.60572684", "0.6053182", "0.6052653", "0.60522175", "0.60473186", "0.6046555", "0.6016659", "0.601505", "0.60133594", "0.6004722", "0.6002682", "0.59710807", "0.5961771", "0.5959545", "0.59591204", "0.59584033", "0.5957181", "0.5954237", "0.5954237", "0.5949917", "0.59430146", "0.5935035", "0.5934818", "0.5928741", "0.5924961", "0.5923839", "0.59220064", "0.59184986" ]
0.60281724
78
System exits only if user responds with yes
public void actionPerformed(ActionEvent event) { end = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?"); if (end == JOptionPane.YES_OPTION) { System.exit(0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void requestExit()\r\n {\r\n // WE MAY HAVE TO SAVE CURRENT WORK\r\n boolean continueToExit = true;\r\n if (!saved)\r\n {\r\n // THE USER CAN OPT OUT HERE\r\n continueToExit = promptToSave();\r\n }\r\n \r\n // IF THE USER REALLY WANTS TO EXIT THE APP\r\n if (continueToExit)\r\n {\r\n // EXIT THE APPLICATION\r\n System.exit(0);\r\n }\r\n }", "if(false==adhocTicket.hasExited()){\n System.out.println(\"hasExit() is passed\");\n }", "public void exit() {\n System.out.println(\"Thank you for playing Nim\");\n }", "private void exitRegards()\n {\n System.out.println(\"\\t\\tSystem exit...\");\n System.out.println(\"\\t\\t================Thankyou, have a wonderful day! ===============\");\n System.exit(0);\n }", "public void giveUp(){\r\n System.out.println(\"You are such a loser. Glad that you give up!\");\r\n System.exit(0);\r\n }", "public void confirmExit() {\n int resposta = JOptionPane.showConfirmDialog(this,\n \"Really exit?\", \"Exit\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (resposta == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "public static void exitProgram() {\n\r\n System.out.println(\"Thank you for using 'Covid 19 Vaccination Center Program'. \\n Stay safe!\");\r\n System.exit(0);\r\n }", "public void handleExit(){\n if(JOptionPane.showConfirmDialog(null,\"Do you really wanna exit\",\"Confirm\",JOptionPane.WARNING_MESSAGE,\n JOptionPane.YES_OPTION)==JOptionPane.YES_OPTION){System.exit(0);}\n else{\n return;\n }\n\n\n\n }", "public void exitGame() {\n System.out.println(\"Thank you and good bye!\");\n System.exit(0);\n }", "public boolean macShutdown() {\r\n boolean result = promptUserWantsShutdown();\r\n\r\n if (result) {\r\n prepareForShutdown();\r\n }\r\n\r\n return result;\r\n }", "@Override\n public boolean isExit() {\n return true;\n }", "public void toExit() {\n int sure=JOptionPane.showConfirmDialog(rootPane,\"Are you sure to Exit?\");\n if(sure==JOptionPane.YES_OPTION)\n { \n System.exit(0);\n } \n }", "public boolean doQuit() {\n return false;\n }", "private void ExitProc()\r\n\t{\r\n\t\tint n = JOptionPane.showConfirmDialog(\r\n\t\t\t frame ,\r\n\t\t\t \"EXIT NOF FreeWare ???\",\r\n\t\t\t \"--NOF--\",\r\n\t\t\t JOptionPane.YES_NO_OPTION);\r\n\t\t\r\n\t\t//user pressed result.\r\n\t\tswitch (n) \r\n\t\t{\r\n\t\tcase 0: //yes\r\n\r\n\t\t\tframe.dispose();\r\n\t\t\tl = new log(\"event\",\"Exit Software\",\"Exit Pressed - Thank you for using NOF Software.\");\r\n\t\t\terase del = new erase(StStr); //StStr);\r\n\t\t\t//del.erase_output(StStr);\r\n\t\t\tSystem.exit(0); // Exit Program\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase 1: //no\r\n\t\t\tl = new log(\"event\",\"Exit_option\",\"Exit - have been canceled\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}", "static void goodbye() {\n printGoodbyeMessage();\n System.exit(0);\n }", "public abstract boolean isExit();", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "@Override\n public boolean isExit() {\n return false;\n }", "public boolean saidYes(boolean onQuit) {\r\n\r\n System.out.print(\" (Y/N) \");\r\n \r\n\t\tchar responce = Keyboard.readChar();\r\n responce = Character.toLowerCase(responce);\r\n\r\n\t\tswitch (responce) {\r\n case 'y':\r\n return true;\r\n\r\n case 'q':\r\n case 'e':\r\n\r\n // Is the user is being asked to quit?\r\n if (onQuit) {\r\n return true;\r\n\t\t\t\t}\r\n\r\n endGameSwitch = true;\r\n return false;\r\n\r\n default:\r\n return false;\r\n }\r\n\t}", "public static int quit() {\r\n int quit = JOptionPane.showConfirmDialog(null, \"Exit Program? \", null, JOptionPane.YES_NO_OPTION);\r\n if (quit != 0) {//Confirms Program Termination\r\n //do nothing \r\n } else\r\n System.exit(quit);\r\n return quit;\r\n }", "private static void exit()\n {\n System.out.println(\"Graceful exit\");\n System.exit(0);\n }", "private void quitApp() {\n\t\tlogger.trace(\"quitApp() is called\");\n\t\t\n \tint answer = JOptionPane.showConfirmDialog(null, \"Exit App?\");\n \tif (answer == JOptionPane.YES_OPTION){\n \t\tstopServer(); \n \t\tsaveData();\n \t\tlogger.trace(\"Server app exits\");\n \t\tSystem.exit(0);\n \t}\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "@Override\n public boolean shouldExit() {\n return true;\n }", "private boolean promptCommand() {}", "private void dialogExit() {\n\t\tint result = showConfirmDialog(frmRentCalc, \"Вы действительно ходите выйти?\", \"Окно подтверждения\", YES_NO_OPTION, QUESTION_MESSAGE);\r\n\t\tif (result == YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else {\r\n\t\t\tif (result == NO_OPTION) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "abstract boolean isExit();", "public void winMessage() {\r\n\t\tSystem.out.print(\"\\n\\nCongratulations! You've won the game! :D\");\r\n\t\tSystem.exit(0);\r\n\t}", "private Boolean quitCommand() {\n output.println(\"QUIT COMMAND\");\n return false;\n }", "private void confirmExit () {\n\t\tint ret = JOptionPane.showConfirmDialog(this, \"Save game before exiting?\");\n\t\tif (ret == 0) {\n\t\t\tcloseAfterSave = true;\n\t\t\tEngine.requestSync();\n\t\t} else if (ret == 1) {\n\t\t\tkill();\n\t\t}\n\t}", "public boolean isExit(){\n return true;\n }", "public boolean promptUserWantsShutdown() {\r\n boolean result = true;\r\n\r\n if (isGUI()) {\r\n String msg = Messages.MainModel_4.toString();\r\n String title = Messages.MainModel_5.toString();\r\n int ans = JOptionPane.showConfirmDialog(null, msg, title,\r\n JOptionPane.OK_CANCEL_OPTION);\r\n\r\n if (ans == JOptionPane.CANCEL_OPTION) {\r\n result = false;\r\n }\r\n }\r\n\r\n return result;\r\n\r\n }", "public static void farewell(){\n System.out.print(\"Thank you for using the Human Resources Mangement System.\\nGoodbye!\");\n System.exit(0);\n }", "public void quit(String dummy) {\n if (showOptions(\"Really quit?\", \"Quit?\", \"question\",\n \"Yes\", \"Yes\", \"No\") == 0) {\n System.exit(1);\n }\n }", "void exit( boolean enabled ) ;", "private void quit()\n\t{\n\t\tapplicationView.showChatbotMessage(quitMessage);\n\t\tSystem.exit(0);\n\t\t\n\t}", "private void exit() {\n\n // Farewell message\n pOutput.println(\"Good Bye!\");\n pOutput.close();\n\n try {\n pClient.close();\n\n } catch (final IOException ex) {\n pShellService.error(\"Shell::exit()\", ex);\n }\n\n // Clean up\n pShellService = null;\n }", "private void exitWithoutSave()\n {\n String reply = \"\";\n Scanner console = new Scanner(System.in);\n \n do\n {\n boolean valid = false;\n while (!valid)\n {\n System.out.print(\"\\t\\tSo, you want to exit without saving your changes?(y/n) \");\n reply = console.nextLine().trim().toLowerCase();\n valid = validation.checkNoBlank(reply);\n }\n reply = reply.substring(0, 1);\n if (reply.equals(\"y\"))\n exitRegards();\n else\n if (reply.equals(\"n\"))\n return; \n else\n System.out.println(\"\\t\\tPlease enter your answer again (y/n) \");\n }while (!reply.equals(\"n\") && !reply.equals(\"y\")); \n }", "private void processQuit() {\n System.exit(0);\n }", "private void checkIfForceKill() {\n SharedPreferences settings = PreferenceManager\n .getDefaultSharedPreferences(this);\n boolean forceKill = settings.getBoolean(\n FORCE_EXIT_APPLICATION, false);\n\n if (forceKill) {\n //CLEAR THE FORCE_EXIT SETTINGS\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(FORCE_EXIT_APPLICATION, false);\n // Commit the edits!\n editor.apply();\n //HERE STOP ALL YOUR SERVICES\n finish();\n }\n }", "private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }", "public static boolean isSure() {\n Scanner in = new Scanner(System.in);\n in = new Scanner(System.in);\n String danger = \"This action might result in a loss of data,\";\n danger += \" do you want to continue? (yes/no)\";\n System.out.println(danger);\n String answer = in.nextLine();\n if (answer.equals(\"no\")) {\n return false;\n }\n return true;\n }", "static void playerLost() {\n\n\t\tSystem.exit(0); // This code ends the program\n\t}", "public boolean exit()\n {\n if(select == 0)\n {\n return true;\n }\n else\n return false;\n }", "public void exitApp() {\n\t\tSystem.out.println(\"Exiting PhoneBook\");\n\n\t}", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }", "public boolean isExit() {\n return false;\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "protected void exit() {\n\t\tSystem.exit(0);\n\t}", "private static void exit(){\n\t\t\n\t\tMain.run=false;\n\t\t\n\t}", "public final void requestExit() {\n exitRequested = true;\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n System.exit(1);\n }", "public void quit(){\n this.println(\"Bad news!!! The library has been cancelled!\");\n System.exit(0);\n\n }", "public void cancelarIniciarSesion(){\n System.exit(0);\n }", "public void confirmExit() {\n boolean confirmOnExit = getIntent().getExtras().getBoolean(MapsActivity.PARAMETERS.CONFIRM_ON_EXIT, true);\n if (confirmOnExit) {\n new AlertDialog.Builder(this).setTitle(R.string.button_confirm_exit_title)\n .setMessage(R.string.button_confirm_exit)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n finish();\n return;\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n }).show();\n } else {\n finish();\n }\n }", "void doKill() throws IOException\n\t{\n\t\tif (m_session == null)\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"programNotBeingRun\")); //$NON-NLS-1$\n\t\telse\n\t\t{\n\t\t\tif (yesNoQuery(getLocalizationManager().getLocalizedTextString(\"askKillProgram\"))) //$NON-NLS-1$\n\t\t\t\texitSession();\n\t\t}\n\t}", "boolean hasExitStatus();", "public void exit();", "private boolean exit(Stage primaryStage) {\n Alert closeConfirmation =\n new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to exit?\");\n Button saveButton = (Button) closeConfirmation.getDialogPane().lookupButton(ButtonType.OK);\n saveButton.setText(\"Save & Exit\");\n closeConfirmation.setHeaderText(\"Confirm Exit\");\n closeConfirmation.initModality(Modality.APPLICATION_MODAL);\n closeConfirmation.initOwner(primaryStage);\n closeConfirmation.getButtonTypes().setAll(ButtonType.YES, ButtonType.OK, ButtonType.CANCEL);\n\n Optional<ButtonType> closeResponse = closeConfirmation.showAndWait();\n if (ButtonType.OK.equals(closeResponse.get())) {\n Stage saveStage = new Stage();\n FileChooser chooser = new FileChooser();\n chooser.getExtensionFilters().add(new ExtensionFilter(\"Text File\", \"*.txt\"));\n File saveFile = chooser.showSaveDialog(saveStage);\n if (saveFile != null) {\n socialNetwork.saveToFile(saveFile);\n ((Labeled) ((VBox) statsBox.getChildren().get(0)).getChildren().get(1))\n .setText(\"Save file written succesfully\");\n }\n Platform.exit();\n }\n if (ButtonType.YES.equals(closeResponse.get())) {\n Platform.exit();\n } else {\n return false;\n }\n return true;\n }", "public abstract void exit (int status);", "@FXML\r\n public void onActionExitProgram(ActionEvent actionEvent) {\r\n\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Are you sure you want to exit?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n\r\n if (result.isPresent() && result.get() == ButtonType.OK) {\r\n System.exit(0);\r\n }\r\n }", "public static void main(String[] args) {\n \n int result=JOptionPane.showConfirmDialog(null,\"Are you sure to Exit?\",\n \"My Question\",JOptionPane.YES_NO_OPTION);\n \n switch(result){\n case JOptionPane.YES_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do..\");\n break;\n \n case JOptionPane.NO_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do not..\");\n break;\n \n case JOptionPane.CANCEL_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we cancel it..\");\n }\n }", "public void quitter() throws HeadlessException {\n //Permet l'arret du programme\n int reponse = JOptionPane.showConfirmDialog(null, \"Voulez-vous vraiment quitter?\",\n \"Quitter\", JOptionPane.YES_NO_OPTION);\n if (reponse == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "private static void gameOver() {\n\t\tSystem.out.println(\"Would you like to play again?\");\n\t\tinput.nextLine();\n\t\tuserInput = input.nextLine();\n\t\tif(userInput.contains(\"yes\")||userInput.equals(\"y\"))\n\t\t{\n\t\t\tgame();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Stay golden.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void quit(String dummy) {\n System.exit(1);\n }", "private void printExitMenu() {\n System.out.println(\"Goodbye! Thanks for using the app!\");\n }", "private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "void exit( boolean enabled, Object result ) ;", "public void exitProgram() {\n\t\tgoOffline();\n\t\tmainWindow.dispose();\n\t\tif (config_ok)\n\t\t\tsaveConnectionConfiguration();\n\t\tSystem.exit(0);\n\t\t\n\t}", "@Override\r\n\tpublic boolean hasExited() {\n\t\treturn false;\r\n\t}", "private boolean quit(Command command) \n {\n if(command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n return false;\n }\n else {\n return true; // signal that we want to quit\n }\n }", "private boolean quit(Command command) \n {\n if(command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n return false;\n }\n else {\n return true; // signal that we want to quit\n }\n }", "public void exitTheProgram(){\n System.exit(0);\n }", "private boolean quit(Command command) \n {\n if(command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n return false;\n }\n else {\n return true; // these shows that we want to quit\n }\n }", "private void closeProgram() {\n\t\tSystem.out.println(\"Cancel Button clicked\");\n\t\tif (ConfirmBox.display( \"Exit\", \"Are you sure you want to exit?\")) {\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void exitGame() {\n System.exit(0);\n }", "@Override\n\tpublic int exit() {\n\t\treturn 0;\n\t}", "static private boolean quit(Command command) {\n if (command.hasSecondWord()) {\n System.out.println(\"Quit what?\");\n return false;\n } else {\n return true;\n }\n }", "private void exitProgram() {\n try {\n logic.updateInventory();\n } catch (FileIOException e) {\n view.displayExceptionMessage(\"Error updating inventory file: \" + e.getMessage());\n view.waitOnUser();\n }\n view.showExitMessage();\n }", "private void ExitApplication()\n\t{\n\t\t Builder alertbox = new AlertDialog.Builder(AppMenu.this);\n\t // set the message to display\n\t alertbox.setMessage(\"آیا می خواهید از برنامه خارج شوید ؟\");\n\t \n\t // set a negative/no button and create a listener\n\t alertbox.setPositiveButton(\"خیر\", new DialogInterface.OnClickListener() {\n\t // do something when the button is clicked\n\t public void onClick(DialogInterface arg0, int arg1) {\n\t arg0.dismiss();\n\t }\n\t });\n\t \n\t // set a positive/yes button and create a listener\n\t alertbox.setNegativeButton(\"بلی\", new DialogInterface.OnClickListener() {\n\t // do something when the button is clicked\n\t public void onClick(DialogInterface arg0, int arg1) {\n\t \t //Declare Object From Get Internet Connection Status For Check Internet Status\n\t \t System.exit(0);\n\t \t\t\t arg0.dismiss();\n\t \t\t\t \n\t }\n\t });\n\t \n\t alertbox.show();\n\t}", "static boolean yesNoQuestion(String prompt){\r\n while(true){\r\n System.out.println(prompt);\r\n String input = Console.in.readWord();\r\n if (input.equals(\"yes\")) return true;\r\n else if (input.equals(\"no\")) return false;\r\n }\r\n }", "public void showExit();", "public void quitGame() {\n\t\t\tdisplay(\"Goodbye!\");\n\t\t\tSystem.exit(0);\n\t\t}", "private boolean quit(Command command) \n {\n if(command.hasSecondWord()) {\n Logger.Log(\"Quit what?\");\n return false;\n }\n else {\n return true; // signal that we want to quit\n }\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}", "public void quit() {System.exit(0);}", "public static void printExitMessage() {\n printLine();\n System.out.println(\" Bye Bye for now! See you soon!\");\n printLine();\n }", "public void a_exit() {\r\n\t\tSystem.exit(0);\r\n\t}", "public void returnHall() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirm Exit\");\n alert.setHeaderText(\"Confirmation\");\n alert.setContentText(\"Are you sure you want to exit this game ?\");\n Optional result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n HallController.getStage().close();\n Game.getPrimaryStage().show();\n Game.returnToHall();\n }\n }", "public void exit() {\n try {\n processLine(\"exit\");\n } catch (NoSystemException ex) {\n\t\t\tLog.error(\"No System available. Please load a model before executing this command.\");\n }\n }", "private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}", "public abstract void exit();", "@Override\n public boolean canBeTerminatedNow() {\n logger.debug(\"OifitsExplorerGui.finish() handler called.\");\n\n // Can't exit if a job is running\n if (IRModelManager.getInstance().getIRModel().isRunning()) {\n MessagePane.showMessage(\"A job is running... Please wait for its completion or cancel it before quitting.\");\n return false;\n }\n\n // Ask the user if he wants to save modifications\n //@TODO replace by code when save will be available.\n MessagePane.ConfirmSaveChanges result = MessagePane.ConfirmSaveChanges.Ignore;\n //MessagePane.ConfirmSaveChanges result = MessagePane.showConfirmSaveChangesBeforeClosing();\n\n // Handle user choice\n switch (result) {\n // If the user clicked the \"Save\" button, save and exit\n case Save:\n /*\n if (this.saveAction != null) {\n return this.saveAction.save();\n }\n */\n break;\n\n // If the user clicked the \"Don't Save\" button, exit\n case Ignore:\n break;\n\n // If the user clicked the \"Cancel\" button or pressed 'esc' key, don't exit\n case Cancel:\n default: // Any other case\n return false;\n }\n\n return true;\n }", "@Override\r\n\t\tpublic boolean promptYesNo(String message) {\n\t\t\treturn true;\r\n\t\t}", "@Override\n public void exit()\n {\n\t ((ControllerHost)getHost()).showPopupNotification(\"Chord Buddy Exited\");\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }" ]
[ "0.7266851", "0.7033299", "0.6991645", "0.6919099", "0.6876675", "0.68655264", "0.6857927", "0.68551505", "0.6807818", "0.6795412", "0.6793201", "0.67418", "0.6740643", "0.6715667", "0.6713271", "0.669068", "0.6685126", "0.6685126", "0.6685126", "0.6685126", "0.6685126", "0.6677177", "0.6656661", "0.6645788", "0.66353554", "0.6634413", "0.6607366", "0.6600986", "0.65944266", "0.6579224", "0.657394", "0.65580803", "0.6536424", "0.65186995", "0.65072346", "0.6493628", "0.645767", "0.6457263", "0.6438267", "0.6436439", "0.6435502", "0.6425301", "0.6425139", "0.6420762", "0.64016736", "0.63977355", "0.6391894", "0.639048", "0.6389712", "0.6366853", "0.6346661", "0.6323261", "0.6319908", "0.6298023", "0.6289025", "0.6285811", "0.6280006", "0.62750214", "0.62731206", "0.6271285", "0.62654734", "0.6255915", "0.6243937", "0.62343305", "0.6228941", "0.6218375", "0.6213555", "0.6203096", "0.620229", "0.6200826", "0.6200321", "0.618255", "0.6172554", "0.6167743", "0.61670196", "0.61526173", "0.61526173", "0.6142451", "0.61412925", "0.613987", "0.6139268", "0.6138466", "0.61356235", "0.6130743", "0.6126515", "0.6126008", "0.6124938", "0.61181843", "0.61153185", "0.61126286", "0.61119217", "0.6094885", "0.6087549", "0.6080906", "0.60728014", "0.6070333", "0.6063523", "0.60633326", "0.60541326", "0.6050918", "0.6038557" ]
0.0
-1
Creates the frame for the help instructions
public void actionPerformed(ActionEvent event) { helpFrame = new JFrame(); helpText = new JTextField(); scroller = new JScrollPane(helpText, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); helpFrame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); helpFrame.setTitle("Help Instructions"); helpFrame.add(helpText, BorderLayout.CENTER); helpFrame.getContentPane().add(scroller, BorderLayout.CENTER); /** * Reads the help.txt file with the instructions */ reader = null; try { reader = new FileReader("help.txt"); helpText.read(reader, "help.txt"); helpText.setEditable(false); } /** * @exception IOException signals that the help file was not found */ catch (IOException exception) { System.err.println("Help file not found"); exception.printStackTrace(); } finally { if (reader != null) { try { reader.close(); } /** * @exception IOException signals that there was an error close the help file */ catch (IOException exception) { System.out.println("Error closing file"); exception.printStackTrace(); } } } // displays help.txt on the helpframe helpFrame.setLocation(10, 270); helpFrame.setSize(700, 400); helpFrame.setVisible(true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Help createHelp();", "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 void helpAboutAction() {\n new HelpAbout(this.parentFrame);\n }", "private void setupHelpButton() {\n\t\tImageIcon help_button_image = new ImageIcon(parent_frame.getResourceFileLocation() + \"help.png\");\n\t\tJButton help_button = new JButton(\"\",help_button_image);\n\t\thelp_button.setBorderPainted(false);\n\t\thelp_button.setBounds(1216, 24, 100, 100);\n\t\thelp_button.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tHelp help_frame=new Help(PanelID.Quiz);\n\t\t\t\thelp_frame.setVisible(true);\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t}\n\t\t});\n\t\thelp_button.addMouseListener(new VoxMouseAdapter(help_button,null));\n\t\tadd(help_button);\n\t}", "protected void HelpActionPerformed(ActionEvent e) {\n\t\tthis.setVisible(false);\n\t\tHelp frame = new Help();\n\t\tframe.UpFrame=this;\n\t\tframe.setVisible(true);\n\t}", "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}", "private void showHelp() {\n\t\tif (_OpenHelpFrame != null) {\n\t\t\t_OpenHelpFrame.requestFocus();\n\t\t\treturn;\n\t\t}\n\n\t\tfinal JTextArea textPane = new JTextArea();\n\t\ttextPane.setEditable(JEntityEditor.this.security.level >= JEntityEditor.this.entity\n\t\t\t\t.getPermission(Entity.PERMISSION_EDIT_HELP).level);\n\t\ttextPane.setLineWrap(true);\n\t\ttextPane.setWrapStyleWord(true);\n\t\ttextPane.setText(state.help == null ? \"\" : state.help);\n\n\t\t_OpenHelpFrame = new JFrame();\n\t\t_OpenHelpFrame.setMinimumSize(new Dimension(300, 400));\n\t\t_OpenHelpFrame.setModalExclusionType(Dialog.ModalExclusionType.NO_EXCLUDE);\n\t\t_OpenHelpFrame.setAlwaysOnTop(true);\n\t\t_OpenHelpFrame.setLocationRelativeTo(this);\n\t\t_OpenHelpFrame.setLocation(this.getWidth(), 0);\n\t\t_OpenHelpFrame.setTitle(\"Help\");\n\t\t_OpenHelpFrame.addWindowListener(new WindowListenerAdapter() {\n\n\t\t\t@Override\n\t\t\tprotected void event(WindowEvent e) {\n\t\t\t\tif (e.getID() != WindowEvent.WINDOW_CLOSING && e.getID() != WindowEvent.WINDOW_CLOSED)\n\t\t\t\t\treturn;\n\t\t\t\tif (security.level >= JEntityEditor.this.entity.getPermission(Entity.PERMISSION_EDIT_HELP).level)\n\t\t\t\t\tstate.help = textPane.getText();\n\t\t\t\t_OpenHelpFrame = null;\n\t\t\t}\n\t\t});\n\t\t_OpenHelpFrame.add(new JScrollPane(textPane));\n\t\t_OpenHelpFrame.setVisible(true);\n\t}", "private JFrame showAbout(){\n JFrame aboutFrame = new JFrame(\"About\");\n aboutFrame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n aboutFrame.setResizable(false);\n aboutFrame.setLocationRelativeTo(frame);\n\n JLabel applicationName = new JLabel(\"Roham-H HTTP Client\");\n JLabel developerName = new JLabel(\"Developer: Roham Hayedi\");\n JLabel developerAUTID = new JLabel(\"ID: 9831107\");\n JLabel developerEmail = new JLabel(\"Email: [email protected]\");\n JPanel aboutPanel = new JPanel(new GridLayout(0, 2));\n JPanel aboutMainPanel = new JPanel(new BorderLayout());\n aboutFrame.setContentPane(aboutMainPanel);\n aboutMainPanel.add(applicationName, BorderLayout.NORTH);\n aboutMainPanel.add(aboutPanel, BorderLayout.CENTER);\n aboutPanel.add(developerName);\n aboutPanel.add(developerAUTID);\n aboutPanel.add(developerEmail);\n aboutFrame.pack();\n return aboutFrame;\n }", "public void showHelp();", "public help() {\n initComponents();\n }", "@Override\n\tprotected void handleHelp(ClickEvent event) {\n\t\t\n\t}", "@Override\n \t\t\t\tpublic void doHelp() {\n \n \t\t\t\t}", "private void helpWindow() {\n\n\t\t// Open a new window\n\t\tJFrame frame2 = new JFrame(\"Help\");\n\n\t\t// Create mainPanel2\n\t\tContainer mainPanel2 = frame2.getContentPane();\n\t\tmainPanel2.setLayout(new BoxLayout(mainPanel2, BoxLayout.Y_AXIS));\n\t\tmainPanel2.setForeground(Color.WHITE);\n\t\tmainPanel2.setBackground(Color.BLACK);\n\n\t\t// Add a jeditorpane\n\t\tJEditorPane instructions = new JEditorPane();\n\t\tinstructions.setText(\"TO PLAY NOTES:\\n \" + \"Click a key or use the following format: \\n \"\n\t\t\t\t+ \"\tA B B A --> Basic musical notes \\n\" + \"\tD# --> Make a note sharp \\n\"\n\t\t\t\t+ \"\tA R C --> R adds a rest \\n\" + \"\tE5 --> Play E in 5th octave \\n\"\n\t\t\t\t+ \"\tC5q+E5q+G5q A+G A+G --> Play chord using +\\n\\n\"\n\t\t\t\t+ \"To change note lengths the following characters can be used:\\n\" + \"\tw whole\\n\" + \"\th half\\n\"\n\t\t\t\t+ \"\tq quarter\\n\" + \"\ti eighth\\n\" + \"\ts sixteenth\\n\\n\" + \"TO PLAY RHYTHMS:\\n\"\n\t\t\t\t+ \"The following drum sounds are available:\\n\" + \"\tO bass drum\\n\" + \"\to bass drum 2\\n\"\n\t\t\t\t+ \"\t^ hi hat\\n\" + \"\t* snare drum\\n\" + \"\t! crash cymbal\\n\" + \"\t. ride cymbal\");\n\t\tinstructions.setForeground(Color.WHITE);\n\t\tinstructions.setBackground(Color.BLACK);\n\t\tinstructions.setFont(new Font(\"Ariel\", Font.PLAIN, 16));\n\n\t\t// Add instructions to the mainPanel\n\t\tmainPanel2.add(instructions);\n\n\t\t// Set the frame size and visible\n\t\tframe2.setSize(500, 550);\n\t\tframe2.setVisible(true);\n\n\t}", "void showHelp() {\n\t\tif (helpScreen == null) {\n\t\t helpScreen = new Form(\"Walking Help\");\n\t\t helpScreen.append(\"^ = walk forward\\n\");\n\t\t helpScreen.append(\"v = walk backwards\\n\");\n\t\t helpScreen.append(\"< = turn left\\n\");\n\t\t helpScreen.append(\"> = turn right\\n\");\n\t\t helpScreen.append(\"fire = change reverb manually\\n\");\n\t\t}\n\t\thelpScreen.addCommand(toggleCommand);\n\t\thelpScreen.setCommandListener(this);\n\t\tdisplay.setCurrent(helpScreen);\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 }", "@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}", "protected void handleHelp(ActionEvent event) {\n\t}", "private static JMenu getHelpMenu(final EnvironmentFrame frame) {\n\t\tfinal Environment environment = frame.getEnvironment();\n\t\tfinal JMenu menu = new JMenu(\"Help\");\n\t\tenvironment.getObject();\n\n\t\t// Currently commented out, but can be restored if the help menus are\n\t\t// fixed.\n\t\t// addItem(menu, new EnvironmentHelpAction(environment));\n\n\t\t// Temporary help action.\n\t\taddItem(menu, new AbstractAction(\"Help...\") {\n\t\t\t/**\n\t\t\t *\n\t\t\t */\n\t\t\tprivate static final long serialVersionUID = 1L;\n\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(final ActionEvent event) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"For help, feel free to access the JFLAP tutorial at\\n\"\n\t\t\t\t\t\t+ \" www.jflap.org.\", \"Help\", JOptionPane.PLAIN_MESSAGE);\n\t\t\t}\n\t\t});\n\n\t\taddItem(menu, new AboutAction());\n\n\t\treturn menu;\n\t}", "public void help() {\n\t\tString format = \"%-20s%s%n\";\n\t\tString[] commands = new String[5];\n\t\tcommands[0] = \"help\";\n\t\tcommands[1] = \"learn\";\n\t\tcommands[2] = \"alphabet:create\";\n\t\tcommands[3] = \"alphabet:destroy\";\n\t\tcommands[4] = \"alphabet:compose\";\n\n\t\tString[] explanation = new String[5];\n\t\texplanation[0] = \"display this message\";\n\t\texplanation[1] = \"starts a learning process. Note: with a large alphabet, this\\ncan take a \"\n\t\t\t\t+ \"very long time!\";\n\t\texplanation[2] = \"creates an alphabet. Currently only working for Android, the\\n\"\n\t\t\t\t+ \"creation of an iOS alphabet has to be done more or less manually\";\n\t\texplanation[3] = \"deletes an existing alphabet\";\n\t\texplanation[4] = \"composes an alphabet from existing window dumps.\";\n\n\t\tfor (int i = 0; i < commands.length; i++) {\n\t\t\tSystem.out.printf(format, commands[i], explanation[i]);\n\t\t}\n\t}", "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 }", "protected void helpPage() {\n \n System.out.println(\"Commands:\");\n System.out.println(\"\\tQ [filename]\\t\\t\\tquit and save to filename\"); \n System.out.println(\"\\t ~ is used for a space character\" ); \n System.out.println(\"\\tb [STRING] [INDEX]\\t\\tinsert [STRING] \" +\n \"before [INDEX]\");\n System.out.println(\"\\tr [START] [STOP]\\t\\tremove all charecters\" +\n \" from index start to stop\");\n System.out.println(\"\\td [CHAR]\\t\\t\\tremove all [CHAR] elements \" +\n \"in the list\");\n System.out.println(\"\\tr [CHAR1] [CHAR2]\\t\\treplace all \" + \n \"[CHAR1]'s with [CHAR2]\");\n System.out.println(\"\\tz\\t\\t\\t\\trandomly run other commands several\" +\n \" times\");\n System.out.println(\"\\tp [INDEX] [CLIPBOARD]\\t\\tpaste from \" +\n \"clipboard number [CLIPBOARD] to message index [INDEX]\");\n System.out.println(\"\\tc [START] [STOP] [CLIPBOARD]\\t\" + \n \"copy message values from index [START] to [STOP] to \" + \n \"clipboard [CLIPBOARD]\");\n System.out.println(\"\\tx [STOP] [START] [CLIPBOARD]\\tcut from \" +\n \"message index [START] to [STOP] to clipboard [CLIPBOARD]\");\n System.out.println(\"\\th\\t\\t\\t\\tmeans to show this help page\");\n }", "public SimulatorHelpDialog() {\n super((Frame)null, true);\n initComponents();\n initialize();\n }", "public HelpScreen(){\n \t\n \t/* Calls the JFrame constructor */\n super(\"Help\");\n \n /* Sets the global instance of this class to this instance */\n global=this;\n \n /* Set the window icon */\n this.setIconImage(GlobalAttributes.icon);\n \n /* Sets the layout manager to Border Layout */\n main.setLayout(new BorderLayout());\n \n /* Adds the text area */\n main.add(textScrollPane,BorderLayout.CENTER);\n \n /* Sets the appropriate text for the user to view */\n text.setText(\"Copyright 2012 Daniel Morrison\\n\\n\");\n text.append(\"Enter a series of instructions separated by semi-colons (;).\\n\");\n text.append(\"To declare an event, simply enter a string e.g. \\\"x\\\".\\n\");\n text.append(\"To specify a precedes/enables relation, enter an instruction of the\" +\n \t\t\" form \\\"x<y\\\", where x and y are events and x must occur before y.\\n\");\n text.append(\"To specify a conflict relation, enter an instruction of the form \\\"x#y\\\", where \" +\n \t\t\"x and y are events and either one may occur during an execution sequence but \" +\n \t\t\"not both (i.e. x NAND y = 1).\\nEvents must be declared before they can be used in \" +\n \t\t\"enables or conflict relations.\\n\");\n text.append(\"In Model mode, nodes can be dragged to new locations if their current \" +\n \t\t\"location is inconvenient. \\nNodes cannot be moved for the transition graph, as their locations are \" +\n \t\t\"always optimal.\\nTransition graph generation is not recommended for large definitions.\\n\\n\" );\n text.append(\"In Circuit mode, the behaviour of the conflict resolution elements is as follows.\\n\\n\");\n text.append(\"Standard:\\tS0 = I1.O1.S1 + I2.O2.S2 \\n\\tS1 = I1.O1.S1 + I2.SBO2.S1 + SBI1.SBO1.S2\\n\");\n text.append(\"\\tS2 = I2.O2.S2 + I1.SBO1.S2 + SBI2.SBO2.S1\\n\\nThis follows a first-come first-served policy \");\n text.append(\"with regards to selecting the winner of the conflict.\\n\\n\");\n text.append(\"Synchronised:\\tS0 = I1.(I2.(O1.PBO2.SBO2.S1 + O2.PBO1.SBO1.S2) + PBI2.O1.PBO2.S1) + \\n\");\n text.append(\"\\t I2.(I1.(O2.PBO1.SBO1.S2 + O1.PBO2.SBO2.S1) + PBI1.O2.PBO1.S2)\\n\");\n text.append(\"\\tS1 = I1.O1.S1 + I2.SBO2.S1 + SBI1.SBO1.S2\\n\");\n text.append(\"\\tS2 = I2.O2.S2 + I1.SBO1.S2 + SBI2.SBO2.S1\\n\\nThis is identical to the previous element, except \");\n text.append(\"that the initial winner is determined by giving both events an opportunity to compete via forward \" +\n \t\t\"signals from previous instances of the element.\");\n \n /* Configures the text area such that the user cannot modify */\n text.setLineWrap(true);\n text.setWrapStyleWord(true);\n text.setEditable(false);\n \n /* Configures the overall window dimensions and visibility */\n this.setMinimumSize(new Dimension(550,500));\n this.setPreferredSize(new Dimension(550,500));\n this.setVisible(true);\n this.setContentPane(main);\n this.pack();\n \n /* Sets the close button to hide the window, rather than\n * destroy it */\n this.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);\n }", "public void helpGenericAction() {\n new Help(getGenericHelpTitle(), getGenericHelp());\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 void makeHelpMenu() {\r\n\t\tJMenu helpMnu = new JMenu(\"Ayuda\");\r\n\r\n\t\tJMenuItem tipMenuItem = new JMenuItem(\"Tips...\");\r\n\t\ttipMenuItem.setMnemonic('t');\r\n\t\ttipMenuItem.setToolTipText(\"Muestra los consejos de Store\");\r\n\t\ttipMenuItem.addActionListener(new ActionListener() {\r\n\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tnew StoreTip();\r\n\t\t\t}\r\n\r\n\t\t});\r\n\r\n\t\thelpMnu.add(tipMenuItem);\r\n\t\thelpMnu.setMnemonic('y');\r\n\t\tadd(helpMnu);\r\n\t}", "@Override\n public void help() {\n\n }", "@Override\r\n\tprotected String getHelpInfor() {\n\t\treturn \"\";\r\n\t}", "private void showHelpDialog() {\n\n view.helpDialog();\n }", "public void createHelpList() {\t\n\t\tcommandList.add(\"add event with deadline\");\n\t\tcommandList.add(\"add event with timeline\");\n\t\tcommandList.add(\"add event with timeline, single day\");\n\t\tcommandList.add(\"add event with no deadline\");\n\t\tcommandList.add(\"add event with rank\");\n\t\tcommandList.add(\"add recurring tasks with deadline\");\n\t\tcommandList.add(\"add recurring tasks with timeline\");\n\t\tcommandList.add(\"add timeline events with blocking ability\");\n\t\tcommandList.add(\"edit date only\");\n\t\tcommandList.add(\"edit title only\");\n\t\tcommandList.add(\"edit timeline only\");\n\t\tcommandList.add(\"edit rank only\");\n\t\tcommandList.add(\"deleting event\");\n\t\tcommandList.add(\"undo\");\n\t\tcommandList.add(\"redo\");\n\t\tcommandList.add(\"display default\");\n\t\tcommandList.add(\"display by date\");\n\t\tcommandList.add(\"display by importance\");\n\t\tcommandList.add(\"display alphabetically\");\n\t\tcommandList.add(\"search by title\");\n\t\tcommandList.add(\"search by date\");\n\t\tcommandList.add(\"search by importance\");\n\t\tcommandList.add(\"change directory\");\n\t\tcommandList.add(\"marking task as complete\");\n\t\tcommandList.add(\"clear file\");\n\t\tcommandList.add(\"help\");\n\t\tcommandList.add(\"exit\");\n\t\t\n\t\tinputCommand.add(\"add <description> by <deadline>\");\n\t\tinputCommand.add(\"add <description> from <start date time> to \"\n\t\t\t\t + \"<end date time> \");\n\t\tinputCommand.add(\"add <description> on <date> from <start time> \"\n\t\t\t\t + \"to <end time>\");\n\t\tinputCommand.add(\"add <description>\");\n\t\tinputCommand.add(\"add <description> by <deadline> rank <number>\");\n\t\tinputCommand.add(\"add <description> repeat <repeat period>\"\n\t\t\t\t + \" <monthly/yearly/daily> \" + \"on <date>\");\n\t\tinputCommand.add(\"add <description> repeat <repeat period>\" + \" <monthly/yearly/daily> \" + \"from <startDate> to <endDate>\");\n\t\tinputCommand.add(\"add <description> block <start date> to <end date>\");\n\t\tinputCommand.add(\"edit <task index> by date <new date>\");\n\t\tinputCommand.add(\"edit <task index> by title <updated title>\");\n\t\tinputCommand.add(\"edit <task index> by time from <new start date> \"\n\t\t\t\t + \"to <new end date>\");\n\t\tinputCommand.add(\"edit <task index> by impt <new rank>\");\n\t\tinputCommand.add(\"delete <task index>\");\n\t\tinputCommand.add(\"undo\");\n\t\tinputCommand.add(\"redo\");\n\t\tinputCommand.add(\"display\");\n\t\tinputCommand.add(\"display date\");\n\t\tinputCommand.add(\"display impt\");\n\t\tinputCommand.add(\"display alpha\");\n\t\tinputCommand.add(\"search <title>\");\n\t\tinputCommand.add(\"search date <date>\");\n\t\tinputCommand.add(\"search impt <rank>\");\n\t\tinputCommand.add(\"cd <new directory>\");\n\t\tinputCommand.add(\"complete <task index>\");\n\t\tinputCommand.add(\"clear\");\n\t\tinputCommand.add(\"help\");\n\t\tinputCommand.add(\"exit\");\n\t}", "public void showHelp(CommandSender sender) {\n\t\t\n\t}", "public void help();", "private DEmbedBuilder buildHelp(String botName, String prefix, String commandString, MessageCommand command, String exception)\n {\n DEmbedBuilder builder = new DEmbedBuilder();\n String author = \"Help with \" + botName;\n String description;\n if (command != null)\n description = combineSubCommands(prefix, commandString, command);\n else\n description = combineCommands(prefix);\n Color color = new Color(97, 185, 221);\n\n builder.setAuthor(author).setColor(color);\n if (!exception.isEmpty())\n builder.setFooter(exception);\n builder.setDescription(description);\n\n return builder;\n }", "private void showHelp() {\n\t\tJOptionPane.showMessageDialog(this, \"Created by Mario Bobić\", \"About File Encryptor\", JOptionPane.INFORMATION_MESSAGE);\n\t}", "public void helpSpecificAction() {\n new Help(getSpecificHelpTitle(), getSpecificHelp());\n }", "public void helpRequested(HelpEvent event) {\r\n }", "private MenuManager createHelpMenu(IWorkbenchWindow window) {\n\t\tMenuManager menu = new MenuManager(Messages.getString(\"IU.Strings.42\")); //$NON-NLS-1$\n\t\t\n\t\t\n\t\tmenu.add(getAction(ActionFactory.HELP_CONTENTS.getId()));\t\n\t\tmenu.add(new Separator());\n\t\tIWorkbenchAction about = ActionFactory.ABOUT.create(window);\n\t\tabout.setText(Messages.getString(\"IU.Strings.43\")); //$NON-NLS-1$\n\t\tmenu.add(about);\n\t\t\n\t\treturn menu;\t\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 }", "public JMenu helpMenu() {\r\n final JMenu helpMenu = new JMenu(\"Help\");\r\n helpMenu.setMnemonic(KeyEvent.VK_H);\r\n final JMenuItem about = new JMenuItem(\"About...\");\r\n about.setMnemonic(KeyEvent.VK_A);\r\n about.addActionListener((theEvent) -> {\r\n final ImageIcon img = new ImageIcon(\"images//Lion.png\");\r\n final String sb = \"TCSS 305\\nAutumn 2016\\nKeldon Fischer\\n\";\r\n JOptionPane.showMessageDialog(null, sb, \r\n \"About\", \r\n JOptionPane.PLAIN_MESSAGE, img);\r\n });\r\n helpMenu.add(about);\r\n \r\n return helpMenu;\r\n }", "private void help() {\n String border = \"=====================================================================================\";\n String title = \"AILearning API:\\n\";\n String template = \"arguments: numOfControls, controls..., quantityOfEach, hasHighContrast, hasDisabled, \" +\n \"hasNoise, isUnsorted\\n\";\n String numOfCon= \"numOfControls - integer number of controls (1 - 6)\\n\";\n String contrls = \"controls... - each control is string and number of strings equals numOfControls\";\n String namesOfControls = \"Every string is define symbol:\\nB - Button, TF - TextField, RB - RadioButton\" +\n \"Sp - Spinner, Sl - Slider, CB - CheckBox\\n\";\n String quantityOfEach = \"quantityOfEach - integer number of each control (0 - 1 000 000)\\n\";\n String highContrast = \"hasHighContrast - string (true or false)\\n\";\n String disabled = \"hasDisabled - string (true of false)\\nif true - some controls will be disabled\\n\";\n String noise = \"hasNoise - string (true or false)\\n\";\n String unsorted = \"isUnsorted - string (true or false)\\nif true - controls will be in one folder\\n\";\n String example = \"Example: 3 B TF RB 100 true true true false\";\n String meaning = \"It means that app will generate 100 Buttons, 100 TextFields, 100 RadioButtons \" +\n \"with high contrast, noise,\\nsome controls will be disabled and locate in different folders\";\n\n System.out.println(String.format(\"%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\\n%s\", border, title, template, numOfCon,\n contrls, namesOfControls, quantityOfEach, highContrast, disabled, noise, unsorted, example, meaning));\n }", "HelpFactory getHelpFactory();", "private void helpAbout() {\n JOptionPane.showMessageDialog(this, new ConsoleWindow_AboutBoxPanel1(), \"About\", JOptionPane.PLAIN_MESSAGE);\n }", "private void showHelp() {\n System.out.println(\"new: \");\n System.out.println(\"new chess and throw the chess bevor away\");\n System.out.println(\"move from to:\");\n System.out.println(\"take the pawn from position from to position to \");\n System.out.println(\"print:\");\n System.out.println(\"print the chess now \");\n System.out.println(\"help:\");\n System.out.println(\"show help\");\n System.out.println(\"quit:\");\n System.out.println(\"quit out\");\n }", "protected void do_mntmStudentIHelp_actionPerformed(ActionEvent arg0) {\n\t\tDelVecchioMCSRStudentHelpFrame studentHelpFrame = new DelVecchioMCSRStudentHelpFrame();\n\t\tstudentHelpFrame.setVisible(true);\n\t\t\n\t}", "public static void displayHelp() {\n\t\thelp = getInstance();\n\t\tUIMain.popUpHelp(commandList, inputCommand);\t\n\t\tLoggingLogic.logging(HELP_MESSAGE);\n\t}", "private void doHelp()\r\n {\r\n Help.showHelp(page, ref, null);\r\n }", "public void instruction() {\n gui.setUp();\n JLabel header = new JLabel(\"Vocabulary Quiz\");\n header.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 28));\n gui.getConstraints().gridx = 0;\n gui.getConstraints().gridy = 0;\n gui.getConstraints().insets = new Insets(10,0,100,0);\n gui.getPanel().add(header, gui.getConstraints());\n String instructionText = \"You can make sure how many vocabularies you remember \";\n instructionText += \"in your list.\\nThere are \\\"\" + VocabularyQuizList.MAX_NUMBER_QUIZ + \"\\\" questions. \";\n instructionText += \"Each question has \\\"\" + VocabularyQuiz.NUM_SELECT + \"\\\" choices.\\n\\n\";\n instructionText += \"LET'S START!!\";\n JTextArea instruction = new JTextArea(instructionText);\n instruction.setEditable(false);\n instruction.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 20));\n gui.getConstraints().gridy = 1;\n gui.getPanel().add(instruction, gui.getConstraints());\n JButton b = new JButton(\"start\");\n gui.getConstraints().gridy = 2;\n startQuestionListener(b);\n gui.getConstraints().insets = new Insets(10,300,10,300);\n gui.getPanel().add(b, gui.getConstraints());\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n helpPopUp();\n }", "private static void help() {\n System.out.println(\"Supported Command List:\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println(\"To draw canvas press: C <width> <height>\");\n System.out.println(\"To draw rectangle press: R <x1> <y1> <x2> <y2>\");\n System.out.println(\"To draw Line press : L <x1> <y1> <x2> <y2>\");\n System.out.println(\"To fill canvas press : B <x> <y> <c>\");\n System.out.println(\"To quit press: Q\");\n System.out.println(\"@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\");\n System.out.println();\n }", "void help();", "public void updateHelp() {\n\tif (help != null) {\n\t help.setTitle(helpPrefix + title);\n\t help.setContent(getHelp());\n\t if (followPos) {\n\t\thelp.focusOn(this, helpYoffset);\n\t } else {\n\t\thelp.setDefaultPos();\n\t\thelp.hideArrow();\n\t }\n\t}\n }", "void printHelp();", "protected JComponent createHelpPane() {\r\n JEditorPane editorPane = new JEditorPane();\r\n editorPane.setEditable(false);\r\n editorPane.setMargin(new Insets(0, 0, 0, 0));\r\n try {\r\n editorPane.setPage(getClass().getResource(\"resources/help.html\"));\r\n } catch (IOException e) {\r\n editorPane.setContentType(\"text/plain\");\r\n editorPane.setText(\r\n \"Could not resolve help text. Please ensure that your build process or IDE adds \" +\r\n \"the folder \\\"resources\\\" containing the help.html file to the class path.\");\r\n }\r\n // make links clickable\r\n editorPane.addHyperlinkListener(e -> {\r\n if(e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {\r\n if(Desktop.isDesktopSupported()) {\r\n try {\r\n Desktop.getDesktop().browse(e.getURL().toURI());\r\n } catch (IOException | URISyntaxException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n }\r\n });\r\n\r\n JScrollPane scrollPane = new JScrollPane(editorPane);\r\n scrollPane.setPreferredSize(new Dimension(340, 250));\r\n return scrollPane;\r\n }", "@Override\n public void printHelp() {\n\n }", "public void helpPressed() {\n Stage mainStage = (Stage)pane.getScene().getWindow();\n PresentationCtrl.getInstance().showNotification(\"Information\", \"Information\", null,\n \"- Click <Clear> button to clear the history\\n\\n- Click <Refresh> button to refresh the history\" +\n \"\\n\\n- Double clicks on a row to see the detailed information\", mainStage);\n }", "@Override\n\tpublic void sendHelp(ICommandSender sender) {\n\t}", "public void createInstructionButton() {\n \tEventHandler<MouseEvent> eventHandler = new EventHandler<MouseEvent>() {\n\t @Override public void handle(MouseEvent e) {\n\t \tshowInstructions();}\n };\n \tcreateGenericButton(2, 0, myResources.getString(\"guide\"), eventHandler);\n }", "public void displayHelp(int pageNum) {\n\t\tJFrame help = new JFrame();\n\t\thelp.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\n\t\thelp.setTitle(\"Help\");\n help.setSize(750,875);\n help.setLocationRelativeTo(null);\t\n help.setVisible(true);\n \n //Set up JPanel to hold Tutor object\n JPanel helpPanel = new JPanel();\n help.add(helpPanel);\n \n //Create tutor object and set to the correct page number\n Tutor helpTut = new Tutor();\n helpPanel.add(helpTut);\n //helpTut.displayPageNum(pageNum);\n \n\t}", "private static void createAndShowGUI()\r\n {\r\n JFrame frame = new JFrame(\"ChangingTitleFrame Application\");\r\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n frame.getContentPane().add(new FramePanel(frame).getPanel());\r\n frame.pack();\r\n frame.setLocationRelativeTo(null);\r\n frame.setVisible(true);\r\n }", "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 }", "protected void do_mntmParentHelp_actionPerformed(ActionEvent arg0) {\n\t\tDelVecchioMCSRParentHelpFrame ParentHelpFrame = new DelVecchioMCSRParentHelpFrame();\n\t\tParentHelpFrame.setVisible(true);\n\t}", "public NormalHelp(int mode) {\r\n initComponents();\r\n this.mode = mode;\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n int width = this.getWidth();\r\n int height = this.getHeight();\r\n this.setLocation((screenSize.width - width)/2,(screenSize.height - height)/2);\r\n try {\r\n if (mode == NormalHelp.SHOW_ABOUT) this.editorPane.setPage(new File(Intelligence.configurator.getPathProperty(\"help_file_about\")).toURL());\r\n else this.editorPane.setPage(new File(Intelligence.configurator.getPathProperty(\"help_file_help\")).toURL());\r\n } catch (Exception e) {\r\n this.dispose();\r\n }\r\n this.setVisible(true);\r\n }", "public void showHelp(OnClickListener cl) {\n\t\tBuilder adb = new AlertDialog.Builder(this);\n\t\tadb.setIcon(R.drawable.icon);\n \tadb.setTitle(\"Wallpaper Wizard\");\n \tadb.setMessage(Html.fromHtml(\"<b>Tap</b> the images you like, and I will \" + \n \t\t\t\"learn your preferences to suggest new images.<p>\" + \n \t\t\t\"<b>Press and Hold</b> an image to set it as your wallpaper \" + \n \t\t\t\"and save it to the 'wizard' directory on your SD card. \" + \n \t\t\t\"<p>All proceeds from ads will benefit the computer science \" + \n \t\t\t\"program at <b>Centenary College of Louisiana</b>.\"));\n \tadb.setPositiveButton(\"OK\", cl);\n \tadb.show(); \t\n }", "@FXML\r\n\tvoid help_btn_clicked(MouseEvent event) {\r\n\t\tDialog<String> dia = new Dialog<>();\r\n\t\tStage stage = (Stage) dia.getDialogPane().getScene().getWindow();\r\n\t\tDialogPane dialogPane = dia.getDialogPane();\r\n\t\tdialogPane.getStylesheets().add(getClass().getResource(\"/client/boundry/dialog.css\").toExternalForm());\r\n\t\tdialogPane.getStyleClass().add(\"dialog\");\r\n\t\tdia.setTitle(\"Help Dialog\");\r\n\t\tdia.setHeaderText(\"Guide:\");\r\n\t\tdia.setGraphic(new ImageView(this.getClass().getResource(\"/icons8-info-48.png\").toString()));\r\n\t\t// Add a custom icon.\r\n\t\tstage.getIcons().add(new Image(this.getClass().getResource(\"/icons8-help-24.png\").toString()));\r\n\t\tdia.getDialogPane().getButtonTypes().addAll(ButtonType.OK);\r\n\t\tdia.setContentText(\r\n\t\t\t\t\"Main Sale Pattern Screen\\nIn this screen you can choose sale from table,add sale, delete and open\\n\"\r\n\t\t\t\t\t\t+ \"for full information, click on specific sale and choose an action, in addition you can click\"\r\n\t\t\t\t\t\t+ \"on \\\"Statistics\\\" for statistic inforamtion\");\r\n\t\tdia.show();\r\n\t}", "protected void showHelp() {\n try {\n String appletPath = getClass().getName().replace('.', '/');\n URL url = new URL(getCodeBase(), appletPath+\"Help.html\");\n getAppletContext().showDocument(url, \"Help\");\n } catch (IOException e) {\n showStatus(\"Help file not found\");\n }\n\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}", "private void mnHelpActionPerformed(java.awt.event.ActionEvent evt) {\n\n }", "public static void printHelpGuide() {\n printDivider();\n System.out.println(\"Help arrives!\\n\");\n printUserGuide();\n printDivider();\n }", "private void openHelpDialog() {\r\n\t\t// Get view and put relevant information into the view.\r\n\t\tLayoutInflater li = LayoutInflater.from(this);\r\n\t\tView view = li.inflate(R.layout.archive_help_dialog, null);\r\n\r\n\t\tnew AlertDialog.Builder(this)\r\n\t\t\t\t.setTitle(\r\n\t\t\t\t\t\tgetResources().getString(R.string.action_archive)\r\n\t\t\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t\t\t+ getResources()\r\n\t\t\t\t\t\t\t\t\t\t.getString(R.string.action_help))\r\n\t\t\t\t.setIcon(R.drawable.icon)\r\n\t\t\t\t.setView(view)\r\n\t\t\t\t.setNegativeButton(R.string.dialog_general_button_close,\r\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,\r\n\t\t\t\t\t\t\t\t\tint whichButton) {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}).show();\r\n\t}", "private void setHelp() {\n\t\tHelpOpt.add(\"-h\");\n\t\tHelpOpt.add(\"/h\");\n\t\tHelpOpt.add(\"help\");\n\t}", "protected ActionListener createHelpActionListener() {\r\n return null;\r\n }", "public FinancialTrackerHelpWindow() {\n this(new Stage());\n }", "public static HelpDisplayBuilder builder() {\n return new HelpDisplayBuilder();\n }", "public static JFrame makeFrame (String title)\n {\n\t// make the frame and put a new TextOutputPanel in it\n\tJFrame frame = new JFrame (title);\n\tfinal TextOutputPanel panel = new TextOutputPanel (frame);\n\tframe.setContentPane (panel);\n\tframe.setDefaultCloseOperation (frame.HIDE_ON_CLOSE);\n\n\t// make the menubar for the frame\n\tJMenuBar menuBar = new JMenuBar ();\n\tframe.setJMenuBar (menuBar);\n\n\tJMenu fileMenu = new JMenu (\"File\");\n\tmenuBar.add (fileMenu);\n\tfileMenu.add (new AbstractAction (\"Save As...\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.saveAs ();\n\t }\n\t});\n\n\tJMenu editMenu = new JMenu (\"Edit\");\n\tmenuBar.add (editMenu);\n\teditMenu.add (new AbstractAction (\"Copy\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.myDocumentPane.copy ();\n\t }\n\t});\n\teditMenu.add (new AbstractAction (\"Select All\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.myDocumentPane.selectAll ();\n\t }\n\t});\n\teditMenu.add (new AbstractAction (\"Clear\")\n\t{\n\t public void actionPerformed (ActionEvent event)\n\t {\n\t\tpanel.clear ();\n\t }\n\t});\n\n\tframe.pack ();\n\treturn frame;\n }", "public HelpCmd() {\n super(\n \"help\",\n \"help <devicetype>\",\n \"Shows help for the specified device type. You can view here the unique methods for a device.\"\n );\n this.helpPages = new HashMap<>();\n for(DeviceType type : DeviceType.values()) {\n try {\n helpPages.put(type.getValue(), FileHandler.readHelpPage(type.getValue()));\n } catch (IOException e) {\n Printer.printErr(type + \" help page can't be loaded!\");\n }\n }\n }", "private void printHelp() {\n TablePrinter helpTableHead = new TablePrinter(\"Command Name : \", \"textconvert\");\n helpTableHead.addRow(\"SYNOPSIS : \", \"textconvert [OPTION]...\");\n helpTableHead.addRow(\"DESCRIPTION : \", \"Convert text/file to Binary, Hexadecimal, Base64.\");\n helpTableHead.print();\n TablePrinter helpTable = new TablePrinter(\"Short Opt\", \"Long Opt\", \"Argument\", \"Desc\", \"Short Option Example\", \"Long Option Example\");\n helpTable.addRow(\"-h\", \"--help\", \"not required\", \"Show this help.\", \"help -h\", \"help --help\");\n helpTable.addRow(\"-f\", \"--file\", \"required\", \"Path to file\", \"textconvert -f /PATH/TO/FILE\", \"textconvert --file /PATH/TO/FILE\");\n helpTable.addRow(\"-ttb\", \"--texttobinary\", \"not required\", \"Convert text to Binary\", \"textconvert -ttb -f /PATH/TO/FILE\", \"textconvert --texttobinary --file /PATH/To/File\");\n helpTable.addRow(\"-btt\", \"--binarytotext\", \"not required\", \"Convert Binary to text\", \"textconvert -btt -f /PATH/To/FileWithBinaryData\", \"textconvert --binarytotext --file /PATH/To/FileWithBinaryData\");\n helpTable.print();\n this.done = true;\n }", "public HomeFrame() {\n super();\n\n this.setSize(400, 80);\n Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n this.setLocation(dim.width/2-this.getSize().width/2, dim.height/2-this.getSize().height/2);\n this.setTitle(\"Reed-Muller code sending simulator\");\n JPanel panel = new JPanel();\n\n JButton sendVector = new JButton();\n sendVector.setText(\"Vector\");\n sendVector.addActionListener(e -> new VectorFrame());\n\n JButton sendText = new JButton();\n sendText.setText(\"Text\");\n sendText.addActionListener(e -> new TextFrame());\n\n panel.add(sendVector);\n panel.add(sendText);\n\n panel.setVisible(true);\n this.add(panel);\n this.setVisible(true);\n }", "Help(String fname) {\n helpfile = fname;\n }", "public String getHelp();", "private void createFrame(){\n System.out.println(\"Assembling \" + name + \" frame.\");\n }", "protected void do_mntmFinancialHelp_actionPerformed(ActionEvent arg0) {\n\t\tDelVecchioMCSRFinancialHelpFrame financialHelpFrame = new DelVecchioMCSRFinancialHelpFrame();\n\t\tfinancialHelpFrame.setVisible(true);\n\t}", "@FXML public void handleSentimentRelatedFeaturesHelp() {\n\t\t// Help.help(HelpConstants.FeaturesSets.BASIC_SENTIMENT_BASED_FEATURES);\n\t\ttry {\n\t\t\tRuntime.getRuntime().exec(\"hh.exe \" + Constants.helpFile + \"::1- Sentiment Features.html\");\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 testHelp() {\n // increasing time because opening of help window can last longer on slower machines\n JemmyProperties.setCurrentTimeout(\"JMenuOperator.PushMenuTimeout\", 60000);\n // open \"Help|Contents\"\n HelpOperator helpOper = HelpOperator.invoke();\n // check help window opened\n // title is \"Help - All\"\n helpOper.close();\n }", "@Deprecated\n public void buildTemplateGUI(){\n // Clear the frame\n rebuildFrame();\n \n // Header options in [OBJECT] GUI\n header.setText(\"Descriptive button header: \");\n \n //------Unique panel objects here---------\n \n \n //----------------------------------------\n \n // Display GUI after finished building\n controlFrame.pack();\n controlFrame.setVisible(true);\n }", "private void createFrame() {\n System.out.println(\"Assembling \" + name + \" frame\");\n }", "public void openHelp(){\n\n Intent helpIntent = new Intent(this, Help.class);\n startActivity(helpIntent);\n\n }", "CartogramWizardFinishedPanel (JFrame contentFrame)\n\t{\n\t\tthis.setLocation(160, 90);\n\t\tthis.setSize(440, 340);\n\t\tthis.setLayout(null);\n\t\t\n\t\t\n\t\t\n\t\t// ADD THE HELP BUTTON\n\t\t\n\t\tClassLoader cldr = this.getClass().getClassLoader();\n\t\t\n\t\tjava.net.URL imageURL = cldr.getResource(\"help-22.png\");\n\t\tImageIcon helpIcon = new ImageIcon(imageURL);\n\n\t\tmHelpButton = new JButton(helpIcon);\n\t\tmHelpButton.setVerticalTextPosition(SwingConstants.BOTTOM);\n\t\tmHelpButton.setHorizontalTextPosition(SwingConstants.CENTER);\n\t\tmHelpButton.setSize(30, 30);\n\t\tmHelpButton.setLocation(0, 312);\n\t\tmHelpButton.setFocusable(false);\n\t\tmHelpButton.setContentAreaFilled(false);\n\t\tmHelpButton.setBorderPainted(false);\n\t\t\n\t\tmHelpButton.addActionListener(new CartogramWizardShowURL(\n\t\t\t\"http://chorogram.choros.ch/scapetoad/help/d-computation-report.php\"));\n\n\n\n\n\t\tmSaveReportButton = new JButton(\"Save report...\");\n\t\tmSaveReportButton.setBounds(300, 312, 130, 26);\n\t\tmSaveReportButton.setVisible(false);\n\t\tmSaveReportButton.addActionListener(\n\t\t\tnew CartogramWizardSaveReportAction());\n\t\t\n\t\t\n\t\t\t\t\n\t}", "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 }", "@FXML\n public void handleHelp() {\n HelpWindow helpWindow = new HelpWindow();\n\t\tTemplateClass.instrum(\"LineNumber: \",\"191\", \"Type: \",\"org.eclipse.jdt.core.dom.VariableDeclarationStatement\", \"Method: \",\"handleHelp\", \"Class: \",\"MainWindow\", \"VariableName: \",\"HelpWindow\", \"VariableName: \",\"helpWindow\", \"VariableName: \",\"HelpWindow\");\n helpWindow.show();\n\t\tTemplateClass.instrum(\"LineNumber: \",\"192\", \"Type: \",\"org.eclipse.jdt.core.dom.ExpressionStatement\", \"Method: \",\"handleHelp\", \"Class: \",\"MainWindow\");\n }", "private SlackerOutput handleHelp() {\n logger.debug(\"Handling help request\");\n List<WorkflowMetadata> metadata = registry.getWorkflowMetadata();\n Collections.sort(metadata, new Comparator<WorkflowMetadata>() {\n @Override\n public int compare(WorkflowMetadata m1, WorkflowMetadata m2) {\n String p1 = StringUtils.join(m1.getPath(), \"::\");\n String p2 = StringUtils.join(m2.getPath(), \"::\");\n return p1.compareTo(p2);\n }\n });\n StringBuilder sb = new StringBuilder(\"I can understand:\\n\");\n for (WorkflowMetadata wm : metadata) {\n sb.append(StringUtils.join(wm.getPath(), \" \"))\n .append(\" \")\n .append(trimToEmpty(wm.getArgsSpecification()))\n .append(\"\\n\").append(\" \")\n .append(trimToEmpty(wm.getName()))\n .append(\" - \").append(trimToEmpty(wm.getDescription()))\n .append(\"\\n\");\n }\n return new TextOutput(sb.toString());\n }", "public AboutDialog(JFrame frame) {\n\t\tsuper(frame,\"About..\", true);\n\t\tadd(new JTextArea(\"Copyright © 2016 by Vitaly Leshchenko\" + \"\\n \"\n\t\t\t\t+ \"All rights reserved. No part of this publication may be reproduced, distributed, or \\n\"\n\t\t\t\t+ \"transmitted in any form or by any means, including photocopying, recording, or other \\n\"\n\t\t\t\t+ \"electronic or mechanical methods, without the prior written permission of the \\n\"\n\t\t\t\t+ \"publisher, except in the case of brief quotations embodied in critical reviews and \\n\"\n\t\t\t\t+ \"certain other noncommercial uses permitted by copyright law. For permission requests, \\n\"\n\t\t\t\t+ \"write to the publisher, addressed “Attention: Permissions Coordinator,” at the address \\n\"\n\t\t\t\t+ \"below.\\n\"\n\t\t\t\t+ \"Ukraine, Kyiv, KPI\"), BorderLayout.CENTER);\n\n\t\tJButton ok = new JButton(\"OK\");\n\t\tok.addActionListener(new ActionListener() {\n\n\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\tdispose();\n\t\t\t}\n\t\t});\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(ok);\n\t\tadd(panel, BorderLayout.SOUTH);\n\t\tsetSize(500, 260);\n\t\tsetResizable(false);\n\t\tsetLocationRelativeTo(null);\n\t\tsetVisible(true);\n\t\tsetDefaultCloseOperation(DISPOSE_ON_CLOSE);\n\t}", "@Override\n public void help(CommandSender sender) {\n \n }", "private static void help() {\n\t\t\n\t\tTask[] taskList = createTaskList();\n\t\t\n\t\tSystem.out.println(\"\\n---------------------------------[ HELP ]--------\"\n\t\t\t\t+ \"------------------------------\\n\");\n\t\t\n\t\t// Post1 Display help (Polymorphism)\n\t\tfor (Task task : taskList) {\n\t\t\ttask.displayHelp();\n\t\t}\n\t\t\n\t}", "public JInternalFrame createAndShow() {\r\n /** Create and set up the window. */\r\n JInternalFrame frame = new JInternalFrame(\"About\");\r\n frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n \r\n frame.putClientProperty(\"JInternalFrame.isPallete\", Boolean.TRUE);\r\n\r\n /** Add content to the window. */\r\n frame.add(new About());\r\n \r\n frame.setClosable(true);\r\n\r\n /** Display the window. */\r\n frame.pack();\r\n frame.setVisible(true);\r\n \r\n return frame;\r\n }", "public void buildFrame();", "private void howToPlay() {\n\n String s = \"You are presented with a grid of tiles, some of which contain mines.\\n\"\n + \"The aim of Minesweeper is to reveal all tiles in the grid which do not contain mines.\\n\"\n + \"To reveal a tile, click on it. If the tile you reveal is a mine, you lose the game.\\n\"\n + \"If the tile you reveal is empty, all surrounding tiles will be revealed, \\n\"\n + \"and if those are also empty, their surrounding tiles will be revealed too.\\n\"\n + \"Tiles containing numbers indicate how many mines there are surrounding that tile.\\n\"\n + \"If you think a tile contains a mine, right click on it to mark it as a mine.\\n\"\n + \"You win the game once either you mark all mines, or reveal all tiles which are not mines.\";\n\n JFrame helpframe = new JFrame(\"How to play\");\n JPanel helppanel = new JPanel();\n JButton close = new JButton(\"Got it!\");\n JTextArea text = new JTextArea(s);\n\n close.addActionListener((ActionEvent ev) -> {\n helpframe.dispose();\n });\n\n text.setEditable(false);\n text.setOpaque(false);\n text.setWrapStyleWord(true);\n helppanel.add(text);\n helppanel.add(close);\n helpframe.add(helppanel);\n helpframe.setLocationRelativeTo(null);\n helpframe.setSize(560, 200);\n helpframe.setVisible(true);\n helpframe.setResizable(false);\n }", "@Override\n public HelpCtx getHelp() {\n return HelpCtx.DEFAULT_HELP;\n // If you have context help:\n // return new HelpCtx(\"help.key.here\");\n }", "Menu getMenuHelp();", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tg.printHelp(\"OthelloHelp.txt\");\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n Hello = new javax.swing.JPanel();\n jLabel1 = new javax.swing.JLabel();\n events = new javax.swing.JPanel();\n chooseHelp = new javax.swing.JPanel();\n general = new javax.swing.JButton();\n browsing = new javax.swing.JButton();\n running = new javax.swing.JButton();\n jButton1 = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n helpTxt = new javax.swing.JTextArea();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n\n Hello.setBackground(new java.awt.Color(56, 105, 100));\n\n jLabel1.setFont(new java.awt.Font(\"Segoe UI\", 1, 18)); // NOI18N\n jLabel1.setForeground(new java.awt.Color(255, 255, 255));\n jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n jLabel1.setText(\"Help\");\n\n javax.swing.GroupLayout HelloLayout = new javax.swing.GroupLayout(Hello);\n Hello.setLayout(HelloLayout);\n HelloLayout.setHorizontalGroup(\n HelloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(HelloLayout.createSequentialGroup()\n .addGap(160, 160, 160)\n .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 291, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(190, Short.MAX_VALUE))\n );\n HelloLayout.setVerticalGroup(\n HelloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 71, Short.MAX_VALUE)\n );\n\n events.setBackground(new java.awt.Color(18, 86, 104));\n\n chooseHelp.setBackground(new java.awt.Color(56, 105, 126));\n\n general.setText(\"General\");\n general.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n generalActionPerformed(evt);\n }\n });\n\n browsing.setText(\"Browsing Files\");\n browsing.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browsingActionPerformed(evt);\n }\n });\n\n running.setText(\"Running the program\");\n running.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n runningActionPerformed(evt);\n }\n });\n\n jButton1.setText(\"Saving Report File\");\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout chooseHelpLayout = new javax.swing.GroupLayout(chooseHelp);\n chooseHelp.setLayout(chooseHelpLayout);\n chooseHelpLayout.setHorizontalGroup(\n chooseHelpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(general, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(browsing, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(running, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n chooseHelpLayout.setVerticalGroup(\n chooseHelpLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(chooseHelpLayout.createSequentialGroup()\n .addGap(82, 82, 82)\n .addComponent(general)\n .addGap(18, 18, 18)\n .addComponent(browsing)\n .addGap(18, 18, 18)\n .addComponent(running)\n .addGap(18, 18, 18)\n .addComponent(jButton1)\n .addContainerGap(119, Short.MAX_VALUE))\n );\n\n helpTxt.setEditable(false);\n helpTxt.setColumns(20);\n helpTxt.setFont(new java.awt.Font(\"Segoe UI\", 0, 14)); // NOI18N\n helpTxt.setLineWrap(true);\n helpTxt.setRows(5);\n helpTxt.setBorder(new javax.swing.border.MatteBorder(null));\n jScrollPane1.setViewportView(helpTxt);\n\n javax.swing.GroupLayout eventsLayout = new javax.swing.GroupLayout(events);\n events.setLayout(eventsLayout);\n eventsLayout.setHorizontalGroup(\n eventsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(eventsLayout.createSequentialGroup()\n .addComponent(chooseHelp, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(jScrollPane1))\n );\n eventsLayout.setVerticalGroup(\n eventsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(chooseHelp, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1)\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(Hello, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(events, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(Hello, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, 0)\n .addComponent(events, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pack();\n }" ]
[ "0.75637186", "0.7195452", "0.71215296", "0.69351894", "0.68834937", "0.67744017", "0.6743922", "0.6741858", "0.6729089", "0.6724891", "0.6715814", "0.6696188", "0.6653836", "0.6618745", "0.65805984", "0.6556265", "0.65503794", "0.65397346", "0.6526013", "0.65165037", "0.6502709", "0.64948136", "0.6468601", "0.64612055", "0.64444077", "0.6412523", "0.63891697", "0.6380867", "0.6368385", "0.633974", "0.63356715", "0.6324148", "0.6323286", "0.63174844", "0.63143265", "0.6293271", "0.629042", "0.6282037", "0.62691724", "0.6269092", "0.6251124", "0.62509197", "0.62468493", "0.6242922", "0.6216243", "0.621315", "0.6181699", "0.6172585", "0.6161332", "0.61575574", "0.6133028", "0.6129989", "0.6127749", "0.61188126", "0.6118442", "0.6114734", "0.61138594", "0.61136806", "0.6110081", "0.61072403", "0.6099356", "0.6081913", "0.6076369", "0.6072524", "0.6066208", "0.60643923", "0.6064081", "0.60609263", "0.60454106", "0.60435325", "0.6042673", "0.60319275", "0.6031359", "0.6017517", "0.59969294", "0.5994366", "0.59928095", "0.5987689", "0.5979673", "0.59775877", "0.597259", "0.5968816", "0.5962388", "0.595758", "0.5957141", "0.59560347", "0.59543085", "0.5954247", "0.59511226", "0.59481525", "0.5947329", "0.5936789", "0.5932399", "0.5927906", "0.59269935", "0.59231395", "0.59198266", "0.59176815", "0.590135", "0.5901181" ]
0.650859
20
opens file and appends the words chosen to be added to the dictionary disables both add and ignore buttons after first click
public void actionPerformed(ActionEvent event) { Set<String> currentDictionaryTree = treeHandler.convertFileToTree(selectedWord.dictionaryFile); try { if(treeHandler.wordIsUnique(selectedWord.word, currentDictionaryTree)) { selectedWord.added = true; out = new BufferedWriter(new FileWriter(selectedWord.dictionaryFile, true)); out.newLine(); out.write(selectedWord.word); out.close(); // Statistics updating after word is successfully added int loc = (selectedWord.inputFileIndex+1)*(selectedWord.dictionaryFileIndex+1); display.numAdded.set(loc, Integer.valueOf(display.numAdded.get(loc) + 1)); } text.unhighlight(selectedWord); } /** * @exception IOException signals that there was an error in writing user added words to the corresponding dictionary */ catch (IOException exception) { exception.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_saveButtonMouseClicked\n \n FileDialog dialog = new FileDialog(this, \"Ssuvegarder le fichier dictionnaire\", FileDialog.SAVE);\n dialog.setFile(loadedDictionaryFilename);\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n // add .txt extension if user didn't add it\n if(!filename.substring(filename.length() - 4).equals(\".txt\"))\n filename = filename + \".txt\";\n \n // add full path of the filename\n filename = dialog.getDirectory() + filename;\n \n // get all WordDefinition in an arraylist \n ArrayList<WordDefinition> allWordDefinitionList = new ArrayList<>();\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n ArrayList<WordDefinition> allWordsInTree = lexiNodeTrees.get(i).getAllWordsFromTree();\n \n for(int j = 0 ; j < allWordsInTree.size() ; j++)\n {\n allWordDefinitionList.add(allWordsInTree.get(j));\n }\n }\n \n // sort the list of word definition in alphabetical order\n Collections.sort(allWordDefinitionList, new WordDefinitionComparator());\n \n // save to file\n if(DictioFileOperations.saveListToFile(filename, allWordDefinitionList))\n {\n loadedDictionaryFilename = filename; // save new name in case user wants to save again\n JOptionPane.showMessageDialog(this, \"La list des mots a été \"\n + \"sauvegardé dans le fichier\\n\" + filename + \".\\n\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n\n else // if there was a problem saving the file\n JOptionPane.showMessageDialog(this, \"ERREUR: Impossible de \"\n + \"sauvegarder dans le fichier.\\n\\n\", \"ERREUR\", \n JOptionPane.ERROR_MESSAGE);\n }\n }", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "private void loadButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loadButtonMouseClicked\n // open file dialog\n FileDialog dialog = new FileDialog(this, \"Choisir le fichier dictionnaire\", FileDialog.LOAD);\n dialog.setFile(\"*.txt\");\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n filename = dialog.getDirectory() + filename;\n lexiNodeTrees = DictioFileOperations.loadListFromFile(filename);\n \n if(lexiNodeTrees != null) // if list was successfully retrieved\n {\n loadedDictionaryFilename = filename;\n refreshAllWordsList();\n \n // clear text area and search suggestion\n searchSuggestionList.setModel(new DefaultListModel());\n definitionTextArea.setText(\"\");\n searchField.setText(\"\");\n }\n \n else // if file could not be loaded, show error dialog\n JOptionPane.showMessageDialog(this, \"ERREUR: Le fichier n'a \"\n + \"pas pu être chargé!\\n\\nVérifiez que le fichier est \"\n + \"valid est contient <<mot & définition>> sur toutes \"\n + \"les lignes\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\t// if an input file is already loaded, clear panel before adding new words\n\t\t\t\t\tif(!empty.status)\n\t\t\t\t\t{\n\t\t\t\t\t\t// new session only if user responds with yes\n\t\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to start a new spell check session?\");\n\n\t\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetContentPane().removeAll();\n\t\t\t\t\t\t\trevalidate();\n\t\t\t\t\t\t\tempty.status = false;\n\n\t\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\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\tnewSelectionResult = JFileChooser.CANCEL_OPTION;\n\t\t\t\t\t\t\tdictionarySelectionResult = JFileChooser.CANCEL_OPTION;\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\tempty.status = false;\n\n\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(newSelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\tinputFiles = newFileChooser.getSelectedFiles();\n\t\t\t\t\t\n\t\t\t\t\t\tinputTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\tinputTrees = treeHandler.convertMultipleFiles(inputFiles);\n\t\t\t\t\t\t\n\t\t\t\t\t\tdictionaryFileChooser = new JFileChooser();\n\t\t\t\t\t\tdictionaryFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tdictionaryFileChooser.setApproveButtonText(\"Load Dictionary\");\n\t\t\t\t\t\tdictionaryFileChooser.setDialogTitle(\"Load Dictionary File(s)\");\n\t\t\t\t\t\tdictionaryFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tdictionaryFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tdictionarySelectionResult = dictionaryFileChooser.showOpenDialog(null);\n\n\t\t\t\t\t\t// only change view if user inputs both an input and dictionary(ies)\n\t\t\t\t\t\tif(dictionarySelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdictionaryFiles = dictionaryFileChooser.getSelectedFiles();\n\t\t\t\t\t\t\tdictionaryTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\t\tdictionaryTrees = treeHandler.convertMultipleFiles(dictionaryFiles);\n\t\t\t\t\t\t\tcontentPane = getContentPane();\n\n\t\t\t\t\t\t\tinputText = new SpellCheckTextArea();\n\t\t\t\t\t\t\tinputText.setLineWrap(true);\n\t\t\t\t\t\t\tinputText.setWrapStyleWord(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdisplay.numWordsIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); //size of numDictionaries*numInputFiles + 1 for the 0 index\n\t\t\t\t\t\t\tdisplay.numReplaced = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numAdded = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numLinesIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numIgnored = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * get number of lines in input file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//zero location in list is added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(0);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0;\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(loc, Integer.valueOf(0)); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t \n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t \t\t\t \t\tdisplay.numLinesIn.set(loc, Integer.valueOf(display.numLinesIn.get(loc) + 1)); //increment lines read\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Reads file and displays ready for user input of add, replace, ignore\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//all zero locations in list are added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(0);\n\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Convenience for reading character files.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t //displays current input file and dictionary name at top of text\n\t\t\t\t\t \t\t\t \tinputText.extend(\"Input file: \" + inputFiles[index].getName() + \"\\tDictionary File: \" + dictionaryFiles[innerIndex].getName() + \"\\n\\n\");\n\n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t \t\tString[] textLine = line.split(seperator);\n\t\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t\t \t\tfor(String word : textLine) \n\t\t\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[\\n\\r\\t]+\", \"\");\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t\t \t\t if(!word.isEmpty()) \n\t\t\t\t\t\t\t\t \t\t {\n\t\t\t\t\t\t\t\t \t\t\t\tdisplay.numWordsIn.set(loc, Integer.valueOf(display.numWordsIn.get(loc) + 1)); //increment the number of words in the input file\n\t\t\t\t\t\t\t\t \t\t\t\ttuple3 = new SpellCheckWord(word.toLowerCase(), inputText.getText().length(), inputFiles[index], dictionaryFiles[innerIndex]);\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.inputFileIndex = index;\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.dictionaryFileIndex = innerIndex;\n\n\t\t\t\t\t\t\t\t \t\t\t\tinputText.extend(tuple3);\n\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 }\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t inputText.extend(new SpellCheckWord(\"\\n\\n\", inputText.getText().length()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Calls the treeHandler functions and displays the misspelled words.\n\t\t\t\t\t\t\t * Outer list's indices represent different input files. \n\t\t\t\t\t\t\t * Middle list's indices represent different dictionary files that each input file will be compared to.\n\t\t\t\t\t\t\t * Inner list's indices represent the words in an input file that are not in the corresponding dictionary.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tmissingWords = new ArrayList<ArrayList<ArrayList<String>>>();\n\t\t\t\t\t\t\tmissingWords = treeHandler.incorrectWords(inputTrees, dictionaryTrees);\n\t\t\t\t\t\t\tnumberOfInputs = 0; \n\t\t\t\t\t\t\tnumberOfDictionaries = 0; \n\t\t\t\t\t\t\tnumberOfWords = 0; \n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\tnumberOfInputs = missingWords.size();\n\n\t\t\t\t\t\t\tfor(Iterator<ArrayList<ArrayList<String>>> iterator = missingWords.iterator(); iterator.hasNext();) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetsOfWords = iterator.next();\n\t\t\t\t\t\t\t\tnumberOfDictionaries += setsOfWords.size();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(Iterator<ArrayList<String>> iterator2 = setsOfWords.iterator(); iterator2.hasNext();)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// use label to separate differences from different dictionary file\n\t\t\t\t\t\t\t\t\twords = iterator2.next();\n\t\t\t\t\t\t\t\t\tnumberOfWords += words.size(); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!words.isEmpty())\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfor(Iterator<String> iterator3 = words.iterator(); iterator3.hasNext();)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tword = iterator3.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor(SpellCheckWord pair : inputText.contentPairs)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif(pair.word.equals(word) && !pair.missingWord && pair.inputFile.equals(inputFiles[inFileNumber]) && pair.dictionaryFile.equals(dictionaryFiles[dictionaryNumber]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tpair.missingWord = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputText.highlight(pair);\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\t\n\t\t\t\t\t\t\t\t\tdictionaryNumber += 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tinFileNumber += 1;\n\t\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * prints statistics for each pair of input/dictionary file to txt file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t scMenuBar.printStats.addActionListener\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tnew ActionListener()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent event)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Create new file\n\t\t\t\t\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\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\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString path = System.getProperty(\"user.home\") + \"/Desktop/Stats-for-\" + inputFiles[index].getName() + \"-\" + dictionaryFiles[innerIndex].getName() + \".txt\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tFile writer = new File(path);\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\t// file does not exist, create\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!writer.exists()) \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\t \twriter.createNewFile();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tFileWriter fw = new FileWriter(writer.getAbsoluteFile());\n\t\t\t\t\t\t\t\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Write in file\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.write(\" Words in input file\\t: \" + display.numWordsIn.get(loc) + \"\\n Lines in input file\\t: \" + display.numLinesIn.get(loc) + \"\\n Number of words replaced:\\t\" + display.numReplaced.get(loc) + \"\\n Number of words added:\\t\" + display.numAdded.get(loc) + \"\\n Number of words ignored:\\t\" + display.numIgnored.get(loc));\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\t// Close connection\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.close();\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\tcatch(Exception e)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tinputText.setEditable(false);\n\t\t\t\t\t\t\tscroller = new JScrollPane(inputText);\n\t\t\t\t\t\t\tcontentPane.add(scroller, BorderLayout.CENTER);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// refresh frame\n\t\t\t\t\t\t\t//pack();\t\t\t\t\t\n\t\t\t\t\t\t\trevalidate();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "@FXML\n\tpublic void addWord() {\n\n\t\twordList.add(new Word(TextFieldWord.getText(), TextFieldDescribe.getText(), liczbaznakow));\n\n\t\ttry {\n\n\t\t\tout = new PrintWriter(selectedFile);\n\n\t\t\tfor (int i = 0; i < wordList.size(); i++) {\n\n\t\t\t\tout.printf(\"%s;%s;%d;\",\n\n\t\t\t\t\t\twordList.get(i).getWord(), wordList.get(i).getDescribe(), wordList.get(i).getLiczbaznakow());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t}", "public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }", "private void writeToDictionary() throws IOException {\n\n File file = new File(filePathDictionaryAuto);\n\n if (file.delete()) {\n file.createNewFile();\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n if (word.length() != 1) {\n writePrintStream(dictionaryTerms.get(word) + \" \" + word, filePathDictionaryAuto);\n }\n }\n } else {\n System.out.println(\"Error in dictionary file\");\n }\n System.out.println(\"Dictionary updated\");\n\n }", "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 }", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "public void dictionaryAdvanced() {\n dictionaryManagement.insertFromFile();\n showAllWords();\n dictionaryManagement.dictionaryLookup();\n dictionaryManagement.removeWord(\"Before\");\n showAllWords();\n dictionaryManagement.dictionaryExportToFile();\n }", "@Override\r\n public void actionPerformed(ActionEvent arg0) {\r\n UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();\r\n if (provider != null) {\r\n provider.addWord(word);\r\n }\r\n Dictionary dictionary = SpellChecker.getCurrentDictionary();\r\n dictionary.add(word);\r\n dictionary.trimToSize();\r\n AutoSpellChecker.refresh(jText);\r\n }", "public static void doDictionaryEditMode(String[] args) throws FileNotFoundException {\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\tString testDictionary = args[1];\r\n\t\tFile f = new File(testDictionary);\r\n\t\tString name = f.getName();\r\n\t\tString newname = name + \"~\";\r\n\t\tFile newFile = new File(newname);\r\n\r\n\t\tDictionary dic;\r\n\t\ttry {\r\n\t\t\tdic = new Dictionary(testDictionary);\r\n\t\t\tBinarySearchTree<Entry> oldtree = dic.getBST();\r\n\t\t\tDictionary olddic = new Dictionary(oldtree);\r\n\t\t\tSystem.out.println(\"Editing dictionary.txt\");\r\n\t\t\tSystem.out.printf(\"Word: \");\r\n\t\t\tScanner in = new Scanner(System.in);\r\n\t\t\tString input = in.next();\r\n\t\t\toutloop:\r\n\t\t\t// the case to exit the program\r\n\t\t\twhile (!input.equals(\"!quit\")) {\r\n\t\t\t\t// check whether the input is valid\r\n\t\t\t\tif (!isValidWord(input)) {\r\n\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \" is not valid. Please enter a valid word\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (dic.hasWord(input)) {\r\n\t\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \"was found\");\r\n\t\t\t\t\t\tSystem.out.printf(\"[r]emove/[g]et the definition/[c]hange definition/do [n]othing: \");\r\n\t\t\t\t\t\tScanner in2 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input2 = in2.next();\r\n\t\t\t\t\t\t// the case of get definition\r\n\t\t\t\t\t\tif (input2.equals(\"g\")) {\r\n\t\t\t\t\t\t\tif (dic.getDefinitionOf(input) == null)\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"<undefined>\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println(dic.getDefinitionOf(input));\r\n\t\t\t\t\t\t\t// the case of change definition\r\n\t\t\t\t\t\t} else if (input2.equals(\"c\")) {\r\n\t\t\t\t\t\t\tScanner in3 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tSystem.out.printf(\"Definition: \");\r\n\t\t\t\t\t\t\tin3.useDelimiter(\"\\n\");\r\n\t\t\t\t\t\t\tString input3 = in3.next();\r\n\r\n\t\t\t\t\t\t\t// in3.close();\r\n\t\t\t\t\t\t\tdic.updateEntry(input, input3);\r\n\t\t\t\t\t\t\t// the case of remove the word\r\n\t\t\t\t\t\t} else if (input2.equals(\"r\")) {\r\n\t\t\t\t\t\t\tdic.removeEntry(input);\r\n\t\t\t\t\t\t} else if (input2.equals(\"n\")) {\r\n\t\t\t\t\t\t\t// do nothing\r\n\t\t\t\t\t\t} else if (input2.equals(\"!quit\"))\r\n\t\t\t\t\t\t\tbreak outloop;\r\n\t\t\t\t\t\t// if the input is not in dictionary\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \"not found\");\r\n\t\t\t\t\t\tSystem.out.printf(\"[a]dd/add with [d]efinition/[n]othing: \");\r\n\t\t\t\t\t\tScanner in4 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input4 = in4.next();\r\n\t\t\t\t\t\t// the case of add new word\r\n\t\t\t\t\t\tif (input4.equals(\"a\"))\r\n\t\t\t\t\t\t\tdic.addEntry(input);\r\n\t\t\t\t\t\t// the case of get definition\r\n\t\t\t\t\t\telse if (input4.equals(\"d\")) {\r\n\t\t\t\t\t\t\tSystem.out.printf(\"Definition: \");\r\n\t\t\t\t\t\t\tScanner in5 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tString input5 = in5.next();\r\n\t\t\t\t\t\t\tdic.addEntry(input4, input5);\r\n\t\t\t\t\t\t\t// the case of doing nothing\r\n\t\t\t\t\t\t} else if (input4.equals(\"n\")) {\r\n\t\t\t\t\t\t} else if (input4.equals(\"!quit\"))\r\n\t\t\t\t\t\t\tbreak outloop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.printf(\"Word: \");\r\n\t\t\t\tinput = in.next();\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\t// update in the new File and add~ into the old File\r\n\t\t\tolddic.printToFile(newFile.getName());\r\n\t\t\tdic.printToFile(testDictionary);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void saveWords (ArrayList <String> list) {\n if (chooser.showSaveDialog (null) == JFileChooser.APPROVE_OPTION) {\n File newFile = chooser.getSelectedFile ();\n try {\n BufferedWriter buffer = new BufferedWriter (new FileWriter (newFile));\n for (String word : list) {\n buffer.write (word + \"\\n\");\n }\n buffer.close ();\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n }", "private void upgradeDictionary() throws IOException {\n File fileAnnotation = new File(filePathAnnSource);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n if (fileAnnotation.exists()) {\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf(\"\\t\") + 1);\n\n if (!nonDictionaryTerms.contains(word.toLowerCase())) {\n if (dictionaryTerms.containsKey(word.toLowerCase())) {\n if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n System.out.println(\"Conflict: word:: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n nonDictionaryTerms.add(word.toLowerCase());\n// removeLineFile(dictionaryTerms.get(word.toLowerCase())+\" \"+word.toLowerCase(),filePathDictionaryAuto);\n dictionaryTerms.remove(word.toLowerCase());\n writePrintStream(word, filePathNonDictionaryAuto);\n }\n } else {\n System.out.println(\"Updating Dictionary:: Word: \" + word + \"\\tTag: \" + annotations[1]);\n dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n writePrintStream(annotations[1] + \" \" + word.toLowerCase(), filePathDictionaryAuto);\n }\n }\n\n// if (dictionaryTerms.containsKey(word.toLowerCase())) {\n// if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n// System.out.println(\"Conflict: word: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n// nonDictionaryTerms.add(word.toLowerCase());\n//\n// }\n// } else {\n// dictionary.add(word.toLowerCase());\n// dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n// System.out.println(\"Updating Dictionary: Word: \" + word + \"\\tTag: \" + annotations[1]);\n// }\n }\n }\n\n\n br.close();\n fr.close();\n }", "public void insertFromFile() throws IOException {\n File file = new File(Main.DATA_FILE_PATH);\n Scanner sc = new Scanner(file);\n\n dictionary = new Dictionary();\n TreeMap<String, ArrayList<String>> wordList = new TreeMap<>();\n String target = sc.nextLine().substring(1).trim();\n ArrayList<String> explain = new ArrayList<>();\n while (sc.hasNextLine()) {\n String str = sc.nextLine();\n if (str.indexOf(\"@\") == 0) {\n wordList.put(target, explain);\n target = str.substring(1).trim();\n explain = new ArrayList<>();\n } else if (str.indexOf(\"=\") == 0) {\n str = str.replace(\"+\", \" : \");\n String word = \" = \" + str.substring(1);\n explain.add(word);\n } else if (str.indexOf(\"#\") == 0 || str.indexOf(\"*\") == 0) {\n explain.add(str);\n } else {\n explain.add(\" \" + str);\n }\n }\n dictionary.setWordList(wordList);\n sc.close();\n }", "public final void loadDict() {\r\n try {\r\n FileInputStream inf = new FileInputStream(dictionary);\r\n char let;\r\n String str = \"\";\r\n int n = 0;\r\n while ((n = inf.read()) != -1) {\r\n let = (char) n;\r\n if (Character.isLetter(let)) {\r\n str += Character.toLowerCase(let);\r\n }\r\n if ((Character.isWhitespace(let) || let == '-') && !str.isEmpty()) { \r\n dictList[str.charAt(0) - 97].add(str);\r\n str = \"\";\r\n\r\n }\r\n\r\n }\r\n inf.close();\r\n\r\n } catch (IOException e) {\r\n\r\n e.printStackTrace();\r\n\r\n }\r\n }", "public static void readDictionary()\r\n\t{\r\n\t\t//It trys to read over the file using try-catch in case of an Exception\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"english.0\");\r\n\t\t\tScanner scan = new Scanner(file);\r\n\t\t\t//It reads over the file as long as there are words to read and we insert them into the given storage\r\n\t\t\twhile(scan.hasNext()) {\r\n\t\t\t\tdata.insert(scan.next());\r\n\t\t\t}\r\n\t\t\tscan.close(); \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t}", "MainDictionary ( String pathToFile ) {\n WordListReader reader = new WordListReader( pathToFile );\n List<String> wordList = reader.asLowerCaseList();\n \n this.dictionary = new HashSet<>( wordList );\n \n if ( this.dictionary.isEmpty() ) {\n LOGGER.warn( \"Main dictionary is empty\" );\n }\n }", "public void loadDictionary() {\r\n\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/English.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t// Aggiungere parola alla struttura dati\r\n\t \t\t\r\n\t \t\tthis.dictionary.add(word);\r\n\t \t\t\r\n\t\t}\r\n\t\tbr .close();\r\n\t\t} catch (IOException e ){\r\n\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t try {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/Italian.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t\t// Aggiungere parola alla struttura dati\r\n\t\t \t\t\r\n\t\t \t\tthis.dizionario.add(word);\r\n\t\t \t\t\r\n\t\t\t}\r\n\t\t\tbr .close();\r\n\t\t\t} catch (IOException e ){\r\n\t\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "private static void list() throws FileNotFoundException {\n ArrayList<String> words = new ArrayList<>();\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!words.contains(word)) {\n words.add(word);\n }\n }\n }", "private void wordAdd(String word){\n if (!fileWords.containsKey(word)){\n fileWords.put(word,1);\n if (probabilities.containsKey(word)) {\n double oldCount = probabilities.get(word);\n probabilities.put(word, oldCount+1);\n } else {\n probabilities.put(word, 1.0);\n }\n }\n }", "private void setWords() {\r\n words = new ArrayList<>();\r\n\r\n String line = null;\r\n try {\r\n // FileReader reads text files in the default encoding.\r\n FileReader fileReader = new FileReader(\"words.txt\");\r\n\r\n // Always wrap FileReader in BufferedReader.\r\n BufferedReader bufferedReader = new BufferedReader(fileReader);\r\n\r\n while((line = bufferedReader.readLine()) != null)\r\n words.add(line);\r\n\r\n // Always close files.\r\n bufferedReader.close();\r\n }\r\n catch(Exception ex) {\r\n ex.printStackTrace();\r\n System.out.println(\"Unable to open file '\");\r\n }\r\n }", "public void addWords(int i) \n\t{\n\t\tFile myFile = new File(i);\n\t\tallWords.addAll(myFile.getAllWords());\n\t\tSystem.out.println(allWords);\n\t}", "private void addFile(String file){\r\n\t\ttry(\r\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t){\r\n\t\t\tString html = \"\";\r\n\t\t\tString line = \"\";\r\n\t\t\t// read in html from passed file argument\r\n\t\t\twhile((line=reader.readLine())!=null){\r\n\t\t\t\thtml += line;\r\n\t\t\t}\r\n\t\t\t// retrieve all text content elements from page\r\n\t\t\tElements paragraphs = Jsoup.parse(html).select(\"p\");\r\n\t\t\tString content = \"\";\r\n\t\t\tfor (Element i : paragraphs){\r\n\t\t\t\tcontent += i.text()+\" \";\r\n\t\t\t}\r\n\t\t\t// tokenize and log all unique words\r\n\t\t\tMatcher matcher = pattern.matcher(content);\r\n\t\t\tString[] results = matcher.results().map(MatchResult::group).toArray(String[]::new);\r\n\t\t\tHashMap<String, Integer> count = new HashMap<String, Integer>();\r\n\t\t\tfor (int i = 0;i<results.length;++i){\r\n\t\t\t\tString word = results[i];\r\n\t\t\t\tif (count.get(word) != null){\r\n\t\t\t\t\tcount.put(word, count.get(word)+1);\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tcount.put(word, 1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//create term objects with ids\r\n\t\t\tHashMap<Term, Integer> rCount = new HashMap<Term, Integer>();\r\n\t\t\tint id = 0;\r\n\t\t\tfor (Map.Entry<String, Integer> subset : count.entrySet()){\r\n\t\t\t\trCount.put(new Term(processWord(subset.getKey()),id), subset.getValue());\r\n\t\t\t}\r\n\t\t\t// store data from file\r\n\t\t\tindex.put(file, new IndexedDoc(rCount));\r\n\t\t\treader.close();\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n int returnVal = fc.showOpenDialog(panel);\n if(returnVal == JFileChooser.APPROVE_OPTION){\n file = fc.getSelectedFile();\n System.out.println(file);\n \n try {\n Scanner scanner = new Scanner(file);\n String appendString = \"\";\n \n while(scanner.hasNext()){\n String oneString = scanner.nextLine();\n txtArea.append(oneString + \"\\n\");\n }\n \n try {\n read_characters(file.toString());\n } catch (IOException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n \n resultArea.append(resultString);\n resultPane.setText(resultString);\n } catch (FileNotFoundException e1) {\n // TODO Auto-generated catch block\n e1.printStackTrace();\n }\n \n //Print ID table\n Map<String,Integer> map = new TreeMap<String,Integer>(userDefinedWords);\n identifierTableArea.append(\"Number of Occurences \" + \"\\t\" +\n \t\t\t\t\t\t\t\"Symbol\" + \"\\n\\n\");\n Iterator iter = \n \t\tmap.entrySet().iterator();\n while(iter.hasNext()){\n \t Map.Entry pair = \n \t\t\t (Map.Entry)iter.next();\n \t identifierTableArea.append(\n \t\t\t pair.getValue() + \"\\t\\t\" + pair.getKey() + \"\\n\");\n }\n \n }\n }", "public void addToDictionary(InputStream f)\r\n throws IOException, FileNotFoundException {\r\n long t = System.currentTimeMillis();\r\n final int bufSize = 1000;\r\n int read;\r\n int numWords = 0;\r\n InputStreamReader fr = null;\r\n try {\r\n fr = new InputStreamReader(f);\r\n char[] buf = new char[bufSize];\r\n while ((read = fr.read(buf)) != -1) {\r\n // TODO modify this split regex to actually be useful\r\n String[] words = new String(buf, 0, read).split(\"\\\\W\");\r\n for (String s : words) {\r\n trie.insert(s);\r\n numWords++;\r\n }\r\n }\r\n } finally {\r\n if (fr != null) {\r\n try {\r\n fr.close();\r\n } catch (IOException e) {\r\n }\r\n }\r\n }\r\n System.out.println(\"Read from file and inserted \" + numWords + \" words into trie in \" +\r\n (System.currentTimeMillis() - t) / 1000.0 + \" seconds.\");\r\n }", "public static void main(String[] args) {\r\n int argc = args.length;\r\n\r\n // Given only the words file\r\n if(argc == 2 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i'){\r\n String fileName = args[1];\r\n int size = 1;\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size) size = arrOfStr[i].length();\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n if(wordList.size() > size) size = wordList.size();\r\n char[][] wordSoup = wsGen( wordList, size + 2);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n\r\n // Given all args\r\n if(argc == 4 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i' && args[2].charAt(0) == '-' && args[2].charAt(1) == 's'){\r\n String fileName = args[1];\r\n int size = Integer.parseInt(args[3]);\r\n // Check max size\r\n if(size > 40){\r\n System.out.print(\"Max size 40\");\r\n return;\r\n }\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size){\r\n System.out.println(\"At least one word given doesn't fit in the size provided.\");\r\n return;\r\n }\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n char[][] wordSoup = wsGen( wordList, size);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n // Help message\r\n System.out.println(\"usage: -i file # gives file with word soup words\");\r\n System.out.println(\" -s size # gives size for the word soup\");\r\n return;\r\n }", "public void actionPerformed (ActionEvent ev){\n\t\t\tQAinput += qtextarea.getText() + \"/\" + atextarea.getText() ;\n\t\t\t\n\t\t\t//creating a new filename and write the array of questions and answers there. This works for Japanese as well\n\t\t\tFile filepath = new File(filename);\n\t\t\ttry {\n\t\t\t\tOutputStream out = new FileOutputStream(filepath);\n \t\t\t\tWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);\n\t\t\t\twriter.write(QAinput);\n\t\t\t\twriter.close();\n\t\t\t} catch(IOException ex) { System.out.print(\"caught\"); ex.printStackTrace(); }\n\n\t\t\t/*\n\t\t\tadding the filename to \"ListofDecks.txt\". This is done first by reading all of the data (all of filename that has been recorded previously)\n\t\t\tand then convert it to string and then you added your new filename to the string, and the last, you record the string to the file.\n\t\t\t*/\n\t\t\ttry {\t\n\t\t\t\tFile targetfile = new File (\"\");\n\t\t\t\tif (targetfile.exists()){\n\t\t\t\t\tBufferedReader reader = new BufferedReader (new FileReader (\"ListofDecks\"));\n\t\t\t\t\tString message = null;\n\t\t\t\t\tString fullmessage = null;\n\t\t\t\t\tfullmessage = \"\";\n\t\t\t\t\twhile ((message = reader.readLine()) != null ){\n\t\t\t\t\t\tfullmessage += message;\n\t\t\t\t\t}\t\n\t\t\t\t\treader.close();\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(fullmessage + filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException excc) { System.out.print(\"caught\"); excc.printStackTrace(); }\n\t\t\tframe.setVisible(false);\n\t\t\tmoriHomepage mori = new moriHomepage();\n\t\t}", "private void load(File dictionary) throws IOException {\n // open the file\n BufferedReader in = new BufferedReader(new FileReader(dictionary));\n \n // while file is readable\n while (in.ready()) {\n // get the next word in the file\n String s = in.readLine();\n // as long as the word is not just a new line character\n if (!s.equals(\"\\n\")) {\n // insert the word\n boolean noError = this.insert(s);\n // if there was an error in inserting the word\n if (!noError) {\n // print out the word\n System.out.println(s);\n // increment the number of errors found during load\n errors++;\n }\n // increment the size of the dictionary\n size++;\n }\n }\n \n // close the file\n in.close();\n }", "void changeFile()\n {\n App app = new App();\n // Loop through the read File\n for (String s : readFile) {\n if (app.containsUtilize(s)) {\n // Changes the first use of utilize with use\n String newTemp = s.replaceFirst(\"utilize\", \"use\");\n // Writes to file\n this.writeFile.add(newTemp);\n } else {\n // not utilize\n this.writeFile.add(s);\n }\n }\n }", "public void initialize(){\n titleBox.setTextFormatter( new TextFormatter<>(c -> {\n if(c.getControlNewText().length() > 30 ) return null;\n boolean error=false;\n char[] chars = c.getText().toCharArray();\n for (char aChar : chars)\n if (aChar == '\\n' ) {\n error = true;\n break;\n }\n if (error) return null;\n else return c;\n }));\n //default settings\n resultBox.setEditable(false);\n formatter.applyPattern(\"dd/MM/yyyy\");\n datePick.getEditor().setText(formatter.format(date));\n //arrayList to store each diaryPage and every words in dictionary\n book= new ArrayList<>();\n dictionary = new ArrayList<>();\n //read from txt file for existing diary pages and dictionary\n try {\n BufferedReader reader = new BufferedReader(new FileReader(new File(\"src/diary/content.txt\")));\n String line= reader.readLine();\n while (line != null){\n String date,title,content=\"\";\n int lineCount;\n date = line;\n title = reader.readLine();\n lineCount = Integer.parseInt(reader.readLine());\n for(int i=0;i<lineCount;i++){\n line = reader.readLine();\n //noinspection StringConcatenationInLoop\n content = content + line + System.lineSeparator();\n }\n book.add(new DiaryPage(date,title,content,lineCount));\n line = reader.readLine();\n }\n reader.close();\n reader = new BufferedReader(new FileReader(new File(\"src/extra/words.txt\")));\n line= reader.readLine();\n while (line != null){\n dictionary.add(line);\n line = reader.readLine();\n }\n reader.close();\n\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n //save new diary into txt file after user exit the application\n Main.window.setOnHiding(event -> saveFile());\n }", "public void approve() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.print(\"Would you like to add '\" + incorrectWordsArray[i] + \"' to the dictionary? (Y/N): \");\r\n\t\t\t\t\tString response = sc.next();\r\n\t\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t\tincorrectWords.remove((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"Your changes were made to the dicitonary.\");\r\n\t\t\t\t\t\tmodified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "public void readFile() throws IOException {\n String line;\n while ((line = fileReader.readLine()) != null) {\n wordStorage.addWords(line);\n }\n }", "public static void main(String[] args)\n\t\tthrows FileNotFoundException, IOException\n\t{\n \t\tPrintWriter test = new PrintWriter(new FileWriter(\"DictionaryTESTING.txt\"));\n \t\t\n \t\ttest.println(\"Dictionary TESTING\");\n \t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam = new Dictionary()\");\n\t\tDictionary noParam = new Dictionary();\n\t\t\n\t\ttest.println(\"fileParam = new Dictionary('mywords.txt')\");\n\t\tDictionary fileParam = new Dictionary(\"mywords.txt\");\n\n\t\ttest.println();\n\t\ttest.println(\"mywords.txt contains select words in the form of a dictionary, i.e.\");\n\t\ttest.println(\"a\");\n\t\ttest.println(\"an\");\n\t\ttest.println(\"apple\");\n\t\ttest.println(\"banana\");\n\t\ttest.println(\"boy\");\n\t\ttest.println(\"can\");\n\t\ttest.println(\"cat\");\n\t\ttest.println(\"etc.\");\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.getLongestWordLength('aunt') :\" + noParam.getLongestWordLength(\"aunt\"));\n\t\ttest.println(\"fileParam.getLongestWordLength('zoo') :\" + fileParam.getLongestWordLength(\"but\"));\n\t\ttest.println(\"noParam.getLongestWordLength('rid') :\" + noParam.getLongestWordLength(\"rid\"));\n\t\ttest.println(\"fileParam.getLongestWordLength('300') :\" + fileParam.getLongestWordLength(\"300\"));\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.wordExists('apple') :\" + noParam.wordExists(\"apple\"));\n\t\ttest.println(\"fileParam.wordExists('zoo') :\" + fileParam.wordExists(\"zoo\"));\n\t\ttest.println(\"noParam.wordExists('rid') :\" + noParam.wordExists(\"rid\"));\n\t\t\n\t\ttest.println(\"fileParam.wordExists('alabama') :\" + fileParam.wordExists(\"alabama\"));\n\t\ttest.println(\"noParam.wordExists('zen') :\" + noParam.wordExists(\"zen\"));\n\t\ttest.println(\"fileParam.wordExists('randolf') :\" + fileParam.wordExists(\"randolf\"));\n\t\ttest.println(\"noParam.wordExists('300') :\" + noParam.wordExists(\"300\"));\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.toString() :\" + noParam.toString());\n\t\ttest.println(\"fileParam.toString() :\" + fileParam.toString());\n\n\t\ttest.close();\t\t\n\t}", "private void generateWord() throws Exception {\n\t\tArrayList<String> wordList = new ArrayList<String>();\n\n//\t\tString[] wordList2 = new String[5];\n\t\tif (chckbxFruits2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\fruits.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tif (chckbxAnimals2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\animals.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tif (chckbxColors2.isSelected()) {\n\t\t\tFile file = new File(\"C:\\\\Users\\\\admin\\\\eclipse-workspace\\\\test\\\\src\\\\colors.txt\");\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(file));\n\t\t\tString st;\n\t\t\twhile ((st = br.readLine()) != null) {\n\t\t\t\twordList.add(st);\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t\tRandom ran = new Random();\n\t\tint randIndex = ran.nextInt(wordList.size());\n\t\tString answer = wordList.get(randIndex);\n\t\tanswerArray = answer.toCharArray();\n\t\tdashArray = new String[answerArray.length];\n\t\tfor (int k = 0; k < answerArray.length; k++) {\n\t\t\tdashArray[k] = \"_\";\n\t\t}\n\n\t\tSystem.out.print(answer);\n\t}", "public void addAll(String[] words, String filename) {\n\t\taddAll(words, filename, 1);\n\t}", "public Dictionary() { //constructor\r\n try {\r\n createDictionary(); //create dictionary\r\n addCustomWords(); //add any user define words in it\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void readDocument() throws FileNotFoundException{\r\n\t\t// Initialize 2 empty read document collections, one without duplicate words.\r\n\t\treadDocument = new LinkedBag<String>();\r\n\t\treadDocumentNoDuplicates = new LinkedSet<String>();\r\n\t\t\r\n\t\t// Prompt user for name of read document file.\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the file you would like checked with extension: \");\r\n\t\tString readDocFileName = input.nextLine();\r\n\t\t\r\n\t\t// If exists, open file specified by user. Then add words to both collections.\r\n\t\ttry {\r\n\t\t\tFile file = new File(readDocFileName);\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tString word = scanner.next();\r\n\t\t\t\treadDocument.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t\treadDocumentNoDuplicates.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tSystem.out.println(\"Document read\");\r\n\r\n\t\t\t// Get initial list of incorrect words.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\t// Display message showing how many words were in the read document.\r\n\t\t\tSystem.out.println(\"This document contains \" + readDocument.size() + \" words.\");\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\treadDocument = null;\r\n\t\t\treadDocumentNoDuplicates = null;\r\n\t\t\tSystem.out.println(\"Error: File '\" + readDocFileName + \"' not found. Please try again.\");\r\n\t\t}\r\n\t}", "public void addAlbum(String fileName) throws FileNotFoundException\n {\n String albumTitle = JOptionPane.showInputDialog(null, \"Enter an album name:\");\n albumTitle = albumTitle.replaceAll(\" \", \"_\");\n \n Collections.sort(catalog);\n int index = Collections.binarySearch(catalog, new Album(\"\",albumTitle,null), null);\n //this is to make sure we do not have duplicate albums\n if(index < 0) \n {\n String artistName = JOptionPane.showInputDialog(null, \"Enter the artist name:\");\n artistName = artistName.replaceAll(\" \", \"_\");\n \n FileOutputStream fos = new FileOutputStream(new File(fileName),true);\n PrintWriter pw = new PrintWriter(fos);\n \n String[] buttons = {\"I understand.\", \"I do not understand.\"};\n int selection = JOptionPane.showOptionDialog(null, \"You will now \"\n + \"enter the songs that belong on the album.\\nEnter ONE \"\n + \"song at a time. When finished adding songs, just \"\n + \"press cancel.\", \"Instructions.\", JOptionPane.YES_OPTION,\n JOptionPane.WARNING_MESSAGE, null, buttons, buttons[0]);\n \n if(selection == 0) //user understands the instructions\n {\n pw.print(artistName + \" \" + albumTitle);\n ArrayList<Track> albumsTracks = new ArrayList<>();\n\n String song = JOptionPane.showInputDialog(null, \"Submit song #1:\");\n for(int i=2; song != null; i++)\n {\n song = song.replaceAll(\" \", \"_\");\n pw.print(\" \" + song);\n albumsTracks.add(new Track(song));\n song = JOptionPane.showInputDialog(null, \"Submit song #\"+i+\":\");\n }\n pw.println();\n pw.close();\n JOptionPane.showMessageDialog(null,\n \"Album has successfully been written to '\" + fileName +\"'!\");\n \n Album newAlbum = new Album(artistName, albumTitle, albumsTracks);\n catalog.add(newAlbum); //here we put our new album in the \n Collections.sort(catalog); //general catalog and sort it by albums.\n }\n else //the user didn't understand the above instructions.\n //so the artist and album that the user entered is not printed.\n //since promptMenu() is recursive, we go back to the menu.\n JOptionPane.showMessageDialog(null, \"Going back to the menu now...\");\n }\n else //duplicate album found!\n System.out.println(\"Album '\" + albumTitle + \"' already exists in the catalog!\");\n }", "public static void doInteractiveMode(String[] args) throws FileNotFoundException {\r\n\t\tString dictionaryFile = args[0];\r\n\t\tString filename = args[1];\r\n\t\t// create file for original file\r\n\t\tFile newFile = new File(dictionaryFile);\r\n\t\tString name = newFile.getName();\r\n\t\tString newname = name + \"~\";\r\n\r\n\t\tDictionary dic = new Dictionary(dictionaryFile);\r\n\r\n\t\t// deep copy of binary search tree\r\n\t\tBinarySearchTree<Entry> oldtree = dic.getBST();\r\n\t\tDictionary olddic = new Dictionary(oldtree);\r\n\r\n\t\ttry {\r\n\t\t\tFile f = new File(filename);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\t// scan each line\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString sentence = in.nextLine();\r\n\t\t\t\tString[] words = sentence.split(\" \");\r\n\t\t\t\t// transform string[] into ArrayList\r\n\t\t\t\tArrayList<String> al = new ArrayList<String>(Arrays.asList(words));// string\r\n\r\n\t\t\t\tint errWordNum = 1;\r\n\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t\twhile (errWordNum != 0) {\r\n\t\t\t\t\terrWordNum = 0;\r\n\t\t\t\t\tArrayList<String> errWord = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<Integer> errInd = new ArrayList<Integer>();\r\n\t\t\t\t\t// copy the old misspelling word\r\n\t\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t\t// the case of punctuation\r\n\t\t\t\t\t\tif (!dic.hasWord(al.get(i).replaceAll(\"[^a-zA-Z ]\", \"\"))) {\r\n\t\t\t\t\t\t\terrWordNum += 1;\r\n\t\t\t\t\t\t\terrWord.add(al.get(i));\r\n\t\t\t\t\t\t\terrInd.add(i);\r\n\t\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\"^\");\r\n\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (i != al.size() - 1) {\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tSystem.out.println();\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// if arrayList still has misspelling words\r\n\t\t\t\t\tif (errWordNum != 0) {\r\n\t\t\t\t\t\tSystem.out.print(errWord.get(0) + \": \");\r\n\t\t\t\t\t\tSystem.out.print(\"[r]eplace/[a]ccept? \");\r\n\t\t\t\t\t\tScanner in2 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input2 = in2.next();\r\n\t\t\t\t\t\t// the case of replacement\r\n\t\t\t\t\t\tif (input2.equals(\"r\")) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Replacement text: \");\r\n\t\t\t\t\t\t\tScanner in3 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tString input3 = in3.next();\r\n\t\t\t\t\t\t\tal.set(errInd.get(0), input3);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// the case of acceptance\r\n\t\t\t\t\t\tif (input2.equals(\"a\")) {\r\n\t\t\t\t\t\t\tdic.addEntry(errWord.get(0));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\t\tSystem.out.print(al.get(i) + \" \");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println(al.get(i));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!input2.equals(\"r\"))\r\n\t\t\t\t\t\t\terrWordNum--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\t// keep the original file with ~\r\n\t\t\tolddic.printToFile(newname);\r\n\t\t\t// update the change in the new file\r\n\t\t\tdic.printToFile(dictionaryFile);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"check the existance of filename again\");\r\n\t\t}\r\n\r\n\t}", "public void approveAll() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tSystem.out.println(\"Would you like to add the following misspelled words to the dictionary?\");\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"(Y/N): \");\r\n\t\t\t\tString response = sc.next();\r\n\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tincorrectWords.clear();\r\n\t\t\t\t\tSystem.out.println(\"Your changes were made to the dictionary.\");\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "public void add(String word, String file, int position) {\n\t \taddHelper(word, file, position);\n\t}", "private void openFile(Path filePath) {\n AbbreviationsFileViewModel abbreviationsFile = new AbbreviationsFileViewModel(filePath);\n if (journalFiles.contains(abbreviationsFile)) {\n dialogService.showErrorDialogAndWait(Localization.lang(\"Duplicated Journal File\"), Localization.lang(\"Journal file %s already added\", filePath.toString()));\n return;\n }\n if (abbreviationsFile.exists()) {\n try {\n abbreviationsFile.readAbbreviations();\n } catch (FileNotFoundException e) {\n logger.debug(e.getLocalizedMessage());\n }\n }\n journalFiles.add(abbreviationsFile);\n }", "public void showWordsListInfo(String path) throws IOException {\r\n\t ArrayList<String> listOfWords=new ArrayList<String>();//creem lista\r\n\t @SuppressWarnings(\"resource\") \r\n\tBufferedReader bfr=new BufferedReader(new FileReader(new File(path)));//initializam un buffer reader cu calea URL a unui fisier\r\n\t String word=\"\"; \r\n\t while ((word = bfr.readLine()) != null) \t //pentru fiecare linie citita, incarcam lista cu respectivul cuvant de pe linie. \r\n\t listOfWords.add(word);\r\n\t for (String element_word : listOfWords) {\r\n\t \t System.out.println(element_word);\r\n\t\t\tshowInfoWord(element_word); //pentru fiecare cuvant din lista afisam informatiile :cuvantul, Acceptata/Neacceptat, starea finala.\r\n\t\t\t\r\n\t\t}\r\n }", "private void addHelper(String word, String file, int position) {\n\t\tif (index.get(word) == null) {\n\t\t\tindex.put(word, new TreeMap<>());\n\t\t} \n\t\tif (index.get(word).get(file) == null) {\n\t\t\tindex.get(word).put(file, new TreeSet<>());\n\t\t}\n\t\tindex.get(word).get(file).add(position);\n\t}", "public WordPair readFile(String triggerAction, String latestDutchWord, String difficulty) {\n\n String tempReader;\n boolean found = false;\n\n try {\n // Open the file containing the words\n BufferedReader bufferedReader = new BufferedReader(\n new InputStreamReader(context.getAssets().open(difficulty + \"_words.txt\")));\n\n // Read file line by line until you find the latest dutch word.\n while (((tempReader = bufferedReader.readLine()) != null) && !found) {\n\n // If we got to the line of the latest used dutch word we\n // can now look for the previous/next dutch-english words\n // pair.\n if (tempReader.equals(latestDutchWord)) {\n bufferedReader.readLine();\n found = true;\n\n // Get the next word pair\n if (triggerAction.equals(\"nextPair\")) {\n // If we got to the end of the file then close it and\n // read it again from the beginning.\n if ((dutchWord = bufferedReader.readLine()) == null) {\n bufferedReader.close();\n bufferedReader = new BufferedReader(\n new InputStreamReader(context.getAssets()\n .open(difficulty + \"_words.txt\")));\n dutchWord = bufferedReader.readLine();\n }\n englishWord = bufferedReader.readLine();\n }\n\n // Get the previous word pair\n else if (triggerAction.equals(\"previousPair\")) {\n // If we are at the beginning of the file there are no\n // 'previous' lines. Hence we will jump to the end\n // of the file instead.\n if (previousDutchWord.equals(\"unknown\")) {\n while ((tempReader = bufferedReader.readLine()) != null) {\n dutchWord = tempReader;\n englishWord = bufferedReader.readLine();\n }\n } else {\n dutchWord = previousDutchWord;\n englishWord = previousEnglishWord;\n }\n }\n }\n\n // We didn't find the latest used dutch word. Save the\n // current dutch-english word pair and then continue\n // reading the file.\n else {\n previousDutchWord = tempReader;\n previousEnglishWord = bufferedReader.readLine();\n }\n }\n // If we looped through the file and didn't find the latest\n // dutch word, then just set dutchWord as the first word\n // in the file\n if (!found) {\n bufferedReader.close();\n bufferedReader = new BufferedReader(\n new InputStreamReader(context.getAssets()\n .open(difficulty + \"_words.txt\")));\n dutchWord = bufferedReader.readLine();\n englishWord = bufferedReader.readLine();\n }\n\n // Lastly, save the latest word in android's Shared Preferences\n SharedPreferencesHandler prefs = new SharedPreferencesHandler(context);\n prefs.writeLatestWord(dutchWord);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return new WordPair(dutchWord, englishWord);\n }", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "private void addModifyButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addModifyButtonMouseClicked\n String inputWord = this.searchField.getText();\n String inputDefinition = this.getDefinitionTextArea().getText();\n WordDefinition wordToModifyAdd = new WordDefinition(inputWord, inputDefinition);\n \n // find the index of the matching tree\n char firstLetterOfWord = inputWord.toUpperCase().charAt(0);\n int index = -1;\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetterOfWord)\n {\n index = i;\n i = lexiNodeTrees.size();\n }\n }\n \n // if index was not found, we have to create a new tree\n if(index == -1)\n {\n lexiNodeTrees.add(new LexiNode(firstLetterOfWord));\n index = lexiNodeTrees.size() - 1;\n \n // only possibility here is to add the word since the tree was just craeted\n if(!lexiNodeTrees.get(index).addWord( wordToModifyAdd ))\n {\n // if there was an error adding the word \n JOptionPane.showMessageDialog(this, \"ERREUR: Le mot n'a pas pu \"\n + \"être modifié/ajouté\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n \n else // if add was successful\n {\n JOptionPane.showMessageDialog(this, \"Le mot a été ajouté!\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n }\n \n else // if index was found, we can modify/add the definition\n {\n if( !lexiNodeTrees.get(index).modifyWord( wordToModifyAdd ) )\n {\n System.out.println(\"hi\");\n // if there was an error modifying / adding the word \n JOptionPane.showMessageDialog(this, \"ERREUR: Le mot n'a pas pu \"\n + \"être modifié/ajouté\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n \n else // if modification was successful\n {\n JOptionPane.showMessageDialog(this, \"Le mot a été modifié!\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n }\n \n // refresh the list\n refreshAllWordsList();\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_word_form);\n score = (TextView) findViewById(R.id.tvScoreDisplay);\n dictionary = (TextView) findViewById(R.id.tvLettersCollected);\n submitButton = (Button) findViewById(R.id.btSubmitWord);\n for(int i = 0; i < str.length(); i++){\n LettersCollected.add(str.charAt(i));\n }\n for(Character l : LettersCollected) {\n dict.append(l + \" \");\n }\n dictionary.setText(dict);\n InputStream is = getResources().openRawResource(R.raw.dictionary);\n BufferedReader reader = new BufferedReader(new InputStreamReader(is));\n String word = null;\n try {\n word = reader.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n while (word != null) {\n Dictionary.add(word);\n word = reader.readLine();\n }\n reader.close();\n is.close();\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n buttonPressed();\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n File f = new File(\"dict2.txt\");\n Scanner readFile = new Scanner(f);\n ArrayList<String> dictionary = new ArrayList<String>();\n \n while (readFile.hasNext()) {\n dictionary.add(readFile.next());\n }\n \n HangmanLogic logic = new HangmanLogic(dictionary);\n HangmanUserInterface game = new HangmanUserInterface(logic);\n game.start();\n }", "@Override\n public void onDialogPositiveClick(String newFilename){\n if(mEditTextMolFile.getText().toString().length()==0){\n Toast.makeText(getApplicationContext(),\"Empty edit text field. Not saved.\",Toast.LENGTH_LONG).show();\n return;\n }\n\n try{\n String[] ss = mEditTextMolFile.getText().toString().split(System.getProperty(\"line.separator\"));\n PrintWriter writer = new PrintWriter(getFilesDir()+\"/\"+newFilename+\".mol\");\n for(int i = 0; i<ss.length; i++){\n writer.println(ss[i]);\n }\n writer.close();\n if(!(newFilename.equals(\"mol\")||newFilename.equals(\"mol2d\"))){\n Toast.makeText(getApplicationContext(), \"mol file \" + newFilename + \" saved!\", Toast.LENGTH_LONG).show();\n }\n }catch (IOException e){\n e.printStackTrace();\n Toast.makeText(getApplicationContext(),\"Saving failed!\",Toast.LENGTH_LONG).show();\n }\n }", "private void insertWordEntry(String file, String word, String partition) {\n\t\tArrayList<String> fileList = new ArrayList<String>();\n\t\tfileList.add(file);\n\t\tindexedDir.get(partition).put(word, fileList);\n\t}", "private void loadDictWords(String dictFile) {\n try {\n BufferedReader reader = new BufferedReader(new FileReader(dictFile));\n\n String word = reader.readLine();\n while (word != null) {\n word = word.trim().toLowerCase();\n wordsList.add(word);\n\n word = reader.readLine();\n }\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Cannot find dictionary file at location: \" + dictFile);\n } catch (IOException e) {\n System.out.println(\"Error: Failed to open and read dictionary file at location: \" + dictFile);\n }\n }", "private void addCustomWords() {\r\n\r\n }", "public void saveDictionary() throws IOException {\r\n\t\tif (modified) {\r\n\t\t\tSystem.out.println(\"Saving...\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Saving un-changed dictionary...\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(\"dictionary.txt\", false);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\tObject[] dictionaryArray = dictionary.toArray();\r\n\t\t\tfor (int i = 0; i < dictionary.size(); i++) {\r\n\t\t\t\tString word = (String)dictionaryArray[i];\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t\tbw.write(word);\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t\tmodified = false;\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"An error occurred while attempting to save the dictionary.\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "void readFile()\n {\n Scanner sc2 = new Scanner(System.in);\n try {\n sc2 = new Scanner(new File(\"src/main/java/ex45/exercise45_input.txt\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n while (sc2.hasNextLine()) {\n Scanner s2 = new Scanner(sc2.nextLine());\n while (s2.hasNext()) {\n //s is the next word\n String s = s2.next();\n this.readFile.add(s);\n }\n }\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString newline = System.lineSeparator();\n\t\tFileReader fr = new FileReader(\"dictonary_english_special.txt\");\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString holder = \"\";\n\t\tString temp;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\ttemp = br.readLine();\n\t\t\t\tif(temp == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif(temp.length() < 4)\n\t\t\t\t\tcontinue;\n\t\t\t\t//System.out.println(temp);\n\t\t\t\tholder += temp + newline;\n\t\t\t} catch (IOException e) {break;}\n\t\t}\n\t\t\tFileWriter fw;\n\t\t\ttry {\n\t\t\t\tfw = new FileWriter(\"dictonary_english_hangman.txt\");\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\tbw.write(holder);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Done!\");\n\t}", "private void addPressed() {\n\n\t\tJFileChooser fc = new JFileChooser();\n\t\tfc.setFileFilter(SwingFileFilterFactory.newMediaFileFilter());\n\t\tint returnVal = fc.showOpenDialog(Library.this);\n\t\tif (returnVal == JFileChooser.APPROVE_OPTION) {\n\t\t\tString newFile = fc.getSelectedFile().getAbsolutePath();\n\t\t\t// Check that file is a video or audio file.\n\t\t\tInvalidCheck i = new InvalidCheck();\n\t\t\tboolean isValidMedia = i.invalidCheck(newFile);\n\n\t\t\tif (!isValidMedia) {\n\t\t\t\tJOptionPane.showMessageDialog(Library.this, \"You have specified an invalid file.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\tselectedFile = fc.getSelectedFile();\n\t\t\t\tl.addElement(selectedFile.getName());\n\t\t\t\tpaths.put(selectedFile.getName(), selectedFile.getAbsolutePath());\n\t\t\t\tsizes.put(selectedFile.getName(),selectedFile.length());\n\t\t\t}\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e) {\n if(e.getSource() == insertBtn) {\n Word newWord = new Word(insertChTF.getText(), insertEnTF.getText());\n dbDictionary.insert(newWord);\n dbDictionary.writeData();\n }\n else if(e.getSource() == searchBtn) {\n Word findWord = new Word(searchChTF.getText(), searchEnTF.getText());\n if(dbDictionary.search(findWord)) {\n searchDisplay(findWord);\n }\n }\n }", "public void readFromFile(String doc) {\n\t\tString newline = \"\\n\";\n\t\tString doc_text = \"\";\n\t\tint count = 0;\n\t\tString line=\"\";\n\t\t\n\t\t//for random button\n\t\tint buttoncount = 0;\n\t\tArrayList<JButton> list = new ArrayList<JButton>();\n\t\t\n\t\ttry{\n\t\t\t//input stream for reading special characters in German\t\n\t\t\t//documents from folder textfiles\n \tBufferedReader rd = new BufferedReader(new InputStreamReader(new FileInputStream(\"textfiles/\" + doc),StandardCharsets.UTF_8));\n \twhile ((line=rd.readLine()) != null) {\n \t\t//question text\n \t\tif (count == 0) {\n \t\t\t\n \t\t\tswitch(bg) {\n \t\t\t\tcase(1):\n \t\t\t\tdoc_text = \"Dein Charakter lässt sich durch 4 Merkmale beschreiben.\\r\\n\" + \n \t\t\t\t\t\t\"Wähle als 1. dein Persönlichkeitsmerkmal:\" + newline;\n \t\t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tcase(2):\n \t\t\t\tdoc_text = \"Wähle das 2. Merkmal ein Ideal:\" + newline;\n \t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tcase(3):\n \t\t\t\tdoc_text = \"Entscheide dich als nächstes für eine Bindung:\"+ newline;\n \t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tcase(4):\n \t\t\t\tdoc_text = \"Deine letzte Frage. Im Anschluss wird dein Charakter generiert.\\r\\n\" + \n \t\t\t\t\t\t\"Wähle ein Makel der dich beschreibt:\"+ newline;\n \t\t\t\tcount++;\n \t\t\t\tbreak;\n \t\t\tdefault:\n \t\t\t\tdoc_text = doc_text + line + newline;\n \t\t\t\tbreak;\n \t\t\t}\n \t\t\ttxt.setText(doc_text);\n \t\t\tif(randomButton == true) {\n\t\t \t\ttxt.setVisible(false);\n \t\t\t\t}\n \t\t\tpanelA.add(txt);\n \t\t}\n \t\t\n \t\t//buttonname;next document(;information)\n \t\tif (count == 1) {\n \t\t\tString[] tokens = line.split(\";\");\n \t\t\tJButton button = new JButton (tokens[0]);\n \t\t\t\tbutton.setFont(new Font(\"Rockwell\", Font.PLAIN, 24));\n \t\t\t//for random button: add buttons to a list and count them\n \t\t\tlist.add(button);\n \t\t\tbuttoncount++;\n \t\t\t\tif(randomButton == true) {\n \t\t\t\t\tbutton.setVisible(false);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tpanelB.add(button);\n\t\t\t\t\tbutton.addActionListener( new ActionListener() {\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent ae) {\n\t\t\t\t\t\t\tif(ae.getSource() == button) {\n\t\t\t\t\t\t\t\tif (tokens.length == 1) {\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tclearPanel();\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//if race is already set but class not yet, than read question for class\n\t\t\t\t\t\t\t\t\tif(baseRace == true && baseClass == false) {\n \t\t\t\t\t\t\t\t\tspecific_race = tokens[0];\n \t\t\t\t\t\t\t\t\treadFromFile(\"/question_class/question_class_\" + attribute + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//if race and class is already set -> open question for background\n\t\t\t\t\t\t\t\t\telse if(baseRace == true && baseClass == true) {\n\t\t\t \t\t\t\t\tspecific_class = tokens[0];\n \t\t\t\t\t\t\t\t\treadFromFile(\"question_backgrounds\" + \".txt\");\n\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (tokens.length > 1) {\n\t\t\t\t\t\t\t\t\t//Buttonname/tokens[0];[tokens[1];tokens[2] \n\t\t\t\t\t\t\t\t\tif (tokens.length>2) {\n\t\t\t\t\t\t\t\t\t\tif (baseRace == false && baseClass == false) {\n\t\t\t \t\t\t\t\t\tbase_race.setRace(tokens[2]);\n\t\t\t \t\t\t\t\t\tbaseRace = true;\n\t\t\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse if (baseRace == true && baseClass == false) {\n\t\t\t \t\t\t\t\t\tbase_class.setClass(tokens[2]);\n\t\t\t \t\t\t\t\t\tbaseClass = true;\n\n\t\t\t \t\t\t\t\t} \t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//random button\n\t\t\t\t\t\t\t\t\tif (tokens[0].equals(\"Zufallscharakter erstellen\")) {\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\trandomButton = true;\n\t\t\t\t\t\t\t\t\t\tclearPanel();\n\t\t\t\t\t\t\t\t\t\treadFromFile(tokens[1] + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//choose main attribute for race and class\n\t\t\t\t\t\t\t\t\telse if(doc.equals(\"question_1.txt\")) {\n\t\t\t \t\t\t\t\tString attribute_tokens [] = tokens[1].split(\"_\");\n\t\t\t \t\t\t\t\tattribute = attribute_tokens[3];\n\t\t\t \t\t\t\t\tclearPanel();\n\t\t\t\t\t\t\t\t\t\treadFromFile(tokens[1]+\".txt\");\t\n\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//choose background personality\n\t\t\t\t\t\t\t\t\telse if(doc.equals(\"question_backgrounds.txt\")) {\n\t\t\t\t\t\t\t\t\t\tpersonality = tokens[1];\n\t\t\t \t \t\tbase_personality.setPersonality(tokens[0]);\n\t\t\t \t \t\tclearPanel();\n\t\t\t \t \t\tbg++;\n\t\t\t \t \t\treadFromFile(\"question_personalities/\" + personality + \"/question_personality_\" + personality + \".txt\");\n\t\t\t \t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//background\n\t\t\t\t\t\t\t\t\telse if (bg == 1) {\t\n\t\t\t\t\t\t\t\t\t\tbg++;\n\t \t\t\t\t\t\t\t\tbase_personality.setPersonalityTrait(tokens[1]);\n\t \t\t\t\t\t\t\t\tclearPanel();\n\t \t\t\t\t\t\t\t\treadFromFile(\"/question_personalities/\" + personality + \"/question_ideal_\" + personality + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (bg == 2) {\n\t\t\t\t\t\t\t\t\t\tbg++;\n\t\t\t\t\t\t\t\t\t\tbase_personality.setIdeal(tokens[1]);\n\t\t\t\t\t\t\t\t\t\tclearPanel();\n\t \t\t \t\t\t\treadFromFile(\"/question_personalities/\" + personality + \"/question_bond_\" + personality + \".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse if (bg == 3) {\t\n\t\t\t\t\t\t\t\t\t\tbg++;\n\t \t\t\t\t\t\t\t\tbase_personality.setBond(tokens[1]);\n\t \t\t\t\t\t\t\t\tclearPanel();\n\t \t\t \t\t\t\treadFromFile(\"/question_personalities/\" + personality + \"/question_flaw_\" + personality + \".txt\");\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\telse if (bg == 4) {\n\t\t\t\t\t\t\t\t\t\tbg = 0;\n\t \t\t\t\t\t\t\t\tbase_personality.setFlaw(tokens[1]);\n\t \t\t\t\t\t\t\t\tsetAttributes();\n\t \t\t \t\tshowResults();\n\t \t\t \t\t\n\t\t\t\t \t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tclearPanel();\n\t\t\t\t\t\t\t\t\t\treadFromFile(tokens[1]+\".txt\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t \t \t\t\t\t\n \t\t\t}); //actionlistener close \n \t\t\t\n \t\t} //if count == 1 end\n\n \t\t//empty line\n\t\t if (line.length() == 0) {\n\t\t \tcount++;\n\t\t \ttxt.setText(doc_text);\n\t\t \tif(randomButton == true) {\n\t\t \t\ttxt.setVisible(false);\n \t\t\t\t}\n\t\t \tpanelA.add(txt);\n\t\t }\n\t\t \n \t} // while end\n \t\n\t\t\t\n \trd.close();\n \t\n } //try\n\t\tcatch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\tsetFrameContent();\n\t\tif(randomButton == true) {\n\t\t\trandomInt = rdm.nextInt(buttoncount);\t\n\t\t\tlist.get(randomInt).doClick();\n\t\t}\n\t}", "public void loadFile()\n {\n\n FileDialog fd = null; //no value\n fd = new FileDialog(fd , \"Pick up a bubble file: \" , FileDialog.LOAD); //create popup menu \n fd.setVisible(true); // make visible manu\n String directory = fd.getDirectory(); // give the location of file\n String name = fd.getFile(); // give us what file is it\n String fullName = directory + name; //put together in one sting \n \n File rideNameFile = new File(fullName); //open new file with above directory and name\n \n Scanner nameReader = null;\n //when I try to pick up it read as scanner what I choose\n try\n {\n nameReader = new Scanner(rideNameFile);\n }\n catch (FileNotFoundException fnfe)//if dont find return this message below\n {\n return; // immedaitely exit from here\n }\n \n //if load button pressed, it remove all ride lines in the world\n if(load.getFound()){\n removeAllLines();\n } \n \n //read until is no more stings inside of file and until fullfill max rides\n while(nameReader.hasNextLine()&&currentRide<MAX_RIDES)\n {\n \n String rd= nameReader.nextLine();//hold and read string with name of ride\n RideLines nova =new RideLines(rd);\n rides[currentRide]=nova;\n \n //Create a RideLine with string given from file\n addObject(rides[currentRide++], 650, 20 + 40*currentRide);\n }\n \n //when is no more strings inside it close reader\n nameReader.close();\n }", "public static void main(String[] args) throws FileNotFoundException {\n\n\n\n\n FileReader fileReader = null;\n try {\n // 파일 생성 부분 추가 필요 20151222\n // 파일 생성(R/W) 및 초기 데이터 추가한다.\n // 한글좀 그만 꺠져라..\n // 아좀..\n // 다시 테스트\n // 다시..\n fileReader = new FileReader(\"D:/wordList.txt\");\n } catch (FileNotFoundException e1) {\n // TODO Auto-generated catch block\n System.out.println(\"파일을 찾을 수 없습니다.\");\n System.exit(-1);\n }\n\n BufferedReader bufferedReader = null;\n bufferedReader = new BufferedReader(fileReader);\n\n StringBuffer stringBuffer = null;\n String line = null;\n\n ArrayList<String> wordList = new ArrayList<String>();\n\n try {\n while((line = bufferedReader.readLine()) != null) {\n stringBuffer = new StringBuffer();\n\n stringBuffer.append(line);\n\n wordList.add(stringBuffer.toString());\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n System.out.println(\"파일을 읽는 중 오류가 발생하였습니다.\");\n System.exit(-1);\n }\n\n\n Random random = new Random();\n int randomIndex = random.nextInt(wordList.size());\n String temp = wordList.get(randomIndex);\n\n\n char[] randomChar = temp.toCharArray();\n char[] encChar = new char[randomChar.length];\n\n\n System.out.println(String.valueOf(randomChar));\n\n for(int i = 0; i < randomChar.length; i++) {\n encChar[i] = '*';\n }\n\n System.out.println(String.valueOf(encChar));\n\n\n Career_2015 cc = new Career_2015();\n Scanner in = new Scanner(System.in);\n\n char inputChar = 0;\n boolean isContain = false;\n boolean isExists = false;\n int ascii = 0;\n int errorCount = 0;\n\n\n Map<Character, Boolean> inputCharMap = new HashMap<Character, Boolean>();\n Map<Character, ArrayList<Integer>> changeCharMap = new HashMap<Character, ArrayList<Integer>>();\n\n do {\n System.out.print(\"알파벳 소문자를 입력하세요. : \");\n\n try {\n inputChar = (char)cc.read();\n ascii = (int)inputChar;\n\n\n\n // 입력한 문자가 이미 입력한 문자인지 체크\n if(inputCharMap.containsKey(inputChar)) {\n System.out.println(\"입력했던 문자입니다. 다시 입력해주세요.\");\n isContain = true;\n } else inputCharMap.put(inputChar, true);\n\n // 입력한 글자가 선택한 단어에 포함되는지 체크\n changeCharMap = cc.isChangeChar(randomChar, inputChar);\n if(!changeCharMap.isEmpty()) {\n cc.changeChar(encChar, changeCharMap, inputChar);\n\n System.out.println(String.valueOf(encChar));\n\n if(String.valueOf(randomChar).equals(String.valueOf(encChar))) {\n System.out.println(\"모두 맞히셨습니다. 종료합니다.\");\n System.exit(-1);\n }\n } else {\n errorCount++;\n System.out.println(errorCount + \"번 틀리셨습니다.\");\n }\n\n\n\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } while((ascii < 97 || ascii > 122) || isContain || errorCount < 7);\n\n System.out.println(\"종료\");\n }", "public void loadList () {\r\n ArrayList<String> list = fileManager.loadWordList();\r\n if (list != null) {\r\n for (String s : list) {\r\n addWord(s);\r\n }\r\n }\r\n }", "public boolean openFile() throws IOException {\n\t\tString line = \" \";\n\t\tboolean check = false;\n\t\t\n\t\tBufferedReader textReader = new BufferedReader(new FileReader(path));\n\t\touterloop: \t\t// allows break statement to exit all loops once file path is added to the files ArrayList\n\t\twhile ((line = textReader.readLine()) != null ) {\t\t// loops line by line until there are no more lines\n\t\t\tString[] words = line.split(\" \");\t\t\t\t\t// breaks line into String array\n\t\t\t\n\t\t\tfor (String word : words) {\t\t\t\t\t\t\t// loops through words in each line\n\t\t\t\tfor (String key : keyWords) {\t\t\t\t\t// loops through keyWords input by user\n\t\t\t\t\tif (word.equals(key)) {\t\t\t\t\t\t// checks for a match between words in file and user key words input\n\t\t\t\t\t\tArrayList<String> list = new ArrayList<String>(Arrays.asList(keyWords));\t// the next three lines remove keyWord from array since the word has been found\n\t\t\t\t\t\tlist.removeAll(Arrays.asList(key));\n\t\t\t\t\t\tkeyWords = list.toArray(new String[0]);\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (keyWords.length == 0) {\n\t\t\t\t\t\t\tcheck = true;\n\t\t\t\t\t\t\tbreak outerloop;\t\t\t\t\t// breaks out of entire loop sequence. no need to keep looping once path has been added\n\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\t\n\t\ttextReader.close( );\n\t\treturn check;\t\t\n\t}", "public ArrayList <String> loadWordList () {\n ArrayList <String> words = new ArrayList <String> ();\n File file;\n if (chooser.showOpenDialog (null) == JFileChooser.APPROVE_OPTION) {\n file = chooser.getSelectedFile ();\n } else {\n return words;\n }\n if (file != null) {\n try {\n FileReader fileReader = new FileReader (file);\n BufferedReader buffer = new BufferedReader (fileReader);\n String temp;\n while ((temp = buffer.readLine ()) != null)\n words.add (temp);\n buffer.close ();\n return words;\n } catch (IOException e) {\n JOptionPane.showMessageDialog (null, \"File IO Exception\\n\" + e.getLocalizedMessage (), \"Error!\", JOptionPane.ERROR_MESSAGE);\n }\n }\n return words;\n }", "public static void main(String arg[]) {\n \tFile wordListFile = new File(\"WordList.txt\");\r\n \tFile definitionsFile = new File (\"DefinitionsAndSentences.txt\"); \t\r\n \tFile outputFile = new File (\"debug.txt\"); \r\n \t\r\n \tInputStream inputStreamOne;\r\n \tInputStreamReader readerOne;\r\n \tBufferedReader binOne;\r\n \t\r\n \tInputStream inputStreamTwo;\r\n \tInputStreamReader readerTwo;\r\n \tBufferedReader binTwo;\r\n \t\r\n \tOutputStream outputStream;\r\n \tOutputStreamWriter writerTwo;\r\n \tBufferedWriter binThree;\r\n \t \t\r\n \t\r\n \t// Lists to store data to write to database\r\n \tArrayList<TermItem>databaseTermList = new ArrayList<TermItem>();\r\n \tArrayList<DefinitionItem>databaseDefinitionList = new ArrayList<DefinitionItem>();\r\n \tArrayList<SentenceItem>databaseSampleSentenceList = new ArrayList<SentenceItem>();\r\n \t\r\n \t// Create instance to use in main()\r\n \tDictionaryParserThree myInstance = new DictionaryParserThree();\r\n \t\r\n \tint totalTermCounter = 1;\r\n \tint totalDefinitionCounter = 1;\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyInstance.createDatabase();\r\n\t\t\t// Open streams for reading data from both files\r\n\t\t\tinputStreamOne = new FileInputStream(wordListFile);\r\n\t \treaderOne= new InputStreamReader(inputStreamOne);\r\n\t \tbinOne= new BufferedReader(readerOne);\r\n\t \t\r\n\t \tinputStreamTwo = new FileInputStream(definitionsFile);\r\n\t \treaderTwo= new InputStreamReader(inputStreamTwo);\r\n\t \tbinTwo= new BufferedReader(readerTwo);\r\n\t \t\r\n\t \toutputStream = new FileOutputStream(outputFile);\r\n\t \twriterTwo= new OutputStreamWriter(outputStream);\r\n\t \tbinThree= new BufferedWriter(writerTwo);\r\n\r\n\t \tString inputLineTwo;\r\n\t \tString termArray[] = new String[NUM_SEARCH_TERMS];\r\n\t \t\r\n\t \t// Populate string array with all definitions.\r\n\t \tfor (int i = 0; (inputLineTwo = binTwo.readLine()) != null; i++) {\r\n\t\t \t termArray[i] = inputLineTwo; \r\n\t \t}\t \t\r\n\t \t\r\n\t \t// Read each line from the input file (contains top gutenberg words to be used)\r\n\t \tString inputLineOne;\r\n\t \tint gutenbergCounter = 0;\r\n\t \twhile ((inputLineOne = binOne.readLine()) != null) {\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t// Each line contains three or four words. Grab each word inside double brackets.\r\n\t\t \tString[] splitString = (inputLineOne.split(\"\\\\[\\\\[\")); \t\t \t\r\n\t \t\tfor (String stringSegment : splitString) {\r\n\t \t\t\t\r\n\t \t\t\tif (stringSegment.matches((\".*\\\\]\\\\].*\")))\r\n\t \t\t\t{\r\n\t \t\t\t\t// Increment counter to track Gutenberg rating (already from lowest to highest)\r\n\t \t\t\t\tgutenbergCounter++;\r\n\t \t \t\t\r\n\t \t\t\t\tboolean isCurrentTermSearchComplete = false;\r\n\t \t\t \tint lowerIndex = 0;\r\n\t \t\t \tint upperIndex = NUM_SEARCH_TERMS - 1;\r\n\t \t\t \t\r\n\t \t\t \tString searchTermOne = stringSegment.substring(0, stringSegment.indexOf(\"]]\"));\r\n\t \t\t \tsearchTermOne = searchTermOne.substring(0, 1).toUpperCase() + searchTermOne.substring(1);\r\n\t \t\t \t\r\n\t \t\t\t\twhile (!isCurrentTermSearchComplete) {\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// Go to halfway point of lowerIndex and upperIndex.\r\n\t \t\t\t\t\tString temp = termArray[(lowerIndex + upperIndex)/2];\r\n\t \t\t\t\t\tString currentTerm = temp.substring(temp.indexOf(\"<h1>\") + 4, temp.indexOf(\"</h1>\"));\r\n\t \t\t\t\t\t\t \t\t\t\t\t\r\n\t \t \t \t\t\t\t\t\r\n\t \t\t\t\t\t// If definition term is lexicographically lower, need to increase lower Index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If definition term is lexicographically higher, need decrease upper index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If a match is found, need to find first definition, and record each definition\r\n\t \t\t\t\t\t// in case of duplicates.\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (currentTerm.compareTo(searchTermOne) < 0) {\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\tlowerIndex = (lowerIndex + upperIndex)/2;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\telse if (currentTerm.compareTo(searchTermOne) > 0) {\r\n\t \t\t\t\t\t\tupperIndex = (lowerIndex + upperIndex)/2; \t\t\t\t\t\t\r\n\t \t\t\t\t\t} \t\t\t\t\t\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\telse {\t\r\n\t \t\t\t\t\t\t// Backtrack row-by-row until we reach the first term in the set. Once we reach the beginning,\r\n\t \t\t\t\t\t\t// cycle through each match in the set and obtain each definition until we reach the an unmatching term.\r\n\r\n\t \t\t\t\t\t\t//else {\r\n\t \t\t\t\t\t\t\tSystem.out.println(searchTermOne);\r\n\t\t \t\t\t\t\t\tint k = (lowerIndex + upperIndex)/2;\r\n\t\t \t\t\t\t\t\tboolean shouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\tif (k <= 0 || k >= NUM_SEARCH_TERMS) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString previous = termArray[k - 1].substring(termArray[k - 1].indexOf(\"<h1>\") + 4, termArray[k - 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t \t\t\t\t\t\tif (current.compareTo(previous) == 0) {\t\t\t\r\n\t\t\t\t \t\t\t\t\t\t\tk--;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t\t \t\t\t\t\telse {\r\n\t\t\t\t\t \t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t} \r\n\t\t \t\t\t\t\t\tshouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\t\t \t\r\n\t\t \t\t\t\t\t\t\t// Used to store data to later pass to DB\r\n\t\t \t\t\t\t\t DictionaryParserThree.TermItem tempTermItem = myInstance.new TermItem();\r\n\r\n\t\t \t\t\t\t\t // Determine unique ID (which will be written to DB later)\r\n\t\t \t\t\t\t\t // Add current term and gutenberg rating.\r\n\t\t \t\t\t\t\t tempTermItem.ID = totalTermCounter;\t\t \t\t\t\t\t \t \t\t\t\t\t \r\n\t\t \t\t\t\t\t \ttempTermItem.theWord = searchTermOne; // same as termArray[k]'s term\r\n\t\t \t\t\t\t\t \r\n\t\t \t\t\t\t\t\t\ttempTermItem.gutenbergRating = gutenbergCounter;\r\n\t\t \t\t\t\t\t\t\tdatabaseTermList.add(tempTermItem);\r\n\t\t \t\t\t\t\t\t\tbinThree.write(\"Term ID \" + tempTermItem.ID + \" \" + tempTermItem.theWord + \" guten rank is \" + tempTermItem.gutenbergRating);\r\n\t\t \t\t\t\t\t\t\tbinThree.newLine();\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t \t\tsplitString = termArray[k].split(\"<def>\");\r\n\t\t \t\t\t\t \t\t\r\n\t\t \t\t\t\t \t\tint m = 0;\r\n\t \t\t\t\t\t \t\tfor (String stringSegment2 : splitString) {\r\n\t \t\t\t\t\t \t\t\tif (stringSegment2.matches(\".*</def>.*\") && m > 0) {\r\n\t \t\t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t\t\t// Determine unique ID (which will be written to DB later)\r\n\t \t\t\t\t\t \t\t\t\t// Add definition, as well as term ID it is associated with.\r\n\t \t\t\t\t\t \t\t\t\tDictionaryParserThree.DefinitionItem tempDefinitionItem = myInstance.new DefinitionItem();\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.ID = totalDefinitionCounter;\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.theDefinition = stringSegment2.substring(0, stringSegment2.indexOf(\"</def>\"));\r\n\t \t\t\t\t\t\t \t\t\ttempDefinitionItem.termID = totalTermCounter;\r\n\t \t\t\t\t\t\t \t\t\tdatabaseDefinitionList.add(tempDefinitionItem);\r\n\r\n\t \t\t\t\t\t\t \t\t\tint n = 0;\r\n\t \t\t\t\t\t\t \t\t\tString[] splitString2 = (stringSegment2.split(\"<blockquote>\")); \r\n\t \t \t\t\t\t\t \t\tfor (String stringSegment3 : splitString2) {\r\n\t \t \t\t\t\t\t \t\t\tif (stringSegment3.matches(\".*</blockquote>.*\") && n > 0) {\r\n\t \t \t\t\t\t\t \t\t\t\t// Add data which will be added to DB later.\r\n\t \t \t\t\t\t\t \t\t\t\t// Add sample sentence as well as the definition ID it is associated with.\r\n\t \t \t\t\t\t\t \t\t\t\tDictionaryParserThree.SentenceItem tempSentenceItem = myInstance.new SentenceItem();\t\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.definitionID = totalDefinitionCounter;\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.theSampleSentence = stringSegment3.substring(0, stringSegment3.indexOf(\"</blockquote>\"));\r\n\t \t \t\t\t\t\t \t\t\t\tdatabaseSampleSentenceList.add(tempSentenceItem);\t \t \t\t\t\t\t \t\t\t\t\r\n\t \t \t \t\t\t\t\t \t\t\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\"Definition is\" + tempDefinitionItem.theDefinition);\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.newLine();\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\" and sample sentence is \" + tempSentenceItem.theSampleSentence);\r\n\t \t \t\t \t\t\t\t\t\t\tbinThree.newLine();\t\r\n\t \t \t\t\t\t\t \t\t\t}\r\n\t \t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's sample sentence)\r\n\t \t \t\t\t\t\t \t\t\tn++;\r\n\t \t \t\t\t\t\t \t\t}\r\n\t \t \t\t\t\t\t \t\ttotalDefinitionCounter++;\r\n\t \t\t\t\t\t \t\t\t}\r\n\t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's definition)\r\n\t \t\t\t\t \t\t\t\tm++;\r\n\t \t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t}\t \t \t\t\t\t\t \t\t\r\n\t \t\t\t\t\t \t\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\ttotalTermCounter++;\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\t// Compare next definition and see if duplicate exists.\r\n\t\t \t\t\t\t\t\t\t// If so, add to string array.\r\n\t \t\t\t\t\t \t\tif (k < 0 || k >= NUM_SEARCH_TERMS - 1) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\telse { \t \t\t\t\t\t \t\t\r\n\t\t\t \t\t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString next = termArray[k + 1].substring(termArray[k + 1].indexOf(\"<h1>\") + 4, termArray[k + 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\tif (current.compareTo(next) == 0) {\t\r\n\t\t\t\t \t\t\t\t\t\t\tk++;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t \t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\t}\r\n\t\t\t \t\t\t\t\t\t//}\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\tisCurrentTermSearchComplete = true;\r\n\t\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// If the term does not exist in the database.\r\n\t \t\t\t\t\tif (Math.abs(upperIndex) - Math.abs(lowerIndex) <= 1)\r\n\t \t\t\t\t\t{\r\n \t\t\t\t\t\t\t isCurrentTermSearchComplete = true;\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 \t\t\r\n\t \t}\r\n\t \t\r\n\t \t \t\r\n\t \tSystem.out.println(\"ended search.\");\t\r\n\t \tmyInstance.writeAllItemsToDatabase(databaseTermList, databaseDefinitionList, databaseSampleSentenceList);\t\r\n\t \tSystem.out.println(\"ended write.\");\r\n\t \t\r\n\t \tbinOne.close();\r\n\t \treaderOne.close();\r\n\t \tinputStreamOne.close();\t \t\r\n\t \t\r\n\t \tbinTwo.close();\r\n\t \treaderTwo.close();\r\n\t \tinputStreamTwo.close();\t \t\r\n\t \t\r\n\t \tbinThree.close(); \r\n\t \twriterTwo.close();\r\n\t \toutputStream.close();\r\n\t \tSystem.exit(0);\r\n\r\n\r\n\t \t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \t\r\n }", "public void save(String fileName){\r\n \tint k = 0;\r\n \t\t\r\n try{\r\n \r\n File f = new File(fileName + \".txt\");\r\n \t//Next line checks if the file already exists.\r\n \t if(f.exists()){\r\n \t \t\r\n \t \t//If it does, we have to ask the user if they\r\n \t \t//want to overwrite it.\r\n \t \t System.out.println(\"A file by this name already exists.\");\r\n \t \t System.out.println(\"Do you want to overwrite it? (Y/N)\");\r\n \t \t Scanner ans = new Scanner(System.in);\r\n \t \t char answer = ans.next().toUpperCase().charAt(0);\r\n \t \t \r\n \t \t \t//If they are comfortable overwriting the already\r\n \t \t \t//existing file, we save the items to the file.\r\n \t \t if(answer == 'Y'){\r\n \t \t \t\t//If the file exists, we have to delete it then\r\n \t \t \t\t//save a new one with that name. This is because\r\n \t \t \t\t//if the file has 6 elements, but the arrayList\r\n \t \t \t\t//only has 4, then only the first 4 of the 6 in the\r\n \t \t \t\t//file are overwritten. So we delete it and create\r\n \t \t \t\t//a new file with the name. If we're over writing,\r\n \t \t \t\t//then we don't care to keep whats in the existing\r\n \t \t \t\t//file.\r\n \t \t \tboolean success = f.delete();\r\n \t \t \tif(success == false) {\r\n \t \t \t\tSystem.out.println(\"Cannot delete file \" + f.getName());\r\n \t \t \t\tSystem.out.println(\"Check if the file is opened by another program and try again...\");\r\n \t \t \t\treturn;\r\n \t \t \t}\r\n \t }else if(answer == 'N'){\r\n \t \tSystem.out.println(\"Try again and enter a different file name.\");\r\n \t \treturn;\r\n \t } else {\r\n \t \tSystem.out.println(\"The answer has to be 'Y' or 'N'. Try again...\");\r\n \t \treturn;\r\n \t }\r\n \t \r\n }\r\n \t//If there is no already existing file by that name,\r\n \t//then the items are saved to this new file.\r\n\t\tFileWriter writer = new FileWriter(fileName + \".txt\");\r\n \r\n\t \twhile(k < items.size()){\r\n \t\t writer.write(items.get(k) + \"\\r\\n\");\r\n \t \tk++;\r\n\t \t}\r\n\t \twriter.close();\r\n\t \tSystem.out.println(\"Saved to: \" + fileName + \".txt\");\r\n\r\n }catch(IOException e){\r\n System.out.println(\"Something went wrong with accessing the file.\");\r\n }\r\n }", "private void newWord() {\r\n defaultState();\r\n int random_id_String = 0;\r\n int random_id_Char[] = new int[4];\r\n Random random = new Random();\r\n if (wordNumber == WordCollection.NO_OF_WORDS) return;//quit if all word list is complete;\r\n wordNumber++;\r\n //in case the word has already occured\r\n while (currentWord.equals(\"\")) {\r\n random_id_String = random.nextInt(WordCollection.NO_OF_WORDS);\r\n currentWord = tempWord[random_id_String];\r\n }\r\n currentWord.toUpperCase();\r\n tempWord[random_id_String] = \"\";//so that this word will not be used again in the game session\r\n //generates 4 random nums each for each btn char\r\n for (int i = 0; i < 4; i++) {\r\n random_id_Char[i] = (random.nextInt(4));\r\n for (int j = i - 1; j >= 0; j--) {\r\n if (random_id_Char[i] == random_id_Char[j]) i--;\r\n }\r\n }\r\n\r\n btn1.setText((currentWord.charAt(random_id_Char[0]) + \"\").toUpperCase());\r\n btn2.setText((currentWord.charAt(random_id_Char[1]) + \"\").toUpperCase());\r\n btn3.setText((currentWord.charAt(random_id_Char[2]) + \"\").toUpperCase());\r\n btn4.setText((currentWord.charAt(random_id_Char[3]) + \"\").toUpperCase());\r\n }", "public void initDict(String filename, int max_length) {\n\t\tsetDictionary(new ArrayList<String>());\n\t\tFile f = new File(\"src/\" + filename);\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(f))) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.length() < max_length) {\n\t\t\t\t\tgetDictionary().add(line.toLowerCase());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Poop\");\n\t\t}\n\n\t\tfor (String word : getDictionary()) {\n\t\t\taddWord(word);\n\t\t}\n\t}", "public SpellChecker() throws FileNotFoundException {\r\n\t\t// Initialize empty dictionary collection.\r\n\t\tdictionary = new LinkedSet<String>();\r\n\t\t\r\n\t\t// Add contents of provided \"dictionary.txt\" file to dictionary.\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"dictionary.txt\");\r\n\t\t\tSystem.out.println(\"Initializing program dicitonary...\");\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tString line = scanner.nextLine();\r\n\t\t\t\tdictionary.add(line);\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tSystem.out.println(\"dictionary initialized\");\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"An error occurred while initializing program dicitonary. File not found.\");\r\n\t\t}\r\n\t}", "public ArrayList<String> createWordBank() {\r\n ArrayList<String> wordBank = new ArrayList<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\"); // open input stream to read dictionary\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() == 9) wordBank.add(line); // take only the 9 letter words\r\n }\r\n } catch (IOException e) {\r\n }\r\n return wordBank;\r\n }", "public void xuLyLuuHoaHoaDon(){\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getAbsolutePath().endsWith(\".txt\");\n }\n\n @Override\n public String getDescription() {\n return \".txt\";\n }\n });\n fileChooser.setFileFilter(new FileFilter() {\n @Override\n public boolean accept(File file) {\n return file.getAbsolutePath().endsWith(\".doc\");\n }\n\n @Override\n public String getDescription() {\n return \".doc\";\n }\n });\n int flag = fileChooser.showSaveDialog(null);\n if(flag == JFileChooser.APPROVE_OPTION){\n File file = fileChooser.getSelectedFile();\n try {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(new FileOutputStream(file), Charset.forName(\"UTF-8\"));\n PrintWriter printWriter = new PrintWriter(outputStreamWriter);\n String lineTieuDe1 = \"----------------Phiếu Thanh Toán-----------------------\";\n String lineMaPTT = \"+Mã Phiếu Thanh Toán: \" + txtMaPTT.getText();\n String lineMaPDK = \"+Mã Phiếu Đăng Ký: \" + cbbMaPDK.getSelectedItem().toString();\n String lineSoThang = \"+Số Tháng: \" + txtSoThang.getText()+\"|\";\n String lineNgayTT = \"+Ngày Thanh Toán: \" + txtNgayTT.getText();\n String lineTienPhong = \"+Tiền Phòng: \" + txtTongTien.getText();\n String lineTienDV = \"+Tiền Dịch Vụ: \"+txtThanhToanTongCong.getText();\n String lineTieuDe2 = \"--------------------------------------------------------\";\n String lineTienPhaiTra =\"+Tiền Phải Trả: \" + txtTienPhaiTra.getText()+\" \";\n String lineTieuDe3 = \"--------------------------------------------------------\";\n \n printWriter.println(lineTieuDe1);\n printWriter.println(lineMaPTT);\n printWriter.println(lineMaPDK);\n printWriter.println(lineSoThang);\n printWriter.println(lineNgayTT);\n printWriter.println(lineTienPhong);\n printWriter.println(lineTienDV);\n printWriter.println(lineTieuDe2);\n printWriter.println(lineTienPhaiTra);\n printWriter.println(lineTieuDe3);\n \n printWriter.close();\n outputStreamWriter.close();\n \n } catch (Exception e) {\n e.printStackTrace();\n }\n JOptionPane.showMessageDialog(null, \"Đã lưu\");\n }\n \n }", "WordLadderSolver(String dictionaryFile) {\n \tdictionary = new Dictionary(dictionaryFile); //Set up the words from the file\n }", "private void loadStopWords() throws FileNotFoundException, IOException{\n\n BufferedReader reader = new BufferedReader(new FileReader(\"src/stopwords/English.txt\"));\n String sWord;\n while ((sWord = reader.readLine()) != null) \n {\n stopWordList.add(sWord);\n }\n reader.close();\n }", "private void createDocWords() {\n\t\tArrayList<DocWords> docList=new ArrayList<>();\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(\"E:\\\\graduate\\\\cloud\\\\project\\\\data\\\\docWords.txt\"));\n\t\t\tString line = \"\";\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tString parts[] = line.split(\" \");\n\t\t\t\tDocWords docWords=new DocWords();\n\t\t\t\tdocWords.setDocName(parts[0].replace(\".txt\", \"\"));\n\t\t\t\tdocWords.setCount(Float.parseFloat(parts[1]));\n\t\t\t\tdocList.add(docWords);\n\t\t\t}\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tDBUtil.insertDocWords(docList);\n\t}", "public HashSet<String> createDictionary() {\r\n HashSet<String> dictionary = new HashSet<String>();\r\n AssetManager assetM = getActivity().getAssets(); // get asset manager to access dictionary file\r\n try {\r\n InputStream is = assetM.open(\"dictionary\");\r\n BufferedReader r = new BufferedReader(new InputStreamReader(is)); // read from input stream\r\n String line;\r\n while ((line = r.readLine()) != null) { // while line is not null\r\n if (line.length() >= 3) dictionary.add(line); // take only the 3 letter word\r\n }\r\n } catch (IOException e) {\r\n }\r\n return dictionary;\r\n }", "public static void doNonInteractiveMode(String[] args) throws FileNotFoundException {\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\r\n\t\tString dictionaryFile = args[1];\r\n\t\tString filename = args[2];\r\n\r\n\t\tDictionary dic = new Dictionary(dictionaryFile);\r\n\r\n\t\ttry {\r\n\t\t\tFile f = new File(filename);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString sentence = in.nextLine();\r\n\t\t\t\tString[] words = sentence.split(\" \");\r\n\t\t\t\t// transform string[] into ArrayList\r\n\t\t\t\tArrayList<String> al = new ArrayList<String>(Arrays.asList(words));\r\n\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t\t// remove ^ when the operation is finished\r\n\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t// the case of punctuation\r\n\t\t\t\t\tif (!dic.hasWord(al.get(i).replaceAll(\"[^a-zA-Z ]\", \"\"))) {\r\n\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\tif (j == 0)\r\n\t\t\t\t\t\t\t\tSystem.out.printf(\"^\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"check the existance of filename\");\r\n\t\t}\r\n\t}", "public void addAll(String[] words, String filename, int start) {\n\t\tint i = start;\n\t\tfor (String word : words) {\n\t\t\taddHelper(word, filename, i);\n\t\t\ti++;\n\t\t}\n\t}", "private void readDictionaryFile(InputStream dictionary, CharsetDecoder decoder) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(dictionary, decoder));\n // TODO: don't create millions of strings.\n String line = reader.readLine(); // first line is number of entries\n int numEntries = Integer.parseInt(line);\n \n // TODO: the flags themselves can be double-chars (long) or also numeric\n // either way the trick is to encode them as char... but they must be parsed differently\n while ((line = reader.readLine()) != null) {\n String entry;\n HunspellWord wordForm;\n \n int flagSep = line.lastIndexOf('/');\n if (flagSep == -1) {\n wordForm = NOFLAGS;\n entry = line;\n } else {\n // note, there can be comments (morph description) after a flag.\n // we should really look for any whitespace\n int end = line.indexOf('\\t', flagSep);\n if (end == -1)\n end = line.length();\n \n String flagPart = line.substring(flagSep + 1, end);\n if (aliasCount > 0) {\n flagPart = getAliasValue(Integer.parseInt(flagPart));\n } \n \n wordForm = new HunspellWord(flagParsingStrategy.parseFlags(flagPart));\n Arrays.sort(wordForm.getFlags());\n entry = line.substring(0, flagSep);\n if(ignoreCase) {\n entry = entry.toLowerCase(Locale.ENGLISH);\n }\n }\n \n List<HunspellWord> entries = words.get(entry);\n if (entries == null) {\n entries = new ArrayList<HunspellWord>();\n words.put(entry, entries);\n }\n entries.add(wordForm);\n }\n }", "public static void main(String[] args) throws IOException {\n\n\t\tSystem.out.println(\"Please enter the name of the file\");\n\t\tScanner input = new Scanner(System.in);\n\t\tString fileName = input.next();\n\t\tSystem.out.println(\"Would you like to write all words including duplicates? Ente 'yes' for \"\n\t\t\t\t+ \"all words including duplicates. Enter 'no' to write words without duplicates\");\n\t\tString duplicates = input.next();\n\t\t\n\t\tFile file = new File(\"C:\\\\NewWorkspace\\\\Lekcija15\\\\src\\\\Vjezbe\\\\\" + fileName);\n\t\tif(!file.exists()){\n\t\t\tSystem.out.println(\"File name \" + fileName + \" does NOT exist\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tinput.close();\n\t\t\n\t\tSet<String> wordsSingle = new TreeSet<>();\n\t\tList<String> wordsDuplicates = new ArrayList<>();\n\n\t\tScanner read = new Scanner(file);\n\t\tString word;\n\n\t\twhile(read.hasNext()){\n\t\t\tword = read.next();\n\t\t\tif(duplicates.equals(\"yes\"))\n\t\t\t\twordsDuplicates.add(word);\n\t\t\telse\n\t\t\t\twordsSingle.add(word);\n\t\t}\n\t\tread.close();\n\t\t\n\t\tif(duplicates.equals(\"yes\")){\n\t\t\tCollections.sort(wordsDuplicates);\n\t\t\tfor(String words: wordsDuplicates)\n\t\t\t\tSystem.out.println(words);\n\t\t}\n\t\telse{\n\t\t\tfor(String words: wordsSingle)\n\t\t\t\tSystem.out.println(words);\n\t\t}\n\t}", "public static void main(String[] args) \n\t{\n\t\tBoggleBoard.generateBoard();\n\t\tArrayList<String> usedWords = new ArrayList<String>();\n\t\tmyDictionary = new Dictionary(\"words.txt\"); //load the dictionary\n\t\tmyBoard = new BoggleBoard(\"board.txt\"); //load the board: board.txt for standard board, board2.txt for random board\n\t\tmyBoard.display(); //display the board\n\t\tint score = 0;\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"\\nEnter a word (or enter nothing at any point to end the game): \");\n\t\tString input = scan.nextLine();\n\t\tinput = input.toLowerCase();\n\t\t\n\t\twhile(!input.equals(\"\")) //user inputs a word\n\t\t{\n\t\t\tif(input.length() < 3) //words less than 3 letters don't count\n\t\t\t\tSystem.out.println(\"That word is too short.\");\n\t\t\telse if(Dictionary.search(input, 0, myDictionary.size-1) < 0) //user made up a word\n\t\t\t\tSystem.out.println(\"That word is not in the dictionary.\");\n\t\t\telse if(!myBoard.findWord(input.toUpperCase())) //word not on the board\n\t\t\t\tSystem.out.println(\"That word is a valid word, but is not on the board.\");\n\t\t\telse // myDictionary.search() && myBoard.findWord(input)\n\t\t\t{\n\t\t\t\tif(!usedWords.contains(input))\n\t\t\t\t{\n\t\t\t\t\t//account for grammar\n\t\t\t\t\tif(myBoard.score(input) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" point!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input); //add searched words to usedWords to make sure they cant be used again\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" points!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"That word was already used.\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\tmyBoard.display();\n\t\t\t\n\t\t\tSystem.out.print(\"Used words: \");\n\t\t\tfor(String d : usedWords)\n\t\t\t\tSystem.out.print(d + \", \");\n\t\t\t\n\t\t\tSystem.out.print(\"\\nEnter a word: \");\n\t\t\tinput = scan.nextLine();\n\t\t\tinput = input.toLowerCase();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Total score: \" + score); //end of the game.\n\t\tSystem.out.println(\"Thanks for playing!\");\n\t}", "public WordGameGUI() throws IOException {\n FileHandler fh; \n // This block configure the logger with handler and formatter \n \n String filename = \"DataLog\";\n int j = 1;\n File f = new File(filename+Integer.toString(j)+\".log\");\n while(f.exists()){\n j++;\n f = new File(filename+Integer.toString(j)+\".log\");\n System.out.println(f);\n \n }\n\n fh = new FileHandler(filename+Integer.toString(j)+\".log\");\n \n LOGGER.addHandler(fh);\n XMLFormatter formatter = new XMLFormatter();//SimpleFormatter(); \n fh.setFormatter(formatter); \n\n LOGGER.info(TRAINING_DATA_LOG); \n \n // useful info on using logger:\n \n // https://logging.apache.org/log4j/1.2/manual.html\n \n // https://www.loggly.com/ultimate-guide/parsing-java-logs/\n \n /* words.add(new Word(\"face\",\"abcdefgh\"));\n words.add(new Word(\"nope\",\"ejklmnop\"));\n words.add(new Word(\"suck\",\"suckyoet\"));\n words.add(new Word(\"suck\",\"suckyoet\"));\n words.add(new Word(\"heck\",\"heckyout\"));\n words.add(new Word(\"meow\",\"meowsuct\"));\n words.add(new Word(\"fuck\",\"fuckyoet\"));\n words.add(new Word(\"cane\",\"caneyobt\")); */\n \n // test 5 words\n words.add(new Word(\"shot\",\"hostux\"));\n words.add(new Word(\"dice\",\"cdeiss\"));\n words.add(new Word(\"soft\",\"afkost\"));\n words.add(new Word(\"meat\",\"aemtvw\"));\n words.add(new Word(\"stop\",\"opqsty\"));\n \n words.add(new Word(\"loan\",\"aclnoy\"));\n words.add(new Word(\"rate\",\"aaerrt\"));\n words.add(new Word(\"flag\",\"afglou\"));\n words.add(new Word(\"fast\",\"afkost\")); \t\n words.add(new Word(\"film\",\"fiklms\"));\n \n words.add(new Word(\"seek\",\"ceekns\"));\n words.add(new Word(\"****\",\"aekttw\")); \t\n words.add(new Word(\"****\",\"aceltu\"));\n words.add(new Word(\"rent\",\"beinrt\"));\n words.add(new Word(\"****\",\"cdehop\"));\n \n words.add(new Word(\"****\",\"beiist\"));\n words.add(new Word(\"wood\",\"dloopw\"));\n words.add(new Word(\"vote\",\"emostv\"));\n words.add(new Word(\"****\",\"afhimr\"));\n words.add(new Word(\"drag\",\"acdgor\"));\n\t\n\n \n \n word = words.get(0);\n\n \n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jButton3 = new javax.swing.JButton();\n jButton4 = new javax.swing.JButton();\n jButton5 = new javax.swing.JButton();\n jButton6 = new javax.swing.JButton();\n jButton7 = new javax.swing.JButton();\n jButton8 = new javax.swing.JButton();\n \n buttons.add(jButton1);\n buttons.add(jButton2);\n buttons.add(jButton3);\n buttons.add(jButton4);\n buttons.add(jButton5);\n buttons.add(jButton6);\n buttons.add(jButton7);\n buttons.add(jButton8);\n List<String> availableLetters = word.getAvailableLetters();\n for(int i=0; i<availableLetters.size(); i++){\n buttons.get(i).setText(availableLetters.get(i));\n buttons.get(i).addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n try {\n buttonActionPerformed(evt);\n } catch (IOException | InterruptedException e) {\n e.printStackTrace();\n }\n }\n });\n }\n \n initComponents();\n }", "private void addWords(){\n wordList.add(\"EGE\");\n wordList.add(\"ABBAS\");\n wordList.add(\"KAZIM\");\n }", "public void dictionaryBasic() {\n dictionaryManagement.insertFromCommandline();\n showAllWords();\n }", "public void saveWordsWithGivenLetter(Text text, char ch, String filePath) {\n\n List<Word> words = getWordsWithGivenLetter(text, ch);\n\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(new File(filePath)));\n\n for (Word word : words) {\n bw.write(word.getCharsSequence() + \"\\n\");\n }\n bw.close();\n } catch (IOException e) {\n System.out.println(\"File can't be read\");\n }\n }", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n\tprivate void initialize(boolean firstRun) {\n\t\tfrmDictionary = new JFrame();\n\t\tfrmDictionary.setTitle(\"Dictionary\");\n\t\tfrmDictionary.setBounds(100, 100, 686, 535);\n\t\tfrmDictionary.setLocationRelativeTo(null);\n\t\tfrmDictionary.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n\t\t// add word button\n\t\tJButton addWordBtn = new JButton(\"Add Word\");\n\t\taddWordBtn.setBounds(6, 6, 117, 29);\n\t\taddWordBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tAddWord window = new AddWord();\n\t\t\t\t\t\t\twindow.addWordFrame.setVisible(true);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tfrmDictionary.getContentPane().setLayout(null);\n\t\taddWordBtn.setFocusPainted(false);\n\t\taddWordBtn.setFont(new Font(\"Chalkboard\", Font.PLAIN, 13));\n\t\tfrmDictionary.getContentPane().add(addWordBtn);\n\n\t\t// remove word button\n\t\tJButton removeWordBtn = new JButton(\"Remove Word\");\n\t\tremoveWordBtn.setBounds(122, 6, 117, 29);\n\t\tremoveWordBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tEventQueue.invokeLater(new Runnable() {\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tRemoveWord window = new RemoveWord();\n\t\t\t\t\t\t\twindow.frame.setVisible(true);\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\tremoveWordBtn.setFont(new Font(\"Chalkboard\", Font.PLAIN, 13));\n\t\tremoveWordBtn.setFocusPainted(false);\n\t\tfrmDictionary.getContentPane().add(removeWordBtn);\n\n\t\t// search box\n\t\tsearchBox = new JTextField(\"Search...\");\n\t\tsearchBox.setBounds(6, 34, 233, 38);\n\t\tsearchBox.addKeyListener(new KeyAdapter() {\n\t\t\t@Override\n\t\t\tpublic void keyReleased(KeyEvent e) {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tsearchBox.setFont(new Font(\"Chalkboard\", Font.PLAIN, 18));\n\n\t\t// adds/removes placeholder when focus gained/lost\n\t\tsearchBox.addFocusListener(new FocusAdapter() {\n\t\t\t@Override\n\t\t\tpublic void focusGained(FocusEvent e) {\n\t\t\t\tif (searchBox.getText().equals(\"Search...\")) {\n\t\t\t\t\tsearchBox.setText(\"\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void focusLost(FocusEvent e) {\n\t\t\t\tif (!searchBox.getText().equals(\"Search...\")) {\n\t\t\t\t\tsearchBox.setText(\"Search...\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tfrmDictionary.getContentPane().add(searchBox);\n\t\tsearchBox.setColumns(10);\n\n\t\t// A to Z radio button\n\t\taToZRdoBtn = new JRadioButton(\"A to Z\");\n\t\taToZRdoBtn.setBounds(6, 70, 141, 23);\n\t\taToZRdoBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// sort A to Z\n\t\t\t\tDefaultListModel<String> listModel = new DefaultListModel<>();\n\t\t\t\tArrayList<Word> jsonArray = GSONread.returnWords(true);\n\t\t\t\tfor (int i = 0; i < jsonArray.size(); i++) {\n\t\t\t\t\tlistModel.addElement(jsonArray.get(i).getName().toString());\n\t\t\t\t}\n\t\t\t\twordList.setModel(listModel);\n\t\t\t}\n\t\t});\n\t\taToZRdoBtn.setFont(new Font(\"Chalkboard\", Font.PLAIN, 13));\n\t\taToZRdoBtn.setSelected(true);\n\t\taToZRdoBtn.setFocusPainted(false);\n\t\tbuttonGroup.add(aToZRdoBtn);\n\t\tfrmDictionary.getContentPane().add(aToZRdoBtn);\n\n\t\t// Z to A radio button\n\t\tJRadioButton zToARdoBtn = new JRadioButton(\"Z to A\");\n\t\tzToARdoBtn.setBounds(6, 95, 141, 23);\n\t\tzToARdoBtn.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t// sort Z to A\n\t\t\t\tDefaultListModel<String> listModel = new DefaultListModel<>();\n\t\t\t\tArrayList<Word> jsonArray = GSONread.returnWords(false);\n\t\t\t\tfor (int i = 0; i < jsonArray.size(); i++) {\n\t\t\t\t\tlistModel.addElement(jsonArray.get(i).getName().toString());\n\t\t\t\t}\n\t\t\t\twordList.setModel(listModel);\n\t\t\t}\n\t\t});\n\t\tzToARdoBtn.setFont(new Font(\"Chalkboard\", Font.PLAIN, 13));\n\t\tzToARdoBtn.setFocusPainted(false);\n\t\tbuttonGroup.add(zToARdoBtn);\n\t\tfrmDictionary.getContentPane().add(zToARdoBtn);\n\n\t\tJTextPane textPane = new JTextPane();\n\t\ttextPane.setFont(new Font(\"Chalkboard\", Font.PLAIN, 16));\n\t\ttextPane.setBounds(251, 70, 429, 437);\n\t\tfrmDictionary.getContentPane().add(textPane);\n\n\t\tjsonArray = GSONread.returnWords(true);\n\n\t\twordList = new JList();\n\t\tDefaultListModel<String> listModel = new DefaultListModel<>();\n\t\tArrayList<Word> jsonArray = GSONread.returnWords(true);\n\t\tfor (int i = 0; i < jsonArray.size(); i++) {\n\t\t\tlistModel.addElement(jsonArray.get(i).getName().toString());\n\t\t}\n\t\twordList.setModel(listModel);\n\t\twordList.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\tint index = wordList.locationToIndex(e.getPoint());\n\t\t\t\tresult = \"Word: \" + Dictionary.getNames().get(index);\n\t\t\t\tresult += \"\\n\" + Dictionary.getFormattedWordDefinitions(index);\n\t\t\t\tresult += \"\\n\" + Dictionary.getFormattedSyns(index);\n\t\t\t\tresult += \"\\n\" + Dictionary.getFormattedAnts(index);\n\t\t\t\ttextPane.setText(result);\n\t\t\t}\n\t\t});\n\t\twordList.setBounds(6, 119, 233, 388);\n\t\twordList.setFont(new Font(\"Chalkboard\", Font.PLAIN, 12));\n\n\t\tlistScroller = new JScrollPane();\n\t\tlistScroller.setBounds(6, 119, 233, 388);\n\t\tlistScroller.setViewportView(wordList);\n\t\twordList.setLayoutOrientation(JList.VERTICAL);\n\t\tfrmDictionary.getContentPane().add(listScroller);\n\n\t\t// label at the top of window\n\t\tJLabel lblNewLabel = new JLabel(\"Dictionary\");\n\t\tlblNewLabel.setBounds(260, 11, 332, 61);\n\t\tlblNewLabel.setFont(new Font(\"Chalkboard\", Font.BOLD, 47));\n\t\tfrmDictionary.getContentPane().add(lblNewLabel);\n\n\t}", "private static void buildWordList(){\n\t\ttry {\n\t\t\t@SuppressWarnings(\"resource\")\n\t\t\tScanner inScanner = new Scanner(new FileReader(LIST_LOCATION));\n\t\t\tfor(int i = 0; i < collegiateWords.length ; i++){\n\t\t\t\tcollegiateWords[i] = inScanner.nextLine();\n\t\t\t}\n\t\t\t\n\t\t} catch (FileNotFoundException e1) {\n\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\n\t\tSystem.out.println(\"Word List Built.\");\n\t}", "public static void ExportToFile() throws IOException {\n BufferedWriter writer = new BufferedWriter(new FileWriter(\"Data/dictionary.txt\"));\r\n for (Word word : Dictionary.dictionaryList) {\r\n writer.write(String.format(\"%s\\t%s\\n\", word.getWord(), word.getWordMeaning()));\r\n }\r\n writer.close();\r\n }", "public static void startup() {\n\t\tString thisLine;\n\t\tString currentName = \"\";\n\t\tboolean next = true;\n\n\t\t// DEBUG\n\t\t// System.out.println(\"entered here\");\n\n\t\t// Loop across the arguments\n\n\t\t// Open the file for reading\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(GIGA_WORD));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// .replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tString[] wordNumber = str.split(\"[ ]{2,}\");\n\t\t\t\tString word = wordNumber[0].toLowerCase();\n\t\t\t\tint cnt = Integer.parseInt(wordNumber[1]);\n\t\t\t\tgigaMap.put(word, cnt);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tif (str.equals(\"[Term]\")) {\n\t\t\t\t\tnext = true;\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"name:\")) {\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tcurrentName = str.replaceAll(\"name: \", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"synonym:\")) {\n\t\t\t\t\tif (str.contains(\"EXACT\") || str.contains(\"NARROW\")) {\n\t\t\t\t\t\t// synonym..\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"synonym:.*\\\"(.*)\\\".*\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(str);\n\t\t\t\t\t\t// DEBUG\n\t\t\t\t\t\t// System.err.println(str);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tString syno = matcher.group(1);\n\t\t\t\t\t\t\tif (!currentName.equals(\"\")) {\n\t\t\t\t\t\t\t\t// System.err.format(\"%s:%s.\\n\", currentName,\n\t\t\t\t\t\t\t\t// syno);\n\n\t\t\t\t\t\t\t\tadd(currentName, syno);\n\t\t\t\t\t\t\t\tadd(syno, currentName);\n\t\t\t\t\t\t\t\trecursiveAddSyno(currentName, syno);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error: \" + e);\n\t\t}\n\t}", "public void addBookmarks(ActionEvent event) throws IOException{\n bookmarkTxt();\n }", "public static void loadFile(ArrayList<String> array, String inputFile) {\n String line = \"\";\n String[] words;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(inputFile));\n System.out.println(\"Loading file... \\\"Dictionary\\\"\");\n while ((line = reader.readLine()) != null) {\n words = line.split(\"\\n\");\n for (int i = 0; i < words.length; i++)\n array.add(words[i]);\n }\n reader.close();\n } catch (Exception ex) {\n System.out.println(\"File not found\");\n }\n }", "private void addSpeech(String text, String filename) {\n mUtterances.put(text, new SoundResource(filename));\n }", "private void dictionary(boolean updateDictionary) {\n try {\n loadDictionary(filePathDictionaryAuto);\n loadNonDictionaryTerms(filePathNonDictionaryAuto);\n if (updateDictionary) {\n upgradeDictionary();\n populateDictionary();\n writeToDictionary();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public boolean loadDictionary(String fileName) throws IOException;", "public Dictionary(String filename) throws FileNotFoundException, IOException {\n wordlist = loadWordList(filename);\n }", "private void loadNonDictionaryTerms(String filePathNonDictionaryAuto) throws IOException {\n File fileAnnotation = new File(filePathNonDictionaryAuto);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr;\n fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n\n nonDictionaryTerms.add(line.trim().toLowerCase());\n System.out.println(\"Loading Non Dictionary Terms: \" + line);\n }\n br.close();\n fr.close();\n System.out.println(\"Non Dictionary Terms Loaded\");\n }", "ArrayList<WordListItem> addDataFromFile(){\n BufferedReader br;\n InputStream inputStream = context.getResources().openRawResource(R.raw.animal_list);\n br = new BufferedReader(\n new InputStreamReader(inputStream, Charset.forName(\"UTF-8\"))\n );\n String currentLine;\n ArrayList<WordListItem> wordListItems = new ArrayList<WordListItem>();\n try {\n while ((currentLine = br.readLine()) != null) {\n String[] tokens = currentLine.split(\";\");\n\n String word = tokens[0];\n String pronunciation = tokens[1];\n String description = tokens[2];\n\n WordListItem wordItem = new WordListItem(word, pronunciation, description);\n wordItem.setImgResNbr(setImgResFromWord(wordItem.getWord().toLowerCase()));\n wordListItems.add(wordItem);\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null) br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n\n return wordListItems;\n }", "private void btnLoadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLoadActionPerformed\r\n\r\n int returnVal = getInChooser().showOpenDialog(this);\r\n \r\n if(returnVal == JFileChooser.APPROVE_OPTION) {\r\n try {\r\n blackWords.setText(Utils.loadFile(getInChooser().getSelectedFile()).trim());\r\n } catch (FileNotFoundException ex) {\r\n ex.printStackTrace();\r\n } catch (IOException ex) {\r\n ex.printStackTrace();\r\n }\r\n }\r\n \r\n putWizardData(\"blacksaved\", \"false\");\r\n }", "private void displayDialog(final File file) {\n View mView = getLayoutInflater().inflate(R.layout.dialog_add, null);\n AlertDialog.Builder mBuilder = new AlertDialog.Builder(this);\n mBuilder.setView(mView);\n final AlertDialog dialog = mBuilder.create();\n dialog.show();\n final EditText addInput = mView.findViewById(R.id.symbol_add);\n Button cancelButton = mView.findViewById(R.id.cancel_button);\n Button addButton = mView.findViewById(R.id.add_button);\n\n cancelButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n dialogCancelled = true;\n dialog.dismiss();\n }\n });\n addButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n try {\n BufferedWriter bw = new BufferedWriter(new FileWriter(file));\n userName = addInput.getText().toString();\n bw.write(userName);\n bw.close();\n userName = addInput.getText().toString();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n dialog.dismiss();\n }\n });\n }", "@FXML\n void loadButtonClicked(ActionEvent event) throws FileNotFoundException\n {\n FileChooser file = new FileChooser();\n\n file.setTitle(\"Load file (.txt)\");\n\n file.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(\"Text Files\", \"*.txt\"));\n\n File selectedFile = file.showOpenDialog(listView.getScene().getWindow());\n\n // Create new file with all info on file, do this in a method\n loadFile(selectedFile);\n\n // Send all this info to the list in order to create new one\n for(int i=0; i<Item.getToDoList().size(); i++)\n {\n // Display items\n display();\n\n }\n }" ]
[ "0.7125378", "0.6809816", "0.6596934", "0.6571581", "0.6565408", "0.64847124", "0.646556", "0.632406", "0.6302253", "0.6273092", "0.6231701", "0.62069315", "0.61759055", "0.61219406", "0.6012753", "0.60023636", "0.5992419", "0.5976721", "0.5953028", "0.5923878", "0.59131634", "0.5912628", "0.58990306", "0.58589303", "0.5854324", "0.5799939", "0.57882285", "0.5782579", "0.5760516", "0.5746516", "0.5746431", "0.57394475", "0.5730257", "0.5714149", "0.5701312", "0.56951916", "0.56645024", "0.5662958", "0.5656954", "0.5646961", "0.5643901", "0.5638027", "0.56268805", "0.56226027", "0.56059617", "0.5588649", "0.55766505", "0.55678606", "0.5551652", "0.55401653", "0.5538235", "0.5532754", "0.552573", "0.5523907", "0.5518728", "0.55093044", "0.5499862", "0.5491028", "0.5487836", "0.548671", "0.54777735", "0.54703605", "0.54672277", "0.5465145", "0.5459587", "0.54587066", "0.54237455", "0.5421377", "0.5409409", "0.5405949", "0.54044074", "0.54010725", "0.53957486", "0.53862935", "0.5385961", "0.5383458", "0.5382817", "0.53724116", "0.5367491", "0.5363035", "0.53596157", "0.5351722", "0.53516704", "0.53422177", "0.5330472", "0.5326038", "0.53213793", "0.5315348", "0.53130585", "0.53119236", "0.5309795", "0.5303794", "0.5294221", "0.5293805", "0.52933615", "0.5284188", "0.52703434", "0.52650523", "0.52627075", "0.5241928" ]
0.68405646
1
appends current word to text area.
void extend(SpellCheckWord scWord) { if(!scWord.word.equals("\n\n")) super.append(scWord.word + " "); else super.append(scWord.word); contentPairs.add(scWord); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void append(String text)\n{\n\ttextArea().append(text);\n}", "private void appendText(String text) {\n textArea.appendText(text);\n }", "@FXML\n\tpublic void addWord() {\n\n\t\twordList.add(new Word(TextFieldWord.getText(), TextFieldDescribe.getText(), liczbaznakow));\n\n\t\ttry {\n\n\t\t\tout = new PrintWriter(selectedFile);\n\n\t\t\tfor (int i = 0; i < wordList.size(); i++) {\n\n\t\t\t\tout.printf(\"%s;%s;%d;\",\n\n\t\t\t\t\t\twordList.get(i).getWord(), wordList.get(i).getDescribe(), wordList.get(i).getLiczbaznakow());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t}", "@Override\n public void paste() {\n //if the cursor position is not at the start of a new line add the new line symbol before the pasted text\n if (!(keywordTextArea.getDocument().getLength()==0) && !keywordTextArea.getText().endsWith(\"\\n\")) {\n keywordTextArea.append(System.getProperty(\"line.separator\"));\n }\n keywordTextArea.setCaretPosition(keywordTextArea.getDocument().getLength());\n super.paste(); \n }", "public void addWord(Word word);", "public void appendText(String text) {\n\t\ttry {\n\t\t\tDocument doc = getDocument();\n\n\t\t\t// Move the insertion point to the end\n\t\t\tsetCaretPosition(doc.getLength());\n\n\t\t\t// Insert the text\n\t\t\treplaceSelection(text);\n\n\t\t\t// Convert the new end location\n\t\t\t// to view co-ordinates\n\t\t\tRectangle r = modelToView(doc.getLength());\n\n\t\t\t// Finally, scroll so that the new text is visible\n\t\t\tif (r != null) {\n\t\t\t\tscrollRectToVisible(r);\n\t\t\t}\n\t\t} catch (BadLocationException e) {\n\t\t\tSystem.out.println(\"Failed to append text: \" + e);\n\t\t}\n\t}", "public void addWord(String word) {\n root.addWord(word);\n }", "public void appendToSentence(TextView englishText, TextView currentWordText,\n TextView morseText) {\n sentenceArray.add(englishWordContainer.getCurrentWord());\n englishWordContainer.setCurrentWord(\"\");\n englishText.setText(Helpers.concatenateList(sentenceArray));\n currentWordText.setText(\"\");\n\n // add Morse Code for current word to array and reset it\n morseCodeArray.add(morseCodeWordContainer.getMorseCodeWord());\n morseText.setText(Helpers.concatenateList(morseCodeArray));\n morseCodeWordContainer.setMorseCodeWord(\"\");\n }", "public static void editTextArea(String context) {\r\n\t\ttextArea.append(context+\"\\n\");\r\n\t}", "private void endWord() {\n\t\tinWord = false;\n\t\tcontentsField.addEndChar(getContentPosition());\n\t\tcontentsField.addValue(currentElementText);\n\n\t\t// Reset element text for the next word.\n\t\tcurrentElementText = null;\n\t}", "@Override\r\n public void actionPerformed(ActionEvent arg0) {\r\n UserDictionaryProvider provider = SpellChecker.getUserDictionaryProvider();\r\n if (provider != null) {\r\n provider.addWord(word);\r\n }\r\n Dictionary dictionary = SpellChecker.getCurrentDictionary();\r\n dictionary.add(word);\r\n dictionary.trimToSize();\r\n AutoSpellChecker.refresh(jText);\r\n }", "private void updateTextBox(){\n\t\tString tmpWord = game.getTempAnswer().toString();\n\t\tString toTextBox = \"\";\n\t\tStringBuilder sb = new StringBuilder(tmpWord);\n\n\t\t//if a letter is blank in the temp answer make it an underscore. Goes for as long as the word length\n\t\tfor (int i = 0; i<tmpWord.length();i++){\n\t\t\tif(sb.charAt(i) == ' ')\n\t\t\t\tsb.setCharAt(i, '_');\n\t\t}\n\t\ttoTextBox = sb.toString();\n\t\ttextField.setText(toTextBox);\n\t\tlblWord.setText(toTextBox);\n\t}", "void append(String text);", "void append(String text);", "public void addWord(String word) {\n root = put(root, word, 0);\n }", "public void addWord(String word) {\n\t\taddWord(word, root);\n\t}", "public void append(String newText) {\n getLock().getWriteLock();\n try {\n SelectionSetter noChange = new SelectionSetter(SelectionSetter.DO_NOT_CHANGE);\n PTextBuffer buffer = getTextBuffer();\n buffer.replace(noChange, buffer.length(), 0, newText, noChange);\n } finally {\n getLock().relinquishWriteLock();\n }\n }", "public void append(String str) {\n\t\tta.append(str);\n\t\tta.setCaretPosition(ta.getText().length() - 1);\n\t}", "public void addWord(String word) {\n CharNode target = root ;\n for(int i=0; i<word.length(); i++) {\n target = target.insertCharInChildren(word.charAt(i)) ;\n }\n target.end = true ;\n }", "@Override\n\t\tpublic void addText(String txt) {\n\t\t\t\n\t\t}", "public AddWordAction(JTextComponent jText, String word, String label) {\r\n super(label);\r\n this.word = word;\r\n this.jText = jText;\r\n }", "public AddWordAction(JTextComponent jText, String word) {\r\n this(jText, word, Utils.getResource(\"Adicionar ao dicionário\"));\r\n }", "public void insert(String word) {\r\n tree.add(word);\r\n }", "@Override\n\tpublic void append(String str) {\n\t\ttry {\n\t\t\ttextarea.append(BULLET + str + ENDLINE);\n\t\t} catch(NullPointerException e) {\n\t\t\ttextarea.setText(null);\n\t\t}\n\t}", "public static void updateTextArea(String text) {\n\t\tchat.append(text);\n\t\tchat.setCaretPosition(chat.getDocument().getLength());\n\t}", "public void addWord (String word) {\r\n word = word.toUpperCase ();\r\n if (word.length () > 1) {\r\n String s = validateWord (word);\r\n if (!s.equals (\"\")) {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered contained invalid characters\\nInvalid characters are: \" + s, \"Error\",\r\n JOptionPane.ERROR_MESSAGE);\r\n return;\r\n }\r\n checkEasterEgg (word);\r\n words.add (word);\r\n Components.wordList.getContents ().addElement (word);\r\n } else {\r\n JOptionPane.showMessageDialog (null, \"The word you have entered does not meet the minimum requirement length of 2\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "public void writeClue()\r\n {\n\r\n String s = JOptionPane.showInputDialog(\"Please enter your clue.\",\r\n selectedWord.getClue());\r\n //Word w = selectedSquare.getWord();\r\n selectedWord.setClue(s);\r\n }", "private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}", "public void setCurrent_word(String current_word){\n\t\tthis.current_word = current_word;\n\t}", "@Override\r\n\t\tpublic void focusLost(FocusEvent e) {\n\t\t\tString content = tt.wordTextPane.getText();\r\n\t\t\ttt.setContent(content);\r\n\t\t\ttt.dealWith(content);\r\n\t\t}", "private void addWordHelper( String word, int pos, TrieNode curNode )\n\t{\n\t\t//Check to see if the node has been occupied yet\n\t\tif( curNode.getLetters()[ (int)word.charAt(pos) - 97 ] == null )\n\t\t\t//If we are at the last character of the word\n\t\t\tif( pos >= word.length() - 1 )\n\t\t\t\t//Make sure the isWord property is set to true\n\t\t\t\tcurNode.setLetter( word.charAt( pos ), true );\n\t\t\telse\n\t\t\t\tcurNode.setLetter( word.charAt( pos ), false );\n\t\t\n\t\t//If it hasn't reached the last letter yet\n\t\tif( !( pos >= word.length() - 1 ) )\n\t\t\t//Keep on adding the word\n\t\t\taddWordHelper( word, pos + 1, curNode.getLetters()[ (int)word.charAt( pos ) - 97 ] );\n\t}", "private void addCustomWords() {\r\n\r\n }", "public void addPos(String word, IPosition pos);", "public void save() {\n MainActivity.db.updateWord(this);\n }", "public void addContent(String msg) {\n\t\tthis.textArea.append(msg + \"\\n\");\r\n\t}", "public void insert(String word) {\n this.root.insert(word);\n }", "void addHadithText(Object newHadithText);", "@Override\n\t\t\tpublic void run() {\n\t\t\t\ttextArea.setText(textArea.getText()+\"\\n\"+s);\n\t\t\t}", "public void appendChatBox(String s){\r\n\t\tsynchronized(msgToAppend){ // synchronized to maintain thread-safety\r\n\t\t\tmsgToAppend.append(s);\r\n\t\t\ttextArea.append(msgToAppend.toString() + \"\\n\");\r\n\t\t\tmsgToAppend.setLength(0);\r\n\t\t}\r\n\t}", "public void insert(String word) {\n if (word == null) {\n return;\n }\n if (value == null) {\n value = new ArrayList<>();\n }\n value.add(word);\n }", "void addWordToDoc(int doc,VocabWord word);", "public void addTag(ActionEvent e) {\n\t\tStringBuilder finalText = new StringBuilder();\n\t\tinputText = new StringBuilder();\n\t\tparameters = outputArea.getText().split(\", \");\n\t\t// Get InputArea Text\n\t\tinputText.append(MainController.oldInput);\n\t\tString[] lines = inputText.toString().split(\"\\\\n\");\n\t\t// For each line of inputText...\n\t\tfor (int i = 0; i < lines.length; i++) {\n\t\t\tfinalText.append(lines[i]);\n\t\t\tif (i == MainController.caretValue) {\n\t\t\t\tswitch(active) {\n\t\t\t\t\tcase \"character\": finalText.append(addCharacter()); break;\n\t\t\t\t\tcase \"mood\": finalText.append(addMood()); break;\n\t\t\t\t\tcase \"animation\": finalText.append(addAnimation()); break;\n\t\t\t\t\tcase \"background\": finalText.append(addBackground()); break;\n\t\t\t\t\tcase \"effect\": finalText.append(addEffect()); break;\n\t\t\t\t\tcase \"music\": finalText.append(addMusic()); break;\n\t\t\t\t\tcase \"display\": finalText.append(addDisplay()); break;\n\t\t\t\t\tcase \"options\": finalText.append(addOptions()); break;\n\t\t\t\t\tcase \"void\": finalText.append(addVoid()); break;\n\t\t\t\t\tcase \"end\": finalText.append(addEnd()); break;\n\t\t\t\t\tcase \"title\":\n\t\t\t\t\t\tfinalText.append(addTitle(finalText) + \"\\n\");\n\t\t\t\t\t\tfinalText.append(\"|endTitle:\" + parameters[0]);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"goto\": finalText.append(addGoto()); break;\n\t\t\t\t\tcase \"extra\": finalText.append(addExtra()); break;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinalText.append(\"\\n\");\n\n\t\t}\n\n\t\tif (MainController.caretValue == lines.length) {\n\t\t\tswitch(active) {\n\t\t\t\tcase \"character\": finalText.append(addCharacter()); break;\n\t\t\t\tcase \"mood\": finalText.append(addMood()); break;\n\t\t\t\tcase \"animation\": finalText.append(addAnimation()); break;\n\t\t\t\tcase \"background\": finalText.append(addBackground()); break;\n\t\t\t\tcase \"effect\": finalText.append(addEffect()); break;\n\t\t\t\tcase \"music\": finalText.append(addMusic()); break;\n\t\t\t\tcase \"display\": finalText.append(addDisplay()); break;\n\t\t\t\tcase \"options\": finalText.append(addOptions()); break;\n\t\t\t\tcase \"void\": finalText.append(addVoid()); break;\n\t\t\t\tcase \"end\": finalText.append(addEnd()); break;\n\t\t\t\tcase \"goto\": finalText.append(addGoto()); break;\n\t\t\t\tcase \"extra\": finalText.append(addExtra()); break;\n\t\t\t}\n\t\t}\n\n\t\tif (active == \"title\" && MainController.caretValue >= lines.length) {\n\t\t\tfinalText.append(addTitle(finalText) + \"\\n\");\n\t\t\tfinalText.append(\"|endTitle:\" + parameters[0]);\n\t\t}\n\n\t\t//\t Append the current line to finalText.\n\t\t//\t If the current line == the caret's paragraph value, go through the switch\n\t\t// Append to InputArea\n\t\tMainController.oldInput = finalText.toString();\n\t\tchangeView(e);\n\t}", "public void addText(String str) {\r\n\t\tdialog.setText(dialog.getText()+str);\r\n\t}", "public boolean addWord(String word) {\n return false;\n }", "public void addText(String text) {\n\t\tthis.text = text;\n\t}", "public void append(Word d){\n\t\tWordNode wn = new WordNode(d.words);\n\t\tlast.next = wn;\n\t\tlast = wn;\n\t\tlength++;\n\t}", "private void update() {\n\t\twhile(words.size()<length) {\n\t\t\twords.add(new Word());\n\t\t}\n\t}", "public void putWord(String word) {\n if(index < words.length) {\n words[index] = word;\n }\n index++;\n }", "public void insertAtCurrentPos(String part)\n {\n StringBuffer newLine = new StringBuffer( this.getLine() );\n\n newLine.insert( this.getPos(), part + ' ' );\n this.line = newLine.toString();\n }", "public void insert(String word) { \n char[] w = word.toCharArray(); \n insert(root, w, 0); \n }", "public void addWord(String word) {\n trie.insert(word);\n }", "private void newWord() {\r\n defaultState();\r\n int random_id_String = 0;\r\n int random_id_Char[] = new int[4];\r\n Random random = new Random();\r\n if (wordNumber == WordCollection.NO_OF_WORDS) return;//quit if all word list is complete;\r\n wordNumber++;\r\n //in case the word has already occured\r\n while (currentWord.equals(\"\")) {\r\n random_id_String = random.nextInt(WordCollection.NO_OF_WORDS);\r\n currentWord = tempWord[random_id_String];\r\n }\r\n currentWord.toUpperCase();\r\n tempWord[random_id_String] = \"\";//so that this word will not be used again in the game session\r\n //generates 4 random nums each for each btn char\r\n for (int i = 0; i < 4; i++) {\r\n random_id_Char[i] = (random.nextInt(4));\r\n for (int j = i - 1; j >= 0; j--) {\r\n if (random_id_Char[i] == random_id_Char[j]) i--;\r\n }\r\n }\r\n\r\n btn1.setText((currentWord.charAt(random_id_Char[0]) + \"\").toUpperCase());\r\n btn2.setText((currentWord.charAt(random_id_Char[1]) + \"\").toUpperCase());\r\n btn3.setText((currentWord.charAt(random_id_Char[2]) + \"\").toUpperCase());\r\n btn4.setText((currentWord.charAt(random_id_Char[3]) + \"\").toUpperCase());\r\n }", "public void getNewWord(JTextField textField, JTextField clue) {\n\t\ttextField.setText(\"\");\n\t\tclue.setText(\"\");\n\t for(Letter l : letters) l.setStatus(false);\n\t letters.clear();\n\t setWord();\n\t for(int i = 0; i < guessedLetter.length; i++)\n\t \tguessedLetter[i] = false;\n\t}", "public void add(String word) {\n\t\twordList.add(word);\n\t\t// TODO Add your code here\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n String text = tweetInsertTextBox.getText();\n if (text != null && text.length() > 0) {\n jTextAreaTweets.setText(jTextAreaTweets.getText() + text + \"\\n\");\n tweetInsertTextBox.setText(\"\");\n jTextAreaTweets.setRows(jTextAreaTweets.getLineCount());\n tweetList.add(text);\n //f1.validate();\n }\n }", "public void addToTextbox(String input) {\n\t\tlabel.setText(input.trim());\n\t}", "public void populateWord(String word) {\n\t\tthis.add(word);\n\t}", "public void insert(String word) {\n insert(root, word, new Object(), 0);\n }", "public void setWord(String newWord)\n\t{\n\t\tword = newWord;\n\t}", "public static void addTextToLog(String str, TextArea txtAreaMsg) {\n\t\tPlatform.runLater(() -> txtAreaMsg.appendText(str));\n\t}", "@Override\n public void insert(String word) {\n root = insertIterative(word, root);\n }", "public void addWord(String word) {\n maxLength = Math.max(maxLength, word.length());\n\n TrieNode temp = root;\n for (int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n if (temp.children[c - 'a'] == null) {\n temp.children[c - 'a'] = new TrieNode(c);\n }\n temp = temp.children[c - 'a'];\n }\n temp.isWord = true;\n }", "public void addWord(String word) {\n dataStructure.put(word, \"\");\n }", "private void append(String text) {\n // Reset counter if starts with a newline. only from formats above, not in natural text\n if (text.startsWith(\"\\n\")) {\n mWidth = 0;\n }\n\n // Don't accumulate long runs of empty spaces\n if (text.equals(\" \") && (mAccum.length() == 0 || StringUtil.in(\n mAccum.substring(mAccum.length() - 1), \" \", \"\\n\"))) {\n return;\n }\n\n // Won't fit, needs to wrap\n if (text.length() + mWidth > mMaxWidth) {\n String[] words = text.split(\"\\\\s+\");\n\n for (int i = 0; i < words.length; i++) {\n String word = words[i];\n boolean last = i == words.length - 1;\n\n // Insert a space if not the last word\n if (!last) {\n word = word + \" \";\n }\n\n // Wrap and reset counter\n if (word.length() + mWidth > mMaxWidth) {\n mAccum.append(\"\\n\").append(word);\n mWidth = word.length();\n } else {\n mAccum.append(word);\n mWidth += word.length();\n }\n }\n } else {\n // Fits as is, without need to wrap text\n mAccum.append(text);\n mWidth += text.length();\n }\n }", "public void addTextArea(String text) throws BadLocationException {\n\t\tcurrentTextArea = new JTextArea(text == null ? \"\" : text);\n AbstractDocument document = (AbstractDocument) currentTextArea.getDocument();\n document.setDocumentFilter(new Filter());\n\t\tcurrentTextArea.setBorder(BorderFactory.createLineBorder(Color.white));\n\t\tcurrentTextArea.setSize(750,2);\n\t\tcontainer.add(currentTextArea);\n\t\tcurrentTextArea.requestFocusInWindow();\n\t\tcurrentTextArea.setCaretPosition(currentTextArea.getDocument().getLength());\n\n\t\tcurrentTextArea.addKeyListener(new java.awt.event.KeyAdapter() {\n\t\t\tpublic void keyPressed(java.awt.event.KeyEvent evt) {\n\t\t\t\ttry {\n\t\t\t\t\tjTextArea1WriteCommand(evt);\n\t\t\t\t} catch (BadLocationException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\trefreshView();\n\t}", "public void append(String str, String sender) {\n\t\tchatView.appendText(sender + \":\" + \"\\n\");\n\t\tchatView.appendText(str + \"\\n\\n\");\n\t\tchatView.selectPositionCaret(chatView.getText().length()-1);\n\t\tchatBox.setText(\"\");\n\t}", "private void addModifyButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_addModifyButtonMouseClicked\n String inputWord = this.searchField.getText();\n String inputDefinition = this.getDefinitionTextArea().getText();\n WordDefinition wordToModifyAdd = new WordDefinition(inputWord, inputDefinition);\n \n // find the index of the matching tree\n char firstLetterOfWord = inputWord.toUpperCase().charAt(0);\n int index = -1;\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n if(lexiNodeTrees.get(i).getCurrentCharacter() == firstLetterOfWord)\n {\n index = i;\n i = lexiNodeTrees.size();\n }\n }\n \n // if index was not found, we have to create a new tree\n if(index == -1)\n {\n lexiNodeTrees.add(new LexiNode(firstLetterOfWord));\n index = lexiNodeTrees.size() - 1;\n \n // only possibility here is to add the word since the tree was just craeted\n if(!lexiNodeTrees.get(index).addWord( wordToModifyAdd ))\n {\n // if there was an error adding the word \n JOptionPane.showMessageDialog(this, \"ERREUR: Le mot n'a pas pu \"\n + \"être modifié/ajouté\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n \n else // if add was successful\n {\n JOptionPane.showMessageDialog(this, \"Le mot a été ajouté!\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n }\n \n else // if index was found, we can modify/add the definition\n {\n if( !lexiNodeTrees.get(index).modifyWord( wordToModifyAdd ) )\n {\n System.out.println(\"hi\");\n // if there was an error modifying / adding the word \n JOptionPane.showMessageDialog(this, \"ERREUR: Le mot n'a pas pu \"\n + \"être modifié/ajouté\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n \n else // if modification was successful\n {\n JOptionPane.showMessageDialog(this, \"Le mot a été modifié!\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n }\n \n // refresh the list\n refreshAllWordsList();\n }", "public void addWord(String word) {\n TrieNode curr = root;\n for (char c : word.toCharArray()) {\n curr = curr.chars.computeIfAbsent(c, (k) -> new TrieNode());\n\n }\n curr.isWord = true;\n }", "public void insertStaticText(String text){\n if(lastText != null){\n lastText.clear();\n }\n lastText = new TextBuilder(text);\n lastText.build();\n }", "@Override\r\n\tpublic void keyReleased(KeyEvent e) {\n\t\tString text = area.getText();\r\n\t\tString words[]= text.split(\"\\\\s\");\r\n\t\tl.setText(\"Words:\"+words.length+\"Characters:\"+text.length());\r\n\t}", "public void addWord(String word) {\n TrieNode cur = root;\n for(char c : word.toCharArray()) {\n if(cur.next[c-'a'] == null) {\n cur.next[c-'a'] = new TrieNode(c);\n }\n cur = cur.next[c-'a'];\n }\n cur.isWord = true;\n }", "public void addTextAreaValue(String str){\n\t\tcenterPanel.addTextAreaValue(str);\n\t}", "public void add(String word, String file, int position) {\n\t \taddHelper(word, file, position);\n\t}", "private void changeCurrentValue()\n {\n String theText = textBox.toString();\n\n // find the first newline\n int index = theText.indexOf(\"\\n\");\n assert index != -1;\n\n // insert new stuff\n StringBuilder newText = new StringBuilder();\n newText.append(currentTag);\n newText.append(\": \");\n newText.append(currentValue);\n newText.append(\"\\n\");\n\n textBox.replaceTextRange(0, index, newText.toString());\n }", "public void run () {\n\t\t\t\t//This is the method that gets called everytime the GUI needs to be updated.\n\t\t\t\t\n\t\t\t\tchatWindow.append(text);\n\t\t\t\t\n\t\t\t\t\n\t\t\t}", "public void insert(String word) {\n Entry tempRoot = root;\n for(int i=0; i<word.length(); i++){\n char ch = word.charAt(i);\n Entry childNode = tempRoot.getChildNode(ch);\n if(childNode == null){\n tempRoot.setChildNode(new Entry(), ch);\n }\n tempRoot = tempRoot.getChildNode(ch);\n }\n\n tempRoot.setIsWord(true);\n }", "public void addText(String text) {\n this.historyTextLog.append(text);\n }", "public void displayWord(String word) {\n\t\t// first make sure there isn't an existing label - if there is, remove it\n\t\tGObject checkForOldLabel = getElementAt(guessPosX,guessPosY);\n\t\tif (checkForOldLabel != null) {\n\t\t\tremove(checkForOldLabel);\n\t\t}\n\t\t// then re-add the label for the updated \"guessed\" word\n\t\tguessSoFar = new GLabel(word);\n\t\tguessPosX = scaffoldStart.getX()/2;\n\t\tguessPosY = scaffoldStart.getY()+scaffoldStart.getY()/10;\n\t\tguessSoFar.setLocation(guessPosX,guessPosY);\n\t\tguessSoFar.setFont(new Font(\"Arial\",Font.BOLD, 24));\n\t\tadd(guessSoFar);\n\t}", "private static void appendExistingNode(String[] allWords, TrieNode existingNode, String currentStr,\n\t\t\tint currentWordIndex) {\n\t\tIndexes currentStrNodeIndexes = new Indexes(0, 0, 0);\n\t\tcurrentStrNodeIndexes.setWordIndex(currentWordIndex);\n\t\tcurrentStrNodeIndexes.setStartIndex(0);\n\t\tcurrentStrNodeIndexes.setEndIndex(currentStr.length() - 1);\n\n\t\tTrieNode currentStrNode = new TrieNode(null, null, null);\n\t\tcurrentStrNode.setSubstr(currentStrNodeIndexes);\n\n\t\t// connect currentStrNode as sibling as oldNodeChild\n\t\texistingNode.setSibling(currentStrNode);\n\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsave_word();\n\t\t\t}", "public void add(T word);", "public String getCurrent_word(){\n\t\treturn current_word;\n\t}", "public void removeWord () {\r\n int index = Components.wordList.getSelectedIndex ();\r\n if (index >= 0) {\r\n String word = (String) Components.wordList.getSelectedValue ();\r\n words.remove (word);\r\n Components.wordList.getContents ().remove (index);\r\n Components.wordList.setSelectedIndex ((index > 0) ? index - 1 : index);\r\n }\r\n }", "public void addWord(String word) {\n char[] chs = word.toCharArray();\n TreeNode cur = root;\n for (int i = 0; i < chs.length; i++) {\n int ind = chs[i] - 'a';\n if (cur.map[ind] == null) {\n cur.map[ind] = new TreeNode();\n }\n cur = cur.map[ind];\n }\n cur.end = true;\n }", "@Override\n public void add_content() {\n Scanner _thisText = new Scanner(System.in);\n System.out.println(\"Enter Ad text:\");\n _adContent = _thisText.nextLine();\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for(int i = 0; i < word.length(); i++) {\n char c = word.charAt(i);\n TrieNode node = cur.children.get(c);\n if(node == null) {\n node = new TrieNode();\n cur.children.put(c, node);\n }\n cur = node;\n }\n cur.isEnd = true;\n }", "public void addWord(String word) {\n TrieNode cur = root;\n for (int i=0; i<word.length(); i++) {\n int pos = word.charAt(i) - 'a';\n if (cur.next[pos] == null) {\n cur.next[pos] = new TrieNode();\n }\n cur = cur.next[pos];\n }\n cur.isWord = true;\n }", "public void addText(String text) {\n\t\tNodeList frameList = maNoteElement.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"frame\");\n\t\tif (frameList.getLength() > 0) {\n\t\t\tDrawFrameElement frame = (DrawFrameElement) frameList.item(0);\n\t\t\tNodeList textBoxList = frame.getElementsByTagNameNS(OdfDocumentNamespace.DRAW.getUri(), \"text-box\");\n\t\t\tif (textBoxList.getLength() > 0) {\n\t\t\t\tDrawTextBoxElement textBox = (DrawTextBoxElement) textBoxList.item(0);\n\t\t\t\tTextPElement newPara = textBox.newTextPElement();\n\t\t\t\tnewPara.setTextContent(text);\n\t\t\t}\n\t\t}\n\t}", "public void appendToText(String text) {\n if(this.text == null)\n this.text = new StringBuilder();\n if(StringUtils.hasLength(text))\n this.text.append(text);\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tdisplayArea.append(messageToDisplay);\r\n\t\t\t\tdisplayArea.setCaretPosition(displayArea.getText().length());\t//把文本区域中的输入光标定位到文本区域中最后一个字符之后\r\n\t\t\t}", "public void addTextAfterHelp(String _text){\r\n\t\tthis.afterTextHelp=_text;\r\n\t}", "void updateTextArea(final String text) {\r\n\t\tSwingUtilities.invokeLater(new Runnable() {\r\n\t\t\tpublic void run() {\r\n\t\t\t\tJCoresConsole.this.textArea.append(text);\r\n\t\t\t}\r\n\t\t});\r\n\t}", "public void add(Word w)\n {\n words = words + w.getWords();\n syllables = syllables + w.getSyllables();\n sentences = sentences + w.getSentences();\n }", "public void insert(String word) {\n\t\tcur = root;\n\t\tfor (char c : word.toCharArray()) {\n\t\t\tif (cur.children[c - 'a'] == null) {\n\t\t\t\tcur.children[c - 'a'] = new TrieNode(c);\n\t\t\t}\n\t\t\tcur = cur.children[c - 'a'];\n\t\t}\n\t\tcur.isWord = true;\n\t}", "public void addRef(String word) {\n addRef(word.toCharArray()); }", "public void appendToEnd(String str, Editor editor, SemiEvent enterEvent) {\n editor.getDocument().insertString(enterEvent.getCurrentLineEnd(), str);\n editor.getCaretModel().moveToOffset(enterEvent.getCurrentLineEnd() + str.length());\n EditorModificationUtil.scrollToCaret(editor);\n editor.getSelectionModel().removeSelection();\n }", "public void insert(String word) {\n TrieTree point = root;\n for(int i = 0; i < word.length(); i++){\n char ch = word.charAt(i);\n if(point.getChild(ch - 'a') == null){\n point.setChild(ch - 'a', ch);\n }\n point = point.getChild(ch - 'a');\n }\n point.setIsWord();\n }", "public void addWord(String word) {\n if (word !=null && word.length() > 0) {\n TrieNode t = this.root;\n for (int i = 0; i < word.length(); i++) {\n int offset = word.charAt(i) - 'a';\n if (t.children[offset] == null) {\n t.children[offset] = new TrieNode();\n }\n t = t.children[offset];\n if (i == word.length() - 1) {\n t.endWithWord = true;\n }\n }\n }\n }", "public void addWord(String word) {\n // Write your code here\n TrieNode now = root;\n for(int i = 0; i < word.length(); i++) {\n Character c = word.charAt(i);\n if (!now.children.containsKey(c)) {\n now.children.put(c, new TrieNode());\n }\n now = now.children.get(c);\n }\n now.hasWord = true;\n }", "public void insert(String word) {\n Node current = root;\n for (int i = 0; i < word.length(); ++i) {\n int c = word.charAt(i) - 'a';\n if (current.children[c] == null)\n current.children[c] = new Node(c);\n current = current.children[c];\n }\n current.isWord = true;\n }" ]
[ "0.6938807", "0.68860644", "0.6660949", "0.6580735", "0.6565503", "0.6397553", "0.63102615", "0.6272854", "0.62564343", "0.61790955", "0.6161846", "0.6131643", "0.611657", "0.611657", "0.61050403", "0.60814095", "0.6068238", "0.6065651", "0.6064534", "0.6060476", "0.60535234", "0.6037241", "0.6019461", "0.60099673", "0.6009731", "0.59983635", "0.5992882", "0.5975931", "0.5974363", "0.59530264", "0.5932906", "0.5847174", "0.5845039", "0.5838589", "0.5831075", "0.58230627", "0.5819126", "0.5803134", "0.57809246", "0.5772683", "0.57611704", "0.5743811", "0.5743437", "0.572237", "0.57221484", "0.57170683", "0.5712859", "0.57087326", "0.5708633", "0.5702838", "0.568553", "0.56801367", "0.5672241", "0.566895", "0.5653966", "0.5650826", "0.5645484", "0.56288975", "0.562657", "0.56152683", "0.56151706", "0.5605872", "0.56003517", "0.55869573", "0.5576913", "0.5569722", "0.5565922", "0.5556371", "0.55511165", "0.55481267", "0.55427146", "0.55423343", "0.55396116", "0.5538316", "0.5534055", "0.5518386", "0.5517467", "0.5514591", "0.5513032", "0.5508872", "0.550212", "0.5499204", "0.5497745", "0.5497583", "0.5493599", "0.5490685", "0.5489403", "0.54865694", "0.54859877", "0.5484129", "0.54654515", "0.5464279", "0.5463512", "0.5456753", "0.54547465", "0.5454435", "0.5452223", "0.54502666", "0.5438345", "0.5434754" ]
0.5741203
43
/ Unhighlights words that have be added, ignored, or replaced by user
void unhighlight(SpellCheckWord word) { Highlighter highlighter = getHighlighter(); Highlighter.Highlight[] highlights = highlighter.getHighlights(); for (int i = 0; i < highlights.length; i++) { if(highlights[i].getStartOffset() == word.startLocation) { highlighter.removeHighlight(highlights[i]); word.missingWord = false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeAllHighlights() {}", "public void removeHighlight() {\n if (highlightWord == null) {\r\n return;\r\n }\r\n \r\n for (int i = 0; i < highlightWord.length(); i++) {\r\n if (hightlightDir == Ranker.RIGHT) {\r\n cells[highlightX][highlightY + i].highlight((char) 0);\r\n } else {\r\n cells[highlightX + i][highlightY].highlight((char) 0);\r\n }\r\n }\r\n repaint();\r\n }", "public void removeHighlight(Object tag) {}", "@Override\n public void removeHighlight()\n {\n }", "private void unhighlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.BLACK, new TicksTiming(0), new TicksTiming(0));\r\n\r\n\t }", "public void removeWord()\n {\n \tlastRow = -1;\n \tlastColumn = -1;\n \t\n \tguess = \"\";\n \tguessWordArea.setText( \"\" );\n \t\n \t//Reset the letters that have been used for a word\n \tused = new boolean[BOARD_SIZE][BOARD_SIZE];\n \t//Change the background colour of all of the buttons in the grid\n \tfor( int i = 0; i < BOARD_SIZE; i++ )\n \t{\n \t\tfor( int j = 0; j < BOARD_SIZE; j++ )\n \t\t{\n \t\t\tgridButtons[i][j].setBackground( restart.getBackground() ); //The restart button will always have the default background\n \t\t}\n \t}\n }", "public void unHighLight() {\r\n\t\tAcideFileEditorManager fileEditorManager = AcideMainWindow\r\n\t\t\t\t.getInstance().getFileEditorManager();\r\n\t\t// checks if the Asserted database panel is open\r\n\t\tif (AcideMainWindow.getInstance().isAssertedDatabaseOpened()) {\r\n\t\t\tAcideAssertedDatabasePanel assertedDatabase = AcideMainWindow\r\n\t\t\t\t\t.getInstance().getAssertedDatabasePanel();\r\n\t\t\t// checks if the Asserted database panel is showing\r\n\t\t\tif (assertedDatabase.isShowing())\r\n\t\t\t\tassertedDatabase.repaint();\r\n\t\t}\r\n\t\t// Iterates the lines on the lines map\r\n\t\tfor (String f : _fileLines.keySet()) {\r\n\t\t\t// Searches for the file in the file editor manager\r\n\t\t\tfor (int i = 0; i < fileEditorManager.getNumberOfFileEditorPanels(); i++) {\r\n\t\t\t\tif (fileEditorManager.getFileEditorPanelAt(i).getAbsolutePath() != null\r\n\t\t\t\t\t\t&& new File(fileEditorManager.getFileEditorPanelAt(i)\r\n\t\t\t\t\t\t\t\t.getAbsolutePath()).equals(new File(f))) {\r\n\t\t\t\t\t// Unhighlights the lines\r\n\t\t\t\t\tAcideTextComponent text = fileEditorManager\r\n\t\t\t\t\t\t\t.getFileEditorPanelAt(i).getActiveTextEditionArea();\r\n\r\n\t\t\t\t\tfor (Highlighter.Highlight h : text.getHighlighter()\r\n\t\t\t\t\t\t\t.getHighlights())\r\n\t\t\t\t\t\ttext.getHighlighter().removeHighlight(h);\r\n\t\t\t\t\ttext.repaint();\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "public void removeHighlights(JTextComponent textComp) {\r\n Highlighter hilite = textComp.getHighlighter();\r\n Highlighter.Highlight[] hilites = hilite.getHighlights();\r\n \r\n for (int i=0; i<hilites.length; i++) {\r\n if (hilites[i].getPainter() instanceof MyHighlightPainter) {\r\n hilite.removeHighlight(hilites[i]);\r\n }\r\n }\r\n }", "private void removeHighlights(FilterBypass fb, int left, int right) {\n ((StyledDocument)fb.getDocument()).setCharacterAttributes(left, (right-left), attributeScheme[11], true);\n }", "public void removeAllHighlights() {\n while (!highlights.isEmpty()) {\n HighlightImpl hElem = highlights.getElem(0);\n Rectangle highlightBounds = getBoundsByHighlight(hElem);\n highlights.remove(0);\n repaintComponent(highlightBounds);\n }\n }", "public void removeHighlights(String highlighterName, int beginOffset, int endOffset) {\n getLock().getWriteLock();\n try {\n List<PHighlight> removeList = highlights.getNamedHighlightsOverlapping(highlighterName, beginOffset, endOffset);\n IdentityHashMap<PAnchor, Object> deadAnchors = new IdentityHashMap<PAnchor, Object>();\n for (PHighlight highlight : removeList) {\n highlight.collectAnchors(deadAnchors);\n highlights.remove(highlight);\n }\n getTextBuffer().getAnchorSet().removeAll(deadAnchors);\n if (removeList.size() == 1) {\n repaintHighlight(removeList.get(0));\n } else if (removeList.size() > 1) {\n repaint();\n }\n } finally {\n getLock().relinquishWriteLock();\n }\n }", "public void highLightWords(){\n }", "public void removeWord () {\r\n int index = Components.wordList.getSelectedIndex ();\r\n if (index >= 0) {\r\n String word = (String) Components.wordList.getSelectedValue ();\r\n words.remove (word);\r\n Components.wordList.getContents ().remove (index);\r\n Components.wordList.setSelectedIndex ((index > 0) ? index - 1 : index);\r\n }\r\n }", "public void clear() {\n\t\thighlightsByToken.clear();\n\t}", "void removeHighlighted(int projectID, int userId, UserType userType);", "public void removeWord(int id);", "void removeHadithText(Object oldHadithText);", "public void deleteSelectedWord()\r\n {\n ArrayList al = crossword.getWords();\r\n al.remove(selectedWord);\r\n repopulateWords();\r\n }", "private void performHighlight() {\n final String wordToHighlight;\n if (autoHighlight && !editor.getSelectionModel().hasSelection()) {\n int currentOffset = editor.getCaretModel().getOffset();\n wordToHighlight = BWACUtils.extractWordFrom(editor.getDocument().getText(), currentOffset);\n } else {\n wordToHighlight = null;\n }\n\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n buildHighlighters(wordToHighlight);\n }\n });\n }", "private void clearHighlightAfterMove() {\n //clear start\n getTileAt(start).clear();\n for (Move m : possibleMoves) {\n getTileAt(m.getDestination()).clear();\n }\n }", "public void repopulateWords()\r\n {\n blankSquares();\r\n\r\n //repopulate words\r\n ArrayList al = crossword.getWords();\r\n for (int i = 0; i < al.size(); i++)\r\n {\r\n Word w = (Word) al.get(i);\r\n ArrayList letters = w.getLetters();\r\n\r\n // Lay out the squares, letter by letter, setting the appropriate properties\r\n if (w.getWordDirection() == Word.ACROSS)\r\n {\r\n for (int j = 0; j < letters.size(); j++)\r\n {\r\n Square s = findSquare(w.getY(), w.getX() + j);\r\n if (s.getLetter() == \" \" || s.getLetter() == \"*\" ||\r\n s.getLetter() == \"\")\r\n {\r\n String let = (String) letters.get(j);\r\n if (let == \"*\")\r\n {\r\n let = \" \";\r\n }\r\n s.setLetter(let);\r\n }\r\n\r\n s.setBackground(Color.WHITE);\r\n s.setBorder(BorderFactory.createLineBorder(Color.BLACK,\r\n 1));\r\n\r\n if (s.isAnyWordSelected())\r\n {\r\n s.setBackground(Color.PINK);\r\n s.setResetColour(Color.PINK);\r\n }\r\n //place the clue number\r\n if (j == 0) //ie. first square of word\r\n {\r\n s.setClueNumber(w.getClueIndex());\r\n }\r\n if (s == selectedSquare)\r\n {\r\n s.setBackground(Color.RED);\r\n s.setResetColour(Color.RED);\r\n }\r\n\r\n }\r\n }\r\n else if (w.getWordDirection() == Word.DOWN)\r\n {\r\n\r\n for (int j = 0; j < letters.size(); j++)\r\n {\r\n Square s = findSquare(w.getY() + j, w.getX());\r\n if (s.getLetter() == \" \" || s.getLetter() == \"*\" ||\r\n s.getLetter() == \"\")\r\n {\r\n String let = (String) letters.get(j);\r\n\r\n if (let == \"*\")\r\n {\r\n let = \" \";\r\n }\r\n s.setLetter(let);\r\n }\r\n s.setBackground(Color.WHITE);\r\n s.setBorder(BorderFactory.createLineBorder(Color.BLACK,\r\n 1));\r\n\r\n if (s.isAnyWordSelected())\r\n {\r\n s.setBackground(Color.PINK);\r\n s.setResetColour(Color.PINK);\r\n }\r\n\r\n //place the clue number\r\n if (j == 0) //ie. first square of word\r\n {\r\n s.setClueNumber(w.getClueIndex());\r\n }\r\n if (s == selectedSquare)\r\n {\r\n s.setBackground(Color.RED);\r\n s.setResetColour(Color.RED);\r\n }\r\n }\r\n }\r\n }\r\n //dissociate any blank squares from legacy word relationships\r\n dissociateSquares();\r\n validate();\r\n }", "@ZAttr(id=1073)\n public void unsetPrefSpellIgnoreWord() throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPrefSpellIgnoreWord, \"\");\n getProvisioning().modifyAttrs(this, attrs);\n }", "void setWordGuessed( String word )\n\t{\n\t\tfor( int i = 0; i < entry.getLinkedWords().size(); i++ )\n\t\t\tif( entry.getLinkedWords().elementAt(i).equals(word) )\n\t\t\t{\n\t\t\t\twordGuessed[i] = true;\n\t\t\t\twPanel.showWord(i);\n\t\t\t}\n\t}", "public void reset() {\n\t\tfor (int i = 0; i < markedElements.size(); i++) {\n\t\t\tif (markedElements.get(i) instanceof Word) {\n\t\t\t\tWord word = (Word) markedElements.get(i);\n\t\t\t\teditor.setCaretPosition(word.getEndPosition() + 1);\n\t\t\t\tint start = word.getStartPosition();\n\t\t\t\tint end = word.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof FunctionWord) {\n\t\t\t\tFunctionWord fword = (FunctionWord) markedElements.get(i);\n\t\t\t//\tif(fword.getWord().getEndPosition()!= fword.getEndPosition()) {\n\t\t\t\t\t// fword ist teil eines gr��eren Wortes-> Endposition als caretposition verwenden\n\t\t\t//\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t//\telse {\n\t\t\t\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\t//\t}\n\t\t\t\tint start = fword.getStartPosition();\n\t\t\t\tint end = fword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof ConstitutiveWord) {\n\t\t\t\tConstitutiveWord cword = (ConstitutiveWord) markedElements\n\t\t\t\t\t\t.get(i);\n\t\t\t\teditor.setCaretPosition(cword.getEndPosition() + 1);\n\t\t\t\tint start = cword.getStartPosition();\n\t\t\t\tint end = cword.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t} else if (markedElements.get(i) instanceof IllocutionUnit) {\n\t\t\t\tIllocutionUnit iu = (IllocutionUnit) markedElements.get(i);\n\t\t\t\tfor (int j = 0; j < iu.getTokens().size(); j++) {\n\t\t\t\t\tToken token = (Token) iu.getTokens().get(j);\n\t\t\t\t\tint start = token.getStartPosition();\n\t\t\t\t\tint end = token.getEndPosition();\n\t\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN,\n\t\t\t\t\t\t\ttrue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tmarkedElements.clear();\n\t\tdesignText(Model.getIllocutionUnitRoots());\n\t}", "String highlightTerm(String term);", "void unsetLegs();", "private void addCustomWords() {\r\n\r\n }", "public static void resetAllHighlight(){\n\t\tfor (Case[] casesLignes: cases){\n\t\t\tfor(Case casePlateau: casesLignes){\n\t\t\t\tcasePlateau.resetHighlight();\n\t\t\t}\n\t\t}\n\t}", "public String remove_stop_words(String text) {\n\t\tfor (String w : stop_words) {\n\t\t\ttext = text.replaceAll(\"\\\\s*\\\\b\" + w + \"\\\\b\\\\s*\", \" \");\n\t\t}\n\n\t\treturn text;\n\t}", "void deleteUnusedTags();", "private static void OnDeleteNextWord(Object sender, ExecutedRoutedEventArgs args)\r\n { \r\n TextEditor This = TextEditor._GetTextEditor(sender); \r\n\r\n if (This == null || !This._IsEnabled || This.IsReadOnly) \r\n {\r\n return;\r\n }\r\n\r\n if (This.Selection.IsTableCellRange)\r\n { \r\n return; \r\n }\r\n\r\n TextEditorTyping._FlushPendingInputItems(This);\r\n\r\n ITextPointer wordBoundary = This.Selection.End.CreatePointer();\r\n\r\n // When selection is not empty the command deletes selected content\r\n // without extending it to the word bopundary. For empty selection \r\n // the command deletes a content from caret position to \r\n // nearest word boundary in a given direction\r\n if (This.Selection.IsEmpty) \r\n {\r\n TextPointerBase.MoveToNextWordBoundary(wordBoundary, LogicalDirection.Forward);\r\n }\r\n\r\n if (TextRangeEditTables.IsTableStructureCrossed(This.Selection.Start, wordBoundary))\r\n { \r\n return; \r\n }\r\n\r\n ITextRange textRange = new TextRange(This.Selection.Start, wordBoundary);\r\n\r\n // When a range is TableCellRange we do not want to make deletions\r\n if (textRange.IsTableCellRange) \r\n {\r\n return; \r\n } \r\n\r\n if (!textRange.IsEmpty) \r\n {\r\n using (This.Selection.DeclareChangeBlock())\r\n {\r\n // Note asymetry with Backspace: we do not load springload formatting here \r\n if (This.AcceptsRichContent)\r\n { \r\n ((TextSelection)This.Selection).ClearSpringloadFormatting(); \r\n }\r\n\r\n This.Selection.Select(textRange.Start, textRange.End);\r\n\r\n // Delete selected text\r\n This.Selection.Text = String.Empty; \r\n }\r\n } \r\n }", "public static String highlightCorrections(String originalQuery, String correctedQuery, String highlightingTagRemoved, String highlightingTagReplaced, boolean ignoreRemovedQuotes) {\n if (originalQuery == null || correctedQuery == null || originalQuery.trim().equals(\"\") || correctedQuery.trim().equals(\"\")) {\n // this should never happen, but we don't want an exception in this code; incorrect higlighting is less of a problem than\n // runtime exceptions\n return correctedQuery;\n }\n \n List<String> originalQueryTokens = new ArrayList<String>();\n List<String> correctedQueryTokens = new ArrayList<String>();\n ReSearcherUtils.tokenizeQueryString(originalQuery, originalQueryTokens);\n ReSearcherUtils.tokenizeQueryString(correctedQuery, correctedQueryTokens);\n\n int j = 0;\n String highlightedQuery = \"\";\n \n for (int i = 0; i < correctedQueryTokens.size(); i++) {\n String nextTokenOrig = originalQueryTokens.get(j);\n String nextTokenCorr = correctedQueryTokens.get(i);\n \n while (nextTokenOrig.equals(\"\\\"\") && ignoreRemovedQuotes) {\n j++;\n nextTokenOrig = originalQueryTokens.get(j);\n }\n \n if (nextTokenCorr.equalsIgnoreCase(nextTokenOrig)) {\n // this words are the same, so just write it to highlighted version\n // TODO what if it is a quote?\n highlightedQuery += nextTokenCorr + \" \";\n }\n else {\n // TODO take care of the quotes!!! they can be the difference\n \n // check next words from orig, if any of them matches corr, then just highlight the words between\n int k = j + 1;\n boolean wordFound = false;\n for (; k < originalQueryTokens.size(); k++) {\n if (originalQueryTokens.get(k).equalsIgnoreCase(nextTokenCorr)) {\n // we found it\n wordFound = true;\n break;\n }\n }\n \n if (wordFound) {\n boolean tagOpened = false;\n boolean tagClosed = false;\n \n // if we have to mark removed words...\n if (highlightingTagRemoved != null) {\n for (int l = j; l < k; l++) {\n if (originalQueryTokens.get(l).equals(\"\\\"\") && ignoreRemovedQuotes == true) {\n ;\n }\n else {\n if (tagOpened == false) {\n highlightedQuery += \"<\" + highlightingTagRemoved + \">\";\n tagOpened = true;\n }\n \n // mark all words from orig query as removed until found word\n highlightedQuery += originalQueryTokens.get(l);\n \n if (l == k - 1) {\n // if this is the last word to be replaced\n highlightedQuery += \"</\" + highlightingTagRemoved + \"> \";\n tagClosed = true;\n }\n else {\n // if ending tag isn't needed yet, just put space\n \n // if this is a quote and we shouldn't ignore quote, then the quote was already added; blank\n // after that quote isn't needed\n if (originalQueryTokens.get(l).equals(\"\\\"\") && ignoreRemovedQuotes == false) {\n ;\n }\n else {\n highlightedQuery += \" \";\n }\n }\n }\n }\n \n if (tagOpened == true && tagClosed == false) {\n // there is a blank at the end, so remove it first\n highlightedQuery = highlightedQuery.substring(0, highlightedQuery.length() - 1);\n highlightedQuery += \"</\" + highlightingTagRemoved + \"> \";\n }\n }\n \n // also add current word from corrected query, since we're moving to the next token\n highlightedQuery += nextTokenCorr + \" \";\n\n // and move orig cursor\n j = k;\n }\n else {\n // if the word wasn't found, that means that current word from corr replaces current word from orig\n if (highlightingTagReplaced != null) {\n highlightedQuery += \"<\" + highlightingTagReplaced + \">\" + nextTokenCorr + \"</\" + highlightingTagReplaced + \"> \";\n }\n }\n }\n \n j++;\n }\n \n // we're finished with tokens from corrected query, but maybe there are some tokens left in the original query;\n // all such tokens should be marked as removed; but only if client wants them marked\n // BEWARE that j is now equal to i + 1 (because of j++ at the end of for loop)\n if (highlightingTagRemoved != null && (j < originalQueryTokens.size())) {\n boolean tagOpened = false;\n boolean tagClosed = false;\n\n for (int k = j; k < originalQueryTokens.size(); k++) {\n if (originalQueryTokens.get(k).equals(\"\\\"\") && ignoreRemovedQuotes == true) {\n ;\n }\n else {\n if (tagOpened == false) {\n highlightedQuery += \"<\" + highlightingTagRemoved + \">\";\n tagOpened = true;\n }\n\n highlightedQuery += originalQueryTokens.get(k);\n \n if (k == originalQueryTokens.size() - 1) {\n // if this is the last word to be replaced\n highlightedQuery += \"</\" + highlightingTagRemoved + \"> \";\n tagClosed = true;\n }\n else {\n // if ending tag isn't needed yet, just put space\n highlightedQuery += \" \";\n }\n }\n }\n \n if (tagOpened == true && tagClosed == false) {\n // there is a blank at the end, so remove it first\n highlightedQuery = highlightedQuery.substring(0, highlightedQuery.length() - 1);\n highlightedQuery += \"</\" + highlightingTagRemoved + \"> \";\n }\n }\n \n return highlightedQuery.trim();\n }", "public void deactivate() {\n\t\tSystem.out.println(\"WordReader.deactivate\");\n\t}", "public void removeWord(String word) throws WordException;", "public void run(){\n // If there is not word to recognized or the word is empty then do not recognize it\n if(word == null || word.trim().isEmpty()){\n return;\n }\n\n // Set up the highlighter\n DefaultHighlighter.DefaultHighlightPainter highLighter = FileUtils.getInstance().getHighlighter();\n\n // Highlight words at the exact position\n try{\n textPane.getHighlighter().addHighlight(startPosition, endPosition, highLighter);\n }catch(Exception e){\n e.printStackTrace();\n }\n }", "public RemoverStopWords() {\n\t\tBufferedReader br = null;\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"stopwords_en.txt\"));\n\t\t\tString line;\n\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tstop_words.add(line.trim());\n\t\t\t}\n\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (br != null) {\n\t\t\t\t\tbr.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "public void remove(ClangToken t) {\n\t\thighlightsByToken.remove(getKey(t));\n\t}", "public void reset(Object o) {\n\t\tif (o instanceof Word) {\n\t\t\tWord word = (Word) o;\n\t\t\tint start = word.getStartPosition();\n\t\t\tint end = word.getEndPosition();\n\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\tVector fws = Model.getIllocutionUnitRoots().getFunctionWords(word);\n\t\t\tVector cws = Model.getIllocutionUnitRoots().getConstitutiveWords(\n\t\t\t\t\tword);\n\t\t\tmarkedElements.removeElement(word);\n\t\t\tif (fws.size() > 0) {\n\t\t\t\tfor (int j = 0; j < fws.size(); j++) {\n\t\t\t\t\tFunctionWord fw = (FunctionWord) fws.get(j);\n\t\t\t\t\tdesignFW(fw);\n\t\t\t\t}\n\t\t\t} else if (cws.size() > 0) {\n\t\t\t\tfor (int j = 0; j < cws.size(); j++) {\n\t\t\t\t\tConstitutiveWord cw = (ConstitutiveWord) cws.get(j);\n\t\t\t\t\tdesignCW(cw);\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (o instanceof FunctionWord) {\n\t\t\tFunctionWord fword = (FunctionWord) o;\n\t\t\teditor.setCaretPosition(fword.getEndPosition() + 1);\n\t\t\tint start = fword.getStartPosition();\n\t\t\tint end = fword.getEndPosition();\n\t\t\tif (start != 0 || end != 0) {\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t\tmarkedElements.removeElement(fword);\n\t\t\t\tif (Model.getIllocutionUnitRoots().getFunctionWords(\n\t\t\t\t\t\tfword.getWord()).size() > 0)\n\t\t\t\t\tdesignFW(fword);\n\t\t\t}\n\t\t} else if (o instanceof ConstitutiveWord) {\n\t\t\tConstitutiveWord cword = (ConstitutiveWord) o;\n\t\t\teditor.setCaretPosition(cword.getEndPosition() + 1);\n\t\t\tint start = cword.getStartPosition();\n\t\t\tint end = cword.getEndPosition();\n\t\t\tif (start != 0 || end != 0) {\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t\tmarkedElements.removeElement(cword);\n\t\t\t\tif (Model.getIllocutionUnitRoots().getConstitutiveWords(\n\t\t\t\t\t\tcword.getWord()).size() > 0)\n\t\t\t\t\tdesignCW(cword);\n\t\t\t}\n\t\t} else if (o instanceof MeaningUnit) {\n\t\t\tMeaningUnit mu = (MeaningUnit) o;\n\t\t\tFunctionWord fw = mu.getFunctionWord();\n\t\t\tConstitutiveWord cw = mu.getConstitutiveWord();\n\t\t\tif (fw != null) {\n\t\t\t\tint start = fw.getStartPosition();\n\t\t\t\tint end = fw.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t\tmarkedElements.remove(fw);\n\t\t\t}\n\t\t\tif (cw != null) {\n\t\t\t\tint start = cw.getStartPosition();\n\t\t\t\tint end = cw.getEndPosition();\n\t\t\t\tdoc.setCharacterAttributes(start, end - start + 1, PLAIN, true);\n\t\t\t\tmarkedElements.remove(cw);\n\t\t\t}\n\t\t\tdesignMU(mu);\n\t\t} else if (o instanceof IllocutionUnit) {\n\t\t\tIllocutionUnit iu = (IllocutionUnit) o;\n\t\t\tmarkedElements.remove(iu);\n\t\t\tdesignIU(iu);\n\t\t}\n\t\tdesignText(Model.getIllocutionUnitRoots());\n\t}", "void errorPhraseRemoved(Object from, Term thru, Term unexpectedToken);", "public static String findReplacements(TreeSet<String> dictionary, \n\t\t\t\t\t String word)\n\t{\n\t String replacements = \"\";\n\t String leftHalf, rightHalf, newWord;\n\t int deleteAtThisIndex, insertBeforeThisIndex;\n\t char index;\n\t TreeSet<String> alreadyDoneNewWords = new TreeSet<String>();\n\t /* The above TreeSet<String> will hold words that the spell checker\n\t suggests as replacements. By keeping track of what has already\n\t been suggested, the method can make sure not to output the\n\t same recommended word twice. For instance, the word \n\t \"mispelled\" would ordinarily result in two of the same suggested\n\t replacements: \"misspelled\" (where the additional \"s\" is added to \n\t different locations.) */\n\t \n\t // First, we'll look for words to make by subtracting one letter\n\t // from the misspelled word.\n\t for(deleteAtThisIndex = 0; deleteAtThisIndex < word.length();\n\t\tdeleteAtThisIndex ++)\n\t\t{\n\t\t if(deleteAtThisIndex == 0)\n\t\t\t{\n\t\t\t leftHalf = \"\";\n\t\t\t rightHalf = word;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0, deleteAtThisIndex);\n\t\t\t rightHalf = word.substring(deleteAtThisIndex+1,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\n\t\t newWord = \"\";\n\t\t newWord = newWord.concat(leftHalf);\n\t\t newWord = newWord.concat(rightHalf);\n\t\t if(dictionary.contains(newWord) &&\n\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t{\n\t\t\t replacements = replacements.concat(newWord + \"\\n\");\n\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t}\n\t\t}\n\n\t // The rest of this method looks for words to make by adding a \n\t // new letter to the misspelled word.\n\t for(insertBeforeThisIndex = 0; \n\t\tinsertBeforeThisIndex <= word.length();\n\t\tinsertBeforeThisIndex ++)\n\t\t{\n\t\t if(insertBeforeThisIndex == word.length())\n\t\t\t{\n\t\t\t leftHalf = word;\n\t\t\t rightHalf = \"\";\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0,insertBeforeThisIndex);\n\t\t\t rightHalf = word.substring(insertBeforeThisIndex,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\t\t \n\t\t for(index = 'a'; index <= 'z'; index ++)\n\t\t\t{\n\t\t\t newWord = \"\";\n\t\t\t newWord = newWord.concat(leftHalf);\n\t\t\t newWord = newWord.concat(\"\" + index + \"\");\n\t\t\t newWord = newWord.concat(rightHalf);\n\t\t\t \n\t\t\t if(dictionary.contains(newWord) &&\n\t\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t\t{\n\t\t\t\t replacements \n\t\t\t\t\t= replacements.concat(newWord + \"\\n\");\n\t\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t return replacements;\n\t}", "void clear() {\n\t\tif (textArea!=null) {\n\t\t\tRSyntaxTextAreaHighlighter h = (RSyntaxTextAreaHighlighter)\n\t\t\t\t\t\t\t\t\t\t\t\t\ttextArea.getHighlighter();\n\t\t\th.clearMarkOccurrencesHighlights();\n\t\t}\n\t}", "public static void removeFromPracticedWords(Word word) {\n favWords.remove(word);\n // Set the word favourite status to false in dictionary after removing the word in practice list\n if (Dictionary.getDictionary().contains(word)) {\n Dictionary.getWord(word).setFavorited(false);\n }\n }", "public void clear() {\n\t\twordList.removeAll(wordList);\n\t\t// TODO Add your code here\n\t}", "protected void lightsOut(int line) {\r\n for (int i = 0; i < 16; i++) {\r\n code.unhighlight(i);\r\n }\r\n code.highlight(line);\r\n }", "private StopWords() {\r\n\t\tPath source = Paths.get(\"./dat/zaustavne_rijeci.txt\");\r\n\t\ttry {\r\n\t\t\tbody = new String(Files.readAllBytes(source),\r\n\t\t\t\t\tStandardCharsets.UTF_8);\r\n\t\t} catch (IOException ignorable) {\r\n\t\t}\r\n\t\twords = new LinkedHashSet<>();\r\n\t\tfillSet();\r\n\t}", "void setVersesWithWord(Word word);", "public boolean isWord2ignore(String word);", "public void remove(T word);", "public void deleteWordLevel() {\n\t\ttry {\n \t\t\tClass.forName(DRIVER);\n \t\t} catch (ClassNotFoundException e1) {\n \t\t\t// TODO Auto-generated catch block\n \t\t\te1.printStackTrace();\n \t\t}\t\t\n\t\ttry ( Connection con = DriverManager.getConnection(URL, USER, PW)) {\n\t\t\tStatement stmt = con.createStatement();\n//\t\t\tString sql = \"DELETE FROM \" + TblName_KNOW + \" WHERE UID = \" + uid + \";\";\n\t\t\tString sql = \"UPDATE \" + tbl_USER_DIC + \" SET \" + Constants.FLD_KNOW + \"=\" + Constants.WORD_UNKNOWN + \";\";\t\t\t\n\t\t\tstmt.executeUpdate(sql);\n\t\t\t\n\t stmt.close();\n\t con.close();\n\t\t} catch(Exception e) {\n\t\t\tlogger.info(\"fail to open mysql\");\n\t\t\te.printStackTrace();\n\t\t}\t\n\t}", "public int removings(String s)\n{\n if(stopWords.contains(s))\n {\n return 1;\n }\n else\n {\n return 0;\n }\n}", "private void setSelectedWord() {\n for (TableRow row: rows) {\n Drawable background = row.getBackground();\n if (background instanceof ColorDrawable) {\n int backColor = ((ColorDrawable) background).getColor();\n if (backColor == rowSelectColor) {\n final TextView descriptionView = (TextView) row.findViewById(R.id.wordDescription);\n final TextView glossView1 = (TextView) row.findViewById(R.id.wordGloss1);\n if (descriptionView != null) selectedWords = descriptionView.getText().toString();\n if (glossView1 != null) selectedSynset = glossView1.getText().toString();\n }\n }\n }\n }", "@ZAttr(id=1073)\n public Map<String,Object> removePrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n return attrs;\n }", "@Override\n\tprotected void filterUserInputText(AttributedString text) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar ch = text.charAt(i);\n\t\t\tif (ch == '\\t' || (!multiline && (ch == '\\n' || ch == '\\r'))) {\n\t\t\t\ttext.delete(Range.make(i, 1));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tsuper.filterUserInputText(text);\n\t}", "private void setWordsOnly() throws IOException {\n this.wordsOnly = new HashSet<>();\n new InputAnalyzer().removePunctuation(inputText, wordsOnly::add);\n }", "@Override\n public void removeWord(String wordToBeRemoved) {\n int index = 0;\n String[] result = new String[wordsArray.length];\n for (int i = 0; i < wordsArray.length; i++) {\n if (!wordsArray[i].equals( wordToBeRemoved)){\n result[index]= wordsArray[i];\n index++;\n }\n }\n }", "public abstract void clearSelection(TextAppearance appearance);", "private void highlightArea(FilterBypass fb, String s, int left, int right) {\n String sub = s.substring(left, right);\n //removeHighlights(fb, s, left, right);\n //String whitespace = new String(\" \\n\\r\");\n //println(\"String to update: '\" + s.substring(left, right) + \"'\");\n\n //Todo: make the code check for whitespace OR eof on either side of the string before highlighting it\n //Further optimisation for large inputs: combine all loops into one, and have an if statement to determine color.\n // ie, if there are 17 keywords that should be red, then check if the index found is <17, and if so, color red.\n\n for(int i = 0; i < all.length; i++) {\n highlightGiven(fb, all[i], sub, left, attributeScheme[i+1]);\n }\n\n //Handles comments and string literals.\n //if (dirtyBounds.size() % 2 == 0) \n try {\n for(int i = 0; i < dirtyBounds.size()-1; i+=2) {\n ((StyledDocument)fb.getDocument()).setCharacterAttributes(dirtyBounds.get(i), dirtyBounds.get(i+1)-dirtyBounds.get(i)+1, attributeScheme[10], true);\n }\n } catch (ArrayIndexOutOfBoundsException a) {}\n }", "public void removeHighlight(final Object obj) {\n Highlight highlight = highlights.getElem(obj);\n if (highlight != null) {\n Rectangle highlightBounds = getBoundsByHighlight(highlight);\n highlights.remove(highlight);\n repaintComponent(highlightBounds);\n }\n }", "void setRemoveHighlightListener(RemoveHighlightListener listener);", "@Override\n public void unhighlight() {\n\n // @tag ADJACENT : Removed highlight adjacent\n // boolean highlightedAdjacently = (highlighted == HIGHLIGHT_ADJACENT);\n if (highlighted == HIGHLIGHT_NONE) {\n return;\n }\n // @tag ADJACENT : Removed highlight adjacent\n /*\n * if (!highlightedAdjacently) { // IF we are highlighted as an adjacent\n * node, we don't need to deal // with our connections. if\n * (ZestStyles.checkStyle(getNodeStyle(),\n * ZestStyles.NODES_HIGHLIGHT_ADJACENT)) { // unhighlight the adjacent\n * edges for (Iterator iter = sourceConnections.iterator();\n * iter.hasNext();) { GraphConnection conn = (GraphConnection)\n * iter.next(); conn.unhighlight(); if (conn.getDestination() != this) {\n * conn.getDestination().unhighlight(); } } for (Iterator iter =\n * targetConnections.iterator(); iter.hasNext();) { GraphConnection conn\n * = (GraphConnection) iter.next(); conn.unhighlight(); if\n * (conn.getSource() != this) { conn.getSource().unhighlight(); } } } }\n */\n if (parent.getItemType() == GraphItem.CONTAINER) {\n ((GraphContainer) parent).unhighlightNode(this);\n } else {\n ((Graph) parent).unhighlightNode(this);\n }\n highlighted = HIGHLIGHT_NONE;\n updateFigureForModel(nodeFigure);\n\n }", "@Override\n\tpublic void undo() {\n\t\tlight.off();\n\t}", "public void reset() {\n\t\tremoveAll();\n\t\tadd(new GLine(MARGIN, MARGIN, MARGIN, MARGIN + SCAFFOLD_HEIGHT));\n\t\tadd(new GLine(MARGIN, MARGIN, MARGIN + BEAM_LENGTH, MARGIN));\n\t\tadd(new GLine(MARGIN + BEAM_LENGTH, MARGIN, MARGIN + BEAM_LENGTH, MARGIN + ROPE_LENGTH));\n\t\tbody = new GCompound();\n\t\tbody.setLocation(MARGIN + BEAM_LENGTH, MARGIN + ROPE_LENGTH);\n\t\tadd(body);\n\t\twordLabel = new GLabel(\"\");\n\t\twordLabel.setFont(\"*-bold-18\");\n\t\tadd(wordLabel);\n\t\tguesses = \"\";\n\t\tguessesLabel = new GLabel(guesses);\n\t\tadd(guessesLabel);\n\t}", "public void clearWordList () {\r\n words.clear ();\r\n Components.wordList.getContents ().removeAllElements ();\r\n }", "private void highlightString(TextView textView, String input) {\n SpannableString spannableString = new SpannableString(textView.getText());\n//Get the previous spans and remove them\n BackgroundColorSpan[] backgroundSpans = spannableString.getSpans(0, spannableString.length(), BackgroundColorSpan.class);\n\n for (BackgroundColorSpan span : backgroundSpans) {\n spannableString.removeSpan(span);\n }\n\n//Search for all occurrences of the keyword in the string\n int indexOfKeyword = spannableString.toString().indexOf(input);\n\n while (indexOfKeyword > 0) {\n //Create a background color span on the keyword\n spannableString.setSpan(new BackgroundColorSpan(Color.YELLOW), indexOfKeyword, indexOfKeyword + input.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);\n\n //Get the next index of the keyword\n indexOfKeyword = spannableString.toString().indexOf(input, indexOfKeyword + input.length());\n }\n\n//Set the final text on TextView\n textView.setText(spannableString);\n }", "public Set<String> getWordsNotFoundByUser(){\n\n Set<String> validWordsOnBoardCopy = new HashSet<String>();\n validWordsOnBoardCopy.addAll(validWordsOnBoard);\n validWordsOnBoardCopy.removeAll(validWordsFoundByUser);\n\n return validWordsOnBoardCopy;\n }", "private static String removeStopWords(String str) {\n for(int i=0; i<stopWords.size(); i++) {\n String temp = stopWords.get(i);\n if(temp.equalsIgnoreCase(str)) {\n str = \"\";\n }\n }\n return str;\n }", "protected void undoTextChange() {\n \t\t\ttry {\n \t\t\t\tif (fDocumentUndoManager.fDocument instanceof IDocumentExtension4)\n \t\t\t\t\t((IDocumentExtension4) fDocumentUndoManager.fDocument).replace(fStart, fText\n \t\t\t\t\t\t\t.length(), fPreservedText, fUndoModificationStamp);\n \t\t\t\telse\n \t\t\t\t\tfDocumentUndoManager.fDocument.replace(fStart, fText.length(),\n \t\t\t\t\t\t\tfPreservedText);\n \t\t\t} catch (BadLocationException x) {\n \t\t\t}\n \t\t}", "public boolean isWordGuessed() {\n\t for(Letter l : letters) {\n\t if(!l.getStatus())\n\t return false;\n\t }\n\t this.displayedWord.setStatus(true);\n\t return true;\n\t}", "public Removalstops()\n {\n stopWords.add(\"am\");\n stopWords.add(\"my\");\nstopWords.add(\"at\");\nstopWords.add(\"a\");\nstopWords.add(\"i\");\nstopWords.add(\"is\");\nstopWords.add(\"of\");\nstopWords.add(\"have\");\nstopWords.add(\"--\");\nstopWords.add(\"do\");\nstopWords.add(\"the\");\nstopWords.add(\"was\");\nstopWords.add(\"iam\");\nstopWords.add(\"there\");\nstopWords.add(\"what\");\nstopWords.add(\"for\");\nstopWords.add(\"in\");\nstopWords.add(\"very\");\nstopWords.add(\"and\");\nstopWords.add(\"to\");\nstopWords.add(\"often\");\nstopWords.add(\"because\");\nstopWords.add(\"in\");\nstopWords.add(\"an\");\nstopWords.add(\"can\");\nstopWords.add(\"via\");\nstopWords.add(\"even\");\nstopWords.add(\"as\");\nstopWords.add(\"best\");\nstopWords.add(\"been\");\nstopWords.add(\"into\");\nstopWords.add(\"by\");\nstopWords.add(\"around\");\nstopWords.add(\"being\");\nstopWords.add(\"from\");\nstopWords.add(\"etc\");\nstopWords.add(\"his\");\nstopWords.add(\"do\");\nstopWords.add(\"have\");\nstopWords.add(\"had\"); \nstopWords.add(\"able\");\nstopWords.add(\"about\");\nstopWords.add(\"above\");\nstopWords.add(\"abroad\");\nstopWords.add(\"according\");\nstopWords.add(\"accordingly\");\nstopWords.add(\"across\");\nstopWords.add(\"actually\");\nstopWords.add(\"adj\");\nstopWords.add(\"after\");\nstopWords.add(\"afterwards\");\nstopWords.add(\"again\");\nstopWords.add(\"against\");\nstopWords.add(\"ago\");\nstopWords.add(\"ahead\");\nstopWords.add(\"ain't\");\nstopWords.add(\"all\");\nstopWords.add(\"allow\");\nstopWords.add(\"allows\");\nstopWords.add(\"almost\");\nstopWords.add(\"alone\");\nstopWords.add(\"along\");\nstopWords.add(\"alongside\");\nstopWords.add(\"already\");\nstopWords.add(\"also\");\nstopWords.add(\"although\");\nstopWords.add(\"always\");\nstopWords.add(\"am\");\nstopWords.add(\"amid\");\nstopWords.add(\"amidst\");\nstopWords.add(\"among\");\nstopWords.add(\"amongst\");\nstopWords.add(\"an\");\nstopWords.add(\"and\");\nstopWords.add(\"another\");\nstopWords.add(\"any\");\nstopWords.add(\"anybody\");\nstopWords.add(\"anyhow\");\nstopWords.add(\"anyone\");\nstopWords.add(\"anything\");\nstopWords.add(\"anyway\");\nstopWords.add(\"anyways\");\nstopWords.add(\"anywhere\");\nstopWords.add(\"apart\");\nstopWords.add(\"appear\");\nstopWords.add(\"appreciate\");\nstopWords.add(\"appropriate\");\nstopWords.add(\"are\");\nstopWords.add(\"aren't\");\nstopWords.add(\"around\");\nstopWords.add(\"as\");\nstopWords.add(\"a's\");\nstopWords.add(\"aside\");\nstopWords.add(\"ask\");\nstopWords.add(\"asking\");\nstopWords.add(\"associated\");\nstopWords.add(\"at\");\nstopWords.add(\"available\");\nstopWords.add(\"away\");\nstopWords.add(\"awfully\");\nstopWords.add(\"back\");\nstopWords.add(\"backward\");\nstopWords.add(\"backwards\");\nstopWords.add(\"be\");\nstopWords.add(\"became\");\nstopWords.add(\"beacause\");\nstopWords.add(\"become\");\nstopWords.add(\"becomes\");\nstopWords.add(\"becoming\");\nstopWords.add(\"been\");\nstopWords.add(\"before\");\nstopWords.add(\"beforehand\");\nstopWords.add(\"begin\");\nstopWords.add(\"behind\");\nstopWords.add(\"being\");\nstopWords.add(\"believe\");\nstopWords.add(\"below\");\nstopWords.add(\"beside\");\nstopWords.add(\"besides\");\nstopWords.add(\"best\");\nstopWords.add(\"better\");\nstopWords.add(\"between\");\nstopWords.add(\"beyond\");\nstopWords.add(\"both\");\nstopWords.add(\"brief\");\nstopWords.add(\"but\");\nstopWords.add(\"by\");\nstopWords.add(\"came\");\nstopWords.add(\"can\");\nstopWords.add(\"cannot\");\nstopWords.add(\"cant\");\nstopWords.add(\"can't\");\nstopWords.add(\"caption\");\nstopWords.add(\"cause\");\nstopWords.add(\"causes\");\nstopWords.add(\"certain\");\nstopWords.add(\"cetrainly\");\nstopWords.add(\"changes\");\nstopWords.add(\"clearly\");\nstopWords.add(\"c'mon\");\nstopWords.add(\"co\");\nstopWords.add(\"co.\");\nstopWords.add(\"com\");\nstopWords.add(\"come\");\nstopWords.add(\"comes\");\nstopWords.add(\"concerning\");\nstopWords.add(\"consequently\");\nstopWords.add(\"consider\");\nstopWords.add(\"considering\");\nstopWords.add(\"could\");\nstopWords.add(\"couldn't\");\nstopWords.add(\"c's\");\nstopWords.add(\"currently\");\nstopWords.add(\"dare\");\nstopWords.add(\"daren't\");\nstopWords.add(\"definitely\");\nstopWords.add(\"described\");\nstopWords.add(\"despite\");\nstopWords.add(\"did\");\nstopWords.add(\"didn't\");\nstopWords.add(\"different\");\nstopWords.add(\"directly\");\nstopWords.add(\"do\");\nstopWords.add(\"does\");\nstopWords.add(\"doesn't\");\nstopWords.add(\"doing\");\nstopWords.add(\"done\");\nstopWords.add(\"don't\");\nstopWords.add(\"down\");\nstopWords.add(\"downwards\");\nstopWords.add(\"during\");\nstopWords.add(\"each\");\nstopWords.add(\"edu\");\nstopWords.add(\"eg\");\nstopWords.add(\"eight\");\nstopWords.add(\"eighty\");\nstopWords.add(\"either\");\nstopWords.add(\"else\");\nstopWords.add(\"elsewhere\");\nstopWords.add(\"end\");\nstopWords.add(\"ending\");\nstopWords.add(\"enough\");\nstopWords.add(\"entirely\");\nstopWords.add(\"especially\");\nstopWords.add(\"et\");\nstopWords.add(\"etc\");\nstopWords.add(\"even\");\nstopWords.add(\"evenmore\");\nstopWords.add(\"every\");\nstopWords.add(\"everybody\");\nstopWords.add(\"everyone\");\nstopWords.add(\"everything\");\nstopWords.add(\"everywhere\");\nstopWords.add(\"ex\");\nstopWords.add(\"exactly\");\nstopWords.add(\"example\");\nstopWords.add(\"except\");\nstopWords.add(\"fairly\");\nstopWords.add(\"far\");\nstopWords.add(\"farhter\");\nstopWords.add(\"few\");\nstopWords.add(\"fewer\");\nstopWords.add(\"fifth\");\nstopWords.add(\"first\");\nstopWords.add(\"five\");\nstopWords.add(\"followed\");\nstopWords.add(\"following\");\nstopWords.add(\"follows\");\nstopWords.add(\"for\");\nstopWords.add(\"forever\");\nstopWords.add(\"former\");\nstopWords.add(\"formerly\");\nstopWords.add(\"forth\");\nstopWords.add(\"forward\");\nstopWords.add(\"found\");\nstopWords.add(\"four\");\nstopWords.add(\"from\");\nstopWords.add(\"further\");\nstopWords.add(\"furthermore\");\nstopWords.add(\"get\");\nstopWords.add(\"gets\");\nstopWords.add(\"getting\");\nstopWords.add(\"given\");\nstopWords.add(\"gives\");\nstopWords.add(\"go\");\nstopWords.add(\"goes\");\nstopWords.add(\"going\");\nstopWords.add(\"gone\");\nstopWords.add(\"got\");\nstopWords.add(\"gotten\");\nstopWords.add(\"greetings\");\nstopWords.add(\"had\");\nstopWords.add(\"hadn't\");\nstopWords.add(\"half\");\nstopWords.add(\"happens\");\nstopWords.add(\"hardly\");\nstopWords.add(\"has\");\nstopWords.add(\"hasn't\");\nstopWords.add(\"have\");\nstopWords.add(\"haven't\");\nstopWords.add(\"having\");\nstopWords.add(\"he\");\nstopWords.add(\"he'd\");\nstopWords.add(\"he'll\");\nstopWords.add(\"hello\");\nstopWords.add(\"help\");\nstopWords.add(\"hence\");\nstopWords.add(\"her\");\nstopWords.add(\"here\");\nstopWords.add(\"hereafter\");\nstopWords.add(\"hereby\");\nstopWords.add(\"herein\");\nstopWords.add(\"here's\");\nstopWords.add(\"hereupon\");\nstopWords.add(\"hers\");\nstopWords.add(\"herself\");\nstopWords.add(\"he's\");\nstopWords.add(\"hi\");\nstopWords.add(\"him\");\nstopWords.add(\"himself\");\nstopWords.add(\"his\");\nstopWords.add(\"hither\");\nstopWords.add(\"hopefully\");\nstopWords.add(\"how\");\nstopWords.add(\"howbeit\");\nstopWords.add(\"however\");\nstopWords.add(\"however\");\nstopWords.add(\"hundred\");\nstopWords.add(\"i'd\");\nstopWords.add(\"ie\");\nstopWords.add(\"if\");\nstopWords.add(\"ignored\");\nstopWords.add(\"i'll\");\nstopWords.add(\"i'm\");\nstopWords.add(\"immediate\");\nstopWords.add(\"in\");\nstopWords.add(\"iansmuch\");\nstopWords.add(\"inc\");\nstopWords.add(\"inc.\");\nstopWords.add(\"indeed\");\nstopWords.add(\"indicate\");\nstopWords.add(\"indicated\");\nstopWords.add(\"indicates\");\nstopWords.add(\"inner\");\nstopWords.add(\"inside\");\nstopWords.add(\"insofar\");\nstopWords.add(\"into\");\nstopWords.add(\"inward\");\nstopWords.add(\"is\");\nstopWords.add(\"isn't\");\nstopWords.add(\"it\");\nstopWords.add(\"it'd\");\nstopWords.add(\"it'll\");\nstopWords.add(\"its\");\nstopWords.add(\"it's\");\nstopWords.add(\"itself\");\nstopWords.add(\"i've\");\nstopWords.add(\"just\");\nstopWords.add(\"k\");\nstopWords.add(\"keep\");\nstopWords.add(\"keeps\");\nstopWords.add(\"kept\");\nstopWords.add(\"know\");\nstopWords.add(\"knows\");\nstopWords.add(\"known\");\nstopWords.add(\"last\");\nstopWords.add(\"lately\");\nstopWords.add(\"later\");\nstopWords.add(\"latter\");\nstopWords.add(\"latterly\");\nstopWords.add(\"least\");\nstopWords.add(\"less\");\nstopWords.add(\"let\");\nstopWords.add(\"let's\");\nstopWords.add(\"like\");\nstopWords.add(\"liked\");\nstopWords.add(\"likely\");\nstopWords.add(\"likewise\");\nstopWords.add(\"little\");\nstopWords.add(\"look\");\nstopWords.add(\"looks\");\nstopWords.add(\"low\");\nstopWords.add(\"lower\");\nstopWords.add(\"ltd\");\nstopWords.add(\"made\");\nstopWords.add(\"mainly\");\nstopWords.add(\"make\");\nstopWords.add(\"makes\");\nstopWords.add(\"many\");\nstopWords.add(\"may\");\nstopWords.add(\"maybe\");\nstopWords.add(\"mayn't\");\nstopWords.add(\"me\");\nstopWords.add(\"mean\");\nstopWords.add(\"meanwhile\");\nstopWords.add(\"merely\");\nstopWords.add(\"might\");\nstopWords.add(\"mightn't\");\nstopWords.add(\"mine\");\nstopWords.add(\"minus\");\nstopWords.add(\"miss\");\nstopWords.add(\"more\");\nstopWords.add(\"moreover\");\nstopWords.add(\"most\");\nstopWords.add(\"mostly\");\nstopWords.add(\"mr\");\nstopWords.add(\"mrs\");\nstopWords.add(\"much\");\nstopWords.add(\"must\");\nstopWords.add(\"mustn't\");\nstopWords.add(\"my\");\nstopWords.add(\"myself\");\nstopWords.add(\"name\");\nstopWords.add(\"namely\");\nstopWords.add(\"nd\");\nstopWords.add(\"near\");\nstopWords.add(\"nearly\");\nstopWords.add(\"necessary\");\nstopWords.add(\"need\");\nstopWords.add(\"needn't\");\nstopWords.add(\"needs\");\nstopWords.add(\"neither\");\nstopWords.add(\"never\");\nstopWords.add(\"neverf\");\nstopWords.add(\"neverless\");\nstopWords.add(\"nevertheless\");\nstopWords.add(\"new\");\nstopWords.add(\"next\");\nstopWords.add(\"nine\");\nstopWords.add(\"ninety\");\nstopWords.add(\"no\");\nstopWords.add(\"nobody\");\nstopWords.add(\"non\");\nstopWords.add(\"none\");\nstopWords.add(\"nonetheless\");\nstopWords.add(\"noone\");\nstopWords.add(\"no-one\");\nstopWords.add(\"nor\");\nstopWords.add(\"normally\");\nstopWords.add(\"not\");\nstopWords.add(\"nothing\");\nstopWords.add(\"notwithstanding\");\nstopWords.add(\"novel\");\nstopWords.add(\"now\");\nstopWords.add(\"nowwhere\");\nstopWords.add(\"obviously\");\nstopWords.add(\"of\");\nstopWords.add(\"off\");\nstopWords.add(\"often\");\nstopWords.add(\"oh\");\nstopWords.add(\"ok\");\nstopWords.add(\"okay\");\nstopWords.add(\"old\");\nstopWords.add(\"on\");\nstopWords.add(\"once\");\nstopWords.add(\"one\");\nstopWords.add(\"ones\");\nstopWords.add(\"one's\");\nstopWords.add(\"only\");\nstopWords.add(\"onto\");\nstopWords.add(\"opposite\");\nstopWords.add(\"or\");\nstopWords.add(\"other\");\nstopWords.add(\"others\");\nstopWords.add(\"otherwise\");\nstopWords.add(\"ought\");\nstopWords.add(\"oughtn't\");\nstopWords.add(\"our\");\nstopWords.add(\"ourselves\");\nstopWords.add(\"out\");\nstopWords.add(\"outside\");\nstopWords.add(\"over\");\nstopWords.add(\"overall\");\nstopWords.add(\"own\");\nstopWords.add(\"particular\");\nstopWords.add(\"particularly\");\nstopWords.add(\"past\");\nstopWords.add(\"per\");\nstopWords.add(\"perhaps\");\nstopWords.add(\"placed\");\nstopWords.add(\"please\");\nstopWords.add(\"plus\");\nstopWords.add(\"possible\");\nstopWords.add(\"presumably\");\nstopWords.add(\"probably\");\nstopWords.add(\"provided\");\nstopWords.add(\"provides\");\nstopWords.add(\"que\");\nstopWords.add(\"quite\");\nstopWords.add(\"qv\");\nstopWords.add(\"rather\");\nstopWords.add(\"rd\");\nstopWords.add(\"re\");\nstopWords.add(\"really\");\nstopWords.add(\"reasonably\");\nstopWords.add(\"recent\");\nstopWords.add(\"recently\");\nstopWords.add(\"regarding\");\nstopWords.add(\"regardless\");\nstopWords.add(\"regards\");\nstopWords.add(\"relatively\");\nstopWords.add(\"respectively\");\nstopWords.add(\"right\");\nstopWords.add(\"round\");\nstopWords.add(\"said\");\nstopWords.add(\"same\");\nstopWords.add(\"saw\");\nstopWords.add(\"say\");\nstopWords.add(\"saying\");\nstopWords.add(\"says\");\nstopWords.add(\"second\");\nstopWords.add(\"secondly\");\nstopWords.add(\"see\");\nstopWords.add(\"seeing\");\nstopWords.add(\"seem\");\nstopWords.add(\"seemed\");\nstopWords.add(\"seeming\");\nstopWords.add(\"seems\");\nstopWords.add(\"seen\");\nstopWords.add(\"self\");\nstopWords.add(\"selves\");\nstopWords.add(\"sensible\");\nstopWords.add(\"sent\");\nstopWords.add(\"serious\");\nstopWords.add(\"seriously\");\nstopWords.add(\"seven\");\nstopWords.add(\"several\");\nstopWords.add(\"shall\");\nstopWords.add(\"shan't\");\nstopWords.add(\"she\");\nstopWords.add(\"she'd\");\nstopWords.add(\"she'll\");\nstopWords.add(\"she's\");\nstopWords.add(\"should\");\nstopWords.add(\"shouldn't\");\nstopWords.add(\"since\");\nstopWords.add(\"six\");\nstopWords.add(\"so\");\nstopWords.add(\"some\");\nstopWords.add(\"somebody\");\nstopWords.add(\"someday\");\nstopWords.add(\"somehow\");\nstopWords.add(\"someone\");\nstopWords.add(\"something\");\nstopWords.add(\"sometime\");\nstopWords.add(\"sometimes\");\nstopWords.add(\"somewhat\");\nstopWords.add(\"somewhere\");\nstopWords.add(\"soon\");\nstopWords.add(\"sorry\");\nstopWords.add(\"specified\");\nstopWords.add(\"specify\");\nstopWords.add(\"specifying\");\nstopWords.add(\"still\");\nstopWords.add(\"sub\");\nstopWords.add(\"such\");\nstopWords.add(\"sup\");\nstopWords.add(\"sure\");\nstopWords.add(\"take\");\nstopWords.add(\"taken\");\nstopWords.add(\"taking\");\nstopWords.add(\"tell\");\nstopWords.add(\"tends\");\nstopWords.add(\"th\");\nstopWords.add(\"than\");\nstopWords.add(\"thank\");\nstopWords.add(\"thanks\");\nstopWords.add(\"thanx\");\nstopWords.add(\"that\");\nstopWords.add(\"that'll\");\nstopWords.add(\"thats\");\nstopWords.add(\"that've\");\nstopWords.add(\"the\");\nstopWords.add(\"their\");\nstopWords.add(\"theirs\");\nstopWords.add(\"them\");\nstopWords.add(\"themselves\");\nstopWords.add(\"then\");\nstopWords.add(\"thence\");\nstopWords.add(\"there\");\nstopWords.add(\"thereafter\");\nstopWords.add(\"thereby\");\nstopWords.add(\"there'd\");\nstopWords.add(\"therefore\");\nstopWords.add(\"therein\");\nstopWords.add(\"ther'll\");\nstopWords.add(\"there're\");\nstopWords.add(\"theres\");\nstopWords.add(\"there's\");\nstopWords.add(\"thereupon\");\nstopWords.add(\"there've\");\nstopWords.add(\"these\");\nstopWords.add(\"they\");\nstopWords.add(\"they'd\");\nstopWords.add(\"they'll\");\nstopWords.add(\"they're\");\nstopWords.add(\"they've\");\nstopWords.add(\"thing\");\nstopWords.add(\"things\");\nstopWords.add(\"think\");\nstopWords.add(\"third\");\nstopWords.add(\"thirty\");\nstopWords.add(\"this\");\nstopWords.add(\"thorough\");\nstopWords.add(\"thoroughly\");\nstopWords.add(\"those\");\nstopWords.add(\"though\");\nstopWords.add(\"throughout\");\nstopWords.add(\"thru\");\nstopWords.add(\"thus\");\nstopWords.add(\"till\");\nstopWords.add(\"to\");\nstopWords.add(\"together\");\nstopWords.add(\"too\");\nstopWords.add(\"took\");\nstopWords.add(\"toward\");\nstopWords.add(\"towards\");\nstopWords.add(\"tried\");\nstopWords.add(\"tries\");\nstopWords.add(\"truly\");\nstopWords.add(\"try\");\nstopWords.add(\"trying\");\nstopWords.add(\"t's\");\nstopWords.add(\"twice\");\nstopWords.add(\"two\");\nstopWords.add(\"un\");\nstopWords.add(\"under\");\nstopWords.add(\"underneath\");\nstopWords.add(\"undoing\");\nstopWords.add(\"unfortunately\");\nstopWords.add(\"unless\");\nstopWords.add(\"unlike\");\nstopWords.add(\"unlikely\");\nstopWords.add(\"untill\");\nstopWords.add(\"unto\");\nstopWords.add(\"up\");\nstopWords.add(\"upon\");\nstopWords.add(\"upwards\");\nstopWords.add(\"us\");\nstopWords.add(\"use\");\nstopWords.add(\"used\");\nstopWords.add(\"useful\");\nstopWords.add(\"uses\");\nstopWords.add(\"using\");\nstopWords.add(\"usually\");\nstopWords.add(\"v\");\nstopWords.add(\"value\");\nstopWords.add(\"various\");\nstopWords.add(\"versus\");\nstopWords.add(\"very\");\nstopWords.add(\"via\");\nstopWords.add(\"viz\");\nstopWords.add(\"vs\");\nstopWords.add(\"want\");\nstopWords.add(\"wants\");\nstopWords.add(\"was\");\nstopWords.add(\"wasn't\");\nstopWords.add(\"way\");\nstopWords.add(\"we\");\nstopWords.add(\"we'd\");\nstopWords.add(\"welcome\");\nstopWords.add(\"well\");\nstopWords.add(\"we'll\");\nstopWords.add(\"went\");\nstopWords.add(\"were\");\nstopWords.add(\"we're\");\nstopWords.add(\"weren't\");\nstopWords.add(\"we've\");\nstopWords.add(\"what\");\nstopWords.add(\"whatever\");\nstopWords.add(\"what'll\");\nstopWords.add(\"what's\");\nstopWords.add(\"what've\");\nstopWords.add(\"when\");\nstopWords.add(\"whence\");\nstopWords.add(\"whenever\");\nstopWords.add(\"where\");\nstopWords.add(\"whereafter\");\nstopWords.add(\"whereas\");\nstopWords.add(\"whereby\");\nstopWords.add(\"wherein\");\nstopWords.add(\"where's\");\nstopWords.add(\"whereupon\");\nstopWords.add(\"whereever\");\nstopWords.add(\"whether\");\nstopWords.add(\"which\");\nstopWords.add(\"whichever\");\nstopWords.add(\"while\");\nstopWords.add(\"whilst\");\nstopWords.add(\"whither\");\nstopWords.add(\"who\");\nstopWords.add(\"who'd\");\nstopWords.add(\"whoever\");\nstopWords.add(\"whole\");\nstopWords.add(\"who'll\");\nstopWords.add(\"whom\");\nstopWords.add(\"whomever\");\nstopWords.add(\"who's\");\nstopWords.add(\"whose\");\nstopWords.add(\"why\");\nstopWords.add(\"will\");\nstopWords.add(\"willing\");\nstopWords.add(\"wish\");\nstopWords.add(\"with\");\nstopWords.add(\"within\");\nstopWords.add(\"without\");\nstopWords.add(\"wonder\");\nstopWords.add(\"won't\");\nstopWords.add(\"would\");\nstopWords.add(\"wouldn't\");\nstopWords.add(\"yes\");\nstopWords.add(\"yet\");\nstopWords.add(\"you\");\nstopWords.add(\"you'd\");\nstopWords.add(\"you'll\");\nstopWords.add(\"your\");\nstopWords.add(\"you're\");\nstopWords.add(\"yours\");\nstopWords.add(\"yourself\");\nstopWords.add(\"you've\");\nstopWords.add(\"zero\");\n\n \n \n }", "@ZAttr(id=1073)\n public void removePrefSpellIgnoreWord(String zimbraPrefSpellIgnoreWord) throws com.zimbra.common.service.ServiceException {\n HashMap<String,Object> attrs = new HashMap<String,Object>();\n StringUtil.addToMultiMap(attrs, \"-\" + Provisioning.A_zimbraPrefSpellIgnoreWord, zimbraPrefSpellIgnoreWord);\n getProvisioning().modifyAttrs(this, attrs);\n }", "void textChanged() {\n\t\ttextAreaChanged = true;\n\t\tfinder.clear();\n\t\tfindIndex = 0;\n\t\ttextEditor.getHighlighter().removeAllHighlights();\n\t\terrorTextArea.setText(\"\");\n\t}", "public boolean ignoreWord(String word) {\n\t\t// By default we ignore all keywords that are defined in the syntax\n\t\treturn org.emftext.sdk.concretesyntax.resource.cs.grammar.CsGrammarInformationProvider.INSTANCE.getKeywords().contains(word);\n\t}", "public void deleteLanguages(){\n editor.remove(PRIMARY_LANGUAGE);\n editor.remove(SECONDARY_LANGUAGE);\n editor.apply();\n }", "public void removeFavorite(final String word){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.removeFavorite(word.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void removeCueWords(ArrayList<Long> ids){\n\t\tfor(int i = 0; i < ids.size(); i++){\r\n\t\t\tfor(int a = 0; a < cueWords.size(); a++){\r\n\t\t\t\tif(ids.get(i) == cueWords.get(a)){\r\n\t\t\t\t\tcueWords.remove(a);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n//\t\tLog.i(\"TAG\", \"After: \" + cueWords.size());\r\n\t}", "private static String cleanHighlightingMarks(final String hlText) {\n String hlLiteral = hlText;\n int indexPre = hlLiteral.indexOf(HL_PRE);\n while (indexPre > -1) {\n int indexPost = hlLiteral.indexOf(HL_POST, indexPre + HL_PRE.length());\n if (indexPost > -1) {\n String post = hlLiteral.substring(indexPost + HL_POST.length());\n String pre = hlLiteral.substring(0, indexPost);\n Matcher preMatcher = HL_PRE_REGEX.matcher(pre);\n pre = preMatcher.replaceFirst(\"\");\n hlLiteral = pre + post;\n }\n indexPre = hlLiteral.indexOf(HL_PRE);\n }\n return hlLiteral;\n }", "public void setTheWords (String themeWords){\n\t\twords.setText(themeWords);\n\t}", "public static void removeHighlightsAllFrames(WebContents webContents) {\n List<RenderFrameHost> renderFrameHosts =\n webContents.getMainFrame().getAllRenderFrameHosts();\n\n for (RenderFrameHost renderFrameHost : renderFrameHosts) {\n TextFragmentReceiver producer =\n renderFrameHost.getInterfaceToRendererFrame(TextFragmentReceiver.MANAGER);\n producer.removeFragments();\n }\n }", "@ZAttr(id=1073)\n public Map<String,Object> unsetPrefSpellIgnoreWord(Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraPrefSpellIgnoreWord, \"\");\n return attrs;\n }", "@Test\n\tpublic void notWordGrepTest() throws Exception{\n\t\t// word is 'unconstitutional'\n\t\tHashSet<String> grepFound = loadGrepResults(\"unconstitutional\");\n\t\tCollection<Page> index = queryTest.query(\"!unconstitutional\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// 9359 valid files in RHF\n\t\tassertEquals(indexFound.size(), 9359 - grepFound.size());\n\t\t\n\t\t// check that the sets are disjoint\n\t\tfor (String s : indexFound)\n\t\t\tassertFalse(grepFound.contains(s));\n\t\tfor (String s : grepFound)\n\t\t\tassertFalse(indexFound.contains(s));\n\t}", "public DynamicArray<String> redactText()\n\t{\n\t\tfor (int i = 0; i < text.length(); i++)\n\t\t{\n\t\t\tif(!checkWord(text.get(i))) // checks if the word is listed to be redacted\n\t\t\t{\n\t\t\t\ttext.set(i, redact(text.get(i))); // Redacts word\n\t\t\t}\n\t\t\telse if (isNoun(i)) // Given the index this checks if the word is a noun, but ignores it if there is a full stop.\n\t\t\t{\n\t\t\t\twords.add(text.get(i)); // Since this is a noun, it is added to the list of redacted words\n\t\t\t\ttext.set(i, redact(text.get(i))); // Word is then redacted\n\t\t\t}\n\t\t}\n\t\t\n\t\tint i = 0;\n\t\tint check;\n\t\twhile (i < fullStops.length()) // Loops through full stop points and checks the word that follows it\n\t\t{\n\t\t\tcheck = fullStops.get(i);\n\t\t\tif(!checkWord(text.get(check)))\n\t\t\t{\n\t\t\t\ttext.set(check, redact(text.get(check)));\n\t\t\t}\n\t\t\ti++;\n\t\t\t\t\n\t\t}\n\t\treturn text;\n\t}", "public void clearHighlightTile() {\n\t\tfor(int i = 0;i < 8;i++) {\n\t\t\tfor(int j = 0;j < 8;j++) {\n\t\t\t\tRectangle rect = Main.tile[i][j].rectangle;\n\t\t\t\tif(rect.getStrokeType() == StrokeType.INSIDE){\n\t\t\t\t\trect.setStrokeType(StrokeType.INSIDE);\n\t\t\t\t\trect.setStroke(Color.TRANSPARENT);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public void highlightStop() {\n actualFillColor = new Color(0, 0, 0, 150);\n repaint();\n revalidate();\n }", "void updateFilteredUndoneTaskListNamePred(Set<String> keywords);", "private String removeStopWords(String str) throws IOException{\n String stopwords = \"!! ?! ?? !? ` `` '' -lrb- -rrb- -lsb- -rsb- , . : ; \\\" ' ? < > { } [ ] + - ( ) & % $ @ ! ^ # * .. ... 'll 's 'm a about above after again against all am an and any are aren't as at be because been before being below between both but by can can't cannot could couldn't did didn't do does doesn't doing don't down during each few for from further had hadn't has hasn't have haven't having he he'd he'll he's her here here's hers herself him himself his how how's i i'd i'll i'm i've if in into is isn't it it's its itself let's me more most mustn't my myself no nor not of off on once only or other ought our ours ourselves out over own same shan't she she'd she'll she's should shouldn't so some such than that that's the their theirs them themselves then there there's these they they'd they'll they're they've this those through to too under until up very was wasn't we we'd we'll we're we've were weren't what what's when when's where where's which while who who's whom why why's with won't would wouldn't you you'd you'll you're you've your yours yourself yourselves ### return arent cant couldnt didnt doesnt dont hadnt hasnt havent hes heres hows im isnt its lets mustnt shant shes shouldnt thats theres theyll theyre theyve wasnt were werent whats whens wheres whos whys wont wouldnt youd youll youre youve\";\n String[] allWords = str.toLowerCase().split(\" \");\n StringBuilder builder = new StringBuilder();\n for(String word : allWords) {\n if(!stopwords.contains(word)) {\n builder.append(word);\n builder.append(' ');\n } \n }\n String result = builder.toString().trim();\n return result;\n }", "private void highlightText(Text text){\r\n\t text.changeColor(AnimalScript.COLORCHANGE_COLOR, Color.RED, new TicksTiming(0), new TicksTiming(0));\r\n\t }", "public StopWordRemover( ) {\n\t\t// Load and store the stop words from the fileinputstream with appropriate data structure.\n\t\t// NT: address of stopword.txt is Path.StopwordDir\n\t}", "private static String removeWord(String string, String word) {\n\t\tif (string.contains(word)) {\n\t\t\tstring = string.replaceAll(word, \"\");\n\t\t}\n\n\t\t// Return the resultant string\n\t\treturn string;\n\t}", "public void removeSword() {\n \tthis.sword =null;\n \tthis.UIsword().set(false);\n \tdungeon.swordLeft().set(\"Sword Hits Left: 0\\n\");\n }", "private static void filterLeaveOnlyMatching(@NotNull final Iterable<String> suggestions, @NotNull final String textToMatch) {\n // TODO: use guava instead?\n final Iterator<String> iterator = suggestions.iterator();\n while (iterator.hasNext()) {\n if (!iterator.next().startsWith(textToMatch)) {\n iterator.remove();\n }\n }\n }", "public static void cleanLine(String[] wordsInLine){\n int i = 0;\n for(String word : wordsInLine){\n wordsInLine[i] = word.toLowerCase().replaceAll(\"[^a-zA-Z0-9\\\\s]\",\"\");\n i++;\n }\n }", "public void removePos(String word, IPosition pos) throws WordException;", "public void removeSelectedTags(String t) {\n\t\tif (selectedTags.contains(t)) {\n\t\t\tthis.selectedTags.remove(t);\n\t\t} else {\n\t\t\tSystem.out.println(\"Tag not selected!\");\n\t\t}\n\t}", "public String getCorrectionWord(String misspell);", "@Override\n public void replaceOneWord(String from, String to) {\n Collections.replaceAll(wordsLinkedList, from, to);\n }", "void unsetSpokes();", "public void removeAllTranslations()\n\t{\n\t\tfor (int k = 0; k < this.xliffEditorWindow.getIOverallSegmentNumber(); k++)\n\t\t{\n\t\t\tthis.xliffEditorWindow.gotoSegment(k, true);\n\t\t\tint iRes = this.xliffEditorWindow.setTranslation(k, \"\", false);\n\t\t\tif (iRes == SWT.YES)\n\t\t\t\tthis.xliffEditorWindow.getBTranslatedSegments()[k] = false;\n\t\t}\n\t\tthis.showAltTrans(this.xliffEditorWindow.getIOverallSegmentNumber() - 1, 0, 0);\n\t\tsegmentNumber.setText(message.getString(\"_Segmentnumber\") + \" \" + (this.xliffEditorWindow.getIOverallSegmentNumber() - 1) + \"/\"\n\t\t\t\t+ this.getXliffEditorWindow().getIOverallSegmentNumber() + \" (\" + this.getXliffEditorWindow().countApprovedSegments() + \"/\"\n\t\t\t\t+ this.getXliffEditorWindow().countTranslatedSegments() + \")\");\n\n\t}", "@Override\n\tprotected void filterUserInputText(AttributedString text) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tchar ch = text.charAt(i);\n\t\t\tif (ch == '\\t' || ch == '\\n' || ch == '\\r') {\n\t\t\t\ttext.delete(Range.make(i, 1));\n\t\t\t\ti--;\n\t\t\t}\n\t\t}\n\t\tsuper.filterUserInputText(text);\n\t}", "public void unsetBold()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BOLD$4, 0);\n }\n }", "public void setHighlight(boolean high);" ]
[ "0.7570647", "0.7247604", "0.6895501", "0.67993736", "0.6615981", "0.659097", "0.6499931", "0.63813543", "0.62091523", "0.6150599", "0.61286175", "0.59662604", "0.5925606", "0.58978444", "0.5808415", "0.5787608", "0.57728124", "0.5738306", "0.5696929", "0.5696841", "0.5684459", "0.5671836", "0.5646455", "0.56214356", "0.5614181", "0.5592064", "0.5568255", "0.5544893", "0.55256784", "0.55204695", "0.55179745", "0.55156773", "0.5493805", "0.54765534", "0.5454521", "0.54375833", "0.54283595", "0.54210204", "0.5401511", "0.53963596", "0.5385577", "0.5383183", "0.53710485", "0.5367157", "0.53484553", "0.53457046", "0.53412914", "0.5337002", "0.5315877", "0.5314886", "0.5309932", "0.5301098", "0.52994925", "0.5290709", "0.52777076", "0.52772236", "0.5275428", "0.5274756", "0.52473146", "0.5246199", "0.52410626", "0.52371", "0.5234036", "0.52249026", "0.52185374", "0.5216834", "0.52075404", "0.5204612", "0.5199266", "0.51990694", "0.51742643", "0.51692516", "0.51572716", "0.5152879", "0.5152281", "0.51430106", "0.51416194", "0.5126814", "0.51241654", "0.5122241", "0.51219165", "0.51134735", "0.5112449", "0.51083946", "0.5108005", "0.5098305", "0.509191", "0.5084798", "0.50767595", "0.5076311", "0.5072646", "0.5062717", "0.50607157", "0.5056414", "0.50534844", "0.5046876", "0.5042109", "0.50368136", "0.5030844", "0.50222987" ]
0.7579834
0
/ Used to add the name of current input file an dictionary file so that the user can know with which pair they are working
public void extend(String inputFileName) { super.append(inputFileName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void doDictionaryEditMode(String[] args) throws FileNotFoundException {\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\tString testDictionary = args[1];\r\n\t\tFile f = new File(testDictionary);\r\n\t\tString name = f.getName();\r\n\t\tString newname = name + \"~\";\r\n\t\tFile newFile = new File(newname);\r\n\r\n\t\tDictionary dic;\r\n\t\ttry {\r\n\t\t\tdic = new Dictionary(testDictionary);\r\n\t\t\tBinarySearchTree<Entry> oldtree = dic.getBST();\r\n\t\t\tDictionary olddic = new Dictionary(oldtree);\r\n\t\t\tSystem.out.println(\"Editing dictionary.txt\");\r\n\t\t\tSystem.out.printf(\"Word: \");\r\n\t\t\tScanner in = new Scanner(System.in);\r\n\t\t\tString input = in.next();\r\n\t\t\toutloop:\r\n\t\t\t// the case to exit the program\r\n\t\t\twhile (!input.equals(\"!quit\")) {\r\n\t\t\t\t// check whether the input is valid\r\n\t\t\t\tif (!isValidWord(input)) {\r\n\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \" is not valid. Please enter a valid word\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (dic.hasWord(input)) {\r\n\t\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \"was found\");\r\n\t\t\t\t\t\tSystem.out.printf(\"[r]emove/[g]et the definition/[c]hange definition/do [n]othing: \");\r\n\t\t\t\t\t\tScanner in2 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input2 = in2.next();\r\n\t\t\t\t\t\t// the case of get definition\r\n\t\t\t\t\t\tif (input2.equals(\"g\")) {\r\n\t\t\t\t\t\t\tif (dic.getDefinitionOf(input) == null)\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"<undefined>\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println(dic.getDefinitionOf(input));\r\n\t\t\t\t\t\t\t// the case of change definition\r\n\t\t\t\t\t\t} else if (input2.equals(\"c\")) {\r\n\t\t\t\t\t\t\tScanner in3 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tSystem.out.printf(\"Definition: \");\r\n\t\t\t\t\t\t\tin3.useDelimiter(\"\\n\");\r\n\t\t\t\t\t\t\tString input3 = in3.next();\r\n\r\n\t\t\t\t\t\t\t// in3.close();\r\n\t\t\t\t\t\t\tdic.updateEntry(input, input3);\r\n\t\t\t\t\t\t\t// the case of remove the word\r\n\t\t\t\t\t\t} else if (input2.equals(\"r\")) {\r\n\t\t\t\t\t\t\tdic.removeEntry(input);\r\n\t\t\t\t\t\t} else if (input2.equals(\"n\")) {\r\n\t\t\t\t\t\t\t// do nothing\r\n\t\t\t\t\t\t} else if (input2.equals(\"!quit\"))\r\n\t\t\t\t\t\t\tbreak outloop;\r\n\t\t\t\t\t\t// if the input is not in dictionary\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \"not found\");\r\n\t\t\t\t\t\tSystem.out.printf(\"[a]dd/add with [d]efinition/[n]othing: \");\r\n\t\t\t\t\t\tScanner in4 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input4 = in4.next();\r\n\t\t\t\t\t\t// the case of add new word\r\n\t\t\t\t\t\tif (input4.equals(\"a\"))\r\n\t\t\t\t\t\t\tdic.addEntry(input);\r\n\t\t\t\t\t\t// the case of get definition\r\n\t\t\t\t\t\telse if (input4.equals(\"d\")) {\r\n\t\t\t\t\t\t\tSystem.out.printf(\"Definition: \");\r\n\t\t\t\t\t\t\tScanner in5 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tString input5 = in5.next();\r\n\t\t\t\t\t\t\tdic.addEntry(input4, input5);\r\n\t\t\t\t\t\t\t// the case of doing nothing\r\n\t\t\t\t\t\t} else if (input4.equals(\"n\")) {\r\n\t\t\t\t\t\t} else if (input4.equals(\"!quit\"))\r\n\t\t\t\t\t\t\tbreak outloop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.printf(\"Word: \");\r\n\t\t\t\tinput = in.next();\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\t// update in the new File and add~ into the old File\r\n\t\t\tolddic.printToFile(newFile.getName());\r\n\t\t\tdic.printToFile(testDictionary);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n File f = new File(\"dict2.txt\");\n Scanner readFile = new Scanner(f);\n ArrayList<String> dictionary = new ArrayList<String>();\n \n while (readFile.hasNext()) {\n dictionary.add(readFile.next());\n }\n \n HangmanLogic logic = new HangmanLogic(dictionary);\n HangmanUserInterface game = new HangmanUserInterface(logic);\n game.start();\n }", "public void openForInput () \n throws IOException {\n this.dict = new DataDictionary();\n openForInput (dict);\n }", "public final void loadDict() {\r\n try {\r\n FileInputStream inf = new FileInputStream(dictionary);\r\n char let;\r\n String str = \"\";\r\n int n = 0;\r\n while ((n = inf.read()) != -1) {\r\n let = (char) n;\r\n if (Character.isLetter(let)) {\r\n str += Character.toLowerCase(let);\r\n }\r\n if ((Character.isWhitespace(let) || let == '-') && !str.isEmpty()) { \r\n dictList[str.charAt(0) - 97].add(str);\r\n str = \"\";\r\n\r\n }\r\n\r\n }\r\n inf.close();\r\n\r\n } catch (IOException e) {\r\n\r\n e.printStackTrace();\r\n\r\n }\r\n }", "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 void saveButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_saveButtonMouseClicked\n \n FileDialog dialog = new FileDialog(this, \"Ssuvegarder le fichier dictionnaire\", FileDialog.SAVE);\n dialog.setFile(loadedDictionaryFilename);\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n // add .txt extension if user didn't add it\n if(!filename.substring(filename.length() - 4).equals(\".txt\"))\n filename = filename + \".txt\";\n \n // add full path of the filename\n filename = dialog.getDirectory() + filename;\n \n // get all WordDefinition in an arraylist \n ArrayList<WordDefinition> allWordDefinitionList = new ArrayList<>();\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n ArrayList<WordDefinition> allWordsInTree = lexiNodeTrees.get(i).getAllWordsFromTree();\n \n for(int j = 0 ; j < allWordsInTree.size() ; j++)\n {\n allWordDefinitionList.add(allWordsInTree.get(j));\n }\n }\n \n // sort the list of word definition in alphabetical order\n Collections.sort(allWordDefinitionList, new WordDefinitionComparator());\n \n // save to file\n if(DictioFileOperations.saveListToFile(filename, allWordDefinitionList))\n {\n loadedDictionaryFilename = filename; // save new name in case user wants to save again\n JOptionPane.showMessageDialog(this, \"La list des mots a été \"\n + \"sauvegardé dans le fichier\\n\" + filename + \".\\n\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n\n else // if there was a problem saving the file\n JOptionPane.showMessageDialog(this, \"ERREUR: Impossible de \"\n + \"sauvegarder dans le fichier.\\n\\n\", \"ERREUR\", \n JOptionPane.ERROR_MESSAGE);\n }\n }", "public void insertFromFile() throws IOException {\n File file = new File(Main.DATA_FILE_PATH);\n Scanner sc = new Scanner(file);\n\n dictionary = new Dictionary();\n TreeMap<String, ArrayList<String>> wordList = new TreeMap<>();\n String target = sc.nextLine().substring(1).trim();\n ArrayList<String> explain = new ArrayList<>();\n while (sc.hasNextLine()) {\n String str = sc.nextLine();\n if (str.indexOf(\"@\") == 0) {\n wordList.put(target, explain);\n target = str.substring(1).trim();\n explain = new ArrayList<>();\n } else if (str.indexOf(\"=\") == 0) {\n str = str.replace(\"+\", \" : \");\n String word = \" = \" + str.substring(1);\n explain.add(word);\n } else if (str.indexOf(\"#\") == 0 || str.indexOf(\"*\") == 0) {\n explain.add(str);\n } else {\n explain.add(\" \" + str);\n }\n }\n dictionary.setWordList(wordList);\n sc.close();\n }", "MainDictionary ( String pathToFile ) {\n WordListReader reader = new WordListReader( pathToFile );\n List<String> wordList = reader.asLowerCaseList();\n \n this.dictionary = new HashSet<>( wordList );\n \n if ( this.dictionary.isEmpty() ) {\n LOGGER.warn( \"Main dictionary is empty\" );\n }\n }", "private void writeToDictionary() throws IOException {\n\n File file = new File(filePathDictionaryAuto);\n\n if (file.delete()) {\n file.createNewFile();\n Enumeration e = dictionaryTerms.keys();\n while (e.hasMoreElements()) {\n String word = (String) e.nextElement();\n if (word.length() != 1) {\n writePrintStream(dictionaryTerms.get(word) + \" \" + word, filePathDictionaryAuto);\n }\n }\n } else {\n System.out.println(\"Error in dictionary file\");\n }\n System.out.println(\"Dictionary updated\");\n\n }", "private void populateDictionary() throws IOException {\n populateDictionaryByLemmatizer();\n// populateDictionaryBySynonyms();\n }", "public static void doInteractiveMode(String[] args) throws FileNotFoundException {\r\n\t\tString dictionaryFile = args[0];\r\n\t\tString filename = args[1];\r\n\t\t// create file for original file\r\n\t\tFile newFile = new File(dictionaryFile);\r\n\t\tString name = newFile.getName();\r\n\t\tString newname = name + \"~\";\r\n\r\n\t\tDictionary dic = new Dictionary(dictionaryFile);\r\n\r\n\t\t// deep copy of binary search tree\r\n\t\tBinarySearchTree<Entry> oldtree = dic.getBST();\r\n\t\tDictionary olddic = new Dictionary(oldtree);\r\n\r\n\t\ttry {\r\n\t\t\tFile f = new File(filename);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\t// scan each line\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString sentence = in.nextLine();\r\n\t\t\t\tString[] words = sentence.split(\" \");\r\n\t\t\t\t// transform string[] into ArrayList\r\n\t\t\t\tArrayList<String> al = new ArrayList<String>(Arrays.asList(words));// string\r\n\r\n\t\t\t\tint errWordNum = 1;\r\n\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t\twhile (errWordNum != 0) {\r\n\t\t\t\t\terrWordNum = 0;\r\n\t\t\t\t\tArrayList<String> errWord = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<Integer> errInd = new ArrayList<Integer>();\r\n\t\t\t\t\t// copy the old misspelling word\r\n\t\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t\t// the case of punctuation\r\n\t\t\t\t\t\tif (!dic.hasWord(al.get(i).replaceAll(\"[^a-zA-Z ]\", \"\"))) {\r\n\t\t\t\t\t\t\terrWordNum += 1;\r\n\t\t\t\t\t\t\terrWord.add(al.get(i));\r\n\t\t\t\t\t\t\terrInd.add(i);\r\n\t\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\"^\");\r\n\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (i != al.size() - 1) {\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tSystem.out.println();\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// if arrayList still has misspelling words\r\n\t\t\t\t\tif (errWordNum != 0) {\r\n\t\t\t\t\t\tSystem.out.print(errWord.get(0) + \": \");\r\n\t\t\t\t\t\tSystem.out.print(\"[r]eplace/[a]ccept? \");\r\n\t\t\t\t\t\tScanner in2 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input2 = in2.next();\r\n\t\t\t\t\t\t// the case of replacement\r\n\t\t\t\t\t\tif (input2.equals(\"r\")) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Replacement text: \");\r\n\t\t\t\t\t\t\tScanner in3 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tString input3 = in3.next();\r\n\t\t\t\t\t\t\tal.set(errInd.get(0), input3);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// the case of acceptance\r\n\t\t\t\t\t\tif (input2.equals(\"a\")) {\r\n\t\t\t\t\t\t\tdic.addEntry(errWord.get(0));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\t\tSystem.out.print(al.get(i) + \" \");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println(al.get(i));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!input2.equals(\"r\"))\r\n\t\t\t\t\t\t\terrWordNum--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\t// keep the original file with ~\r\n\t\t\tolddic.printToFile(newname);\r\n\t\t\t// update the change in the new file\r\n\t\t\tdic.printToFile(dictionaryFile);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"check the existance of filename again\");\r\n\t\t}\r\n\r\n\t}", "private static void initFileNames() {\n if (fileNames == null) {\n fileNames = new HashMap<>();\n }\n fileNames.put(\"Linked List (simple)\", \"MySimpleLinkedList\");\n fileNames.put(\"Linked List\", \"MyLinkedList\");\n fileNames.put(\"Stack\", \"MyStack\");\n fileNames.put(\"Queue\", \"MyArrayDeque\");\n fileNames.put(\"Graph\", \"MyGraph\");\n fileNames.put(\"HashTable\", \"MyHashTable\");\n fileNames.put(\"Linear Search\", \"Algorithms\");\n fileNames.put(\"Binary Search\", \"Algorithms\");\n fileNames.put(\"Bubble Sort\", \"Algorithms\");\n fileNames.put(\"Insertion Sort\", \"Algorithms\");\n fileNames.put(\"Selection Sort\", \"Algorithms\");\n fileNames.put(\"Shell Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort\", \"Algorithms\");\n fileNames.put(\"Merge Sort (in-place)\", \"Algorithms\");\n fileNames.put(\"Quick Sort\", \"Algorithms\");\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>[email protected]\");\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>[email protected]\");\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>[email protected]\");\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 readDictionary()\r\n\t{\r\n\t\t//It trys to read over the file using try-catch in case of an Exception\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"english.0\");\r\n\t\t\tScanner scan = new Scanner(file);\r\n\t\t\t//It reads over the file as long as there are words to read and we insert them into the given storage\r\n\t\t\twhile(scan.hasNext()) {\r\n\t\t\t\tdata.insert(scan.next());\r\n\t\t\t}\r\n\t\t\tscan.close(); \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t}", "public MapDictionary(String filename) {\n\t\ttry {\n\t\t\tScanner scan = new Scanner(new File(filename));\n\t\t\t\n\t\t\t\twhile(scan.hasNextLine()) {\n\t\t\t\t\tString word = scan.nextLine().toLowerCase();\n\t\t\t\t\tString signature = PredictivePrototype.wordToSignature(word);\n\t\t\t\t\tSet <String> wordsSet = new HashSet<String>();\n\t\t\t\t\tif(PredictivePrototype.isValid(signature)==true && word.length() == signature.length()) {\n\t\t\t\t\t\twordsSet.add(word);\n\t\t\t\t\t\tif(dictionary.containsKey(signature)) {\n\t\t\t\t\t\t\tdictionary.get(signature).add(word);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tdictionary.put(signature, wordsSet);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tscan.close();\n\t\t\t\t\n\t\t} catch(IOException e){\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\n\t}", "private void upgradeDictionary() throws IOException {\n File fileAnnotation = new File(filePathAnnSource);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n if (fileAnnotation.exists()) {\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf(\"\\t\") + 1);\n\n if (!nonDictionaryTerms.contains(word.toLowerCase())) {\n if (dictionaryTerms.containsKey(word.toLowerCase())) {\n if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n System.out.println(\"Conflict: word:: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n nonDictionaryTerms.add(word.toLowerCase());\n// removeLineFile(dictionaryTerms.get(word.toLowerCase())+\" \"+word.toLowerCase(),filePathDictionaryAuto);\n dictionaryTerms.remove(word.toLowerCase());\n writePrintStream(word, filePathNonDictionaryAuto);\n }\n } else {\n System.out.println(\"Updating Dictionary:: Word: \" + word + \"\\tTag: \" + annotations[1]);\n dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n writePrintStream(annotations[1] + \" \" + word.toLowerCase(), filePathDictionaryAuto);\n }\n }\n\n// if (dictionaryTerms.containsKey(word.toLowerCase())) {\n// if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n// System.out.println(\"Conflict: word: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n// nonDictionaryTerms.add(word.toLowerCase());\n//\n// }\n// } else {\n// dictionary.add(word.toLowerCase());\n// dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n// System.out.println(\"Updating Dictionary: Word: \" + word + \"\\tTag: \" + annotations[1]);\n// }\n }\n }\n\n\n br.close();\n fr.close();\n }", "public static void main(String[] args)\n\t\tthrows FileNotFoundException, IOException\n\t{\n \t\tPrintWriter test = new PrintWriter(new FileWriter(\"DictionaryTESTING.txt\"));\n \t\t\n \t\ttest.println(\"Dictionary TESTING\");\n \t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam = new Dictionary()\");\n\t\tDictionary noParam = new Dictionary();\n\t\t\n\t\ttest.println(\"fileParam = new Dictionary('mywords.txt')\");\n\t\tDictionary fileParam = new Dictionary(\"mywords.txt\");\n\n\t\ttest.println();\n\t\ttest.println(\"mywords.txt contains select words in the form of a dictionary, i.e.\");\n\t\ttest.println(\"a\");\n\t\ttest.println(\"an\");\n\t\ttest.println(\"apple\");\n\t\ttest.println(\"banana\");\n\t\ttest.println(\"boy\");\n\t\ttest.println(\"can\");\n\t\ttest.println(\"cat\");\n\t\ttest.println(\"etc.\");\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.getLongestWordLength('aunt') :\" + noParam.getLongestWordLength(\"aunt\"));\n\t\ttest.println(\"fileParam.getLongestWordLength('zoo') :\" + fileParam.getLongestWordLength(\"but\"));\n\t\ttest.println(\"noParam.getLongestWordLength('rid') :\" + noParam.getLongestWordLength(\"rid\"));\n\t\ttest.println(\"fileParam.getLongestWordLength('300') :\" + fileParam.getLongestWordLength(\"300\"));\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.wordExists('apple') :\" + noParam.wordExists(\"apple\"));\n\t\ttest.println(\"fileParam.wordExists('zoo') :\" + fileParam.wordExists(\"zoo\"));\n\t\ttest.println(\"noParam.wordExists('rid') :\" + noParam.wordExists(\"rid\"));\n\t\t\n\t\ttest.println(\"fileParam.wordExists('alabama') :\" + fileParam.wordExists(\"alabama\"));\n\t\ttest.println(\"noParam.wordExists('zen') :\" + noParam.wordExists(\"zen\"));\n\t\ttest.println(\"fileParam.wordExists('randolf') :\" + fileParam.wordExists(\"randolf\"));\n\t\ttest.println(\"noParam.wordExists('300') :\" + noParam.wordExists(\"300\"));\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.toString() :\" + noParam.toString());\n\t\ttest.println(\"fileParam.toString() :\" + fileParam.toString());\n\n\t\ttest.close();\t\t\n\t}", "public static void startup() {\n\t\tString thisLine;\n\t\tString currentName = \"\";\n\t\tboolean next = true;\n\n\t\t// DEBUG\n\t\t// System.out.println(\"entered here\");\n\n\t\t// Loop across the arguments\n\n\t\t// Open the file for reading\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(GIGA_WORD));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// .replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tString[] wordNumber = str.split(\"[ ]{2,}\");\n\t\t\t\tString word = wordNumber[0].toLowerCase();\n\t\t\t\tint cnt = Integer.parseInt(wordNumber[1]);\n\t\t\t\tgigaMap.put(word, cnt);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tif (str.equals(\"[Term]\")) {\n\t\t\t\t\tnext = true;\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"name:\")) {\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tcurrentName = str.replaceAll(\"name: \", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"synonym:\")) {\n\t\t\t\t\tif (str.contains(\"EXACT\") || str.contains(\"NARROW\")) {\n\t\t\t\t\t\t// synonym..\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"synonym:.*\\\"(.*)\\\".*\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(str);\n\t\t\t\t\t\t// DEBUG\n\t\t\t\t\t\t// System.err.println(str);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tString syno = matcher.group(1);\n\t\t\t\t\t\t\tif (!currentName.equals(\"\")) {\n\t\t\t\t\t\t\t\t// System.err.format(\"%s:%s.\\n\", currentName,\n\t\t\t\t\t\t\t\t// syno);\n\n\t\t\t\t\t\t\t\tadd(currentName, syno);\n\t\t\t\t\t\t\t\tadd(syno, currentName);\n\t\t\t\t\t\t\t\trecursiveAddSyno(currentName, syno);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error: \" + e);\n\t\t}\n\t}", "public void writeFile(String filePath, Map input) {\n }", "public String getUserDictPath(String dataname, String username){\n String userdictpath = String.format(\"dicts/%s-%s.txt\", dictname, username);\n return userdictpath;\n }", "public void newFile() {\n\t\tString filename = \"untitled\";\n\t\tfilename = JOptionPane.showInputDialog(null,\n\t\t\t\t\"Enter the new file name\");\n\t\taddTab(filename+\".minl\");\n\t}", "public static void loadTargetTerm2IdMapping(File input) throws IOException {\n\t\t\tm_namesMap = new SimpleBidirectionalMap<String, Integer>();\n\t\t\tString encoding = FileUtils.getFileEncoding(input);\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(input), encoding));\n\t\t\tString line = reader.readLine();\n\t\t\tint lineNum = 1;\n\t\t\tboolean testFormat = false;\n\t\t\tif(StringUtils.checkIfNumber(line.split(\"\\t\")[0]))\n\t\t\t\ttestFormat = true;\n\t\t\twhile(line!= null) {\n\t\t\t\tif(line.equals(\"@@@\"))\n\t\t\t\t\tbreak;\n\t\t\t\tif(testFormat) {\n\t\t\t\t\tString num = line.split(\"\\t\")[0];\n\t\t\t\t\tSystem.out.println(\"key: \"+line.trim().substring(num.length()+1) + \" value: \" + Integer.parseInt(num));\n\t\t\t\t\tm_namesMap.put(line.trim().substring(num.length()+1), Integer.parseInt(num));\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"key????\" + lineNum + \"instead of \" + line.split(\"\\t\")[0]);\n\t\t\t\t\tm_namesMap.put(line.trim(), lineNum);\n\t\t\t\t}\n\t\t\t\tline = reader.readLine();\n\t\t\t\tlineNum ++;\n\t\t\t}\n\t\t}", "public void setupFiles() {\n File inputDataFile = new File(inputFileName);\n try {\n inputFile = new Scanner(inputDataFile);\n FileWriter outputDataFileOA = new FileWriter(outputFileNameOA);\n FileWriter outputDataFileLL = new FileWriter(outputFileNameLL);\n outputFileOA = new PrintWriter(outputDataFileOA);\n outputFileLL = new PrintWriter(outputDataFileLL);\n outputFileOA.println(\"Output from open addressing hash table:\");\n outputFileOA.println();\n outputFileLL.println(\"Output from linked list hash table:\");\n outputFileLL.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public TreeDictionary(String filename) {\n\t\tString entry;\n\t\ttry {\n\t\t\tBufferedReader in = new BufferedReader(new FileReader(filename));\n\t\t\twhile((entry=in.readLine())!=null){\n\t\t\t\tif(MapDictionary.isValidWord(entry)){\n\t\t\t\t\tString signature = wordToSignature(entry.toLowerCase());\n\t\t\t\t\tinsert(entry, signature);\n\t\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\tin.close();\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"File not found\");\n\t\t}\n\t}", "public MapDictionary(String dictionaryLocation) {\n\t\ttry {\n\t\t\tScanner dictionary = new Scanner(new FileReader(dictionaryLocation));\n\t\t\twhile(dictionary.hasNextLine()) {\n\t\t\t\tString word = dictionary.nextLine().toLowerCase();\n\t\t\t\tif(PredictivePrototype.isValidWord(word))\n\t\t\t\t\taddElement(word, PredictivePrototype.wordToSignature(word));\n\t\t\t}\n\t\t\tdictionary.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\tSystem.out.print(\"Dictionary not found.\");\n\t\t}\n\t}", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "public void exportDictionary() \r\n\t{\t\r\n\t\tInputStream is = this.getClass().getResourceAsStream(\"/dictionary.sqlite\");\t\t\r\n\t\tOutputStream os = null;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tos = new FileOutputStream(fDictionaryFile());\r\n\t\t\tbyte[] buffer = new byte[1024];\r\n\t\t\tint length;\r\n\t\t\t\r\n\t\t\t//copy the file content in bytes \r\n\t\t\twhile ((length = is.read(buffer)) > 0) \r\n\t\t\t{\r\n\t\t\t\tos.write(buffer, 0, length);\r\n\t\t\t}\r\n\r\n\t\t\tis.close();\r\n\t\t\tos.close();\r\n\r\n\t\t\tSystem.out.println(\"/* Dictionary export successful! */\");\r\n\t\t} \r\n\t\tcatch(IOException e) \r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public void addfile() {\n\t\tString name;\r\n\t\tSystem.out.println(\"Enter the file name you want to add\");\r\n Scanner sc = new Scanner(System.in);\r\n name = sc.nextLine();\r\n try {\r\n \t\tFile file = new File(\"g:\\\\LockedMe\\\\\"+name);\r\n \t\tif(file.createNewFile()) {\r\n \t\t\tSystem.out.println(\"New file created\");\r\n \t\t}\r\n \t\telse {\r\n \t\t\tif(file.exists())\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"file already exists\");\r\n \t\t\t}\r\n \t\t\telse\r\n \t\t\t{\r\n \t\t\t\tSystem.out.println(\"file does not exist\");\r\n \t\t\t}\r\n \t\t}\r\n }\r\n catch(Exception e)\r\n {\r\n \t e.printStackTrace();\r\n }\r\n\t}", "public void loadDictionary() {\r\n\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/English.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t// Aggiungere parola alla struttura dati\r\n\t \t\t\r\n\t \t\tthis.dictionary.add(word);\r\n\t \t\t\r\n\t\t}\r\n\t\tbr .close();\r\n\t\t} catch (IOException e ){\r\n\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t try {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/Italian.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t\t// Aggiungere parola alla struttura dati\r\n\t\t \t\t\r\n\t\t \t\tthis.dizionario.add(word);\r\n\t\t \t\t\r\n\t\t\t}\r\n\t\t\tbr .close();\r\n\t\t\t} catch (IOException e ){\r\n\t\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }", "private void createDictionary() throws IOException {\r\n long start = System.currentTimeMillis();\r\n\r\n dict = new PrefixTree(); //new prefix\r\n BufferedReader reader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/dictionary.csv\"))); //read the file\r\n\r\n String line;\r\n while ((line = reader.readLine()) != null) {\r\n //System.out.println(line);\r\n addToRoot(line); //for each line add it in dictionary\r\n }\r\n\r\n System.out.println(\"Time took for making Dictionary : \" + (System.currentTimeMillis() - start) + \" ms\");\r\n }", "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 void saveDictionaryToFile() {\n\t\tdictionary.saveDictionary();\n\t}", "protected static String getFilename(String base) {\n //return Integer.toHexString(base.hashCode()) + \".map\";\n return base + \".map\";\n }", "private void loadButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loadButtonMouseClicked\n // open file dialog\n FileDialog dialog = new FileDialog(this, \"Choisir le fichier dictionnaire\", FileDialog.LOAD);\n dialog.setFile(\"*.txt\");\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n filename = dialog.getDirectory() + filename;\n lexiNodeTrees = DictioFileOperations.loadListFromFile(filename);\n \n if(lexiNodeTrees != null) // if list was successfully retrieved\n {\n loadedDictionaryFilename = filename;\n refreshAllWordsList();\n \n // clear text area and search suggestion\n searchSuggestionList.setModel(new DefaultListModel());\n definitionTextArea.setText(\"\");\n searchField.setText(\"\");\n }\n \n else // if file could not be loaded, show error dialog\n JOptionPane.showMessageDialog(this, \"ERREUR: Le fichier n'a \"\n + \"pas pu être chargé!\\n\\nVérifiez que le fichier est \"\n + \"valid est contient <<mot & définition>> sur toutes \"\n + \"les lignes\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "public static void main(String[] args) {\r\n\t\t// Load Dictionary\r\n\t\tString FileName;\r\n\t\tif (args.length == 0) {\r\n\t\t\t// Default dictionary\r\n\t\t\tFileName = \"G:\\\\455\\\\Homework4\\\\PA4\\\\bin\\\\testFiles\\\\sowpods.txt\";\r\n\t\t} else {\r\n\t\t\t// Given dictionary\r\n\t\t\tFileName = args[0];\r\n\t\t}\r\n\r\n\t\t// Construct AnagramDictionary and error detection\r\n\t\tAnagramDictionary ADictionary;\r\n\t\ttry {\r\n\t\t\tADictionary = new AnagramDictionary(FileName);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File is not found! \" + FileName);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Starting to print the prompt\r\n\t\tSystem.out.println(\"Type . to quit.\");\r\n\t\tSystem.out.print(\"Rack? \");\r\n\t\tsc = new Scanner(System.in);\r\n\t\tString Rack = sc.next();\r\n\t\t// Exit until typing in \".\" at the prompt\r\n\t\twhile (!Rack.equals(\".\")) {\r\n\t\t\t// Print the Scrabble word according to the current rack and AnagramDictionary\r\n\t\t\tPrint(Rack, ADictionary);\r\n\t\t\tSystem.out.print(\"Rack? \");\r\n\t\t\tRack = sc.next();\r\n\t\t}\r\n\t}", "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 Dictionary() throws IOException {\r\n\t\tthis(FILE_NAME);\r\n\t}", "public void dictionaryAdvanced() {\n dictionaryManagement.insertFromFile();\n showAllWords();\n dictionaryManagement.dictionaryLookup();\n dictionaryManagement.removeWord(\"Before\");\n showAllWords();\n dictionaryManagement.dictionaryExportToFile();\n }", "public Dictionary() {\n\t\tthis.dictionary = new HashSet<String>();\n\t\ttry {\n\t\t\tthis.populateDictionary();\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Error: File not found, please try again with a valid filename.\");\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\r\n\t\tDict dict = new Dict();\r\n\r\n\t\t// If there are no values, create some for testing\r\n\t\tif(DEBUG) {\r\n\t\t\tdict.add(\"carry\");\r\n\t\t\tdict.add(\"candy\");\r\n\t\t\tdict.add(\"dummy\");\r\n\t\t\tdict.store(PROPERTIES_FILE_NAME);\r\n\t\t}\r\n\r\n\t\t// Load initial values\r\n\t\tdict.load(PROPERTIES_FILE_NAME);\r\n\t\t\r\n\t\tfor(String word: new String[] {\"dandy\", \"diddly\", \"dancing\", \"domes\",\"cappy\"}) {\r\n\t\t\tSystem.out.printf(\"%s is %sin dict\\n\",word, dict.isUniqueDictionaryWord(word) ? \"\" : \"not \");\r\n\t\t}\r\n\t}", "public boolean loadDictionary(String fileName) throws IOException;", "public void save(String dataname, String username) throws IOException {\n List<String> outlines = newpairs.stream().map(p -> p.getFirst() + \"\\t\" + p.getSecond()).collect(toList());\n LineIO.write(getUserDictPath(dataname, username), outlines);\n }", "public void saveDictionary() throws IOException {\r\n\t\tif (modified) {\r\n\t\t\tSystem.out.println(\"Saving...\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Saving un-changed dictionary...\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tFileWriter fw = new FileWriter(\"dictionary.txt\", false);\r\n\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\tObject[] dictionaryArray = dictionary.toArray();\r\n\t\t\tfor (int i = 0; i < dictionary.size(); i++) {\r\n\t\t\t\tString word = (String)dictionaryArray[i];\r\n\t\t\t\tSystem.out.println(word);\r\n\t\t\t\tbw.write(word);\r\n\t\t\t\tbw.newLine();\r\n\t\t\t}\r\n\t\t\tbw.close();\r\n\t\t\tmodified = false;\r\n\t\t}\r\n\t\tcatch (IOException e) {\r\n\t\t\tSystem.out.println(\"An error occurred while attempting to save the dictionary.\");\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t}\r\n\t}", "public void initDict(String filename, int max_length) {\n\t\tsetDictionary(new ArrayList<String>());\n\t\tFile f = new File(\"src/\" + filename);\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(f))) {\n\t\t\tString line;\n\t\t\twhile ((line = br.readLine()) != null) {\n\t\t\t\tif (line.length() < max_length) {\n\t\t\t\t\tgetDictionary().add(line.toLowerCase());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.err.println(\"Poop\");\n\t\t}\n\n\t\tfor (String word : getDictionary()) {\n\t\t\taddWord(word);\n\t\t}\n\t}", "public static String getInput() {\r\n Scanner input = new Scanner(System.in);\r\n System.out.println(\"please input a file name with prefix\");\r\n System.out.println(\"the files should be pleased in the same directory\");\r\n String name = input.next();\r\n return name;\r\n }", "public String getKeyFilePath();", "private void dictionary(boolean updateDictionary) {\n try {\n loadDictionary(filePathDictionaryAuto);\n loadNonDictionaryTerms(filePathNonDictionaryAuto);\n if (updateDictionary) {\n upgradeDictionary();\n populateDictionary();\n writeToDictionary();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\n Dictionary d = new Dictionary(\"whatevs\", \"/home/mayhew/IdeaProjects/ner-annotation/bendict.txt\", \"testuser\");\n }", "void setFileName(String inputFileName)\n {\n this.inputFileName = inputFileName;\n }", "public void createDictionary() \n {\n dictionary = new HashMap<String, Map<String, String>>();\n \n addTranslations(\n \"EN\", // Language code\n \"OK\", \"Ok\",\n \"UPDATE\", \"Update\",\n \"OPEN\", \"Open\",\n \"CLOSE\", \"Close\",\n \"CANCEL\", \"Cancel\",\n \"MESSAGES\", \"Messages\",\n \"NO_MESSAGES_TO_DISPLAY\", \"No messages to display\",\n \"EVALUATE\", \"Evaluate\",\n \"RUN\", \"Run\",\n \"RUN_AS_ACTIVITY\", \"Run Activity\",\n \"OPEN_SCRIPT\", \"Open script\",\n \"START_SERVER\", \"Start server\",\n \"STOP_SERVER\", \"Stop server\",\n \"SHOW_MESSAGES\", \"Messages\",\n \"UPDATE_APP_SCRIPTS\", \"Update\",\n \"THIS_WILL_OVERWRITE_ALL_APP_SCRIPTS\", \"This will overwrite all application scripts!\",\n \"ENTER_FILE_OR_URL\", \"Enter file or url:\",\n \"UPDATE_APP_SCRIPTS_DONE\", \"Update complete!\",\n \"UPDATE_APP_SCRIPTS_DONE_RESTART\", \"Restart the application to make changes take effect\",\n \"QUIT_APP\", \"Quit\",\n \"CLOSE\", \"Close\",\n \"BE_KIND\", \"Be kind\",\n \"BE_KIND_MESSAGE\", \"Be a kind person\"\n );\n }", "public void writeKeysToFile(){\n if(d == null){\n calculateKeypair();\n }\n FileHandler fh = new FileHandler();\n fh.writeFile(sbPrivate.toString(), \"sk.txt\");\n fh.writeFile(sbPublic.toString(), \"pk.txt\");\n }", "WordLadderSolver(String dictionaryFile) {\n \tdictionary = new Dictionary(dictionaryFile); //Set up the words from the file\n }", "private void getDictionary(){\r\n // TODO: read Dictionary\r\n try{\r\n lstDictionary.clear();\r\n for(int i = 0; i < IConfig.LABEL_COUNT; i++){\r\n lstDictionary.add(new HashMap<>());\r\n DictionaryReader dictionaryReader = new DictionaryReader(lstDictionary.get(i), IConfig.DICTIONARY_URL[i]);\r\n dictionaryReader.read();\r\n }\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString newline = System.lineSeparator();\n\t\tFileReader fr = new FileReader(\"dictonary_english_special.txt\");\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString holder = \"\";\n\t\tString temp;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\ttemp = br.readLine();\n\t\t\t\tif(temp == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif(temp.length() < 4)\n\t\t\t\t\tcontinue;\n\t\t\t\t//System.out.println(temp);\n\t\t\t\tholder += temp + newline;\n\t\t\t} catch (IOException e) {break;}\n\t\t}\n\t\t\tFileWriter fw;\n\t\t\ttry {\n\t\t\t\tfw = new FileWriter(\"dictonary_english_hangman.txt\");\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\tbw.write(holder);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Done!\");\n\t}", "private static void inputs(Scanner fileScanner) {\n\t\tSystem.out.printf(\"You will now need to enter in the correct pathway to the files containing: \\n\\t1.) RNA table\\n\\t2.) RNA strand\\n\\t3.) Output Protien strand (this will create a new file)\\n\");\n\t\tSystem.out.println(\"Example pathway: C:/CSC142_143/DataFiles/RNATable.txt\");\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Table: \");\n\t\tsetRNATablePathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the RNA Strand: \");\n\t\tsetRNAStrandPathway(fileScanner.next());\n\t\tSystem.out.print(\"Please enter file pathway for the decoded protien: \");\n\t\tsetRNAOutPathway(fileScanner.next());\n\t\tfileScanner.close();\n\t\t\n\t}", "public Dictionary()\n\t\tthrows FileNotFoundException, IOException\n\t{\n\t\tthis(\"dictionary.txt\");\n\t}", "private void save(String fullname, boolean forNooJ)\n\t{\n\t\tif (!forNooJ)\n\t\t{\n\t\t\tString fname = org.apache.commons.io.FilenameUtils.getName(fullname);\n\t\t\tif (fname.charAt(0) == '_')\n\t\t\t{\n\t\t\t\tif (JOptionPane.showConfirmDialog(Launcher.getDesktopPane(),\n\t\t\t\t\t\t\"WARNING: file name starts with \\\"_\\\". Are you sure you want to save it with this prefix?\",\n\t\t\t\t\t\t\"NooJ: protected resource\", JOptionPane.YES_NO_OPTION) != 0)\n\t\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// MANAGE MULTIPLE BACKUPS\n\t\t\ttry\n\t\t\t{\n\t\t\t\tUtilities.savePreviousVersion(fullname, Launcher.preferences.multiplebackups);\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\te.printStackTrace();\n\t\t\t\tJOptionPane.showMessageDialog(Launcher.getDesktopPane(), \"NooJ: cannot save previous version of file\",\n\t\t\t\t\t\t\"NooJ\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t}\n\n\t\tBufferedWriter writer = null;\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\twriter = new BufferedWriter(new OutputStreamWriter(\tnew FileOutputStream(fullname), \"UTF8\"));\n\t\t\t\n\t\t\twriter.write(textPane.getText());\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(Launcher.getDesktopPane(), \"NooJ: cannot save dictionary\", \"NooJ\",\n\t\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif (writer != null)\n\t\t\t\t\twriter.close();\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t}\n\t\t}\n\n\t\tif (!forNooJ)\n\t\t\tfullName = fullname;\n\t\tmodified = false;\n\t\tshell.setTitle(org.apache.commons.io.FilenameUtils.getName(fullName));\n\t\tlblnTus.setText(\"Dictionary contains \" + Integer.toString(DictionaryDialogController.count(textPane))\n\t\t\t\t+ \" entries\");\n\t}", "private void handleInputData(String relation) throws IOException {\n String fileName = \"clueweb12_parsed.txt\";\n BufferedReader br = new BufferedReader(new FileReader(fileName));\n String line;\n PrintWriter writer = new PrintWriter(\"extracted_pairs/extracted_pairs_\" + argumentType + \".txt\", \"UTF-8\");\n while ((line = br.readLine()) != null) {\n // Saves parsed string in array and continues.\n if (line.contains(\"[Text=\")) {\n parsedWords = line.split(\"] \");\n continue;\n }\n // Following lines takes the relation we're looking for and finds the corresponding lemma.\n if (line.contains(relation + \"(\")) {\n try {\n line = line.substring(relation.length());\n String[] stringPair = line.replaceAll(\"[^0-9-]\", \"\").substring(1).split(\"-\");\n int[] wordIndexPair = new int[2];\n wordIndexPair[0] = Integer.parseInt(stringPair[0]); wordIndexPair[1] = Integer.parseInt(stringPair[1]);\n String headWord = parsedWords[wordIndexPair[0] - 1]; String argumentWord = parsedWords[wordIndexPair[1] - 1];\n String[] splitHead = headWord.split(\" \"); headWord = splitHead[4].substring(6);\n String[] splitArgument = argumentWord.split(\" \"); argumentWord = splitArgument[4].substring(6);\n String headPartOfSpeech = splitHead[3].substring(13); String argumentPartOfSpeech = splitArgument[3].substring(13);\n writer.println(headWord.toLowerCase() + \" \" + argumentWord.toLowerCase() +\n \" \" + headPartOfSpeech.toLowerCase() + \" \" + argumentPartOfSpeech.toLowerCase());\n } catch (Exception e) { continue; }\n }\n }\n // Close buffered input stream.\n br.close();\n }", "public void print(){\r\n\r\n\r\n System.out.println(\"File: \" + file.getName());\r\n Set<String> keys = getDataMap().keySet();\r\n System.out.println(\"Die Variablen in diesem File: \" + keys);\r\n System.out.println(\"Geben Sie eine Variable an: \");\r\n\r\n Scanner wert = new Scanner(System.in);\r\n String wert1 = wert.nextLine();\r\n\r\n DataContainer dc = getDataMap().get(wert1);\r\n\r\n if (dc != null) {\r\n System.out.println(wert1 + \":\" + dc.getValues());\r\n }\r\n /*System.out.println(\"File: \" + file.getName());\r\n\r\n\r\n if (dc1 != null && dc2 != null) {\r\n System.out.println(dc1.getVariableName() + \": \" + dc1.getValues());\r\n System.out.println(dc2.getVariableName() + \": \" + dc2.getValues());*/\r\n }", "public static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "public void addAlbum(String fileName) throws FileNotFoundException\n {\n String albumTitle = JOptionPane.showInputDialog(null, \"Enter an album name:\");\n albumTitle = albumTitle.replaceAll(\" \", \"_\");\n \n Collections.sort(catalog);\n int index = Collections.binarySearch(catalog, new Album(\"\",albumTitle,null), null);\n //this is to make sure we do not have duplicate albums\n if(index < 0) \n {\n String artistName = JOptionPane.showInputDialog(null, \"Enter the artist name:\");\n artistName = artistName.replaceAll(\" \", \"_\");\n \n FileOutputStream fos = new FileOutputStream(new File(fileName),true);\n PrintWriter pw = new PrintWriter(fos);\n \n String[] buttons = {\"I understand.\", \"I do not understand.\"};\n int selection = JOptionPane.showOptionDialog(null, \"You will now \"\n + \"enter the songs that belong on the album.\\nEnter ONE \"\n + \"song at a time. When finished adding songs, just \"\n + \"press cancel.\", \"Instructions.\", JOptionPane.YES_OPTION,\n JOptionPane.WARNING_MESSAGE, null, buttons, buttons[0]);\n \n if(selection == 0) //user understands the instructions\n {\n pw.print(artistName + \" \" + albumTitle);\n ArrayList<Track> albumsTracks = new ArrayList<>();\n\n String song = JOptionPane.showInputDialog(null, \"Submit song #1:\");\n for(int i=2; song != null; i++)\n {\n song = song.replaceAll(\" \", \"_\");\n pw.print(\" \" + song);\n albumsTracks.add(new Track(song));\n song = JOptionPane.showInputDialog(null, \"Submit song #\"+i+\":\");\n }\n pw.println();\n pw.close();\n JOptionPane.showMessageDialog(null,\n \"Album has successfully been written to '\" + fileName +\"'!\");\n \n Album newAlbum = new Album(artistName, albumTitle, albumsTracks);\n catalog.add(newAlbum); //here we put our new album in the \n Collections.sort(catalog); //general catalog and sort it by albums.\n }\n else //the user didn't understand the above instructions.\n //so the artist and album that the user entered is not printed.\n //since promptMenu() is recursive, we go back to the menu.\n JOptionPane.showMessageDialog(null, \"Going back to the menu now...\");\n }\n else //duplicate album found!\n System.out.println(\"Album '\" + albumTitle + \"' already exists in the catalog!\");\n }", "public void initialilzeMapEntry(String file){\n\t\tmap.put(file, new LinkedList<HashMap<Integer, Integer>>());\n\t}", "static void save() {\n String fileName, line = \"\"; char answer;\n System.out.print(\"Enter file name to save: \"); fileName = scan.nextLine();\n File file = new File(fileName);\n \n if ( file.isFile() ) {\n System.out.printf(\"WARNING: %s exists.\\n\", fileName);\n System.out.print(\"Overwrite (y/n)? \");\n \n while (line.length() < 1) line = scan.nextLine().toUpperCase();\n answer = line.charAt(0);\n\n switch (answer) {\n case 'N': save(); // reprompt\n case 'Y': break; // save the file\n default: save();\n }\n }\n pgmInf.savePgmFileAs(fileName);\n System.out.println(\"Terrain file saved.\");\n }", "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 }", "HashMap<String, ?> getOutputFiles();", "public void save(String filePath){\r\n Scanner in = new Scanner(System.in);\r\n File saveFile = new File(filePath);\r\n if (saveFile.exists()){\r\n System.out.println(\"Do you really, really want to overwrite your previous game?\");\r\n System.out.println(\"Yes: '1', No: '0'.\");\r\n int input = in.nextInt();\r\n if (input!=1){\r\n return;\r\n }\r\n }\r\n File saveDir = new File(this.savePath);\r\n if (!saveDir.exists()){\r\n saveDir.mkdir();\r\n }\r\n FileOutputStream fos = null;\r\n ObjectOutputStream out = null;\r\n try {\r\n fos = new FileOutputStream(saveFile);\r\n out = new ObjectOutputStream(fos);\r\n out.writeObject(this.serialVersionUID);\r\n out.writeObject(p);\r\n out.writeObject(map);\r\n out.close();\r\n } catch (Exception ex) {\r\n System.out.println(\"Make sure you don't use spaces in your folder names.\");\r\n ex.printStackTrace();\r\n }\r\n }", "public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String fileName = reader.readLine();\n reader.close();\n\n //verify is the program has the console arguments\n if (args.length > 0) {\n\n //put all file to Map<Integer, String>. Integer is the qual to id\n reader = new BufferedReader(new FileReader(fileName));\n HashMap<Integer, String> map = new LinkedHashMap<>();\n while (reader.ready()) {\n String data = reader.readLine();\n int i = Integer.parseInt(data.substring(0, 8).trim());\n map.put(i, data);\n }\n reader.close();\n\n if (args[0].equals(\"-u\")) { //verify is the first console argument equals to \"-u\"\n String lineValue = map.get(args[1]);\n String id, productName,price, quantity;\n// if (args.length == 5) {\n id = args[1];\n productName = args[2];\n price = args[3];\n quantity = args [4];\n String updatedLine = String.format(\"%-8s%-30.30s%-8s%-4s\", id, productName, price, quantity);\n map.put(Integer.parseInt(id.trim()), updatedLine);\n// } else if (args.length > 5) {\n//\n// }\n\n\n } else if (args[0].equals(\"-d\")) { //verify is the first console argument equals to \"-d\"\n map.remove(Integer.parseInt(args[1]));\n }\n\n //write the file from the Map\n BufferedWriter writer = new BufferedWriter(new FileWriter(fileName));\n for (String s: map.values()) {\n writer.write(s);\n writer.newLine();\n }\n writer.close();\n\n }\n }", "private String getQualifiedFileName() {\n\n\t\tString result = \"\";\n\t\t\n\t\tScanner keyInput = new Scanner(System.in);\n\t\t\n\t\tSystem.out.print(\"\\n Enter the qualifed file name to process. Relatives are ok. Just hit enter to stop: \");\n\t\tresult = keyInput.nextLine();\n\t\t\n\t\t\n\t\treturn result;\n\t\t\n\t}", "public static void doNonInteractiveMode(String[] args) throws FileNotFoundException {\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\r\n\t\tString dictionaryFile = args[1];\r\n\t\tString filename = args[2];\r\n\r\n\t\tDictionary dic = new Dictionary(dictionaryFile);\r\n\r\n\t\ttry {\r\n\t\t\tFile f = new File(filename);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString sentence = in.nextLine();\r\n\t\t\t\tString[] words = sentence.split(\" \");\r\n\t\t\t\t// transform string[] into ArrayList\r\n\t\t\t\tArrayList<String> al = new ArrayList<String>(Arrays.asList(words));\r\n\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t\t// remove ^ when the operation is finished\r\n\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t// the case of punctuation\r\n\t\t\t\t\tif (!dic.hasWord(al.get(i).replaceAll(\"[^a-zA-Z ]\", \"\"))) {\r\n\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\tif (j == 0)\r\n\t\t\t\t\t\t\t\tSystem.out.printf(\"^\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"check the existance of filename\");\r\n\t\t}\r\n\t}", "public void openForInput (RecordDefinition recDef) \n throws IOException {\n openForInput (recDef.getDict());\n }", "private void rememberOpenedlab(){\n try {\n FileOutputStream out = new FileOutputStream(iniFile);\n if(currentLab != null){\n writeValueToINI(out, \"prevLab\", currentLab.getPath());\n }\n else{\n writeValueToINI(out, \"prevLab\", \"\");\n }\n \n }\n catch (FileNotFoundException ex) { System.out.println(ex);} \n catch (IOException ex) { System.out.println(ex);} \n catch (NullPointerException ex) {\n System.out.println(ex);\n }\n }", "public void actionPerformed (ActionEvent ev){\n\t\t\tQAinput += qtextarea.getText() + \"/\" + atextarea.getText() ;\n\t\t\t\n\t\t\t//creating a new filename and write the array of questions and answers there. This works for Japanese as well\n\t\t\tFile filepath = new File(filename);\n\t\t\ttry {\n\t\t\t\tOutputStream out = new FileOutputStream(filepath);\n \t\t\t\tWriter writer = new OutputStreamWriter(out, StandardCharsets.UTF_8);\n\t\t\t\twriter.write(QAinput);\n\t\t\t\twriter.close();\n\t\t\t} catch(IOException ex) { System.out.print(\"caught\"); ex.printStackTrace(); }\n\n\t\t\t/*\n\t\t\tadding the filename to \"ListofDecks.txt\". This is done first by reading all of the data (all of filename that has been recorded previously)\n\t\t\tand then convert it to string and then you added your new filename to the string, and the last, you record the string to the file.\n\t\t\t*/\n\t\t\ttry {\t\n\t\t\t\tFile targetfile = new File (\"\");\n\t\t\t\tif (targetfile.exists()){\n\t\t\t\t\tBufferedReader reader = new BufferedReader (new FileReader (\"ListofDecks\"));\n\t\t\t\t\tString message = null;\n\t\t\t\t\tString fullmessage = null;\n\t\t\t\t\tfullmessage = \"\";\n\t\t\t\t\twhile ((message = reader.readLine()) != null ){\n\t\t\t\t\t\tfullmessage += message;\n\t\t\t\t\t}\t\n\t\t\t\t\treader.close();\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(fullmessage + filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tBufferedWriter writer = new BufferedWriter(new FileWriter (new File(\"ListofDecks\")));\n\t\t\t\t\twriter.write(filename + \"/\");\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException excc) { System.out.print(\"caught\"); excc.printStackTrace(); }\n\t\t\tframe.setVisible(false);\n\t\t\tmoriHomepage mori = new moriHomepage();\n\t\t}", "public static void main(String[] args) {\n HashMap<Integer,String> questions = new HashMap<Integer, String>();\n try\n// reading file\n {\n int count = 0;\n File quiz = new File(\"quizzer.txt\");\n Scanner reader = new Scanner(quiz);\n while (reader.hasNextLine())\n {\n questions.put(count,reader.nextLine());\n count++;\n }\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n//asking user for their name\n System.out.println(\"Enter Your name.\");\n String userName = scan.nextLine();\n// generating questions to ask\n int[] questionsToAsk = randomQuestionCollection(5,questions.size()-1);\n int score = 0;\n for(int i=0; i<questionsToAsk.length;i++) {\n String[] splitQuestion = questions.get(questionsToAsk[i]).split(\",\");\n if (askQuestion(splitQuestion) == 1) {\n System.out.println(\"Correct\");\n score++;\n }\n }\n// printing score\n System.out.println(userName+ \" you correctly answered \"+score + \"questions\");\n }", "public void createFile() throws IOException {\n String newName = input.getText();\n File user = new File(\"SaveData\\\\UserData\\\\\" + newName + \".txt\");\n\n if (user.exists() && !user.isDirectory()) {\n input.setStyle(\"-fx-border-color: red\");\n }\n if (user.exists() && !user.isDirectory() || newName.isEmpty()) {\n input.setStyle(\"-fx-border-color: red\");\n ERROR_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n\n }\n else {\n input.setStyle(\"-fx-border-color: default\");\n playerList.getItems().addAll(newName);\n PrintWriter newUser = new PrintWriter(new FileWriter(\"SaveData\\\\UserData\\\\\" + newName + \".txt\"));\n newUser.write(\"0 0 0 0 icon0 car\");\n newUser.close();\n MAIN_MENU_AUDIO.play(Double.parseDouble(getInitData().get(\"SFXVol\")));\n }\n }", "public Dictionary(String filename) throws IOException {\r\n\t\tFile dFile = new File(filename);\r\n\t\tFileReader fr = new FileReader(dFile);\r\n\t\tnew BufferedReader(fr).lines().forEach(e -> dict.add(e));\r\n\t\tfr.close();\r\n\t}", "public static void main(String [] args){\n\t\t String zipFilePath = args[1];\n\t\t //Directory of unzip Files\n\t\t String destDir = \"Dictionary\";\n\t\t //Calling a functions 5to unzip the directory\n\t\t unzip(zipFilePath, destDir);\n\t\t \n\n\t\t// The name of the file to open. File to be passed from arguments\n String fileName = args[0];\t\t\n\n // This will reference one line at a time\n String line = null;\n\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = \n new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = \n new BufferedReader(fileReader);\n\t\t\t\tint count = 0;\t\t\t\t\t\t//For counting how many words are wrong\n while((line = bufferedReader.readLine()) != null) {\n String[] words = line.split(\"\\\\W\");\t\t\t\t//Keeps the words in a line the the array \n int len = words.length;\n for(int i=0;i<len;i++){\n \t//System.out.println(words[i]);\n \tint flag = 0; \t\t\t\t//Just to check whether the words present or not\n \t//System.out.println(\"HI I am reading the file.\");\n \tFile folder = new File(\"Dictionary/dictionaries\");\n\t\t\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\t\t//System.out.println(listOfFiles.length);\n\t\t\t\t\tfor (int i1 = 0; i1 < listOfFiles.length; i1++) {\n\t\t\t\t\t\tif(flag == 1)\n\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 File file = listOfFiles[i1];\n\t\t\t\t\t if (file.isFile()) {\n\t\t\t\t\t\t//I am checking\n\t\t\t\t\t\t // The name of the file to open.\n //String fileName1 = file;\n\n // This will reference one line at a time\n //String line1 = null;\n\t\t\tScanner myScanner = null;\t\t\t\t//Using Scanner Class to Read the words From file\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmyScanner = new Scanner(file);\n\t\t\t\t\twhile(myScanner.hasNextLine()){\n \t\t\t\t\tif(flag==1){\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tString contents=myScanner.nextLine();\n \t\t\t\t\t//...\n\t\t\t\t\t\tif(words[i].equalsIgnoreCase(contents)){\n\t\t\t\t\t\t//System.out.println(\"The given word is \" + words[i]);\n\t\t\t\t\t\tflag = 1;\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//String contents = myScanner.nextLine();\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\tfinally\n\t\t\t\t{\n\t\t\t\t\tif(myScanner != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmyScanner.close(); \n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t\t } \n\t\t\t\t\t}\n\t\t\t\t\tif(flag==0){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tSystem.out.println(\"The wrong word is \" + words[i]);\n\t\t\t\t\t\t//System.out.println(i+1);\n\t\t\t\t\t}\n }\n //System.out.println(line);\n } \n\n // Always close files.\n bufferedReader.close(); \n System.out.println(\"The total number of wrong words are \");\n System.out.println(count);\n \n }\n catch(FileNotFoundException ex) {\n System.out.println(\n \"Unable to open file '\" + \n fileName + \"'\"); \n }\n catch(IOException ex) {\n System.out.println(\n \"Error reading file '\" \n + fileName + \"'\"); \n // Or we could just do this: \n // ex.printStackTrace();\n }\n \t}", "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}", "@Override\r\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tString fileName=JOptionPane.showInputDialog(\"Enter the File name without any extension\");\r\n\t\t\ttheGame.save(fileName);\r\n\t\t}", "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 }", "public abstract void readFromFile(String key, String value);", "public GameModel(String dict){\n try {\n dictionaryFile = new File(dict);\n this.phraseBook = GameDictionaryReader.readDictionary(dictionaryFile);\n } catch(FileNotFoundException e){\n System.out.println(\"ERROR: Not a valid dictionary file! (`\" + dictionaryFile.toString() + \"`)\");\n System.exit(1);\n }\n }", "void enterSection(String name) throws IOException;", "private Dictionary parseDictionary(String dictName, List<File> dictionaryFiles, Collection<File> acceptedFiles) {\n File referenceFile = null;\r\n Iterator<File> dictIterator = dictionaryFiles.iterator();\r\n while (dictIterator.hasNext()) {\r\n File dictFile = dictIterator.next();\r\n String[] nameParts = splitFileName(dictFile);\r\n if (REFERENCE_LANG_CODE.equalsIgnoreCase(nameParts[2])) {\r\n referenceFile = dictFile;\r\n dictIterator.remove();\r\n break;\r\n }\r\n }\r\n if (null == referenceFile) {\r\n throw new BusinessException(BusinessException.NO_REFERENCE_LANGUAGE);\r\n }\r\n Dictionary dictionary = parseReferenceFile(dictName, referenceFile);\r\n acceptedFiles.add(referenceFile);\r\n int sortNo = 1;\r\n for (File langFile : dictionaryFiles) {\r\n readLabels(langFile, dictionary, sortNo++);\r\n acceptedFiles.add(langFile);\r\n }\r\n return dictionary;\r\n }", "public InMemoryDictionary(File dictFile) {\n\t\t// TODO: Implement constructor\n\t}", "@Override\n\tpublic void processInput(Resource input, Resource output)\n\t{\n\n\t System.out.println(\"กกกก===INIT processInput SADI.skeleton===!!!\");\n\t\t String name = input.getProperty(Vocab.name).getString(); \n\t\t output.addProperty(Vocab.greeting, String.format(\"Hello, %s!\", name)); \n\t}", "public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\t// if an input file is already loaded, clear panel before adding new words\n\t\t\t\t\tif(!empty.status)\n\t\t\t\t\t{\n\t\t\t\t\t\t// new session only if user responds with yes\n\t\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to start a new spell check session?\");\n\n\t\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetContentPane().removeAll();\n\t\t\t\t\t\t\trevalidate();\n\t\t\t\t\t\t\tempty.status = false;\n\n\t\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\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\tnewSelectionResult = JFileChooser.CANCEL_OPTION;\n\t\t\t\t\t\t\tdictionarySelectionResult = JFileChooser.CANCEL_OPTION;\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\tempty.status = false;\n\n\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(newSelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\tinputFiles = newFileChooser.getSelectedFiles();\n\t\t\t\t\t\n\t\t\t\t\t\tinputTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\tinputTrees = treeHandler.convertMultipleFiles(inputFiles);\n\t\t\t\t\t\t\n\t\t\t\t\t\tdictionaryFileChooser = new JFileChooser();\n\t\t\t\t\t\tdictionaryFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tdictionaryFileChooser.setApproveButtonText(\"Load Dictionary\");\n\t\t\t\t\t\tdictionaryFileChooser.setDialogTitle(\"Load Dictionary File(s)\");\n\t\t\t\t\t\tdictionaryFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tdictionaryFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tdictionarySelectionResult = dictionaryFileChooser.showOpenDialog(null);\n\n\t\t\t\t\t\t// only change view if user inputs both an input and dictionary(ies)\n\t\t\t\t\t\tif(dictionarySelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdictionaryFiles = dictionaryFileChooser.getSelectedFiles();\n\t\t\t\t\t\t\tdictionaryTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\t\tdictionaryTrees = treeHandler.convertMultipleFiles(dictionaryFiles);\n\t\t\t\t\t\t\tcontentPane = getContentPane();\n\n\t\t\t\t\t\t\tinputText = new SpellCheckTextArea();\n\t\t\t\t\t\t\tinputText.setLineWrap(true);\n\t\t\t\t\t\t\tinputText.setWrapStyleWord(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdisplay.numWordsIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); //size of numDictionaries*numInputFiles + 1 for the 0 index\n\t\t\t\t\t\t\tdisplay.numReplaced = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numAdded = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numLinesIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numIgnored = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * get number of lines in input file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//zero location in list is added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(0);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0;\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(loc, Integer.valueOf(0)); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t \n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t \t\t\t \t\tdisplay.numLinesIn.set(loc, Integer.valueOf(display.numLinesIn.get(loc) + 1)); //increment lines read\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Reads file and displays ready for user input of add, replace, ignore\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//all zero locations in list are added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(0);\n\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Convenience for reading character files.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t //displays current input file and dictionary name at top of text\n\t\t\t\t\t \t\t\t \tinputText.extend(\"Input file: \" + inputFiles[index].getName() + \"\\tDictionary File: \" + dictionaryFiles[innerIndex].getName() + \"\\n\\n\");\n\n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t \t\tString[] textLine = line.split(seperator);\n\t\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t\t \t\tfor(String word : textLine) \n\t\t\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[\\n\\r\\t]+\", \"\");\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t\t \t\t if(!word.isEmpty()) \n\t\t\t\t\t\t\t\t \t\t {\n\t\t\t\t\t\t\t\t \t\t\t\tdisplay.numWordsIn.set(loc, Integer.valueOf(display.numWordsIn.get(loc) + 1)); //increment the number of words in the input file\n\t\t\t\t\t\t\t\t \t\t\t\ttuple3 = new SpellCheckWord(word.toLowerCase(), inputText.getText().length(), inputFiles[index], dictionaryFiles[innerIndex]);\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.inputFileIndex = index;\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.dictionaryFileIndex = innerIndex;\n\n\t\t\t\t\t\t\t\t \t\t\t\tinputText.extend(tuple3);\n\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 }\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t inputText.extend(new SpellCheckWord(\"\\n\\n\", inputText.getText().length()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Calls the treeHandler functions and displays the misspelled words.\n\t\t\t\t\t\t\t * Outer list's indices represent different input files. \n\t\t\t\t\t\t\t * Middle list's indices represent different dictionary files that each input file will be compared to.\n\t\t\t\t\t\t\t * Inner list's indices represent the words in an input file that are not in the corresponding dictionary.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tmissingWords = new ArrayList<ArrayList<ArrayList<String>>>();\n\t\t\t\t\t\t\tmissingWords = treeHandler.incorrectWords(inputTrees, dictionaryTrees);\n\t\t\t\t\t\t\tnumberOfInputs = 0; \n\t\t\t\t\t\t\tnumberOfDictionaries = 0; \n\t\t\t\t\t\t\tnumberOfWords = 0; \n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\tnumberOfInputs = missingWords.size();\n\n\t\t\t\t\t\t\tfor(Iterator<ArrayList<ArrayList<String>>> iterator = missingWords.iterator(); iterator.hasNext();) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetsOfWords = iterator.next();\n\t\t\t\t\t\t\t\tnumberOfDictionaries += setsOfWords.size();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(Iterator<ArrayList<String>> iterator2 = setsOfWords.iterator(); iterator2.hasNext();)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// use label to separate differences from different dictionary file\n\t\t\t\t\t\t\t\t\twords = iterator2.next();\n\t\t\t\t\t\t\t\t\tnumberOfWords += words.size(); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!words.isEmpty())\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfor(Iterator<String> iterator3 = words.iterator(); iterator3.hasNext();)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tword = iterator3.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor(SpellCheckWord pair : inputText.contentPairs)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif(pair.word.equals(word) && !pair.missingWord && pair.inputFile.equals(inputFiles[inFileNumber]) && pair.dictionaryFile.equals(dictionaryFiles[dictionaryNumber]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tpair.missingWord = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputText.highlight(pair);\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\t\n\t\t\t\t\t\t\t\t\tdictionaryNumber += 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tinFileNumber += 1;\n\t\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * prints statistics for each pair of input/dictionary file to txt file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t scMenuBar.printStats.addActionListener\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tnew ActionListener()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent event)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Create new file\n\t\t\t\t\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\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\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString path = System.getProperty(\"user.home\") + \"/Desktop/Stats-for-\" + inputFiles[index].getName() + \"-\" + dictionaryFiles[innerIndex].getName() + \".txt\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tFile writer = new File(path);\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\t// file does not exist, create\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!writer.exists()) \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\t \twriter.createNewFile();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tFileWriter fw = new FileWriter(writer.getAbsoluteFile());\n\t\t\t\t\t\t\t\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Write in file\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.write(\" Words in input file\\t: \" + display.numWordsIn.get(loc) + \"\\n Lines in input file\\t: \" + display.numLinesIn.get(loc) + \"\\n Number of words replaced:\\t\" + display.numReplaced.get(loc) + \"\\n Number of words added:\\t\" + display.numAdded.get(loc) + \"\\n Number of words ignored:\\t\" + display.numIgnored.get(loc));\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\t// Close connection\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.close();\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\tcatch(Exception e)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tinputText.setEditable(false);\n\t\t\t\t\t\t\tscroller = new JScrollPane(inputText);\n\t\t\t\t\t\t\tcontentPane.add(scroller, BorderLayout.CENTER);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// refresh frame\n\t\t\t\t\t\t\t//pack();\t\t\t\t\t\n\t\t\t\t\t\t\trevalidate();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "private void addEntry(String word, String file, int position, HashMap<String, ArrayList<Integer>> subIndex) {\n\t\tif (subIndex.containsKey(word)) {\r\n\t\t\t// checks if the file name is a key in the nested\r\n\t\t\t// hash map of the word\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t/*\r\n\t\t * if the word is not yet a key, create a new entry in the hash map.\r\n\t\t * Create new hash map to hold the file the word is found and an array\r\n\t\t * to find the position Then put that in the wordMap hash map as value\r\n\t\t * and the word as a key.\r\n\t\t */\r\n\t\t}else {\r\n\t\t\tsubIndex.put(word, new ArrayList<Integer>());\r\n\t\t\tsubIndex.get(word).add(position);\r\n\t\t\r\n\t\t}\r\n\t\r\n\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}", "public synchronized void addHashToList(String file,HashMap<Integer,Integer> outcome){\n\t\tLinkedList<HashMap<Integer, Integer>> list = (LinkedList<HashMap<Integer,Integer>>)map.get(file);\n\t\tlist.add(outcome);\n\t}", "public void set(String keyInput, String valueInput) {\n\t\tfileData.put(keyInput, valueInput);\n\t\ttry {\n\t\t\twriteToFile();\n\t\t}\n\t\tcatch (IOException anything) {\n\t\t\tSystem.out.println(\"Couldn't write to file \" + path + \". Error: \" + anything.getMessage());\n\t\t}\n\t}", "public void printToFile(AI input) {\n\t\ttry {\n\t\t\t// Create file\n\t\t\tFileWriter fstream = new FileWriter(FILENAME);\n\t\t\tBufferedWriter out = new BufferedWriter(fstream);\n\t\t\tout.write(input.toString() + \"\\n\");\n\t\t\t// Close the output stream\n\t\t\tout.close();\n\t\t} catch (Exception e) { // Catch exception if any\n\t\t\tSystem.err.println(\"Error: \" + e.getMessage());\n\t\t}\n\t}", "@Override\n\tpublic void setup(Context context){\n\t\tfileName = ((FileSplit) context.getInputSplit()).getPath().getName();\n\t}", "public static void loadFile(ArrayList<String> array, String inputFile) {\n String line = \"\";\n String[] words;\n try {\n BufferedReader reader = new BufferedReader(new FileReader(inputFile));\n System.out.println(\"Loading file... \\\"Dictionary\\\"\");\n while ((line = reader.readLine()) != null) {\n words = line.split(\"\\n\");\n for (int i = 0; i < words.length; i++)\n array.add(words[i]);\n }\n reader.close();\n } catch (Exception ex) {\n System.out.println(\"File not found\");\n }\n }", "public void processInput(String theFile){processInput(new File(theFile));}", "public static void enterNewTXTFile(String input, String id, String newName, String newHandle, String newTime, String newTweet)\n {\n try {\n String str = Integer.parseInt(id)+ \" \" +newName+ \" \" +newHandle+ \" \" +newTime+ \" \" +newTweet+ \" \";\n writer = new BufferedWriter(new FileWriter(input, true)); // continue to write to existing output file\n writer.write(str);\n writer.newLine();\n writer.close();\n \n } catch (Exception e) { System.out.println(e); }\n }", "private void loadDictionary(String pathDictionary) throws IOException {\n File fileAnnotation = new File(pathDictionary);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr;\n fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n String[] dic = line.split(\"[ \\t]\");\n String word = line.substring(line.indexOf(\" \") + 1);\n dictionaryTerms.put(word.toLowerCase(), dic[0]);\n System.out.println(\"Loading Dictionary Terms: Word: \" + word + \"\\tTag: \" + dic[0]);\n }\n br.close();\n fr.close();\n System.out.println(\"Dictionary Terms Loaded\");\n }", "private void createHash() throws IOException\n\t{\n\t\tmap = new HashMap<String, ImageIcon>();\n\t\t\n\t\tfor(int i = 0; i < pokemonNames.length; i++)\n\t\t{\n\t\t\tmap.put(pokemonNames[i], new ImageIcon(getClass().getResource(fileLocations[i])));\n\t\t}\n\t}", "public void allartongs() throws IOException{\r\n writefiles data=new writefiles(\"d:\\\\documents\\\\textfiles\\\\AllArtSongs.txt\",true);\r\n Map<String,String> ArrangerNamesLineMap=new HashMap<>();\r\n for(int songid:ArrangerLinesMap.keySet()){\r\n int arrangerid=ArrangerLinesMap.get(songid);\r\n ArrangersMap.get((songid));\r\n ArrangerNamesLineMap.put(test.getsongName(songid), ArrangersMap.get(arrangerid));\r\n }\r\n for(String songname:ArrangerNamesLineMap.keySet()){\r\n System.out.println(\"The artist is:\"+ArrangerNamesLineMap.get(songname)+\" The song is:\"+songname);\r\n data.writeToFile(\"The artist is:\"+ArrangerNamesLineMap.get(songname)+\" The song is:\"+songname);\r\n }\r\n System.out.println(ArrangerNamesLineMap.size());\r\n }", "public void initialize(){\n titleBox.setTextFormatter( new TextFormatter<>(c -> {\n if(c.getControlNewText().length() > 30 ) return null;\n boolean error=false;\n char[] chars = c.getText().toCharArray();\n for (char aChar : chars)\n if (aChar == '\\n' ) {\n error = true;\n break;\n }\n if (error) return null;\n else return c;\n }));\n //default settings\n resultBox.setEditable(false);\n formatter.applyPattern(\"dd/MM/yyyy\");\n datePick.getEditor().setText(formatter.format(date));\n //arrayList to store each diaryPage and every words in dictionary\n book= new ArrayList<>();\n dictionary = new ArrayList<>();\n //read from txt file for existing diary pages and dictionary\n try {\n BufferedReader reader = new BufferedReader(new FileReader(new File(\"src/diary/content.txt\")));\n String line= reader.readLine();\n while (line != null){\n String date,title,content=\"\";\n int lineCount;\n date = line;\n title = reader.readLine();\n lineCount = Integer.parseInt(reader.readLine());\n for(int i=0;i<lineCount;i++){\n line = reader.readLine();\n //noinspection StringConcatenationInLoop\n content = content + line + System.lineSeparator();\n }\n book.add(new DiaryPage(date,title,content,lineCount));\n line = reader.readLine();\n }\n reader.close();\n reader = new BufferedReader(new FileReader(new File(\"src/extra/words.txt\")));\n line= reader.readLine();\n while (line != null){\n dictionary.add(line);\n line = reader.readLine();\n }\n reader.close();\n\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n //save new diary into txt file after user exit the application\n Main.window.setOnHiding(event -> saveFile());\n }" ]
[ "0.62767166", "0.62697154", "0.60393375", "0.59757966", "0.59581333", "0.5936777", "0.59166324", "0.5908152", "0.58474755", "0.584557", "0.57873946", "0.5745853", "0.57113826", "0.56717604", "0.56598157", "0.56339335", "0.56135935", "0.5609439", "0.5604008", "0.5587065", "0.55711305", "0.5563963", "0.5540865", "0.55355775", "0.551453", "0.55144584", "0.55093825", "0.54907686", "0.5475993", "0.5474234", "0.5465426", "0.5451358", "0.54466337", "0.5429929", "0.5377446", "0.5366053", "0.53477776", "0.5343739", "0.5338402", "0.53367317", "0.5329783", "0.53288674", "0.53264385", "0.53149647", "0.53066254", "0.52919173", "0.5288259", "0.5288157", "0.5275191", "0.52551323", "0.5245839", "0.52426237", "0.52367437", "0.52359796", "0.52290326", "0.52174634", "0.5196648", "0.5186267", "0.5186158", "0.51836586", "0.51814467", "0.5172774", "0.5163591", "0.5159301", "0.5158045", "0.51496786", "0.51449454", "0.5139559", "0.5137555", "0.5134224", "0.5117849", "0.5116327", "0.510121", "0.5099914", "0.5096918", "0.5096619", "0.5090673", "0.5089747", "0.5077613", "0.50728095", "0.5069817", "0.5068387", "0.5066542", "0.5042182", "0.5038264", "0.50318944", "0.50274915", "0.50237375", "0.5023711", "0.50182563", "0.5015839", "0.5013014", "0.5011048", "0.5007737", "0.5006767", "0.49928877", "0.49880272", "0.49863464", "0.4982185", "0.49807766", "0.4980244" ]
0.0
-1
used to reset the panel after at least one file has been processed. Constructor
public SpellCheckFrame() { // frame parameters setTitle("MO42 Spell Checker"); setSize(500,500); // default size is 0,0 setLocationRelativeTo(null); // default is 0,0 (top left corner) // window listeners addWindowListener ( new WindowAdapter() { public void windowClosing(WindowEvent event) { // only exits if the user clicks yes, nothing otherwise end = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?"); if (end == JOptionPane.YES_OPTION) { dispose(); System.exit(0); } else setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); } } ); // menu bar scMenuBar = new SpellCheckMenuBar(); // new file listener scMenuBar.newFile.addActionListener ( new ActionListener() { // input and dictionary file variables JFileChooser newFileChooser; JFileChooser dictionaryFileChooser; FileNameExtensionFilter filter; // to filter .txt files only File inputFiles[]; File dictionaryFiles[]; // display variables JScrollPane scroller; Container contentPane; SpellCheckTextArea inputText; SpellCheckWord tuple3; BufferedReader br = null; String line = ""; String seperator = " "; int index; int innerIndex; int loc; // data structure variables ArrayList<Set<String>> inputTrees; //holds tree form of input file ArrayList<Set<String>> dictionaryTrees; // holds tree form of dictionary file ArrayList<ArrayList<ArrayList<String>>> missingWords; // holds the misspelled words ArrayList<ArrayList<String>> setsOfWords; // holds different sets on misspelled words according to input file and dictionary ArrayList<String> words; // holds words in setsOfWords String word; // holds on single word // used during iteration int newSelectionResult; int dictionarySelectionResult; int numberOfInputs; int numberOfDictionaries; int numberOfWords; int inFileNumber; int dictionaryNumber; /** * process that allows user to select input file(s) and dictionary file(s) and displays misspelled words */ public void actionPerformed(ActionEvent event) { // if an input file is already loaded, clear panel before adding new words if(!empty.status) { // new session only if user responds with yes end = JOptionPane.showConfirmDialog(null, "Are you sure you want to start a new spell check session?"); if (end == JOptionPane.YES_OPTION) { getContentPane().removeAll(); revalidate(); empty.status = false; // file chooser for input file and dictionaries selection set up newFileChooser = new JFileChooser(); filter = new FileNameExtensionFilter(".txt files", "txt"); newFileChooser.setCurrentDirectory(new java.io.File(System.getProperty("user.home"))); newFileChooser.setApproveButtonText("Load Input"); newFileChooser.setDialogTitle("Load Input File(s)"); newFileChooser.setFileFilter(filter); newFileChooser.setMultiSelectionEnabled(true); newSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile); } else { newSelectionResult = JFileChooser.CANCEL_OPTION; dictionarySelectionResult = JFileChooser.CANCEL_OPTION; } } else { empty.status = false; // file chooser for input file and dictionaries selection set up newFileChooser = new JFileChooser(); filter = new FileNameExtensionFilter(".txt files", "txt"); newFileChooser.setCurrentDirectory(new java.io.File(System.getProperty("user.home"))); newFileChooser.setApproveButtonText("Load Input"); newFileChooser.setDialogTitle("Load Input File(s)"); newFileChooser.setFileFilter(filter); newFileChooser.setMultiSelectionEnabled(true); newSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile); } if(newSelectionResult == JFileChooser.APPROVE_OPTION) { inputFiles = newFileChooser.getSelectedFiles(); inputTrees = new ArrayList<Set<String>>(); // **** took away TreeSet inputTrees = treeHandler.convertMultipleFiles(inputFiles); dictionaryFileChooser = new JFileChooser(); dictionaryFileChooser.setCurrentDirectory(new java.io.File(System.getProperty("user.home"))); dictionaryFileChooser.setApproveButtonText("Load Dictionary"); dictionaryFileChooser.setDialogTitle("Load Dictionary File(s)"); dictionaryFileChooser.setFileFilter(filter); dictionaryFileChooser.setMultiSelectionEnabled(true); dictionarySelectionResult = dictionaryFileChooser.showOpenDialog(null); // only change view if user inputs both an input and dictionary(ies) if(dictionarySelectionResult == JFileChooser.APPROVE_OPTION) { dictionaryFiles = dictionaryFileChooser.getSelectedFiles(); dictionaryTrees = new ArrayList<Set<String>>(); // **** took away TreeSet dictionaryTrees = treeHandler.convertMultipleFiles(dictionaryFiles); contentPane = getContentPane(); inputText = new SpellCheckTextArea(); inputText.setLineWrap(true); inputText.setWrapStyleWord(true); display.numWordsIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); //size of numDictionaries*numInputFiles + 1 for the 0 index display.numReplaced = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); display.numAdded = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); display.numLinesIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); display.numIgnored = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); /* * get number of lines in input file */ for(index = 0; index < inputFiles.length; index++) { for(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++) { loc = (index+1)*(innerIndex+1); //zero location in list is added and then ignored display.numLinesIn.add(0); //initialize all statistics variables for each inputFile/DictionaryFile pair to 0; display.numLinesIn.add(loc, Integer.valueOf(0)); try { br = new BufferedReader(new FileReader(inputFiles[index])); while ((line = br.readLine()) != null) { display.numLinesIn.set(loc, Integer.valueOf(display.numLinesIn.get(loc) + 1)); //increment lines read } } /** * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing. */ catch (FileNotFoundException exception) { exception.printStackTrace(); } /** * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations. */ catch (IOException exception) { exception.printStackTrace(); } finally { if (br != null) { try { br.close(); } catch (IOException exception) { exception.printStackTrace(); } } } } } /* * Reads file and displays ready for user input of add, replace, ignore */ for(index = 0; index < inputFiles.length; index++) { for(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++) { loc = (index+1)*(innerIndex+1); //all zero locations in list are added and then ignored display.numWordsIn.add(0); display.numReplaced.add(0); display.numAdded.add(0); display.numIgnored.add(0); //initialize all statistics variables for each inputFile/DictionaryFile pair to 0 display.numWordsIn.add(loc, Integer.valueOf(0)); display.numReplaced.add(loc, Integer.valueOf(0)); display.numAdded.add(loc, Integer.valueOf(0)); display.numIgnored.add(loc, Integer.valueOf(0)); /** * Convenience for reading character files. */ try { br = new BufferedReader(new FileReader(inputFiles[index])); //displays current input file and dictionary name at top of text inputText.extend("Input file: " + inputFiles[index].getName() + "\tDictionary File: " + dictionaryFiles[innerIndex].getName() + "\n\n"); while ((line = br.readLine()) != null) { String[] textLine = line.split(seperator); for(String word : textLine) { word = word.replaceAll("[\n\r\t]+", ""); word = word.replaceAll("[^a-zA-Z]", ""); if(!word.isEmpty()) { display.numWordsIn.set(loc, Integer.valueOf(display.numWordsIn.get(loc) + 1)); //increment the number of words in the input file tuple3 = new SpellCheckWord(word.toLowerCase(), inputText.getText().length(), inputFiles[index], dictionaryFiles[innerIndex]); tuple3.inputFileIndex = index; tuple3.dictionaryFileIndex = innerIndex; inputText.extend(tuple3); } } } } /** * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing. */ catch (FileNotFoundException exception) { exception.printStackTrace(); } /** * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations. */ catch (IOException exception) { exception.printStackTrace(); } finally { if (br != null) { try { br.close(); } catch (IOException exception) { exception.printStackTrace(); } } } inputText.extend(new SpellCheckWord("\n\n", inputText.getText().length())); } } /** * Calls the treeHandler functions and displays the misspelled words. * Outer list's indices represent different input files. * Middle list's indices represent different dictionary files that each input file will be compared to. * Inner list's indices represent the words in an input file that are not in the corresponding dictionary. */ missingWords = new ArrayList<ArrayList<ArrayList<String>>>(); missingWords = treeHandler.incorrectWords(inputTrees, dictionaryTrees); numberOfInputs = 0; numberOfDictionaries = 0; numberOfWords = 0; inFileNumber = 0; dictionaryNumber = 0; numberOfInputs = missingWords.size(); for(Iterator<ArrayList<ArrayList<String>>> iterator = missingWords.iterator(); iterator.hasNext();) { setsOfWords = iterator.next(); numberOfDictionaries += setsOfWords.size(); for(Iterator<ArrayList<String>> iterator2 = setsOfWords.iterator(); iterator2.hasNext();) { // use label to separate differences from different dictionary file words = iterator2.next(); numberOfWords += words.size(); if (!words.isEmpty()) { for(Iterator<String> iterator3 = words.iterator(); iterator3.hasNext();) { word = iterator3.next(); for(SpellCheckWord pair : inputText.contentPairs) { if(pair.word.equals(word) && !pair.missingWord && pair.inputFile.equals(inputFiles[inFileNumber]) && pair.dictionaryFile.equals(dictionaryFiles[dictionaryNumber])) { pair.missingWord = true; inputText.highlight(pair); } } } } dictionaryNumber += 1; } inFileNumber += 1; dictionaryNumber = 0; } /* * prints statistics for each pair of input/dictionary file to txt file */ scMenuBar.printStats.addActionListener ( new ActionListener() { public void actionPerformed(ActionEvent event) { try { // Create new file for(index = 0; index < inputFiles.length; index++) { for(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++) { loc = (index+1)*(innerIndex+1); String path = System.getProperty("user.home") + "/Desktop/Stats-for-" + inputFiles[index].getName() + "-" + dictionaryFiles[innerIndex].getName() + ".txt"; File writer = new File(path); // file does not exist, create if (!writer.exists()) { writer.createNewFile(); } FileWriter fw = new FileWriter(writer.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); // Write in file bw.write(" Words in input file\t: " + display.numWordsIn.get(loc) + "\n Lines in input file\t: " + display.numLinesIn.get(loc) + "\n Number of words replaced:\t" + display.numReplaced.get(loc) + "\n Number of words added:\t" + display.numAdded.get(loc) + "\n Number of words ignored:\t" + display.numIgnored.get(loc)); // Close connection bw.close(); } } } catch(Exception e) { System.out.println(e); } } } ); inFileNumber = 0; inputText.setEditable(false); scroller = new JScrollPane(inputText); contentPane.add(scroller, BorderLayout.CENTER); // refresh frame //pack(); revalidate(); } } } } ); setJMenuBar(scMenuBar); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FilePanel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "public FilePane() {\n this(null);\n }", "public HitSortFilePanel() {\n initComponents();\n String[] hitSortFileNames = null;\n\n hitSortFileNames = getHitSortFileNames();\n\n cmbSelectHitSortFile.setModel(new DefaultComboBoxModel(hitSortFileNames));\n selectedHitSortFileName_ = hitSortFileNames[0];\n /** Register to be notified when there is a change in Hit Sort Files */\n GuiGlobal.addNewHitSortFileObserver(this);\n }", "public FileReaderPanel()\r\n\t{\r\n\t\t// Set layout of this FileReaderPanel to BorderLayout.\r\n\t\tsetLayout(new BorderLayout());\r\n\t\t\r\n\t\t\r\n\t\t// Initialize load file sub-panel.\r\n\t\tJPanel loadFilePanel = new JPanel();\r\n\t\tloadFilePanel.setLayout(new BoxLayout(loadFilePanel, BoxLayout.X_AXIS));\r\n\t\t\r\n\t\t// Initialize components of load file sub-panel.\r\n\t\tfilePathLabel = new JLabel(\"File path: \");\r\n\t\tfilePathField = new JTextField(15);\r\n\t\tloadFileButton = new JButton(\"Load File\");\r\n\t\t\r\n\t\t// Add the same action listener to the button and input field\r\n\t\tLoadFileListener listener = new LoadFileListener();\r\n\t\tfilePathField.addActionListener(listener);\r\n\t\tloadFileButton.addActionListener(listener);\r\n\t\t\r\n\t\t// Add components to load file sub-panel.\r\n\t\tloadFilePanel.add(filePathLabel);\r\n\t\tloadFilePanel.add(filePathField);\r\n\t\tloadFilePanel.add(loadFileButton);\r\n\t\t\r\n\t\t// Add the load file sub-panel to the south of this panel.\r\n\t\tadd(loadFilePanel, BorderLayout.SOUTH);\r\n\t\t\r\n\t\t\r\n\t\t// Initialize file preview text area.\r\n\t\tfilePreviewTextArea = new JTextArea(30, 50);\r\n\t\tfilePreviewTextArea.setEditable(false);\r\n\t\tfilePreviewTextArea.setText(\"Please load a file.\");\r\n\t\t\r\n\t\t// Initialize scroll pane containing the file preview text area.\t\t\r\n\t\tJScrollPane filePreviewScrollPane = new JScrollPane(filePreviewTextArea);\r\n\t\tfilePreviewScrollPane.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);\r\n\t\tfilePreviewScrollPane.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\r\n\t\t// Add the scroll pane to the center of this panel.\r\n\t\tadd(filePreviewScrollPane, BorderLayout.CENTER);\r\n\t}", "private void filesPanel() {\n\t\tJPanel FilesPanel = new JPanel();\n\t\tFilesPanel.setSize(filesPanelDimension);\n\t\tFilesPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\tFilesPanel.setLayout(new GridLayout(5, 1, 6, 2));\n\t\tFilesPanel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\t\n\t\t//Label title\n\t\tJLabel filesLabel = new JLabel(\"Files Import\");\n\t\tfilesLabel.setHorizontalAlignment(0);\n\t\tFilesPanel.add(filesLabel);\n\t\t\n\t\t//Spam Tools File - rules.cf\n\t\tJPanel rulesPanel = new JPanel();\n\t\trulesPanel.setSize(frameWidth, 40);\n\t\trulesPanel.setLayout(new GridLayout(2, 1, 1, 2));\n\t\tJLabel rulesFileTitle = new JLabel(\"Rules File\");\n\t\trulesPanel.add(rulesFileTitle);\n\t\trulesFile_Input = new JTextField(\"rules.cf\"); \n\t\trulesFile_Input.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\trulesFile_Input.setSize(inputsDimension);\n\t\trulesPanel.add(rulesFile_Input);\n\t\tFilesPanel.add(rulesPanel);\n\t\t\n\t\t//Valid Emails - ham.log\n\t\tJPanel hamPanel = new JPanel();\n\t\thamPanel.setSize(frameWidth, 40);\n\t\thamPanel.setLayout(new GridLayout(2, 1, 1, 2));\n\t\tJLabel hamFileTitle = new JLabel(\"Ham File\");\n\t\thamPanel.add(hamFileTitle);\n\t\thamFile_Input = new JTextField(\"ham.log\");\n\t\thamFile_Input.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\thamFile_Input.setSize(inputsDimension);\n\t\thamPanel.add(hamFile_Input);\n\t\tFilesPanel.add(hamPanel);\n\t\t\n\t\t//Spam Emails - spam.log\n\t\tJPanel spamPanel = new JPanel();\n\t\tspamPanel.setSize(frameWidth, 40);\n\t\tspamPanel.setLayout(new GridLayout(2, 1, 1, 2));\n\t\tJLabel spamFileTitle = new JLabel(\"SPAM File\");\n\t\tspamPanel.add(spamFileTitle);\n\t\tspamFile_Input = new JTextField(\"spam.log\");\n\t\tspamFile_Input.setBorder(BorderFactory.createLineBorder(Color.BLACK));\n\t\tspamFile_Input.setSize(inputsDimension);\n\t\tspamPanel.add(spamFile_Input);\n\t\tFilesPanel.add(spamPanel);\n\t\t\n\t\t//Get Files Button\n\t\tJPanel buttonPanel = new JPanel();\n\t\tbuttonPanel.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);\n\t\tbuttonPanel.setSize(frameWidth/2, 40);\n\t\tgetFilesButton.setHorizontalAlignment(0);\n\t\tbuttonPanel.add(getFilesButton);\n\t\tFilesPanel.add(buttonPanel);\n\t\t\n\t\tgetFilesButton.addActionListener(\n\t\t\tnew ActionListener(){\n\t\t\t\tpublic void actionPerformed(ActionEvent e){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcopyFiles(BoardControl.getFile(rulesFile_Input.getText()), AntiSpamFilterControl.rules);\n\t\t\t\t\t\tAntiSpamFilterControl.treatRulesFile();\n\t\t\t\t\t\tcopyFiles(BoardControl.getFile(hamFile_Input.getText()), AntiSpamFilterControl.ham);\n\t\t\t\t\t\tcopyFiles(BoardControl.getFile(spamFile_Input.getText()), AntiSpamFilterControl.spam);\n\t\t\t\t\t\tstartFilesConfig(false);\n\t\t\t\t\t\tstartSpamFilterTest(true);\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\t\t\n\t\tframe.add(FilesPanel);\n\t}", "private void initComponents() {\n\n itemFilePanel = new javax.swing.JPanel();\n itemFileLabel = new javax.swing.JLabel();\n itemFileButton = new javax.swing.JButton();\n entryFilePanel = new javax.swing.JPanel();\n entryFileLabel = new javax.swing.JLabel();\n entryFileButton = new javax.swing.JButton();\n outputFilePanel = new javax.swing.JPanel();\n outputFolderLabel = new javax.swing.JLabel();\n outputFolderButton = new javax.swing.JButton();\n fileTitle = new javax.swing.JLabel();\n\n itemFilePanel.setMinimumSize(new java.awt.Dimension(200, 200));\n itemFilePanel.setLayout(new java.awt.BorderLayout());\n\n itemFilePanel.setBorder(MasterDisplay.getTitledBorder(\"ITEMS FILE\"));\n\n itemFileLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n itemFileLabel.setText(\"NO FILE SELECTED!\");\n itemFilePanel.add(itemFileLabel, java.awt.BorderLayout.CENTER);\n\n itemFileButton.setText(\"CHOOSE OR CHANGE FILE\");\n itemFileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n itemFileButtonActionPerformed(evt);\n }\n });\n itemFilePanel.add(itemFileButton, java.awt.BorderLayout.PAGE_END);\n\n entryFilePanel.setMinimumSize(new java.awt.Dimension(200, 200));\n entryFilePanel.setLayout(new java.awt.BorderLayout());\n \n entryFilePanel.setBorder(MasterDisplay.getTitledBorder(\"ENTRIES FILE\"));\n\n entryFileLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n entryFileLabel.setText(\"NO FILE SELECTED!\");\n entryFilePanel.add(entryFileLabel, java.awt.BorderLayout.CENTER);\n\n entryFileButton.setText(\"CHOOSE OR CHANGE FILE\");\n entryFileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n entryFileButtonActionPerformed(evt);\n }\n });\n entryFilePanel.add(entryFileButton, java.awt.BorderLayout.PAGE_END);\n\n outputFilePanel.setMinimumSize(new java.awt.Dimension(200, 200));\n outputFilePanel.setLayout(new java.awt.BorderLayout());\n\n outputFilePanel.setBorder(MasterDisplay.getTitledBorder(\"OUTPUT FOLDER\"));\n\n outputFolderLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n outputFolderLabel.setText(\"NO FOLDER SELECTED!\");\n outputFilePanel.add(outputFolderLabel, java.awt.BorderLayout.CENTER);\n\n outputFolderButton.setText(\"CHOOSE OR CHANGE FOLDER\");\n outputFolderButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n outputFolderButtonActionPerformed(evt);\n }\n });\n outputFilePanel.add(outputFolderButton, java.awt.BorderLayout.PAGE_END);\n\n setLayout(new java.awt.BorderLayout());\n\n fileTitle.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n fileTitle.setText(\"FILES\");\n add(fileTitle, java.awt.BorderLayout.PAGE_START);\n }", "public JPanelUpload() {\n initComponents();\n JPanelTrack.setBase(tracksStart);\n updateTrackList();\n }", "public void resetFileProcessValues() {\n this.maxfiles=0;\n this.currFileProgressValue=0;\n this.pbarFileProcess.setValue(0);\n }", "private void initComponents(int filesLengh) {\n\n\t\tPBar = new javax.swing.JProgressBar(0, filesLengh);\n\t\tBGenerate = new javax.swing.JButton();\n\t\tjLabel1 = new javax.swing.JLabel();\n\t\tjLabel2 = new javax.swing.JLabel();\n\t\tjLabel3 = new javax.swing.JLabel();\n\t\tCBXml = new javax.swing.JCheckBox();\n\t\tCBPlayer = new javax.swing.JCheckBox();\n\t\tTDirectory = new javax.swing.JTextField();\n\t\tBBrowse = new javax.swing.JButton();\n\t\tTPrefix = new javax.swing.JTextField();\n\t\tjLabel5 = new javax.swing.JLabel();\n\t\tCBBuild = new javax.swing.JCheckBox();\n\t\tCBUpgrade = new javax.swing.JCheckBox();\n\t\tCBTrain = new javax.swing.JCheckBox();\n\t\tCBMove = new javax.swing.JCheckBox();\n\t\tCBSelect = new javax.swing.JCheckBox();\n\t\tCBHotKey = new javax.swing.JCheckBox();\n\t\tCBResearch = new javax.swing.JCheckBox();\n\t\tCBUseBA = new javax.swing.JCheckBox();\n\t\tCBClickMini = new javax.swing.JCheckBox();\n\t\tCBRightClick = new javax.swing.JCheckBox();\n\t\tCBUseUA = new javax.swing.JCheckBox();\n\t\tjLabel4 = new javax.swing.JLabel();\n\t\tlogoInsa = new javax.swing.JLabel();\n\t\tlogoLiris = new javax.swing.JLabel();\n\t\tjLabel6 = new javax.swing.JLabel();\n\t\tCBReplay = new javax.swing.JCheckBox();\n\t\tCBMap = new javax.swing.JCheckBox();\n\t\tCBIcon = new javax.swing.JCheckBox();\n\n\t\twindow.setResizable(false);\n\n\t\tPBar.addComponentListener(new java.awt.event.ComponentAdapter() {\n\t\t\tpublic void componentShown(java.awt.event.ComponentEvent evt) {\n\t\t\t\tdisplayCSV(CBXml.isSelected());\n\t\t\t}\n\n\t\t\tpublic void componentHidden(java.awt.event.ComponentEvent evt) {\n\t\t\t\tdisplayCSV(CBXml.isSelected());\n\t\t\t}\n\t\t});\n\n\t\tBGenerate.setText(\"Generate\");\n\t\tBGenerate.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n\t\tBGenerate.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tBGenerateActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjLabel1.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel1.setText(\"Files to generate : \");\n\n\t\tjLabel2.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel2.setText(\"Directory :\");\n\n\t\tjLabel3.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel3.setText(\"XML Files prefix :\");\n\n\t\tCBXml.setText(\"XML Files\");\n\t\tCBXml.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tCBXmlActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tCBPlayer.setText(\"Players Info.\");\n\n\t\tTDirectory.setBackground(java.awt.Color.lightGray);\n\t\tTDirectory.setFocusable(false);\n\n\t\tBBrowse.setText(\"Browse\");\n\t\tBBrowse.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tBBrowseActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjLabel5.setFont(new java.awt.Font(\"Ubuntu\", 1, 15));\n\t\tjLabel5.setText(\"Select action types :\");\n\n\t\tCBBuild.setText(\"Build\");\n\t\tCBUpgrade.setText(\"Upgrade\");\n\t\tCBTrain.setText(\"Train\");\n\t\tCBMove.setText(\"Move Screen\");\n\t\tCBSelect.setText(\"Select\");\n\t\tCBHotKey.setText(\"HotKey\");\n\t\tCBResearch.setText(\"Research\");\n\t\tCBUseBA.setText(\"Use Building Ability\");\n\t\tCBClickMini.setText(\"Click Minimap\");\n\t\tCBRightClick.setText(\"Right Click\");\n\t\tCBUseUA.setText(\"Use Unit Ability\");\n\n\t\tjLabel4.setFont(new java.awt.Font(\"DejaVu Serif\", 0, 10));\n\t\tjLabel4.setForeground(java.awt.Color.black);\n\t\tjLabel4.setText(\"Authors : Guillaume BOSC, Mehdi KAYTOUE\");\n\n\t\tlogoInsa.setIcon(new javax.swing.ImageIcon(\n\t\t\t\t\"./Plugins/Sc2Gears4DM/fig/INSA.jpg\"));\n\n\t\tlogoLiris.setIcon(new javax.swing.ImageIcon(\n\t\t\t\t\"./Plugins/Sc2Gears4DM/fig/LIRIS.jpg\"));\n\n\t\tjLabel6.setFont(new java.awt.Font(\"DejaVu Serif\", 0, 10));\n\t\tjLabel6.setForeground(java.awt.Color.black);\n\t\tjLabel6.setText(\"Contact : [email protected]\");\n\n\t\tCBReplay.setText(\"Replays Info.\");\n\n\t\tCBMap.setText(\"Maps Info.\");\n\t\tCBMap.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (!alreadyDownloaded) {\n\t\t\t\t\tint retour = JOptionPane.showConfirmDialog(window,\n\t\t\t\t\t\t\t\"Do you want to download the corresponding maps ?\",\n\t\t\t\t\t\t\t\"Download maps\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\tif (retour == JOptionPane.YES_OPTION) {\n\t\t\t\t\t\tdownloadMapFile();\n\t\t\t\t\t\talreadyDownloaded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tCBIcon.setText(\"Map Icons\");\n\t\tCBIcon.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tif (!alreadyDownloaded) {\n\t\t\t\t\tint retour = JOptionPane.showConfirmDialog(window,\n\t\t\t\t\t\t\t\"Do you want to download the corresponding maps ?\",\n\t\t\t\t\t\t\t\"Download maps\", JOptionPane.YES_NO_OPTION);\n\t\t\t\t\tif (retour == JOptionPane.YES_OPTION) {\n\t\t\t\t\t\tdownloadMapFile();\n\t\t\t\t\t\talreadyDownloaded = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/*\n\t\t * Display the window layout\n\t\t */\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(\n\t\t\t\twindow.getContentPane());\n\t\twindow.getContentPane().setLayout(layout);\n\t\tlayout.setHorizontalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(23, 23, 23)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel6)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel4)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addContainerGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoInsa)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(61,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t61,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t61)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBGenerate)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoLiris))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(41,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t41,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t41)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBTrain)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBMove)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBHotKey)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseUA)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBRightClick)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBClickMini)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseBA)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBSelect)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBBuild)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUpgrade)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBResearch)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTPrefix,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t242,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel1)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(52,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t52,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t52)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTDirectory,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t242,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBBrowse))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBPlayer)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBXml))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBReplay)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBMap)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBIcon)))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t45,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPBar,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(23, 23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t23)))));\n\t\tlayout.setVerticalGroup(layout\n\t\t\t\t.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t.addGroup(\n\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(23, 23, 23)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(jLabel1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBXml)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBReplay)))\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(CBPlayer)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(CBMap)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(CBIcon))\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(13, 13,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t13)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTDirectory,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBBrowse))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(18, 18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTPrefix,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel3))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(18, 18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t18)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjLabel5)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBBuild)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBMove)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBSelect))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUpgrade)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBHotKey)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBRightClick))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBResearch)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBTrain)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBClickMini))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.BASELINE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseUA)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tCBUseBA))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t99,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tBGenerate,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoInsa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.Alignment.TRAILING)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlogoLiris)))\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(PBar,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t20,\n\t\t\t\t\t\t\t\t\t\tjavax.swing.GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(30, 30, 30)\n\t\t\t\t\t\t\t\t.addComponent(jLabel4)\n\t\t\t\t\t\t\t\t.addPreferredGap(\n\t\t\t\t\t\t\t\t\t\tjavax.swing.LayoutStyle.ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t.addComponent(jLabel6)));\n\t\twindow.pack();\n\t}", "public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }", "@Override\n public void initialize() {\n sectionsPanel.removeAll();\n \n section1 = new ProgressReportSectionSettingPanel(this);\n section2 = new ProgressReportSectionSettingPanel(this);\n section3 = new ProgressReportSectionSettingPanel(this);\n section4 = new ProgressReportSectionSettingPanel(this);\n addSectionElement(0,section1);\n addSectionElement(1,section2);\n addSectionElement(2,section3);\n addSectionElement(3,section4);\n \n refresh();\n }", "public GUI()\n {\n initComponents();\n setSize(xSize, ySize);\n figures = new PFigure[numFigs];\n }", "public void reset() {\n\t\tdroppedFiles.clear();\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t((DefaultTableModel) table.getModel()).setRowCount(0);\n\t\t\t}\n\t\t});\n\t\t\n\t\t\n\t}", "public void initialize() {\n\t\t/*\n\t\t * one Jpanel in the north which contains two buttons and one textfield:\n\t\t * open, quit buttons and textfield that shows the name of the file\n\t\t */\n\t\tJPanel myPanel1 = new JPanel();\n\t\tthis.add(myPanel1,BorderLayout.NORTH);\n\t\t\n\t\tmyPanel1.add(openbt);\n\t\topenbt.addActionListener(this);\n\t\tfilename.setEditable(false);\n\t\tmyPanel1.add(filename);\n\t\tmyPanel1.add(quitbt);\n\t\tquitbt.addActionListener(this);\n\n\t\t//one Jcomponent in the centre for the drawing area\n\t\tthis.add(plotContent,BorderLayout.CENTER);\n\t\t\n\t\t/*\n\t\t * one Jpanel in the south that has two combobox and one textarea\n\t\t * the comboboxes can change the column used for the x axis and y axis\n\t\t * the text area shows the corresponding trade that has be clicked\n\t\t */\n\t\tJPanel myPanel2 = new JPanel();\n\t\tthis.add(myPanel2,BorderLayout.SOUTH);\n\t\tString[] options1 = { \"YIELD\", \"DAYS_TO_MATURITY\", \"AMOUNT_CHF(000)\"};\n\t\tString[] options2 = { \"DAYS_TO_MATURITY\", \"YIELD\", \"AMOUNT_CHF(000)\"};\n\t\txcb = new JComboBox(options1);\n\t\tycb = new JComboBox(options2);\n\t\tmyPanel2.add(xcb);\n\t\tmyPanel2.add(ycb);\n\t\txcb.addItemListener(this);\n\t\tycb.addItemListener(this);\n\t\ttradedetail.setEditable(false);\n\t\tmyPanel2.add(tradedetail);\t\n\t}", "public FileCreator() {\r\n initComponents();\r\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jScrollPane2 = new javax.swing.JScrollPane();\n loadButton = new javax.swing.JButton();\n infoButton = new javax.swing.JButton();\n jTabbedPane1 = new javax.swing.JTabbedPane();\n jScrollPane3 = new javax.swing.JScrollPane();\n oneLodingPanel = new javax.swing.JPanel();\n chooseOneFileButton = new javax.swing.JButton();\n oneFileLoadingPanel = new javax.swing.JPanel();\n oneFilenameLabel = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n loadingPanel = new javax.swing.JPanel();\n cleanButton = new javax.swing.JButton();\n\n jScrollPane2.setName(\"jScrollPane2\"); // NOI18N\n\n loadButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ppine/resources/icons/save.png\"))); // NOI18N\n loadButton.setText(\"Load\");\n java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle(\"ppine/ui/dataloading/Bundle\"); // NOI18N\n loadButton.setToolTipText(bundle.getString(\"UpdateInteractionsButton.ToolTip\")); // NOI18N\n loadButton.setName(\"loadButton\"); // NOI18N\n loadButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n loadButtonActionPerformed(evt);\n }\n });\n\n infoButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ppine/resources/icons/help.png\"))); // NOI18N\n infoButton.setText(\"File format info\");\n infoButton.setToolTipText(bundle.getString(\"FileFormatInfoInteractionsButton.ToolTip\")); // NOI18N\n infoButton.setName(\"infoButton\"); // NOI18N\n infoButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n infoButtonActionPerformed(evt);\n }\n });\n\n jTabbedPane1.setName(\"jTabbedPane1\"); // NOI18N\n\n jScrollPane3.setName(\"jScrollPane3\"); // NOI18N\n\n oneLodingPanel.setName(\"oneLodingPanel\"); // NOI18N\n\n chooseOneFileButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ppine/resources/icons/com.png\"))); // NOI18N\n chooseOneFileButton.setText(\"Choose file\");\n chooseOneFileButton.setName(\"chooseOneFileButton\"); // NOI18N\n chooseOneFileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooseOneFileButtonActionPerformed(evt);\n }\n });\n\n oneFileLoadingPanel.setName(\"oneFileLoadingPanel\"); // NOI18N\n\n javax.swing.GroupLayout oneFileLoadingPanelLayout = new javax.swing.GroupLayout(oneFileLoadingPanel);\n oneFileLoadingPanel.setLayout(oneFileLoadingPanelLayout);\n oneFileLoadingPanelLayout.setHorizontalGroup(\n oneFileLoadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 525, Short.MAX_VALUE)\n );\n oneFileLoadingPanelLayout.setVerticalGroup(\n oneFileLoadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 412, Short.MAX_VALUE)\n );\n\n oneFilenameLabel.setText(\"filename\");\n oneFilenameLabel.setName(\"oneFilenameLabel\"); // NOI18N\n\n javax.swing.GroupLayout oneLodingPanelLayout = new javax.swing.GroupLayout(oneLodingPanel);\n oneLodingPanel.setLayout(oneLodingPanelLayout);\n oneLodingPanelLayout.setHorizontalGroup(\n oneLodingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(oneLodingPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(chooseOneFileButton, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(oneFilenameLabel)\n .addGap(249, 249, 249))\n .addGroup(oneLodingPanelLayout.createSequentialGroup()\n .addComponent(oneFileLoadingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n oneLodingPanelLayout.setVerticalGroup(\n oneLodingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(oneLodingPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(oneLodingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(chooseOneFileButton)\n .addComponent(oneFilenameLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(oneFileLoadingPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addContainerGap())\n );\n\n jScrollPane3.setViewportView(oneLodingPanel);\n\n jTabbedPane1.addTab(\"Single file\", jScrollPane3);\n\n jScrollPane1.setName(\"jScrollPane1\"); // NOI18N\n\n loadingPanel.setName(\"loadingPanel\"); // NOI18N\n\n javax.swing.GroupLayout loadingPanelLayout = new javax.swing.GroupLayout(loadingPanel);\n loadingPanel.setLayout(loadingPanelLayout);\n loadingPanelLayout.setHorizontalGroup(\n loadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 535, Short.MAX_VALUE)\n );\n loadingPanelLayout.setVerticalGroup(\n loadingPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 463, Short.MAX_VALUE)\n );\n\n jScrollPane1.setViewportView(loadingPanel);\n\n jTabbedPane1.addTab(\"Multiple files\", jScrollPane1);\n\n cleanButton.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/ppine/resources/icons/clean.png\"))); // NOI18N\n cleanButton.setText(\"Clean\");\n cleanButton.setToolTipText(bundle.getString(\"CleanInteractionsButton.ToolTip\")); // NOI18N\n cleanButton.setName(\"cleanButton\"); // NOI18N\n cleanButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n cleanButtonActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(loadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(cleanButton, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 175, Short.MAX_VALUE)\n .addComponent(infoButton)\n .addContainerGap())\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 544, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(loadButton, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(infoButton)\n .addComponent(cleanButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jTabbedPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 491, Short.MAX_VALUE))\n );\n }", "private void initialize() {\n\t\tfrmHi = new JFrame();\n\t\tfrmHi.setTitle(\"Multiple Document Combination Software\");\n\t\tfrmHi.setBounds(100, 100, 385, 278);\n\t\tfrmHi.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\tfrmHi.getContentPane().add(tabbedPane, BorderLayout.CENTER);\n\t\t\n\t\tJPanel panel_1 = new JPanel();\n\t\ttabbedPane.addTab(\".txt\", null, panel_1, \"For text files\");\n\t\tpanel_1.setLayout(null);\n\t\t\n\t\tJLabel lblMergeTextFiles = new JLabel(\"Choose text files to combine\");\n\t\tlblMergeTextFiles.setBounds(97, 11, 265, 14);\n\t\tpanel_1.add(lblMergeTextFiles);\n\t\t\n\t\tfinal JLabel txtfilename1 = new JLabel(\"No file selected\");\n\t\ttxtfilename1.setBounds(177, 36, 172, 14);\n\t\tpanel_1.add(txtfilename1);\n\t\t\n\t\tJButton btnFirstFile = new JButton(\"First File\");\n\t\tbtnFirstFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//try{\n\t\t\t\tJFileChooser jfc = new JFileChooser();\n\t\t\t\tjfc.showDialog(null,\"Please select a text file\");\n\t\t\t\tjfc.setVisible(true);\n\t\t\t\tFile sourceFile1Path = jfc.getSelectedFile();\n\t\t\t\ttxtfilename1.setText(sourceFile1Path.getName());\n\t\t\t\tfile1 = sourceFile1Path;\n\t\t\t\t/*}catch(IOException e){\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Input error\");\n\t\t\t\t*/\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnFirstFile.setBounds(63, 36, 104, 23);\n\t\tpanel_1.add(btnFirstFile);\n\t\t\n\t\tfinal JLabel txtfilename2 = new JLabel(\"No file selected\");\n\t\ttxtfilename2.setBounds(177, 70, 172, 14);\n\t\tpanel_1.add(txtfilename2);\n\t\t\n\t\tJButton btnSecondFile = new JButton(\"Second File\");\n\t\tbtnSecondFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser jfc2 = new JFileChooser();\n\t\t\t\tjfc2.showDialog(null, \"Please select a text file\");\n\t\t\t\tjfc2.setVisible(true);\n\t\t\t\tFile sourceFile2path = jfc2.getSelectedFile();\n\t\t\t\ttxtfilename2.setText(sourceFile2path.getName());\n\t\t\t\tfile2 = sourceFile2path;\n\t\t\t}\n\t\t});\n\t\tbtnSecondFile.setBounds(63, 70, 104, 23);\n\t\tpanel_1.add(btnSecondFile);\n\t\t\n\t\tfinal JLabel txtfilename3 = new JLabel(\"No file selected\");\n\t\ttxtfilename3.setBounds(177, 104, 172, 14);\n\t\tpanel_1.add(txtfilename3);\n\t\t\n\t\tJButton btnThirdFile = new JButton(\"Third File\");\n\t\tbtnThirdFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tJFileChooser jfc3 = new JFileChooser();\n\t\t\t\tjfc3.showDialog(null, \"Please select a text file\");\n\t\t\t\tjfc3.setVisible(true);\n\t\t\t\tFile sourceFile3path = jfc3.getSelectedFile();\n\t\t\t\ttxtfilename3.setText(sourceFile3path.getName());\n\t\t\t\tfile3 = sourceFile3path;\n\t\t\t}\n\t\t});\n\t\tbtnThirdFile.setBounds(63, 104, 104, 23);\n\t\tpanel_1.add(btnThirdFile);\n\t\t\n\t\tJButton btnCombineTxt = new JButton(\"Combine!\");\n\t\tbtnCombineTxt.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t//add fancy exception handling soon, like if the user only selected 2 files (when we support 3)\n\t\t\t\tFile[] FileArray = new File[2]; //change to 3 when adding support for a third file\n\t\t\t\tFileArray[0] = file1;\n\t\t\t\tFileArray[1] = file2;\n\t\t\t\t//FileArray[3] = file3;\n\t\t\t\tFile mergedFile = new File(\"C:/Users/Patrick/Desktop/mdcs/output.txt\");\n\t\t\t\t\n\t\t\t\t FileWriter fstream = null;\n\t\t\t\t BufferedWriter out = null;\n\t\t\t\t try {\n\t\t\t\t fstream = new FileWriter(mergedFile, true);\n\t\t\t\t out = new BufferedWriter(fstream);\n\t\t\t\t } catch (IOException e1) {\n\t\t\t\t e1.printStackTrace();\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t for (File f : FileArray) {\n\t\t\t\t System.out.println(\"merging: \" + f.getName());\n\t\t\t\t FileInputStream fis;\n\t\t\t\t try {\n\t\t\t\t fis = new FileInputStream(f);\n\t\t\t\t BufferedReader in = new BufferedReader(new InputStreamReader(fis));\n\t\t\t\t \n\t\t\t\t String aLine;\n\t\t\t\t while ((aLine = in.readLine()) != null) {\n\t\t\t\t out.write(aLine);\n\t\t\t\t out.newLine();\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t in.close();\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t try {\n\t\t\t\t out.close();\n\t\t\t\t } catch (IOException e) {\n\t\t\t\t e.printStackTrace();\n\t\t\t\t }\n\t\t\t\t\n\n\t\t\t}\n\t\t});\n\t\tbtnCombineTxt.setBounds(107, 141, 119, 23);\n\t\tpanel_1.add(btnCombineTxt);\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\ttabbedPane.addTab(\".doc/.docx\", null, panel, \"For microsoft word documents.\");\n\t\tpanel.setLayout(null);\n\t\t\n\t\tJLabel lblMergeMicrosoftWord = new JLabel(\"Choose Microsoft Word Documents to combine\");\n\t\tlblMergeMicrosoftWord.setBounds(61, 11, 301, 14);\n\t\tpanel.add(lblMergeMicrosoftWord);\n\t\t\n\t\tJButton btnFirstDocument = new JButton(\"First Document\");\n\t\tbtnFirstDocument.setBounds(34, 46, 160, 23);\n\t\tpanel.add(btnFirstDocument);\n\t\t\n\t\tJButton btnSecondDocument = new JButton(\"Second Document\");\n\t\tbtnSecondDocument.setBounds(34, 80, 160, 23);\n\t\tpanel.add(btnSecondDocument);\n\t\t\n\t\tJButton btnThirdDocument = new JButton(\"Third Document\");\n\t\tbtnThirdDocument.setBounds(34, 114, 160, 23);\n\t\tpanel.add(btnThirdDocument);\n\t\t\n\t\tJButton btnCombineDoc = new JButton(\"Combine!\");\n\t\tbtnCombineDoc.setBounds(130, 148, 91, 23);\n\t\tpanel.add(btnCombineDoc);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.setBounds(100, 100, 950, 620);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJLayeredPane layeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(0, 0, 932, 533);\n\t\tframe.getContentPane().add(layeredPane);\n\t\t\n\t\tJLayeredPane layeredPane_1 = new JLayeredPane();\n\t\tlayeredPane_1.setBounds(0, 37, 933, 538);\n\t\tlayeredPane_1.setVisible(false);\n\t\tframe.getContentPane().add(layeredPane_1);\n\t\t\n\t\tJLayeredPane layeredPane_2 = new JLayeredPane();\n\t\tlayeredPane_2.setBounds(0, 37, 940, 538);\n\t\tlayeredPane_2.setVisible(false);\n\t\tframe.getContentPane().add(layeredPane_2);\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser();\n\t\tfileChooser.setMultiSelectionEnabled(true);\n\t\t\n\t\tJLabel lblFileToBe = new JLabel(\"File to Upload\");\n\t\tlblFileToBe.setBounds(0, 167, 900, 230);\n\t\tlayeredPane.add(lblFileToBe);\n\t\tlblFileToBe.setVerticalAlignment(SwingConstants.TOP);\n\t\tlblFileToBe.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\tlblFileToBe.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\tJButton btnChooseFile = new JButton(\"Choose File\");\n\t\tbtnChooseFile.setBounds(367, 94, 440, 80);\n\t\tlayeredPane.add(btnChooseFile);\n\t\t\n\t\tJButton btnLoadEngine = new JButton(\"Load Engine\");\n\t\tbtnLoadEngine.setVisible(false);\n\t\tbtnLoadEngine.setBounds(370, 165, 117, 29);\n\t\tlayeredPane.add(btnLoadEngine);\n\t\tbtnLoadEngine.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\t\n\t\tlblLoading = new JLabel(\"Loading...\");\n\t\tlblLoading.setBounds(10, 122, 117, 21);\n\t\tlblLoading.setVisible(false);\n\t\tlayeredPane.add(lblLoading);\n\t\tlblLoading.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\n\t\tlblLoading.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\t\n\t\tbtnSearchForTerm = new JButton(\"Search For Term\");\n\t\tbtnSearchForTerm.setVisible(false);\n\t\tbtnSearchForTerm.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tbtnSearchForTerm.setBounds(172, 205, 515, 29);\n\t\tlayeredPane.add(btnSearchForTerm);\n\t\t\n\t\tJLabel lblEnterSearchTerm = new JLabel(\"Enter Search Term:\");\n\t\tlblEnterSearchTerm.setBounds(10, 120, 265, 85);\n\t\tlayeredPane_1.add(lblEnterSearchTerm);\n\t\tlblEnterSearchTerm.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tlblEnterSearchTerm.setFont(new Font(\"Tahoma\", Font.BOLD, 18));\n\t\tsearchTextField = new JTextField();\n\t\tsearchTextField.setBounds(320, 150, 200, 22);\n\t\tlayeredPane_1.add(searchTextField);\n\t\tsearchTextField.setFont(new Font(\"Tahoma\", Font.PLAIN, 14));\n\t\tsearchTextField.setColumns(10);\n\t\t\n\t\t\n\t\tJButton btnSearch = new JButton(\"Search!\");\t\n\t\tbtnSearch.setBounds(550, 145, 80, 40);\n\t\tlayeredPane_1.add(btnSearch);\n\t\tbtnSearch.setFont(new Font(\"Tahoma\", Font.PLAIN, 22));\n\t\t\n\t\tbtnGoBackToSearch = new JButton(\"Go Back To Search\");\n\t\tbtnGoBackToSearch.setBounds(685, 0, 187, 22);\n\t\tlayeredPane_2.add(btnGoBackToSearch);\n\t\tbtnGoBackToSearch.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\n\t\t\n\t\tJLabel lblSearchedTerm = new JLabel(\"Searched Term\");\n\t\tlblSearchedTerm.setBounds(58, 0, 680, 48);\n\t\tlayeredPane_2.add(lblSearchedTerm);\n\t\tlblSearchedTerm.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\t\n\t\tJLabel executionTimeLabel = new JLabel(\"Search Elapsed Time\");\n\t\texecutionTimeLabel.setBounds(58, 51, 200, 48);\n\t\tlayeredPane_2.add(executionTimeLabel);\n\t\texecutionTimeLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\n\t\t\n\t\t\n\t\tJLabel lblTermNotExist = new JLabel(\"Term Does Not Exist!\");\n\t\tlblTermNotExist.setVisible(false);\n\t\tlblTermNotExist.setBounds(320, 162, 342, 120);\n\t\tlayeredPane_2.add(lblTermNotExist);\n\t\tlblTermNotExist.setFont(new Font(\"Tahoma\", Font.BOLD, 22));\n\t\tlblTermNotExist.setHorizontalAlignment(SwingConstants.CENTER);\n\t\t\n\t\t\n\t\ttableSearch = new JTable();\n\t\ttableSearch.setBounds(200, 250, 600, 300);\n\t\ttableSearch.setRowHeight(20);\n\t\ttableSearch.setFont(new Font(\"Tahoma\", Font.PLAIN, 12));\t\n\t\tlayeredPane_2.add(tableSearch);\n\t\t\n\t\tbtnChooseFile.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tint res = fileChooser.showSaveDialog(null);\n\t\t\t\tif (res == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\tString text = \"\";\n\t\t\t\t\tfiles = fileChooser.getSelectedFiles();\n\t\t\t\t\ttext = \"<html><div style='text-align: center;'>\";\n\t\t\t\t\tfor (int n = 0; n < files.length; n++)\n\t\t\t\t\t\ttext += files[n] + \"<br/>\";\n\t\t\t\t\ttext += \"</div></html>\";\n\t\t\t\t\t\n\t\t\t\t\tlblFileToBe.setText(text);\n\t\t\t\t\tbtnLoadEngine.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnLoadEngine.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlblFileToBe.setVisible(false);\n\t\t\t\tbtnChooseFile.setVisible(false);\n\t\t\t\tlblLoading.setVisible(true);\n\t\t\t\tbtnLoadEngine.setVisible(false);\n\t\t\t\t\n\t\t\t\tfor (File f: files) {\n\t\t\t\t\tString obj = HttpRequestMethod(\"POST\", \"https://storage.googleapis.com/upload/storage/v1/b/\" + bucketName + \"/o??uploadType=media&name=input/\" + f.getName(), \"application/octet-stream\", new FileEntity(f), accessToken);\n\t\t\t\t\tif(obj == null) {\n\t\t\t\t\t\tlblLoading.setText(\"Failed to upload files to bucket\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlblLoading.setText(\"<html>Files Uploaded to bucket.<br/>Now Populationg InvertedIndex.txt on Cluster</html>\");\n\t\t\t\tString jsonBody = \"{\\\"projectId\\\": \\\"\" + projectId + \"\\\",\" +\"\\\"job\\\": {\\\"placement\\\": {\\\"clusterName\\\": \\\"\" + clusterName + \"\\\"},\\\"hadoopJob\\\": {\\\"jarFileUris\\\": [\\\"gs://\" + bucketName +\"/JAR/InvertedIndex.jar\\\"],\\\"args\\\": [\\\"gs://\" + bucketName + \"/input\\\",\\\"gs://\" + bucketName + \"/IIOutput\\\"],\\\"mainClass\\\": \\\"InvertedIndex\\\"}}}\";\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject obj = new JSONObject(HttpRequestMethod(\"POST\", \"https://dataproc.googleapis.com/v1/projects/\" + projectId +\"/regions/\" + clusterRegion +\"/jobs:submit\" + \"?key=\" + apiKey, \"application/json\", new StringEntity(jsonBody), accessToken));\n\t\t\t\t\tjobId = obj.getJSONObject(\"reference\").getString(\"jobId\");\n\t\t\t\t} catch (UnsupportedEncodingException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tjava.util.Timer timer = new java.util.Timer();\n\t\t\t\tRecurrentTask task = new RecurrentTask(getThis(), \"InvertedIndex\");\n\t\t\t\ttimer.scheduleAtFixedRate(task, 0, 5000);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnSearch.addActionListener(new ActionListener() {\t\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSearch.setText(\"Searching...\");\n\t\t\t\t\n\t\t\t\tlong start = System.currentTimeMillis();\n\t\t\t \n\t\t\t\tString wordSearched = searchTextField.getText();\n\t\t\t\tList<String> docList = new ArrayList<String>(files.length);\n\t\t\t\tList<String> frequencyList = new ArrayList<String>(files.length);\n\t\t\t\t\n\t\t\t\tScanner scanner = new Scanner(InvertedIndexResult);\n\t\t\t\twhile (scanner.hasNextLine()) {\n\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\tString[] array = line.split(\"\\t\");\n\t\t\t\t\tif(wordSearched.equals(array[0])) {\n\t\t\t\t\t\tSystem.out.println(\"Found term\");\n\t\t\t\t\t\tfor(int n=0;n < files.length; n++) {\n\t\t\t\t\t\t\tif(!array[0].equals(wordSearched)) \n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocList.add(array[1]);\n\t\t\t\t\t\t\tfrequencyList.add(array[2]);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!scanner.hasNextLine()) \n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tline = scanner.nextLine();\n\t\t\t\t\t\t\tarray = line.split(\"\\t\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tscanner.close();\n\t\t\t\tlong end = System.currentTimeMillis();\n\t\t\t\t\n\t\t\t\tlblSearchedTerm.setText(\"Searched Term: \" + wordSearched);\n\t\t\t\texecutionTimeLabel.setText(\"Search Elapsed Time: \" + Float.toString((end - start) / 1000F));\n\t\t\t\t\n\t\t\t\tif(docList.size() == 0) {\n\t\t\t\t\ttableSearch.setModel(new DefaultTableModel());\n\t\t\t\t\tlblTermNotExist.setVisible(true);\n\t\t\t\t}\n\t\t\t\telse {\t\t\t\t\t\t\n\t\t\t\t\tDefaultTableModel model = new DefaultTableModel();\n\t\t\t\t model.setColumnIdentifiers(new Object[] {\"Doc Name\", \"Frequency\"});\n\t\t\t\t model.addRow(new Object[] {\"Doc Name\", \"Frequency\"});\n\t\t\t\t for(int n=0;n<docList.size();n++) \n\t\t\t\t \tmodel.addRow(new Object[] {docList.get(n), frequencyList.get(n)});\n\t\t\t\t\ttableSearch.setModel(model);\n\t\t\t\t}\n\t\t\t\tlayeredPane_1.setVisible(false);\n\t\t\t\tlayeredPane_2.setVisible(true);\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnGoBackToSearch.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tbtnSearch.setText(\"Search!\");\n\t\t\t\tlblTermNotExist.setVisible(false);\n\t\t\t\tlayeredPane_2.setVisible(false);\n\t\t\t\tlayeredPane_1.setVisible(true);\n\t\t\t}\n\t\t});\n\t\t\n\t\tbtnSearchForTerm.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\tlayeredPane.setVisible(false);\n\t\t\t\tlayeredPane_1.setVisible(true);\n\t\t\t}\n\t\t});\n\t}", "public void getFile(){\n\t\t\n\t\tParser parser = new Parser(f, this, taskPool);\n\t\tWorker w;\n\t\tfor (int i = 0; i < this.getTasks().getNumWorker(); i++){\n\t\t\t w = new Worker(position, this);\n\t\t\t w.setWorkerNum(i);\n\t\t\t workers.add(w);\n\t\t\t} \n\t\t\n\t\tworkPanel = new WorkPanel(tasks, this, workers);\n\t\tworkPanel.setBounds(0, 0, 600, 600);\n\t\tThread twp = new Thread(workPanel);\n\t\ttwp.start();\n\n\t\tmainPanel.add(workPanel);\n\t\t\n\t\t\tfor (int k = 0; k < workers.size(); k++){\n\t\t\t\tworkers.get(k).start();\n\t\t\t}\n\n\t}", "public void newFileButtonListener() {\r\n workSpace.setText(null);\r\n fileName = null;\r\n sansSerifButton.setSelected(true);\r\n italicFormatCheckBox.setSelected(false);\r\n boldFormatCheckBox.setSelected(false);\r\n }", "public void run() {\n\n List<BasePanel> panels = new ArrayList<BasePanel>();\n for (int i=0; i<frame.baseCount(); i++)\n panels.add(frame.baseAt(i));\n\n int i=0;\n for (BasePanel panel : panels) {\n if (panel.isBaseChanged()) {\n if (panel.getFile() != null) {\n autoSave(panel);\n }\n }\n else {\n }\n i++;\n }\n }", "public AccueilPanel() {\n initComponents();\n resetError();\n }", "private void initUI() {\n fileCount = wizard.getFileCount();\n fileByteCount = wizard.getByteCount();\n fileCountLabel.setText(String.valueOf(fileCount));\n updateByteCount(byteCountLabel, byteCountUnit, \"KB\", fileByteCount, 0);\n progressBar.setProgress(0);\n }", "private void initialize() {\r\n label = new JLabel();\r\n panel = new JPanel();\r\n }", "public FileSelectionFrame() throws ZipException, IOException {\n initComponents();\n new FileSelectionFrame().setVisible(true);\n\n\n }", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttry {\r\n\t\t\t\tstTpanel = new StudentPanelTotal(selectedFile, getStudentArray());\r\n\t\t\t\tcen.removeAll();\r\n\t\t\t\tcen.add(stTpanel.getPanel());\r\n\t\t\t\tpack();\r\n\t\t\t\t}catch(Exception ex) {\r\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Error\");\r\n\t\t\t\t}\r\n\t\t\t}", "public ShapeFile(){\n numShapes = 0;\n }", "void clearDataAndProceed() {\n\t\tclearData();\n\t\tfileCounter++;\n\t\tif (fileCounter >= fileNames.size()){\n\t\t\tSystem.exit(0);\n\t\t\tSystem.out.println(\"Images over\");\n\t\t}\n\t\tloadImage();\n\t}", "public FileViewer()\n {\n // initialise instance variables\n super(\"File Viewer 1.0\");\n setSize(300,400);\n getContentPane().add(txtIsiFile);\n try{\n txtIsiFile.setText(fl1.bacaFile(\"data.txt\"));\n }catch(Exception e){e.printStackTrace();}\n setVisible(true);\n }", "private void initializePSMPanel() {\n psmAnalysisPanel = new JPanel(new GridBagLayout());\n\n GridBagConstraints c = new GridBagConstraints();\n c.fill = GridBagConstraints.HORIZONTAL;\n c.insets = new Insets(5, 5, 5, 5);\n\n int row = 0;\n\n // fieldPSMAnalysisFileID >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n c.gridx = 0;\n c.gridy = row;\n c.gridwidth = 1;\n psmAnalysisPanel.add(new JLabel(\"FileID for PSM output:\"), c);\n\n NumberFormat nf = NumberFormat.getNumberInstance();\n nf.setMaximumFractionDigits(0);\n\n fieldPSMAnalysisFileID = new JFormattedTextField(nf);\n fieldPSMAnalysisFileID.setValue(PIASettings.PSM_ANALYSIS_FILE_ID.getDefaultInteger());\n c.gridx = 1;\n c.gridy = row;\n c.gridwidth = 1;\n c.weightx = 1;\n psmAnalysisPanel.add(fieldPSMAnalysisFileID, c);\n\n c.gridx = 2;\n c.gridy = row++;\n c.gridwidth = 1;\n c.weightx = 0;\n psmAnalysisPanel.add(new JLabel(\"(0 for merge/overview, 1..n for specific file given to the compiler)\"), c);\n // fieldPSMAnalysisFileID <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // CalculateAllFDR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkCalculateAllFDR = new JCheckBox(\"Calculate FDR for all files\");\n checkCalculateAllFDR.setSelected(PIASettings.CALCULATE_ALL_FDR.getDefaultBoolean());\n checkCalculateAllFDR.addChangeListener(this);\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 3;\n psmAnalysisPanel.add(checkCalculateAllFDR, c);\n // CalculateAllFDR <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // CalculateCombinedFDRScore >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n checkCalculateCombinedFDRScore = new JCheckBox(\"Calculate Combined FDR Score (used to combine results of multiple search engines)\");\n checkCalculateCombinedFDRScore.setSelected(PIASettings.CALCULATE_COMBINED_FDR_SCORE.getDefaultBoolean());\n checkCalculateCombinedFDRScore.setEnabled(allowCombinedFDRScoreCalculation());\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 3;\n psmAnalysisPanel.add(checkCalculateCombinedFDRScore, c);\n // CalculateCombinedFDRScore <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // DecoyStrategyAndPattern >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n c.gridx = 0;\n c.gridy = row;\n c.gridwidth = 1;\n psmAnalysisPanel.add(new JLabel(\"How to define decoys:\"), c);\n\n JRadioButton allDecoyStrategyPattern = new JRadioButton(\"accession pattern\");\n allDecoyStrategyPattern.setActionCommand(FDRData.DecoyStrategy.ACCESSIONPATTERN.toString());\n allDecoyStrategyPattern.addActionListener(this);\n allDecoyStrategyPattern.setSelected(PIASettings.ALL_DECOY_STRATEGY.getDefaultString().equals(allDecoyStrategyPattern.getActionCommand()));\n allDecoyStrategyPattern.addActionListener(this);\n\n JRadioButton allDecoyStrategySearchengine = new JRadioButton(\"by searchengine\");\n allDecoyStrategySearchengine.setActionCommand(FDRData.DecoyStrategy.SEARCHENGINE.toString());\n allDecoyStrategySearchengine.addActionListener(this);\n allDecoyStrategySearchengine.setSelected(PIASettings.ALL_DECOY_STRATEGY.getDefaultString().equals(allDecoyStrategySearchengine.getActionCommand()));\n allDecoyStrategySearchengine.addActionListener(this);\n\n allDecoyStrategy = new ButtonGroup();\n allDecoyStrategy.add(allDecoyStrategyPattern);\n allDecoyStrategy.add(allDecoyStrategySearchengine);\n\n c.insets = new Insets(0, 5, 0, 5);\n c.gridx = 1;\n c.gridy = row++;\n c.gridwidth = 1;\n psmAnalysisPanel.add(allDecoyStrategyPattern, c);\n\n c.gridx = 1;\n c.gridy = row++;\n c.gridwidth = 1;\n psmAnalysisPanel.add(allDecoyStrategySearchengine, c);\n\n c.insets = new Insets(5, 5, 5, 5);\n c.gridx = 0;\n c.gridy = row;\n c.gridwidth = 1;\n c.gridheight = 1;\n psmAnalysisPanel.add(new JLabel(\"Decoy pattern:\"), c);\n\n fieldAllDecoyPattern = new JTextField(PIASettings.ALL_DECOY_PATTERN.getDefaultString(), 10);\n fieldAllDecoyPattern.setEnabled(allDecoyStrategyPattern.isSelected());\n c.gridx = 1;\n c.gridy = row;\n c.gridwidth = 1;\n psmAnalysisPanel.add(fieldAllDecoyPattern, c);\n\n c.gridwidth = 1;\n c.gridheight = 1;\n c.gridx = 2;\n c.gridy = row++;\n psmAnalysisPanel.add(new JLabel(\"(common patterns are e.g.: \\\"rev_.*\\\", \\\"DECOY_.*\\\")\"), c);\n // DecoyStrategyAndPattern <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // AllUsedIdentifications >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n c.gridx = 0;\n c.gridy = row;\n c.gridwidth = 1;\n psmAnalysisPanel.add(new JLabel(\"Used identifications:\"), c);\n\n JRadioButton usedIdentificationsTop = new JRadioButton(\"only top identification per spectrum (all other identifications will be discarded)\");\n usedIdentificationsTop.setActionCommand(\"1\");\n usedIdentificationsTop.setSelected(PIASettings.ALL_USED_IDENTIFICATIONS.getDefaultInteger() == 1 );\n JRadioButton usedIdentificationsAll = new JRadioButton(\"all identifications per spectrum\");\n usedIdentificationsAll.setActionCommand(\"0\");\n usedIdentificationsAll.setSelected(PIASettings.ALL_USED_IDENTIFICATIONS.getDefaultInteger() == 0);\n\n allUsedTopIdentifications = new ButtonGroup();\n allUsedTopIdentifications.add(usedIdentificationsTop);\n allUsedTopIdentifications.add(usedIdentificationsAll);\n\n c.insets = new Insets(0, 5, 0, 5);\n c.gridx = 1;\n c.gridy = row++;\n c.gridwidth = 2;\n psmAnalysisPanel.add(usedIdentificationsTop, c);\n\n c.gridx = 1;\n c.gridy = row++;\n psmAnalysisPanel.add(usedIdentificationsAll, c);\n c.insets = new Insets(5, 5, 5, 5);\n // AllTopIdentifications <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // PreferredFDRScore >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n JPanel fdrScorePanel = new JPanel(new GridBagLayout());\n fdrScorePanel.setBorder(BorderFactory.createTitledBorder(\"Preferred PSM scores\"));\n\n GridBagConstraints layoutFdrScorePanel = new GridBagConstraints();\n layoutFdrScorePanel.fill = GridBagConstraints.HORIZONTAL;\n\n layoutFdrScorePanel.gridx = 0;\n layoutFdrScorePanel.gridy = 0;\n fdrScorePanel.add(new JLabel(\"Available scores\"), layoutFdrScorePanel);\n\n DefaultListModel<String> availablePreferredFDRScores = new DefaultListModel<>();\n\n availablePreferredFDRScoresList = new JList<>(availablePreferredFDRScores);\n availablePreferredFDRScoresList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n availablePreferredFDRScoresList.setLayoutOrientation(JList.VERTICAL);\n availablePreferredFDRScoresList.setCellRenderer(new ScoreCellRenderer());\n\n JScrollPane listScroller = new JScrollPane(availablePreferredFDRScoresList);\n listScroller.setPreferredSize(new Dimension(200, 100));\n\n // add all the scores, refine later\n for (ScoreModelEnum score : ScoreModelEnum.values()) {\n if (!ScoreModelEnum.getNotForPSMFdrScore().contains(score) && !ScoreModelEnum.UNKNOWN_SCORE.equals(score)) {\n availablePreferredFDRScores.addElement(score.getShortName());\n }\n }\n\n layoutFdrScorePanel.gridx = 0;\n layoutFdrScorePanel.gridy = 1;\n fdrScorePanel.add(listScroller, layoutFdrScorePanel);\n\n layoutFdrScorePanel.gridx = 2;\n layoutFdrScorePanel.gridy = 0;\n fdrScorePanel.add(new JLabel(\"Selected scores\"), layoutFdrScorePanel);\n\n DefaultListModel<String> selectedPreferredFDRScores = new DefaultListModel<>();\n\n selectedPreferredFDRScoresList = new JList<>(selectedPreferredFDRScores);\n selectedPreferredFDRScoresList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n selectedPreferredFDRScoresList.setLayoutOrientation(JList.VERTICAL);\n selectedPreferredFDRScoresList.setCellRenderer(new ScoreCellRenderer());\n\n listScroller = new JScrollPane(selectedPreferredFDRScoresList);\n listScroller.setPreferredSize(new Dimension(200, 100));\n\n layoutFdrScorePanel.gridx = 2;\n layoutFdrScorePanel.gridy = 1;\n fdrScorePanel.add(listScroller, layoutFdrScorePanel);\n\n\n JPanel psmScoreButtonsPanel = new JPanel();\n psmScoreButtonsPanel.setLayout(new BoxLayout(psmScoreButtonsPanel, BoxLayout.Y_AXIS));\n psmScoreButtonsPanel.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));\n\n addToPreferredButton = new JButton(\"Add >>\");\n addToPreferredButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n addToPreferredButton.addActionListener(this);\n psmScoreButtonsPanel.add(addToPreferredButton);\n\n psmScoreButtonsPanel.add(Box.createRigidArea(new Dimension(0, 5)));\n\n removeFromPreferredButton = new JButton(\"Remove <<\");\n removeFromPreferredButton.setAlignmentX(Component.CENTER_ALIGNMENT);\n removeFromPreferredButton.addActionListener(this);\n psmScoreButtonsPanel.add(removeFromPreferredButton);\n\n layoutFdrScorePanel.gridx = 1;\n layoutFdrScorePanel.gridy = 1;\n fdrScorePanel.add(psmScoreButtonsPanel, layoutFdrScorePanel);\n\n layoutFdrScorePanel.gridx = 0;\n layoutFdrScorePanel.gridy = 2;\n layoutFdrScorePanel.gridwidth = 3;\n fdrScorePanel.add(new JLabel(\"If no score is selected, PIA will use defaults.\"), layoutFdrScorePanel);\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 3;\n psmAnalysisPanel.add(fdrScorePanel, c);\n // PreferredFDRScore <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n // PSMLevelFilters >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n filtersPSMLevel = new FilterPanel(\"Filters for PSM level\");\n\n // add all available PSM filters\n for (RegisteredFilters filter : RegisteredFilters.getPSMFilters()) {\n filtersPSMLevel.addAvailableFilter(filter);\n }\n filtersPSMLevel.addAvailableFilter(RegisteredFilters.PSM_SCORE_FILTER);\n filtersPSMLevel.addAvailableFilter(RegisteredFilters.PSM_TOP_IDENTIFICATION_FILTER);\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 3;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.anchor = GridBagConstraints.NORTHWEST;\n psmAnalysisPanel.add(filtersPSMLevel, c);\n\n c.gridx = 0;\n c.gridy = row++;\n c.gridwidth = 3;\n c.fill = GridBagConstraints.HORIZONTAL;\n c.weighty = 1.0;\n c.anchor = GridBagConstraints.NORTH;\n psmAnalysisPanel.add(new JLabel(\"Selected filters do not impact the peptide and protein inference, but only the export of PSMs.\"), c);\n // PSMLevelFilters <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n }", "public MibParsePanel()\r\n {\r\n this.before();\r\n initComponents();\r\n }", "public ControlPanel() {\n\t\tpanelName = null;\n\t}", "public Main() {\n initComponents();\n DropFileTransferHandler dfth=new DropFileTransferHandler(JFileChooser.FILES_ONLY);\n dfth.setActionListener(handler);\n setTransferHandler(dfth);\n movieConverterPanel.setTransferHandler(dfth);\n }", "public MainJFrame() {\n initComponents();\n this.setTitle(originaltitle);\n this.jTree1.getSelectionModel().setSelectionMode\n (TreeSelectionModel.SINGLE_TREE_SELECTION);\n this.RemoveMethods();\n if (MainJFrame.classfilename!=null&&!MainJFrame.classfilename.equals(\"\"))\n {\n File file = new File(MainJFrame.classfilename);\n if (!file.exists()) return;\n //j.getSelectedFile();\n filePath = file.getAbsolutePath();\n File sdirectory = file.getParentFile();\n if (sdirectory.exists()&&sdirectory.isDirectory())\n Directory = sdirectory;\n LoadFile(filePath);\n }\n }", "private void initComponents() {\n\n projectNameLabel = new javax.swing.JLabel();\n projectNameTextField = new javax.swing.JTextField();\n projectLocationLabel = new javax.swing.JLabel();\n projectLocationTextField = new javax.swing.JTextField();\n browseButton = new javax.swing.JButton();\n createdFolderLabel = new javax.swing.JLabel();\n createdFolderTextField = new javax.swing.JTextField();\n jLabel1 = new javax.swing.JLabel();\n jScrollPane1 = new javax.swing.JScrollPane();\n inputFiles = new javax.swing.JList();\n jButton1 = new javax.swing.JButton();\n jButton2 = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n outputFolder = new javax.swing.JTextField();\n jButton3 = new javax.swing.JButton();\n\n projectNameLabel.setLabelFor(projectNameTextField);\n org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.projectNameLabel.text\")); // NOI18N\n\n projectLocationLabel.setLabelFor(projectLocationTextField);\n org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.projectLocationLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.browseButton.text\")); // NOI18N\n browseButton.setActionCommand(org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.browseButton.actionCommand\")); // NOI18N\n browseButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browseButtonActionPerformed(evt);\n }\n });\n\n createdFolderLabel.setLabelFor(createdFolderTextField);\n org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.createdFolderLabel.text\")); // NOI18N\n\n createdFolderTextField.setEditable(false);\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jLabel1.text\")); // NOI18N\n\n inputFiles.setModel(getListModel());\n jScrollPane1.setViewportView(inputFiles);\n inputFiles.setModel(getListModel());\n inputFiles.setCellRenderer(new FileListCellRenderer());\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton1, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton1.text\")); // NOI18N\n jButton1.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton1ActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton2, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton2.text\")); // NOI18N\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jLabel2.text\")); // NOI18N\n\n outputFolder.setText(org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.outputFolder.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(jButton3, org.openide.util.NbBundle.getMessage(chromaUIProjectPanelVisual.class, \"chromaUIProjectPanelVisual.jButton3.text\")); // NOI18N\n jButton3.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton3ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectNameLabel)\n .addComponent(projectLocationLabel)\n .addComponent(createdFolderLabel)\n .addComponent(jLabel1)\n .addComponent(jLabel2))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 199, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browseButton))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(outputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, 197, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jButton3)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jButton2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)))))\n .addContainerGap())\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectNameLabel)\n .addComponent(projectNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(projectLocationLabel)\n .addComponent(projectLocationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(browseButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(createdFolderLabel)\n .addComponent(createdFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 133, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jButton1)\n .addGap(18, 18, 18)\n .addComponent(jButton2)))\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addGap(36, 36, 36))\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(outputFolder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButton3))\n .addContainerGap())))\n );\n }", "public Parser(String parserFilename, String dataFilename)\n/* */ {\n/* 57 */ initComponents();\n/* */ \n/* 59 */ this.parserPanel = new ParserPanel();\n/* 60 */ getContentPane().add(\"Center\", this.parserPanel);\n/* 61 */ if (parserFilename != null) {\n/* 62 */ this.parserPanel.loadParser(parserFilename);\n/* */ }\n/* 64 */ if (dataFilename != null) {\n/* 65 */ this.parserPanel.loadFile(dataFilename);\n/* */ }\n/* 67 */ pack();\n/* */ }", "public FilePanel(PropertyChangeListener listener) {\n pcs = new PropertyChangeSupport(this);\n pcs.addPropertyChangeListener(listener);\n initComponents();\n setFonts();\n init();\n }", "private void initComponents() {\n\n fileSelectionButtonGroup = new javax.swing.ButtonGroup();\n displayTimesButtonGroup = new javax.swing.ButtonGroup();\n logoSourceButtonGroup = new javax.swing.ButtonGroup();\n jScrollPane1 = new javax.swing.JScrollPane();\n jPanel1 = new javax.swing.JPanel();\n logoPanel = new javax.swing.JPanel();\n agencyLogoPathField = new javax.swing.JTextField();\n browseLogosButton = new javax.swing.JButton();\n agencyLogoPreview = new javax.swing.JLabel();\n defaultLogoRB = new javax.swing.JRadioButton();\n specifyLogoRB = new javax.swing.JRadioButton();\n agencyLogoPathFieldValidationLabel = new javax.swing.JLabel();\n runtimePanel = new javax.swing.JPanel();\n maxMemoryLabel = new javax.swing.JLabel();\n maxMemoryUnitsLabel = new javax.swing.JLabel();\n totalMemoryLabel = new javax.swing.JLabel();\n systemMemoryTotal = new javax.swing.JLabel();\n restartNecessaryWarning = new javax.swing.JLabel();\n memField = new javax.swing.JTextField();\n memFieldValidationLabel = new javax.swing.JLabel();\n maxMemoryUnitsLabel1 = new javax.swing.JLabel();\n maxLogFileCount = new javax.swing.JLabel();\n logFileCount = new javax.swing.JTextField();\n logNumAlert = new javax.swing.JTextField();\n maxSolrMemoryLabel = new javax.swing.JLabel();\n maxMemoryUnitsLabel2 = new javax.swing.JLabel();\n solrMaxHeapSpinner = new javax.swing.JSpinner();\n solrJVMHeapWarning = new javax.swing.JLabel();\n\n setPreferredSize(new java.awt.Dimension(1022, 488));\n\n jScrollPane1.setBorder(null);\n jScrollPane1.setPreferredSize(new java.awt.Dimension(1022, 407));\n\n jPanel1.setPreferredSize(new java.awt.Dimension(1022, 407));\n\n logoPanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.logoPanel.border.title\"))); // NOI18N\n logoPanel.setPreferredSize(new java.awt.Dimension(533, 87));\n\n agencyLogoPathField.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.agencyLogoPathField.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(browseLogosButton, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.browseLogosButton.text\")); // NOI18N\n browseLogosButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n browseLogosButtonActionPerformed(evt);\n }\n });\n\n agencyLogoPreview.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);\n org.openide.awt.Mnemonics.setLocalizedText(agencyLogoPreview, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.agencyLogoPreview.text\")); // NOI18N\n agencyLogoPreview.setBorder(javax.swing.BorderFactory.createEtchedBorder());\n agencyLogoPreview.setMaximumSize(new java.awt.Dimension(64, 64));\n agencyLogoPreview.setMinimumSize(new java.awt.Dimension(64, 64));\n agencyLogoPreview.setPreferredSize(new java.awt.Dimension(64, 64));\n\n logoSourceButtonGroup.add(defaultLogoRB);\n org.openide.awt.Mnemonics.setLocalizedText(defaultLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.defaultLogoRB.text\")); // NOI18N\n defaultLogoRB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n defaultLogoRBActionPerformed(evt);\n }\n });\n\n logoSourceButtonGroup.add(specifyLogoRB);\n org.openide.awt.Mnemonics.setLocalizedText(specifyLogoRB, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.specifyLogoRB.text\")); // NOI18N\n specifyLogoRB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n specifyLogoRBActionPerformed(evt);\n }\n });\n\n agencyLogoPathFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));\n org.openide.awt.Mnemonics.setLocalizedText(agencyLogoPathFieldValidationLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.agencyLogoPathFieldValidationLabel.text\")); // NOI18N\n\n javax.swing.GroupLayout logoPanelLayout = new javax.swing.GroupLayout(logoPanel);\n logoPanel.setLayout(logoPanelLayout);\n logoPanelLayout.setHorizontalGroup(\n logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(specifyLogoRB)\n .addComponent(defaultLogoRB))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(logoPanelLayout.createSequentialGroup()\n .addComponent(agencyLogoPathField, javax.swing.GroupLayout.PREFERRED_SIZE, 259, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(browseLogosButton))\n .addComponent(agencyLogoPathFieldValidationLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(456, Short.MAX_VALUE))\n );\n logoPanelLayout.setVerticalGroup(\n logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(logoPanelLayout.createSequentialGroup()\n .addGap(6, 6, 6)\n .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(defaultLogoRB)\n .addComponent(agencyLogoPathFieldValidationLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(logoPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(specifyLogoRB)\n .addComponent(agencyLogoPathField)\n .addComponent(browseLogosButton)))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, logoPanelLayout.createSequentialGroup()\n .addComponent(agencyLogoPreview, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n\n runtimePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.runtimePanel.border.title\"))); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(maxMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.maxMemoryLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.maxMemoryUnitsLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(totalMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.totalMemoryLabel.text\")); // NOI18N\n\n systemMemoryTotal.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);\n\n restartNecessaryWarning.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/org/sleuthkit/autopsy/corecomponents/warning16.png\"))); // NOI18N\n org.openide.awt.Mnemonics.setLocalizedText(restartNecessaryWarning, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.restartNecessaryWarning.text\")); // NOI18N\n\n memField.setHorizontalAlignment(javax.swing.JTextField.TRAILING);\n memField.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n memFieldKeyReleased(evt);\n }\n });\n\n memFieldValidationLabel.setForeground(new java.awt.Color(255, 0, 0));\n\n org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel1, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.maxMemoryUnitsLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(maxLogFileCount, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.maxLogFileCount.text\")); // NOI18N\n\n logFileCount.setHorizontalAlignment(javax.swing.JTextField.TRAILING);\n logFileCount.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyReleased(java.awt.event.KeyEvent evt) {\n logFileCountKeyReleased(evt);\n }\n });\n\n logNumAlert.setEditable(false);\n logNumAlert.setFont(logNumAlert.getFont().deriveFont(logNumAlert.getFont().getStyle() & ~java.awt.Font.BOLD, 11));\n logNumAlert.setForeground(new java.awt.Color(255, 0, 0));\n logNumAlert.setText(org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.logNumAlert.text\")); // NOI18N\n logNumAlert.setBorder(null);\n\n org.openide.awt.Mnemonics.setLocalizedText(maxSolrMemoryLabel, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.maxSolrMemoryLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(maxMemoryUnitsLabel2, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.maxMemoryUnitsLabel2.text\")); // NOI18N\n\n solrMaxHeapSpinner.addChangeListener(new javax.swing.event.ChangeListener() {\n public void stateChanged(javax.swing.event.ChangeEvent evt) {\n solrMaxHeapSpinnerStateChanged(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(solrJVMHeapWarning, org.openide.util.NbBundle.getMessage(AutopsyOptionsPanel.class, \"AutopsyOptionsPanel.solrJVMHeapWarning.text\")); // NOI18N\n\n javax.swing.GroupLayout runtimePanelLayout = new javax.swing.GroupLayout(runtimePanel);\n runtimePanel.setLayout(runtimePanelLayout);\n runtimePanelLayout.setHorizontalGroup(\n runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(runtimePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(runtimePanelLayout.createSequentialGroup()\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(totalMemoryLabel)\n .addComponent(maxSolrMemoryLabel)\n .addComponent(maxMemoryLabel)\n .addComponent(maxLogFileCount))\n .addGap(12, 12, 12)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(logFileCount, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(solrMaxHeapSpinner, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(memField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(systemMemoryTotal, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(maxMemoryUnitsLabel1)\n .addComponent(maxMemoryUnitsLabel)\n .addComponent(maxMemoryUnitsLabel2))\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(runtimePanelLayout.createSequentialGroup()\n .addGap(23, 23, 23)\n .addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 478, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(246, Short.MAX_VALUE))\n .addGroup(runtimePanelLayout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addComponent(solrJVMHeapWarning, javax.swing.GroupLayout.DEFAULT_SIZE, 717, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(logNumAlert)\n .addContainerGap())))\n .addComponent(restartNecessaryWarning, javax.swing.GroupLayout.DEFAULT_SIZE, 994, Short.MAX_VALUE)))\n );\n\n runtimePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {maxLogFileCount, maxMemoryLabel, totalMemoryLabel});\n\n runtimePanelLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {logFileCount, memField});\n\n runtimePanelLayout.setVerticalGroup(\n runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(runtimePanelLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(totalMemoryLabel)\n .addComponent(maxMemoryUnitsLabel1)\n .addComponent(systemMemoryTotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(memFieldValidationLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(maxMemoryLabel)\n .addComponent(memField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(maxMemoryUnitsLabel)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(logNumAlert, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(maxSolrMemoryLabel)\n .addComponent(maxMemoryUnitsLabel2)\n .addComponent(solrMaxHeapSpinner, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(solrJVMHeapWarning)))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(runtimePanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(maxLogFileCount)\n .addComponent(logFileCount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(restartNecessaryWarning)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(runtimePanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(logoPanel, javax.swing.GroupLayout.DEFAULT_SIZE, 1010, Short.MAX_VALUE))\n .addContainerGap())\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(runtimePanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(logoPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(171, Short.MAX_VALUE))\n );\n\n jScrollPane1.setViewportView(jPanel1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGap(0, 0, Short.MAX_VALUE))\n );\n }", "public ReportPane() {\n initComponents();\n }", "public Controller() {\r\n\r\n this.cw = new ChineseWhispers();\r\n this.pg = new JPanel();\r\n // set display mode\r\n try {\r\n UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());\r\n SwingUtilities.updateComponentTreeUI(this);\r\n UIManager.getLookAndFeelDefaults().put(\"Label.font\", new Font(null, Font.ROMAN_BASELINE, 11));\r\n UIManager.getLookAndFeelDefaults().put(\"RadioButton.font\", new Font(null, Font.ROMAN_BASELINE, 11));\r\n UIManager.getLookAndFeelDefaults().put(\"TextField.font\", new Font(null, Font.ROMAN_BASELINE, 11));\r\n UIManager.getLookAndFeelDefaults().put(\"Button.font\", new Font(null, Font.BOLD, 11));\r\n UIManager.getLookAndFeelDefaults().put(\"CheckBox.font\", new Font(null, Font.ROMAN_BASELINE, 11));\r\n } catch (Exception e2) {\r\n System.out.println(\"Error in GUI\");\r\n }\r\n this.getSavedValues();\r\n this.getSavedDBValues();\r\n\r\n // P1.setBackground(myColor);\r\n // P2.setBackground(myColor);\r\n // P3.setBackground(myColor);\r\n\r\n // main panel*********************************\r\n // elemente definieren\r\n JLabel text0 = new JLabel(\"<html><u><b>INPUT</b></u></html>\");\r\n JLabel text1 = new JLabel(\"Nodes:\");\r\n this.nodefileText = new JTextField(25);\r\n this.nodeFileBrowseButton = new JButton(\"Browse\");\r\n this.nodeFileBrowseButton.setActionCommand(\"nodelist\");\r\n JLabel text2 = new JLabel(\"Edges:\");\r\n this.edgeFileText = new JTextField(25);\r\n this.edgeFileBrowseButton = new JButton(\"Browse\");\r\n this.edgeFileBrowseButton.setActionCommand(\"edgelist\");\r\n this.fillFilenames();// insert values into nodelist and edgelist\r\n\r\n this.FilesNumbered = new JCheckBox(\"Input is pre-numbered\");\r\n this.FilesNumbered.setBackground(this.P1.getBackground());\r\n this.FilesNumbered.setToolTipText(\"skips process of renumbering (applies to input from database and files).\");\r\n\r\n this.GraphInMemory = new JCheckBox(\"keep graph in RAM\");\r\n this.GraphInMemory.setBackground(this.P1.getBackground());\r\n this.GraphInMemory.setToolTipText(\"Whether to keep graph in RAM or on disc. Uncheck for large graphs\");\r\n this.GraphInMemory.setSelected(true);\r\n\r\n this.UseFile = new JRadioButton(\"Input from file\", true);\r\n this.UseFile.setToolTipText(\"read graph from files. Browse for node list and edge list.\");\r\n this.UseFile.setBackground(this.P1.getBackground());\r\n\r\n this.loadFromFileProgress = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);\r\n this.loadFromFileProgress.setStringPainted(true);\r\n this.loadFromFileProgress.setBackground(Color.LIGHT_GRAY);\r\n this.loadFromFileProgress.setVisible(false);\r\n\r\n this.UseFile.setMargin(new Insets(0, 0, 0, 0));\r\n this.UseFile.setActionCommand(\"UseFile\");\r\n this.UseFile.addActionListener(this);\r\n\r\n this.UseDB = new JRadioButton(\"Input from database\", false);\r\n this.UseDB.setToolTipText(\"Use database as specified in database panel\");\r\n this.UseDB.setBackground(this.P1.getBackground());\r\n this.UseDB.setMargin(new Insets(0, 0, 0, 0));\r\n this.UseDB.setActionCommand(\"UseDB\");\r\n this.UseDB.addActionListener(this);\r\n\r\n this.loadFromDBProgress = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);\r\n this.loadFromDBProgress.setStringPainted(true);\r\n this.loadFromDBProgress.setBackground(Color.LIGHT_GRAY);\r\n this.loadFromDBProgress.setVisible(false);\r\n\r\n JLabel text3 = new JLabel(\"<html><u><b>OUTPUT</b></u></html>\");\r\n\r\n this.DBOutBox = new JCheckBox(\"Output to database\");\r\n this.DBOutBox.setBackground(this.P1.getBackground());\r\n // DBOutBox.setEnabled(false);\r\n\r\n this.DBOutBox.setActionCommand(\"DBOutBox\");\r\n this.DBOutBox.addActionListener(this);\r\n this.DBOutBox.setSelected(false);\r\n this.DBOutBox.setToolTipText(\"Use database for results as specified in the database tab.\");\r\n\r\n this.writeIntoDBProgress = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);\r\n this.writeIntoDBProgress.setStringPainted(true);\r\n this.writeIntoDBProgress.setBackground(Color.LIGHT_GRAY);\r\n this.writeIntoDBProgress.setVisible(false);\r\n\r\n this.FileOutBox = new JCheckBox(\"Output to file\");\r\n this.FileOutBox.setBackground(this.P1.getBackground());\r\n this.FileOutBox.setActionCommand(\"FileOutBox\");\r\n this.FileOutBox.addActionListener(this);\r\n this.FileOutBox.setSelected(false);\r\n this.FileOutBox.setToolTipText(\"Use file for output.\");\r\n\r\n this.writeIntoFiles = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);\r\n this.writeIntoFiles.setStringPainted(true);\r\n this.writeIntoFiles.setBackground(Color.LIGHT_GRAY);\r\n this.writeIntoFiles.setVisible(false);\r\n\r\n this.FileOutField = new JTextField(25);\r\n this.FileOutField.setBackground(Color.LIGHT_GRAY);\r\n this.FileOutField.setEnabled(false);\r\n\r\n this.FileOutBrowseButton = new JButton(\"browse\");\r\n this.FileOutBrowseButton.setActionCommand(\"FileOutBrowse\");\r\n this.FileOutBrowseButton.addActionListener(this);\r\n this.FileOutBrowseButton.setEnabled(false);\r\n\r\n this.MultFileOutBrowse = new JButton(\"browse\");\r\n this.MultFileOutBrowse.setActionCommand(\"FileOutBrowse\");\r\n this.MultFileOutBrowse.addActionListener(this);\r\n this.MultFileOutBrowse.setEnabled(false);\r\n\r\n this.startFileDB = new JButton(\"start\");\r\n this.startFileDB.setActionCommand(\"startFileDB\");\r\n this.startFileDB.addActionListener(this);\r\n this.startFileDB.setEnabled(false);\r\n this.startFileDB.setToolTipText(\"Starts Chinese Whispers and writes into file or database.\");\r\n\r\n this.CalculateCWLabel = new JLabel(\"calculating chinese whispers\");\r\n this.CalculateCWLabel.setVisible(false);\r\n\r\n this.calculateCWProgress = new JProgressBar(JProgressBar.HORIZONTAL, 0, 100);\r\n this.calculateCWProgress.setStringPainted(true);\r\n this.calculateCWProgress.setBackground(Color.LIGHT_GRAY);\r\n this.calculateCWProgress.setVisible(false);\r\n\r\n this.startGraph = new JLabel(\"Start and open the graph display\");\r\n this.startDiagramm = new JLabel(\"Start and open the diagram display\");\r\n\r\n String s = System.getProperty(\"file.separator\");\r\n\r\n this.AsGraph = new JButton(new ImageIcon(Controller.class.getResource(\"pics/graphicon.gif\")));\r\n this.AsGraph.setToolTipText(\"Start and open the graph display\");\r\n this.AsDia = new JButton(new ImageIcon(Controller.class.getResource(\"pics/diaicon.gif\")));\r\n this.AsDia.setToolTipText(\"Starts and open the diagram display.\");\r\n this.AsFile = new JButton(\"File\");\r\n this.AsDB = new JButton(\"Database\");\r\n\r\n // element size and positions\r\n text0.setBounds(10, 20, 100, 20);\r\n this.UseFile.setBounds(10, 50, 140, 20);\r\n this.FilesNumbered.setBounds(146, 50, 200, 20);\r\n this.GraphInMemory.setBounds(346, 50, 250, 20);\r\n this.loadFromFileProgress.setBounds(210, 57, 90, 10);\r\n this.loadFromFileProgress.setBorderPainted(false);\r\n this.loadFromFileProgress.setStringPainted(false);\r\n this.loadFromFileProgress.setBackground(Color.WHITE);\r\n\r\n text1.setBounds(10, 75, 100, 20);\r\n text2.setBounds(10, 100, 100, 20);\r\n this.nodefileText.setBounds(150, 75, 150, 20);\r\n this.edgeFileText.setBounds(150, 100, 150, 20);\r\n this.nodeFileBrowseButton.setBounds(320, 75, 80, 20);\r\n this.edgeFileBrowseButton.setBounds(320, 100, 80, 20);\r\n\r\n this.UseDB.setBounds(10, 135, 200, 20);\r\n this.loadFromDBProgress.setBounds(210, 142, 90, 10);\r\n this.loadFromDBProgress.setBorderPainted(false);\r\n this.loadFromDBProgress.setStringPainted(false);\r\n this.loadFromDBProgress.setBackground(Color.WHITE);\r\n\r\n text3.setBounds(10, 170, 100, 20);\r\n this.DBOutBox.setBounds(10, 200, 130, 20);\r\n this.writeIntoDBProgress.setBounds(210, 207, 90, 10);\r\n this.writeIntoDBProgress.setBackground(Color.WHITE);\r\n this.writeIntoDBProgress.setBorderPainted(false);\r\n this.writeIntoDBProgress.setStringPainted(false);\r\n\r\n this.FileOutBox.setBounds(10, 225, 120, 20);\r\n this.FileOutField.setBounds(150, 225, 150, 20);\r\n\r\n this.writeIntoFiles.setBounds(210, 232, 90, 10);\r\n this.writeIntoFiles.setBackground(Color.WHITE);\r\n this.writeIntoFiles.setBorderPainted(false);\r\n this.writeIntoFiles.setStringPainted(false);\r\n\r\n this.FileOutBrowseButton.setBounds(320, 225, 80, 20);\r\n\r\n this.startFileDB.setBounds(10, 255, 80, 20);\r\n\r\n this.startGraph.setBounds(10, 290, 180, 20);\r\n this.startDiagramm.setBounds(200, 290, 180, 20);\r\n\r\n this.AsGraph.setBounds(10, 315, 51, 51);\r\n this.AsDia.setBounds(200, 315, 50, 50);\r\n\r\n this.CalculateCWLabel.setBounds(419, 325, 200, 20);\r\n this.calculateCWProgress.setBounds(420, 345, 150, 10);\r\n this.calculateCWProgress.setBackground(Color.WHITE);\r\n this.calculateCWProgress.setBorderPainted(false);\r\n this.calculateCWProgress.setStringPainted(false);\r\n\r\n // add elements to GUI\r\n this.P1.add(this.UseFile);\r\n this.P1.add(this.FilesNumbered);\r\n this.P1.add(this.GraphInMemory);\r\n\r\n this.P1.add(this.loadFromFileProgress);\r\n this.P1.add(text0);\r\n this.P1.add(text1);\r\n this.P1.add(text2);\r\n this.P1.add(this.nodefileText);\r\n this.P1.add(this.edgeFileText);\r\n this.P1.add(this.nodeFileBrowseButton);\r\n this.P1.add(this.edgeFileBrowseButton);\r\n this.P1.add(this.UseDB);\r\n this.P1.add(this.loadFromDBProgress);\r\n this.P1.add(text3);\r\n\r\n this.P1.add(this.DBOutBox);\r\n this.P1.add(this.writeIntoDBProgress);\r\n this.P1.add(this.FileOutBox);\r\n\r\n this.P1.add(this.writeIntoFiles);\r\n\r\n this.P1.add(this.AsGraph);\r\n this.P1.add(this.AsDia);\r\n this.P1.add(this.AsFile);\r\n this.P1.add(this.AsDB);\r\n this.P1.add(this.startFileDB);\r\n this.P1.add(this.startGraph);\r\n this.P1.add(this.startDiagramm);\r\n\r\n this.P1.add(this.CalculateCWLabel);\r\n this.P1.add(this.calculateCWProgress);\r\n\r\n // listeners\r\n this.nodeFileBrowseButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.openFile(e);\r\n }\r\n });\r\n this.edgeFileBrowseButton.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.openFile(e);\r\n }\r\n });\r\n this.AsGraph.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.pl_LastFiles.setParam(\"nodelist-file\", Controller.this.nodefileText.getText());\r\n Controller.this.pl_LastFiles.setParam(\"edgelist-file\", Controller.this.edgeFileText.getText());\r\n Controller.this.startGraph();\r\n }\r\n });\r\n this.AsDia.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.pl_LastFiles.setParam(\"nodelist-file\", Controller.this.nodefileText.getText());\r\n Controller.this.pl_LastFiles.setParam(\"edgelist-file\", Controller.this.edgeFileText.getText());\r\n Controller.this.startDia();\r\n }\r\n });\r\n this.AsFile.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n }\r\n });\r\n this.AsDB.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n }\r\n });\r\n\r\n // ************************************************************************\r\n // expert panel******************************************************\r\n\r\n // define elements\r\n JLabel textg = new JLabel(\"<html><b><u>GRAPH SETTINGS</u></b></html>\");\r\n JLabel text4 = new JLabel(\"<html><b>- degree of nodes:</b><br>\" + \"<smaller>\"\r\n + \"<b>value &lt; 0</b>, display nodes with higher degree<br>\"\r\n + \"<b>value &gt; 0</b>, display nodes with lower degree<br>\" + \"<b>value = 0</b>, display all nodes\"\r\n + \"</smaller></html>\");\r\n this.L = new LinkedList();\r\n for (int i = -300; i <= 300; i += 1) {\r\n this.L.add(Integer.toString(i));\r\n }\r\n this.nodeDegreeSpinner = new JSpinner(new SpinnerListModel(this.L));\r\n this.nodeDegreeSpinner.setValue(this.display_node_degree_current);\r\n\r\n JLabel text5 = new JLabel(\"<html><b>- max. number of edges to draw:</b></html>\");\r\n this.L = new LinkedList();\r\n this.L.add(\"all\");\r\n for (int i = 100; i <= 100000; i += 10) {\r\n this.L.add(Integer.toString(i));\r\n }\r\n this.displayEdgesSpinner = new JSpinner(new SpinnerListModel(this.L));\r\n this.displayEdgesSpinner.setValue(this.display_edges_current);\r\n\r\n // *\r\n JLabel text6 = new JLabel(\"<html><b>- scale:</b></html>\");\r\n this.L = new LinkedList();\r\n this.L.add(\"600 x 600\");\r\n this.L.add(\"1000 x 1000\");\r\n this.L.add(\"2000 x 2000\");\r\n this.L.add(\"3000 x 3000\");\r\n this.L.add(\"4000 x 4000\");\r\n this.L.add(\"5000 x 5000\");\r\n this.L.add(\"6000 x 6000\");\r\n this.scaleSpinner = new JSpinner(new SpinnerListModel(this.L));\r\n this.scaleSpinner.setValue(this.scale_current);\r\n\r\n // *\r\n this.only_sub = new JCheckBox(\"<html><b> starts with an empty subgraph panel</b></html>\");\r\n this.only_sub.setBackground(this.P1.getBackground());\r\n this.only_sub.setMargin(new Insets(0, 0, 0, 0));\r\n this.only_sub.setSelected(this.display_sub_current);\r\n\r\n // *\r\n JLabel texta = new JLabel(\"<html><b><u>ALGORITHM</u></b></html>\");\r\n JLabel text7 = new JLabel(\"<html><b>- minimum edge weight threshold</b></html>\");\r\n this.L = new LinkedList();\r\n for (int i = 0; i <= 10000; i += 1) {\r\n this.L.add(Integer.toString(i));\r\n }\r\n this.minweightSpinner = new JSpinner(new SpinnerListModel(this.L));\r\n this.minweightSpinner.setValue(this.minweight_edges_current);\r\n\r\n // *\r\n JLabel text8 = new JLabel(\"<html><b>- number of iterations:</b></html>\");\r\n this.L = new LinkedList();\r\n for (int i = 10; i <= 200; i += 1) {\r\n this.L.add(Integer.toString(i));\r\n }\r\n this.iterationsSpinner = new JSpinner(new SpinnerListModel(this.L));\r\n this.iterationsSpinner.setValue(this.iterations_current);\r\n\r\n JLabel text9 = new JLabel(\"<html><b>- algorithm strategy:</b></html>\");\r\n JLabel text10 = new JLabel(\"<html><b>- mutation:</b></html>\");\r\n JLabel text11 = new JLabel(\"<html><b>- update strategy:</b></html>\");\r\n JLabel text12 = new JLabel(\"<html><b>- keep color rate:</b></html>\");\r\n\r\n this.Alg_param = new ButtonGroup();\r\n this.mutationParameter = new ButtonGroup();\r\n this.Update_param = new ButtonGroup();\r\n\r\n this.dec = new JRadioButton(\"exp. decreasing\", this.mut_option_current.equals(\"dec\"));\r\n this.dec.setActionCommand(\"dec\");\r\n this.dec.setBackground(this.P1.getBackground());\r\n this.dec.setMargin(new Insets(0, 0, 0, 0));\r\n this.dec.addActionListener(this);\r\n\r\n this.constant = new JRadioButton(\"constant\", this.mut_option_current.equals(\"constant\"));\r\n this.constant.setActionCommand(\"constant\");\r\n this.constant.setBackground(this.P1.getBackground());\r\n this.constant.setMargin(new Insets(0, 0, 0, 0));\r\n this.constant.addActionListener(this);\r\n\r\n this.stepwise = new JRadioButton(\"stepwise\", this.update_param_current.equals(\"stepwise\"));\r\n this.stepwise.setActionCommand(\"stepwise\");\r\n this.stepwise.setBackground(this.P1.getBackground());\r\n this.stepwise.setMargin(new Insets(0, 0, 0, 0));\r\n this.stepwise.addActionListener(this);\r\n\r\n this.continuous = new JRadioButton(\"continuous\", this.update_param_current.equals(\"continuous\"));\r\n this.continuous.setActionCommand(\"continuous\");\r\n this.continuous.setBackground(this.P1.getBackground());\r\n this.continuous.setMargin(new Insets(0, 0, 0, 0));\r\n this.continuous.addActionListener(this);\r\n\r\n this.top = new JRadioButton(\"top\", this.alg_param_current.equals(\"top\"));\r\n this.top.setActionCommand(\"top\");\r\n this.top.setBackground(this.P1.getBackground());\r\n this.top.setMargin(new Insets(0, 0, 0, 0));\r\n this.top.addActionListener(this);\r\n\r\n this.dist_log = new JRadioButton(\"dist log\", this.alg_param_current.equals(\"dist log\"));\r\n this.dist_log.setActionCommand(\"dist log\");\r\n this.dist_log.setBackground(this.P1.getBackground());\r\n this.dist_log.setMargin(new Insets(0, 0, 0, 0));\r\n this.dist_log.addActionListener(this);\r\n\r\n this.dist_nolog = new JRadioButton(\"dist nolog\", this.alg_param_current.equals(\"dist nolog\"));\r\n this.dist_nolog.setActionCommand(\"dist nolog\");\r\n this.dist_nolog.setBackground(this.P1.getBackground());\r\n this.dist_nolog.setMargin(new Insets(0, 0, 0, 0));\r\n this.dist_nolog.addActionListener(this);\r\n\r\n this.vote = new JRadioButton(\"vote\", this.alg_param_current.equals(\"vote\"));\r\n this.vote.setActionCommand(\"vote\");\r\n this.vote.setBackground(this.P1.getBackground());\r\n this.vote.setMargin(new Insets(0, 0, 0, 0));\r\n this.vote.addActionListener(this);\r\n\r\n LinkedList L5 = new LinkedList();\r\n L5.add(\" 0.0 \");\r\n L5.add(\" 0.1 \");\r\n L5.add(\" 0.2 \");\r\n L5.add(\" 0.3 \");\r\n L5.add(\" 0.4 \");\r\n L5.add(\" 0.5 \");\r\n L5.add(\" 0.6 \");\r\n L5.add(\" 0.7 \");\r\n L5.add(\" 0.8 \");\r\n L5.add(\" 0.9 \");\r\n L5.add(\" 1.0 \");\r\n this.vote_value = new JSpinner(new SpinnerListModel(L5));\r\n this.vote_value.setValue(this.vote_value_current);\r\n\r\n LinkedList L6 = new LinkedList();\r\n L6.add(\" 0.0 \");\r\n L6.add(\" 0.1 \");\r\n L6.add(\" 0.2 \");\r\n L6.add(\" 0.3 \");\r\n L6.add(\" 0.4 \");\r\n L6.add(\" 0.5 \");\r\n L6.add(\" 0.6 \");\r\n L6.add(\" 0.7 \");\r\n L6.add(\" 0.8 \");\r\n L6.add(\" 0.9 \");\r\n L6.add(\" 1.0 \");\r\n L6.add(\" 2.0 \");\r\n L6.add(\" 3.0 \");\r\n L6.add(\" 4.0 \");\r\n L6.add(\" 5.0 \");\r\n\r\n this.mut_value = new JSpinner(new SpinnerListModel(L6));\r\n this.mut_value.setValue(this.mut_value_current);\r\n\r\n LinkedList L7 = new LinkedList();\r\n L7.add(\" 0.0 \");\r\n L7.add(\" 0.01 \");\r\n L7.add(\" 0.05 \");\r\n L7.add(\" 0.1 \");\r\n L7.add(\" 0.2 \");\r\n L7.add(\" 0.3 \");\r\n L7.add(\" 0.4 \");\r\n L7.add(\" 0.5 \");\r\n L7.add(\" 0.6 \");\r\n L7.add(\" 0.7 \");\r\n L7.add(\" 0.8 \");\r\n L7.add(\" 0.9 \");\r\n L7.add(\" 1.0 \");\r\n this.keep_value = new JSpinner(new SpinnerListModel(L7));\r\n this.keep_value.setValue(this.keepclass_value_current);\r\n\r\n // inaktive for all options but 'vote'\r\n if (!this.alg_param_current.equals(\"vote\"))\r\n this.vote_value.setEnabled(false);\r\n\r\n this.Alg_param.add(this.top);\r\n this.Alg_param.add(this.dist_log);\r\n this.Alg_param.add(this.dist_nolog);\r\n this.Alg_param.add(this.vote);\r\n\r\n this.mutationParameter.add(this.dec);\r\n this.mutationParameter.add(this.constant);\r\n\r\n this.Update_param.add(this.stepwise);\r\n this.Update_param.add(this.continuous);\r\n\r\n this.setdefault = new JButton(\"default\");\r\n this.setdefault.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.setDefaultValues();\r\n }\r\n });\r\n\r\n this.save = new JButton(\"apply\");\r\n this.save.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.saveValues();\r\n }\r\n });\r\n\r\n textg.setBounds(10, 20, 100, 20);\r\n text4.setBounds(10, 50, 250, 60);\r\n text4.setVerticalAlignment(JLabel.TOP);\r\n this.nodeDegreeSpinner.setBounds(260, 50, 100, 20);\r\n\r\n text5.setBounds(10, 120, 250, 20);\r\n this.displayEdgesSpinner.setBounds(260, 120, 100, 20);\r\n\r\n text6.setBounds(10, 150, 250, 20);\r\n this.scaleSpinner.setBounds(260, 150, 100, 20);\r\n\r\n this.only_sub.setBounds(10, 180, 250, 20);\r\n texta.setBounds(10, 220, 100, 20);\r\n\r\n text7.setBounds(10, 245, 250, 20);\r\n this.minweightSpinner.setBounds(260, 245, 100, 20);\r\n\r\n text8.setBounds(10, 275, 250, 20);\r\n this.iterationsSpinner.setBounds(260, 275, 100, 20);\r\n\r\n text9.setBounds(10, 305, 250, 20);\r\n this.top.setBounds(260, 305, 50, 20);\r\n this.dist_log.setBounds(310, 305, 70, 20);\r\n this.dist_nolog.setBounds(380, 305, 80, 20);\r\n this.vote.setBounds(460, 305, 50, 20);\r\n this.vote_value.setBounds(510, 305, 50, 20);\r\n\r\n text10.setBounds(10, 335, 250, 20);\r\n this.dec.setBounds(260, 335, 100, 20);\r\n this.constant.setBounds(380, 335, 70, 20);\r\n this.mut_value.setBounds(450, 335, 50, 20);\r\n\r\n text11.setBounds(10, 365, 250, 20);\r\n this.stepwise.setBounds(260, 365, 100, 20);\r\n this.continuous.setBounds(380, 365, 100, 20);\r\n\r\n text12.setBounds(10, 395, 250, 20);\r\n this.keep_value.setBounds(260, 395, 50, 20);\r\n\r\n this.save.setBounds(10, 450, 80, 20);\r\n this.setdefault.setBounds(95, 450, 80, 20);\r\n\r\n this.P2.add(textg);\r\n this.P2.add(text4);\r\n this.P2.add(this.nodeDegreeSpinner);\r\n this.P2.add(text6);\r\n this.P2.add(this.scaleSpinner);\r\n this.P2.add(this.only_sub);\r\n this.P2.add(texta);\r\n this.P2.add(text7);\r\n this.P2.add(this.minweightSpinner);\r\n this.P2.add(text8);\r\n this.P2.add(this.iterationsSpinner);\r\n this.P2.add(text9);\r\n this.P2.add(this.top);\r\n this.P2.add(this.dist_log);\r\n this.P2.add(this.dist_nolog);\r\n this.P2.add(this.vote);\r\n this.P2.add(this.vote_value);\r\n this.P2.add(text10);\r\n this.P2.add(this.dec);\r\n this.P2.add(this.constant);\r\n this.P2.add(this.mut_value);\r\n\r\n this.P2.add(text11);\r\n this.P2.add(this.stepwise);\r\n this.P2.add(this.continuous);\r\n this.P2.add(text12);\r\n this.P2.add(this.keep_value);\r\n\r\n this.P2.add(this.save);\r\n this.P2.add(this.setdefault);\r\n\r\n this.P2.add(text5);\r\n this.P2.add(this.displayEdgesSpinner);\r\n ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n // database panel\r\n JLabel rdatabase = new JLabel(\"<html><u><b>DATABASE</b></u></html>\");\r\n rdatabase.setBounds(10, 20, 100, 20);\r\n\r\n JLabel rhostname = new JLabel(\"Hostname:\");\r\n rhostname.setBounds(20, 40, 100, 20);\r\n this.rhostfield = new JTextField(25);\r\n this.rhostfield.setBounds(20, 60, 150, 20);\r\n this.rhostfield.setText(this.hostnameString);\r\n this.rhostfield.setEnabled(false);\r\n this.rhostfield.setBackground(Color.LIGHT_GRAY);\r\n this.rhostfield.setToolTipText(\"Enter the hostname of database server.\");\r\n\r\n JLabel rdatabasee = new JLabel(\"Database:\");\r\n rdatabasee.setBounds(190, 40, 100, 20);\r\n this.rdatabasefield = new JTextField(25);\r\n this.rdatabasefield.setBounds(190, 60, 150, 20);\r\n this.rdatabasefield.setText(this.databaseString);\r\n this.rdatabasefield.setEnabled(false);\r\n this.rdatabasefield.setBackground(Color.LIGHT_GRAY);\r\n this.rdatabasefield.setToolTipText(\"Enter the database name\");\r\n\r\n JLabel rport = new JLabel(\"Port:\");\r\n rport.setBounds(360, 40, 100, 20);\r\n this.rportfield = new JTextField(25);\r\n this.rportfield.setBounds(360, 60, 150, 20);\r\n this.rportfield.setText(new Integer(this.portNr).toString());\r\n this.rportfield.setEnabled(false);\r\n this.rportfield.setBackground(Color.LIGHT_GRAY);\r\n this.rportfield.setToolTipText(\"Enter the port of database server (default 3306).\");\r\n\r\n JLabel rusername = new JLabel(\"Username:\");\r\n rusername.setBounds(20, 80, 100, 20);\r\n this.ruserfield = new JTextField(25);\r\n this.ruserfield.setBounds(20, 100, 150, 20);\r\n this.ruserfield.setText(this.usernameString);\r\n this.ruserfield.setEnabled(false);\r\n this.ruserfield.setBackground(Color.LIGHT_GRAY);\r\n this.ruserfield.setToolTipText(\"Enter your username for database connection.\");\r\n\r\n JLabel rpasswd = new JLabel(\"Password:\");\r\n rpasswd.setBounds(190, 80, 100, 20);\r\n this.rpasswdfield = new JPasswordField(25);\r\n this.rpasswdfield.setBounds(190, 100, 150, 20);\r\n this.rpasswdfield.setText(this.passwdString);\r\n this.rpasswdfield.setEnabled(false);\r\n this.rpasswdfield.setBackground(Color.LIGHT_GRAY);\r\n this.rpasswdfield.setToolTipText(\"Enter the password for database connection.\");\r\n\r\n JLabel rtablename1 = new JLabel(\"<html><u><b>TABLE CONTAINING NODES</b></u></html>\");\r\n rtablename1.setBounds(10, 120, 250, 20);\r\n JLabel rtablename1e = new JLabel(\"Table name:\");\r\n rtablename1e.setBounds(20, 140, 100, 20);\r\n this.rtablename1efield = new JTextField(25);\r\n this.rtablename1efield.setBounds(20, 160, 150, 20);\r\n this.rtablename1efield.setText(this.NodeTableString);\r\n this.rtablename1efield.setEnabled(false);\r\n this.rtablename1efield.setBackground(Color.LIGHT_GRAY);\r\n this.rtablename1efield.setToolTipText(\"Enter the table name for nodes.\");\r\n\r\n JLabel colNodeID = new JLabel(\"Column node ID:\");\r\n colNodeID.setBounds(190, 140, 200, 20);\r\n this.colnodeIdfield = new JTextField(25);\r\n this.colnodeIdfield.setBounds(190, 160, 150, 20);\r\n this.colnodeIdfield.setText(this.NodeIDColString);\r\n this.colnodeIdfield.setEnabled(false);\r\n this.colnodeIdfield.setBackground(Color.LIGHT_GRAY);\r\n this.colnodeIdfield.setToolTipText(\"Enter the column name for node IDs.\");\r\n\r\n JLabel colNodeLabels = new JLabel(\"Colum node labels:\");\r\n colNodeLabels.setBounds(360, 140, 200, 20);\r\n this.colnodeLabelfield = new JTextField(25);\r\n this.colnodeLabelfield.setBounds(360, 160, 150, 20);\r\n this.colnodeLabelfield.setText(this.NodeLabelColString);\r\n this.colnodeLabelfield.setEnabled(false);\r\n this.colnodeLabelfield.setBackground(Color.LIGHT_GRAY);\r\n this.colnodeLabelfield.setToolTipText(\"Enter the column name for node labels.\");\r\n\r\n JLabel rtablename2 = new JLabel(\"<html><u><b>TABLE CONTAINING EDGES</b></u></html>\");\r\n rtablename2.setBounds(10, 180, 250, 20);\r\n JLabel rtablename2e = new JLabel(\"Table name:\");\r\n rtablename2e.setBounds(20, 200, 100, 20);\r\n this.rtablename2efield = new JTextField(25);\r\n this.rtablename2efield.setBounds(20, 220, 150, 20);\r\n this.rtablename2efield.setText(this.EdgeTableString);\r\n this.rtablename2efield.setEnabled(false);\r\n this.rtablename2efield.setBackground(Color.LIGHT_GRAY);\r\n this.rtablename2efield.setToolTipText(\"Enter the table name for edges.\");\r\n\r\n JLabel colwn1 = new JLabel(\"Col. node ID 1:\");\r\n colwn1.setBounds(20, 240, 150, 20);\r\n this.coledge1field = new JTextField(25);\r\n this.coledge1field.setBounds(20, 260, 150, 20);\r\n this.coledge1field.setText(this.EdgeCo1String);\r\n this.coledge1field.setEnabled(false);\r\n this.coledge1field.setBackground(Color.LIGHT_GRAY);\r\n this.coledge1field.setToolTipText(\"Enter the column name of node ID 1.\");\r\n\r\n JLabel colwn2 = new JLabel(\"Col. node ID 2:\");\r\n colwn2.setBounds(190, 240, 150, 20);\r\n this.coledge2field = new JTextField(25);\r\n this.coledge2field.setBounds(190, 260, 150, 20);\r\n this.coledge2field.setText(this.EdgeCol2String);\r\n this.coledge2field.setEnabled(false);\r\n this.coledge2field.setBackground(Color.LIGHT_GRAY);\r\n this.coledge2field.setToolTipText(\"Enter the column name of node ID 2.\");\r\n\r\n JLabel colsig = new JLabel(\"Col. weight:\");\r\n colsig.setBounds(360, 240, 150, 20);\r\n this.colweightfield = new JTextField(25);\r\n this.colweightfield.setBounds(360, 260, 150, 20);\r\n this.colweightfield.setText(this.EdgeWeightColString);\r\n this.colweightfield.setEnabled(false);\r\n this.colweightfield.setBackground(Color.LIGHT_GRAY);\r\n this.colweightfield.setToolTipText(\"Enter the column name for weights.\");\r\n\r\n JLabel otablename = new JLabel(\"<html><u><b>TABLE USED FOR OUTPUT</b></u></html>\");\r\n otablename.setBounds(10, 280, 250, 20);\r\n JLabel otablenamee = new JLabel(\"Table name:\");\r\n otablenamee.setBounds(20, 300, 150, 20);\r\n this.otablenamefield = new JTextField(25);\r\n this.otablenamefield.setBounds(20, 320, 150, 20);\r\n this.otablenamefield.setText(this.resultTableString);\r\n this.otablenamefield.setEnabled(false);\r\n this.otablenamefield.setBackground(Color.LIGHT_GRAY);\r\n this.otablenamefield.setToolTipText(\"Enter the table name for output in DB.\");\r\n\r\n // setDefaultDBValues();\r\n this.dbtake = new JButton(\"apply\");\r\n this.dbtake.setBounds(10, 350, 80, 20);\r\n this.dbtake.setEnabled(false);\r\n this.dbtake.setToolTipText(\"Use current values for db connection and operations.\");\r\n this.dbtake.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.saveDBValues();\r\n }\r\n });\r\n this.dbdefault = new JButton(\"default\");\r\n this.dbdefault.setBounds(95, 350, 80, 20);\r\n this.dbdefault.setEnabled(false);\r\n this.dbdefault.setToolTipText(\"Get default values.\");\r\n this.dbdefault.addActionListener(new ActionListener() {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n Controller.this.setDefaultDBValues();\r\n }\r\n });\r\n\r\n this.P3.add(rhostname);\r\n this.P3.add(this.rhostfield);\r\n this.P3.add(rport);\r\n this.P3.add(this.rportfield);\r\n this.P3.add(rusername);\r\n this.P3.add(this.ruserfield);\r\n\r\n this.P3.add(rdatabase);\r\n this.P3.add(rdatabasee);\r\n this.P3.add(this.rdatabasefield);\r\n this.P3.add(rpasswd);\r\n this.P3.add(this.rpasswdfield);\r\n\r\n this.P3.add(rtablename1);\r\n this.P3.add(rtablename1e);\r\n this.P3.add(this.rtablename1efield);\r\n this.P3.add(colNodeID);\r\n this.P3.add(this.colnodeIdfield);\r\n this.P3.add(colNodeLabels);\r\n this.P3.add(this.colnodeLabelfield);\r\n\r\n this.P3.add(rtablename2);\r\n this.P3.add(rtablename2e);\r\n this.P3.add(this.rtablename2efield);\r\n this.P3.add(colwn1);\r\n this.P3.add(this.coledge1field);\r\n this.P3.add(colwn2);\r\n this.P3.add(this.coledge2field);\r\n this.P3.add(colsig);\r\n this.P3.add(this.colweightfield);\r\n\r\n this.P3.add(otablename);\r\n this.P3.add(otablenamee);\r\n this.P3.add(this.otablenamefield);\r\n\r\n this.P3.add(this.dbtake);\r\n this.P3.add(this.dbdefault);\r\n\r\n //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\r\n // ************************************************************************************************************\r\n\r\n // welcome panel\r\n JLabel l1 = new JLabel(\"<html><h1><u>Chinese Whispers</u></h1>\"\r\n + \"<p align=\\\"center\\\">A Graph Clustering Algorithm<br>\" + \"linear in the number of edges</p></html>\");\r\n l1.setHorizontalAlignment(JLabel.CENTER);\r\n l1.setVerticalAlignment(JLabel.BOTTOM);\r\n l1.setBackground(this.welcomePanel.getBackground());\r\n\r\n this.welcomePanel.add(l1);\r\n\r\n JLabel l2 = new JLabel(new ImageIcon(Controller.class.getResource(\"pics/whisper1.jpg\")));\r\n l2.setHorizontalAlignment(JLabel.CENTER);\r\n l2.setVerticalAlignment(JLabel.CENTER);\r\n l2.setBackground(this.welcomePanel.getBackground());\r\n this.welcomePanel.add(l2);\r\n\r\n JLabel l3 = new JLabel(\"<html><p align=\\\"center\\\">ASV Toolbox 2005<br>\" + \"Authors:<br>\" + \"C. Biemann, \"\r\n + \"R. Gwizdziel, \" + \"S. Gottwald</p></html>\");\r\n l3.setHorizontalAlignment(JLabel.CENTER);\r\n l3.setVerticalAlignment(JLabel.TOP);\r\n l3.setBackground(this.welcomePanel.getBackground());\r\n this.welcomePanel.add(l3);\r\n\r\n this.addTab(\"welcome\", this.welcomePanel);\r\n this.addTab(\"main\", this.P1);\r\n this.addTab(\"expert\", this.P2);\r\n this.addTab(\"database\", this.P3);\r\n }", "private void initComponents() {\n\n jFileChooserFilterChain = new javax.swing.JFileChooser();\n imagePreprocessingPanel1 = new imagepreprocessing.view.ImagePreprocessingPanel();\n jComboBoxFilterChains = new javax.swing.JComboBox();\n jButtonLoadChain = new javax.swing.JButton();\n jButtonSaveChain = new javax.swing.JButton();\n\n jComboBoxFilterChains.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jComboBoxFilterChainsActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jButtonLoadChain, org.openide.util.NbBundle.getMessage(ImageDataSetVisualPanel3.class, \"ImageDataSetVisualPanel3.jButtonLoadChain.text\")); // NOI18N\n jButtonLoadChain.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonLoadChainActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(jButtonSaveChain, org.openide.util.NbBundle.getMessage(ImageDataSetVisualPanel3.class, \"ImageDataSetVisualPanel3.jButtonSaveChain.text\")); // NOI18N\n jButtonSaveChain.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButtonSaveChainActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(imagePreprocessingPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jComboBoxFilterChains, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonSaveChain, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jButtonLoadChain, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(27, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(31, 31, 31)\n .addComponent(imagePreprocessingPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGroup(layout.createSequentialGroup()\n .addGap(97, 97, 97)\n .addComponent(jComboBoxFilterChains, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonLoadChain)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(jButtonSaveChain)))\n .addContainerGap(35, Short.MAX_VALUE))\n );\n }", "public Browser()\n\t{\n\t\tinitComponents();\n\t\tlibraryViewer1.setThumbnail(thumbnails1);\n\t\t\n\t\ttimer = new Timer();\n timer.schedule(new CheckFilesTask(libraryViewer1), 5000, 5000);\n\t}", "public MainFrame() {\n initComponents();\n jLabel_Site.setCursor(new Cursor(Cursor.HAND_CURSOR));\n jf = new JFileChooser();\n jf.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n SpinnerNumberModel model = new SpinnerNumberModel(DownTask.getInstance().getPOOL_SIZE(), 1, 500, 1);\n jSpThreadCount.setModel(model);\n jTextField_SavePath.setText(DownTask.getInstance().getSavePath());\n MainFrameUI.setTaskTable(jTable_TaskList);\n MainFrameUI.setDowningTable(jTable_Download);\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n fileLabel = new javax.swing.JLabel();\n fileTextField = new javax.swing.JTextField();\n fileSelectButton = new javax.swing.JButton();\n rowEditorsCountLabel_ = new javax.swing.JLabel();\n rowEditorsCountTextField = new javax.swing.JTextField();\n panelViewersCountLabel = new javax.swing.JLabel();\n panelViewersCountTextField = new javax.swing.JTextField();\n panelEditorsCountLabel = new javax.swing.JLabel();\n panelEditorsCountTextField = new javax.swing.JTextField();\n\n fileLabel.setText(\"File\");\n\n fileSelectButton.setText(\"Select...\");\n fileSelectButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n fileSelectButtonActionPerformed(evt);\n }\n });\n\n rowEditorsCountLabel_.setText(\"Row Editors Count\");\n\n panelViewersCountLabel.setText(\"Panel Viewers Count\");\n\n panelEditorsCountLabel.setText(\"Panel Editors Count\");\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(rowEditorsCountTextField)\n .addGroup(layout.createSequentialGroup()\n .addComponent(fileTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 390, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(fileSelectButton))\n .addComponent(panelViewersCountTextField, javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(panelEditorsCountTextField, javax.swing.GroupLayout.Alignment.TRAILING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(fileLabel)\n .addComponent(panelViewersCountLabel)\n .addComponent(rowEditorsCountLabel_)\n .addComponent(panelEditorsCountLabel))\n .addGap(0, 0, 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(fileLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(fileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(fileSelectButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rowEditorsCountLabel_)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(rowEditorsCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(panelViewersCountLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelViewersCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelEditorsCountLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(panelEditorsCountTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(137, Short.MAX_VALUE))\n );\n }", "public FileControl( String fileName ) {\n this.fileName = fileName;\n }", "public void getFile(JPanel panel) {\n listOfFile= new ArrayList();\n for(int x=0; x<listOfFiles.length;x++) {\n listOfFile.add(listOfFiles[x]);\n }\n if(FileManaging.isMac()) {\n if(listOfFile.contains(Mac_DS_Store))\n listOfFile.remove(Mac_DS_Store);\n if(listOfFile.contains(Mac_Option))\n listOfFile.remove(Mac_Option);\n //if(listOfFile.contains(Mac_Log))\n // listOfFile.remove(Mac_Log);\n }\n if(panel!=null)\n for(int x=0; x<listOfFile.size();x++) {\n buttons.put(x, new JButton(listOfFile.get(x).getName()));\n buttons.get(x).setVisible(true);\n buttons.get(x).setActionCommand(x+\"\");\n buttons.get(x).addActionListener(this);\n buttons.get(x).setBackground(Color.green);\n panel.add(buttons.get(x));\n }\n }", "public DRInitialPlotPanel() {\n initComponents();\n }", "public PreviewPanel() {\n initComponents();\n\n }", "public Onlineupload() {\n initComponents();\n }", "@FXML\n\tpublic void newFile() {\n\t\tuserText.clear();\n\t\tfile = null;\n\t}", "public void run() {\n displayFileWindow();\n }", "public PoseurFileManager()\r\n {\r\n // NOTHING YET\r\n currentFile = null;\r\n currentFileName = null;\r\n saved = true;\r\n poseIO = new PoseIO();\r\n }", "public FileInputFrame() {\n\t\tinitUI();\n\t\tthis.setTitle(\"Load Input File\");\n\t\tthis.setSize(FRAME_WIDTH, FRAME_HEIGHT);\n\t\tthis.add(fileInputPanel);\n\t\tthis.setLocationRelativeTo(null);\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\n\t\tthis.setResizable(false);\n\t}", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(255, 204, 153));\n\t\tframe.setBounds(100, 100, 972, 541);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\t\t\n\t\tJButton filescan = new JButton(\"File Scan\");\n\t\tfilescan.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tframe.setVisible(false);\n\t\t\t\topen(FileCheck.rawAnalysis(path,0));\n\t\t\t}\n\t\t});\n\t\tfilescan.setBackground(new Color(255, 255, 153));\n\t\tfilescan.setBounds(321, 455, 89, 23);\n\t\tframe.getContentPane().add(filescan);\n\t\t\n\t\tJButton songscan = new JButton(\"Song Scan\");\n\t\tsongscan.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\topen(FileCheck.rawAnalysis(path,1));\n\t\t\t}\n\t\t});\n\t\tsongscan.setBounds(440, 455, 89, 23);\n\t\tframe.getContentPane().add(songscan);\n\t\t\n\t\tJButton both = new JButton(\"File & Song\");\n\t\tboth.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\topen(FileCheck.rawAnalysis(path,2));\n\t\t\t}\n\t\t});\n\t\tboth.setBounds(563, 455, 89, 23);\n\t\tframe.getContentPane().add(both);\n\t\tfileChooser.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tupload = fileChooser.getSelectedFile();\n\t\t\t\tpath = upload.getAbsolutePath();\n\t\t\t}\n\t\t});\n\t\t\n\t\tfileChooser.setBackground(new Color(255, 255, 153));\n\t\tfileChooser.setBounds(10, 37, 946, 407);\n\t\tframe.getContentPane().add(fileChooser);\n\t\t\n\t\tJTextArea choosefile = new JTextArea();\n\t\tchoosefile.setForeground(new Color(102, 51, 0));\n\t\tchoosefile.setBackground(new Color(255, 255, 153));\n\t\tchoosefile.setFont(new Font(\"SansSerif\", Font.BOLD, 15));\n\t\tchoosefile.setLineWrap(true);\n\t\tchoosefile.setText(\"Choose a file, then select the process you want to run.\");\n\t\tchoosefile.setBounds(277, 11, 401, 32);\n\t\tframe.getContentPane().add(choosefile);\n\t}", "public ImportReuters21578FilesParameterPanel() {\n \n super();\n \n }", "public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.nbFilons = sliderFilons.getValue();\n\t\t\t\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t\t\t\t}", "private void setFile() {\n\t}", "void fileNewEmptyWindowActionPerformed(java.awt.event.ActionEvent evt) {\n\t}", "public FileLoadingGUI(Hipermercado current,GlobalStats oldStats) {\n initComponents();\n this.newHip = new Hipermercado();\n this.current = current;\n this.linhasClientes = this.linhasCompras = this.linhasProdutos = comprasValor0 = 0;\n this.comprasInvalidas = new ArrayList<>();\n this.oldStats=oldStats;\n this.estatisticas=new GlobalStats();\n }", "private void initialize() {\n\t\tframe = new JFrame();\n\t\tframe.getContentPane().setBackground(new Color(244, 164, 96));\n\t\tframe.setBounds(100, 100, 450, 300);\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tframe.getContentPane().setLayout(null);\n\n\t\tJButton btnNewButton = new JButton(\"Choose file \");\n\t\tbtnNewButton.addMouseListener(new MouseAdapter() {\n\t\t\t@Override\n\t\t\tpublic void mouseClicked(MouseEvent arg0) {\n\t\t\t\tchooseFile();\n\t\t\t}\n\n\t\t});\n\t\tbtnNewButton.setBackground(new Color(245, 222, 179));\n\t\tbtnNewButton.setForeground(new Color(0, 0, 0));\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 28));\n\t\tbtnNewButton.setBounds(73, 100, 280, 56);\n\t\tframe.getContentPane().add(btnNewButton);\n\t}", "public ClientPanel() {\n initComponents();\n chooser = new JFileChooser();\n \n }", "public CadastraFilme() {\n initComponents();\n }", "private ControlloFile() {\n\t}", "public Principal() {\n\n initComponents();\n this.panel1.setContentType(\"text/html\");\n this.panel2.setContentType(\"text/html\");\n this.panel3.setContentType(\"text/html\");\n llenarListaArchivos(1);\n llenarListaArchivos(2);\n }", "private void initialize() {\n\t\tGridBagConstraints gridBagConstraints21 = new GridBagConstraints();\n\t\tgridBagConstraints21.fill = GridBagConstraints.VERTICAL;\n\t\tgridBagConstraints21.gridy = 0;\n\t\tgridBagConstraints21.weightx = 1.0;\n\t\tgridBagConstraints21.gridx = 5;\n\t\tGridBagConstraints gridBagConstraints12 = new GridBagConstraints();\n\t\tgridBagConstraints12.gridx = 4;\n\t\tgridBagConstraints12.gridy = 0;\n\t\tjLabel2 = new JLabel();\n\t\tjLabel2.setText(\"Label File\");\n\t\tGridBagConstraints gridBagConstraints11 = new GridBagConstraints();\n\t\tgridBagConstraints11.gridx = 4;\n\t\tgridBagConstraints11.gridy = 0;\n\t\tGridBagConstraints gridBagConstraints3 = new GridBagConstraints();\n\t\tgridBagConstraints3.fill = GridBagConstraints.VERTICAL;\n\t\tgridBagConstraints3.gridy = 0;\n\t\tgridBagConstraints3.weightx = 1.0;\n\t\tgridBagConstraints3.gridx = 3;\n\t\tGridBagConstraints gridBagConstraints2 = new GridBagConstraints();\n\t\tgridBagConstraints2.gridx = 2;\n\t\tgridBagConstraints2.gridy = 0;\n\t\tjLabel1 = new JLabel();\n\t\tjLabel1.setText(\"Test File\");\n\t\tGridBagConstraints gridBagConstraints1 = new GridBagConstraints();\n\t\tgridBagConstraints1.fill = GridBagConstraints.VERTICAL;\n\t\tgridBagConstraints1.gridy = 0;\n\t\tgridBagConstraints1.weightx = 1.0;\n\t\tgridBagConstraints1.gridx = 1;\n\t\tGridBagConstraints gridBagConstraints = new GridBagConstraints();\n\t\tgridBagConstraints.gridx = 0;\n\t\tgridBagConstraints.gridy = 0;\n\t\tjLabel = new JLabel();\n\t\tjLabel.setText(\"Train File\");\n\t\tthis.setSize(435, 24);\n\t\tthis.setLayout(new GridBagLayout());\n\t\tthis.add(jLabel, gridBagConstraints);\n\t\tthis.add(getJComboBox(), gridBagConstraints1);\n\t\tthis.add(jLabel1, gridBagConstraints2);\n\t\tthis.add(getJComboBox1(), gridBagConstraints3);\n\t\tthis.add(jLabel2, gridBagConstraints12);\n\t\tthis.add(getJComboBox2(), gridBagConstraints21);\n\t\tthis.add(getJButton());\n\t}", "private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n dataDirectoryTextField = new javax.swing.JTextField();\n dataDirectoryLabel = new javax.swing.JLabel();\n datasetDescriptionFileTextField = new javax.swing.JTextField();\n datasetDescriptionFileLabel = new javax.swing.JLabel();\n chooseDataDirectoryButton = new javax.swing.JButton();\n chooseDatasetDescriptionFileButton = new javax.swing.JButton();\n outputDirectoryTextField = new javax.swing.JTextField();\n outputDirectoryLabel = new javax.swing.JLabel();\n chooseOutputDirectoryButton = new javax.swing.JButton();\n startSessionButton = new javax.swing.JButton();\n sessionCreatorLabel = new javax.swing.JLabel();\n sessionCreatorTextField = new javax.swing.JTextField();\n settingsTabbedPane = new javax.swing.JTabbedPane();\n flatFileSettingsPanel = new no.arkivverket.dataextracttools.arkade.modules.session.FlatFileSettingsPanel();\n maxNumberOfResultsLabel = new javax.swing.JLabel();\n maxNumberOfResultsTextField = new javax.swing.JTextField();\n maxNumberOfResultsTextField.setText(Integer.toString(MAX_NUMBER_OF_RESULTS));\n maxNumberOfResultsTextField.addKeyListener(new NumericalInput());\n debugSessionProcessingCheckBox = new javax.swing.JCheckBox();\n\n setLayout(new java.awt.BorderLayout());\n\n dataDirectoryTextField.setEditable(false);\n dataDirectoryTextField.setText(org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.dataDirectoryTextField.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(dataDirectoryLabel, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.dataDirectoryLabel.text\")); // NOI18N\n\n datasetDescriptionFileTextField.setEditable(false);\n datasetDescriptionFileTextField.setText(org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.datasetDescriptionFileTextField.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(datasetDescriptionFileLabel, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.datasetDescriptionFileLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(chooseDataDirectoryButton, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.chooseDataDirectoryButton.text\")); // NOI18N\n chooseDataDirectoryButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooseDataDirectoryButtonActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(chooseDatasetDescriptionFileButton, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.chooseDatasetDescriptionFileButton.text\")); // NOI18N\n chooseDatasetDescriptionFileButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooseDatasetDescriptionFileButtonActionPerformed(evt);\n }\n });\n\n outputDirectoryTextField.setEditable(false);\n outputDirectoryTextField.setText(org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.outputDirectoryTextField.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(outputDirectoryLabel, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.outputDirectoryLabel.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(chooseOutputDirectoryButton, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.chooseOutputDirectoryButton.text\")); // NOI18N\n chooseOutputDirectoryButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n chooseOutputDirectoryButtonActionPerformed(evt);\n }\n });\n\n startSessionButton.setFont(new java.awt.Font(\"Tahoma\", 0, 18)); // NOI18N\n org.openide.awt.Mnemonics.setLocalizedText(startSessionButton, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.startSessionButton.text\")); // NOI18N\n startSessionButton.setEnabled(false);\n startSessionButton.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n startSessionButtonActionPerformed(evt);\n }\n });\n\n org.openide.awt.Mnemonics.setLocalizedText(sessionCreatorLabel, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.sessionCreatorLabel.text\")); // NOI18N\n\n sessionCreatorTextField.setText(org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.sessionCreatorTextField.text\")); // NOI18N\n\n flatFileSettingsPanel.setName(\"flatFileSettings\"); // NOI18N\n settingsTabbedPane.addTab(org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.flatFileSettings.TabConstraints.tabTitle\"), flatFileSettingsPanel); // NOI18N\n\n maxNumberOfResultsLabel.setLabelFor(maxNumberOfResultsTextField);\n org.openide.awt.Mnemonics.setLocalizedText(maxNumberOfResultsLabel, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.maxNumberOfResultsLabel.text\") + \":\"); // NOI18N\n\n maxNumberOfResultsTextField.setText(org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.maxNumberOfResultsTextField.text\")); // NOI18N\n\n org.openide.awt.Mnemonics.setLocalizedText(debugSessionProcessingCheckBox, org.openide.util.NbBundle.getMessage(SessionTopComponent.class, \"SessionTopComponent.debugSessionProcessingCheckBox.text\")); // NOI18N\n debugSessionProcessingCheckBox.setSelected(\"true\".equals(System.getProperty(\"arkade.session.debug\", \"false\")));\n debugSessionProcessingCheckBox.addItemListener(new java.awt.event.ItemListener() {\n public void itemStateChanged(java.awt.event.ItemEvent evt) {\n debugSessionProcessingCheckBoxItemStateChanged(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(dataDirectoryLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(dataDirectoryTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 617, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chooseDataDirectoryButton))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(datasetDescriptionFileLabel)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(sessionCreatorTextField)\n .addComponent(datasetDescriptionFileTextField))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chooseDatasetDescriptionFileButton))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(outputDirectoryLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(startSessionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(sessionCreatorLabel)\n .addComponent(maxNumberOfResultsLabel))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(settingsTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(debugSessionProcessingCheckBox))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addComponent(maxNumberOfResultsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(0, 0, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addComponent(outputDirectoryTextField)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(chooseOutputDirectoryButton)))))\n .addContainerGap())\n );\n\n jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dataDirectoryLabel, datasetDescriptionFileLabel, maxNumberOfResultsLabel, outputDirectoryLabel, sessionCreatorLabel});\n\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(sessionCreatorLabel)\n .addComponent(sessionCreatorTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(datasetDescriptionFileTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(datasetDescriptionFileLabel)\n .addComponent(chooseDatasetDescriptionFileButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(dataDirectoryTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(dataDirectoryLabel)\n .addComponent(chooseDataDirectoryButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(outputDirectoryTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(outputDirectoryLabel)\n .addComponent(chooseOutputDirectoryButton))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(maxNumberOfResultsLabel)\n .addComponent(maxNumberOfResultsTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 254, Short.MAX_VALUE)\n .addComponent(startSessionButton, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addComponent(settingsTabbedPane, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)))\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(debugSessionProcessingCheckBox)))\n .addContainerGap())\n );\n\n add(jPanel1, java.awt.BorderLayout.CENTER);\n }", "AutopsyOptionsPanel() {\n initComponents();\n fileChooser = new JFileChooser();\n fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);\n fileChooser.setMultiSelectionEnabled(false);\n fileChooser.setAcceptAllFileFilterUsed(false);\n fileChooser.setFileFilter(new GeneralFilter(GeneralFilter.GRAPHIC_IMAGE_EXTS, GeneralFilter.GRAPHIC_IMG_DECR));\n if (!PlatformUtil.is64BitJVM() || Version.getBuildType() == Version.Type.DEVELOPMENT) {\n //32 bit JVM has a max heap size of 1.4 gb to 4 gb depending on OS\n //So disabling the setting of heap size when the JVM is not 64 bit \n //Is the safest course of action\n //And the file won't exist in the install folder when running through netbeans\n memField.setEnabled(false);\n solrMaxHeapSpinner.setEnabled(false);\n }\n systemMemoryTotal.setText(Long.toString(getSystemMemoryInGB()));\n // The cast to int in the following is to ensure that the correct SpinnerNumberModel\n // constructor is called.\n solrMaxHeapSpinner.setModel(new javax.swing.SpinnerNumberModel(UserPreferences.getMaxSolrVMSize(),\n 512, ((int)getSystemMemoryInGB()) * MEGA_IN_GIGA, 512));\n\n textFieldListener = new TextFieldListener();\n agencyLogoPathField.getDocument().addDocumentListener(textFieldListener);\n logFileCount.setText(String.valueOf(UserPreferences.getLogFileCount()));\n }", "public PanelInput() {\n initComponents();\n judul_1.setText(\"\");\n judul_2.setText(\"\");\n clear();\n }", "public SanPhamJFrame() {\n initComponents();\n setLocationRelativeTo(null);\n fileChooser = new JFileChooser();\n\n }", "public void fillFilenames() {\r\n if (this.pl_LastFiles.getParam(\"nodelist-file\") != null\r\n && this.pl_LastFiles.getParam(\"edgelist-file\") != null) {\r\n this.nodefileText.setText(this.pl_LastFiles.getParam(\"nodelist-file\"));\r\n this.edgeFileText.setText(this.pl_LastFiles.getParam(\"edgelist-file\"));\r\n } else {\r\n this.nodefileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20nodes.txt\");\r\n this.edgeFileText.setText(\"examples\" + System.getProperty(\"file.separator\") + \"20edges.txt\");\r\n }\r\n }", "protected void reset()\n\t{\n\t\tretcode = JOptionPane.CANCEL_OPTION;\n\t\tfiles = null;\n\t\taliases = null;\n\t\tjPathPanel.setText(\"\");\n\t\trpFilesTextArea.setText(\"\");\n\t\tsupTextField.setText(\"\");\n\t\tconfTextField.setText(\"\");\n\t}", "public FilePane(DownloadProvider provider) {\n super();\n this.provider = provider;\n }", "@FXML\r\n protected void setDatafile() throws Exception {\r\n boolean hasHeader = cbHeader.isSelected();\r\n String sep = \"\\t\";\r\n if (rbSemicolon.isSelected()) {\r\n sep = \";\";\r\n } else if (rbComma.isSelected()) {\r\n sep = \",\";\r\n } else if (rbOther.isSelected()) {\r\n String aux = tfSeparator.getCharacters().toString();\r\n if (aux.length() > 0) {\r\n sep = aux;\r\n } else {\r\n throw new Exception(\"Invalid Separator\");\r\n }\r\n }\r\n if (!tfFilename.getText().trim().isEmpty()) {\r\n ScanlineAnalysisFile file = new ScanlineAnalysisFile();\r\n file.setFilename(tfFilename.getText());\r\n file.setSep(sep);\r\n file.setApColumn(0);\r\n file.setSpColumn(1);\r\n file.setHeader(hasHeader);\r\n if (hasHeader) {\r\n file.setHeaderStrings(DatasetUtils.getHeaders(file.getFileName(), sep));\r\n } else {\r\n ArrayList<String> al = new ArrayList<>(file.getColumnsCount());\r\n for (int i = 0; i < file.getColumnsCount(); i++) {\r\n if (i == 0) {\r\n al.add(\"Ap\");\r\n }\r\n if (i == 1) {\r\n al.add(\"Sp\");\r\n }\r\n if (i > 1) {\r\n al.add(\"Column \" + String.valueOf(i));\r\n }\r\n }\r\n file.setHeaderStrings(al);\r\n }\r\n Scanline sl = OpenScanlineData.openCSVFileToScanline(tfFilename.getText(),\r\n sep, 0, 1, hasHeader);\r\n file.setScanLine(sl);\r\n file.setRowsCount(sl.getFracCount());//TODO fix this\r\n Stage s = (Stage) tfFilename.getScene().getWindow();\r\n s.close();\r\n MainStage.setSclAnalysisFile(file);\r\n MainStage.refreshStats();\r\n MainStage.enableButtons();\r\n }\r\n }", "public SubmitFiles(CtrlPresenter ctrlPresenter){\n\n vCtrlPresenter = ctrlPresenter;\n\n add(rootPanel);\n setTitle(\"Submit Files\");\n setSize(400,500);\n\n // We add a Listener to make the button do something\n selectClassroomsFileButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser();\n fc.setCurrentDirectory(new java.io.File(\"./data/import\"));\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\n \"JSON Files\", \"json\");\n fc.setFileFilter(filter);\n int returnVal = fc.showOpenDialog(rootPanel);\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n System.out.println(\"You chose to open this file: \" +\n fc.getCurrentDirectory().getAbsolutePath()+ \"/\" +\n fc.getSelectedFile().getName());\n classroomsFile = fc.getCurrentDirectory().getAbsolutePath()+ \"/\" + fc.getSelectedFile().getName();\n selectClassroomsFileButton.setForeground(Color.green);\n } else {\n selectClassroomsFileButton.setForeground(Color.red);\n }\n\n }\n });\n selectSubjectsFileButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser();\n fc.setCurrentDirectory(new java.io.File(\"./data/import\"));\n FileNameExtensionFilter filter = new FileNameExtensionFilter(\n \"JSON Files\", \"json\");\n fc.setFileFilter(filter);\n int returnVal = fc.showOpenDialog(rootPanel);\n if(returnVal == JFileChooser.APPROVE_OPTION) {\n System.out.println(\"You chose to open this file: \" +\n fc.getCurrentDirectory().getAbsolutePath()+ \"/\" +\n fc.getSelectedFile().getName());\n subjectsFile = fc.getCurrentDirectory().getAbsolutePath()+ \"/\" + fc.getSelectedFile().getName();\n selectSubjectsFileButton.setForeground(Color.green);\n }else {\n selectClassroomsFileButton.setForeground(Color.red);\n }\n }\n });\n\n\n\n nextbutton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n try {\n if (ctrlPresenter.setScenario(classroomsFile, subjectsFile)){\n ctrlPresenter.selectConstraints();\n }else{\n setEnabled(false);\n setVisible(false);\n vCtrlPresenter.backToInit();\n }\n } catch (Exception exc) {\n System.out.println(exc);\n }\n }\n });\n }", "public Records_Panel() {\n\t\tsuper();\n\t\tinitialize();\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttimer.stop();jbtAuto.setText(\"Start\");\n\t\t\t\ti++;\n\t\t\t\tif(i >= fileList.length)i = 0;\n\t\t\t\tShowImage.multiple = 1;\n\t\t\t\tjscrollPanel.setVisible(false);\n\t\t\t\tremove(jscrollPanel);\n\t\t\t\tshowImage = new ShowImage(fileList[i]);\n\t\t\t\tjscrollPanel = new JScrollPane(showImage,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\t\t\tjscrollPanel.setSize(xSize, ySize);\n\t\t\t\tjscrollPanel.setBounds(0, 60, xSize, ySize);\n\t\t\t\tadd(jscrollPanel);\n\t\t\t\tjscrollPanel.setVisible(false);\n\t\t\t\tjscrollPanel.setVisible(true);\n\t\t\t}", "public void clearFileds() {\r\n\t\tthis.jPanelFormClient.clearFields();\r\n\t}", "public void newFile()\n {\n this.componentEditor.setText(\"\");\n this.currentFile = null;\n this.preferences.removePreference(CompilerEditorPanel.PREFERENCE_LAST_FILE);\n this.title.setText(\"--Untitled--\");\n }", "public MainView() {\n initComponents();\n jCheckBoxEL0.setVisible(false);\n jCheckBoxEL1.setVisible(false);\n jCheckBoxEL2.setVisible(false);\n jCheckBoxEL3.setVisible(false);\n jCheckBoxEL4.setVisible(false);\n jCheckBoxEL5.setVisible(false);\n jCheckBoxEL6.setVisible(false);\n jCheckBoxEL7.setVisible(false);\n jCheckBoxEL8.setVisible(false);\n jCheckBoxEL9.setVisible(false);\n jCheckBoxEL10.setVisible(false);\n jCheckBoxEL11.setVisible(false);\n jCheckBoxEL1_1.setVisible(false);\n jCheckBoxEL1_2.setVisible(false); \n jCheckBoxELSheffield.setVisible(false);\n jCheckBoxOther1.setVisible(false);\n jCheckBoxOther2.setVisible(false);\n jCheckBoxOther3.setVisible(false); \n jCheckBoxOther4.setVisible(false);\n jCheckBoxOther5.setVisible(false);\n jCheckBoxOther6.setVisible(false); \n jCheckBoxWL1.setVisible(false);\n jCheckBoxWL2.setVisible(false);\n jCheckBoxWL3.setVisible(false);\n jCheckBoxWL4.setVisible(false);\n jCheckBoxWL5.setVisible(false);\n jCheckBoxWL6.setVisible(false);\n openFileChooser = new JFileChooser();\n openFileChooser.setCurrentDirectory(new File(\"c:\\\\\"));\n openFileChooser.setFileFilter(new FileNameExtensionFilter(\"TXT files\",\"txt\"));\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n mainPanel = new javax.swing.JPanel();\n lblSrc = new javax.swing.JLabel();\n lblTgt = new javax.swing.JLabel();\n jTxtSrc = new javax.swing.JTextField();\n jTxtTgt = new javax.swing.JTextField();\n btnSync = new javax.swing.JButton();\n btnReport = new javax.swing.JButton();\n btnSrcBrowse = new javax.swing.JButton();\n btnTrgBrowse = new javax.swing.JButton();\n menuBar = new javax.swing.JMenuBar();\n javax.swing.JMenu fileMenu = new javax.swing.JMenu();\n javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();\n javax.swing.JMenu helpMenu = new javax.swing.JMenu();\n javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();\n statusPanel = new javax.swing.JPanel();\n javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();\n statusMessageLabel = new javax.swing.JLabel();\n statusAnimationLabel = new javax.swing.JLabel();\n progressBar = new javax.swing.JProgressBar();\n\n mainPanel.setName(\"mainPanel\"); // NOI18N\n\n org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(org.leo.app.filesync.FileSync.class).getContext().getResourceMap(FileSyncCriteriaView.class);\n lblSrc.setText(resourceMap.getString(\"lblSrc.text\")); // NOI18N\n lblSrc.setName(\"lblSrc\"); // NOI18N\n\n lblTgt.setText(resourceMap.getString(\"lblTgt.text\")); // NOI18N\n lblTgt.setName(\"lblTgt\"); // NOI18N\n\n jTxtSrc.setName(\"jTxtSrc\"); // NOI18N\n\n jTxtTgt.setName(\"jTxtTgt\"); // NOI18N\n\n btnSync.setText(resourceMap.getString(\"btnSync.text\")); // NOI18N\n btnSync.setName(\"btnSync\"); // NOI18N\n\n javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(org.leo.app.filesync.FileSync.class).getContext().getActionMap(FileSyncCriteriaView.class, this);\n btnReport.setAction(actionMap.get(\"generateReport\")); // NOI18N\n btnReport.setText(resourceMap.getString(\"btnReport.text\")); // NOI18N\n btnReport.setName(\"btnReport\"); // NOI18N\n\n btnSrcBrowse.setAction(actionMap.get(\"showDirChooser\")); // NOI18N\n btnSrcBrowse.setText(resourceMap.getString(\"btnSrcBrowse.text\")); // NOI18N\n btnSrcBrowse.setActionCommand(resourceMap.getString(\"btnSrcBrowse.actionCommand\")); // NOI18N\n btnSrcBrowse.setName(\"btnSrcBrowse\"); // NOI18N\n\n btnTrgBrowse.setText(resourceMap.getString(\"btnTrgBrowse.text\")); // NOI18N\n btnTrgBrowse.setActionCommand(resourceMap.getString(\"btnTrgBrowse.actionCommand\")); // NOI18N\n btnTrgBrowse.setName(\"btnTrgBrowse\"); // NOI18N\n\n org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel);\n mainPanel.setLayout(mainPanelLayout);\n mainPanelLayout.setHorizontalGroup(\n mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainPanelLayout.createSequentialGroup()\n .addContainerGap()\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainPanelLayout.createSequentialGroup()\n .add(btnSync)\n .add(18, 18, 18)\n .add(btnReport, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 118, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(mainPanelLayout.createSequentialGroup()\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(lblSrc, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 62, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(lblTgt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 66, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(18, 18, 18)\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)\n .add(jTxtTgt)\n .add(jTxtSrc, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 225, Short.MAX_VALUE))\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(btnTrgBrowse)\n .add(btnSrcBrowse))))\n .addContainerGap())\n );\n mainPanelLayout.setVerticalGroup(\n mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(mainPanelLayout.createSequentialGroup()\n .add(25, 25, 25)\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jTxtSrc, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(btnSrcBrowse)\n .add(lblSrc))\n .add(13, 13, 13)\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(jTxtTgt, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .add(btnTrgBrowse)\n .add(lblTgt))\n .add(18, 18, 18)\n .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(btnSync)\n .add(btnReport))\n .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n btnSrcBrowse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBrowseActionPerformed(evt);\n }\n });\n btnTrgBrowse.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnBrowseActionPerformed(evt);\n }\n });\n\n menuBar.setName(\"menuBar\"); // NOI18N\n\n fileMenu.setText(resourceMap.getString(\"fileMenu.text\")); // NOI18N\n fileMenu.setName(\"fileMenu\"); // NOI18N\n\n exitMenuItem.setAction(actionMap.get(\"quit\")); // NOI18N\n exitMenuItem.setName(\"exitMenuItem\"); // NOI18N\n fileMenu.add(exitMenuItem);\n\n menuBar.add(fileMenu);\n\n helpMenu.setText(resourceMap.getString(\"helpMenu.text\")); // NOI18N\n helpMenu.setName(\"helpMenu\"); // NOI18N\n\n aboutMenuItem.setAction(actionMap.get(\"showAboutBox\")); // NOI18N\n aboutMenuItem.setName(\"aboutMenuItem\"); // NOI18N\n helpMenu.add(aboutMenuItem);\n\n menuBar.add(helpMenu);\n\n statusPanel.setName(\"statusPanel\"); // NOI18N\n\n statusPanelSeparator.setName(\"statusPanelSeparator\"); // NOI18N\n\n statusMessageLabel.setName(\"statusMessageLabel\"); // NOI18N\n\n statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);\n statusAnimationLabel.setName(\"statusAnimationLabel\"); // NOI18N\n\n progressBar.setName(\"progressBar\"); // NOI18N\n\n org.jdesktop.layout.GroupLayout statusPanelLayout = new org.jdesktop.layout.GroupLayout(statusPanel);\n statusPanel.setLayout(statusPanelLayout);\n statusPanelLayout.setHorizontalGroup(\n statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 430, Short.MAX_VALUE)\n .add(statusPanelLayout.createSequentialGroup()\n .addContainerGap()\n .add(statusMessageLabel)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 244, Short.MAX_VALUE)\n .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(statusAnimationLabel)\n .addContainerGap())\n );\n statusPanelLayout.setVerticalGroup(\n statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(statusPanelLayout.createSequentialGroup()\n .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)\n .add(statusMessageLabel)\n .add(statusAnimationLabel)\n .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .add(3, 3, 3))\n );\n\n setComponent(mainPanel);\n setMenuBar(menuBar);\n setStatusBar(statusPanel);\n }", "public ProcessWorkRequestJPanel() {\n initComponents();\n }", "private void intUloadPanel(){\n \n m_UploadPanel = new JPanel();\n m_UploadPanel.setLayout(new FlowLayout());\n m_uploadLabel = new JLabel(\"Upload File\");\n m_upload = new JButton(\"Upload\");\n m_upload.addActionListener(new ActionListener(){\n public void actionPerformed(ActionEvent e){\n System.err.println(file.getAbsoluteFile());\n if (!file.exists()) {\n try {\n file.createNewFile();\n \n SaveDialog s = new SaveDialog(m_db,m_TP);\n if(s.SaveFile(file)){\n\n if(CLOUD.upload(m_sid, file)!=null){\n JOptionPane.showMessageDialog(null,\n \"Uplaod Succsesful\",\n \"Upload Status\",\n JOptionPane.INFORMATION_MESSAGE);\n }else{\n JOptionPane.showMessageDialog(null,\n \"Failed to upload the file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n }else{\n JOptionPane.showMessageDialog(null,\n \"error making file\",\n \"Uplpad Failed\",\n JOptionPane.ERROR_MESSAGE);\n }\n } catch (IOException ex) {\n Logger.getLogger(\n SaveDialog.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }\n });\n m_UploadPanel.add(m_uploadLabel);\n\n m_UploadPanel.add(m_upload);\n \n m_UploadPanel.validate();\n m_UploadPanel.setOpaque(true);\n this.getContentPane().add(m_UploadPanel);\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ti++;\n\t\t\t\tif(i >= fileList.length)i = 0;\n\t\t\t\tShowImage.multiple = 1;\n\t\t\t\tjscrollPanel.setVisible(false);\n\t\t\t\tremove(jscrollPanel);\n\t\t\t\tshowImage = new ShowImage(fileList[i]);\n\t\t\t\tjscrollPanel = new JScrollPane(showImage,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\t\t\tjscrollPanel.setSize(xSize, ySize);\n\t\t\t\tjscrollPanel.setBounds(0, 60, xSize, ySize);\n\t\t\t\tadd(jscrollPanel);\n\t\t\t\tjscrollPanel.setVisible(false);\n\t\t\t\tjscrollPanel.setVisible(true);\n\t\t\t}", "public FileDB(String []str, int length, int open,String fileName){\n \n super(new BorderLayout());\n\tthis.open = open;\n\tselecStr = \"\";\n\tflag = true;\n listModel = new DefaultListModel();\n\tfor(int i=0;i<length;i++)\n\t\tlistModel.addElement(str[i]);\n list = new JList(listModel);\n list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);\n list.setSelectedIndex(0);\n list.addListSelectionListener(this);\n list.setVisibleRowCount(8);\n JScrollPane listScrollPane = new JScrollPane(list);\n JButton ok = new JButton(\"OK\");\n\n ok.setActionCommand(\"ok\");\n ok.addActionListener(this);\n/*\tok.setMinimumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tok.setPreferredSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tok.setMaximumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));*/\n JButton cancel = new JButton(\"Cancel\");\n cancel.setActionCommand(\"cancel\");\n cancel.addActionListener(this);\n/*\tcancel.setMinimumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tcancel.setPreferredSize(new Dimension(this.getWidth()/2,this.getHeight()/4));\n\tcancel.setMaximumSize(new Dimension(this.getWidth()/2,this.getHeight()/4));*/\n JPanel buttonPane = new JPanel(); \n\tif(open==1){\n\n\t\tSystem.out.println(\"Filename is \"+fileName);\n\t\tif(fileName!=null){\n\t\t\tStringTokenizer st = new StringTokenizer(fileName,\" :\");\n\t\t\tta = new TextArea(st.nextToken());\n\t\t}\n\t\telse\n\t\t\tta = new TextArea(\"iConc\");\n\t}\n\telse if(open == 0){\n\t\n\t\tta = new TextArea(\"iConc\");\n\t}\n\tbuttonPane.add(ta);\n buttonPane.add(ok);\n buttonPane.add(cancel);\n add(listScrollPane, BorderLayout.CENTER);\n add(buttonPane, BorderLayout.PAGE_END);\n\tcreateAndShowGUI();\n }", "public MainFrame() {\n\n // set a name of the window\n super(\"Spectrum Analyzer\");\n\n Cursor normalCursor = new Cursor(Cursor.DEFAULT_CURSOR);\n Cursor hourglassCursor = new Cursor(Cursor.WAIT_CURSOR);\n setCursor(normalCursor);\n\n // set layout (we chose the BorderLayout)\n setLayout(new GridBagLayout());\n\n // create an important object - gc\n GridBagConstraints gc = new GridBagConstraints();\n\n // something that needs to be done\n gc.fill = GridBagConstraints.BOTH;\n\n // set components\n tablePanelInput = new LightTablePanel();\n tablePanelOutput = new ResultTablePanel();\n formPanel = new FormPanel();\n textPanel = new TextPanel();\n setJMenuBar(createMenuBar());\n\n configFileChooser = new JFileChooser();\n graphFileChooser = new JFileChooser();\n controller = new Controller();\n\n // load data to table\n tablePanelInput.setData(controller.getLights());\n tablePanelOutput.setResults(controller.getResults());\n\n // load default light database to inputTable\n tablePanelInput.clearData();\n\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\"); // ........\\SMOG\n String filename = \"list_of_lights_generic.txt\";\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + filename;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load inputFile to upper table\n controller.loadFromFile(new File(absoluteFilePath));\n tablePanelInput.refreshData();\n\n // set up fileChooser and filters\n configFileChooser.addChoosableFileFilter(new LightFileFilter());\n graphFileChooser.addChoosableFileFilter(new GraphFileFilter());\n\n // add components to GridLayouts\n // FIRST ROW\n gc.gridy = 0;\n\n // add formPanel at [0, 0]\n gc.weightx = 0.2;\n gc.weighty = 1;\n gc.gridx = 0;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0);\n add(formPanel, gc);\n\n // add tablePanelInput at [1, 0]\n gc.weightx = 3;\n gc.weighty = 1;\n gc.gridx = 1;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0 );\n add(tablePanelInput, gc);\n\n // SECOND ROW\n gc.gridy = 1;\n\n // add textPanel at [0, 1]\n gc.weightx = 0.2;\n gc.weighty = 1;\n gc.gridx = 0;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0);\n add(textPanel, gc);\n\n // add tablePanelOutput at [1, 1]\n gc.weightx = 3;\n gc.weighty = 2;\n gc.gridx = 1;\n gc.anchor = GridBagConstraints.CENTER;\n gc.insets = new Insets(0, 0, 0, 0 );\n add(tablePanelOutput, gc);\n\n\n // if something happen in formPanel, this will be done\n formPanel.setFormListener(new FormListener() {\n public void formEventOccurred(FormEvent e) {\n if (e.isInputFileChanged()) {\n // this will happen when showLightBtn was clicked\n // clean the table\n tablePanelInput.clearData();\n\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\"); // ........\\SMOG\n String filename = e.getInputFile();\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + filename;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load inputFile to upper table\n controller.loadFromFile(new File(absoluteFilePath));\n tablePanelInput.refreshData();\n }\n\n if (e.isdoItForMeClicked()) {\n // this will happen when doItForMe was clicked\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\");\n String inputFileName = e.getInputFile();\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + inputFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // save to inputFile\n controller.saveToFile(new File(absoluteFilePath));\n\n String absoluteProgramPath = \"\";\n String programName = \"\";\n\n // find absolute path to kernel\n programName = \"\";\n absoluteProgramPath = \"\";\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) {//windows configuration\n programName = \"run_hard_work.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.cmd file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run_hard_work.cmd file\n writer.print(\"hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"run_hard_work.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.sh file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run_hard_work.sh file\n writer.print(\"./hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"./hard_work \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n // run program HARD_WORK\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n if (textPanel.getExperimentSpectrum() != null) {\n try {\n textPanel.clear();\n setCursor(hourglassCursor);\n Process process = pb.start();\n System.out.println(\"Program HARD_WORK started\");\n\n\n InputStream is = process.getInputStream();\n\n BufferedReader br = new BufferedReader (new InputStreamReader (is));\n\n String aux = br.readLine();\n while (aux!=null) {\n System.out.println (aux);\n //textPanel.appendText(aux + '\\n');\n\n aux = br.readLine();\n }\n\n //textPanel.appendText(\"\\n\\n\");\n //textPanel.appendText(\"Optimum Found!\\n\\n\");\n\n // wait for smog.exe to terminate\n int result = process.waitFor();\n if(result == 0) {\n setCursor(normalCursor);\n // clear textPanel\n //textPanel.clear();\n // write which spectrum in being analysed\n textPanel.appendText(\"SPECTRUM: \\n\" + textPanel.getExperimentSpectrum() + \"\\n\" +\n \"*****************************************\\n\");\n // load log file from smog to textPanel\n textPanel.loadLogFileKernel();\n // load log file of spectrumavg to textpanel\n textPanel.loadLogFileAvg();\n\n // this will happen when clearTableBtn was clicked\n // clean table\n tablePanelOutput.clearResults();\n\n // get absolute path file\n String resultFileName = \"percentage.txt\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"results\" + File.separator + resultFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load results\n controller.loadResultsFromFile(new File(absoluteFilePath));\n tablePanelOutput.refreshResults();\n\n // load new configuration\n // load default light database to inputTable\n tablePanelInput.clearData();\n\n // absolute path to inputFile\n String filename = e.getInputFile();\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + filename;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load inputFile to upper table\n controller.loadFromFile(new File(absoluteFilePath));\n tablePanelInput.refreshData();\n }\n else\n {\n JOptionPane.showMessageDialog(new JFrame(),\n \"An error occured during task solving. Look into 'logFileKernel.txt' and\" +\n \" logFileAvg.txt for more details.\",\n \"Result\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n setCursor(normalCursor);\n }\n } catch (IOException | InterruptedException e1) {\n e1.printStackTrace();\n }\n }\n else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"Choose spectrum first: FILE -> Load Spectrum\",\n \"Warning\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n }\n\n }\n else if (e.isStartClicked()) {\n // this will happen when startBtn was clicked\n // absolute path to inputFile\n String workingDirectory = System.getProperty(\"user.dir\");\n String inputFileName = e.getInputFile();\n String absoluteFilePath = \"\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"input_data\" + File.separator + inputFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // save to inputFile\n controller.saveToFile(new File(absoluteFilePath));\n\n // find absolute path to kernel\n String programName = \"\";\n String absoluteProgramPath = \"\";\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) {//windows configuration\n programName = \"run.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.cmd file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run.cmd file\n writer.print(\"smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"run.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n\n // create run.sh file\n try (PrintWriter writer = new PrintWriter(absoluteProgramPath, \"UTF-8\")){\n // write a line in run.cmd file\n writer.print(\"./smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n\n System.out.println(\"./smog \" + e.getMinLambda() + \" \" + e.getMaxLambda() + \" \"/* + e.getAngExp()\n + \" \"*/ + e.getDeltaLambda() + \" \" + e.getInputFile()\n + \" \" + textPanel.getExperimentSpectrum());\n } catch (FileNotFoundException | UnsupportedEncodingException ev) {\n ev.printStackTrace();\n }\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n\n // run program\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n if (textPanel.getExperimentSpectrum() != null) {\n try{\n setCursor(hourglassCursor);\n Process process = pb.start();\n System.out.println(\"Program SMOG started\");\n\n // wait for smog.exe to terminate\n int result = process.waitFor();\n if(result == 0) {\n setCursor(normalCursor);\n // clear textPanel\n textPanel.clear();\n // write which spectrum in being analysed\n textPanel.appendText(\"SPECTRUM: \\n\" + textPanel.getExperimentSpectrum() + \"\\n\" +\n \"*****************************************\\n\");\n // load log file from smog to textPanel\n textPanel.loadLogFileKernel();\n // load log file of spectrumavg to textpanel\n textPanel.loadLogFileAvg();\n\n // this will happen when clearTableBtn was clicked\n // clean table\n tablePanelOutput.clearResults();\n\n // get absolute path file\n String resultFileName = \"percentage.txt\";\n absoluteFilePath = workingDirectory + File.separator + \"kernel\" + File.separator +\n \"results\" + File.separator + resultFileName;\n System.out.println(\"Final filepath : \" + absoluteFilePath);\n\n // load results\n controller.loadResultsFromFile(new File(absoluteFilePath));\n tablePanelOutput.refreshResults();\n }\n else\n {\n JOptionPane.showMessageDialog(new JFrame(),\n \"An error occured during task solving. Look into 'logFileKernel.txt' and\" +\n \" logFileAvg.txt for more details.\",\n \"Result\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n }\n } catch (IOException | InterruptedException e1) {\n e1.printStackTrace();\n }\n\n\n }\n else {\n JOptionPane.showMessageDialog(new JFrame(),\n \"Choose spectrum first: FILE -> Load Spectrum\",\n \"Warning\", JOptionPane.ERROR_MESSAGE);\n System.out.println(\"An error occured during task solving\");\n }\n\n\n }\n else if (e.isShowGraphClicked()) {\n // this will happen when showGraphBtn was clicked\n // shows graph\n String workingDirectory = System.getProperty(\"user.dir\");\n String programName = \"\";\n String absoluteProgramPath = \"\";\n\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) { //windows configuration\n programName = \"open_graph.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"open_graph.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n // run\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n try{\n Process process = pb.start();\n //System.out.println(\"open_graph.cmd\");\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n else if (e.isShowGraphOrigClicked()) {\n // this will happen when showGraphBtn was clicked\n // shows graph\n String workingDirectory = System.getProperty(\"user.dir\");\n String programName = \"\";\n String absoluteProgramPath = \"\";\n\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"WIN\") >= 0) { //windows configuration\n programName = \"open_original_graph.cmd\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"NUX\") >= 0) { //linux configuration\n programName = \"open_original_graph.sh\";\n absoluteProgramPath = workingDirectory + File.separator + \"kernel\" + File.separator + programName;\n System.out.println(\"Final filepath : \" + absoluteProgramPath);\n }\n if(System.getProperty(\"os.name\").toUpperCase().indexOf(\"MAC\") >= 0) { //mac configuration\n // do something here\n }\n\n // run\n ProcessBuilder pb = new ProcessBuilder(absoluteProgramPath);\n pb.directory(new File(workingDirectory + \"/kernel\"));\n try{\n Process process = pb.start();\n //System.out.println(\"open_original_graph.cmd\");\n } catch (IOException e1) {\n e1.printStackTrace();\n }\n }\n }\n });\n\n setMinimumSize(new Dimension(500, 600));\n setExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH);\n\n // set what program should do when closing window\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n // set visible, so we can see it\n setVisible(true);\n }", "@Override\n\tprotected void initialize() {\n\t\tnew ToolTipFrame( \t\t\t\n \t\t\t\"<html>\"+\n \t\t\t\"<br>If you have worked on a resized (reduced) version of source and \"+\n \t\t\t\"<br> of target image for time and memory purpose, \"+\n \t\t\t\"<br> the transfo computed from this reduced image will be rescale to fit the original size\" +\n \t\t\t\"<br> of your source and target images\"+\n \t\t\t\"<br><b> Source binning </b> is the reduced scale for source that you used to compute the transfo, \"+\n \t\t\t\"<br><b> Target binning </b> is the reduced scale for target that you used to compute the transfo, \"+\n \t\t\t\" <br>Example : you have processed reduced size source of 512*512 of a 2048x2048 original source file\"+\n \t\t\t\" <br>and a reduced size target of 512*512 of a 4096x4096 original target file\"+\n \t\t\t\" <br>Source binning will be 4 (2048/ 512) and target binning will be 8 (4096 / 512)\"+\n \t\t\t\"</html>\"\n \t\t\t);\n\n\t\tsource=new EzVarSequence(\"Select Source Image Full Size (will be transformed from xml file)\");\n\t\tString varName =\"Xml file containing list of transformation (computed on reduced images)\";\n\t\tif (source.getValue()!=null)\n\t\t\txmlFile=new EzVarFile(varName, source.getValue().getFilename());\n\t\telse\n\t\t\txmlFile=new EzVarFile(varName, ApplicationPreferences.getPreferences().node(\"frame/imageLoader\").get(\"path\", \".\"));\n\t\tsourcebinning= new EzVarInteger(\"Source Binning \",1, 100, 1);\n\t\ttargetbinning=new EzVarInteger(\"Target Binning \",1, 100, 1);\n\t\t\n\t\t\n\t\taddEzComponent(source);\n\t\taddEzComponent(xmlFile);\n\t\taddEzComponent(sourcebinning);\n\t\taddEzComponent(targetbinning);\n\t\t\n\t}", "@Override\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n cen.removeAll();\r\n\t\t\t\tstpanel = new StudentPanel(selectedFile, getStudentArray(),numOfScorePanel);\r\n tab.add(stpanel);\r\n tab.setTitleAt(numOfScorePanel, \"คะแนนดิบ \"+numOfScorePanel);\r\n numOfScorePanel= numOfScorePanel+1;\r\n\t\t\t\t\r\n\t\t\t\tcen.add(tab);\r\n\t\t\t\tcen.repaint();\r\n\t\t\t\t\r\n\t\t\t\tpack();\r\n\t\t\t}", "@Override\n public void textFileLoaded(File file, int wc, String contents)\n {\n cur_file = file;\n this.action_panel.setWordCount(wc);\n \n new Thread(new MarkdownProcessor(file, this)).start();\n }", "public void run() {\n\t\t\t\tif (_uiContainer.isDisposed()) {\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// initialize tooltip for a new folder\r\n\t\t\t\t_photoGalleryTooltip.reset(true);\r\n\r\n\t\t\t\tfinal double galleryPosition = getCachedGalleryPosition();\r\n\r\n\t\t\t\t_galleryMT20.setupItems(0, galleryPosition, _restoredSelection);\r\n\r\n\t\t\t\t_restoredSelection = null;\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * update status info\r\n\t\t\t\t */\r\n\t\t\t\tfinal long timeDiff = System.currentTimeMillis() - _workerStart;\r\n\t\t\t\tfinal String timeDiffText = NLS.bind(\r\n\t\t\t\t\t\tMessages.Pic_Dir_Status_Loaded,\r\n\t\t\t\t\t\tnew Object[] { Long.toString(timeDiff), Integer.toString(_allPhotos.length) });\r\n\r\n\t\t\t\tsetStatusMessage(timeDiffText);\r\n\t\t\t}", "public ReportPanel() {\n initComponents();\n writer = new JTextAreaWriter(jTextArea1);\n }", "public LocalPanel() {\r\n\t\tinitComponents();\r\n\t}", "public void newFile() {\r\n \t\tcurFile = null;\r\n \t}", "private void initiliaze() {\r\n\t\tthis.inputFile = cd.getInputFile();\r\n\t\tthis.flowcell = cd.getFlowcell();\r\n\t\tthis.totalNumberOfTicks = cd.getOptions().getTotalNumberOfTicks();\r\n\t\tthis.outputFile = cd.getOutputFile();\r\n\t\tthis.statistics = cd.getStatistic();\r\n\t}", "private void setupComponentBehavior() {\n\t\tfileTextField.setEditable(false);\n\t\tprocessButton.setEnabled(false);\n\n summaryTextArea.setEditable(false);\n summaryTextArea.setLineWrap(true);\n summaryTextArea.setWrapStyleWord(true);\n\n\t\tfileBrowseButton.addActionListener(this);\n\t\tprocessButton.addActionListener(this);\n\t}", "@Override\n protected void done() {\n files = new ArrayList<String>();\n flist = new ArrayList<File>();\n setCursor(Cursor.getDefaultCursor());\n textArea.setText(textArea.getText() + \"\\nDone!\\n\");\n progressBar.setIndeterminate(false);\n startButton.setEnabled(true);\n }", "public void initView() {\n JPanel pane= new JPanel();\n panel = new JPanel();\n this.getFile(pane);\n JScrollPane scp = new JScrollPane(pane);\n scp.setPreferredSize(new Dimension(500, 280));\n scp.setVisible(true);\n enter.setPreferredSize(new Dimension(100, 50));\n enter.setVisible(true);\n enter.setActionCommand(\"enter\");\n enter.addActionListener(this);\n send.setPreferredSize(new Dimension(80, 50));\n send.setVisible(true);\n send.setActionCommand(\"sendOptions\");\n send.addActionListener(this);\n send.setEnabled(true);\n back.setVisible(true);\n back.setActionCommand(\"back\");\n back.addActionListener(this);\n back.setPreferredSize(new Dimension(80, 50));\n \n panel.add(scp);\n panel.add(send);\n panel.add(enter);\n panel.add(back);\n Launch.frame.add(panel);\n }", "private void initComponents() {\n \n buttonGroupTreeSource = new javax.swing.ButtonGroup();\n jFileChooserLoad = new javax.swing.JFileChooser();\n jOptionPaneAbout = new javax.swing.JOptionPane();\n jMenuBarMain = new javax.swing.JMenuBar();\n jMenuFile = new javax.swing.JMenu();\n jMenuNewExperiment = new javax.swing.JMenuItem();\n jMenuAddSearchResults = new javax.swing.JMenuItem();\n jMenuBatchLoad = new javax.swing.JMenuItem();\n jSeparator1 = new javax.swing.JSeparator();\n jMenuOpenExp = new javax.swing.JMenuItem();\n jMenuClose = new javax.swing.JMenuItem();\n jSeparator2 = new javax.swing.JSeparator();\n jMenuSaveExp = new javax.swing.JMenuItem();\n jMenuSaveExpSet = new javax.swing.JMenuItem();\n jSeparator3 = new javax.swing.JSeparator();\n jMenuOpenSeqDB = new javax.swing.JMenuItem();\n jMenuOpenGenbankDB = new javax.swing.JMenuItem();\n jMenuExportSeqDB = new javax.swing.JMenuItem();\n jSeparator4 = new javax.swing.JSeparator();\n jMenuQuit = new javax.swing.JMenuItem();\n jMenuTools = new javax.swing.JMenu();\n jMenuFilterPrefs = new javax.swing.JMenuItem();\n jMenuShowSummary = new javax.swing.JMenuItem();\n jSeparatorCompare = new javax.swing.JSeparator();\n jMenuCompareDiff = new javax.swing.JMenuItem();\n jMenuCompareParsimony = new javax.swing.JMenuItem();\n jSeparator5 = new javax.swing.JSeparator();\n jMenuOptions = new javax.swing.JMenuItem();\n jMenuHelp = new javax.swing.JMenu();\n jMenuGarbageCollect = new javax.swing.JMenuItem();\n jMenuResetLayout = new javax.swing.JMenuItem();\n jMenuAbout = new javax.swing.JMenuItem();\n \n jFileChooserLoad.setDialogTitle(\"Open Files\");\n \n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setTitle(\"MassSieve v1.01\");\n setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n addWindowListener(new java.awt.event.WindowAdapter() {\n public void windowClosing(java.awt.event.WindowEvent evt) {\n formWindowClosing(evt);\n }\n });\n \n jMenuFile.setText(\"File\");\n \n jMenuNewExperiment.setText(\"New Experiment\");\n jMenuNewExperiment.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuNewExperimentActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuNewExperiment);\n \n jMenuAddSearchResults.setText(\"Add Search Results...\");\n jMenuAddSearchResults.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuAddSearchResultsActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuAddSearchResults);\n \n jMenuBatchLoad.setText(\"Batch Load Results...\");\n jMenuBatchLoad.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuBatchLoadActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuBatchLoad);\n jMenuFile.add(jSeparator1);\n \n jMenuOpenExp.setText(\"Open Experiment(s)...\");\n jMenuOpenExp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuOpenExpActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuOpenExp);\n \n jMenuClose.setText(\"Close Tab\");\n jMenuClose.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuCloseActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuClose);\n jMenuFile.add(jSeparator2);\n \n jMenuSaveExp.setText(\"Save Experiment...\");\n jMenuSaveExp.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuSaveExpActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuSaveExp);\n \n jMenuSaveExpSet.setText(\"Save All Experiments...\");\n jMenuSaveExpSet.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuSaveExpSetActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuSaveExpSet);\n jMenuFile.add(jSeparator3);\n \n jMenuOpenSeqDB.setText(\"Import Fasta...\");\n jMenuOpenSeqDB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuOpenSeqDBActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuOpenSeqDB);\n \n jMenuOpenGenbankDB.setText(\"Update from Genbank\");\n jMenuOpenGenbankDB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuOpenGenbankDBActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuOpenGenbankDB);\n \n jMenuExportSeqDB.setText(\"Export Fasta File...\");\n jMenuExportSeqDB.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuExportSeqDBActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuExportSeqDB);\n jMenuFile.add(jSeparator4);\n \n jMenuQuit.setText(\"Quit\");\n jMenuQuit.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuQuitActionPerformed(evt);\n }\n });\n jMenuFile.add(jMenuQuit);\n \n jMenuBarMain.add(jMenuFile);\n \n jMenuTools.setText(\"Tools\");\n \n jMenuFilterPrefs.setText(\"Change Filter...\");\n jMenuFilterPrefs.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuFilterPrefsActionPerformed(evt);\n }\n });\n jMenuTools.add(jMenuFilterPrefs);\n \n jMenuShowSummary.setText(\"Experiment Summary...\");\n jMenuShowSummary.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuShowSummaryActionPerformed(evt);\n }\n });\n jMenuTools.add(jMenuShowSummary);\n jMenuTools.add(jSeparatorCompare);\n \n jMenuCompareDiff.setText(\"Compare Experiment Differences\");\n jMenuCompareDiff.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuCompareDiffActionPerformed(evt);\n }\n });\n jMenuTools.add(jMenuCompareDiff);\n \n jMenuCompareParsimony.setText(\"Compare Experiments w/Parsimony\");\n jMenuCompareParsimony.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuCompareParsimonyActionPerformed(evt);\n }\n });\n jMenuTools.add(jMenuCompareParsimony);\n jMenuTools.add(jSeparator5);\n \n jMenuOptions.setText(\"Preferences\");\n jMenuOptions.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuOptionsActionPerformed(evt);\n }\n });\n jMenuTools.add(jMenuOptions);\n \n jMenuBarMain.add(jMenuTools);\n \n jMenuHelp.setText(\"Help\");\n \n jMenuGarbageCollect.setText(\"Compact Memory\");\n jMenuGarbageCollect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuGarbageCollectActionPerformed(evt);\n }\n });\n jMenuHelp.add(jMenuGarbageCollect);\n \n jMenuResetLayout.setText(\"Reset layout\");\n jMenuResetLayout.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuResetLayoutActionPerformed(evt);\n }\n });\n jMenuHelp.add(jMenuResetLayout);\n \n jMenuAbout.setText(\"About\");\n jMenuAbout.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jMenuAboutActionPerformed(evt);\n }\n });\n jMenuHelp.add(jMenuAbout);\n \n jMenuBarMain.add(jMenuHelp);\n \n setJMenuBar(jMenuBarMain);\n \n pack();\n }", "public MUXMapFrame(Thump mapper, File file, int mapSize, MPrefs prefs, int hexHeight, ToolManager tools)\n {\n super(\"Untitled\");\n \n setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n \n this.mapper = mapper;\n this.tools = tools;\n this.file = file;\n \n if (file == null)\n {\n map = new MUXMap(mapSize, mapSize);\n map.clearMap();\n \n setTitle(\"Untitled \" + documentsOpened + sizeString());\n this.file = new File(\"Untitled \" + documentsOpened);\n documentsOpened++;\n newFile = true;\n }\n else\n {\n readMap();\n setTitle(file.getName() + sizeString());\n newFile = false;\n }\n \n // Set a bunch of 'able's\n setIconifiable(true);\n setMaximizable(true);\n setResizable(true);\n setClosable(true);\n \n // Let the InternalFrameListener handle this\n setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);\n \n this.prefs = prefs;\n this.h = hexHeight;\n \n // Setup the map component\n mapComponent = new MUXMapComponent(map, prefs, h);\n mapComponent.setPreferredSize(new Dimension(mapComponent.getTotalWidth(), mapComponent.getTotalHeight()));\n \n mapComponent.addMouseListener(this);\n mapComponent.addMouseMotionListener(this);\n mapComponent.addMouseWheelListener(this);\n \n resetCursor();\n \n // Setup the rulers (hex indicators on the side/top)\n Rule \txRule = new Rule(Rule.HORIZONTAL, h, map.getSizeX(), prefs.hexNumberFontSize);\n Rule\tyRule = new Rule(Rule.VERTICAL, h, map.getSizeY(), prefs.hexNumberFontSize);\n xRule.setPreferredWidth(mapComponent.getTotalWidth());\n yRule.setPreferredHeight(mapComponent.getTotalHeight());\n \n // .. and the scroll pane we put them in\n \n // Create the scroll pane & the view\n scrollPane = new JScrollPane();\n \n // Create our own viewport, instead of the default one\n scrollPane.setViewport(new JViewport() {\n public void setViewPosition(Point p) {\n // Make sure another thread will not gain control\n // while scrolling the view !!!\n synchronized (scrollPane.getTreeLock()) {\n // Scroll the view now...\n super.setViewPosition(p);\n }\n } \n });\n \n // Setup our view in the scroll pane's viewport\n scrollPane.getViewport().add(mapComponent, null);\n \n \n //scrollPane = new JScrollPane(mapComponent);\n scrollPane.setColumnHeaderView(xRule);\n scrollPane.setRowHeaderView(yRule);\n scrollPane.setCorner(JScrollPane.UPPER_LEFT_CORNER, new Corner());\n scrollPane.setWheelScrollingEnabled(false);\n scrollPane.doLayout();\n \n setContentPane(scrollPane);\n \n // Our size, loc\n setSize(prefs.mapFrameSize);\n setLocation((int) prefs.mapFrameLoc.getX() + ((documentsOpened-1)*10 % (int) prefs.desktopSize.getWidth()),\n (int) prefs.mapFrameLoc.getY() + ((documentsOpened-1)*10 % (int) prefs.desktopSize.getHeight()));\n \n // Setup undo\n undoableChanges = new LinkedList();\n \n // Show the window now\n this.show();\n \n // We're done\n setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));\n }", "public void init() {\n SimpleStamperPanel panel=new SimpleStamperPanel();\n setContentPane(panel);\n \n \n // TODO start asynchronous download of heavy resources\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\ttimer.stop();jbtAuto.setText(\"Start\");\n\t\t\t\ti--;\n\t\t\t\tif(i < 0)i = fileList.length - 1;\n\t\t\t\tShowImage.multiple = 1;\n\t\t\t\tjscrollPanel.setVisible(false);\n\t\t\t\tremove(jscrollPanel);\n\t\t\t\tshowImage = new ShowImage(fileList[i]);\n\t\t\t\tjscrollPanel = new JScrollPane(showImage,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);\n\t\t\t\tjscrollPanel.setSize(xSize, ySize);\n\t\t\t\tjscrollPanel.setBounds(0, 60, xSize, ySize);\n\t\t\t\tadd(jscrollPanel);\n\t\t\t\tjscrollPanel.setVisible(false);\n\t\t\t\tjscrollPanel.setVisible(true);\n\t\t\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n panelTransferFiles = new javax.swing.JPanel();\n btnSelect = new javax.swing.JButton();\n btnRemove = new javax.swing.JButton();\n btnRemoveAll = new javax.swing.JButton();\n jScrollPane1 = new javax.swing.JScrollPane();\n lstTransferFiles = new MutableList();\n jLabel1 = new javax.swing.JLabel();\n panelServerFiles = new javax.swing.JPanel();\n jScrollPane2 = new javax.swing.JScrollPane();\n lstServerFiles = new javax.swing.JList();\n btnRemoveFromServer = new javax.swing.JButton();\n btnRemoveAllFromServer = new javax.swing.JButton();\n jLabel2 = new javax.swing.JLabel();\n btnDoTransfer = new javax.swing.JButton();\n jLabel3 = new javax.swing.JLabel();\n\n panelTransferFiles.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n btnSelect.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.btnSelect.text\")); // NOI18N\n btnSelect.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnSelectActionPerformed(evt);\n }\n });\n\n btnRemove.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.btnRemove.text\")); // NOI18N\n btnRemove.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveActionPerformed(evt);\n }\n });\n\n btnRemoveAll.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.btnRemoveAll.text\")); // NOI18N\n btnRemoveAll.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveAllActionPerformed(evt);\n }\n });\n\n jScrollPane1.setViewportView(lstTransferFiles);\n\n jLabel1.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.jLabel1.text\")); // NOI18N\n\n javax.swing.GroupLayout panelTransferFilesLayout = new javax.swing.GroupLayout(panelTransferFiles);\n panelTransferFiles.setLayout(panelTransferFilesLayout);\n panelTransferFilesLayout.setHorizontalGroup(\n panelTransferFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelTransferFilesLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelTransferFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnSelect, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnRemove, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnRemoveAll, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(18, 18, 18)\n .addGroup(panelTransferFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jLabel1)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 193, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(23, Short.MAX_VALUE))\n );\n panelTransferFilesLayout.setVerticalGroup(\n panelTransferFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelTransferFilesLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel1)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelTransferFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelTransferFilesLayout.createSequentialGroup()\n .addComponent(btnSelect)\n .addGap(18, 18, 18)\n .addComponent(btnRemove)\n .addGap(18, 18, 18)\n .addComponent(btnRemoveAll))\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 394, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n panelServerFiles.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n jScrollPane2.setViewportView(lstServerFiles);\n\n btnRemoveFromServer.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.btnRemoveFromServer.text\")); // NOI18N\n btnRemoveFromServer.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveFromServerActionPerformed(evt);\n }\n });\n\n btnRemoveAllFromServer.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.btnRemoveAllFromServer.text\")); // NOI18N\n btnRemoveAllFromServer.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnRemoveAllFromServerActionPerformed(evt);\n }\n });\n\n jLabel2.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.jLabel2.text\")); // NOI18N\n\n javax.swing.GroupLayout panelServerFilesLayout = new javax.swing.GroupLayout(panelServerFiles);\n panelServerFiles.setLayout(panelServerFilesLayout);\n panelServerFilesLayout.setHorizontalGroup(\n panelServerFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelServerFilesLayout.createSequentialGroup()\n .addContainerGap()\n .addGroup(panelServerFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelServerFilesLayout.createSequentialGroup()\n .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 182, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(panelServerFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(btnRemoveFromServer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnRemoveAllFromServer, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGap(8, 8, 8))\n .addComponent(jLabel2))\n .addContainerGap())\n );\n panelServerFilesLayout.setVerticalGroup(\n panelServerFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelServerFilesLayout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(panelServerFilesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(panelServerFilesLayout.createSequentialGroup()\n .addComponent(btnRemoveFromServer)\n .addGap(18, 18, 18)\n .addComponent(btnRemoveAllFromServer))\n .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 393, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(12, Short.MAX_VALUE))\n );\n\n btnDoTransfer.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.btnDoTransfer.text\")); // NOI18N\n btnDoTransfer.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnDoTransferActionPerformed(evt);\n }\n });\n\n jLabel3.setFont(new java.awt.Font(\"Tahoma\", 1, 12));\n jLabel3.setText(org.openide.util.NbBundle.getMessage(PanelCssManager.class, \"PanelCssManager.jLabel3.text\")); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGap(289, 289, 289)\n .addComponent(jLabel3))\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(panelTransferFiles, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(18, 18, 18)\n .addComponent(btnDoTransfer)\n .addGap(29, 29, 29)\n .addComponent(panelServerFiles, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(119, Short.MAX_VALUE))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel3)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(panelServerFiles, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(panelTransferFiles, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))\n .addGroup(layout.createSequentialGroup()\n .addGap(80, 80, 80)\n .addComponent(btnDoTransfer)))\n .addContainerGap())\n );\n }" ]
[ "0.71497464", "0.63900656", "0.6378176", "0.6300657", "0.6255983", "0.61888105", "0.6155474", "0.613377", "0.6124913", "0.6111694", "0.60935867", "0.5990956", "0.59644544", "0.59448874", "0.5893718", "0.5889985", "0.5879314", "0.58625555", "0.58478636", "0.5839352", "0.58378345", "0.5813883", "0.5796075", "0.57906234", "0.5786644", "0.57516396", "0.5732328", "0.57315916", "0.5730799", "0.573023", "0.57284373", "0.5726843", "0.57224053", "0.5708946", "0.5708339", "0.57055086", "0.5696333", "0.56913394", "0.56903464", "0.56872386", "0.56814146", "0.5674193", "0.56659037", "0.56486624", "0.56460255", "0.564134", "0.5636641", "0.56329954", "0.56322914", "0.56309116", "0.5630308", "0.5623638", "0.5623077", "0.558535", "0.55839205", "0.5581204", "0.5580686", "0.5569066", "0.5568037", "0.55646616", "0.5559035", "0.5555631", "0.55507916", "0.5543392", "0.55398065", "0.55383873", "0.55348366", "0.5526483", "0.5524896", "0.55240613", "0.55177313", "0.55031216", "0.5502666", "0.5500415", "0.5495215", "0.54905856", "0.5485009", "0.5484239", "0.54824823", "0.54766786", "0.5475458", "0.54714936", "0.54593325", "0.54562527", "0.5453572", "0.5451969", "0.54495794", "0.54490983", "0.54447913", "0.54438627", "0.5439771", "0.5439517", "0.54381233", "0.54359007", "0.5434816", "0.54295385", "0.5425381", "0.5419783", "0.54193264", "0.54185575", "0.54178613" ]
0.0
-1
only exits if the user clicks yes, nothing otherwise
public void windowClosing(WindowEvent event) { end = JOptionPane.showConfirmDialog(null, "Are you sure you want to exit?"); if (end == JOptionPane.YES_OPTION) { dispose(); System.exit(0); } else setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean saidYes(boolean onQuit) {\r\n\r\n System.out.print(\" (Y/N) \");\r\n \r\n\t\tchar responce = Keyboard.readChar();\r\n responce = Character.toLowerCase(responce);\r\n\r\n\t\tswitch (responce) {\r\n case 'y':\r\n return true;\r\n\r\n case 'q':\r\n case 'e':\r\n\r\n // Is the user is being asked to quit?\r\n if (onQuit) {\r\n return true;\r\n\t\t\t\t}\r\n\r\n endGameSwitch = true;\r\n return false;\r\n\r\n default:\r\n return false;\r\n }\r\n\t}", "public void clickYes ();", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint dialogButton = JOptionPane.YES_NO_OPTION;\n\t\t\t\tint dialogResult = JOptionPane.showConfirmDialog (null, new String(ApplicationSession.instance().getString(\"quit?\")),\"Warning\",dialogButton);\n\t\t\t\tif(dialogResult == JOptionPane.YES_OPTION){\n\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "public void ClickYes()\n\t{\n\t\tdriver.findElementByName(OR.getProperty(\"Yes\")).click();\n\t}", "public void yes() {\n\t\tyes = new JButton(\"Yes\");\n\n\t\t// \"yes\" button's action listener\n\t\tyes.addActionListener(new ActionListener() {\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tprevious = current;\n\t\t\t\tcurrent = current.getLeft();\n\n\t\t\t\t// if current is not a node, not a leaf\n\t\t\t\tif (current != null) {\n\t\t\t\t\tquestion.setText((String) current.getData());\n\t\t\t\t\tvalidate();\n\t\t\t\t}\n\n\t\t\t\t// Once you hit a leaf, set a final message\n\t\t\t\telse {\n\t\t\t\t\tquestion.setText(\"Wonderful! Hopefully, you found a story and lesson plan that will help you move forward in your journey! \");\n\t\t\t\t\tsouth.remove(yes);\n\t\t\t\t\tsouth.remove(no);\n\t\t\t\t\tvalidate();\n\t\t\t\t\t// add a restart button that restores the game\n\t\t\t\t\trestartGame();\n\n\t\t\t\t}\n\n\t\t\t\t// if current.getNext() is\n\t\t\t}\n\t\t});\n\n\t\t// add Yes button to left\n\t\tsouth.add(yes, BorderLayout.WEST);\n\t\tvalidate();\n\n\t}", "public void handleYesConfirmButtonAction(ActionEvent event) {\n if (updateItemPane.isVisible()){\n deleteItem();\n this.clearUpdateItemFields();\n }\n else if(updateCopyPane.isVisible()){\n deleteCopy();\n this.clearUpdateCopyFields();\n }\n maskPane.setVisible(false);\n confirmPane.setVisible(false);\n }", "@Override\r\n\t\tpublic boolean promptYesNo(String message) {\n\t\t\treturn true;\r\n\t\t}", "protected boolean hasPositiveButton() {\n return false;\n }", "public void onYesButtonClicked() {\n changeAfterClientPick();\n }", "@FXML\n\tvoid mainMenuBtnClicked(ActionEvent event) {\n\t\t// if submitted before exam time ends ask the user if he sure of that\n\t\tif (flag1 && flag2) {\n\t\t\tAlert alert = new Alert(AlertType.CONFIRMATION);\n\t\t\talert.setTitle(\"Warning\");\n\t\t\talert.setHeaderText(\"Leaving the exam means you submitting a blank exam\");\n\t\t\talert.setContentText(\"Are you sure you want to do that?\");\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.get() == ButtonType.OK) {\n\t\t\t\tsummbitBlank();\n\t\t\t\ttry {\n\t\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\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} else {\n\t\t\ttry {\n\t\t\t\tFXMLutil.swapScene(event, window.StudentMenu.toString());\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "private boolean askToLeave(){\n\t\tint ask_leave_prompt = JOptionPane.YES_NO_OPTION;\n\t\tint ask_leave_result = JOptionPane.showConfirmDialog(this, \"Would you like to return to main menu?\\nYou will lose all progress\", \"Return To Main Menu\", ask_leave_prompt);\n\t\tif (ask_leave_result == JOptionPane.YES_OPTION){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "public void toExit() {\n int sure=JOptionPane.showConfirmDialog(rootPane,\"Are you sure to Exit?\");\n if(sure==JOptionPane.YES_OPTION)\n { \n System.exit(0);\n } \n }", "@Override\n public void actionPerformed(ActionEvent actionEvent) {\n if (askUserYesNo(\"Do you really want to quit?\")) {\n if(askUserYesNo(\"Do you want to save game?\")){\n game.saveGame();\n }\n System.exit(0);\n }\n }", "public static boolean isSure() {\n Scanner in = new Scanner(System.in);\n in = new Scanner(System.in);\n String danger = \"This action might result in a loss of data,\";\n danger += \" do you want to continue? (yes/no)\";\n System.out.println(danger);\n String answer = in.nextLine();\n if (answer.equals(\"no\")) {\n return false;\n }\n return true;\n }", "private void newGame() \n {\n int input = JOptionPane.showConfirmDialog(null, \"Would you like to play again?\\n\",\"Game has ended\",JOptionPane.YES_NO_OPTION);\n if (input == JOptionPane.NO_OPTION){\n JOptionPane.showMessageDialog(null, \"Thank you for playing! \\n\\nBye Bye!\",\"Game Over\", JOptionPane.PLAIN_MESSAGE);\n System.exit(0);\n }\n else if (input == JOptionPane.YES_OPTION){\n isFirst = false;\n init();\n gameLogic();\n }\n }", "public void actionPerformed(ActionEvent e) {\n if(e.getSource() == confirmButton) {\n setVisible(false); // causes all the add text \n }\n else if(e.getSource() == exitButton) {\n System.exit(0);\n }\n }", "public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }", "public void clickOnYesButton() {\r\n\t\tsafeJavaScriptClick(manageVehiclesSideBar.replace(\"Manage Vehicles\", \"Yes\"));\r\n\t}", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) {\n\t\tint reply = JOptionPane.showConfirmDialog(null, \"Are you sure you want to leave us behind, my liege?\", \"Close?\", JOptionPane.YES_NO_OPTION);\n\t\tif (reply == JOptionPane.YES_OPTION)\n\t\t{\n\t\t System.exit(0);\n\t\t}\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\n\t\t\t\tif(JOptionPane.showConfirmDialog(f4, \"Confrom if you want to exit\",\"Library Management System\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION)==JOptionPane.YES_NO_OPTION) {\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}", "public void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.exit(0);\t\t\n\t\t\t\t\t}\n\t\t\t\t}", "private static boolean backToMenu() {\n boolean exit = false;\n System.out.println(\"Return to Main Menu? Type Yes / No\");\n Scanner sc2 = new Scanner(System.in);\n if (sc2.next().equalsIgnoreCase(\"no\"))\n exit = true;\n return exit;\n }", "private void confirmationAlert() {\n\t\tAlert confirm = new Alert( AlertType.CONFIRMATION, \"You Will Not Be Able To Change Your Name\\nAfter You Press 'OK'.\");\n\t\tconfirm.setHeaderText(\"Are You Sure?\");\n confirm.setTitle(\"Confirm Name\");\n confirm.showAndWait().ifPresent(response -> {\n if (response == ButtonType.OK) {\n \tbackground.remove( pointer );\n \tkeyStrokes = keyStrokes.replace(\" \", \"-\");\n\t\t\t\tinsertNewHiScore();\n\t\t\t\tnewHighScore = false;\n }\n });\n\t}", "public void actionPerformed(ActionEvent e) {\n Object[] options ={ \"Yes\", \"No\" };\r\n //yes = 0 no = 1\r\n int m = JOptionPane.showOptionDialog(null, \"Go Back?\", \"tips\",JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);\r\n\r\n if (m == 0)\r\n {\r\n frame.dispose();\r\n new init();\r\n }\r\n }", "public void confirmExit() {\n int resposta = JOptionPane.showConfirmDialog(this,\n \"Really exit?\", \"Exit\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE);\n if (resposta == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "private boolean areYouSure(String text) {\n return JOptionPane.showConfirmDialog(null, text, \"Are you sure?\", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION;\n }", "public void handleExit(){\n if(JOptionPane.showConfirmDialog(null,\"Do you really wanna exit\",\"Confirm\",JOptionPane.WARNING_MESSAGE,\n JOptionPane.YES_OPTION)==JOptionPane.YES_OPTION){System.exit(0);}\n else{\n return;\n }\n\n\n\n }", "public boolean promptToSave()\r\n {\r\n // PROMPT THE USER TO SAVE UNSAVED WORK\r\n AnimatedSpriteEditorGUI gui = AnimatedSpriteEditor.getEditor().getGUI();\r\n int selection =JOptionPane.showOptionDialog(gui, \r\n PROMPT_TO_SAVE_TEXT, PROMPT_TO_SAVE_TITLE_TEXT, \r\n JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, \r\n null, null, null);\r\n \r\n // IF THE USER SAID YES, THEN SAVE BEFORE MOVING ON\r\n if (selection == JOptionPane.YES_OPTION)\r\n {\r\n poseIO.savePose(currentFile, false);\r\n poseIO.savePoseImage(currentPoseName, poseID);\r\n saved = true;\r\n }\r\n \r\n // IF THE USER SAID CANCEL, THEN WE'LL TELL WHOEVER\r\n // CALLED THIS THAT THE USER IS NOT INTERESTED ANYMORE\r\n else if (selection == JOptionPane.CANCEL_OPTION)\r\n {\r\n return false;\r\n }\r\n\r\n // IF THE USER SAID NO, WE JUST GO ON WITHOUT SAVING\r\n // BUT FOR BOTH YES AND NO WE DO WHATEVER THE USER\r\n // HAD IN MIND IN THE FIRST PLACE\r\n return true;\r\n }", "public void confirmExit() {\n boolean confirmOnExit = getIntent().getExtras().getBoolean(MapsActivity.PARAMETERS.CONFIRM_ON_EXIT, true);\n if (confirmOnExit) {\n new AlertDialog.Builder(this).setTitle(R.string.button_confirm_exit_title)\n .setMessage(R.string.button_confirm_exit)\n .setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n finish();\n return;\n }\n }).setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n // do nothing\n }\n }).show();\n } else {\n finish();\n }\n }", "private void exitQuestionDialog() {\n\t\tquestion = false;\n\t\tdialog.loadResponse();\n\t\tchangeDirBehaviour(Values.DETECT_ALL);\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean yes = true;\n\t\t\t\t// update the question text\n\t\t\t\tupdateQuestion(yes);\n\t\t\t}", "public boolean promptYesNo(String str)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "protected abstract boolean onOkClicked();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tboolean yes = false;\n\t\t\t\t// update the question text\n\t\t\t\tupdateQuestion(yes);\n\t\t\t}", "public static void main(String[] args) {\n \n int result=JOptionPane.showConfirmDialog(null,\"Are you sure to Exit?\",\n \"My Question\",JOptionPane.YES_NO_OPTION);\n \n switch(result){\n case JOptionPane.YES_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do..\");\n break;\n \n case JOptionPane.NO_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we do not..\");\n break;\n \n case JOptionPane.CANCEL_OPTION :\n JOptionPane.showMessageDialog(null,\"OK we cancel it..\");\n }\n }", "private void doExit() {\n\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(\n BookingActivity.this);\n\n alertDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //finish();\n //System.exit(0);\n goBack();\n }\n });\n\n alertDialog.setNegativeButton(\"No\", null);\n\n alertDialog.setMessage(\"Do you want to exit?\");\n alertDialog.setTitle(\" \");\n alertDialog.show();\n }", "static boolean yesNoQuestion(String prompt){\r\n while(true){\r\n System.out.println(prompt);\r\n String input = Console.in.readWord();\r\n if (input.equals(\"yes\")) return true;\r\n else if (input.equals(\"no\")) return false;\r\n }\r\n }", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().trim().toLowerCase();\r\n while (!response.equals(\"y\") && !response.equals(\"n\")) {\r\n System.out.println(\"Please answer y or n.\");\r\n System.out.print(prompt + \" (y/n)? \");\r\n response = console.nextLine().trim().toLowerCase();\r\n }\r\n return response.equals(\"y\");\r\n }", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().trim().toLowerCase();\r\n while (!response.equals(\"y\") && !response.equals(\"n\")) {\r\n System.out.println(\"Please answer y or n.\");\r\n System.out.print(prompt + \" (y/n)? \");\r\n response = console.nextLine().trim().toLowerCase();\r\n }\r\n return response.equals(\"y\");\r\n }", "@Override\r\n\t\t\t\tpublic void actionPerformed(ActionEvent Event) {\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\r\n\t\t\t\t\tint reply = JOptionPane.showConfirmDialog(null, getPanel(), \"Exit\", JOptionPane.YES_NO_OPTION);\r\n\t\t\t\t\tif (reply == JOptionPane.NO_OPTION)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t System.exit(0);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}", "public abstract boolean confirm();", "public void confirmation() throws InterruptedException {\n Scanner scan = new Scanner(System.in);\n String confirm = \"\";\n confirm = InputValidation.regexValidate(scan, \"yn\");\n\n if (confirm.equalsIgnoreCase(\"Y\")) {\n entryCheck();\n computeResult();\n System.out.println(Pet.petCollection.get(Pet.getIndex()).getCompetition());\n }\n Competition.c.setOpponent(Pet.PetGenerator());\n }", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "private static void JGUI4() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "private static void JGUI5() {\n\t\tint response = JOptionPane.showConfirmDialog(null,\n\t\t\t\t\"Do you want to continue?\", \"Confirm\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE); \n\t\tif (response == JOptionPane.NO_OPTION) {\n\t\t\tSystem.out.println(\"No button clicked\");\n\t\t} else if (response == JOptionPane.YES_OPTION) {\n\t\tSystem.out.println(\"Yes button clicked\");\n\t\t} else if (response == JOptionPane.CLOSED_OPTION) {\n\t\t\tSystem.out.println(\"JOptionPane closed\");\n\t\t}\n\t}", "private static void gameOver() {\n\t\tSystem.out.println(\"Would you like to play again?\");\n\t\tinput.nextLine();\n\t\tuserInput = input.nextLine();\n\t\tif(userInput.contains(\"yes\")||userInput.equals(\"y\"))\n\t\t{\n\t\t\tgame();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"Stay golden.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "public void actionPerformed(ActionEvent e)\n {\n if (yesRadio.isSelected())\n {\n parent.unlockNextButton();\n }\n else\n {\n parent.lockNextButton();\n }\n }", "@Override\r\n public void confirmClicked(boolean result, int id) {\r\n if (result == true) {\r\n deleteSelectedWaypoints();\r\n }\r\n\r\n // reset the current gui screen to be ourselves now that we are done\r\n // with the GuiYesNo dialog\r\n this.mc.displayGuiScreen(this);\r\n }", "public void actionPerformed(ActionEvent event) {\n if (JOptionPane.showConfirmDialog(frame,\n \"Are you sure to close this window?\", \"Really Closing?\",\n JOptionPane.YES_NO_OPTION,\n JOptionPane.QUESTION_MESSAGE) == JOptionPane.YES_OPTION) {\n safeExit();\n }\n }", "private static boolean getUserYesOrNo(SimpleReader in, SimpleWriter out) {\r\n String answer = in.nextLine();\r\n boolean answerIsYes = true;\r\n while (!answer.equalsIgnoreCase(\"y\") && !answer.equalsIgnoreCase(\"n\")) {\r\n out.print(\"Error: please enter 'y' or 'n' as a response: \");\r\n answer = in.nextLine();\r\n }\r\n if (answer.equalsIgnoreCase(\"n\")) {\r\n answerIsYes = false;\r\n }\r\n return answerIsYes;\r\n }", "private void ExitProc()\r\n\t{\r\n\t\tint n = JOptionPane.showConfirmDialog(\r\n\t\t\t frame ,\r\n\t\t\t \"EXIT NOF FreeWare ???\",\r\n\t\t\t \"--NOF--\",\r\n\t\t\t JOptionPane.YES_NO_OPTION);\r\n\t\t\r\n\t\t//user pressed result.\r\n\t\tswitch (n) \r\n\t\t{\r\n\t\tcase 0: //yes\r\n\r\n\t\t\tframe.dispose();\r\n\t\t\tl = new log(\"event\",\"Exit Software\",\"Exit Pressed - Thank you for using NOF Software.\");\r\n\t\t\terase del = new erase(StStr); //StStr);\r\n\t\t\t//del.erase_output(StStr);\r\n\t\t\tSystem.exit(0); // Exit Program\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\tcase 1: //no\r\n\t\t\tl = new log(\"event\",\"Exit_option\",\"Exit - have been canceled\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t}", "void confirm();", "private boolean confirmAlert(String title, String message) {\n\t\tStage window = new Stage();\n\t\twindow.initModality(Modality.APPLICATION_MODAL);\n\t\twindow.setTitle(title);\n\t\twindow.setHeight(100);\n\n\t\tLabel errorMessage = new Label(message);\n\t\terrorMessage.setPrefWidth(150 + message.length() * 5);\n\t\terrorMessage.setAlignment(Pos.CENTER);\n\t\twindow.setWidth(errorMessage.getPrefWidth());\n\n\t\tButton yes = new Button(\"yes\");\n\t\tButton no = new Button(\"no\");\n\n\t\tyes.setOnAction(event -> {\n\t\t\twindow.close();\n\t\t\tanswer = true;\n\t\t});\n\t\tno.setOnAction(event -> {\n\t\t\twindow.close();\n\t\t\tanswer = false;\n\t\t});\n\n\n\t\tHBox answers = new HBox(yes, no);\n\t\tanswers.setSpacing(15);\n\t\tanswers.setAlignment(Pos.CENTER);\n\t\tVBox layout = new VBox();\n\t\tlayout.getChildren().addAll(errorMessage, answers);\n\t\tlayout.setAlignment(Pos.CENTER);\n\t\tlayout.setSpacing(15);\n\n\t\tScene scene = new Scene(layout);\n\t\twindow.setScene(scene);\n\t\twindow.showAndWait();\n\n\t\treturn answer;\n\t}", "private static void JGUI2() {\n\t\tint n = JOptionPane.showConfirmDialog(\n\t\tnull,\n\t\t\"Would you like green eggs and ham?\",\n\t\t\"An Inane Question\",\n\t\tJOptionPane.YES_NO_OPTION);\n\t}", "private void okButtonActionPerformed() {\n\n saveConsoleText(consoleTextArea);\n\n setVisible(false);\n\n if (mainFrame == null && !isBasicUI) {\n System.exit(0);\n }\n }", "protected boolean Confirm(String message) {\n String line = inputLine(message);\n if (line.length() == 0 || line.toUpperCase().charAt(0) == 'Y') {\n return true;\n } else {\n return false;\n }\n }", "private void YesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_YesActionPerformed\n new Rename().setVisible(true);\n displayTimer.stop();\n Yes.setEnabled(false);\n //System.exit(0);\n \n }", "private static void askForContinue() {\n\t\t\t\n\t\t}", "private void dialogExit() {\n\t\tint result = showConfirmDialog(frmRentCalc, \"Вы действительно ходите выйти?\", \"Окно подтверждения\", YES_NO_OPTION, QUESTION_MESSAGE);\r\n\t\tif (result == YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t} else {\r\n\t\t\tif (result == NO_OPTION) {\r\n\t\t\t}\r\n\t\t}\r\n\t}", "boolean checkYesNo (String choice){\r\n if (choice.equalsIgnoreCase(\"N\") || choice.equalsIgnoreCase(\"Y\")){\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "@OnClick(R.id.buttonConfirmSymptoms)\n public void buttonConfirmSymptoms() {\n if (sharedPreferences.getInt(\"symptomCounter\", 0) == 0) {\n Toast.makeText(ExaminationActivity.this, getString(R.string.not_enough), Toast.LENGTH_SHORT).show();\n } else {\n startActivity(new Intent(ExaminationActivity.this, DiagnoseActivity.class));\n finish();\n }\n }", "public Boolean displayMessage(String message)\n\t{\n\t\tSystem.out.println(message +\" yes or no?\");\n\t\tString choice = new Scanner(System.in).next();\n\t\tif(choice.toLowerCase().equals(\"yes\") || choice.toUpperCase().equals(\"YES\"))\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private boolean promptCommand() {}", "public static boolean askUserYesNo() {\n // Variable declarations\n String userInput = \"\"; // User input string\n\n // Get user input\n userInput = scnr.nextLine();\n\n // Validate whether user input is ok, and continue asking until right\n while (!userInput.equalsIgnoreCase(\"y\") &&\n !userInput.equalsIgnoreCase(\"yes\") &&\n !userInput.equalsIgnoreCase(\"n\") &&\n !userInput.equalsIgnoreCase(\"no\")) {\n System.out.print(\"That is not a valid input. Please try again. (y/n): \");\n userInput = scnr.nextLine();\n }\n\n // Return true if user says yes, and false if user says no\n if (userInput.equalsIgnoreCase(\"y\") || userInput.equalsIgnoreCase(\"yes\")) {\n return true;\n } else {\n return false;\n }\n }", "public boolean getUserConfirmation() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirmation Box\");\n alert.setHeaderText(\"Are you sure you want to delete?\");\n alert.setResizable(false);\n Optional<ButtonType> result = alert.showAndWait();\n ButtonType button = result.orElse(ButtonType.CANCEL);\n\n if (button == ButtonType.OK) {\n return true;\n } else {\n return false;\n }\n }", "public Button getYes() {\n return yes;\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(false);\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void windowClosing(WindowEvent e) {\r\n //show dialog box to receive confirmation from the user\r\n int response = JOptionPane.showConfirmDialog(null, \"Do you want to exit?\", \"Confirm\",\r\n JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\r\n if (response == JOptionPane.NO_OPTION) {\r\n System.out.println(\"No button clicked\");\r\n } else if (response == JOptionPane.YES_OPTION) {\r\n System.out.println(\"Yes button clicked\");\r\n System.exit(0);\r\n } else if (response == JOptionPane.CLOSED_OPTION) {\r\n System.out.println(\"JOptionPane closed\");\r\n }\r\n }", "public boolean yesNoQuestion(String message) {\n System.out.println(message + \" y/n\");\n String answer = scanner.nextLine();\n while (!(answer.equals(\"y\") || (answer.equals(\"n\")))) {\n System.out.println(\"Type 'y' or 'n'\");\n answer = scanner.nextLine();\n }\n return answer.equals(\"y\");\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tcheckAnswer(true);\n\t\t\t\t\n\t\t\t}", "private void askConfirm(String question) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString confirm = \"y\";\n\t\twhile (!confirm.equals(\"y\") && !confirm.equals(\"n\")) {\n\t\t\tSystem.out.println(question);\n\t\t\tconfirm = scanner.nextLine();\n\t\t\tif (confirm.equals(\"y\")) {\n\t\t\t\tSystem.out.println(\"Thank you.\");\n\t\t\t} else if (confirm.equals(\"n\")) {\n\t\t\t\tSystem.out.println(\"You can edit the config settings in src/main/config\");\n\t\t\t\tSystem.exit(1);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Really funny. Try again.\");\n\t\t\t}\n\n\t\t}\n\t\tscanner.close();\n\t}", "public void returnHall() {\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n alert.setTitle(\"Confirm Exit\");\n alert.setHeaderText(\"Confirmation\");\n alert.setContentText(\"Are you sure you want to exit this game ?\");\n Optional result = alert.showAndWait();\n if (result.get() == ButtonType.OK) {\n HallController.getStage().close();\n Game.getPrimaryStage().show();\n Game.returnToHall();\n }\n }", "private boolean showConfirmationMessage(String title, String body)\r\n {\r\n MyLogger.log(Level.INFO, \"Info message initiated. Info Title: {0}\", title);\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n Stage currentStage = (Stage) viewCoinAnchorPane.getScene().getWindow();\r\n alert.initOwner(currentStage);\r\n alert.setTitle(title);\r\n alert.setHeaderText(null);\r\n alert.setContentText(body);\r\n ButtonType buttonTypeCancel = new ButtonType(\"Cancel\", ButtonData.CANCEL_CLOSE);\r\n ButtonType buttonTypeOK = new ButtonType(\"OK\", ButtonData.OK_DONE);\r\n alert.getButtonTypes().setAll(buttonTypeCancel, buttonTypeOK);\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.isPresent() && result.get() == buttonTypeOK)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User confirmed coin action\");\r\n return true;\r\n } else if (result.isPresent() && result.get() == buttonTypeCancel)\r\n {\r\n MyLogger.log(Level.INFO, LOG_CLASS_NAME + \"User canceled coin Action\");\r\n return false;\r\n }\r\n return false;\r\n\r\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n if (!askSave()) {\n return;\n }\n System.exit(0);\n }", "private void openExitWindowConfirmation() {\n\t\t// int opcion = JOptionPane.showConfirmDialog(this, \"Desea salir del\n\t\t// Chat\", \"Confirmación\",\n\t\t// JOptionPane.YES_NO_OPTION);\n\t\t// if (opcion == JOptionPane.YES_OPTION) {\n\t\tthis.setVisible(false);\n\t\t// }\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this out\");\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString actionCmd = e.getActionCommand();\n\t\t\tif(actionCmd.equals(\"Yes\")) { //재게임 하겠다\n\t\t\t\t\n\t\t\t\tif(GameType.equalsIgnoreCase(\"Theory\")) { //이론 게임 선택 \n\t\t\t\t\tTheoryJavaGame theoryjava = new TheoryJavaGame(user.getId());\n\t\t\t\t\ttheoryjava.setVisible(true);\n\t\t\t\t}else if(GameType.equalsIgnoreCase(\"Lab\")) { //실습 게임 선택 \n\t\t\t\t\tLabJavaGame labjava = new LabJavaGame(user.getId());\n\t\t\t\t\tlabjava.setVisible(true);\n\t\t\t\t}else {\n\t\t\t\t\tJOptionPane.showMessageDialog(new TheoryJavaGame(user.getId()), \n\t\t\t\t\t\t\t\"Please enter it correctly.\", \n\t\t\t\t\t\t\t\"Submission Error\", \n\t\t\t\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t}\n\t\t\t\tdispose();\n\n\t\t\t}else if(actionCmd.equals(\"No\")) { //재게임 하지 않겠다\n\t\t\t\tLogin log = new Login(); //로그인 페이지로 돌아가기\n\t\t\t\tlog.setVisible(true);\n\t\t\t\tdispose();\n\t\t\t}else\n\t\t\t\tSystem.out.println(\"Unexpected Error\"\n\t\t\t\t\t\t+ \" in Confirm Window\");\n\t\t}", "public static void forfeitButton(){\n\t\tString message;\n\t\tif(turn.equals(\"white\")){\n\t\t\tmessage = \"White would like to forfeit!\\nDo you accept Black?\";\n\t\t}\n\t\telse{\n\t\t\tmessage = \"Black would like to forfeit!\\nDo you accept White?\";\n\t\t}\n\t\t\n\t\tObject[] options = {\"Yes\",\"No\"};\n\t\tint dialogButton = JOptionPane.showOptionDialog(userInterface.frame,message,\"Forfeit\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[1]);\n\t\tif(dialogButton == JOptionPane.YES_OPTION){\n\t\t\tnewGame();\n\t\t\tif(turn.equals(\"white\")){\n\t\t\t\tincrementPoints(\"black\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tincrementPoints(\"white\");\n\t\t\t}\n\t\t}\n\t}", "public static boolean askYesNo(String message) {\n\n\t\t// Present the choice (and log it where chosen.)\n\t\tpresent(message + \" [Y/N] :: \");\n\n\t\tString choice = \"\";\n\n\t\t// Get a result from the user.\n\t\ttry {\n\t\t\tboolean chosen = false;\n\t\t\twhile ( !(chosen)) {\n\n\t\t\t\tchoice = System.console().readLine();\n\n\t\t\t\tchoice = choice.toUpperCase().trim();\n\n\t\t\t\tif ((choice.compareTo(\"Y\") == 0) || (choice.compareTo(\"N\") == 0) ){\n\t\t\t\t\tchosen = true;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t} catch\t(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Log the user's choice. \n\t\taddLine(\"(The user chose: \\\"\" + choice + \"\\\".)\");\n\n\t\tif (choice.compareTo(\"Y\") == 0 ) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n jlQuestion.setText(S_QUESTION_CONFIRMATION);\n jbNewOrderButton.setVisible(false);\n jbConfirm.setVisible(true);\n jbCancel.setVisible(true);\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JOptionPane.showConfirmDialog(OverCounterForm.this, \"Check this\");\n }", "@Override\n\tpublic void onNoButtonDialogToConfirmDuiClicked() {\n\n\t}", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstate = true;\n\t\t\t\tAskDialog.this.dispose();\n\t\t\t}", "public static boolean promptForYesNo(String title, String message) {\n // Bury Bones\n int yes = JOptionPane.showOptionDialog(null,\n message,\n title,\n JOptionPane.YES_NO_OPTION,\n JOptionPane.INFORMATION_MESSAGE,\n null,\n new String[]{\"Yes\", \"No\"},\n \"Yes\");\n\n return yes == 0;\n }", "public static void zatvoriAplikaciju() {\r\n\t\tint zatvori = JOptionPane.showConfirmDialog(teretanaGui.getContentPane(),\r\n\t\t\t\t\"Da li ste sigurni da zelite da izadjete iz programa?\", \"Izlazak iz programa\",\r\n\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\tif (zatvori == JOptionPane.YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public boolean promptUserWantsShutdown() {\r\n boolean result = true;\r\n\r\n if (isGUI()) {\r\n String msg = Messages.MainModel_4.toString();\r\n String title = Messages.MainModel_5.toString();\r\n int ans = JOptionPane.showConfirmDialog(null, msg, title,\r\n JOptionPane.OK_CANCEL_OPTION);\r\n\r\n if (ans == JOptionPane.CANCEL_OPTION) {\r\n result = false;\r\n }\r\n }\r\n\r\n return result;\r\n\r\n }", "public boolean isOkClicked(){\n\t\treturn okClicked;\n\t}", "abstract public boolean onPositiveClicked(String userInput);", "private boolean yesOrNo(String prompt) {\r\n\t\tString more = getToken(prompt + \" (Y|y)[es] or anything else for no\");\r\n\t\tif (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private boolean yesOrNo(String prompt) {\n String more = getToken(prompt + \" (Y|y)[es] or anything else for no: \");\n if (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\n return false;\n }\n return true;\n }", "private boolean yesOrNo(String prompt) {\n String more = getToken(prompt + \" (Y|y)[es] or anything else for no: \");\n if (more.charAt(0) != 'y' && more.charAt(0) != 'Y') {\n return false;\n }\n return true;\n }", "@Override\n public void handle(ActionEvent event) {\n alert = new Alert(AlertType.CONFIRMATION);\n //Optional title. If not used the standard title \"Confiramation\" will be displayed\n //To remove the title use alert.setTitle(null);\n alert.setTitle(\"Confirmation Dialog\");\n //Optional header.If not used the standard header \"Confiramation\" will be displayed\n //To remove the title use alert.setHeaderText(null); \n alert.setHeaderText(\"Please answer the question!\");\n alert.setContentText(initText);\n //Display the dialog and get the result from the user action\n Optional<ButtonType> result = alert.showAndWait();\n if (result.get() == ButtonType.OK){\n // the user clicked OK\n alert = new Alert(AlertType.INFORMATION);\n alert.setTitle(\"Information Dialog\");\n alert.setHeaderText(\"Important message for you!\");\n alert.setContentText(\"Happiness is ephemeral!\");\n alert.showAndWait(); \n //the user clocked Cancel\n } else {\n // ... user chose CANCEL or closed the dialog\n //Warning Dialog\n alert = new Alert(AlertType.WARNING);\n alert.setTitle(\"Warning Dialog\");\n alert.setHeaderText(\"Read the Warning!\");\n alert.setContentText(\"You must like Java - Shall make you Happy!\");\n alert.showAndWait(); \n }\n }", "private void confirmExit () {\n\t\tint ret = JOptionPane.showConfirmDialog(this, \"Save game before exiting?\");\n\t\tif (ret == 0) {\n\t\t\tcloseAfterSave = true;\n\t\t\tEngine.requestSync();\n\t\t} else if (ret == 1) {\n\t\t\tkill();\n\t\t}\n\t}", "private void onOK() {\n isOkClicked = true;\n dispose();\n }", "private void keluarMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n int exit = JOptionPane.showConfirmDialog(this, \"Anda yakin akan keluar ?\",\"\", JOptionPane.OK_CANCEL_OPTION);\n if(exit == JOptionPane.OK_OPTION){\n System.exit(0);\n }\n }", "@Override\r\n\tpublic void onClick(View v) {\r\n\t\tif (v == okButton){\r\n\t\t\tif(dontShow.isChecked()){\r\n\t\t\tAlertDialog builder2 = new AlertDialog.Builder(this.parentcontext)\r\n .setTitle(\"Confirmation\")\r\n .setMessage(\"Are you sure about disabling instruction from next use\")\r\n .setPositiveButton(\"Submit\", new Dialog.OnClickListener() {\r\n\r\n @Override\r\n public void onClick(DialogInterface dialogInterface, int i) {\r\n // Mark this version as read.\r\n \t\r\n \t\t\t\tSharedPreferences.Editor editor = prefs.edit();\r\n editor.putBoolean(CustomizeDialog.this.key, true);\r\n editor.commit();\r\n //dialogInterface.dismiss();\r\n \t\t\t}\r\n \r\n })\r\n .setNegativeButton(\"Cancel\", new Dialog.OnClickListener() {\r\n\r\n\t\t\t\t@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\r\n\t\t\t\t\t// Close the activity as they have declined the EULA\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n \t\r\n })\r\n .show();}\t\t\t\r\n\t\t\r\n\t\t\tdismiss();\r\n\t\t}\r\n\t}", "void okButtonClicked();", "@Override\n public void onClick(View v) {\n new AlertDialog.Builder(MainActivity.this)\n .setIcon(android.R.drawable.ic_menu_save)\n .setTitle(\"End Evidence Collection\")\n .setMessage(\"Are you sure you want to end collecting evidence?\")\n .setPositiveButton(\"Yes\", new DialogInterface.OnClickListener()\n {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n submit();\n\n }\n\n })\n .setNegativeButton(\"No\", null)\n .show();\n\n }", "public static void checkFromUser() {\n\t\tif (askUser(\"Please type y to execute program and any other key to stop\").contentEquals(\"y\")) {\n\t\t\tSystem.out.println(\"Continuing\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"Terminating program\");\n\t\t\tSystem.exit(0); \n\t\t}\n\t\tSystem.out.println(\"Calculating the greatest house income, the greatest income after expenditure and greatest savings from the given 3 families\");\n\t}", "private boolean promptNewOrder(String productName) {\r\n System.out.println(\"It doesn't look like you've placed this order before. \"\r\n + \"Would you like to place a new order for - \" + productName + \"?\\n\"\r\n + \"ENTER \\\"YES\\\" to Place a New Order or \\\"NO\\\" to continue.\");\r\n boolean responseIsYes;\r\n try {\r\n responseIsYes = scan.next().equalsIgnoreCase(\"yes\");\r\n } \r\n //if the user does not type anything, default to \"Yes\"\r\n catch(java.util.NoSuchElementException e){\r\n responseIsYes = true;\r\n }\r\n if (responseIsYes) {\r\n System.out.println(\"Thank you! A new Order will be placed.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return true;\r\n }\r\n System.out.println(\"Thank you! This order has been cancelled.\\n\"\r\n + \"----------------------------------------------------------\");\r\n return false;\r\n }" ]
[ "0.750244", "0.7382191", "0.72109437", "0.7064262", "0.70413613", "0.69963825", "0.6990937", "0.6989778", "0.6977709", "0.69620425", "0.6932694", "0.69140285", "0.68787897", "0.6848838", "0.68402183", "0.6834854", "0.68285304", "0.68268865", "0.6813543", "0.6802476", "0.67952645", "0.6791507", "0.6788539", "0.67757696", "0.67680925", "0.67623454", "0.67487806", "0.6705255", "0.66838175", "0.6680085", "0.66636175", "0.6645539", "0.66271895", "0.662006", "0.6607298", "0.65952414", "0.657643", "0.65688", "0.65575504", "0.65575504", "0.65435463", "0.65410835", "0.6536748", "0.6535827", "0.6508746", "0.64660245", "0.6464219", "0.6463221", "0.64501745", "0.6449408", "0.64464307", "0.64257675", "0.6425714", "0.6421993", "0.64205694", "0.6416255", "0.64148", "0.6405482", "0.64036304", "0.64010197", "0.6391676", "0.6387416", "0.6367956", "0.6365577", "0.6350727", "0.63506484", "0.6349343", "0.6337651", "0.6332319", "0.6326823", "0.63228273", "0.63212353", "0.63071996", "0.6305921", "0.63048774", "0.62992203", "0.62780076", "0.6276438", "0.6263872", "0.62624544", "0.62594885", "0.6256808", "0.62355256", "0.62354875", "0.6231837", "0.6219786", "0.62189317", "0.6217098", "0.6210157", "0.62011784", "0.61943847", "0.61943847", "0.61847734", "0.61748374", "0.61667216", "0.6162588", "0.6156778", "0.6148317", "0.6140597", "0.6137657", "0.6137291" ]
0.0
-1
process that allows user to select input file(s) and dictionary file(s) and displays misspelled words
public void actionPerformed(ActionEvent event) { // if an input file is already loaded, clear panel before adding new words if(!empty.status) { // new session only if user responds with yes end = JOptionPane.showConfirmDialog(null, "Are you sure you want to start a new spell check session?"); if (end == JOptionPane.YES_OPTION) { getContentPane().removeAll(); revalidate(); empty.status = false; // file chooser for input file and dictionaries selection set up newFileChooser = new JFileChooser(); filter = new FileNameExtensionFilter(".txt files", "txt"); newFileChooser.setCurrentDirectory(new java.io.File(System.getProperty("user.home"))); newFileChooser.setApproveButtonText("Load Input"); newFileChooser.setDialogTitle("Load Input File(s)"); newFileChooser.setFileFilter(filter); newFileChooser.setMultiSelectionEnabled(true); newSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile); } else { newSelectionResult = JFileChooser.CANCEL_OPTION; dictionarySelectionResult = JFileChooser.CANCEL_OPTION; } } else { empty.status = false; // file chooser for input file and dictionaries selection set up newFileChooser = new JFileChooser(); filter = new FileNameExtensionFilter(".txt files", "txt"); newFileChooser.setCurrentDirectory(new java.io.File(System.getProperty("user.home"))); newFileChooser.setApproveButtonText("Load Input"); newFileChooser.setDialogTitle("Load Input File(s)"); newFileChooser.setFileFilter(filter); newFileChooser.setMultiSelectionEnabled(true); newSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile); } if(newSelectionResult == JFileChooser.APPROVE_OPTION) { inputFiles = newFileChooser.getSelectedFiles(); inputTrees = new ArrayList<Set<String>>(); // **** took away TreeSet inputTrees = treeHandler.convertMultipleFiles(inputFiles); dictionaryFileChooser = new JFileChooser(); dictionaryFileChooser.setCurrentDirectory(new java.io.File(System.getProperty("user.home"))); dictionaryFileChooser.setApproveButtonText("Load Dictionary"); dictionaryFileChooser.setDialogTitle("Load Dictionary File(s)"); dictionaryFileChooser.setFileFilter(filter); dictionaryFileChooser.setMultiSelectionEnabled(true); dictionarySelectionResult = dictionaryFileChooser.showOpenDialog(null); // only change view if user inputs both an input and dictionary(ies) if(dictionarySelectionResult == JFileChooser.APPROVE_OPTION) { dictionaryFiles = dictionaryFileChooser.getSelectedFiles(); dictionaryTrees = new ArrayList<Set<String>>(); // **** took away TreeSet dictionaryTrees = treeHandler.convertMultipleFiles(dictionaryFiles); contentPane = getContentPane(); inputText = new SpellCheckTextArea(); inputText.setLineWrap(true); inputText.setWrapStyleWord(true); display.numWordsIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); //size of numDictionaries*numInputFiles + 1 for the 0 index display.numReplaced = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); display.numAdded = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); display.numLinesIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); display.numIgnored = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); /* * get number of lines in input file */ for(index = 0; index < inputFiles.length; index++) { for(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++) { loc = (index+1)*(innerIndex+1); //zero location in list is added and then ignored display.numLinesIn.add(0); //initialize all statistics variables for each inputFile/DictionaryFile pair to 0; display.numLinesIn.add(loc, Integer.valueOf(0)); try { br = new BufferedReader(new FileReader(inputFiles[index])); while ((line = br.readLine()) != null) { display.numLinesIn.set(loc, Integer.valueOf(display.numLinesIn.get(loc) + 1)); //increment lines read } } /** * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing. */ catch (FileNotFoundException exception) { exception.printStackTrace(); } /** * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations. */ catch (IOException exception) { exception.printStackTrace(); } finally { if (br != null) { try { br.close(); } catch (IOException exception) { exception.printStackTrace(); } } } } } /* * Reads file and displays ready for user input of add, replace, ignore */ for(index = 0; index < inputFiles.length; index++) { for(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++) { loc = (index+1)*(innerIndex+1); //all zero locations in list are added and then ignored display.numWordsIn.add(0); display.numReplaced.add(0); display.numAdded.add(0); display.numIgnored.add(0); //initialize all statistics variables for each inputFile/DictionaryFile pair to 0 display.numWordsIn.add(loc, Integer.valueOf(0)); display.numReplaced.add(loc, Integer.valueOf(0)); display.numAdded.add(loc, Integer.valueOf(0)); display.numIgnored.add(loc, Integer.valueOf(0)); /** * Convenience for reading character files. */ try { br = new BufferedReader(new FileReader(inputFiles[index])); //displays current input file and dictionary name at top of text inputText.extend("Input file: " + inputFiles[index].getName() + "\tDictionary File: " + dictionaryFiles[innerIndex].getName() + "\n\n"); while ((line = br.readLine()) != null) { String[] textLine = line.split(seperator); for(String word : textLine) { word = word.replaceAll("[\n\r\t]+", ""); word = word.replaceAll("[^a-zA-Z]", ""); if(!word.isEmpty()) { display.numWordsIn.set(loc, Integer.valueOf(display.numWordsIn.get(loc) + 1)); //increment the number of words in the input file tuple3 = new SpellCheckWord(word.toLowerCase(), inputText.getText().length(), inputFiles[index], dictionaryFiles[innerIndex]); tuple3.inputFileIndex = index; tuple3.dictionaryFileIndex = innerIndex; inputText.extend(tuple3); } } } } /** * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing. */ catch (FileNotFoundException exception) { exception.printStackTrace(); } /** * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations. */ catch (IOException exception) { exception.printStackTrace(); } finally { if (br != null) { try { br.close(); } catch (IOException exception) { exception.printStackTrace(); } } } inputText.extend(new SpellCheckWord("\n\n", inputText.getText().length())); } } /** * Calls the treeHandler functions and displays the misspelled words. * Outer list's indices represent different input files. * Middle list's indices represent different dictionary files that each input file will be compared to. * Inner list's indices represent the words in an input file that are not in the corresponding dictionary. */ missingWords = new ArrayList<ArrayList<ArrayList<String>>>(); missingWords = treeHandler.incorrectWords(inputTrees, dictionaryTrees); numberOfInputs = 0; numberOfDictionaries = 0; numberOfWords = 0; inFileNumber = 0; dictionaryNumber = 0; numberOfInputs = missingWords.size(); for(Iterator<ArrayList<ArrayList<String>>> iterator = missingWords.iterator(); iterator.hasNext();) { setsOfWords = iterator.next(); numberOfDictionaries += setsOfWords.size(); for(Iterator<ArrayList<String>> iterator2 = setsOfWords.iterator(); iterator2.hasNext();) { // use label to separate differences from different dictionary file words = iterator2.next(); numberOfWords += words.size(); if (!words.isEmpty()) { for(Iterator<String> iterator3 = words.iterator(); iterator3.hasNext();) { word = iterator3.next(); for(SpellCheckWord pair : inputText.contentPairs) { if(pair.word.equals(word) && !pair.missingWord && pair.inputFile.equals(inputFiles[inFileNumber]) && pair.dictionaryFile.equals(dictionaryFiles[dictionaryNumber])) { pair.missingWord = true; inputText.highlight(pair); } } } } dictionaryNumber += 1; } inFileNumber += 1; dictionaryNumber = 0; } /* * prints statistics for each pair of input/dictionary file to txt file */ scMenuBar.printStats.addActionListener ( new ActionListener() { public void actionPerformed(ActionEvent event) { try { // Create new file for(index = 0; index < inputFiles.length; index++) { for(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++) { loc = (index+1)*(innerIndex+1); String path = System.getProperty("user.home") + "/Desktop/Stats-for-" + inputFiles[index].getName() + "-" + dictionaryFiles[innerIndex].getName() + ".txt"; File writer = new File(path); // file does not exist, create if (!writer.exists()) { writer.createNewFile(); } FileWriter fw = new FileWriter(writer.getAbsoluteFile()); BufferedWriter bw = new BufferedWriter(fw); // Write in file bw.write(" Words in input file\t: " + display.numWordsIn.get(loc) + "\n Lines in input file\t: " + display.numLinesIn.get(loc) + "\n Number of words replaced:\t" + display.numReplaced.get(loc) + "\n Number of words added:\t" + display.numAdded.get(loc) + "\n Number of words ignored:\t" + display.numIgnored.get(loc)); // Close connection bw.close(); } } } catch(Exception e) { System.out.println(e); } } } ); inFileNumber = 0; inputText.setEditable(false); scroller = new JScrollPane(inputText); contentPane.add(scroller, BorderLayout.CENTER); // refresh frame //pack(); revalidate(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void doInteractiveMode(String[] args) throws FileNotFoundException {\r\n\t\tString dictionaryFile = args[0];\r\n\t\tString filename = args[1];\r\n\t\t// create file for original file\r\n\t\tFile newFile = new File(dictionaryFile);\r\n\t\tString name = newFile.getName();\r\n\t\tString newname = name + \"~\";\r\n\r\n\t\tDictionary dic = new Dictionary(dictionaryFile);\r\n\r\n\t\t// deep copy of binary search tree\r\n\t\tBinarySearchTree<Entry> oldtree = dic.getBST();\r\n\t\tDictionary olddic = new Dictionary(oldtree);\r\n\r\n\t\ttry {\r\n\t\t\tFile f = new File(filename);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\t// scan each line\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString sentence = in.nextLine();\r\n\t\t\t\tString[] words = sentence.split(\" \");\r\n\t\t\t\t// transform string[] into ArrayList\r\n\t\t\t\tArrayList<String> al = new ArrayList<String>(Arrays.asList(words));// string\r\n\r\n\t\t\t\tint errWordNum = 1;\r\n\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t\twhile (errWordNum != 0) {\r\n\t\t\t\t\terrWordNum = 0;\r\n\t\t\t\t\tArrayList<String> errWord = new ArrayList<String>();\r\n\t\t\t\t\tArrayList<Integer> errInd = new ArrayList<Integer>();\r\n\t\t\t\t\t// copy the old misspelling word\r\n\t\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t\t// the case of punctuation\r\n\t\t\t\t\t\tif (!dic.hasWord(al.get(i).replaceAll(\"[^a-zA-Z ]\", \"\"))) {\r\n\t\t\t\t\t\t\terrWordNum += 1;\r\n\t\t\t\t\t\t\terrWord.add(al.get(i));\r\n\t\t\t\t\t\t\terrInd.add(i);\r\n\t\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\t\tif (j == 0) {\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\"^\");\r\n\t\t\t\t\t\t\t\t} else\r\n\t\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tif (i != al.size() - 1) {\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" \");\r\n\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\tSystem.out.println();\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// if arrayList still has misspelling words\r\n\t\t\t\t\tif (errWordNum != 0) {\r\n\t\t\t\t\t\tSystem.out.print(errWord.get(0) + \": \");\r\n\t\t\t\t\t\tSystem.out.print(\"[r]eplace/[a]ccept? \");\r\n\t\t\t\t\t\tScanner in2 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input2 = in2.next();\r\n\t\t\t\t\t\t// the case of replacement\r\n\t\t\t\t\t\tif (input2.equals(\"r\")) {\r\n\t\t\t\t\t\t\tSystem.out.print(\"Replacement text: \");\r\n\t\t\t\t\t\t\tScanner in3 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tString input3 = in3.next();\r\n\t\t\t\t\t\t\tal.set(errInd.get(0), input3);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t// the case of acceptance\r\n\t\t\t\t\t\tif (input2.equals(\"a\")) {\r\n\t\t\t\t\t\t\tdic.addEntry(errWord.get(0));\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\t\tSystem.out.print(al.get(i) + \" \");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println(al.get(i));\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (!input2.equals(\"r\"))\r\n\t\t\t\t\t\t\terrWordNum--;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\t// keep the original file with ~\r\n\t\t\tolddic.printToFile(newname);\r\n\t\t\t// update the change in the new file\r\n\t\t\tdic.printToFile(dictionaryFile);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"check the existance of filename again\");\r\n\t\t}\r\n\r\n\t}", "public static void doNonInteractiveMode(String[] args) throws FileNotFoundException {\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\r\n\t\tString dictionaryFile = args[1];\r\n\t\tString filename = args[2];\r\n\r\n\t\tDictionary dic = new Dictionary(dictionaryFile);\r\n\r\n\t\ttry {\r\n\t\t\tFile f = new File(filename);\r\n\t\t\tScanner in = new Scanner(f);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString sentence = in.nextLine();\r\n\t\t\t\tString[] words = sentence.split(\" \");\r\n\t\t\t\t// transform string[] into ArrayList\r\n\t\t\t\tArrayList<String> al = new ArrayList<String>(Arrays.asList(words));\r\n\t\t\t\tSystem.out.println(sentence);\r\n\t\t\t\t// remove ^ when the operation is finished\r\n\t\t\t\tfor (int i = 0; i < al.size(); i++) {\r\n\t\t\t\t\t// the case of punctuation\r\n\t\t\t\t\tif (!dic.hasWord(al.get(i).replaceAll(\"[^a-zA-Z ]\", \"\"))) {\r\n\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\tif (j == 0)\r\n\t\t\t\t\t\t\t\tSystem.out.printf(\"^\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfor (int j = 0; j < al.get(i).length(); j++) {\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (i != al.size() - 1)\r\n\t\t\t\t\t\t\tSystem.out.printf(\" \");\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\tSystem.out.println();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"check the existance of filename\");\r\n\t\t}\r\n\t}", "public static void main(String[] args)\r\n\t{\n\t\tacceptConfig();\r\n\t\treadDictionary();\r\n\t\t//Then, it reads the input file and it prints the word (if contained on the file) or the suggestions\r\n\t\t//(if not contained) in the output file. These files are given by command line arguments\r\n\t\tprocessFile(args[0], args[1]);\r\n\t\t\r\n\t}", "public void checkDictionary (String[] target) {\n try {\n File f = new File(\"cmudict.0.7a\");\n BufferedReader br = new BufferedReader(new FileReader(f));\n String[][] data;\n Double result;\n for (String line; (line = br.readLine()) != null; ) {\n if (!line.matches(\"^[A-Za-z].*\")) {\n continue;\n }\n data = readDictionary(line);\n result = compareWords(target, data[1]);\n try {\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"results.txt\", true)));\n out.print(result);\n out.println(\" \" + data[0][0]); // prints the word\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void approveAll() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tSystem.out.println(\"Would you like to add the following misspelled words to the dictionary?\");\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"(Y/N): \");\r\n\t\t\t\tString response = sc.next();\r\n\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tincorrectWords.clear();\r\n\t\t\t\t\tSystem.out.println(\"Your changes were made to the dictionary.\");\r\n\t\t\t\t\tmodified = true;\r\n\t\t\t\t} \r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "public void suggestions(String mispelledPattern) \r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\t// String scanned to find the pattern.\r\n\t\t\tString line = \" \";\r\n\t\t\tString reg_ex = \"[\\\\w]+[@$%^&*()!?=.{}\\b\\n\\t]*\";\r\n\r\n\t\t\t// Create a Pattern object\r\n\t\t\tPattern pat = Pattern.compile(reg_ex);\r\n\t\t\t// Creating matcher object.\r\n\t\t\tMatcher my_match = pat.matcher(line);\r\n\t\t\tint file_Number = 0;\r\n\t\t\ttry \r\n\t\t\t{\r\n\t\t\t\tFile my_directory = new File(\"C:\\\\Users\\\\Asmita\\\\eclipse-workspace\\\\MyWebSearchEngine\\\\src\\\\HTMLFiles\");\r\n\t\t\t\tFile[] fileArray = my_directory.listFiles();\r\n\t\t\t\tfor (int i = 0; i < fileArray.length; i++)\r\n\r\n\t\t\t\t{\r\n\t\t\t\t\tfindWord(fileArray[i], file_Number, my_match, mispelledPattern);\r\n\t\t\t\t\tfile_Number++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\tSet keys = new HashSet();\r\n\t\t\t\tInteger val = 0;\r\n\t\t\t\tInteger value = 1;\r\n\t\t\t\t\r\n\t\t\t\tint counter = 0;\r\n\r\n\t\t\t\tSystem.out.println(\"\\nDid you mean? \");\r\n\t\t\t\tfor (Map.Entry entry : numbers.entrySet()) \r\n\t\t\t\t{\r\n\t\t\t\t\tif (val == entry.getValue()) \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse \r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (value == entry.getValue()) \r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (counter == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\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{\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" or \" + entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\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\tcatch (Exception e) \r\n\t\t\t{\r\n\t\t\t\tSystem.out.println(\"Exception:\" + e);\r\n\t\t\t} \r\n\t\t\tfinally \r\n\t\t\t{\r\n\t\t\t}\r\n\t\t} \r\n\t\tcatch (Exception e) \r\n\t\t{\r\n\r\n\t\t}\r\n\t}", "public void buildWordFileMap(){\n hashWords.clear();\n DirectoryResource dr = new DirectoryResource();\n for (File f : dr.selectedFiles()){ //for all the files selected make the hashWords hashmap\n addWordsFromFile(f);\n }\n \n }", "public static void main(String[] args) {\n String filePath = \"/usr/share/dict/words\";\n SpellChecker sc = new SpellChecker(filePath);\n String line;\n System.out.print(\"> \");\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n try {\n while((line = input.readLine())!= null) {\n String correctSpelling = sc.spellcheck(line);\n System.out.println(correctSpelling);\n System.out.print(\"> \");\n }\n System.out.println();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "public void approve() {\r\n\t\tif (readDocument != null) {\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.print(\"Would you like to add '\" + incorrectWordsArray[i] + \"' to the dictionary? (Y/N): \");\r\n\t\t\t\t\tString response = sc.next();\r\n\t\t\t\t\tif (response.equalsIgnoreCase(\"Y\")) {\r\n\t\t\t\t\t\tdictionary.add((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t\tincorrectWords.remove((String)incorrectWordsArray[i]);\r\n\t\t\t\t\t\tSystem.out.println(\"Your changes were made to the dicitonary.\");\r\n\t\t\t\t\t\tmodified = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "public void readDocument() throws FileNotFoundException{\r\n\t\t// Initialize 2 empty read document collections, one without duplicate words.\r\n\t\treadDocument = new LinkedBag<String>();\r\n\t\treadDocumentNoDuplicates = new LinkedSet<String>();\r\n\t\t\r\n\t\t// Prompt user for name of read document file.\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\tSystem.out.print(\"Enter the file you would like checked with extension: \");\r\n\t\tString readDocFileName = input.nextLine();\r\n\t\t\r\n\t\t// If exists, open file specified by user. Then add words to both collections.\r\n\t\ttry {\r\n\t\t\tFile file = new File(readDocFileName);\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tString word = scanner.next();\r\n\t\t\t\treadDocument.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t\treadDocumentNoDuplicates.add(word.replaceFirst(\"^[^a-zA-Z]+\",\"\").replaceAll(\"[^a-zA-Z]+$\", \"\"));\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tSystem.out.println(\"Document read\");\r\n\r\n\t\t\t// Get initial list of incorrect words.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\t// Display message showing how many words were in the read document.\r\n\t\t\tSystem.out.println(\"This document contains \" + readDocument.size() + \" words.\");\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\treadDocument = null;\r\n\t\t\treadDocumentNoDuplicates = null;\r\n\t\t\tSystem.out.println(\"Error: File '\" + readDocFileName + \"' not found. Please try again.\");\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws NoSimilarWordFoundException, IOException {\n\t\t\n\t\tString dictionaryFileName = args[0];\n\t\tString inputWord = args[1];\n\t\t\n\t\t/**\n\t\t * Create an instance of your corrector here\n\t\t */\n\t\tSpellCorrector corrector = new SpellingCorrector();\n Trie trie1 = new Words();\n\n trie1.add(\"bob\");\n trie1.add(\"karen\");\n trie1.add(\"smith\");\n trie1.add(\"smal\");\n\n Trie trie2 = new Words();\n\n trie2.add(\"bob\");\n trie2.add(\"karen\");\n trie2.add(\"smith\");\n trie2.add(\"smab\");\n\n boolean test = trie1.equals(trie2);\n\n System.out.println(test);\n\n\t\tcorrector.useDictionary(dictionaryFileName);\n\n\t\tString suggestion = corrector.suggestSimilarWord(inputWord);\n\t\t\n\t\tSystem.out.println(\"Suggestion is: \" + suggestion);\n\t}", "public static void main(String[] args)\n\t\tthrows FileNotFoundException, IOException\n\t{\n \t\tPrintWriter test = new PrintWriter(new FileWriter(\"DictionaryTESTING.txt\"));\n \t\t\n \t\ttest.println(\"Dictionary TESTING\");\n \t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam = new Dictionary()\");\n\t\tDictionary noParam = new Dictionary();\n\t\t\n\t\ttest.println(\"fileParam = new Dictionary('mywords.txt')\");\n\t\tDictionary fileParam = new Dictionary(\"mywords.txt\");\n\n\t\ttest.println();\n\t\ttest.println(\"mywords.txt contains select words in the form of a dictionary, i.e.\");\n\t\ttest.println(\"a\");\n\t\ttest.println(\"an\");\n\t\ttest.println(\"apple\");\n\t\ttest.println(\"banana\");\n\t\ttest.println(\"boy\");\n\t\ttest.println(\"can\");\n\t\ttest.println(\"cat\");\n\t\ttest.println(\"etc.\");\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.getLongestWordLength('aunt') :\" + noParam.getLongestWordLength(\"aunt\"));\n\t\ttest.println(\"fileParam.getLongestWordLength('zoo') :\" + fileParam.getLongestWordLength(\"but\"));\n\t\ttest.println(\"noParam.getLongestWordLength('rid') :\" + noParam.getLongestWordLength(\"rid\"));\n\t\ttest.println(\"fileParam.getLongestWordLength('300') :\" + fileParam.getLongestWordLength(\"300\"));\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.wordExists('apple') :\" + noParam.wordExists(\"apple\"));\n\t\ttest.println(\"fileParam.wordExists('zoo') :\" + fileParam.wordExists(\"zoo\"));\n\t\ttest.println(\"noParam.wordExists('rid') :\" + noParam.wordExists(\"rid\"));\n\t\t\n\t\ttest.println(\"fileParam.wordExists('alabama') :\" + fileParam.wordExists(\"alabama\"));\n\t\ttest.println(\"noParam.wordExists('zen') :\" + noParam.wordExists(\"zen\"));\n\t\ttest.println(\"fileParam.wordExists('randolf') :\" + fileParam.wordExists(\"randolf\"));\n\t\ttest.println(\"noParam.wordExists('300') :\" + noParam.wordExists(\"300\"));\n\t\t\n\t\ttest.println();\n\t\ttest.println(\"noParam.toString() :\" + noParam.toString());\n\t\ttest.println(\"fileParam.toString() :\" + fileParam.toString());\n\n\t\ttest.close();\t\t\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 }", "public static void classifyWithAllWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\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\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\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\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Result 1:\");\r\n\t\tSystem.out.println(\"All_Words\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\r\n\t\t\t}", "public void listIncorrectWords() {\r\n\t\tif (readDocument != null) {\r\n\t\t\t// Add all of the words from the read document that are not in the dictionary to the \r\n\t\t\t// incorrectWords collection.\r\n\t\t\tincorrectWords = readDocumentNoDuplicates.difference(dictionary);\r\n\t\t\t\r\n\t\t\tif (incorrectWords.size() > 0) {\r\n\t\t\t\t// List incorrect words from the read document.\r\n\t\t\t\tSystem.out.println(\"Incorrectly spelled words:\");\r\n\t\t\t\tObject[] incorrectWordsArray = incorrectWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < incorrectWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(incorrectWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no misspelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "public static void classifyWithLowerCaseWords(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\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\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\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\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\t\t\t\t\tword = word.toLowerCase();\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\t\t\r\n\t\tSystem.out.println(\"Result 2: \");\r\n\t\tSystem.out.println(\"Lower-case\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\t\t\t}", "protected static void mergeSpellingData( String[] args )\r\n\t\tthrows IOException\r\n\t{\r\n\t\t\t\t\t\t\t\t//\tGet the file to check for non-standard\r\n\t\t\t\t\t\t\t\t//\tspellings.\r\n\r\n\t\tif ( args.length == 0 )\r\n\t\t{\r\n\t\t\tSystem.out.println( \"Usage: MergeSpellingData \" +\r\n\t\t\t\t\"combinedoutput spellinginput1 spellinginput2 ...\" );\r\n\t\t\tSystem.out.println( \"\" );\r\n\r\n\t\t\tSystem.out.println( \" -- combinedoutput is name of \" +\r\n\t\t\t\t\t\t\t\t\"file to received combined \" +\r\n\t\t\t\t\t\t\t\t\"alternate/standard spellings\" );\r\n\r\n\t\t\tSystem.out.println( \" -- spellinginput1 ... are names of \" +\r\n\t\t\t\t\t\t\t\t\" files containing alternative spellings \" +\r\n\t\t\t\t\t\t\t\t\"mapped to standard spellings.\" );\r\n\t\t\tSystem.exit( 1 );\r\n\t\t}\r\n\t\t\t\t\t\t\t\t//\tGet output file name.\r\n\r\n\t\tString spellingDataOutputFileName\t= args[ 0 ];\r\n\r\n\t\t\t\t\t\t\t\t//\tCreate combined map of alternate\r\n\t\t\t\t\t\t\t\t//\tspellings to standard spellings from\r\n\t\t\t\t\t\t\t\t//\teach input file.\r\n\r\n\t\tMap<String, String> alternateSpellings\t=\r\n\t\t\tnew TreeMap<String, String>();\r\n\r\n\t\tSet<String> standardSpellings\t= SetFactory.createNewSet();\r\n\r\n\t\tfor ( int i = 1 ; i < args.length ; i++ )\r\n\t\t{\r\n\t\t\tString altSpellingsFileName\t= args[ i ];\r\n\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tgetAlternateSpellings\r\n\t\t\t\t(\r\n\t\t\t\t\tnew BufferedReader\r\n\t\t\t\t\t(\r\n\t\t\t\t\t\tnew UnicodeReader\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\t\tnew FileInputStream( altSpellingsFileName ) ,\r\n\t\t\t\t\t\t\t\"utf-8\"\r\n\t\t\t\t\t\t)\r\n\t\t\t\t\t) ,\r\n\t\t\t\t\talternateSpellings ,\r\n\t\t\t\t\tstandardSpellings\r\n\t\t\t\t);\r\n\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Merged alternate spellings from \" +\r\n\t\t\t\t\taltSpellingsFileName );\r\n \t}\r\n\t catch ( Exception e )\r\n \t {\r\n \t\te.printStackTrace();\r\n\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Unable to load alternate spellings from \" +\r\n\t\t\t\t\taltSpellingsFileName + \".\" );\r\n\r\n\t\t\t\tSystem.exit( 1 );\r\n \t}\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\r\n\t\t\t\"There are \" + alternateSpellings.size() +\r\n\t\t\t\" alternate spellings.\" );\r\n\r\n\t\tSystem.out.println(\r\n\t\t\t\"There are \" + standardSpellings.size() +\r\n\t\t\t\" standard spellings.\" );\r\n\r\n\t\t\t\t\t\t\t\t//\tOutput the map of alternate to\r\n\t\t\t\t\t\t\t\t//\tstandard spellings.\r\n\r\n\t\tAdornedWordOutputter outputter\t=\tnull;\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\toutputter\t=\r\n\t\t\t\tnew PrintStreamAdornedWordOutputter();\r\n\r\n\t\t\toutputter.createOutputFile\r\n\t\t\t(\r\n\t\t\t\tspellingDataOutputFileName , \"utf-8\" , '\\t'\r\n\t\t\t);\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\"Unable to open output file \" +\r\n\t\t\t\tspellingDataOutputFileName + \" .\" );\r\n\r\n\t\t\tSystem.exit( 1 );\r\n\t\t}\r\n\r\n\t\tfor ( String alternateSpelling : alternateSpellings.keySet() )\r\n\t\t{\r\n\t\t\tString standardSpelling\t\t=\r\n\t\t\t\talternateSpellings.get( alternateSpelling );\r\n\r\n\t\t\toutputter.outputWordAndAdornments\r\n\t\t\t(\r\n\t\t\t\tnew String[]{ alternateSpelling , standardSpelling }\r\n\t\t\t);\r\n\t\t}\r\n\t\t\t\t\t\t\t\t//\tClose output file.\r\n\t\toutputter.close();\r\n\t}", "public void printFilesIn(String word){\n System.out.println(\"\\nThe word \" + word + \" is in the following files: \");\n for (String s : hashWords.keySet()){\n if (s.equals(word)){\n ArrayList wordAndFiles = hashWords.get(s);\n for (int i=0; i< wordAndFiles.size(); i++){\n System.out.println(wordAndFiles.get(i));\n }\n }\n }\n }", "public static void main(String arg[]) {\n \tFile wordListFile = new File(\"WordList.txt\");\r\n \tFile definitionsFile = new File (\"DefinitionsAndSentences.txt\"); \t\r\n \tFile outputFile = new File (\"debug.txt\"); \r\n \t\r\n \tInputStream inputStreamOne;\r\n \tInputStreamReader readerOne;\r\n \tBufferedReader binOne;\r\n \t\r\n \tInputStream inputStreamTwo;\r\n \tInputStreamReader readerTwo;\r\n \tBufferedReader binTwo;\r\n \t\r\n \tOutputStream outputStream;\r\n \tOutputStreamWriter writerTwo;\r\n \tBufferedWriter binThree;\r\n \t \t\r\n \t\r\n \t// Lists to store data to write to database\r\n \tArrayList<TermItem>databaseTermList = new ArrayList<TermItem>();\r\n \tArrayList<DefinitionItem>databaseDefinitionList = new ArrayList<DefinitionItem>();\r\n \tArrayList<SentenceItem>databaseSampleSentenceList = new ArrayList<SentenceItem>();\r\n \t\r\n \t// Create instance to use in main()\r\n \tDictionaryParserThree myInstance = new DictionaryParserThree();\r\n \t\r\n \tint totalTermCounter = 1;\r\n \tint totalDefinitionCounter = 1;\r\n\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tmyInstance.createDatabase();\r\n\t\t\t// Open streams for reading data from both files\r\n\t\t\tinputStreamOne = new FileInputStream(wordListFile);\r\n\t \treaderOne= new InputStreamReader(inputStreamOne);\r\n\t \tbinOne= new BufferedReader(readerOne);\r\n\t \t\r\n\t \tinputStreamTwo = new FileInputStream(definitionsFile);\r\n\t \treaderTwo= new InputStreamReader(inputStreamTwo);\r\n\t \tbinTwo= new BufferedReader(readerTwo);\r\n\t \t\r\n\t \toutputStream = new FileOutputStream(outputFile);\r\n\t \twriterTwo= new OutputStreamWriter(outputStream);\r\n\t \tbinThree= new BufferedWriter(writerTwo);\r\n\r\n\t \tString inputLineTwo;\r\n\t \tString termArray[] = new String[NUM_SEARCH_TERMS];\r\n\t \t\r\n\t \t// Populate string array with all definitions.\r\n\t \tfor (int i = 0; (inputLineTwo = binTwo.readLine()) != null; i++) {\r\n\t\t \t termArray[i] = inputLineTwo; \r\n\t \t}\t \t\r\n\t \t\r\n\t \t// Read each line from the input file (contains top gutenberg words to be used)\r\n\t \tString inputLineOne;\r\n\t \tint gutenbergCounter = 0;\r\n\t \twhile ((inputLineOne = binOne.readLine()) != null) {\r\n\t \t\t\r\n\t \t\t\r\n\t \t\t// Each line contains three or four words. Grab each word inside double brackets.\r\n\t\t \tString[] splitString = (inputLineOne.split(\"\\\\[\\\\[\")); \t\t \t\r\n\t \t\tfor (String stringSegment : splitString) {\r\n\t \t\t\t\r\n\t \t\t\tif (stringSegment.matches((\".*\\\\]\\\\].*\")))\r\n\t \t\t\t{\r\n\t \t\t\t\t// Increment counter to track Gutenberg rating (already from lowest to highest)\r\n\t \t\t\t\tgutenbergCounter++;\r\n\t \t \t\t\r\n\t \t\t\t\tboolean isCurrentTermSearchComplete = false;\r\n\t \t\t \tint lowerIndex = 0;\r\n\t \t\t \tint upperIndex = NUM_SEARCH_TERMS - 1;\r\n\t \t\t \t\r\n\t \t\t \tString searchTermOne = stringSegment.substring(0, stringSegment.indexOf(\"]]\"));\r\n\t \t\t \tsearchTermOne = searchTermOne.substring(0, 1).toUpperCase() + searchTermOne.substring(1);\r\n\t \t\t \t\r\n\t \t\t\t\twhile (!isCurrentTermSearchComplete) {\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// Go to halfway point of lowerIndex and upperIndex.\r\n\t \t\t\t\t\tString temp = termArray[(lowerIndex + upperIndex)/2];\r\n\t \t\t\t\t\tString currentTerm = temp.substring(temp.indexOf(\"<h1>\") + 4, temp.indexOf(\"</h1>\"));\r\n\t \t\t\t\t\t\t \t\t\t\t\t\r\n\t \t \t \t\t\t\t\t\r\n\t \t\t\t\t\t// If definition term is lexicographically lower, need to increase lower Index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If definition term is lexicographically higher, need decrease upper index\r\n\t \t\t\t\t\t// and search higher.\r\n\t \t\t\t\t\t// If a match is found, need to find first definition, and record each definition\r\n\t \t\t\t\t\t// in case of duplicates.\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\tif (currentTerm.compareTo(searchTermOne) < 0) {\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\tlowerIndex = (lowerIndex + upperIndex)/2;\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\telse if (currentTerm.compareTo(searchTermOne) > 0) {\r\n\t \t\t\t\t\t\tupperIndex = (lowerIndex + upperIndex)/2; \t\t\t\t\t\t\r\n\t \t\t\t\t\t} \t\t\t\t\t\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\telse {\t\r\n\t \t\t\t\t\t\t// Backtrack row-by-row until we reach the first term in the set. Once we reach the beginning,\r\n\t \t\t\t\t\t\t// cycle through each match in the set and obtain each definition until we reach the an unmatching term.\r\n\r\n\t \t\t\t\t\t\t//else {\r\n\t \t\t\t\t\t\t\tSystem.out.println(searchTermOne);\r\n\t\t \t\t\t\t\t\tint k = (lowerIndex + upperIndex)/2;\r\n\t\t \t\t\t\t\t\tboolean shouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\tif (k <= 0 || k >= NUM_SEARCH_TERMS) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString previous = termArray[k - 1].substring(termArray[k - 1].indexOf(\"<h1>\") + 4, termArray[k - 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\t\r\n\t\t\t\t \t\t\t\t\t\tif (current.compareTo(previous) == 0) {\t\t\t\r\n\t\t\t\t \t\t\t\t\t\t\tk--;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t\t \t\t\t\t\telse {\r\n\t\t\t\t\t \t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t\t \t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t\t}\r\n\t\t \t\t\t\t\t\t} \r\n\t\t \t\t\t\t\t\tshouldIterateAgain = true;\r\n\t\t \t\t\t\t\t\twhile (shouldIterateAgain) {\r\n\t\t \t\t\t\t\t\t\t\t\t \t\r\n\t\t \t\t\t\t\t\t\t// Used to store data to later pass to DB\r\n\t\t \t\t\t\t\t DictionaryParserThree.TermItem tempTermItem = myInstance.new TermItem();\r\n\r\n\t\t \t\t\t\t\t // Determine unique ID (which will be written to DB later)\r\n\t\t \t\t\t\t\t // Add current term and gutenberg rating.\r\n\t\t \t\t\t\t\t tempTermItem.ID = totalTermCounter;\t\t \t\t\t\t\t \t \t\t\t\t\t \r\n\t\t \t\t\t\t\t \ttempTermItem.theWord = searchTermOne; // same as termArray[k]'s term\r\n\t\t \t\t\t\t\t \r\n\t\t \t\t\t\t\t\t\ttempTermItem.gutenbergRating = gutenbergCounter;\r\n\t\t \t\t\t\t\t\t\tdatabaseTermList.add(tempTermItem);\r\n\t\t \t\t\t\t\t\t\tbinThree.write(\"Term ID \" + tempTermItem.ID + \" \" + tempTermItem.theWord + \" guten rank is \" + tempTermItem.gutenbergRating);\r\n\t\t \t\t\t\t\t\t\tbinThree.newLine();\t\t\t\t\t\t\t\r\n\t\t \t\t\t\t \t\tsplitString = termArray[k].split(\"<def>\");\r\n\t\t \t\t\t\t \t\t\r\n\t\t \t\t\t\t \t\tint m = 0;\r\n\t \t\t\t\t\t \t\tfor (String stringSegment2 : splitString) {\r\n\t \t\t\t\t\t \t\t\tif (stringSegment2.matches(\".*</def>.*\") && m > 0) {\r\n\t \t\t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t\t\t// Determine unique ID (which will be written to DB later)\r\n\t \t\t\t\t\t \t\t\t\t// Add definition, as well as term ID it is associated with.\r\n\t \t\t\t\t\t \t\t\t\tDictionaryParserThree.DefinitionItem tempDefinitionItem = myInstance.new DefinitionItem();\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.ID = totalDefinitionCounter;\r\n\t \t\t\t\t\t \t\t\t\ttempDefinitionItem.theDefinition = stringSegment2.substring(0, stringSegment2.indexOf(\"</def>\"));\r\n\t \t\t\t\t\t\t \t\t\ttempDefinitionItem.termID = totalTermCounter;\r\n\t \t\t\t\t\t\t \t\t\tdatabaseDefinitionList.add(tempDefinitionItem);\r\n\r\n\t \t\t\t\t\t\t \t\t\tint n = 0;\r\n\t \t\t\t\t\t\t \t\t\tString[] splitString2 = (stringSegment2.split(\"<blockquote>\")); \r\n\t \t \t\t\t\t\t \t\tfor (String stringSegment3 : splitString2) {\r\n\t \t \t\t\t\t\t \t\t\tif (stringSegment3.matches(\".*</blockquote>.*\") && n > 0) {\r\n\t \t \t\t\t\t\t \t\t\t\t// Add data which will be added to DB later.\r\n\t \t \t\t\t\t\t \t\t\t\t// Add sample sentence as well as the definition ID it is associated with.\r\n\t \t \t\t\t\t\t \t\t\t\tDictionaryParserThree.SentenceItem tempSentenceItem = myInstance.new SentenceItem();\t\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.definitionID = totalDefinitionCounter;\r\n\t \t \t\t\t\t\t \t\t\t\ttempSentenceItem.theSampleSentence = stringSegment3.substring(0, stringSegment3.indexOf(\"</blockquote>\"));\r\n\t \t \t\t\t\t\t \t\t\t\tdatabaseSampleSentenceList.add(tempSentenceItem);\t \t \t\t\t\t\t \t\t\t\t\r\n\t \t \t \t\t\t\t\t \t\t\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\"Definition is\" + tempDefinitionItem.theDefinition);\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.newLine();\r\n\t \t \t\t\t\t\t \t\t\t\tbinThree.write(\" and sample sentence is \" + tempSentenceItem.theSampleSentence);\r\n\t \t \t\t \t\t\t\t\t\t\tbinThree.newLine();\t\r\n\t \t \t\t\t\t\t \t\t\t}\r\n\t \t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's sample sentence)\r\n\t \t \t\t\t\t\t \t\t\tn++;\r\n\t \t \t\t\t\t\t \t\t}\r\n\t \t \t\t\t\t\t \t\ttotalDefinitionCounter++;\r\n\t \t\t\t\t\t \t\t\t}\r\n\t \t\t\t\t\t \t\t\t// Increment counter for split string (for this line's definition)\r\n\t \t\t\t\t \t\t\t\tm++;\r\n\t \t\t\t\t \t\t\t\t\r\n\t \t\t\t\t\t \t\t}\t \t \t\t\t\t\t \t\t\r\n\t \t\t\t\t\t \t\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\ttotalTermCounter++;\r\n\t\t \t\t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\t\t// Compare next definition and see if duplicate exists.\r\n\t\t \t\t\t\t\t\t\t// If so, add to string array.\r\n\t \t\t\t\t\t \t\tif (k < 0 || k >= NUM_SEARCH_TERMS - 1) {\r\n\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\telse { \t \t\t\t\t\t \t\t\r\n\t\t\t \t\t\t\t\t\t\tString current = termArray[k].substring(termArray[k].indexOf(\"<h1>\") + 4, termArray[k].indexOf(\"</h1>\"));\r\n\t\t\t\t \t\t\t\t\t\tString next = termArray[k + 1].substring(termArray[k + 1].indexOf(\"<h1>\") + 4, termArray[k + 1].indexOf(\"</h1>\"));\r\n\t\t\t\t\t \t\t\t\t\tif (current.compareTo(next) == 0) {\t\r\n\t\t\t\t \t\t\t\t\t\t\tk++;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t\t\t\t \t\t\t\t\t\telse {\r\n\t\t\t\t \t\t\t\t\t\t\tshouldIterateAgain = false;\r\n\t\t\t\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t \t\t}\r\n\t\t\t \t\t\t\t\t\t//}\t \t\t\t\t\t\t\r\n\t\t \t\t\t\t\t\tisCurrentTermSearchComplete = true;\r\n\t\t \t\t\t\t\t\t\r\n\t \t\t\t\t\t\t}\r\n\t \t\t\t\t\t}\r\n\t \t\t\t\t\t\r\n\t \t\t\t\t\t// If the term does not exist in the database.\r\n\t \t\t\t\t\tif (Math.abs(upperIndex) - Math.abs(lowerIndex) <= 1)\r\n\t \t\t\t\t\t{\r\n \t\t\t\t\t\t\t isCurrentTermSearchComplete = true;\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 \t\t\r\n\t \t}\r\n\t \t\r\n\t \t \t\r\n\t \tSystem.out.println(\"ended search.\");\t\r\n\t \tmyInstance.writeAllItemsToDatabase(databaseTermList, databaseDefinitionList, databaseSampleSentenceList);\t\r\n\t \tSystem.out.println(\"ended write.\");\r\n\t \t\r\n\t \tbinOne.close();\r\n\t \treaderOne.close();\r\n\t \tinputStreamOne.close();\t \t\r\n\t \t\r\n\t \tbinTwo.close();\r\n\t \treaderTwo.close();\r\n\t \tinputStreamTwo.close();\t \t\r\n\t \t\r\n\t \tbinThree.close(); \r\n\t \twriterTwo.close();\r\n\t \toutputStream.close();\r\n\t \tSystem.exit(0);\r\n\r\n\r\n\t \t\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t} \t\r\n }", "public static void main(String [] args){\n\t\t String zipFilePath = args[1];\n\t\t //Directory of unzip Files\n\t\t String destDir = \"Dictionary\";\n\t\t //Calling a functions 5to unzip the directory\n\t\t unzip(zipFilePath, destDir);\n\t\t \n\n\t\t// The name of the file to open. File to be passed from arguments\n String fileName = args[0];\t\t\n\n // This will reference one line at a time\n String line = null;\n\n try {\n // FileReader reads text files in the default encoding.\n FileReader fileReader = \n new FileReader(fileName);\n\n // Always wrap FileReader in BufferedReader.\n BufferedReader bufferedReader = \n new BufferedReader(fileReader);\n\t\t\t\tint count = 0;\t\t\t\t\t\t//For counting how many words are wrong\n while((line = bufferedReader.readLine()) != null) {\n String[] words = line.split(\"\\\\W\");\t\t\t\t//Keeps the words in a line the the array \n int len = words.length;\n for(int i=0;i<len;i++){\n \t//System.out.println(words[i]);\n \tint flag = 0; \t\t\t\t//Just to check whether the words present or not\n \t//System.out.println(\"HI I am reading the file.\");\n \tFile folder = new File(\"Dictionary/dictionaries\");\n\t\t\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\t\t//System.out.println(listOfFiles.length);\n\t\t\t\t\tfor (int i1 = 0; i1 < listOfFiles.length; i1++) {\n\t\t\t\t\t\tif(flag == 1)\n\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 File file = listOfFiles[i1];\n\t\t\t\t\t if (file.isFile()) {\n\t\t\t\t\t\t//I am checking\n\t\t\t\t\t\t // The name of the file to open.\n //String fileName1 = file;\n\n // This will reference one line at a time\n //String line1 = null;\n\t\t\tScanner myScanner = null;\t\t\t\t//Using Scanner Class to Read the words From file\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tmyScanner = new Scanner(file);\n\t\t\t\t\twhile(myScanner.hasNextLine()){\n \t\t\t\t\tif(flag==1){\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\tString contents=myScanner.nextLine();\n \t\t\t\t\t//...\n\t\t\t\t\t\tif(words[i].equalsIgnoreCase(contents)){\n\t\t\t\t\t\t//System.out.println(\"The given word is \" + words[i]);\n\t\t\t\t\t\tflag = 1;\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//String contents = myScanner.nextLine();\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\tfinally\n\t\t\t\t{\n\t\t\t\t\tif(myScanner != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tmyScanner.close(); \n\t\t\t\t\t}\n\t\t\t\t}\n \n\t\t\t\t\t } \n\t\t\t\t\t}\n\t\t\t\t\tif(flag==0){\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t\tSystem.out.println(\"The wrong word is \" + words[i]);\n\t\t\t\t\t\t//System.out.println(i+1);\n\t\t\t\t\t}\n }\n //System.out.println(line);\n } \n\n // Always close files.\n bufferedReader.close(); \n System.out.println(\"The total number of wrong words are \");\n System.out.println(count);\n \n }\n catch(FileNotFoundException ex) {\n System.out.println(\n \"Unable to open file '\" + \n fileName + \"'\"); \n }\n catch(IOException ex) {\n System.out.println(\n \"Error reading file '\" \n + fileName + \"'\"); \n // Or we could just do this: \n // ex.printStackTrace();\n }\n \t}", "public static void main(String[] args) {\n \n // Check the command-line syntax. Prints errors if needed\n if (args.length > 3 || args.length < 2) {\n System.err.println(\"Usage for Word Ladders: java WordGames ladder startWord endWord\");\n System.err.println(\"Usage for Anagrams: java WordGames anagram string\");\n System.exit(1);\n }\n \n String word = \"\";\n String startWord = \"\";\n String endWord = \"\";\n File inputFile = null;\n Scanner scanner = null;\n String gameType = args[0];\n \n //Reads the given dictionary file\n inputFile = new File(\"dictionary.txt\");\n try {\n scanner = new Scanner(inputFile);\n } catch (FileNotFoundException e) {\n System.err.println(e);\n System.exit(1);\n }\n \n //Puts all the words in the dictionary file into an ArrayList\n ArrayList<String> dictionary = new ArrayList<String>();\n while (scanner.hasNextLine()){\n String line = scanner.nextLine().toLowerCase();\n line.replace(\"/n\", \"\");\n String[] thisLine = line.split(\" \");\n ArrayList<String> listLine = new ArrayList<String>(Arrays.asList(thisLine));\n //Adds every word in the line into the array list\n for (int i = 0; i < listLine.size(); i++){\n dictionary.add(listLine.get(i));\n }\n }\n scanner.close();\n \n //Runs if the user wants anagrams\n ArrayList<String> anagramList = new ArrayList<String>();\n if (gameType.equals(\"anagram\")){\n word = args[1];\n Anagram anagramMaker = new Anagram();\n anagramMaker.makeAnagrams(\"\", word, anagramList);\n //Print out all the combos that are valid words\n System.out.println(\"*** ANAGRAMS ***\");\n for (int i = 0; i < anagramList.size(); i++){\n String wordToCheck = anagramList.get(i);\n //Only prints the word if it is a valid word in the dictionary\n if (dictionary.contains(wordToCheck)){\n System.out.println(anagramList.get(i)); \n }\n } \n }\n //Runs if the user wants word ladders\n ArrayList<String> ladderDictionary = new ArrayList<String>();\n WordLadderGraph finalGraph = new WordLadderGraph();\n if (gameType.equals(\"ladder\")){\n startWord = args[1];\n endWord = args[2];\n //Checks to make sure the start and end words are the same length\n int target = startWord.length();\n int secondLength = endWord.length(); \n if (target != secondLength){\n System.err.println(\"Error in word selection. Please make sure the\"\n + \" words are the same length.\");\n System.exit(1);\n }\n //Checks to make sure the start word is a valid word\n if (!dictionary.contains(startWord)) {\n System.err.println(\"Start word is not in dictionary.\");\n System.exit(1);\n }\n //Checks to make sure the end word is a valid word\n if (!dictionary.contains(endWord)) {\n System.err.println(\"End word is not in dictionary.\");\n System.exit(1);\n }\n //Adds all words of appropriate size into a new list\n for (int i = 0; i < dictionary.size(); i++){\n if (dictionary.get(i).length() == target){\n ladderDictionary.add(dictionary.get(i));\n }\n }\n //Calls the makeGraph function to print the word ladder\n finalGraph.makeGraph(ladderDictionary, startWord, endWord);\n }\n }", "public static void processFile(String inputpath, String outputpath)\r\n\t{\r\n\t\ttry {\r\n\t\t\t//create both files\r\n\t\t\tFile input = new File(inputpath);\r\n\t\t\tFile output = new File(outputpath);\r\n\t\t\t//read over the input file and put the results in the output file\r\n\t\t\tFileWriter fw = new FileWriter(output); \r\n\t\t\tScanner scan = new Scanner(input);\r\n\t\t\twhile(scan.hasNextLine()) {\r\n\t\t\t\tString word = scan.nextLine();\r\n\t\t\t\t//this looks for the word in the data structure.\r\n\t\t\t\t//If it exists, it writes it in the output file\r\n\t\t\t\tif(data.search(word)) {\r\n\t\t\t\t\tfw.write(word);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//If not, it gets the suggestions\r\n\t\t\t\t\tList<String> suggestions = data.suggest(word);\r\n\t\t\t\t\tif(suggestions.size() == 0) {\r\n\t\t\t\t\t\tfw.write(\"There are no suggestions for \"+ word + \".\");\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tString sugg = \"\";\r\n\t\t\t\t\t\tfor(String s : suggestions) {\r\n\t\t\t\t\t\t\tsugg += s +\" \";\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tfw.write(sugg);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tfw.write(\"\\r\\n\"); //this adds a new line\r\n\t\t\t}\r\n\t\t\tfw.close(); \r\n\t\t\tscan.close(); \r\n\t\t} catch (Exception e) {\r\n\t\t\t//If any exception, an error is printed \r\n\t\t\tSystem.out.println(\"Error reading or writing the files\");\r\n\t\t}\r\n\t\t\r\n\t}", "private void upgradeDictionary() throws IOException {\n File fileAnnotation = new File(filePathAnnSource);\n FileReader fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n\n if (fileAnnotation.exists()) {\n while ((line = br.readLine()) != null) {\n String[] annotations = line.split(\"[ \\t]\");\n String word = line.substring(line.lastIndexOf(\"\\t\") + 1);\n\n if (!nonDictionaryTerms.contains(word.toLowerCase())) {\n if (dictionaryTerms.containsKey(word.toLowerCase())) {\n if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n System.out.println(\"Conflict: word:: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n nonDictionaryTerms.add(word.toLowerCase());\n// removeLineFile(dictionaryTerms.get(word.toLowerCase())+\" \"+word.toLowerCase(),filePathDictionaryAuto);\n dictionaryTerms.remove(word.toLowerCase());\n writePrintStream(word, filePathNonDictionaryAuto);\n }\n } else {\n System.out.println(\"Updating Dictionary:: Word: \" + word + \"\\tTag: \" + annotations[1]);\n dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n writePrintStream(annotations[1] + \" \" + word.toLowerCase(), filePathDictionaryAuto);\n }\n }\n\n// if (dictionaryTerms.containsKey(word.toLowerCase())) {\n// if (!dictionaryTerms.get(word.toLowerCase()).equalsIgnoreCase(annotations[1])) {\n// System.out.println(\"Conflict: word: \" + word + \" Dictionary Tag: \" + dictionaryTerms.get(word.toLowerCase()) + \" New Tag: \" + annotations[1]);\n// nonDictionaryTerms.add(word.toLowerCase());\n//\n// }\n// } else {\n// dictionary.add(word.toLowerCase());\n// dictionaryTerms.put(word.toLowerCase(), annotations[1]);\n// System.out.println(\"Updating Dictionary: Word: \" + word + \"\\tTag: \" + annotations[1]);\n// }\n }\n }\n\n\n br.close();\n fr.close();\n }", "protected static void searchForSentence(String searchedUserInput,\n HashMap<String, HashMap<String, LinkedList<Integer>>> contentOfFiles) {\n wordsOfSearchedSentence = Util.createWords(searchedUserInput);\n short percentage;\n for(String fileName : contentOfFiles.keySet()) {\n HashMap<String, LinkedList<Integer>> fileContent = contentOfFiles.get(fileName);\n percentage = getPercentage(fileContent);\n System.out.println(fileName + \":%\" + percentage);\n }\n }", "public void dictionaryAdvanced() {\n dictionaryManagement.insertFromFile();\n showAllWords();\n dictionaryManagement.dictionaryLookup();\n dictionaryManagement.removeWord(\"Before\");\n showAllWords();\n dictionaryManagement.dictionaryExportToFile();\n }", "public static void doDictionaryEditMode(String[] args) throws FileNotFoundException {\r\n\t\tif (args.length == 0) {\r\n\t\t\tdoUsage();\r\n\t\t\tSystem.exit(-1);\r\n\t\t}\r\n\t\tString testDictionary = args[1];\r\n\t\tFile f = new File(testDictionary);\r\n\t\tString name = f.getName();\r\n\t\tString newname = name + \"~\";\r\n\t\tFile newFile = new File(newname);\r\n\r\n\t\tDictionary dic;\r\n\t\ttry {\r\n\t\t\tdic = new Dictionary(testDictionary);\r\n\t\t\tBinarySearchTree<Entry> oldtree = dic.getBST();\r\n\t\t\tDictionary olddic = new Dictionary(oldtree);\r\n\t\t\tSystem.out.println(\"Editing dictionary.txt\");\r\n\t\t\tSystem.out.printf(\"Word: \");\r\n\t\t\tScanner in = new Scanner(System.in);\r\n\t\t\tString input = in.next();\r\n\t\t\toutloop:\r\n\t\t\t// the case to exit the program\r\n\t\t\twhile (!input.equals(\"!quit\")) {\r\n\t\t\t\t// check whether the input is valid\r\n\t\t\t\tif (!isValidWord(input)) {\r\n\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \" is not valid. Please enter a valid word\");\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (dic.hasWord(input)) {\r\n\t\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \"was found\");\r\n\t\t\t\t\t\tSystem.out.printf(\"[r]emove/[g]et the definition/[c]hange definition/do [n]othing: \");\r\n\t\t\t\t\t\tScanner in2 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input2 = in2.next();\r\n\t\t\t\t\t\t// the case of get definition\r\n\t\t\t\t\t\tif (input2.equals(\"g\")) {\r\n\t\t\t\t\t\t\tif (dic.getDefinitionOf(input) == null)\r\n\t\t\t\t\t\t\t\tSystem.out.println(\"<undefined>\");\r\n\t\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t\tSystem.out.println(dic.getDefinitionOf(input));\r\n\t\t\t\t\t\t\t// the case of change definition\r\n\t\t\t\t\t\t} else if (input2.equals(\"c\")) {\r\n\t\t\t\t\t\t\tScanner in3 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tSystem.out.printf(\"Definition: \");\r\n\t\t\t\t\t\t\tin3.useDelimiter(\"\\n\");\r\n\t\t\t\t\t\t\tString input3 = in3.next();\r\n\r\n\t\t\t\t\t\t\t// in3.close();\r\n\t\t\t\t\t\t\tdic.updateEntry(input, input3);\r\n\t\t\t\t\t\t\t// the case of remove the word\r\n\t\t\t\t\t\t} else if (input2.equals(\"r\")) {\r\n\t\t\t\t\t\t\tdic.removeEntry(input);\r\n\t\t\t\t\t\t} else if (input2.equals(\"n\")) {\r\n\t\t\t\t\t\t\t// do nothing\r\n\t\t\t\t\t\t} else if (input2.equals(\"!quit\"))\r\n\t\t\t\t\t\t\tbreak outloop;\r\n\t\t\t\t\t\t// if the input is not in dictionary\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"'\" + input + \"'\" + \"not found\");\r\n\t\t\t\t\t\tSystem.out.printf(\"[a]dd/add with [d]efinition/[n]othing: \");\r\n\t\t\t\t\t\tScanner in4 = new Scanner(System.in);\r\n\t\t\t\t\t\tString input4 = in4.next();\r\n\t\t\t\t\t\t// the case of add new word\r\n\t\t\t\t\t\tif (input4.equals(\"a\"))\r\n\t\t\t\t\t\t\tdic.addEntry(input);\r\n\t\t\t\t\t\t// the case of get definition\r\n\t\t\t\t\t\telse if (input4.equals(\"d\")) {\r\n\t\t\t\t\t\t\tSystem.out.printf(\"Definition: \");\r\n\t\t\t\t\t\t\tScanner in5 = new Scanner(System.in);\r\n\t\t\t\t\t\t\tString input5 = in5.next();\r\n\t\t\t\t\t\t\tdic.addEntry(input4, input5);\r\n\t\t\t\t\t\t\t// the case of doing nothing\r\n\t\t\t\t\t\t} else if (input4.equals(\"n\")) {\r\n\t\t\t\t\t\t} else if (input4.equals(\"!quit\"))\r\n\t\t\t\t\t\t\tbreak outloop;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.printf(\"Word: \");\r\n\t\t\t\tinput = in.next();\r\n\t\t\t}\r\n\t\t\tin.close();\r\n\t\t\t// update in the new File and add~ into the old File\r\n\t\t\tolddic.printToFile(newFile.getName());\r\n\t\t\tdic.printToFile(testDictionary);\r\n\t\t\tSystem.exit(0);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\t\tString newline = System.lineSeparator();\n\t\tFileReader fr = new FileReader(\"dictonary_english_special.txt\");\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\tString holder = \"\";\n\t\tString temp;\n\t\twhile(true){\n\t\t\ttry {\n\t\t\t\ttemp = br.readLine();\n\t\t\t\tif(temp == null)\n\t\t\t\t\tbreak;\n\t\t\t\tif(temp.length() < 4)\n\t\t\t\t\tcontinue;\n\t\t\t\t//System.out.println(temp);\n\t\t\t\tholder += temp + newline;\n\t\t\t} catch (IOException e) {break;}\n\t\t}\n\t\t\tFileWriter fw;\n\t\t\ttry {\n\t\t\t\tfw = new FileWriter(\"dictonary_english_hangman.txt\");\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\tbw.write(holder);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"Done!\");\n\t}", "public static void main(String[] args) throws Exception \n\t{\n\t\tList<String> stopWords = new ArrayList<String>();\n\t\tstopWords = stopWordsCreation();\n\n\n\t\t\n\t\tHashMap<Integer, String> hmap = new HashMap<Integer, String>();\t//Used in tittle, all terms are unique, and any dups become \" \"\n\t\n\t\t\n\t\tList<String> uniqueTerms = new ArrayList<String>();\n\t\tList<String> allTerms = new ArrayList<String>();\n\t\t\t\t\n\t\t\n\t\tHashMap<Integer, String> hmap2 = new HashMap<Integer, String>();\n\t\tHashMap<Integer, String> allValues = new HashMap<Integer, String>();\n\t\tHashMap<Integer, Double> docNorms = new HashMap<Integer, Double>();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tMap<Integer, List<String>> postingsFileListAllWords = new HashMap<>();\t\t\n\t\tMap<Integer, List<String>> postingsFileList = new HashMap<>();\n\t\t\n\t\tMap<Integer, List<StringBuilder>> docAndTitles = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAbstract = new HashMap<>();\n\t\tMap<Integer, List<StringBuilder>> docAndAuthors = new HashMap<>();\n\t\t\n\t\t\n\t\tMap<Integer, List<Double>> termWeights = new HashMap<>();\n\t\t\n\t\tList<Integer> docTermCountList = new ArrayList<Integer>();\n\t\t\n\t\tBufferedReader br = null;\n\t\tFileReader fr = null;\n\t\tString sCurrentLine;\n\n\t\tint documentCount = 0;\n\t\tint documentFound = 0;\n\t\tint articleNew = 0;\n\t\tint docTermCount = 0;\n\t\t\n\t\t\n\t\tboolean abstractReached = false;\n\n\t\ttry {\n\t\t\tfr = new FileReader(FILENAME);\n\t\t\tbr = new BufferedReader(fr);\n\n\t\t\t// Continues to get 1 line from document until it reaches the end of EVERY doc\n\t\t\twhile ((sCurrentLine = br.readLine()) != null) \n\t\t\t{\n\t\t\t\t// sCurrentLine now contains the 1 line from the document\n\n\t\t\t\t// Take line and split each word and place them into array\n\t\t\t\tString[] arr = sCurrentLine.split(\" \");\n\n\n\t\t\t\t//Go through the entire array\n\t\t\t\tfor (String ss : arr) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t * This section takes the array and checks to see if it has reached a new\n\t\t\t\t\t * document or not. If the current line begins with an .I, then it knows that a\n\t\t\t\t\t * document has just started. If it incounters another .I, then it knows that a\n\t\t\t\t\t * new document has started.\n\t\t\t\t\t */\n\t\t\t\t\t//System.out.println(\"Before anything: \"+sCurrentLine);\n\t\t\t\t\tif (arr[0].equals(\".I\")) \n\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\tif (articleNew == 0) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 1;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t} \n\t\t\t\t\t\telse if (articleNew == 1) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tarticleNew = 0;\n\t\t\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t//System.out.println(documentFound);\n\t\t\t\t\t\t//count++;\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\t/* This section detects that after a document has entered,\n\t\t\t\t\t * it has to gather all the words contained in the title \n\t\t\t\t\t * section.\n\t\t\t\t\t */\n\t\t\t\t\tif (arr[0].equals(\".T\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndTitles.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder title = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".B|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\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\ttitle.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (String tittleWords : tittle)\n\t\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.toLowerCase();\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'*{}|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\ttittleWords = tittleWords.replaceAll(\"[-&^%'{}*|$+\\\\/\\\\?!<>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\t//System.out.println(tittleWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(tittleWords)) \n\t\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\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\tallTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, tittleWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(tittleWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(tittleWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(tittleWords);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\ttitle.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndTitles.get(documentFound).add(title);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (arr[0].equals(\".A\") ) \n\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t// Go to line UNDER .T since that is where tittle is located\n\t\t\t\t\t\t//sCurrentLine = br.readLine();\n\t\t\t\t\t\tdocAndAuthors.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\t\t\tStringBuilder author = new StringBuilder();\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\twhile ( !(sCurrentLine = br.readLine()).matches(\".N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/* In this section, there are 2 lists being made. One list\n\t\t\t\t\t\t\t * is for all the unique words in every title in the document (hmap).\n\t\t\t\t\t\t\t * Hmap contains all unique words, and anytime a duplicate word is \n\t\t\t\t\t\t\t * found, it is replaced with an empty space in the map.\n\t\t\t\t\t\t\t * All Values \n\t\t\t\t\t\t\t * \n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//postingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\t\t\t//postingsFileList.get(documentFound - 1).add(term2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"current line: \"+sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] tittle = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (tittle[0].equals(\".W\") )\n\t\t\t\t\t\t\t{\t\t\n\t\t\t\t\t\t\t\tabstractReached = true;\n\t\t\t\t\t\t\t\tbreak;\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\tauthor.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//docAndTitles.get(documentCount).add(\" \");\n\t\t\t\t\t\t\tauthor.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"Title: \"+title);\n\t\t\t\t\t\t//System.out.println(\"docAndTitles.get(documentCount+1): \" +docAndTitles.get(documentFound));\n\t\t\t\t\t\tdocAndAuthors.get(documentFound).add(author);\n\t\t\t\t\t\t//System.out.println(\"Done!: \"+ docAndTitles);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t/* Since there may or may not be an asbtract after\n\t\t\t\t\t * the title, we need to check what the next section\n\t\t\t\t\t * is. We know that every doc has a publication date,\n\t\t\t\t\t * so it can end there, but if there is no abstract,\n\t\t\t\t\t * then it will keep scanning until it reaches the publication\n\t\t\t\t\t * date. If abstract is empty (in tests), it will also finish instantly\n\t\t\t\t\t * since it's blank and goes straight to .B (the publishing date).\n\t\t\t\t\t * Works EXACTLY like Title \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\tif (abstractReached) \n\t\t\t\t\t{\t\n\t\t\t\t\t\t//System.out.println(\"\\n\");\n\t\t\t\t\t\t//System.out.println(\"REACHED ABSTRACT and current line is: \" +sCurrentLine);\n\t\t\t\t\t\tdocAndAbstract.put(documentFound, new ArrayList<StringBuilder>());\n\t\t\t\t\t\tStringBuilder totalAbstract = new StringBuilder();\n\t\t\t\t\t\t\n\t\t\t\t\t\twhile ( !(sCurrentLine = br.readLine()).matches(\".T|.I|.A|.N|.X|.K|.C\") )\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\tString[] abstaract = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tif (abstaract[0].equals(\".B\") )\n\t\t\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\t\t\tabstractReached = false;\n\t\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttotalAbstract.append(sCurrentLine);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tString[] misc = sCurrentLine.split(\" \");\n\t\t\t\t\t\t\tfor (String miscWords : misc) \n\t\t\t\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\tmiscWords = miscWords.toLowerCase(); \n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|?{}!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\tmiscWords = miscWords.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"\\\\d]\", \"\");\t\t\n\t\t\t\t\t\t\t\t//System.out.println(miscWords);\n\t\t\t\t\t\t\t\tif (hmap.containsValue(miscWords)) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, \" \");\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\n\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\telse \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallTerms.add(miscWords);\n\t\t\t\t\t\t\t\t\thmap.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tallValues.put(documentCount, miscWords);\n\t\t\t\t\t\t\t\t\tif (!(uniqueTerms.contains(miscWords)))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif ((stopWordsSetting && !(stopWords.contains(miscWords))))\n\t\t\t\t\t\t\t\t\t\t\tuniqueTerms.add(miscWords);\n\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\t\n\t\t\t\t\t\t\t\t\tdocumentCount++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\ttotalAbstract.append(\"\\n\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdocAndAbstract.get(documentFound).add(totalAbstract);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t//Once article is found, we enter all of of it's title and abstract terms \n\t\t\t\tif (articleNew == 0) \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tdocumentFound = documentFound - 1;\n\t\t\t\t\t//System.out.println(\"Words found in Doc: \" + documentFound);\n\t\t\t\t\t//System.out.println(\"Map is\" +allValues);\n\t\t\t\t\tSet set = hmap.entrySet();\n\t\t\t\t\tIterator iterator = set.iterator();\n\n\t\t\t\t\tSet set2 = allValues.entrySet();\n\t\t\t\t\tIterator iterator2 = set2.iterator();\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\t\t\twhile (iterator.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileList.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\tdocTermCount++;\n\t\t\t\t\t}\n\t\t\t\t\t// \"BEFORE its put in, this is what it looks like\" + hmap);\n\t\t\t\t\thmap2.putAll(hmap);\n\t\t\t\t\thmap.clear();\n\t\t\t\t\tarticleNew = 1;\n\n\t\t\t\t\tdocTermCountList.add(docTermCount);\n\t\t\t\t\tdocTermCount = 0;\n\n\t\t\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\t\t\tMap.Entry mentry2 = (Map.Entry) iterator2.next();\n\t\t\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t\t\t// );\n\t\t\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t\t\t// docTermCount++;\n\t\t\t\t\t}\n\n\t\t\t\t\tallValues.clear();\t\t\t\t\t\n\t\t\t\t\tdocumentFound = Integer.parseInt(arr[1]);\n\n\t\t\t\t\t// \"MEANWHILE THESE ARE ALL VALUES\" + postingsFileListAllWords);\n\n\t\t\t\t}\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Looking at final doc!\");\n\t\t\t//Final loop for last sets\n\t\t\tSet set = hmap.entrySet();\n\t\t\tIterator iterator = set.iterator();\n\n\t\t\tSet setA = allValues.entrySet();\n\t\t\tIterator iteratorA = setA.iterator();\n\t\t\tpostingsFileList.put(documentFound - 1, new ArrayList<String>());\n\t\t\tpostingsFileListAllWords.put(documentFound - 1, new ArrayList<String>());\n\t\t\twhile (iterator.hasNext()) {\n\t\t\t\tMap.Entry mentry = (Map.Entry) iterator.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value is: \" + mentry.getValue());\n\t\t\t\t// //);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\tString term2 = mentry.getValue().toString();\n\t\t\t\tpostingsFileList.get(documentFound - 1).add(term2);\n\n\t\t\t\tdocTermCount++;\n\t\t\t}\n\t\t\t//System.out.println(\"Done looking at final doc!\");\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Sorting time!\");\n\t\t\twhile (iteratorA.hasNext()) {\n\t\t\t\tMap.Entry mentry2 = (Map.Entry) iteratorA.next();\n\t\t\t\t// (\"key is: \"+ mentry.getKey() + \" & Value is: \" + mentry.getValue());\n\t\t\t\t// (\"Value2 is: \" + mentry2.getValue());\n\t\t\t\t// //);\n\t\t\t\tString term = mentry2.getValue().toString();\n\t\t\t\t// //\"This is going to be put in doc3: \"+ (documentFound-1));\n\t\t\t\tpostingsFileListAllWords.get(documentFound - 1).add(term);\n\t\t\t\t// if ( !((mentry.getValue()).equals(\" \")) )\n\t\t\t\t// docTermCount++;\n\t\t\t}\n\n\t\t\thmap2.putAll(hmap);\n\t\t\thmap.clear();\n\t\t\tdocTermCountList.add(docTermCount);\n\t\t\tdocTermCount = 0;\n\n\n\t\t\t\n\t\t\n\t\t\t// END OF LOOKING AT ALL DOCS\n\t\t\t\n\t\t\t//System.out.println(\"Docs and titles: \"+docAndTitles);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms);\n\t\t\tString[] sortedArray = allTerms.toArray(new String[0]);\n\t\t\tString[] sortedArrayUnique = uniqueTerms.toArray(new String[0]);\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t\n\t\t\tArrays.sort(sortedArray);\n\t\t\tArrays.sort(sortedArrayUnique);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//Sortings \n\t\t\tSet set3 = hmap2.entrySet();\n\t\t\tIterator iterator3 = set3.iterator();\n\n\t\t\t// Sorting the map\n\t\t\t//System.out.println(\"Before sorting \" +hmap2);\t\t\t\n\t\t\tMap<Integer, String> map = sortByValues(hmap2);\n\t\t\t//System.out.println(\"after sorting \" +map);\n\t\t\t// //\"After Sorting:\");\n\t\t\tSet set2 = map.entrySet();\n\t\t\tIterator iterator2 = set2.iterator();\n\t\t\tint docCount = 1;\n\t\t\twhile (iterator2.hasNext()) {\n\t\t\t\tMap.Entry me2 = (Map.Entry) iterator2.next();\n\t\t\t\t// (me2.getKey() + \": \");\n\t\t\t\t// //me2.getValue());\n\t\t\t}\n\t\t\t\n\t\t\t//System.out.println(\"Done sorting!\");\n\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Posting starts \");\n\t\t\t//\"THIS IS START OF DICTIONARTY\" \n\t\t\tBufferedWriter bw = null;\n\t\t\tFileWriter fw = null;\n\t\t\t\n\t\t\t\n\t\t\t//System.out.println(\"Start making an array thats big as every doc total \");\n\t\t\tfor (int z = 1; z < documentFound+1; z++)\n\t\t\t{\n\t\t\t\ttermWeights.put(z, new ArrayList<Double>());\n\t\t\t}\n\t\t\t//System.out.println(\"Done making that large array Doc \");\n\t\t\t\n\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\n\t\t\t//System.out.println(\"All terms\" +allTerms)\n\t\t\t//System.out.println(Arrays.toString(sortedArray));\n\t\t\t//System.out.println(Arrays.toString(sortedArrayUnique));\n\t\t\t//System.out.println(uniqueTerms);\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//\tSystem.out.println(\"Posting starts \");\n\t\t\t// \tPOSTING FILE STARTS \n\t\t\ttry {\n\t\t\t\t// Posting File\n\t\t\t\t//System.out.println(\"postingsFileListAllWords: \"+postingsFileListAllWords); //Contains every word including Dups, seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileList: \"+postingsFileList); \t\t //Contains unique words, dups are \" \", seperated per doc\n\t\t\t\t//System.out.println(\"postingsFileListAllWords.size(): \" +postingsFileListAllWords.size()); //Total # of docs \n\t\t\t\t//System.out.println(\"Array size: \"+sortedArrayUnique.length);\n\n\t\t\t\tfw = new FileWriter(POSTING);\n\t\t\t\tbw = new BufferedWriter(fw);\n\t\t\t\tString temp = \" \";\n\t\t\t\tDouble termFreq = 0.0;\n\t\t\t\t// //postingsFileListAllWords);\n\t\t\t\tList<String> finalTermList = new ArrayList<String>();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\n\t\t\t\t\t// //postingsFileList.get(i).size());\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!(finalTermList.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//PART TO FIND DOCUMENT FREQ\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docCountIDF = 0;\n\t\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\t\tfor (int totalWords = 0; totalWords < sortedArray.length; totalWords++) \t\t\n\t\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD \n\t\t\t\t\t\t\t\t\t//System.out.println(\"fOUND STOP WORD\");\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tString temp2 = sortedArray[totalWords];\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tdocCountIDF++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"Total Number: \" +docCountIDF);\n\t\t\t\t\t\t\t//System.out.println(\"documentFound: \" +documentFound);\n\t\t\t\t\t\t\t//System.out.println(\"So its \" + documentFound + \" dividied by \" +docCountIDF);\n\t\t\t\t\t\t\t//docCountIDF = 1;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble idf = (Math.log10(((double)documentFound/(double)docCountIDF)));\n\t\t\t\t\t\t\t//System.out.println(\"Calculated IDF: \"+idf);\n\t\t\t\t\t\t\tif (idf < 0.0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tidf = 0.0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//System.out.println(\"IDF is: \" +idf);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Size of doc words: \" + postingsFileListAllWords.size());\n\t\t\t\t\t\t\tfor (int k = 0; k < postingsFileListAllWords.size(); k++) \t\t//Go thru each doc. Since only looking at 1 term, it does it once per doc\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//System.out.println(\"Current Doc: \" +(k+1));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttermFreq = 1 + (Math.log10(Collections.frequency(postingsFileListAllWords.get(k), temp)));\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"Freq is: \" +Collections.frequency(postingsFileListAllWords.get(k), temp));\n\t\t\t\t\t\t\t\t\t//System.out.println(termFreq + \": \" + termFreq.isInfinite());\n\t\t\t\t\t\t\t\t\tif (termFreq.isInfinite() || termFreq <= 0)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttermFreq = 0.0;\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\t\t\t//System.out.println(\"termFreq :\" +termFreq); \n\t\t\t\t\t\t\t\t\t//System.out.println(\"idf: \" +idf);\n\t\t\t\t\t\t\t\t\ttermWeights.get(k+1).add( (idf*termFreq) );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t\t\tfinalTermList.add(temp);\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//FINALCOUNTER\n\t\t\t\t\t\t//System.out.println(\"Done looking at word: \" +j);\n\t\t\t\t\t\t//System.out.println(\"\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Current Weights: \"+termWeights);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\twhile (true)\n\t\t\t\t {\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Enter a query: \");\n\t\t\t\t\t\n\t \tScanner scanner = new Scanner(System.in);\n\t \tString enterQuery = scanner.nextLine();\n\t \t\n\t \t\n\t\t\t\t\tList<Double> queryWeights = new ArrayList<Double>();\n\t\t\t\t\t\n\t\t\t\t\t// Query turn\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tenterQuery = enterQuery.toLowerCase();\t\t\n\t\t\t\t\tenterQuery = enterQuery.replaceAll(\"[-&^%'*$+|{}?!\\\\/<\\\\>=.,;_:()\\\\[\\\\]\\\"]\", \"\");\n\t\t\t\t\t//System.out.println(\"Query is: \" + enterQuery);\n\t\t\t\t\t\n\t\t\t\t\tif (enterQuery.equals(\"exit\"))\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tString[] queryArray = enterQuery.split(\" \");\n\t\t\t\t\tArrays.sort(queryArray);\n\t\t\t\t\t\n\t\t\t\t\t//Find the query weights for each term in vocab\n\t\t\t\t\tfor (int j = 0; j < sortedArrayUnique.length; ++j)\t\t\t\t\t // go thru each word, CURRENT TERM\n\t\t\t\t\t{\n\t\t\t\t\t\t//System.out.println(\"Term is: \" + sortedArrayUnique[j]);\n\t\t\t\t\t\ttemp = sortedArrayUnique[j];\t\t\t\t\t\n\t\t\t\t\t\tif ((stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\tint docCountDF = 0;\n\t\t\t\t\t\t//Start here for dictionary \n\t\t\t\t\t\tfor (int totalWords = 0; totalWords < queryArray.length; totalWords++) \t\t\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif (temp.compareTo(\" \") == 0 || (stopWordsSetting && stopWords.contains(temp))) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//EITHER BLANK OR STOPWORD\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tString temp2 = queryArray[totalWords];\n\t\t\t\t\t\t\t\t//System.out.println(\"Compare: \"+temp+ \" with \" +temp2);\n\t\t\t\t\t\t\t\tif (temp.compareTo(temp2) == 0) {\n\t\t\t\t\t\t\t\t\t// (temp2+\" \");\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocCountDF++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tDouble queryWeight = 1 + (Math.log10(docCountDF));\n\t\t\t\t\t\tif (queryWeight.isInfinite())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tqueryWeight = 0.0;\n\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tqueryWeights.add(queryWeight);\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query WEights is: \"+queryWeights);\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// Finding the norms for DOCS\t\t\t\t\t\n\t\t\t\t\tfor (int norms = 1; norms < documentFound+1; norms++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble currentTotal = 0.0;\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < termWeights.get(norms).size(); weightsPerDoc++)\n\t\t\t\t\t\t{\t\t\t\t\t\t\n\t\t\t\t\t\t\tdouble square = Math.pow(termWeights.get(norms).get(weightsPerDoc), 2);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"Current square: \" + termWeights.get(norms).get(weightsPerDoc));\n\t\t\t\t\t\t\tcurrentTotal = currentTotal + square;\n\t\t\t\t\t\t\t//System.out.println(\"Current total: \" + currentTotal);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//System.out.println(\"About to square root this: \" +currentTotal);\n\t\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\t\tdocNorms.put(norms, root);\n\t\t\t\t\t}\n\t\t\t\t\t//System.out.println(\"All of the docs norms: \"+docNorms);\n\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Finding the norm for the query\n\t\t\t\t\tdouble currentTotal = 0.0;\t\t\t\t\t\n\t\t\t\t\tfor (int weightsPerDoc = 0; weightsPerDoc < queryWeights.size(); weightsPerDoc++)\n\t\t\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tdouble square = Math.pow(queryWeights.get(weightsPerDoc), 2);\n\t\t\t\t\t\tcurrentTotal = currentTotal + square;\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\tdouble root = Math.sqrt(currentTotal);\n\t\t\t\t\tdouble queryNorm = root; \t\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"Query norm \" + queryNorm);\n\t\t\t\t\t\n\t\t\t\t\t//Finding the cosine sim\n\t\t\t\t\t//System.out.println(\"Term Weights \" + termWeights);\n\t\t\t\t\tHashMap<Integer, Double> cosineScore = new HashMap<Integer, Double>();\n\t\t\t\t\tfor (int cosineSim = 1; cosineSim < documentFound+1; cosineSim++)\n\t\t\t\t\t{\n\t\t\t\t\t\tdouble total = 0.0;\n\t\t\t\t\t\tfor (int docTerms = 0; docTerms < termWeights.get(cosineSim).size(); docTerms++)\n\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\tdouble docTermWeight = termWeights.get(cosineSim).get(docTerms);\n\t\t\t\t\t\t\tdouble queryTermWeight = queryWeights.get(docTerms);\n\t\t\t\t\t\t\t//System.out.println(\"queryTermWeight \" + queryTermWeight);\n\t\t\t\t\t\t\t//System.out.println(\"docTermWeight \" + docTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttotal = total + (docTermWeight*queryTermWeight);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdouble cosineSimScore = 0.0;\n\t\t\t\t\t\tif (!(total == 0.0 || (docNorms.get(cosineSim) * queryNorm) == 0))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcosineSimScore = total / (docNorms.get(cosineSim) * queryNorm);\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\tcosineSimScore = 0.0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tcosineScore.put(cosineSim, cosineSimScore);\n\t\t\t\t\t}\n\t\t\t\t\tcosineScore = sortByValues2(cosineScore);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"This is the cosineScores: \" +cosineScore);\n\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"docAndTitles: \"+ docAndTitles);\n\t\t\t\t\tint topK = 0;\n\t\t\t\t\tint noValue = 0;\n\t\t\t\t\tfor (Integer name: cosineScore.keySet())\n\t\t\t\t\t{\n\t\t\t\t\t\tif (topK < 50)\n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t\n\t\t\t\t String key =name.toString();\n\t\t\t\t //String value = cosineScore.get(name).toString(); \n\t\t\t\t if (!(cosineScore.get(name) <= 0))\n\t\t\t\t {\n\t\t\t\t \tSystem.out.println(\"Doc: \"+key);\t\t\t\t \t\t\t\t\t \t\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \tStringBuilder builder = new StringBuilder();\n\t\t\t\t \tfor (StringBuilder value : docAndTitles.get(name)) {\n\t\t\t\t \t builder.append(value);\n\t\t\t\t \t}\n\t\t\t\t \tString text = builder.toString();\t\t\t\t \t\n\t\t\t\t \t//System.out.println(\"Title:\\n\" +docAndTitles.get(name));\n\t\t\t\t \tSystem.out.println(\"Title: \" +text);\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\n\t\t\t\t \t//System.out.println(\"Authors:\\n\" +docAndAuthors.get(name));\n\t\t\t\t \t\n\t\t\t\t \tif (docAndAuthors.get(name) == null || docAndAuthors.get(name).toString().equals(\"\"))\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Authors: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAuthors.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Authors found: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t\n\t\t\t\t \t\n\t\t\t\t \t/* ABSTRACT \n\t\t\t\t \tif (docAndAbstract.get(name) == null)\n\t\t\t\t \t{\n\t\t\t\t \t\tSystem.out.println(\"Abstract: N\\\\A\\n\");\n\t\t\t\t \t}\n\t\t\t\t \telse \n\t\t\t\t \t{\t\t\t\t \t\t\t\t\t\t \t\n\t\t\t\t\t \tStringBuilder builder2 = new StringBuilder();\n\t\t\t\t\t \tfor (StringBuilder value : docAndAbstract.get(name)) {\n\t\t\t\t\t \t builder2.append(value);\n\t\t\t\t\t \t}\n\t\t\t\t\t \tString text2 = builder2.toString();\t\t\t\t \t\n\t\t\t\t\t \t\n\t\t\t\t\t \tSystem.out.println(\"Abstract: \" +text2);\n\t\t\t\t \t}\t\n\t\t\t\t \t*/\n\t\t\t\t \t\n\t\t\t\t \tSystem.out.println(\"\");\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \tnoValue++;\n\t\t\t\t }\n\t\t\t\t topK++;\n\t\t\t\t \n\t\t\t\t\t\t}\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (noValue == documentFound)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tSystem.out.println(\"No documents contain query!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\ttopK=0;\n\t\t\t\t\tnoValue = 0;\n\t\t\t\t }\n\t\t\t\t\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (bw != null)\n\t\t\t\t\t\tbw.close();\n\n\t\t\t\t\tif (fw != null)\n\t\t\t\t\t\tfw.close();\n\n\t\t\t\t} catch (IOException ex) {\n\n\t\t\t\t\tex.printStackTrace();\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t\t\n\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)\n\t\t\t\t\tbr.close();\n\n\t\t\t\tif (fr != null)\n\t\t\t\t\tfr.close();\n\n\t\t\t} catch (IOException ex) {\n\n\t\t\t\tex.printStackTrace();\n\n\t\t\t}\n\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\n\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tint itemCount = uniqueTerms.size();\n\t\t\t//System.out.println(allValues);\n\t\t\tSystem.out.println(\"Total Terms BEFORE STEMING: \" +itemCount);\n\t\t\tSystem.out.println(\"Total Documents \" + documentFound);\n\t\t\t\t\t\t\n\t\t \n\t\t\t \n\t\t\t \n\t\t\t//END OF MAIN\n\t\t}", "public static void main(String[] args) {\r\n int argc = args.length;\r\n\r\n // Given only the words file\r\n if(argc == 2 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i'){\r\n String fileName = args[1];\r\n int size = 1;\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size) size = arrOfStr[i].length();\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n if(wordList.size() > size) size = wordList.size();\r\n char[][] wordSoup = wsGen( wordList, size + 2);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n\r\n // Given all args\r\n if(argc == 4 && args[0].charAt(0) == '-' && args[0].charAt(1) == 'i' && args[2].charAt(0) == '-' && args[2].charAt(1) == 's'){\r\n String fileName = args[1];\r\n int size = Integer.parseInt(args[3]);\r\n // Check max size\r\n if(size > 40){\r\n System.out.print(\"Max size 40\");\r\n return;\r\n }\r\n\r\n ArrayList<String> wordList = new ArrayList<String>();\r\n\r\n // Get data from file\r\n ArrayList<String> dataList = new ArrayList<String>();\t\r\n try {\r\n File myObj = new File(fileName);\r\n Scanner myReader = new Scanner(myObj);\r\n while (myReader.hasNextLine()) {\r\n String data = myReader.nextLine(); \r\n dataList.add(data);\r\n }\r\n myReader.close();\r\n } catch (FileNotFoundException e) {\r\n System.out.println(\"An error occurred.\");\r\n e.printStackTrace();\r\n }\r\n\r\n // Get words from data \r\n for(int s = 0 ; s < dataList.size() ; s++) {\r\n String[] arrOfStr = dataList.get(s).split(\"[,\\\\;\\\\ ]\");\t// check same line words\r\n for(int i = 0 ; i < arrOfStr.length ; i++) {\r\n if(arrOfStr[i].equals(arrOfStr[i].toUpperCase())){\r\n System.out.println(\"Words not only in lowercase or mixed\");\r\n //termina o programa\r\n return;\r\n }\r\n if(!(arrOfStr[i].matches(\"[a-zA-Z]+\"))){\r\n System.out.println(\"Words have non alpha values\");\r\n //termina o programa\r\n return;\r\n }\r\n if(arrOfStr[i].length() > size){\r\n System.out.println(\"At least one word given doesn't fit in the size provided.\");\r\n return;\r\n }\r\n wordList.add(arrOfStr[i].toUpperCase());\t// add words discovered and turn upper case\r\n }\r\n }\r\n char[][] wordSoup = wsGen( wordList, size);\r\n saveData(dataList,wordSoup);\r\n return;\r\n }\r\n // Help message\r\n System.out.println(\"usage: -i file # gives file with word soup words\");\r\n System.out.println(\" -s size # gives size for the word soup\");\r\n return;\r\n }", "public static void main(String[] args) throws IOException {\n\n\t\tSystem.out.println(\"Please enter the name of the file\");\n\t\tScanner input = new Scanner(System.in);\n\t\tString fileName = input.next();\n\t\tSystem.out.println(\"Would you like to write all words including duplicates? Ente 'yes' for \"\n\t\t\t\t+ \"all words including duplicates. Enter 'no' to write words without duplicates\");\n\t\tString duplicates = input.next();\n\t\t\n\t\tFile file = new File(\"C:\\\\NewWorkspace\\\\Lekcija15\\\\src\\\\Vjezbe\\\\\" + fileName);\n\t\tif(!file.exists()){\n\t\t\tSystem.out.println(\"File name \" + fileName + \" does NOT exist\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tinput.close();\n\t\t\n\t\tSet<String> wordsSingle = new TreeSet<>();\n\t\tList<String> wordsDuplicates = new ArrayList<>();\n\n\t\tScanner read = new Scanner(file);\n\t\tString word;\n\n\t\twhile(read.hasNext()){\n\t\t\tword = read.next();\n\t\t\tif(duplicates.equals(\"yes\"))\n\t\t\t\twordsDuplicates.add(word);\n\t\t\telse\n\t\t\t\twordsSingle.add(word);\n\t\t}\n\t\tread.close();\n\t\t\n\t\tif(duplicates.equals(\"yes\")){\n\t\t\tCollections.sort(wordsDuplicates);\n\t\t\tfor(String words: wordsDuplicates)\n\t\t\t\tSystem.out.println(words);\n\t\t}\n\t\telse{\n\t\t\tfor(String words: wordsSingle)\n\t\t\t\tSystem.out.println(words);\n\t\t}\n\t}", "private void addWordsFromFile(File file){\n \n FileResource fr = new FileResource(file);\n String fileName = file.getName();\n for (String word : fr.words()) {\n if (!hashWords.containsKey(word)) {// if hash map doesnt contain the key word\n ArrayList<String> newList = new ArrayList<String>();//create a new Arraylist\n newList.add(fileName);//add the file name to it \n hashWords.put(word, newList);// map the word to the new list\n } else if (hashWords.containsKey(word)\n && !hashWords.get(word).contains(fileName)) {\n //the hash map contains the keyword but not the filename\n // it gets stored as a new value in the\n //arraylist of the hashmap:\n \n ArrayList<String> currentList = hashWords.get(word);//currentList is the existing array list of files\n //for the given word\n currentList.add(fileName);//Add new file name to existing list\n hashWords.put(word, currentList);//map the 'word' to the updated arraylist\n }\n }\n }", "private void loadButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_loadButtonMouseClicked\n // open file dialog\n FileDialog dialog = new FileDialog(this, \"Choisir le fichier dictionnaire\", FileDialog.LOAD);\n dialog.setFile(\"*.txt\");\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n filename = dialog.getDirectory() + filename;\n lexiNodeTrees = DictioFileOperations.loadListFromFile(filename);\n \n if(lexiNodeTrees != null) // if list was successfully retrieved\n {\n loadedDictionaryFilename = filename;\n refreshAllWordsList();\n \n // clear text area and search suggestion\n searchSuggestionList.setModel(new DefaultListModel());\n definitionTextArea.setText(\"\");\n searchField.setText(\"\");\n }\n \n else // if file could not be loaded, show error dialog\n JOptionPane.showMessageDialog(this, \"ERREUR: Le fichier n'a \"\n + \"pas pu être chargé!\\n\\nVérifiez que le fichier est \"\n + \"valid est contient <<mot & définition>> sur toutes \"\n + \"les lignes\\n\\n\", \"ERREUR\", JOptionPane.ERROR_MESSAGE);\n }\n }", "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 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}", "public static void main(String[] args) throws IOException {\n //arg0: dictDir\n //arg1: partOfSpeech (char)\n //args1+: words to lookup\n\n try {\n final String dictDir = args[0].length() > 1 ? args[0] : null;\n final String posChar = args[1];\n final int wordsIndex = 2;\n\n final WordNetFile wordNetFile = WordNetFile.getInstance(dictDir, WordNetUtils.parsePOS(posChar));\n\n for (int i = wordsIndex; i < args.length; ++i) {\n final List<Entry> entries = wordNetFile.getEntries(args[i]);\n\n System.out.print(args[i] + \" --> \");\n if (entries == null) {\n System.out.print(\"<no entries>\");\n }\n else {\n boolean didFirst = false;\n for (Entry entry : entries) {\n if (didFirst) System.out.print(\", \");\n System.out.print(entry);\n didFirst = true;\n }\n }\n System.out.println();\n }\n }\n finally {\n WordNetUtils.closeAll();\n }\n }", "public HotWordsAnalyzer (String hotWordsFileName, String docFileName){\r\n //Setting the filenames to the variables to make them easier to type\r\n doc = docFileName;\r\n hw = hotWordsFileName;\r\n \r\n //If opening of the file fails, an ioException will be thrown\r\n\t\ttry{\r\n hotword = new Scanner(Paths.get(hw));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n try{\r\n \r\n docs = new Scanner(Paths.get(doc));\r\n }\r\n catch (IOException ioException){\r\n System.err.println(\"Error opening file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above opens both files\r\n \r\n //Goes through hotwords file and takes each word and pushes them to \r\n //the map words so they can be used to locate the hotwords in the document\r\n\t\ttry{\r\n while(hotword.hasNext()){\r\n String y;\r\n String x = hotword.next();\r\n y = x.toLowerCase();\r\n //sets hotword as key and 0 for the count of that hotword in the document\r\n words.put(y, 0);\r\n }\r\n }\r\n //The element doesn't exist- file must not be a file\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n //The file may not be readable or corrupt\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n //Above gets words and puts them into the words map\r\n try{\r\n //reads the document and when it finds a hotword it increments the count in words\r\n while(docs.hasNext()){\r\n //gets next word\r\n String x = docs.next();\r\n String y = x.toLowerCase();\r\n //Gets rid of the commas and periods\r\n y = y.replace(\",\", \"\");\r\n y = y.replace(\".\", \"\");\r\n //If the word y is in the hotwords list\r\n if(words.containsKey(y)){\r\n //Adds to words map and increments count\r\n consec.add(y);\r\n int z;\r\n z = words.get(y);\r\n z++;\r\n words.put(y, z);\r\n }\r\n }\r\n }\r\n catch(NoSuchElementException elementException){\r\n System.err.println(\"Improper file. Terminating.\");\r\n System.exit(1);\r\n }\r\n catch(IllegalStateException stateException){\r\n System.err.println(\"Error reading from file. Terminating.\");\r\n System.exit(1);\r\n }\r\n \r\n \r\n\t\t\r\n\t}", "public SpellCheckFrame() \n\t{\n\t\t// frame parameters\n\t\tsetTitle(\"MO42 Spell Checker\");\n\t\tsetSize(500,500); // default size is 0,0\n\t\tsetLocationRelativeTo(null); // default is 0,0 (top left corner)\n\t\t\n\t\t// window listeners\n\t\taddWindowListener\n\t\t(\n\t\t\tnew WindowAdapter() \n\t\t\t{\n\t\t\t \tpublic void windowClosing(WindowEvent event) \n\t\t\t \t{\n\t\t\t \t\t// only exits if the user clicks yes, nothing otherwise\n\t\t\t \t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to exit?\");\n\n\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t{\t\n\t\t\t \t\t\tdispose();\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\tsetDefaultCloseOperation(DO_NOTHING_ON_CLOSE);\n\t\t\t \t} \n\t\t\t}\n\t\t);\n\t\n\t\t// menu bar\n\t\tscMenuBar = new SpellCheckMenuBar();\n\n\t\t// new file listener\n\t\tscMenuBar.newFile.addActionListener\n\t\t(\n\t\t\tnew ActionListener()\n\t\t\t{\n\t\t\t\t// input and dictionary file variables\n\t\t\t\tJFileChooser newFileChooser;\n\t\t\t\tJFileChooser dictionaryFileChooser;\n\t\t\t\tFileNameExtensionFilter filter; // to filter .txt files only\n\t\t\t\tFile inputFiles[];\n\t\t\t\tFile dictionaryFiles[]; \n\t\t\t\t\n\t\t\t\t// display variables\n\t\t\t\tJScrollPane scroller;\n\t\t\t\tContainer contentPane;\n\t\t\t\tSpellCheckTextArea inputText;\n\t\t\t\tSpellCheckWord tuple3;\n\t\t\t\tBufferedReader br = null;\n\t \t\tString line = \"\";\n\t \t \t\tString seperator = \" \";\n\t\t\t\tint index;\n\t\t\t\tint innerIndex;\n\t\t\t\tint loc;\n\n\t\t\t\t// data structure variables\n\t\t\t\tArrayList<Set<String>> inputTrees; //holds tree form of input file\n\t\t\t\tArrayList<Set<String>> dictionaryTrees; // holds tree form of dictionary file\n\t\t\t\tArrayList<ArrayList<ArrayList<String>>> missingWords; // holds the misspelled words\n\t\t\t\tArrayList<ArrayList<String>> setsOfWords; // holds different sets on misspelled words according to input file and dictionary\n\t\t\t\tArrayList<String> words; // holds words in setsOfWords\n\t\t\t\tString word; // holds on single word\n\t\t\t\t\n\t\t\t\t// used during iteration\n\t\t\t\tint newSelectionResult;\n\t\t\t\tint dictionarySelectionResult;\n\t\t\t\tint numberOfInputs;\n\t\t\t\tint numberOfDictionaries;\n\t\t\t\tint numberOfWords;\n\t\t\t\tint inFileNumber;\n\t\t\t\tint dictionaryNumber;\n\t\t\t\t\n\t\t\t\t/**\n\t\t\t\t * process that allows user to select input file(s) and dictionary file(s) and displays misspelled words\n\t\t\t\t */\n\t\t\t\tpublic void actionPerformed(ActionEvent event)\n\t\t\t\t{\n\t\t\t\t\t// if an input file is already loaded, clear panel before adding new words\n\t\t\t\t\tif(!empty.status)\n\t\t\t\t\t{\n\t\t\t\t\t\t// new session only if user responds with yes\n\t\t\t\t\t\tend = JOptionPane.showConfirmDialog(null, \"Are you sure you want to start a new spell check session?\");\n\n\t\t\t\t\t\tif (end == JOptionPane.YES_OPTION) \n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgetContentPane().removeAll();\n\t\t\t\t\t\t\trevalidate();\n\t\t\t\t\t\t\tempty.status = false;\n\n\t\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\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\tnewSelectionResult = JFileChooser.CANCEL_OPTION;\n\t\t\t\t\t\t\tdictionarySelectionResult = JFileChooser.CANCEL_OPTION;\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\tempty.status = false;\n\n\t\t\t\t\t\t// file chooser for input file and dictionaries selection set up\n\t\t\t\t\t\tnewFileChooser = new JFileChooser();\n\t\t\t\t\t\tfilter = new FileNameExtensionFilter(\".txt files\", \"txt\");\n\t\t\t\t\t\tnewFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tnewFileChooser.setApproveButtonText(\"Load Input\");\n\t\t\t\t\t\tnewFileChooser.setDialogTitle(\"Load Input File(s)\");\n\t\t\t\t\t\tnewFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tnewFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tnewSelectionResult = newFileChooser.showOpenDialog(scMenuBar.newFile);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(newSelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t{\n\t\t\t\t\t\tinputFiles = newFileChooser.getSelectedFiles();\n\t\t\t\t\t\n\t\t\t\t\t\tinputTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\tinputTrees = treeHandler.convertMultipleFiles(inputFiles);\n\t\t\t\t\t\t\n\t\t\t\t\t\tdictionaryFileChooser = new JFileChooser();\n\t\t\t\t\t\tdictionaryFileChooser.setCurrentDirectory(new java.io.File(System.getProperty(\"user.home\")));\n\t\t\t\t\t\tdictionaryFileChooser.setApproveButtonText(\"Load Dictionary\");\n\t\t\t\t\t\tdictionaryFileChooser.setDialogTitle(\"Load Dictionary File(s)\");\n\t\t\t\t\t\tdictionaryFileChooser.setFileFilter(filter);\n\t\t\t\t\t\tdictionaryFileChooser.setMultiSelectionEnabled(true);\n\t\t\t\t\t\tdictionarySelectionResult = dictionaryFileChooser.showOpenDialog(null);\n\n\t\t\t\t\t\t// only change view if user inputs both an input and dictionary(ies)\n\t\t\t\t\t\tif(dictionarySelectionResult == JFileChooser.APPROVE_OPTION)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdictionaryFiles = dictionaryFileChooser.getSelectedFiles();\n\t\t\t\t\t\t\tdictionaryTrees = new ArrayList<Set<String>>(); // **** took away TreeSet\n\t\t\t\t\t\t\tdictionaryTrees = treeHandler.convertMultipleFiles(dictionaryFiles);\n\t\t\t\t\t\t\tcontentPane = getContentPane();\n\n\t\t\t\t\t\t\tinputText = new SpellCheckTextArea();\n\t\t\t\t\t\t\tinputText.setLineWrap(true);\n\t\t\t\t\t\t\tinputText.setWrapStyleWord(true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdisplay.numWordsIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1)); //size of numDictionaries*numInputFiles + 1 for the 0 index\n\t\t\t\t\t\t\tdisplay.numReplaced = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numAdded = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numLinesIn = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\tdisplay.numIgnored = new ArrayList<Integer>((inputFiles.length*dictionaryFiles.length + 1));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * get number of lines in input file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//zero location in list is added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(0);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0;\n\t\t\t\t\t\t\t\t\tdisplay.numLinesIn.add(loc, Integer.valueOf(0)); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t \n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t \t\t\t \t\tdisplay.numLinesIn.set(loc, Integer.valueOf(display.numLinesIn.get(loc) + 1)); //increment lines read\n\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * Reads file and displays ready for user input of add, replace, ignore\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//all zero locations in list are added and then ignored\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(0);\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(0);\n\n\t\t\t\t\t\t\t\t\t//initialize all statistics variables for each inputFile/DictionaryFile pair to 0\n\t\t\t\t\t\t\t\t\tdisplay.numWordsIn.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numReplaced.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numAdded.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\tdisplay.numIgnored.add(loc, Integer.valueOf(0));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t * Convenience for reading character files.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t\ttry \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br = new BufferedReader(new FileReader(inputFiles[index]));\n\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t //displays current input file and dictionary name at top of text\n\t\t\t\t\t \t\t\t \tinputText.extend(\"Input file: \" + inputFiles[index].getName() + \"\\tDictionary File: \" + dictionaryFiles[innerIndex].getName() + \"\\n\\n\");\n\n\t\t\t\t\t \t\t\t \twhile ((line = br.readLine()) != null) \n\t\t\t\t\t\t\t\t { \n\t\t\t\t\t\t\t\t \t\tString[] textLine = line.split(seperator);\n\t\t\t\t\t\t\t\t \t \n\t\t\t\t\t\t\t\t \t\tfor(String word : textLine) \n\t\t\t\t\t\t\t\t \t\t{\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[\\n\\r\\t]+\", \"\");\n\t\t\t\t\t\t\t\t \t\t word = word.replaceAll(\"[^a-zA-Z]\", \"\");\n\t\t\t\t\t\t\t\t \t\t \n\t\t\t\t\t\t\t\t \t\t if(!word.isEmpty()) \n\t\t\t\t\t\t\t\t \t\t {\n\t\t\t\t\t\t\t\t \t\t\t\tdisplay.numWordsIn.set(loc, Integer.valueOf(display.numWordsIn.get(loc) + 1)); //increment the number of words in the input file\n\t\t\t\t\t\t\t\t \t\t\t\ttuple3 = new SpellCheckWord(word.toLowerCase(), inputText.getText().length(), inputFiles[index], dictionaryFiles[innerIndex]);\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.inputFileIndex = index;\n\t\t\t\t\t\t\t\t \t\t\t\t\ttuple3.dictionaryFileIndex = innerIndex;\n\n\t\t\t\t\t\t\t\t \t\t\t\tinputText.extend(tuple3);\n\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 }\n\t\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t\t\t * @exception FileNotFoundException this exception will be thrown by the FileInputStream, FileOutputStream, and RandomAccessFile constructors when a file with the specified pathname does not exist. \n\t\t\t\t\t\t\t\t\t * It will also be thrown by these constructors if the file does exist but for some reason is inaccessible, for example when an attempt is made to open a read-only file for writing.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t catch (FileNotFoundException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t/** \n\t\t\t\t\t\t\t\t\t * @exception IOException signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.\n\t\t\t\t\t\t\t\t\t */ \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t finally \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t if (br != null) \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t try \n\t\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t br.close();\n\t\t\t\t\t\t\t } \n\t\t\t\t\t\t\t\t catch (IOException exception) \n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\texception.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t }\n\n\t\t\t\t\t\t\t\t inputText.extend(new SpellCheckWord(\"\\n\\n\", inputText.getText().length()));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Calls the treeHandler functions and displays the misspelled words.\n\t\t\t\t\t\t\t * Outer list's indices represent different input files. \n\t\t\t\t\t\t\t * Middle list's indices represent different dictionary files that each input file will be compared to.\n\t\t\t\t\t\t\t * Inner list's indices represent the words in an input file that are not in the corresponding dictionary.\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tmissingWords = new ArrayList<ArrayList<ArrayList<String>>>();\n\t\t\t\t\t\t\tmissingWords = treeHandler.incorrectWords(inputTrees, dictionaryTrees);\n\t\t\t\t\t\t\tnumberOfInputs = 0; \n\t\t\t\t\t\t\tnumberOfDictionaries = 0; \n\t\t\t\t\t\t\tnumberOfWords = 0; \n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\tnumberOfInputs = missingWords.size();\n\n\t\t\t\t\t\t\tfor(Iterator<ArrayList<ArrayList<String>>> iterator = missingWords.iterator(); iterator.hasNext();) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tsetsOfWords = iterator.next();\n\t\t\t\t\t\t\t\tnumberOfDictionaries += setsOfWords.size();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(Iterator<ArrayList<String>> iterator2 = setsOfWords.iterator(); iterator2.hasNext();)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// use label to separate differences from different dictionary file\n\t\t\t\t\t\t\t\t\twords = iterator2.next();\n\t\t\t\t\t\t\t\t\tnumberOfWords += words.size(); \n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif (!words.isEmpty())\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tfor(Iterator<String> iterator3 = words.iterator(); iterator3.hasNext();)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tword = iterator3.next();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tfor(SpellCheckWord pair : inputText.contentPairs)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tif(pair.word.equals(word) && !pair.missingWord && pair.inputFile.equals(inputFiles[inFileNumber]) && pair.dictionaryFile.equals(dictionaryFiles[dictionaryNumber]))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\tpair.missingWord = true;\n\t\t\t\t\t\t\t\t\t\t\t\t\tinputText.highlight(pair);\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\t\n\t\t\t\t\t\t\t\t\tdictionaryNumber += 1;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tinFileNumber += 1;\n\t\t\t\t\t\t\t\tdictionaryNumber = 0;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t * prints statistics for each pair of input/dictionary file to txt file\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t scMenuBar.printStats.addActionListener\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\tnew ActionListener()\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent event)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttry\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t// Create new file\n\t\t\t\t\t\t\t\t\t\t\tfor(index = 0; index < inputFiles.length; index++)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\tfor(innerIndex = 0; innerIndex < dictionaryFiles.length; innerIndex++)\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\tloc = (index+1)*(innerIndex+1);\n\t\t\t\t\t\t\t\t\t\t\t\t\tString path = System.getProperty(\"user.home\") + \"/Desktop/Stats-for-\" + inputFiles[index].getName() + \"-\" + dictionaryFiles[innerIndex].getName() + \".txt\";\n\t\t\t\t\t\t\t\t\t\t\t\t\tFile writer = new File(path);\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\t// file does not exist, create\n\t\t\t\t\t\t\t\t\t\t\t\t\tif (!writer.exists()) \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\t \twriter.createNewFile();\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\tFileWriter fw = new FileWriter(writer.getAbsoluteFile());\n\t\t\t\t\t\t\t\t\t\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t// Write in file\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.write(\" Words in input file\\t: \" + display.numWordsIn.get(loc) + \"\\n Lines in input file\\t: \" + display.numLinesIn.get(loc) + \"\\n Number of words replaced:\\t\" + display.numReplaced.get(loc) + \"\\n Number of words added:\\t\" + display.numAdded.get(loc) + \"\\n Number of words ignored:\\t\" + display.numIgnored.get(loc));\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\t// Close connection\n\t\t\t\t\t\t\t\t\t\t\t\t\tbw.close();\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\tcatch(Exception e)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tinFileNumber = 0;\n\t\t\t\t\t\t\tinputText.setEditable(false);\n\t\t\t\t\t\t\tscroller = new JScrollPane(inputText);\n\t\t\t\t\t\t\tcontentPane.add(scroller, BorderLayout.CENTER);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// refresh frame\n\t\t\t\t\t\t\t//pack();\t\t\t\t\t\n\t\t\t\t\t\t\trevalidate();\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\tsetJMenuBar(scMenuBar);\n \t}", "public static void main(String[] args) throws FileNotFoundException {\n File f = new File(\"dict2.txt\");\n Scanner readFile = new Scanner(f);\n ArrayList<String> dictionary = new ArrayList<String>();\n \n while (readFile.hasNext()) {\n dictionary.add(readFile.next());\n }\n \n HangmanLogic logic = new HangmanLogic(dictionary);\n HangmanUserInterface game = new HangmanUserInterface(logic);\n game.start();\n }", "public void listCorrectWords() {\r\n\t\tif (readDocumentNoDuplicates != null) {\r\n\t\t\t// Add all of the words from the read document that are also in the dictionary to the\r\n\t\t\t// correctWords collection.\r\n\t\t\tcorrectWords = readDocumentNoDuplicates.intersection(dictionary);\r\n\t\r\n\t\t\tif (correctWords.size() > 0) {\r\n\t\t\t\t// List correct words from the read document.\r\n\t\t\t\tSystem.out.println(\"Correctly spelled words:\");\r\n\t\t\t\tObject[] correctWordsArray = correctWords.toArray();\r\n\t\t\t\tfor (int i = 0; i < correctWordsArray.length; i++) {\r\n\t\t\t\t\tSystem.out.println(correctWordsArray[i]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"There were no correctly spelled words.\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"You have not read in a document to be spell checked. Please indicate file name\"\r\n\t\t\t\t\t+ \" before using this feature.\");\r\n\t\t}\r\n\t}", "static void allDocumentAnalyzer() throws IOException {\n\t\tFile allFiles = new File(\".\"); // current directory\n\t\tFile[] files = allFiles.listFiles(); // file array\n\n\t\t// recurse through all documents\n\t\tfor (File doc : files) {\n\t\t\t// other files we don't need\n\t\t\tif (doc.getName().contains(\".java\") || doc.getName().contains(\"words\") || doc.getName().contains(\"names\")\n\t\t\t\t\t|| doc.getName().contains(\"phrases\") || doc.getName().contains(\".class\")\n\t\t\t\t\t|| doc.getName().contains(\"Data\") || doc.getName().contains(\".sh\") || doc.isDirectory()\n\t\t\t\t\t|| !doc.getName().contains(\".txt\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tString name = doc.getName();\n\t\t\tSystem.out.println(name);\n\t\t\tname = name.substring(0, name.length() - 11);\n\t\t\tSystem.out.println(name);\n\n\t\t\tif (!names.contains(name)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// make readers\n\t\t\tFileReader fr = new FileReader(doc);\n\t\t\tBufferedReader br = new BufferedReader(fr);\n\n\t\t\t// phrase list\n\t\t\tArrayList<String> words = new ArrayList<String>();\n\n\t\t\t// retrieve all text, trim, refine and add to phrase list\n\t\t\tString nextLine = br.readLine();\n\t\t\twhile (nextLine != null) {\n\t\t\t\tnextLine = nextLine.replace(\"\\n\", \" \");\n\t\t\t\tnextLine = nextLine.trim();\n\n\t\t\t\tif (nextLine.contains(\"no experience listed\")) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tString[] lineArray = nextLine.split(\"\\\\s+\");\n\n\t\t\t\t// recurse through every word to find phrases\n\t\t\t\tfor (int i = 0; i < lineArray.length - 1; i++) {\n\t\t\t\t\t// get the current word and refine\n\t\t\t\t\tString currentWord = lineArray[i];\n\n\t\t\t\t\tcurrentWord = currentWord.trim();\n\t\t\t\t\tcurrentWord = refineWord(currentWord);\n\n\t\t\t\t\tif (currentWord.equals(\"\") || currentWord.isEmpty()) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\twords.add(currentWord);\n\t\t\t\t}\n\t\t\t\tnextLine = br.readLine();\n\t\t\t}\n\n\t\t\tbr.close();\n\n\t\t\t// continue if empty\n\t\t\tif (words.size() == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// otherwise, increment number of files in corpus\n\t\t\tsize++;\n\n\t\t\t// updating the phrase count map for tf\n\t\t\tString fileName = doc.getName();\n\t\t\tphraseCountMap.put(fileName, words.size());\n\n\t\t\t// recurse through every word\n\t\t\tfor (String word : words) {\n\t\t\t\t// get map from string to freq\n\t\t\t\tHashMap<String, Integer> textFreqMap = wordFreqMap.get(fileName);\n\n\t\t\t\t// if it's null, make one\n\t\t\t\tif (textFreqMap == null) {\n\t\t\t\t\ttextFreqMap = new HashMap<String, Integer>();\n\t\t\t\t\t// make freq as 1\n\t\t\t\t\ttextFreqMap.put(word, 1);\n\t\t\t\t\t// put that in wordFreq\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t} else {\n\t\t\t\t\t// otherwise, get the current num\n\t\t\t\t\tInteger currentFreq = textFreqMap.get(word);\n\n\t\t\t\t\t// if it's null,\n\t\t\t\t\tif (currentFreq == null) {\n\t\t\t\t\t\t// the frequency is just 0\n\t\t\t\t\t\tcurrentFreq = 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t// increment the frequency\n\t\t\t\t\tcurrentFreq++;\n\n\t\t\t\t\t// put it in the textFreqMap\n\t\t\t\t\ttextFreqMap.put(word, currentFreq);\n\n\t\t\t\t\t// put that in the wordFreqMap\n\t\t\t\t\twordFreqMap.put(fileName, textFreqMap);\n\t\t\t\t}\n\n\t\t\t\t// add this to record (map from phrases to docs with that\n\t\t\t\t// phrase)\n\t\t\t\tinvertedMap.addValue(word, doc);\n\t\t\t}\n\t\t}\n\t}", "public static void readDictionary()\r\n\t{\r\n\t\t//It trys to read over the file using try-catch in case of an Exception\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"english.0\");\r\n\t\t\tScanner scan = new Scanner(file);\r\n\t\t\t//It reads over the file as long as there are words to read and we insert them into the given storage\r\n\t\t\twhile(scan.hasNext()) {\r\n\t\t\t\tdata.insert(scan.next());\r\n\t\t\t}\r\n\t\t\tscan.close(); \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File not found\");\r\n\t\t}\r\n\t}", "public static void findWords(String target) throws FileNotFoundException{\n //reads file through the scanner\n scan = new Scanner(newFile);\n \n //creates new arraylist \n ArrayList<String> list = new ArrayList<String>();\n int count;\n while(scan.hasNextLine()){\n word = scan.nextLine();\n if(contains(target, word)){\n list.add(word.toLowerCase());\n }\n }\n\n int length = target.length();\n\n for(int i = length; i >= 2; i--){\n count = 0;\n System.out.println(i + \" letter words made by unscrambling the letters in \" + target );\n \n //This loop goes through all the strings in the arraylist of words contained\n //in the target word\n for(String a : list){\n //If the length of word in the arraylist is equal to i it prints the \n //word, as long as the line does not go over 40 characters\n if(a.length() == i) {\n if(count > (40 -a.length())){ \n System.out.print(\"\\n\");\n System.out.print(a + \" \");\n count = 0;\n count += (a.length() + 1);\n }\n else{\n System.out.print(a + \" \");\n count += (a.length() + 1);\n }\n }\n\n }\n //decrements length, and continues going through the loop\n length--;\n System.out.println(\"\\n\");\n }\n }", "private void loadNonDictionaryTerms(String filePathNonDictionaryAuto) throws IOException {\n File fileAnnotation = new File(filePathNonDictionaryAuto);\n if (!fileAnnotation.exists()) {\n fileAnnotation.createNewFile();\n }\n FileReader fr;\n fr = new FileReader(fileAnnotation);\n BufferedReader br = new BufferedReader(fr);\n String line;\n while ((line = br.readLine()) != null) {\n\n nonDictionaryTerms.add(line.trim().toLowerCase());\n System.out.println(\"Loading Non Dictionary Terms: \" + line);\n }\n br.close();\n fr.close();\n System.out.println(\"Non Dictionary Terms Loaded\");\n }", "public static void main(String[] args) {\r\n\t\t// Load Dictionary\r\n\t\tString FileName;\r\n\t\tif (args.length == 0) {\r\n\t\t\t// Default dictionary\r\n\t\t\tFileName = \"G:\\\\455\\\\Homework4\\\\PA4\\\\bin\\\\testFiles\\\\sowpods.txt\";\r\n\t\t} else {\r\n\t\t\t// Given dictionary\r\n\t\t\tFileName = args[0];\r\n\t\t}\r\n\r\n\t\t// Construct AnagramDictionary and error detection\r\n\t\tAnagramDictionary ADictionary;\r\n\t\ttry {\r\n\t\t\tADictionary = new AnagramDictionary(FileName);\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"File is not found! \" + FileName);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Starting to print the prompt\r\n\t\tSystem.out.println(\"Type . to quit.\");\r\n\t\tSystem.out.print(\"Rack? \");\r\n\t\tsc = new Scanner(System.in);\r\n\t\tString Rack = sc.next();\r\n\t\t// Exit until typing in \".\" at the prompt\r\n\t\twhile (!Rack.equals(\".\")) {\r\n\t\t\t// Print the Scrabble word according to the current rack and AnagramDictionary\r\n\t\t\tPrint(Rack, ADictionary);\r\n\t\t\tSystem.out.print(\"Rack? \");\r\n\t\t\tRack = sc.next();\r\n\t\t}\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\tfileDatabase = new FileData<String, FileObject>();\n\t\tboolean exit = false;\n\n\t\t//Create Scanner for user input\n\t\tScanner input = new Scanner(System.in);\n\t\tScanner read = new Scanner(System.in);\n\n\t\t//Loop to get user input while exit boolean is false\n\t\tdo {\n\t\t\tSystem.out.println(\"Enter: \\n\"\n\t\t\t\t\t+ \"1 to load files\\n\"\n\t\t\t\t\t+ \"2 to do a single file search with matching word count preference\\n\"\n\t\t\t\t\t+ \"3 to do a multiple file search with matching word count preference\\n\"\n\t\t\t\t\t+ \"4 to do a single file search with matching sentence preference\\n\"\n\t\t\t\t\t+ \"5 to do a multiple file search with matching sentence preference\\n\"\n\t\t\t\t\t+ \"6 to exit\");\n\n\t\t\t//Get User Decision\n\t\t\tint decision = input.nextInt();\n\n\t\t\t//Initialize variables \n\t\t\tString[] keyWords;\n\t\t\tFileObject bestFile;\n\t\t\tString userInput;\n\t\t\tLinkedList<Entry<FileObject, Integer>> sortedList;\n\t\t\tIterator<Entry<FileObject, Integer>> it;\n\t\t\tlong startTime, endTime,duration;\n\t\t\t\n\t\t\t//Switch statement based on user input\n\t\t\tswitch(decision){\n\n\t\t\t//LOADING FILES\n\t\t\tcase 1: \n\t\t\t\t//Get Input for files to load\n\t\t\t\tSystem.out.println(\"Specify files to load or enter 'exit' to quit: \");\n\t\t\t\tSystem.out.print(\"Load: \");\n\n\t\t\t\tString[] files = read.nextLine().split(\" \");\n\t\t\t\tif(files[0] == \"exit\"){\n\t\t\t\t\texit = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\t//Load the files\n\t\t\t\tloadFiles(files);\n\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime)/1000000; //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\t\t\t\tbreak;\n\n\t\t\t\t//SINGLE FILE SEARCH (Word Count Preference)\n\t\t\tcase 2: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\t\n\t\t\t\tbestFile = fileDatabase.bestMatchedWC(keyWords);\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime); //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tif(bestFile == null)\n\t\t\t\t\tSystem.out.println(\"No File Contains Those Keywords\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"The file best matching your search is: \" + bestFile.getFileName());\n\t\t\t\tbreak;\n\n\t\t\t\t//MULTIPLE FILE SEARCH (Word Count Preference)\n\t\t\tcase 3: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\tsortedList = fileDatabase.bestMatchedMultipleWC(keyWords);\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime); //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tSystem.out.println(\"Files matching your search by word count (in order) are: \\n\");\n\t\t\t\tit = sortedList.iterator();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t\tSystem.out.println(it.next().getKey().getFileName() + \"\\n\");\n\n\t\t\t\t//System.out.println(sortedList.toString());\n\n\t\t\t\tbreak;\n\n\t\t\t\t//SINGLE FILE SEARCH (Sentence Preference)\n\t\t\tcase 4: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\tbestFile = fileDatabase.bestMatchedS(keyWords);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime)/1000000; //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tif(bestFile == null)\n\t\t\t\t\tSystem.out.println(\"No File Contains Those Keywords\");\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"The file best matching your search is: \" + bestFile.getFileName());\n\t\t\t\tbreak;\n\n\t\t\t\t//MULTIPLE FILE SEARCH (Sentence Preference)\n\t\t\tcase 5: \n\t\t\t\t//Get input for search\n\t\t\t\tSystem.out.println(\"Enter search or enter 'exit' to quit: \");\n\t\t\t\tuserInput = read.nextLine();\n\t\t\t\tif(userInput == \"exit\")\n\t\t\t\t\texit = true;\n\n\t\t\t\tkeyWords = userInput.split(\" \");\n\n\t\t\t\t//Find the file best matching the keyWords\n\t\t\t\t//startTime = System.nanoTime();\n\t\t\t\tsortedList = fileDatabase.bestMatchedMultipleS(keyWords);\n\t\t\t\t\n\t\t\t\t//endTime = System.nanoTime();\n\n\t\t\t\t//duration = (endTime - startTime)/1000000; //divide by 1000000 to get milliseconds\n\t\t\t\t//System.out.println(\"Execution took: \" + duration + \" milliseconds\");\n\n\t\t\t\tSystem.out.println(\"Files matching your search by sentence (in order) are: \\n\");\n\t\t\t\tit = sortedList.iterator();\n\t\t\t\twhile(it.hasNext())\n\t\t\t\t\tSystem.out.println(it.next().getKey().getFileName() + \"\\n\");\n\t\t\t\tbreak;\n\n\t\t\tcase 6:\n\t\t\t\texit = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t} while(!exit);\n\n\t\tSystem.exit(0);\n\t}", "public static void main(String[] args) {\n int validPhrases = 0;\n\n // get filepath for the puzzle input\n System.out.print(\"Please provide the filepath of the text document containing the puzzle input: \");\n String filePath = new Scanner(System.in).nextLine();\n\n try {\n // attempt to read each line in the file into a list\n List<String> lines = Files.readAllLines(Paths.get(filePath));\n\n /// PART 1\n for (String line : lines) {\n List<String> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n if (usedWords.contains(word)) {\n validPassphrase = false;\n break;\n } else {\n usedWords.add(word);\n }\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 1 is: \" + validPhrases);\n validPhrases = 0;\n\n /// PART 2\n for (String line : lines) {\n // this time around each word will be a dictionary mapping every character in the word, to how many\n // times that character is used in the word\n List<Map<Character, Integer>> usedWords = new ArrayList<>();\n boolean validPassphrase = true;\n\n for (String word : line.split(\" \")) {\n Map<Character, Integer> charMap = new HashMap<>();\n for (char c : word.toCharArray()) {\n // if the character has already been used, increment it's value, otherwise add it to the dict\n if (charMap.containsKey(c)) {\n charMap.put(c, charMap.get(c) + 1);\n } else {\n charMap.put(c, 1);\n }\n }\n\n // now we check if the word we're looking at is an anagram of any we've seen before on this line\n for (Map<Character, Integer> usedWord : usedWords) {\n // no need to check characters if the char maps are a different size\n if (usedWord.keySet().size() == charMap.keySet().size()) {\n boolean hasDifferingValues = false;\n for (char c : charMap.keySet()) {\n // we can short circuit checking every single character by breaking as soon as we see\n // any difference between the two words\n if (!usedWord.containsKey(c) || usedWord.get(c) != charMap.get(c)) {\n hasDifferingValues = true;\n break;\n }\n }\n\n if (!hasDifferingValues) {\n validPassphrase = false;\n break;\n }\n }\n }\n\n // we don't need to check the rest of the words if we already know the line is invalid\n if (!validPassphrase)\n break;\n usedWords.add(charMap);\n }\n\n if (validPassphrase) {\n validPhrases++;\n }\n }\n\n System.out.println(\"The solution to part 2 is: \" + validPhrases);\n } catch (Exception ex) {\n System.out.println(\"An error occurred attempting to read your input file.\");\n }\n }", "public static void main(String[] args) throws Exception {\n java.io.File threeLetterFile = new java.io.File(\"three-letter-words.txt\");\n \n //create custom SearchArray object with my search Methods\n threeletterwords.SearchArray search = new SearchArray();\n \n //create Scanner objects\n Scanner loadList = new Scanner(threeLetterFile);\n Scanner input = new Scanner(System.in);\n \n //declare arrays\n String[] threeLetterList = new String[1012];\n char[] startWordArray = new char[3];\n char[] finalWordArray = new char[3];\n char[] wordHolderArray = new char[3];\n char[] partialMatchArray = new char[3];\n char[] firstTwoArray = new char[2];\n char[] lastTwoArray = new char[2];\n \n //declare String Variables\n String startWord;\n String finalWord;\n String wordHolder;\n String partialMatch;\n String firstTwoHolder;\n String lastTwoHolder;\n \n //initialize boolean variables\n boolean wordCheck = true;\n boolean partialCheck = false;\n boolean firstTwoCheck = true;\n \n //initialize integer variables\n \n int moves = 0;\n int index = 0;\n \n /*This while loop will transfer the three letter words to the array\n * threeLetterList\n */\n \n while(loadList.hasNextLine()){\n threeLetterList[index] = loadList.nextLine();\n threeLetterList[index] = threeLetterList[index].toLowerCase();\n index++;\n }\n loadList.close();\n \n \n \n /* These do ... while loops make sure user only inputs a valid 3 letter \n * word from the list. Will loop until user gets it right.\n */\n \n do{\n System.out.println(\"Type in a Three Letter word from the list\");\n startWord = input.next();\n if (startWord.length() != 3){\n System.out.println(\"Word must be three Letters!\");\n }\n if (search.searchList(threeLetterList, startWord) == false){\n System.out.println(\"Word must be in list!\");\n }\n }while(startWord.length() != 3 || search.searchList(threeLetterList, startWord) == false);\n \n do{\n System.out.println(\"Type in a Second Three Letter word from the list\");\n finalWord = input.next();\n if (finalWord.length() != 3){\n System.out.println(\"Word must be three Letters!\");\n }\n if (search.searchList(threeLetterList, finalWord) == false){\n System.out.println(\"Word must be in list!\");\n }\n }while(finalWord.length() != 3 || search.searchList(threeLetterList, finalWord) == false);\n \n //initialize strings and arrays\n System.arraycopy(startWord.toCharArray(), 0, startWordArray, 0, 3);\n System.arraycopy(startWord.toCharArray(), 0, wordHolderArray, 0, 3);\n System.arraycopy(finalWord.toCharArray(), 0, finalWordArray, 0, 3);\n System.arraycopy(startWord.toCharArray(), 0, firstTwoArray, 0, 2);\n System.arraycopy(startWord.toCharArray(), 1, lastTwoArray, 0, 2);\n wordHolder = String.copyValueOf(wordHolderArray);\n firstTwoHolder = String.copyValueOf(firstTwoArray);\n lastTwoHolder = String.copyValueOf(lastTwoArray);\n \n /*the following section of code is what makes the \"moves\"\n * \n */\n while(wordHolder.toLowerCase().contentEquals(finalWord.toLowerCase()) == false){ \n for(int k = 0; k < finalWordArray.length; k++){\n if(wordHolderArray[k] != finalWordArray[k]){\n wordHolderArray[k] = finalWordArray[k];\n wordHolder = String.copyValueOf(wordHolderArray);\n if (search.searchList(threeLetterList, wordHolder) == true){\n moves++;\n System.out.println(\"Move \" + moves + \":\\t\" + wordHolder);\n }\n else{\n wordHolderArray[k] = startWordArray[k];\n wordHolder = String.copyValueOf(wordHolderArray);\n }\n }\n }\n if(wordHolder.toLowerCase().contentEquals(startWord.toLowerCase())){\n \n }\n } \n }", "public void populateDictionary() throws IOException {\n\t\tScanner scan = new Scanner(new File(\"dictionary.txt\"));\n\t\twhile(scan.hasNextLine()) {\n\t\t\tString curr = scan.nextLine().toLowerCase();\n\t\t\tthis.dictionary.add(curr);\n\t\t}\n\t}", "@Test\r\n\tpublic void testDictionaryChanged_oneDictionary() {\n\t\toutputUpdater.dictionaryChanged(Arrays.asList(\"english-words.35.txt\"));\r\n\r\n\t\tverify(mockFactory).createAndExecute(eq(mockProgressBarWrapper),\r\n\t\t eq(mockOutputTextViewWrapper),\r\n\t\t any(List.class),\r\n\t\t any(Pattern.class));\r\n\t\t// verify(mockOutputTextViewWrapper)\r\n\t\t// .setText(\"apples\\ngrapple\\ngrappled\\ngrapples\\npineapple\\npineapple's\\npineapples\");\r\n\t}", "public void loadDictionary() {\r\n\t\r\n\t\t\r\n\t\ttry {\r\n\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/English.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t// Aggiungere parola alla struttura dati\r\n\t \t\t\r\n\t \t\tthis.dictionary.add(word);\r\n\t \t\t\r\n\t\t}\r\n\t\tbr .close();\r\n\t\t} catch (IOException e ){\r\n\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t}\r\n\t\t\t\t\r\n\t\t\t\r\n\t try {\r\n\t\t\t\r\n\t\t\tFileReader fr = new FileReader( \"rsc/Italian.txt\" );\r\n\t\t BufferedReader br = new BufferedReader(fr);\r\n\t \tString word ;\r\n\t \twhile (( word = br .readLine()) != null ) {\r\n\t\t\t// Aggiungere parola alla struttura dati\r\n\t\t \t\t\r\n\t\t \t\tthis.dizionario.add(word);\r\n\t\t \t\t\r\n\t\t\t}\r\n\t\t\tbr .close();\r\n\t\t\t} catch (IOException e ){\r\n\t\t\tSystem. out .println( \"Errore nella lettura del file\" );\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "public static void main(String[] args){\n\tint numLanguages = in.nextInt();\n\t\n\t//map every language to its vocabulary\n\tfor(int i = 0; i < numLanguages; i++){\n\t String[] words = in.nextLine().split(\" \");\n\t String language = words[0];\n\t for(String s: words){\n\t\tlanguages.put(s.toLowerCase(), language);\n\t }\n\t}\n\n\t//get rid of blank line\n\tin.nextLine();\n\t\n\t//for each sentence, print out the language associated with it\n\twhile(in.hasNextLine()){\n\t String[] sentence = in.nextLine().split(\" \");\n\t for(String s: sentence){\n\t\tString language = null;\n\t\tif((language = languages.get(s.toLowerCase())) != null){\n\t\t System.out.println(language);\n\t\t break;\n\t\t}\n\t\t\n\t }\n\t}\n\n }", "public static void main(String[] args) \n\t{\n\t\tBoggleBoard.generateBoard();\n\t\tArrayList<String> usedWords = new ArrayList<String>();\n\t\tmyDictionary = new Dictionary(\"words.txt\"); //load the dictionary\n\t\tmyBoard = new BoggleBoard(\"board.txt\"); //load the board: board.txt for standard board, board2.txt for random board\n\t\tmyBoard.display(); //display the board\n\t\tint score = 0;\n\t\t\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"\\nEnter a word (or enter nothing at any point to end the game): \");\n\t\tString input = scan.nextLine();\n\t\tinput = input.toLowerCase();\n\t\t\n\t\twhile(!input.equals(\"\")) //user inputs a word\n\t\t{\n\t\t\tif(input.length() < 3) //words less than 3 letters don't count\n\t\t\t\tSystem.out.println(\"That word is too short.\");\n\t\t\telse if(Dictionary.search(input, 0, myDictionary.size-1) < 0) //user made up a word\n\t\t\t\tSystem.out.println(\"That word is not in the dictionary.\");\n\t\t\telse if(!myBoard.findWord(input.toUpperCase())) //word not on the board\n\t\t\t\tSystem.out.println(\"That word is a valid word, but is not on the board.\");\n\t\t\telse // myDictionary.search() && myBoard.findWord(input)\n\t\t\t{\n\t\t\t\tif(!usedWords.contains(input))\n\t\t\t\t{\n\t\t\t\t\t//account for grammar\n\t\t\t\t\tif(myBoard.score(input) == 1)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" point!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input); //add searched words to usedWords to make sure they cant be used again\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"That is a good word! You score \" + myBoard.score(input) + \" points!\");\n\t\t\t\t\t\tscore += myBoard.score(input);\n\t\t\t\t\t\tusedWords.add(input);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"That word was already used.\");\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println();\n\t\t\tmyBoard.display();\n\t\t\t\n\t\t\tSystem.out.print(\"Used words: \");\n\t\t\tfor(String d : usedWords)\n\t\t\t\tSystem.out.print(d + \", \");\n\t\t\t\n\t\t\tSystem.out.print(\"\\nEnter a word: \");\n\t\t\tinput = scan.nextLine();\n\t\t\tinput = input.toLowerCase();\n\t\t\t\n\t\t}\n\t\tSystem.out.println(\"Total score: \" + score); //end of the game.\n\t\tSystem.out.println(\"Thanks for playing!\");\n\t}", "private void readDictionaryFile(InputStream dictionary, CharsetDecoder decoder) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(dictionary, decoder));\n // TODO: don't create millions of strings.\n String line = reader.readLine(); // first line is number of entries\n int numEntries = Integer.parseInt(line);\n \n // TODO: the flags themselves can be double-chars (long) or also numeric\n // either way the trick is to encode them as char... but they must be parsed differently\n while ((line = reader.readLine()) != null) {\n String entry;\n HunspellWord wordForm;\n \n int flagSep = line.lastIndexOf('/');\n if (flagSep == -1) {\n wordForm = NOFLAGS;\n entry = line;\n } else {\n // note, there can be comments (morph description) after a flag.\n // we should really look for any whitespace\n int end = line.indexOf('\\t', flagSep);\n if (end == -1)\n end = line.length();\n \n String flagPart = line.substring(flagSep + 1, end);\n if (aliasCount > 0) {\n flagPart = getAliasValue(Integer.parseInt(flagPart));\n } \n \n wordForm = new HunspellWord(flagParsingStrategy.parseFlags(flagPart));\n Arrays.sort(wordForm.getFlags());\n entry = line.substring(0, flagSep);\n if(ignoreCase) {\n entry = entry.toLowerCase(Locale.ENGLISH);\n }\n }\n \n List<HunspellWord> entries = words.get(entry);\n if (entries == null) {\n entries = new ArrayList<HunspellWord>();\n words.put(entry, entries);\n }\n entries.add(wordForm);\n }\n }", "public static void main(String[] args) throws IOException {\n\tList<String> list=new List<String>();\n\t/* Read data from file or if not there than create file*/\n\tfileCreatOrRead();\n\t/*Splitting sentence after space in words and saving as stringArray */\n\tString stringArrayForList[]=stringdummy.split(\"\\\\s\");\n\t/*Insert words to list */\n\tfor (int i = 0; i < stringArrayForList.length-1; i++) {\n\t\t\n\t\tlist.insertAtEnd(stringArrayForList[i]);\n\t}\n\t\t\n\t/* Display list */\t\n\tlist.display();\n\t/* search word in list */\n\tSystem.out.println(\"please enter word to search\");\n\treadString=scanner.next();\n\t\n\tif(list.search(readString)) {\n\t\tSystem.out.println(\"word is found and deleted from list\");\n\t\tlist.display();\n\t}\n\t\t\n\telse {\n\t\tSystem.out.println(\"word not found and added to list\");\n\t\tlist.insertAtEnd(readString);\n\t}\n\t\n\t}", "public void findWord() throws IOException{\r\n int lineCounter = 0; //lineCounter is the variable that will be used to print out on which line in the file the word is found on\r\n Scanner dataFile; //dataFile is the declared variable name for the file this method will be searching through\r\n dataFile = new Scanner(new File(filePath)); //Opening the file and setting dataFile equal to it\r\n System.out.print(\"\\n\\n__________________________________________________________________\\nResults:\\nThe word '\" + wordSearched + \"' appears on line(s): \"); //This begins the output on the screen that the user will see telling them on what line the word appears.\r\n while(dataFile.hasNext()){ //While the file has a next line this will execute\r\n String line = dataFile.nextLine(); //the variable is declared as line and set equal to the next line that is found in the file\r\n int lineCharLength = line.length(); //lineCharLength is set to the length of 'line' found in the line above.\r\n char[] characters = new char[lineCharLength]; //An array of characters is initialized as the length of the line\r\n lineCounter++; //the line counter will increment by one as the file begins to check the first line in the file, and so on every time this while loop runs.\r\n for(int i = 0; i < lineCharLength; i++){ //this for loop takes the characters in the line being read and puts them into an array\r\n characters[i] = line.charAt(i); //the characters are read one by one and put into the array\r\n characters[i] = Character.toLowerCase(characters[i]); //whatever character was found in the line above is set to lowercase so that it becomes uniform with the wordSearched.\r\n }//end of for loop\r\n for(int j = 0; j < lineCharLength; j++){ //this for loop takes the characters in the line being read and compares them to the characters in the word being searched.\r\n if(characters[j] == wordSearched.charAt(0)){ //this conditional statments checks to see if the character being compared equals the first in the word being searched.\r\n if(j++ < lineCharLength-1){ //this conditional statment checks to make sure that the next character being compared isnt the past end of the line.\r\n if(characters[j] == wordSearched.charAt(1)){ //this conditional statments checks to see if the character being compared equals the second in the word being searched.\r\n j=((--j+(wordLength-1))); //this line changes the character in the line being searched to the length of the word being searched to verify that the word is in fact the one being searched.\r\n if(j <= lineCharLength-1){ //this conditional statment checks to make sure that the next character being compared isnt the past end of the line.\r\n if(characters[j] == wordSearched.charAt(wordLength-1)){ //this conditional statment checks the character at the index of the wordLength of the word being searched.\r\n occurrences++; //the occurrences variable increments by one to count the times the word is found in the file.\r\n System.out.print(lineCounter + \", \"); //if the word appears on the line being searched this will execute to tell the user which line contains the word.\r\n }\r\n }\r\n }\r\n }\r\n } \r\n }//end of for loop\r\n }//end of while loop\r\n this.occurrences = occurrences; //the occurrences variable is set to whatever occurrences total came to after the file was searched\r\n }", "public static void main(final String[] args)\r\n {\r\n // Set the path to the data files\r\n Dictionary.initialize(\"c:/Program Files/WordNet/2.1/dict\");\r\n \r\n // Get an instance of the Dictionary object\r\n Dictionary dict = Dictionary.getInstance();\r\n \r\n // Declare a filter for all terms starting with \"car\", ignoring case\r\n TermFilter filter = new WildcardFilter(\"car*\", true);\r\n \r\n // Get an iterator to the list of nouns\r\n Iterator<IndexTerm> iter = \r\n dict.getIndexTermIterator(PartOfSpeech.NOUN, 1, filter);\r\n \r\n // Go over the list items\r\n while (iter.hasNext())\r\n {\r\n // Get the next object\r\n IndexTerm term = iter.next();\r\n \r\n // Write out the object\r\n System.out.println(term.toString());\r\n \r\n // Write out the unique pointers for this term\r\n int nNumPtrs = term.getPointerCount();\r\n if (nNumPtrs > 0)\r\n {\r\n // Print out the number of pointers\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumPtrs) +\r\n \" pointers\");\r\n \r\n // Print out all of the pointers\r\n String[] ptrs = term.getPointers();\r\n for (int i = 0; i < nNumPtrs; ++i)\r\n {\r\n String p = Pointer.getPointerDescription(term.getPartOfSpeech(), ptrs[i]);\r\n System.out.println(ptrs[i] + \": \" + p);\r\n }\r\n }\r\n \r\n // Get the definitions for this term\r\n int nNumSynsets = term.getSynsetCount();\r\n if (nNumSynsets > 0)\r\n {\r\n // Print out the number of synsets\r\n System.out.println(\"\\nThis term has \" + Integer.toString(nNumSynsets) +\r\n \" synsets\");\r\n \r\n // Print out all of the synsets\r\n Synset[] synsets = term.getSynsets();\r\n for (int i = 0; i < nNumSynsets; ++i)\r\n {\r\n System.out.println(synsets[i].toString());\r\n }\r\n }\r\n }\r\n \r\n System.out.println(\"Demo processing finished.\");\r\n }", "public static void showfiles()\n\t{\n File curDir = new File(\".\");\n String[] fileNames = curDir.list();\n ArrayList<String> data = new ArrayList<String>();\n\n //Find files which may have data. (aka, are in the .dat format)\n for(String s:fileNames)\n if(s.endsWith(\".dat\"))\n data.add(s);\n\n\t\tdata.trimToSize();\n\t\t\n\t\tclearScreen();\n\n\t\tSystem.out.println(\"\\t\\t\\tTHE BOOK SEARCH PROGRAM\");\n\n\t\t\n\t\tfor(int i = 0; i < 80; i++)\n\t\tSystem.out.print(\"-\");\n\t\n\n\t\tSystem.out.println(\"\\nWhat file is your book data stored in?\\n\");\n\t\n\t\tSystem.out.println(\"Here are the .dat file(s) in the current directory:\\n\");\n\n\t \tfor(int i = 0; i < data.size(); i++)\n\t\tSystem.out.print(\"[ \" + data.get(i) + \" ]\\t\");\n\t\tSystem.out.println(\"\\n\");\n\n\n\t}", "public void dictionaryBasic() {\n dictionaryManagement.insertFromCommandline();\n showAllWords();\n }", "private static void list() throws FileNotFoundException {\n ArrayList<String> words = new ArrayList<>();\n Scanner input = new Scanner(new File(fileLocation));\n while (input.hasNext()) {\n String word = input.next();\n if (!words.contains(word)) {\n words.add(word);\n }\n }\n }", "private static void ProcessFile(File fileEntry) throws FileNotFoundException {\n \n\t wordCount(fileEntry) ;\n\t\t\n countVowels(fileEntry);\n\t\n\t\t\n}", "public static ArrayList<Word> getMisspelledWords(Scanner lineReader,\n\t\t\t\t\t\t\t TreeSet<String> \n\t\t\t\t\t\t\t dictionary)\n {\n\tArrayList<Word> misspelledWords = new ArrayList<Word>();\n\n\tlineReader.useDelimiter(\"[^a-zA-Z0-9']+\");\n\tScanner wordReader;\n\tint lineCount = 0;\n\tString thisLine, word;\n\n\twhile(lineReader.hasNext())\n\t {\n\t\tlineCount ++;\n\t\tthisLine = lineReader.nextLine();\n\t\twordReader = new Scanner(thisLine);\n\t\twordReader.useDelimiter(\"[^a-zA-Z0-9']+\");\n\t\t\n\t\twhile(wordReader.hasNext())\n\t\t {\n\t\t\tword = wordReader.next().toLowerCase();\n\t\t\tif(!dictionary.contains(word))\n\t\t\t {\n\t\t\t\tmisspelledWords.add\n\t\t\t\t (new Word(word, lineCount));\n\t\t\t }\n\t\t }\n\t }\n\n\treturn misspelledWords;\n }", "private static void loadFiles(String[] files) throws IOException {\n\t\tfor(String file : files){\n\n\t\t\t//Create reader for the file\n\t\t\tBufferedReader fileReader = new BufferedReader(new FileReader(file));\n\n\t\t\t//Create HashMap to store words and counts\n\t\t\tHashMap<String,WordCount> fileWordCounts = new HashMap<String,WordCount>();\n\t\t\tArrayList<String> sentences = new ArrayList<String>();\n\n\t\t\t//While the file still has more lines to be read from\n\t\t\twhile(fileReader.ready()){\n\n\t\t\t\t//Read a line from the file\n\t\t\t\tString fileLine = fileReader.readLine();\n\t\t\t\t//Add the line to file sentences\n\t\t\t\tsentences.add(fileLine);\n\t\t\t\t//Split the file and remove punctuation from words\n\t\t\t\tString[] fileWords = fileLine.replaceAll(\"[^a-zA-Z ]\", \"\").toLowerCase().split(\"\\\\s+\");\n\n\t\t\t\t//iterate through all words in each line\n\t\t\t\tfor (String word : fileWords)\n\t\t\t\t{\n\t\t\t\t\tWordCount count = fileWordCounts.get(word);\n\t\t\t\t\t//If word is not in file, add it \n\t\t\t\t\tif (count == null) {\n\t\t\t\t\t\tfileWordCounts.put(word,new WordCount(word));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount.inc(); //If not, increment it\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t}\n\n\t\t\t//Add file to fileDatabase \n\t\t\tfileDatabase.map.put(file, new FileObject(file, fileWordCounts, sentences));\n\n\t\t\tfileReader.close(); // Close File\n\n\t\t}//End of For Loop reading from all files\n\t}", "public static void main(String[] args) throws FileNotFoundException {\n\n\n\n\n FileReader fileReader = null;\n try {\n // 파일 생성 부분 추가 필요 20151222\n // 파일 생성(R/W) 및 초기 데이터 추가한다.\n // 한글좀 그만 꺠져라..\n // 아좀..\n // 다시 테스트\n // 다시..\n fileReader = new FileReader(\"D:/wordList.txt\");\n } catch (FileNotFoundException e1) {\n // TODO Auto-generated catch block\n System.out.println(\"파일을 찾을 수 없습니다.\");\n System.exit(-1);\n }\n\n BufferedReader bufferedReader = null;\n bufferedReader = new BufferedReader(fileReader);\n\n StringBuffer stringBuffer = null;\n String line = null;\n\n ArrayList<String> wordList = new ArrayList<String>();\n\n try {\n while((line = bufferedReader.readLine()) != null) {\n stringBuffer = new StringBuffer();\n\n stringBuffer.append(line);\n\n wordList.add(stringBuffer.toString());\n }\n } catch (IOException e) {\n // TODO Auto-generated catch block\n System.out.println(\"파일을 읽는 중 오류가 발생하였습니다.\");\n System.exit(-1);\n }\n\n\n Random random = new Random();\n int randomIndex = random.nextInt(wordList.size());\n String temp = wordList.get(randomIndex);\n\n\n char[] randomChar = temp.toCharArray();\n char[] encChar = new char[randomChar.length];\n\n\n System.out.println(String.valueOf(randomChar));\n\n for(int i = 0; i < randomChar.length; i++) {\n encChar[i] = '*';\n }\n\n System.out.println(String.valueOf(encChar));\n\n\n Career_2015 cc = new Career_2015();\n Scanner in = new Scanner(System.in);\n\n char inputChar = 0;\n boolean isContain = false;\n boolean isExists = false;\n int ascii = 0;\n int errorCount = 0;\n\n\n Map<Character, Boolean> inputCharMap = new HashMap<Character, Boolean>();\n Map<Character, ArrayList<Integer>> changeCharMap = new HashMap<Character, ArrayList<Integer>>();\n\n do {\n System.out.print(\"알파벳 소문자를 입력하세요. : \");\n\n try {\n inputChar = (char)cc.read();\n ascii = (int)inputChar;\n\n\n\n // 입력한 문자가 이미 입력한 문자인지 체크\n if(inputCharMap.containsKey(inputChar)) {\n System.out.println(\"입력했던 문자입니다. 다시 입력해주세요.\");\n isContain = true;\n } else inputCharMap.put(inputChar, true);\n\n // 입력한 글자가 선택한 단어에 포함되는지 체크\n changeCharMap = cc.isChangeChar(randomChar, inputChar);\n if(!changeCharMap.isEmpty()) {\n cc.changeChar(encChar, changeCharMap, inputChar);\n\n System.out.println(String.valueOf(encChar));\n\n if(String.valueOf(randomChar).equals(String.valueOf(encChar))) {\n System.out.println(\"모두 맞히셨습니다. 종료합니다.\");\n System.exit(-1);\n }\n } else {\n errorCount++;\n System.out.println(errorCount + \"번 틀리셨습니다.\");\n }\n\n\n\n\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n\n } while((ascii < 97 || ascii > 122) || isContain || errorCount < 7);\n\n System.out.println(\"종료\");\n }", "public static void main(String[] args) {\n String words[] = {\"a\",\"apple\",\"argument\",\"aptitude\", \"ball\", \"bat\"};\r\n Trie trie = new Trie(Arrays.asList(words));\r\n \r\n try\r\n {\r\n \twhile(true)\r\n \t{\r\n \t\tSystem.out.println(\"Word to lookup\");\r\n \t\tString word = br.readLine().trim();\r\n \t\tif( word.isEmpty())\r\n \t\t\tbreak;\r\n \t\tif( trie.containsWord(word))\r\n \t\t\tSystem.out.println(word + \" found\");\r\n \t\telse if( trie.containsPrefix(word))\r\n \t\t{\t\r\n \t\t\tif( confirm(word + \"is a prifix add as a word?\"))\r\n \t\t\t\ttrie.addWord(word);\r\n \t\t}else\r\n \t\t{\r\n \t\t if( confirm(\"Add \" + word + \"?\" ))\r\n \t\t \ttrie.addWord(word);\r\n \t\t}\r\n \t}\r\n }catch(IOException e)\r\n {\r\n \te.printStackTrace();\r\n }\r\n\t}", "@Test\r\n\tpublic void testDictionaryChanged_manyDictionaries() {\n\t\toutputUpdater.dictionaryChanged(Arrays.asList(\"english-words.10.txt\",\r\n\t\t \"english-words.20.txt\",\r\n\t\t \"english-words.35.txt\"));\r\n\r\n\t\tverify(mockFactory).createAndExecute(eq(mockProgressBarWrapper),\r\n\t\t eq(mockOutputTextViewWrapper),\r\n\t\t any(List.class),\r\n\t\t any(Pattern.class));\r\n\t\t// verify(mockOutputTextViewWrapper)\r\n\t\t// .setText(\"apple\\napple's\\napples\\ngrapple\\ngrappled\\ngrapples\\npineapple\\npineapple's\\npineapples\");\r\n\t}", "public static void main(String[] args) throws IOException {\n ArrayList<String> words = new ArrayList<String>();\n BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(\"src/main/resources/test.txt\")));\n String temp;\n while((temp = reader.readLine())!=null){\n words.add(temp);\n }\n\n // Step two: build dat\n DATrie dat = new DATrie(DATrie.InitType.Empty);\n for(String word : words)\n dat.add(word);\n\n // Step three: check word\n System.out.println(dat.contains(\"敏感\")+\" \"+dat.contains(\"敏感地带\") +\" \"+dat.contains(\"晓峰\"));\n System.out.println(dat.maxMatch(\"敏感\", 1));\n }", "private static void doHelp() {\r\n\t\tdoUsage();\r\n\t\tSystem.out.println(\"\\n\" + \"When passed a dictionary and a document, spell check the document. Optionally,\\n\"\r\n\t\t\t\t+ \"the switch -n toggles non-interactive mode; by default, the tool operates in\\n\"\r\n\t\t\t\t+ \"interactive mode. Interactive mode will write the corrected document to disk,\\n\"\r\n\t\t\t\t+ \"backing up the uncorrected document by concatenating a tilde onto its name.\\n\\n\"\r\n\t\t\t\t+ \"The optional -d switch with a dictionary parameter enters dictionary edit mode.\\n\"\r\n\t\t\t\t+ \"Dictionary edit mode allows the user to query and update a dictionary. Upon\\n\"\r\n\t\t\t\t+ \"completion, the updated dictionary is written to disk, while the original is\\n\"\r\n\t\t\t\t+ \"backed up by concatenating a tilde onto its name.\\n\\n\"\r\n\t\t\t\t+ \"The switch -h displays this help and exits.\");\r\n\t\tSystem.exit(0);\r\n\t}", "public List<String> spellCheck(String fileName) {\r\n List<String> list = new LinkedList<String>();\r\n\r\n Scanner fileScanner;\r\n\r\n try {\r\n // use a FileInputStream to ensure correct reading end-of-file\r\n fileScanner = new Scanner(new FileInputStream(\"data\" + File.separator +fileName));\r\n\r\n while (fileScanner.hasNextLine()) {\r\n String nextLine = fileScanner.nextLine();\r\n // System.out.println(\"nextLine: \" + nextLine); uncomment if you want to see what is read in\r\n String [] words = nextLine.split(\" \");\r\n\r\n for(int i = 0; i < words.length; i++)\r\n {\r\n if(words[i].length() > 0 && !contains(words[i]))\r\n {\r\n list.add(words[i]);\r\n }\r\n }\r\n }\r\n\r\n } catch (FileNotFoundException ex) {\r\n System.out.println(\"could not find the file \" +fileName+ \"in the data directory!\");\r\n return null;\r\n }\r\n\r\n return list;\r\n }", "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 static void main(String[] args) \r\n\t{\n\t\tArrayList<String> fileNames = new ArrayList<String>();\r\n\t\t//arraylist for words on which you should run whichPages\r\n\t\tArrayList<String> whichPagesWords = new ArrayList<String>();\r\n\t\t//int variable for number of stopWords\r\n\t\tint stopWords = 0;\r\n\r\n\r\n\t\ttry{\r\n\t\t\t//Read in the file\r\n\t\t\tScanner scanFile = new Scanner(new File(args[0]));\r\n\r\n\t\t\t//tell the scanner to scan file names until the flag\r\n\t\t\twhile(true){\r\n\r\n\t\t\t\t//scan in the line\r\n\t\t\t\tString s = scanFile.nextLine();\r\n\r\n\t\t\t\tif(s.equals(\"*EOFs*\")){\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse{\r\n\t\t\t\t\tfileNames.add(s);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//get the number of stop words\r\n\t\t\tstopWords = scanFile.nextInt();\r\n\r\n\t\t\t//eat the extra newline\r\n\t\t\tscanFile.nextLine();\r\n\r\n\t\t\t//read in the words for whichPages\r\n\t\t\twhile(scanFile.hasNext()){\r\n\t\t\t\tString s = scanFile.nextLine(); \r\n\t\t\t\twhichPagesWords.add(s.toLowerCase());\r\n\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tSystem.out.println(\"Error: \" + e);\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\r\n\t\t//create the WebPages object\r\n\t\tWebPages webPages = new WebPages();\r\n\r\n\t\t//add the new pages\r\n\t\tfor(int i = 0; i < fileNames.size(); i++){\r\n\t\t\twebPages.addPage(fileNames.get(i));\r\n\t\t}\r\n\r\n\t\t//print terms\r\n\t\twebPages.printTerms();\r\n\r\n\t\t//remove stop words\r\n\t\twebPages.pruneStopWords(stopWords);\r\n\r\n\t\t//print terms again\r\n\t\twebPages.printTerms();\r\n\r\n\t\t//run whichPages method\r\n\t\tfor(int i = 0; i < whichPagesWords.size(); i++){\r\n\t\t\tString[] array = webPages.whichPages(whichPagesWords.get(i));\r\n\r\n\t\t\t//String to be printed for each whichPages word\r\n\t\t\tString s = whichPagesWords.get(i);\r\n\r\n\t\t\t//if the word isn't found, return word not found\r\n\t\t\tif(array == null){\r\n\t\t\t\ts += \" not found\";\r\n\t\t\t}\r\n\r\n\t\t\t//otherwise, return the word and the pages it occurs on\r\n\t\t\telse{\r\n\t\t\t\t//String to print\r\n\t\t\t\ts += \" in pages: \";\r\n\r\n\t\t\t\tfor(int j = 0; j < array.length-1; j++){\r\n\t\t\t\t\ts += array[j] + \", \";\r\n\t\t\t\t}\r\n\r\n\t\t\t\ts += array[array.length-1];\r\n\t\t\t}\r\n\r\n\t\t\tSystem.out.println(s);\r\n\t\t}\r\n\t}", "public static void main(String[] args) {\n\t\tStopWatch time = new StopWatch();\n\t\ttime.start();\n\n\t\t//read in the files\n\t\tFile linuxFile = new File(inFile);\n\t\tFile wordFile = new File(dictionary);\n\t\ttry {\n\t\t\tScanner fileScan = new Scanner(linuxFile);\n\t\t\tScanner dictScan = new Scanner(wordFile);\n\t\t\tpopulateWordList(dictScan);\n\n\n\t\t\tString lineText;\n\t\t\tString firstName;\n\t\t\tString lastName;\n\t\t\t//\t\t\tint lastnamePosition;\n\t\t\tString salt;\n\t\t\tString pw;\n\t\t\tString found;\n\t\t\tint countFound =0;\n\t\t\tint countTotal =0;\n\t\t\twhile(fileScan.hasNextLine()) {\n\t\t\t\tcountTotal++;\n\t\t\t\t//SCAN THROUGH EACH LINE, TRY TO CRACK THE PASSWORD FOR EACH PERSON\n\t\t\t\t//PARSE LINE\n\t\t\t\tint startIndex = 0;\n\t\t\t\tlineText = fileScan.nextLine();\n\t\t\t\tString[] arr = lineText.split(\":\");\n\n\t\t\t\tString name = arr[4];\n\t\t\t\tfirstName = name.split(\" \")[0];\n\t\t\t\tlastName = name.split(\" \")[1];\n\n\n\t\t\t\tstartIndex = lineText.indexOf(':') +1;\n\t\t\t\tsalt = lineText.substring(startIndex, startIndex+2);\n\t\t\t\tpw = lineText.substring(startIndex+2, lineText.indexOf(':', lineText.indexOf(':') + 1));\n\n\t\t\t\tSystem.out.println(\"first name: \" + firstName + \"\\tlast name: \" + lastName + \"\\tsalt: \" + salt + \"\\tpw: \" + pw);\n\n\t\t\t\tSystemUser user = new SystemUser(firstName, lastName, salt, pw);\n\n\t\t\t\tfound = crackPW(user);\n\t\t\t\tif(found != null) {\n\t\t\t\t\t//PRINT SOME STUFF\n\t\t\t\t\tcountFound++;\n\t\t\t\t\tSystem.out.println(\"password found!!!!\");\n\t\t\t\t\tSystem.out.println(\"Password: \" + found);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"NOT FOUND\");\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\n\n\t\t\t}\n\t\t\tSystem.out.println(\"# of PW found: \" + countFound + \"\\tOut of: \" + countTotal);\n\n\t\t\tfileScan.close();\n\t\t\tdictScan.close();\n\t\t} \n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\ttime.stop();\n\t\tSystem.out.println(\"seconds: \" +time.time());\n\t}", "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 static void testDictionary() throws IOException {\n String wnhome=\"c:\\\\Users\\\\Katherine\\\\Documents\\\\2nd sem\\\\IR\\\\project\\\\WordNet_3.1\";\n String path = wnhome + File.separator + \"dict\";\n\n\n URL url = new URL(\"file\", null, path);\n\n IDictionary dictionary = new Dictionary(url);\n dictionary.open();\n // /Users/Ward/Downloads\n IIndexWord indexWord = dictionary.getIndexWord(\"use\", POS.VERB);\n\n for (IWordID wordID : indexWord.getWordIDs()) {\n\n IWord word = dictionary.getWord(wordID);\n for (IWord word1 : word.getSynset().getWords()) {\n System.out.println(word1.getLemma());\n }\n// System.out.println(\"Id = \" + wordID);\n// System.out.println(\" Lemma = \" + word.getLemma());\n// System.out.println(\" Gloss = \" + word.getSynset().getGloss());\n\n List<ISynsetID> hypernyms =\n word.getSynset().getRelatedSynsets(Pointer.HYPERNYM);\n // print out each h y p e r n y m s id and synonyms\n List<IWord> words;\n for (ISynsetID sid : hypernyms) {\n words = dictionary.getSynset(sid).getWords();\n System.out.print(sid + \" {\");\n for (Iterator<IWord> i = words.iterator(); i.hasNext(); ) {\n System.out.print(i.next().getLemma());\n if (i.hasNext())\n System.out.print(\", \");\n }\n System.out.println(\"}\");\n }\n }\n }", "public static void main(String[] args) {\n\n File input = new File(args[0]);\n Bag<String> statistics = new Bag<>();\n\n input.exists();\n\n try (Scanner sc = new Scanner(input)) {\n while (sc.hasNextLine()) {\n statistics.add(sc.nextLine());\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to access file: \" + args[0]);\n }\n\n System.out.println(\"Word statistics: \" + statistics);\n }", "public static void startup() {\n\t\tString thisLine;\n\t\tString currentName = \"\";\n\t\tboolean next = true;\n\n\t\t// DEBUG\n\t\t// System.out.println(\"entered here\");\n\n\t\t// Loop across the arguments\n\n\t\t// Open the file for reading\n\t\ttry {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(GIGA_WORD));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// .replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tString[] wordNumber = str.split(\"[ ]{2,}\");\n\t\t\t\tString word = wordNumber[0].toLowerCase();\n\t\t\t\tint cnt = Integer.parseInt(wordNumber[1]);\n\t\t\t\tgigaMap.put(word, cnt);\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\twhile ((thisLine = br.readLine()) != null) {\n\t\t\t\tString str = thisLine.trim();// replaceAll(\"(\\\\r|\\\\n)\", \"\");\n\t\t\t\tif (str.equals(\"[Term]\")) {\n\t\t\t\t\tnext = true;\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"name:\")) {\n\t\t\t\t\tif (next) {\n\t\t\t\t\t\tcurrentName = str.replaceAll(\"name: \", \"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (str.startsWith(\"synonym:\")) {\n\t\t\t\t\tif (str.contains(\"EXACT\") || str.contains(\"NARROW\")) {\n\t\t\t\t\t\t// synonym..\n\t\t\t\t\t\tPattern pattern = Pattern\n\t\t\t\t\t\t\t\t.compile(\"synonym:.*\\\"(.*)\\\".*\");\n\t\t\t\t\t\tMatcher matcher = pattern.matcher(str);\n\t\t\t\t\t\t// DEBUG\n\t\t\t\t\t\t// System.err.println(str);\n\t\t\t\t\t\tif (matcher.find()) {\n\t\t\t\t\t\t\tString syno = matcher.group(1);\n\t\t\t\t\t\t\tif (!currentName.equals(\"\")) {\n\t\t\t\t\t\t\t\t// System.err.format(\"%s:%s.\\n\", currentName,\n\t\t\t\t\t\t\t\t// syno);\n\n\t\t\t\t\t\t\t\tadd(currentName, syno);\n\t\t\t\t\t\t\t\tadd(syno, currentName);\n\t\t\t\t\t\t\t\trecursiveAddSyno(currentName, syno);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tbr = null;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error: \" + e);\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tScanner in = new Scanner(System.in);\n\t\t\n\t\t\n\t\tString whatever = \"Add more changes and commit\";\n\t\tDictionary dictionary = new Dictionary();\n\t\t\n\t\tBlue.pl(\"Enter a word (or type 0 to exit)\"); //It should be noted that Blue.pl is a shorthand for printline. \n\t\t\n\t\tboolean looper = true;\n\t\twhile (looper){\n\t\t\n\t\tString s = in.nextLine();\n\t\t\n\t\tif (s.equals(\"0\")){\n\t\t\t\n\t\t\tlooper = false;\n\t\t\t\n\t\t} else {\n\t\t\n\t\t\tif (dictionary.contains(s)){\n\t\t\t//contains is a method which takes a string and returns a boolean. \n\t\t\tBlue.pl(s+\" is a word.\");\n\t\t\t\n\t\t\t} else {\n\t\t\tBlue.pl(s+\" is not a word.\");\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public final void loadDict() {\r\n try {\r\n FileInputStream inf = new FileInputStream(dictionary);\r\n char let;\r\n String str = \"\";\r\n int n = 0;\r\n while ((n = inf.read()) != -1) {\r\n let = (char) n;\r\n if (Character.isLetter(let)) {\r\n str += Character.toLowerCase(let);\r\n }\r\n if ((Character.isWhitespace(let) || let == '-') && !str.isEmpty()) { \r\n dictList[str.charAt(0) - 97].add(str);\r\n str = \"\";\r\n\r\n }\r\n\r\n }\r\n inf.close();\r\n\r\n } catch (IOException e) {\r\n\r\n e.printStackTrace();\r\n\r\n }\r\n }", "public static void main(String[] args) {\n\tboolean output = false;\n\t\t\n\t\tSystem.out.print(\"Please enter the word(s) to search for\\n\");\n\t\tString w = TextIO.getln();\n\t\t\n\t\t\t\t\n\t\tTextIO.putln(\"Searching for '\" + w + \"'\");\n\t\t\n\n\t\t\n\t\tTextIO.readFile(\"thematrix.txt\");\n\t\t\n\t\toutput = false; \n\t\tint count = 0;\n\t\t\n\t\t\n\t\t\n\t\twhile (false == TextIO.eof()) {\n\t\t\tcount = count + 1;\n\t\t\tString line = TextIO.getln();\n\t\t\t\t\t\n\t\t\tString line_capital = line.toUpperCase();\n\t\t\tString w_capital = w.toUpperCase();\n\t\t\t\n\t\t\tif (line_capital.indexOf(w_capital)<0) \n\t\t\t\toutput = false;\n\t\t\t\n\t\t\tif (line_capital.indexOf(w_capital) >= 0)\n\t\t\t\toutput = true; \n\t\t\tif (output ){\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tline = line.trim();\n\t\t\t\tTextIO.putln(count + \" \" + \"-\" + \" \" + line);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\tTextIO.putln(\"Done Searching for '\" + w + \"'\");\n\t\n\t}", "@Test\n\tpublic void notWordGrepTest() throws Exception{\n\t\t// word is 'unconstitutional'\n\t\tHashSet<String> grepFound = loadGrepResults(\"unconstitutional\");\n\t\tCollection<Page> index = queryTest.query(\"!unconstitutional\");\n\t\tHashSet<String> indexFound = new HashSet<String>();\n\n\t\tfor (Page p : index)\n\t\t\tindexFound.add(p.getURL().getPath().toLowerCase());\n\t\t\n\t\t// 9359 valid files in RHF\n\t\tassertEquals(indexFound.size(), 9359 - grepFound.size());\n\t\t\n\t\t// check that the sets are disjoint\n\t\tfor (String s : indexFound)\n\t\t\tassertFalse(grepFound.contains(s));\n\t\tfor (String s : grepFound)\n\t\t\tassertFalse(indexFound.contains(s));\n\t}", "public static void main(String[] args) {\n\t\tFile vocabDefFile = new File(args[0]);\r\n\r\n\t\t// where do the reports go\r\n\t\tFile outputDir = new File(args[1]);\r\n\r\n\t\t// create the report files\r\n\t\tFile ambigReportFile = new File(outputDir, \"ambigVocab.txt\");\r\n\t\tFile pluralReportFile = new File(outputDir, \"missingPlural.txt\");\r\n\t\tFile pluralDetailsFile = new File(outputDir, \"singlePlurals.txt\");\r\n\r\n\t\tBufferedWriter ambigWriter = null;\r\n\t\tBufferedWriter pluralWriter = null;\r\n\t\tBufferedWriter numberWriter = null;\r\n\r\n\t\ttry {\r\n\t\t\tambigWriter = new BufferedWriter(new OutputStreamWriter(\r\n\t\t\t\t\tnew FileOutputStream(ambigReportFile), \"UTF-8\"));\r\n\t\t\tpluralWriter = new BufferedWriter(new OutputStreamWriter(\r\n\t\t\t\t\tnew FileOutputStream(pluralReportFile), \"UTF-8\"));\r\n\t\t\tnumberWriter = new BufferedWriter(new OutputStreamWriter(\r\n\t\t\t\t\tnew FileOutputStream(pluralDetailsFile), \"UTF-8\"));\r\n\t\t} catch (UnsupportedEncodingException e) {\r\n\t\t\tSystem.err.println(\"Couldn't get writer for report output\"\r\n\t\t\t\t\t+ e.getMessage());\r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.err.println(\"Couldn't get writer for report output\"\r\n\t\t\t\t\t+ e.getMessage());\r\n\t\t}\r\n\r\n\t\tloadIndexes(vocabDefFile);\r\n\r\n\t\tSystem.out.println(wordIndex.size() + \" words\");\r\n\t\tSystem.out.println(typeIndex.size() + \" categories\");\r\n\r\n\t\t// look for words in more than 1 category\r\n\t\tfor (String word : wordIndex.keySet()) {\r\n\t\t\tList<String> tmpList = wordIndex.get(word);\r\n\t\t\tCollections.sort(tmpList);\r\n\r\n\t\t\tif (tmpList.size() > 1) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tambigWriter.write(word + \"\\t\" + tmpList.size() + \"\\t\"\r\n\t\t\t\t\t\t\t+ tmpList);\r\n\t\t\t\t\tambigWriter.newLine();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.err.println(\"Couldn't write to ambig report\"\r\n\t\t\t\t\t\t\t+ e.getMessage());\r\n\t\t\t\t}\r\n\t\t\t\t// System.out.println(word + \"\\t\" + tmpList);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tambigWriter.flush();\r\n\t\t} catch (IOException e1) {\r\n\t\t\tSystem.err\r\n\t\t\t\t\t.println(\"Couldn't flush ambig report\" + e1.getMessage());\r\n\r\n\t\t}\r\n\r\n\t\t// look for missing plurals\r\n\r\n\t\tfor (String type : typeIndex.keySet()) {\r\n\r\n\t\t\t// list of all phrases of a single category\r\n\t\t\tList<String> wordList = new ArrayList<String>();\r\n\t\t\twordList.addAll(typeIndex.get(type));\r\n\r\n\t\t\tfor (String word : wordList) {\r\n\r\n\t\t\t\tboolean foundMatch = false;\r\n\t\t\t\tString sing = \"\";\r\n\t\t\t\tString plural = \"\";\r\n\r\n\t\t\t\tif (wordList.contains(word + \"s\")) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tsing = word;\r\n\t\t\t\t\tplural = word + \"s\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (word.endsWith(\"s\")\r\n\t\t\t\t\t\t&& wordList.contains(word.replaceAll(\"s$\", \"\"))) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tplural = word;\r\n\t\t\t\t\tsing = word.replaceAll(\"s$\", \"\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (word.endsWith(\"man\")\r\n\t\t\t\t\t\t&& wordList.contains(word.replaceFirst(\"man$\", \"men\"))) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tsing = word;\r\n\t\t\t\t\tplural = word.replaceFirst(\"man$\", \"men\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (word.endsWith(\"men\")\r\n\t\t\t\t\t\t&& wordList.contains(word.replaceFirst(\"men$\", \"man\"))) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tplural = word;\r\n\t\t\t\t\tsing = word.replaceFirst(\"men$\", \"man\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (wordList.contains(word + \"es\")) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tsing = word;\r\n\t\t\t\t\tplural = word + \"es\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (word.endsWith(\"es\")\r\n\t\t\t\t\t\t&& wordList.contains(word.replaceAll(\"es$\", \"\"))) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tplural = word;\r\n\t\t\t\t\tsing = word.replaceAll(\"es$\", \"\");\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (word.endsWith(\"y\")\r\n\t\t\t\t\t\t&& wordList.contains(word.replaceAll(\"y$\", \"\") + \"ies\")) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tsing = word;\r\n\t\t\t\t\tplural = word.replaceAll(\"y$\", \"\") + \"ies\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (word.endsWith(\"ies\")\r\n\t\t\t\t\t\t&& wordList.contains(word.replaceAll(\"ies$\", \"\") + \"y\")) {\r\n\t\t\t\t\tfoundMatch = true;\r\n\t\t\t\t\tplural = word;\r\n\t\t\t\t\tsing = word.replaceAll(\"ies$\", \"\") + \"y\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!foundMatch) {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tpluralWriter.write(word + \"\\t\" + type);\r\n\t\t\t\t\t\tpluralWriter.newLine();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\tSystem.err.println(\"Could write to plural report\"\r\n\t\t\t\t\t\t\t\t+ e.getMessage());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t} else {\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tnumberWriter.write(sing + \"\\t\" + plural + \"\\t\" + type);\r\n\t\t\t\t\t\tnumberWriter.newLine();\r\n\t\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\t\tSystem.err.println(\"Could write to plural details file\"\r\n\t\t\t\t\t\t\t\t+ e.getMessage());\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\ttry {\r\n\t\t\tpluralWriter.flush();\r\n\t\t\tnumberWriter.flush();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(\"Couldn't flush ambig report\" + e.getMessage());\r\n\r\n\t\t}\r\n\r\n\t}", "private void load(File dictionary) throws IOException {\n // open the file\n BufferedReader in = new BufferedReader(new FileReader(dictionary));\n \n // while file is readable\n while (in.ready()) {\n // get the next word in the file\n String s = in.readLine();\n // as long as the word is not just a new line character\n if (!s.equals(\"\\n\")) {\n // insert the word\n boolean noError = this.insert(s);\n // if there was an error in inserting the word\n if (!noError) {\n // print out the word\n System.out.println(s);\n // increment the number of errors found during load\n errors++;\n }\n // increment the size of the dictionary\n size++;\n }\n }\n \n // close the file\n in.close();\n }", "public static void definitionsCheck(Map<String, String> dictionary,\n Queue<String> terms) {\n Queue<String> copyQ = new Queue1L<>();\n Map<String, String> copyM = new Map1L<>();\n copyM.transferFrom(dictionary);\n String word = \"\";\n while (copyM.size() > 0) {\n Map.Pair<String, String> pair = copyM.removeAny();\n copyQ.transferFrom(terms);\n String def = pair.value();\n while (copyQ.length() > 0) {\n word = copyQ.dequeue();\n String wordS = word + \" \";\n if (def.contains(wordS)) {\n def = def.replaceAll(wordS, \"<a href = \\\"\" + word\n + \".html\\\">\" + word + \"</a> \");\n }\n terms.enqueue(word);\n }\n dictionary.add(pair.key(), def);\n }\n }", "private void loadDictWords(String dictFile) {\n try {\n BufferedReader reader = new BufferedReader(new FileReader(dictFile));\n\n String word = reader.readLine();\n while (word != null) {\n word = word.trim().toLowerCase();\n wordsList.add(word);\n\n word = reader.readLine();\n }\n reader.close();\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Cannot find dictionary file at location: \" + dictFile);\n } catch (IOException e) {\n System.out.println(\"Error: Failed to open and read dictionary file at location: \" + dictFile);\n }\n }", "public static void classifyWithHeaders(String[] args) \r\n\t\t\tthrows IOException\r\n\t\t\t{\n\t\tFile dir_location = new File( args[0] ); \r\n\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] dir_listing = new File[0];\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\tdir_listing = dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] listing_ham = new File[0];\r\n\t\tFile[] listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean hamFound = false; boolean spamFound = false;\r\n\t\tfor (int i=0; i<dir_listing.length; i++) {\r\n\t\t\tif (dir_listing[i].getName().equals(\"ham\")) { listing_ham = dir_listing[i].listFiles(); hamFound = true;}\r\n\t\t\telse if (dir_listing[i].getName().equals(\"spam\")) { listing_spam = dir_listing[i].listFiles(); spamFound = true;}\r\n\t\t}\r\n\t\tif (!hamFound || !spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t// Print out the number of messages in ham and in spam\r\n\t\t//System.out.println( \"\\t number of ham messages is: \" + listing_ham.length );\r\n\t\t//System.out.println( \"\\t number of spam messages is: \" + listing_spam.length );\r\n\r\n\t\t//******************************\r\n\t\t// Create a hash table for the vocabulary (word searching is very fast in a hash table)\r\n\t\tHashtable<String,Multiple_Counter> vocab = new Hashtable<String,Multiple_Counter>();\r\n\t\tMultiple_Counter old_cnt = new Multiple_Counter();\r\n\r\n\t\t//\t\tgw\r\n\t\tHashtable<String,WordStat> vocab_stat = new Hashtable<String,WordStat>();\r\n\r\n\t\tint nWordsHam = 0;\r\n\t\tint nWordsSpam = 0;\r\n\r\n\t\t// Read the e-mail messages\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tif(!(line.startsWith(\"From\")||line.startsWith(\"To\")||line.startsWith(\"Subject\")||line.startsWith(\"Cc\"))) continue;\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\tnWordsHam++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterHam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterHam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\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\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 1;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 0;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 1;\r\n\t\t\t\t\t\t\tws.counterSpam = 0;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tif(!(line.startsWith(\"From\")||line.startsWith(\"To\")||line.startsWith(\"Subject\")||line.startsWith(\"Cc\"))) continue;\t\t\t\t\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\t\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\t\t\t\t\t\tnWordsSpam ++;\r\n\t\t\t\t\t\tif ( vocab.containsKey(word) )\t\t\t\t// check if word exists already in the vocabulary\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\told_cnt = vocab.get(word);\t// get the counter from the hashtable\r\n\t\t\t\t\t\t\told_cnt.counterSpam ++;\t\t\t// and increment it\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, old_cnt);\r\n\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = vocab_stat.get(word);\r\n\t\t\t\t\t\t\tws.counterSpam++;\r\n\t\t\t\t\t\t\t//\t\t\t\t\t\t\tis this necessary?\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\r\n\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\tMultiple_Counter fresh_cnt = new Multiple_Counter();\r\n\t\t\t\t\t\t\tfresh_cnt.counterHam = 0;\r\n\t\t\t\t\t\t\tfresh_cnt.counterSpam = 1;\r\n\r\n\t\t\t\t\t\t\tvocab.put(word, fresh_cnt);\t\t\t// put the new word with its new counter into the hashtable\r\n\t\t\t\t\t\t\t//gw\r\n\t\t\t\t\t\t\tWordStat ws = new WordStat();\r\n\t\t\t\t\t\t\tws.counterHam = 0;\r\n\t\t\t\t\t\t\tws.counterSpam = 1;\r\n\t\t\t\t\t\t\tws.p_w_given_ham_log = 0.0 ; //init\r\n\t\t\t\t\t\t\tws.p_w_given_spam_log = 0.0; //init\r\n\t\t\t\t\t\t\tvocab_stat.put(word, ws);\t\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t}\r\n\r\n\t\t// Print out the hash table\r\n\t\t//\t\tfor (Enumeration<String> e = vocab.keys() ; e.hasMoreElements() ;)\r\n\t\t//\t\t{\t\r\n\t\t//\t\t\tString word;\r\n\t\t//\r\n\t\t//\t\t\tword = e.nextElement();\r\n\t\t//\t\t\told_cnt = vocab.get(word);\r\n\t\t//\r\n\t\t//\t\t\tSystem.out.println( word + \" | in ham: \" + old_cnt.counterHam + \r\n\t\t//\t\t\t\t\t\" in spam: \" + old_cnt.counterSpam);\r\n\t\t//\t\t}\r\n\r\n\t\t// Now all students must continue from here\r\n\t\t// Prior probabilities must be computed from the number of ham and spam messages\r\n\t\t// Conditional probabilities must be computed for every unique word\r\n\t\t// add-1 smoothing must be implemented\r\n\t\t// Probabilities must be stored as log probabilities (log likelihoods).\r\n\t\t// Bayes rule must be applied on new messages, followed by argmax classification (using log probabilities)\r\n\t\t// Errors must be computed on the test set and a confusion matrix must be generated\r\n\r\n\t\t// prior prob\r\n\t\tint nMessagesHam = listing_ham.length;\r\n\r\n\t\tint nMessagesSpam = listing_spam.length;\r\n\r\n\t\tint nMessagesTotal = nMessagesHam + nMessagesSpam;\r\n\r\n\t\tif(nMessagesHam == 0 || nMessagesSpam ==0)\r\n\t\t\tSystem.out.println(\"Zero ham or spam messages\");\r\n\r\n\t\tdouble p_ham_log = Math.log((nMessagesHam* 1.0)/(nMessagesTotal));\r\n\t\tdouble p_spam_log = Math.log((nMessagesSpam* 1.0)/(nMessagesTotal));\r\n\r\n\t\tIterator it = vocab_stat.entrySet().iterator();\r\n\t\tWordStat ws = null;\r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.counterHam ++;\r\n\t\t\tws.counterSpam ++;\r\n\t\t\tnWordsHam ++;\r\n\t\t\tnWordsSpam ++;\r\n\t\t}\r\n\r\n\t\t//System.out.println(\"nWordsHam = \" +nWordsHam);\r\n\t\t//System.out.println(\"nWordsSpam = \" + nWordsSpam);\r\n\r\n\t\t//\t\tgw:\r\n\t\tit = vocab_stat.entrySet().iterator();\r\n\t\tws = null; \r\n\t\twhile (it.hasNext()) {\r\n\t\t\tMap.Entry pairs = (Map.Entry) it.next();\r\n\t\t\tString is = (String) pairs.getKey();\r\n\t\t\tws = (WordStat) pairs.getValue();\r\n\r\n\t\t\tws.p_w_given_ham_log = Math.log(ws.counterHam *1.0 / nWordsHam);\r\n\t\t\tws.p_w_given_spam_log = Math.log(ws.counterSpam *1.0 / nWordsSpam);\r\n\t\t\t//vocab_stat.put(is,ws);\r\n\t\t}\r\n\t\t//\t\tTODO: further confirm arg index\r\n\t\t//test sets\r\n\t\tFile test_dir_location = new File( args[1] ); \r\n\r\n\t\t//\t\tTODO: verify below works\r\n\t\t// Listing of the directory (should contain 2 subdirectories: ham/ and spam/)\r\n\t\tFile[] test_dir_listing = new File[0];\r\n\r\n\r\n\t\t// Check if the cmd line arg is a directory and list it\r\n\t\tif ( test_dir_location.isDirectory() )\r\n\t\t{\r\n\t\t\ttest_dir_listing = test_dir_location.listFiles();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println( \"- Error: cmd line arg not a directory.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\tTODO: verify File[0]\r\n\t\t// Listings of the two sub-directories (ham/ and spam/)\r\n\t\tFile[] test_listing_ham = new File[0];\r\n\t\tFile[] test_listing_spam = new File[0];\r\n\r\n\t\t// Check that there are 2 sub-directories\r\n\t\tboolean test_hamFound = false; boolean test_spamFound = false;\r\n\t\tfor (int i=0; i<test_dir_listing.length; i++) {\r\n\t\t\tif (test_dir_listing[i].getName().equals(\"ham\")) { test_listing_ham = test_dir_listing[i].listFiles(); test_hamFound = true;}\r\n\t\t\telse if (test_dir_listing[i].getName().equals(\"spam\")) { test_listing_spam = test_dir_listing[i].listFiles(); test_spamFound = true;}\r\n\t\t}\r\n\t\tif (!test_hamFound || !test_spamFound) {\r\n\t\t\tSystem.out.println( \"- Error: specified test directory does not contain ham and spam subdirectories.\\n\" );\r\n\t\t\tRuntime.getRuntime().exit(0);\r\n\t\t}\r\n\r\n\t\t//\t\t// Print out the number of messages in ham and in spam\r\n\t\t//\t\tSystem.out.println( \"\\t number of test ham messages is: \" + test_listing_ham.length );\r\n\t\t//\t\tSystem.out.println( \"\\t number of test spam messages is: \" + test_listing_spam.length );\r\n\r\n\r\n\t\t//\t\tmetrics\r\n\t\tint true_positives = 0; //spam classified as spam\r\n\t\tint true_negatives = 0; //ham classified as ham\r\n\t\tint false_positives = 0; //ham ... as spam\r\n\t\tint false_negatives = 0; //spam... as ham\r\n\r\n\t\t// Test starts\r\n\t\t// The ham mail\r\n\t\tfor ( int i = 0; i < test_listing_ham.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_ham[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tif(!(line.startsWith(\"From\")||line.startsWith(\"To\")||line.startsWith(\"Subject\")||line.startsWith(\"Cc\"))) continue;\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( !word.equals(\"\") ) { // if string isn't empty\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) false_positives ++;\r\n\t\t\telse true_negatives ++;\r\n\t\t}\r\n\r\n\r\n\t\t// The spam mail\r\n\t\tfor ( int i = 0; i < test_listing_spam.length; i ++ )\r\n\t\t{\r\n\t\t\tFileInputStream i_s = new FileInputStream( test_listing_spam[i] );\r\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(i_s));\r\n\t\t\tString line;\r\n\t\t\tString word;\r\n\r\n\t\t\t//\t\t\tgw:\r\n\t\t\tdouble p_msg_ham_log = 0.0;\r\n\t\t\tdouble p_msg_spam_log = 0.0;\r\n\r\n\t\t\tp_msg_ham_log += p_ham_log;\r\n\t\t\tp_msg_spam_log += p_spam_log;\r\n\t\t\t//\t\t\tgw:\t\t\t\r\n\r\n\t\t\twhile ((line = in.readLine()) != null)\t\t\t\t\t// read a line\r\n\t\t\t{\r\n\t\t\t\tif(!(line.startsWith(\"From\")||line.startsWith(\"To\")||line.startsWith(\"Subject\")||line.startsWith(\"Cc\"))) continue;\r\n\t\t\t\tStringTokenizer st = new StringTokenizer(line);\t\t\t// parse it into words\r\n\r\n\t\t\t\twhile (st.hasMoreTokens())\r\n\t\t\t\t{\r\n\t\t\t\t\tword = st.nextToken().replaceAll(\"[^a-zA-Z]\",\"\");\r\n\r\n\t\t\t\t\tif ( ! word.equals(\"\") ) {\t\r\n\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\r\n\t\t\t\t\t\tif(vocab_stat.containsKey(word)){\r\n\t\t\t\t\t\t\tWordStat iws = vocab_stat.get(word); \r\n\t\t\t\t\t\t\tdouble ip_w_given_ham_log = iws.p_w_given_ham_log;\r\n\t\t\t\t\t\t\tdouble ip_w_given_spam_log = iws.p_w_given_spam_log;\r\n\r\n\t\t\t\t\t\t\tp_msg_ham_log += ip_w_given_ham_log ;\r\n\t\t\t\t\t\t\tp_msg_spam_log += ip_w_given_spam_log ;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t//\t\t\t\t\t\t\tgw:\t\t\t\t\t\t\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tin.close();\r\n\t\t\tif (p_msg_spam_log > p_msg_ham_log) true_positives ++;\r\n\t\t\telse false_negatives ++;\r\n\t\t}\r\n\r\n\t\tSystem.out.println(\"Result 3: \");\r\n\t\tSystem.out.println(\"Header_Only\\t\\ttrue spam\\ttrue ham\");\r\n\t\tSystem.out.println(\"Classified spam:\\t\"+true_positives+\"\\t\\t\"+false_positives);\r\n\t\tSystem.out.println(\"Classified ham: \\t\"+false_negatives+\"\\t\\t\"+ true_negatives);\r\n\t\tSystem.out.println(\"\");\r\n\r\n\r\n\t\t\t}", "public static String findReplacements(TreeSet<String> dictionary, \n\t\t\t\t\t String word)\n\t{\n\t String replacements = \"\";\n\t String leftHalf, rightHalf, newWord;\n\t int deleteAtThisIndex, insertBeforeThisIndex;\n\t char index;\n\t TreeSet<String> alreadyDoneNewWords = new TreeSet<String>();\n\t /* The above TreeSet<String> will hold words that the spell checker\n\t suggests as replacements. By keeping track of what has already\n\t been suggested, the method can make sure not to output the\n\t same recommended word twice. For instance, the word \n\t \"mispelled\" would ordinarily result in two of the same suggested\n\t replacements: \"misspelled\" (where the additional \"s\" is added to \n\t different locations.) */\n\t \n\t // First, we'll look for words to make by subtracting one letter\n\t // from the misspelled word.\n\t for(deleteAtThisIndex = 0; deleteAtThisIndex < word.length();\n\t\tdeleteAtThisIndex ++)\n\t\t{\n\t\t if(deleteAtThisIndex == 0)\n\t\t\t{\n\t\t\t leftHalf = \"\";\n\t\t\t rightHalf = word;\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0, deleteAtThisIndex);\n\t\t\t rightHalf = word.substring(deleteAtThisIndex+1,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\n\t\t newWord = \"\";\n\t\t newWord = newWord.concat(leftHalf);\n\t\t newWord = newWord.concat(rightHalf);\n\t\t if(dictionary.contains(newWord) &&\n\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t{\n\t\t\t replacements = replacements.concat(newWord + \"\\n\");\n\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t}\n\t\t}\n\n\t // The rest of this method looks for words to make by adding a \n\t // new letter to the misspelled word.\n\t for(insertBeforeThisIndex = 0; \n\t\tinsertBeforeThisIndex <= word.length();\n\t\tinsertBeforeThisIndex ++)\n\t\t{\n\t\t if(insertBeforeThisIndex == word.length())\n\t\t\t{\n\t\t\t leftHalf = word;\n\t\t\t rightHalf = \"\";\n\t\t\t}\n\t\t else\n\t\t\t{\n\t\t\t leftHalf = word.substring(0,insertBeforeThisIndex);\n\t\t\t rightHalf = word.substring(insertBeforeThisIndex,\n\t\t\t\t\t\t word.length());\n\t\t\t}\n\t\t \n\t\t for(index = 'a'; index <= 'z'; index ++)\n\t\t\t{\n\t\t\t newWord = \"\";\n\t\t\t newWord = newWord.concat(leftHalf);\n\t\t\t newWord = newWord.concat(\"\" + index + \"\");\n\t\t\t newWord = newWord.concat(rightHalf);\n\t\t\t \n\t\t\t if(dictionary.contains(newWord) &&\n\t\t\t !alreadyDoneNewWords.contains(newWord))\n\t\t\t\t{\n\t\t\t\t replacements \n\t\t\t\t\t= replacements.concat(newWord + \"\\n\");\n\t\t\t\t alreadyDoneNewWords.add(newWord);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t return replacements;\n\t}", "public static void main( String[] args )\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmergeSpellingData( args );\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public SpellChecker() throws FileNotFoundException {\r\n\t\t// Initialize empty dictionary collection.\r\n\t\tdictionary = new LinkedSet<String>();\r\n\t\t\r\n\t\t// Add contents of provided \"dictionary.txt\" file to dictionary.\r\n\t\ttry {\r\n\t\t\tFile file = new File(\"dictionary.txt\");\r\n\t\t\tSystem.out.println(\"Initializing program dicitonary...\");\r\n\t\t\tScanner scanner = new Scanner(file);\r\n\t\t\twhile (scanner.hasNextLine()) {\r\n\t\t\t\tString line = scanner.nextLine();\r\n\t\t\t\tdictionary.add(line);\r\n\t\t\t}\r\n\t\t\tscanner.close();\r\n\t\t\tSystem.out.println(\"dictionary initialized\");\r\n\t\t}\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"An error occurred while initializing program dicitonary. File not found.\");\r\n\t\t}\r\n\t}", "WordLadderSolver(String dictionaryFile) {\n \tdictionary = new Dictionary(dictionaryFile); //Set up the words from the file\n }", "public static void useIndexOf() throws FileNotFoundException {\n System.out.print(\"Your word? \");\n Scanner console = new Scanner(System.in);\n String word = console.nextLine();\n \n // search list for a word using indexOf\n ArrayList<String> words = readBook(\"mobydick.txt\");\n int index = words.indexOf(word);\n if (index >= 0) {\n System.out.println(word + \" is word #\" + index);\n } else {\n System.out.println(word + \" is not found.\");\n }\n }", "public static void main(String[] args) {\n Scanner input = null;\r\n int allWords = 0;\r\n int threeLetterWords = 0;\r\n try {\r\n input = new Scanner(new File(\"prog512h.dat\"));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n \r\n while(input.hasNext()){\r\n if (input.next().length() == 3){\r\n threeLetterWords++;\r\n }\r\n allWords++;\r\n }\r\n System.out.println(\"Three letter words comprised \" + 100*(threeLetterWords+0.0)/allWords + \"% of all words.\");\r\n \r\n }", "public static void main(String[] args) {\n\t\ttry {\r\n\t\t\tBufferedReader brr=new BufferedReader(new InputStreamReader(System.in));\r\n\t\t\tSystem.out.println(\"enter the word\");\r\n\t\t\tString word=brr.readLine();\r\n\t\tFileReader fr=new FileReader(\"abc.txt\");\r\n\t\tBufferedReader br=new BufferedReader(fr);\r\n\t\tString line=\"\";\r\n\t\tint count=0;\r\n\t\tboolean flag=false;\r\n\t\twhile((line=br.readLine())!=null) {\r\n\t\tStringTokenizer st=new StringTokenizer(line,\" \");\r\n\t\twhile(st.hasMoreTokens()){\r\n\t\tString x=(String)st.nextToken();\r\n\t\tif(x.equals(word)) {\r\n\t\t\tflag=true;\r\n\t\t}\r\n\t\t}\r\n\t\tSystem.out.println(\"no. of word\"+line);\r\n\t\t}\r\n\t\tif(flag) {\r\n\t\tSystem.out.println(\"given word is exist\");}\r\n\t\telse\r\n\t\t\tSystem.out.println(\"file does not exist\");}\r\n\tcatch(Exception e)\r\n\t{\r\n\t\te.printStackTrace();\r\n\t}\r\n\t}", "private void saveButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_saveButtonMouseClicked\n \n FileDialog dialog = new FileDialog(this, \"Ssuvegarder le fichier dictionnaire\", FileDialog.SAVE);\n dialog.setFile(loadedDictionaryFilename);\n dialog.setVisible(true);\n \n String filename = dialog.getFile();\n if(filename != null) // if user selected a file\n {\n // add .txt extension if user didn't add it\n if(!filename.substring(filename.length() - 4).equals(\".txt\"))\n filename = filename + \".txt\";\n \n // add full path of the filename\n filename = dialog.getDirectory() + filename;\n \n // get all WordDefinition in an arraylist \n ArrayList<WordDefinition> allWordDefinitionList = new ArrayList<>();\n for(int i = 0 ; i < lexiNodeTrees.size() ; i++)\n {\n ArrayList<WordDefinition> allWordsInTree = lexiNodeTrees.get(i).getAllWordsFromTree();\n \n for(int j = 0 ; j < allWordsInTree.size() ; j++)\n {\n allWordDefinitionList.add(allWordsInTree.get(j));\n }\n }\n \n // sort the list of word definition in alphabetical order\n Collections.sort(allWordDefinitionList, new WordDefinitionComparator());\n \n // save to file\n if(DictioFileOperations.saveListToFile(filename, allWordDefinitionList))\n {\n loadedDictionaryFilename = filename; // save new name in case user wants to save again\n JOptionPane.showMessageDialog(this, \"La list des mots a été \"\n + \"sauvegardé dans le fichier\\n\" + filename + \".\\n\\n\", \"INFORMATION\", \n JOptionPane.INFORMATION_MESSAGE);\n }\n\n else // if there was a problem saving the file\n JOptionPane.showMessageDialog(this, \"ERREUR: Impossible de \"\n + \"sauvegarder dans le fichier.\\n\\n\", \"ERREUR\", \n JOptionPane.ERROR_MESSAGE);\n }\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}", "@Test \r\n public void shouldNotFindWordIntoTheDictionary() {\r\n String inputWord = \"xxxxx\";\r\n String[] dictionary =\r\n new String[] {\"able\", \"ale\", \"apple\", \"bale\", \"kangaroo\"};\r\n\r\n assertNull(wordSeeker.lookFor(inputWord, dictionary));\r\n }", "public static void main(String[] args) throws IOException \n\t{\n\t\tFile f1=new File(\"/home/abc/workspace/JavaPrograms/text\");\n\n\t\tFileInputStream f=new FileInputStream(f1);\n\t\tScanner sc=new Scanner(System.in);\n\t\tLinkedList <String>al=new LinkedList<String>();\n\n\t\tint c=0;\n\t\tString str=\"\";\n\t\twhile((c=f.read())!=-1)\n\t\t{\n\t str=str+(char)c;\n\t\n\t }\n\t\tString [] s=str.split(\"\\\\s\");\n\t\tfor(int i=0;i<s.length;i++)\n\t\t{\n\t\t\tal.add(s[i]);\n\t\t}\t\n\t\t\n\t\tIterator<String> itr=al.iterator();\n\t\twhile(itr.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr.next());\n\t\t}\t\n\t\tSystem.out.println(\"Enter word to search \");\n\t\tString str1=sc.next();\n\t\t\n\t\tFileWriter fw=new FileWriter(f1);\t\n if(al.contains(str1))\n\t\t {\n \t al.remove(str1);\n \tfor(int i=0;i<al.size();i++)\n \t{\n \t fw.write(al.get(i)+\" \");\n \t fw.flush();\n \t}\t\n\t\t\t\n\t\t }\n else\n {\n \t al.add(str1);\n \n for(int i=0;i<al.size();i++)\n \t {\n \t \tfw.write(al.get(i)+\" \");\n \t \t\tfw.flush();\n \t }\n }\n \tIterator<String> itr2=al.iterator();\n\t\twhile(itr2.hasNext())\n\t\t{\n\t\t\tSystem.out.println(itr2.next());\n\t\t}\t\n\t\n\t\t\n\t}", "public void insertFromFile() throws IOException {\n File file = new File(Main.DATA_FILE_PATH);\n Scanner sc = new Scanner(file);\n\n dictionary = new Dictionary();\n TreeMap<String, ArrayList<String>> wordList = new TreeMap<>();\n String target = sc.nextLine().substring(1).trim();\n ArrayList<String> explain = new ArrayList<>();\n while (sc.hasNextLine()) {\n String str = sc.nextLine();\n if (str.indexOf(\"@\") == 0) {\n wordList.put(target, explain);\n target = str.substring(1).trim();\n explain = new ArrayList<>();\n } else if (str.indexOf(\"=\") == 0) {\n str = str.replace(\"+\", \" : \");\n String word = \" = \" + str.substring(1);\n explain.add(word);\n } else if (str.indexOf(\"#\") == 0 || str.indexOf(\"*\") == 0) {\n explain.add(str);\n } else {\n explain.add(\" \" + str);\n }\n }\n dictionary.setWordList(wordList);\n sc.close();\n }", "public GrepMain Grep (List<String> commandline) {\n if (commandline.size()>3 || commandline.size() < 2){\n System.out.println(\"what input in commandline don not obey format, check it please\");\n }\n // save information from commandline to command, word, fileNames\n String command = (commandline.size() == 2)? \"\":commandline.get(0);\n String word = (commandline.size() == 2)? commandline.get(0):commandline.get(1);\n String fileNames = (commandline.size() == 2)? commandline.get(1):commandline.get(2);\n try {\n //open file if fail print file not found\n BufferedReader readerTxt = new BufferedReader(new InputStreamReader(\n new FileInputStream(fileNames)));\n //[-v] [-i] [-r]\n for (String line = readerTxt.readLine(); line != null; line = readerTxt.readLine()) {\n if (command.contains(\"[-v]\")){\n if (command.contains(\"[-r]\")){\n if (command.contains(\"[-i]\")){\n if (!checkReg(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (!checkReg(word,line)){\n System.out.println(line);\n }\n }\n }else {\n if (command.contains(\"[-i]\")){\n if (!checkWord(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (!checkWord(word,line)){\n System.out.println(line);\n }\n }\n }\n }else {\n if (command.contains(\"[-r]\")){\n if (command.contains(\"[-i]\")){\n if (checkReg(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (checkReg(word,line)){\n System.out.println(line);\n }\n }\n }else {\n if (command.contains(\"[-i]\")){\n if (checkWord(word.toLowerCase(),line.toLowerCase())){\n System.out.println(line);\n }\n }else {\n if (checkWord(word,line)){\n System.out.println(line);\n }\n }\n }\n }\n }\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(\"file not found\");\n }\n return null;\n }", "public void processData(){\n try{\n\t\t resultTxt.setText(\"Man has been dropped.\\n\\n\");\n String line = input.readLine();\n while(line != null){ //not end of file\n String[] words = line.split(\"\\\\s\");\n\n if (isAMan(words)==true){\n \t\t\t output1.write(line+\"\\n\");\n \t\t }\n \t\t else if(isAWoman(words)==true) {\n \t\t\t output2.write(line+\"\\n\");\n\t\t\t resultTxt.append(line+\"\\n\");\n \t\t }\n line = input.readLine();\n }\n\n if (input != null){\n \t\t input.close();\n \t\t }\n \t\t if (output1 != null){\n \t\t output1.close();\n }\n if (output2 != null){\n \t\t output2.close();\n }\n }\n catch(IOException exc){\n exc.printStackTrace();\n System.err.println(\"Error: failed Fork input processor\");\n System.exit(1);\n }\n }", "@SuppressWarnings(\"rawtypes\")\r\n\tpublic void suggestword(String pattern) throws Exception\r\n\t{\r\n\t\t\t// String to be scanned to find the pattern.\r\n\t\t\tString line = \" \";\r\n\t\t\tString reg = \"[\\\\w]+[@$%^&*()!?{}\\b\\n\\t]*\";\r\n\r\n\t\t\t// Create a Pattern object\r\n\t\t\tPattern p = Pattern.compile(reg);\r\n\t\t\t\r\n\t\t\t// Now create matcher object.\r\n\t\t\tMatcher m = p.matcher(line);\r\n\t\t\t\r\n\t\t\tint fileNum = 0;\r\n\t\t\t\r\n\t\t\t\tFile directory = new File(\"C:\\\\Users\\\\jayad\\\\eclipse-workspace\\\\Search Engine\\\\src\\\\Webpages\\\\Text\\\\\");\r\n\t\t\t\tFile[] fileArray = directory.listFiles();\r\n\t\t\t\tfor (int i = 0; i < fileArray.length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tfind(fileArray[i], fileNum, m, pattern); // Calls the function find()\r\n\t\t\t\t\tfileNum++;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\r\n\t\t\t\t@SuppressWarnings({ \"unused\" })\r\n\t\t\t\tSet keys = new HashSet();\r\n\t\t\t\tInteger value1 = 1;\r\n\t\t\t\tInteger value2 = 0;\r\n\t\t\t\tint counter = 0;\r\n\r\n\t\t\t\tSystem.out.println(\"\\nDid you mean?:\");\r\n\t\t\t\tfor (Map.Entry entry : hashTable.entrySet())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (value2 == entry.getValue())\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (value1 == entry.getValue())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (counter == 0)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tSystem.out.print(entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\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{\r\n\t\t\t\t\t\t\t\tSystem.out.print(\" , \" + entry.getKey());\r\n\t\t\t\t\t\t\t\tcounter++;\r\n\t\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t} // End of if\r\n\r\n\t\t\t\t\t} // End of else\r\n\t\t\t\t} // End of for loop\r\n\t}", "static void ReadQuery(String input) throws FileNotFoundException {\n input = input.replaceAll(\"[^A-Za-z]\",\" \");\n String[] arr = input.split(\" \"); // splitting the whole string into words by split on the basis of white spaces\n\n\n for(int i=0; i<arr.length; i++) {\n String termWord = arr[i].toLowerCase();\t//same pre-processing is applied to all the query word\n //termWord = RemoveSpecialCharacter(termWord);\n termWord = removeStopWords(termWord);\n\n if(!termWord.equalsIgnoreCase(\"\")) { // all the white spaces are removed as if not removed then lemmatization wont be successfully done\n\n termWord = Lemmatize(termWord);\n System.out.println(termWord);\n if(dictionary.containsKey(termWord)) {\n List<Integer> wordList = new ArrayList<>();\n wordList = dictionary.get(termWord);\n int queryWordFrequency = wordList.get(totaldocument);\n queryWordFrequency++;\n wordList.set(totaldocument, queryWordFrequency); // all the frequencies of the query words are stored at the 56th index of the List stored in the\n //hashmap associated with its word-terms\n dictionary.put(termWord, wordList);\n }\n else {\n //if any of the enterd query word not present in all the docs so list will have 0.0 value from 0th index to 55th and 56th index is reserver\n // for query word frequency\n List<Integer> wordList = new ArrayList<>();\n for(int j=0; j<totaldocument+1; j++) {\n wordList.add(0);\n }\n wordList.add(1);\n dictionary.put(termWord, wordList); //updating the dictionary hashmap now containing all the query words frequencies\n }\n }\n }\n save();\n }" ]
[ "0.6970442", "0.6823508", "0.6657768", "0.6576274", "0.6574008", "0.65502423", "0.6293594", "0.62233573", "0.62226135", "0.62180626", "0.620628", "0.6184589", "0.6171448", "0.6149207", "0.6148744", "0.6100145", "0.6066634", "0.6047723", "0.6045214", "0.6037123", "0.60309935", "0.60303885", "0.60246015", "0.5986707", "0.5985611", "0.596414", "0.5959575", "0.59078765", "0.59009486", "0.5833515", "0.58031493", "0.5801984", "0.5793183", "0.5764118", "0.5756026", "0.5747099", "0.5720501", "0.570076", "0.5694445", "0.5689175", "0.5681487", "0.5628978", "0.56217086", "0.5601392", "0.55958045", "0.55934095", "0.5590687", "0.5569648", "0.55614436", "0.55472064", "0.5539894", "0.5535025", "0.5530603", "0.5522679", "0.55177015", "0.5515666", "0.55125934", "0.5512114", "0.54989177", "0.54984075", "0.5478277", "0.54773986", "0.5467105", "0.54631805", "0.5459706", "0.54591924", "0.5456806", "0.54563725", "0.54390645", "0.5433481", "0.5432093", "0.5431732", "0.5427951", "0.54260105", "0.5425521", "0.5416208", "0.5412106", "0.5401814", "0.54016936", "0.53971076", "0.53883696", "0.5385562", "0.5381502", "0.53737026", "0.5367659", "0.53564864", "0.53425395", "0.5334396", "0.5330695", "0.5329646", "0.5325156", "0.5314632", "0.53058255", "0.5304389", "0.5295978", "0.529354", "0.5292669", "0.5291781", "0.5286818", "0.527823" ]
0.6210062
10
Get the value of the PatternUI annotation's message attribute for the pattern which name is patternName.
public static String getMessage(IPatternMatch match, boolean generatedMatcher) { if (generatedMatcher) { return getMessageForGeneratedMatcher(match); } else { return getMessageForGenericMatcher(match); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pattern getMessageAttribute() {\r\n return pattern_messageContinuationLine;\r\n }", "@objid (\"cf87d3fa-73a0-4533-b21a-4a235c0108e3\")\n public String getPatternParameterLabel() {\n return this.elt.getTagValue(PatternParameter.MdaTypes.PATTERNPARAMETER_LABEL_TAGTYPE_ELT);\n }", "@objid (\"c9430e32-5923-4873-9196-70620b195552\")\n public String getPatternParameterName() {\n return this.elt.getTagValue(PatternParameter.MdaTypes.PATTERNPARAMETER_NAME_TAGTYPE_ELT);\n }", "public static String formatOutputMessage(String patternCode, String value) {\n ResourceBundle bundle = ResourceBundle.getBundle(\"messages\", Locale.UK);\n String pattern = bundle.getString(patternCode);\n MessageFormat formatter = new MessageFormat(pattern);\n return formatter.format(new Object[]{value});\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "public String getPattern() {\r\n\t\treturn pattern;\r\n\t}", "public String getPattern() {\n return pattern;\n }", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public String getPattern () {\n return pattern;\n }", "public Pattern getPattern() {\n return pattern;\n }", "public String getPattern() {\n\treturn pattern;\n }", "public java.lang.String getGet() {\n java.lang.String ref = \"\";\n if (patternCase_ == 2) {\n ref = (java.lang.String) pattern_;\n }\n return ref;\n }", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "public Pattern getPattern(){\n\t\treturn pattern;\n\t}", "public final Pattern getPattern() {\n return pattern;\n }", "public String getPattern() {\n return pattern == null ? null : pattern.pattern();\n }", "public int getPattern() {\n return this.pattern;\n }", "public String toPattern() {\n\t\treturn pattern;\n\t}", "public java.lang.String getPost() {\n java.lang.String ref = \"\";\n if (patternCase_ == 4) {\n ref = (java.lang.String) pattern_;\n }\n return ref;\n }", "public String getMessage() {\r\n return mContext.getString(mErrorMessageRes);\r\n }", "@Override\n public HangarMessages addConstraintsPatternMessage(String property) {\n assertPropertyNotNull(property);\n add(property, new UserMessage(CONSTRAINTS_Pattern_MESSAGE));\n return this;\n }", "public String getMsg(){\n return messageLabel.getText();\n }", "public final byte[] getPattern() {\n return pattern;\n }", "public java.lang.String getPatch() {\n java.lang.String ref = \"\";\n if (patternCase_ == 6) {\n ref = (java.lang.String) pattern_;\n }\n return ref;\n }", "public String getMessage() {\n\t\treturn adaptee.getMessage();\n\t}", "public String getMessage() {\n\t\treturn mErrorMessageString;\n\t}", "protected String getMessage(Name name) {\n return message();\n }", "public com.google.api.CustomHttpPattern getCustom() {\n if (patternCase_ == 8) {\n return (com.google.api.CustomHttpPattern) pattern_;\n }\n return com.google.api.CustomHttpPattern.getDefaultInstance();\n }", "public java.lang.Integer getPatternId() {\n return patternId;\n }", "com.google.cloud.dialogflow.v2beta1.MessageAnnotation getMessageAnnotation();", "public String toLocalizedPattern() {\n\t\treturn translatePattern(pattern, DateFormatSymbols.patternChars, formatData.localPatternChars);\n\t}", "public String getMessage() {\r\n return messageKind.getMessage();\r\n }", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "public String getMessageText();", "public java.lang.Integer getPatternId() {\n return patternId;\n }", "@JsonGetter(\"restrictionMessage\")\r\n public String getRestrictionMessage ( ) { \r\n return this.restrictionMessage;\r\n }", "public String getMessage() {\n return super.getString(Constants.Properties.MESSAGE);\n }", "@Accessor(qualifier = \"message\", type = Accessor.Type.GETTER)\n\tpublic String getMessage()\n\t{\n\t\treturn getMessage(null);\n\t}", "public String getInvalidPasswordMessage() {\n if (invalidPassword) {\n return getInvalidMessage(INVALID_PASSWORD_MSG);\n }\n if (passwordMismatch) {\n return getInvalidMessage(PASSWORD_MISMATCH_MSG);\n }\n if (generalFailure) {\n return getInvalidMessage(GENERAL_FAILURE_MSG);\n }\n return \"\";\n }", "public String getPattern() {\r\n return this.currPattern;\r\n }", "public synchronized OrbitRelatedUniformEventPattern getPattern() {\n\t\tif (pattern == null) {\n\t\t\tpattern = obtainPattern();\n\t\t}\n\t\treturn pattern;\n\t}", "public String getMessage()\n {\n return fMessage;\n }", "public String getMessage(String key) {\n return messages.getProperty(key);\n }", "public String getInvalidMessageText() {\r\n\t\tnotificationError = driver.findElement(notificationErrorSelector);\r\n\t\treturn notificationError.getText();\r\n\t\t\r\n\t}", "public Drawable getPatternDrawable() {\n return patternDrawable;\n }", "public String getMessage(){\n return(message);\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage() {\n return this.message;\n }", "public String getMessage()\n\t{\n\t\treturn messageArea.getText();\n\t}", "public final String getMessage() {\n return this.message;\n }", "public String getNamePattern() {\n return namePattern;\n }", "public String getMessage() {\r\n return message;\r\n }", "public String getMessage() {\r\n return message;\r\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\r\n\t\treturn this.message;\r\n\t}", "UsagePattern getUsagePattern();", "public Pattern getStartOfMessage() {\r\n return pattern_messageFirstLine;\r\n }", "private static String format(final String pattern, final Object... args) {\n\t\tString message = pattern;\r\n\t\tif (Constants.ZERO < args.length) {\r\n\t\t\ttry {\r\n\t\t\t\tmessage = MessageFormat.format(pattern, args);\r\n\t\t\t} catch (final Exception ex) {\r\n\t\t\t\tmessage = pattern;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn message;\r\n\t}", "public String getMessage() {\n\t\treturn this.message;\n\t}", "public String getMessage() {\n\t\treturn this.message;\n\t}", "public String getMessage() {\n return getMessage(this.key, (Object[]) null, this.key, (Locale) null);\n }", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage();", "public String getMessage()\r\n {\r\n return message;\r\n }", "public String getMessage()\r\n {\r\n return message;\r\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }", "public String getMessage() {\n return message;\n }" ]
[ "0.6978135", "0.6593396", "0.6515798", "0.5984946", "0.5955889", "0.5941587", "0.5913721", "0.5892693", "0.5892693", "0.58884513", "0.5846398", "0.5843118", "0.58144456", "0.58115655", "0.5764827", "0.57571256", "0.5745934", "0.5744344", "0.56877035", "0.5658785", "0.5596823", "0.55880857", "0.5562035", "0.555684", "0.5552102", "0.55362755", "0.55153316", "0.54914725", "0.54914594", "0.54667884", "0.5444865", "0.5441837", "0.543907", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5422667", "0.5420627", "0.5406752", "0.53931016", "0.5391581", "0.5378795", "0.5362365", "0.5346743", "0.53257155", "0.5318684", "0.53021955", "0.5292826", "0.52902055", "0.52785933", "0.52779835", "0.52779835", "0.52779835", "0.52779835", "0.52779835", "0.52779835", "0.52779835", "0.5276531", "0.5265776", "0.5258453", "0.5257717", "0.5257717", "0.5253098", "0.5253098", "0.5253098", "0.5253098", "0.52518475", "0.5248606", "0.52433306", "0.52422225", "0.52363396", "0.52363396", "0.52342325", "0.52322274", "0.52322274", "0.52322274", "0.52322274", "0.52322274", "0.52322274", "0.52322274", "0.5227984", "0.5227984", "0.52180433", "0.52180433", "0.52180433", "0.52180433", "0.52180433" ]
0.5663546
19
Get the DatabindingAdapter generated for the pattern whose name is patternName
public static DatabindingAdapter<IPatternMatch> getDatabindingAdapter(String patternName, boolean generatedMatcher) { if (generatedMatcher) { return getDatabindingAdapterForGeneratedMatcher(patternName); } else { return getDatabindingAdapterForGenericMatcher(patternName); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CommonAdapter findAdapterByName(final String name) {\n if (LOGGER.isDebugEnabled()) {\n LOGGER.debug(\"Find adapter : \" + name);\n }\n return ADAPTERS.get(name);\n }", "public String getAdapter() {\n return adapter;\n }", "DataBinding createDataBinding();", "DataBinding createDataBinding();", "public static IDatabaseAdapter get(String name) {\n HashMap<String,Object> config = ConfigManager.getInstance().getDatabaseAdapter(name);\n if (config==null || !config.containsKey(\"type\")) return null;\n IDatabaseAdapter result = null;\n switch (config.get(\"type\").toString()) {\n case \"mysql\":\n result = new MysqlDatabaseAdapter();\n break;\n case \"sqlite\":\n result = new SqliteDatabaseAdapter();\n break;\n case \"orientdb\":\n result = new OrientDBDatabaseAdapter();\n break;\n case \"mongodb\":\n result = new MongoDatabaseAdapter();\n }\n if (result != null) result.configure(config);\n return result;\n }", "public Pattern getPatternByName(String name) throws PatternNotFound {\n if(mapName.containsKey(name)) {\r\n return mapName.get(name);\r\n }\r\n else {\r\n throw new PatternNotFound(\"No pattern called \" + name);\r\n }\r\n }", "public String getDataFormatPattern() {\r\n return dataFormatPattern;\r\n }", "public ObjectAdapter getAdapter() {\n return mAdapter;\n }", "public Adapter getAdapter() {\n\t\treturn mAdapter;\n\t}", "public Drawable getPatternDrawable() {\n return patternDrawable;\n }", "public AdapterFactory getAdapterFactory()\n {\n return adapterFactory;\n }", "protected TypeFormatAdapter getResultAdapter( ) {\r\n\t\treturn resultTypeAdapter;\r\n\t}", "public Class<? extends DataAdapter> getAdapterClass();", "public String getName() {\n return \"Database_adapter-\"+this.name;\n }", "public Binding getBinding(int anIndex) { return getBindings(true).get(anIndex); }", "public Binding getBinding(String aPropertyName)\n{\n // Iterate over bindings and return the first that matches given property name\n for(int i=0, iMax=getBindingCount(); i<iMax; i++)\n if(getBinding(i).getPropertyName().equals(aPropertyName))\n return getBinding(i);\n return null; // Return null since binding not found\n}", "PatternMapping getPatternMapping();", "public Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "Binding getBinding();", "@objid (\"c9430e32-5923-4873-9196-70620b195552\")\n public String getPatternParameterName() {\n return this.elt.getTagValue(PatternParameter.MdaTypes.PATTERNPARAMETER_NAME_TAGTYPE_ELT);\n }", "public DbAdapter getAdapter() {\n return adapter;\n }", "public DataGeocoderImpl(Patterngeocoding pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t\tmanager = DALLocator.getDataManager();\r\n\t}", "public Pattern getPattern() {\n return pattern;\n }", "public Pattern getPattern(){\n\t\treturn pattern;\n\t}", "Pattern pattern() {\r\n\t\tArrayList<String> patternSpecs = new ArrayList<String>();\r\n\t\t\r\n\t\tif (delimiters.size() > 0) {\r\n\t\t delimiters.forEach(d -> patternSpecs.add(d.pattern().pattern()));\r\n\t\t} else {\r\n\t\t\tpatternSpecs.add(\"^.*$\");\r\n\t\t}\r\n\t\t\r\n\t\tString completeSpec = Joiner.on(\"|\").join(patternSpecs); // \r\n\t\t\r\n\t\tPattern pattern = Pattern.compile(completeSpec);\r\n\t\t\r\n\t\treturn pattern;\r\n\t}", "public String getPattern () {\n return pattern;\n }", "public String getPattern() {\r\n \treturn pattern;\r\n }", "private Object[] getPatternItems() {\n\t\tif (patternItems != null) {\n\t\t\treturn patternItems;\n\t\t}\n\n\t\tpatternItems = PARSED_PATTERN_CACHE.get(pattern);\n\t\tif (patternItems != null) {\n\t\t\treturn patternItems;\n\t\t}\n\n\t\tboolean isPrevQuote = false;\n\t\tboolean inQuote = false;\n\t\tStringBuilder text = new StringBuilder();\n\t\tchar itemType = 0; // 0 for string literal, otherwise date/time pattern character\n\t\tint itemLength = 1;\n\n\t\tList<Object> items = new ArrayList<Object>();\n\n\t\tfor (int i = 0; i < pattern.length(); i++) {\n\t\t\tchar ch = pattern.charAt(i);\n\t\t\tif (ch == '\\'') {\n\t\t\t\tif (isPrevQuote) {\n\t\t\t\t\ttext.append('\\'');\n\t\t\t\t\tisPrevQuote = false;\n\t\t\t\t} else {\n\t\t\t\t\tisPrevQuote = true;\n\t\t\t\t\tif (itemType != 0) {\n\t\t\t\t\t\titems.add(new PatternItem(itemType, itemLength));\n\t\t\t\t\t\titemType = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tinQuote = !inQuote;\n\t\t\t} else {\n\t\t\t\tisPrevQuote = false;\n\t\t\t\tif (inQuote) {\n\t\t\t\t\ttext.append(ch);\n\t\t\t\t} else {\n\t\t\t\t\tif ((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z')) {\n\t\t\t\t\t\t// a date/time pattern character\n\t\t\t\t\t\tif (ch == itemType) {\n\t\t\t\t\t\t\titemLength++;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif (itemType == 0) {\n\t\t\t\t\t\t\t\tif (text.length() > 0) {\n\t\t\t\t\t\t\t\t\titems.add(text.toString());\n\t\t\t\t\t\t\t\t\ttext.setLength(0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\titems.add(new PatternItem(itemType, itemLength));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\titemType = ch;\n\t\t\t\t\t\t\titemLength = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// a string literal\n\t\t\t\t\t\tif (itemType != 0) {\n\t\t\t\t\t\t\titems.add(new PatternItem(itemType, itemLength));\n\t\t\t\t\t\t\titemType = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttext.append(ch);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// handle last item\n\t\tif (itemType == 0) {\n\t\t\tif (text.length() > 0) {\n\t\t\t\titems.add(text.toString());\n\t\t\t\ttext.setLength(0);\n\t\t\t}\n\t\t} else {\n\t\t\titems.add(new PatternItem(itemType, itemLength));\n\t\t}\n\n\t\tpatternItems = items.toArray(new Object[items.size()]);\n\n\t\tPARSED_PATTERN_CACHE.put(pattern, patternItems);\n\n\t\treturn patternItems;\n\t}", "public final Pattern getPattern() {\n return pattern;\n }", "public String toPattern() {\n\t\treturn pattern;\n\t}", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\r\n\t}", "public String getPattern() {\r\n\t\treturn pattern;\r\n\t}", "public String getPattern() {\n return pattern;\n }", "protected void addAknPatternPropertyDescriptor ( Object object )\n {\n itemPropertyDescriptors.add ( createItemPropertyDescriptor ( ( (ComposeableAdapterFactory)adapterFactory ).getRootAdapterFactory (), getResourceLocator (), getString ( \"_UI_Site_aknPattern_feature\" ), getString ( \"_UI_PropertyDescriptor_description\", \"_UI_Site_aknPattern_feature\", \"_UI_Site_type\" ), GlobalPackage.Literals.SITE__AKN_PATTERN, true, false, false, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null, null ) );\n }", "public String getPattern() {\n\treturn pattern;\n }", "@SuppressWarnings(\"unchecked\")\n private TypeAdapter<Object> getAdapter(Class<?> type)\n {\n return (TypeAdapter<Object>) registry.getAdapter(type);\n }", "public String getPattern() {\n\t\treturn pattern;\n\t}", "public String getPattern() {\n\t\treturn pattern;\n\t}", "@Override\n\tpublic Object getAdapter(Class adapter) {\n\t\treturn null;\n\t}", "public T getViewDataBinding() {\n return mViewDataBinding;\n }", "public String getNamePattern() {\n return namePattern;\n }", "protected abstract MultiTypeAdapter createAdapter();", "public String adapterId() {\n return this.adapterId;\n }", "public ElementDefinitionDt setPattern(IDatatype theValue) {\n\t\tmyPattern = theValue;\n\t\treturn this;\n\t}", "Bindable getBindable( Meta.CursorFactory cursorFactory );", "public Class<? extends Dialog<Collection<DataAdapter>>> getAdapterDialog();", "public final String getPattern() {\n/* 187 */ return this.m_pattern;\n/* */ }", "public WildcardPattern(String pattern) {\r\n this.pattern = pattern;\r\n }", "@Inject(\n method = \"readPattern\",\n at = @At(value = \"JUMP\", ordinal = 0, shift = At.Shift.AFTER),\n slice = @Slice(\n from = @At(\n value = \"INVOKE\",\n target = \"Lnet/minecraft/nbt/ListTag;size()I\"\n )\n )\n )\n private void parseBppPatternDataInline(CallbackInfo info) {\n int nextIndex = this.patterns.size() - 1;\n while(nextLoomPatternIndex < loomPatterns.size()) {\n LoomPatternData data = loomPatterns.get(nextLoomPatternIndex);\n if(data.index == nextIndex) {\n this.patternCacheKey += partialCacheKey(data);\n nextLoomPatternIndex++;\n } else {\n break;\n }\n }\n }", "public int getPatternIndex(){\n\t\treturn this.indexPattern;\n\t}", "public void setPattern (String pattern) {\n this.pattern = pattern;\n }", "public IDatatype getPattern() { \n\t\treturn myPattern;\n\t}", "public void setDataFormatPattern(String dataFormatPattern) {\r\n this.dataFormatPattern = dataFormatPattern;\r\n }", "@Override\r\n\tpublic ISyncAdapter createSyncAdapter(ISchema schema, String baseDirectory, FeedRef feedRef) {\n\t\treturn null;\r\n\t}", "@Override\n public String getBinding(String name) {\n if (wrappedToStringContext != null && wrappedToStringContext.getBinding(name) != null)\n return wrappedToStringContext.getBinding(name);\n else\n return wrappedSerializationContext.getBinding(name);\n }", "public boolean hasAdapter(Object adaptable, String adapterTypeName);", "IIndexFragmentBinding[] findBindings(Pattern[] patterns, boolean isFullyQualified, IndexFilter filter, IProgressMonitor monitor) throws CoreException;", "public static Pattern fromJSON(JSONObject patternJson) {\n\t\tString name = patternJson.getString(\"name\");\n\t\tInteger minimumApplications = patternJson.optInt(\"min\", 1);\n\t\tInteger maximumApplications = patternJson.optInt(\"max\", 1);\n\t\tdouble applicationChance = patternJson.optDouble(\"chance\", 1);\n\t\tPatternFreeze freeze = PatternFreeze.valueOf(patternJson.optString(\"freeze\", \"none\").toUpperCase());\n\t\t\n\t\tArrayList<Sequence> sequences = new ArrayList<Sequence>();\n\t\t\n\t\t// Determine whether the match/apply cells are defined here or as ticketed options.\n\t\tif (patternJson.has(\"matches\")) {\n\t\t\t// The sequence properties are part of the pattern object itself.\n\t\t\tsequences.add(Sequence.fromJSON(patternJson));\n\t\t} else if (patternJson.has(\"options\")) {\n\t\t\t// There are multiple sets or match/apply options to select from.\n\t\t\tfor (int optionIndex = 0; optionIndex < patternJson.getJSONArray(\"options\").length(); optionIndex++) {\n\t\t\t\tsequences.add(Sequence.fromJSON(patternJson.getJSONArray(\"options\").getJSONObject(optionIndex)));\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"no 'matches' or 'options' property for pattern '\" + name + \"'\");\n\t\t}\n\t\t\n\t\treturn new Pattern(name, minimumApplications, maximumApplications, applicationChance, freeze, sequences);\n\t}", "FieldBinding getBinding( Field< ? > field );", "public String getPattern() {\r\n return this.currPattern;\r\n }", "public java.lang.Integer getPatternId() {\n return patternId;\n }", "IViewerBinding getBinding();", "public java.lang.Integer getPatternId() {\n return patternId;\n }", "public String getPattern() {\n return pattern == null ? null : pattern.pattern();\n }", "Builder adapterFactory(TypeAdapterFactory factory);", "public static TypeAdapterFactory create() {\n return new AutoValueGson_MyTypeAdapterFactory();\n }", "public final byte[] getPattern() {\n return pattern;\n }", "public SwiftPattern getBbanPattern() {\n return bbanPattern;\n }", "@Override\n\t\tpublic <T> T getAdapter(Class<T> adapter) {\n\t\t\treturn null;\n\t\t}", "public String getAccessPattern(String dc){\n\t\t//String AccessPattern=null;\n\t\t\n\t\t//...\n\t\treturn this.ap+\"@@\"+this.ref;\n\t}", "protected void onCreateDataBinding() {\n //add data binding\n }", "@Override\r\n\tpublic String[] getBindDsName() {\n\t\treturn new String[]{\"supplierSalesPrice_dataSource\"}; \r\n\t}", "public abstract ItemListAdapter getAdapter(RecyclerView recyclerView);", "@SuppressWarnings({\"unused\", \"RedundantSuppression\"})\n @Override\n public ViewBinder getAdapterViewBinder() {\n return mDataBinder.getAdapterViewBinder();\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic Object getAdapter(final Class adapter)\n\t{\n\n\t\treturn null;\n\t}", "public void addPattern(String pattern, Handler<Match> handler) {\n Matcher m = Pattern.compile(\":([A-Za-z][A-Za-z0-9]*)\").matcher(pattern);\n StringBuffer sb = new StringBuffer();\n Set<String> groups = new HashSet<>();\n while (m.find()) {\n String group = m.group().substring(1);\n if (groups.contains(group)) {\n throw new IllegalArgumentException(\"Cannot use identifier \" + group + \" more than once in pattern string\");\n }\n m.appendReplacement(sb, \"(?<$1>[^\\\\/]+)\");\n groups.add(group);\n }\n m.appendTail(sb);\n String regex = sb.toString();\n PatternBinding binding = new PatternBinding(Pattern.compile(regex), groups, handler);\n bindings.add(binding);\n }", "public int getPattern() {\n return this.pattern;\n }", "public ResourceAdapter getResourceAdapter() {\n log.finest(\"getResourceAdapter()\");\n return ra;\n }", "Expression getBindingExpression();", "public Binding getBinding() { \n\t\tif (myBinding == null) {\n\t\t\tmyBinding = new Binding();\n\t\t}\n\t\treturn myBinding;\n\t}", "public static DirectOutput of(\n String basePath, String pattern,\n Class<? extends DataFormat<?>> dataFormat) {\n try {\n Class<?> dataType = dataFormat.newInstance().getSupportedType();\n return of(dataType, basePath, pattern, dataFormat);\n } catch (Exception e) {\n throw new AssertionError(e);\n }\n }", "private AdapterManager getAdapterManager() {\n return adapterManager;\n }", "protected abstract SingleTypeAdapter<E> createAdapter( final List<E> items );", "public Class<?>[] getAdapterList() {\n\t\treturn new Class[] { IPropertySource.class };\n\t}", "public void setPattern(Pattern pattern) {\n this.pattern = pattern;\n }", "public DataSet getDataSet() {\r\n return dataBinder.getDataSet();\r\n }", "private void registerBindings(){\n\t\tdataBinder.registerBinding(\"name\", String.class, this.name, \"text\");\n\t\tdataBinder.registerBinding(\"creator\", com.kingdee.eas.base.permission.UserInfo.class, this.creator, \"data\");\n\t\tdataBinder.registerBinding(\"relateTask\", com.kingdee.eas.fdc.schedule.FDCScheduleTaskInfo.class, this.relationTask, \"data\");\n\t\tdataBinder.registerBinding(\"createTime\", java.sql.Timestamp.class, this.creatorTime, \"value\");\n\t\tdataBinder.registerBinding(\"imgDescription\", String.class, this.txtDescription, \"text\");\n\t\tdataBinder.registerBinding(\"entries.size\", String.class, this.kdtEntries, \"size.text\");\n\t\tdataBinder.registerBinding(\"entries.sizeInByte\", int.class, this.kdtEntries, \"sizeInByte.text\");\n\t\tdataBinder.registerBinding(\"entries.fileName\", String.class, this.kdtEntries, \"fileName.text\");\n\t\tdataBinder.registerBinding(\"entries.name\", String.class, this.kdtEntries, \"name.text\");\n\t\tdataBinder.registerBinding(\"entries\", com.kingdee.eas.fdc.schedule.ProjectImageEntryInfo.class, this.kdtEntries, \"userObject\");\t\t\n\t}", "public void setPattern(String pattern) {\r\n\t\tthis.pattern = pattern;\r\n\t}", "Pattern slotsPattern(ENodeBuilder b, Pattern optPrefix, String[] exports) {\n int offset = (null == optPrefix) ? 0 : 1;\n Pattern[] slotPatts = new Pattern[offset + exports.length];\n if (null != optPrefix) {\n slotPatts[0] = optPrefix;\n }\n for (int i = 0; i < exports.length; i++) {\n slotPatts[offset + i] = b.slotPattern(exports[i]);\n }\n return b.listPattern(slotPatts);\n }", "public Object getAdapter(Class adapter)\n {\n if (ProjectionAnnotationModel.class.equals(adapter))\n {\n if (this.projectionSupport != null)\n {\n Object result = this.projectionSupport.getAdapter(\n sourceViewer, adapter);\n if (result != null)\n {\n return result;\n }\n }\n }\n \n if (adapter.equals(IContentOutlinePage.class))\n {\n IEditorInput input = getEditorInput();\n \n if (input instanceof IFileEditorInput)\n {\n if (outlinePage == null)\n {\n outlinePage = new PerlOutlinePage(source);\n outlinePage.addSelectionChangedListener(new OutlineSelectionListener());\n }\n return outlinePage;\n }\n }\n \n return super.getAdapter(adapter);\n }", "@Override\n public List<BannerPattern> getPatterns() {\n return patterns;\n }", "public synchronized OrbitRelatedUniformEventPattern getPattern() {\n\t\tif (pattern == null) {\n\t\t\tpattern = obtainPattern();\n\t\t}\n\t\treturn pattern;\n\t}", "String getDelayPattern();", "@Override\n public ConstraintsDescriptor getDescriptor(String fqName) {\n\n Object constraintsObject = getObjectByClassNameForConcept(NameUtil.getAspectNodeFqName(fqName, LanguageAspect.CONSTRAINTS) + \"_Constraints\", fqName, false);\n\n ConstraintsDescriptor descriptor = null;\n\n if (constraintsObject == null) {\n // if ConstraintsDescriptor not exist too - return EmptyConstraintsDataHolder\n if (ModelConstraintsManager.getOldConstraintsDescriptor(NameUtil.namespaceFromConceptFQName(fqName)) == null) {\n descriptor = new BaseConstraintsDescriptor(fqName);\n }\n } else {\n if (ConstraintsDataHolder.class.isAssignableFrom(constraintsObject.getClass())) {\n try {\n ConstraintsDataHolder compiledDataHolder = (ConstraintsDataHolder) constraintsObject;\n descriptor = new DataHolderConstraintsDescriptor(compiledDataHolder);\n } catch (Exception ignored) {\n }\n }\n }\n\n if (descriptor == null) {\n descriptor = new DataHolderConstraintsDescriptor(new InterpretedConstraintsDataHolder(fqName));\n }\n\n return descriptor;\n }", "public Object[] getPattern(){\n return pattern;\n }", "String getDataSource();", "@Override\n public ResourceLocator getResourceLocator ()\n {\n return ( (IChildCreationExtender)adapterFactory ).getResourceLocator ();\n }", "public TokenPattern getPattern(int id) {\n for (int i = 0; i < patterns.length; i++) {\n if (patterns[i].getId() == id) {\n return patterns[i];\n }\n }\n return null;\n }", "private SettingAdapter generateShortcutItemAdapter(CapturingMode capturingMode) {\n super.updateSelectability();\n SettingAdapter settingAdapter = new SettingAdapter((Context)this.mActivity, this.mDialogItemFactory);\n block4 : for (SettingList.Shortcut shortcut : SettingList.getSettingShortcutList(capturingMode, (Activity)this.mActivity)) {\n SettingGroup settingGroup;\n switch (.$SwitchMap$com$sonyericsson$android$camera$view$settings$SettingList$Shortcut[shortcut.ordinal()]) {\n default: {\n settingGroup = shortcut.getGroup();\n if (settingGroup != null) break;\n settingAdapter = super.addItem(settingAdapter, shortcut, true);\n continue block4;\n }\n case 1: {\n settingAdapter = super.addItem(settingAdapter, shortcut, ParameterKey.FACING.isSelectable());\n continue block4;\n }\n case 2: {\n if (this.mActivity.isOneShotPhotoSecure()) {\n settingAdapter = super.addItem(settingAdapter, SettingList.Shortcut.BLANK, false);\n continue block4;\n }\n settingAdapter = super.addItem(settingAdapter, shortcut, true);\n continue block4;\n }\n }\n settingAdapter = super.addItem(settingAdapter, shortcut, super.isVisible(settingGroup));\n }\n return settingAdapter;\n }" ]
[ "0.56027704", "0.5448583", "0.5341051", "0.5341051", "0.5135894", "0.50808555", "0.50724936", "0.50639665", "0.50342315", "0.49946705", "0.4986267", "0.49813354", "0.49628517", "0.49523497", "0.48480076", "0.48199782", "0.48096022", "0.48010963", "0.47940516", "0.4766892", "0.47502685", "0.47402945", "0.47148228", "0.471318", "0.4696496", "0.46952364", "0.46932602", "0.46842465", "0.4684055", "0.46684903", "0.46634865", "0.46634865", "0.46596336", "0.46426213", "0.46146253", "0.4613194", "0.46062782", "0.45987618", "0.45987618", "0.45682487", "0.45651582", "0.45483333", "0.4522524", "0.45182574", "0.45071507", "0.44999537", "0.44935203", "0.44915426", "0.4491529", "0.44820663", "0.44813225", "0.44783333", "0.44776034", "0.44664013", "0.44611272", "0.44356847", "0.442992", "0.4423709", "0.44157508", "0.44131985", "0.44125205", "0.44123274", "0.44046742", "0.43989238", "0.43906468", "0.4378946", "0.43716013", "0.43648303", "0.43633392", "0.4357877", "0.43537563", "0.4349924", "0.43384624", "0.43339992", "0.4333096", "0.43288696", "0.4323923", "0.4319469", "0.4318672", "0.43171299", "0.43161333", "0.4310478", "0.4310453", "0.43031776", "0.4300584", "0.4294136", "0.42905378", "0.42898464", "0.42892376", "0.42765847", "0.42742655", "0.42645717", "0.42581055", "0.4257587", "0.42549196", "0.42491475", "0.42489055", "0.4242118", "0.42369276", "0.42368722" ]
0.8015993
0
Create a PatternMatcher root for the given key element.
@SuppressWarnings({ "unchecked" }) public static ObservablePatternMatcherRoot createPatternMatcherRoot(MatcherTreeViewerRootKey key) { ObservablePatternMatcherRoot root = new ObservablePatternMatcherRoot(key); //generated matchers IExtensionRegistry reg = Platform.getExtensionRegistry(); IExtensionPoint ep = reg.getExtensionPoint("org.eclipse.viatra2.emf.incquery.databinding.runtime.databinding"); for (IExtension e : ep.getExtensions()) { for (IConfigurationElement ce : e.getConfigurationElements()) { try { Object obj = ce.createExecutableExtension("matcherFactoryClass"); if (obj instanceof IMatcherFactory<?, ?>) { IMatcherFactory<IPatternMatch, IncQueryMatcher<IPatternMatch>> factory = (IMatcherFactory<IPatternMatch, IncQueryMatcher<IPatternMatch>>) obj; IncQueryMatcher<IPatternMatch> matcher = factory.getMatcher(key.getNotifier()); String patternFqn = factory.getPatternFullyQualifiedName(); root.addMatcher(matcher, patternFqn, true); } } catch (Exception ex) { ex.printStackTrace(); } } } //runtime matchers for (Pattern pattern : PatternRegistry.getInstance().getActivePatterns()) { root.registerPattern(pattern); } return root; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected TemplateElement(final String key) {\n this.key = key;\n if (this.key.charAt(0) != SEPARATOR) {\n this.key = SEPARATOR + this.key;\n }\n if (this.key.charAt(key.length() - 1) != SEPARATOR) {\n this.key += SEPARATOR;\n }\n }", "public static PathElement parseSingleKeyLHS( String origKey ) {\n\n String elementKey; // the String to use to actually make Elements\n String keyToInspect; // the String to use to determine which kind of Element to create\n\n if ( origKey.contains( \"\\\\\" ) ) {\n // only do the extra work of processing for escaped chars, if there is one.\n keyToInspect = removeEscapedValues(origKey);\n elementKey = removeEscapeChars( origKey );\n }\n else {\n keyToInspect = origKey;\n elementKey = origKey;\n }\n\n //// LHS single values\n if ( \"@\".equals( keyToInspect ) ) {\n return new AtPathElement( elementKey );\n }\n else if ( \"*\".equals( keyToInspect ) ) {\n return new StarAllPathElement( elementKey );\n }\n else if ( keyToInspect.startsWith( \"[\" ) ) {\n\n if ( StringTools.countMatches(keyToInspect, \"[\") != 1 || StringTools.countMatches(keyToInspect, \"]\") != 1 ) {\n throw new SpecException( \"Invalid key:\" + origKey + \" has too many [] references.\");\n }\n\n return new ArrayPathElement( elementKey );\n }\n //// LHS multiple values\n else if ( keyToInspect.startsWith(\"@\") || keyToInspect.contains( \"@(\" ) ) {\n // The traspose path element gets the origKey so that it has it's escapes.\n return TransposePathElement.parse( origKey );\n }\n else if ( keyToInspect.contains( \"@\" ) ) {\n throw new SpecException( \"Invalid key:\" + origKey + \" can not have an @ other than at the front.\" );\n }\n else if ( keyToInspect.contains(\"$\") ) {\n return new DollarPathElement( elementKey );\n }\n else if ( keyToInspect.contains(\"[\") ) {\n\n if ( StringTools.countMatches(keyToInspect, \"[\") != 1 || StringTools.countMatches(keyToInspect, \"]\") != 1 ) {\n throw new SpecException( \"Invalid key:\" + origKey + \" has too many [] references.\");\n }\n\n return new ArrayPathElement( elementKey );\n }\n else if ( keyToInspect.contains( \"&\" ) ) {\n\n if ( keyToInspect.contains(\"*\") )\n {\n throw new SpecException( \"Invalid key:\" + origKey + \", Can't mix * with & ) \");\n }\n return new AmpPathElement( elementKey );\n }\n else if ( keyToInspect.contains(\"*\" ) ) {\n\n int numOfStars = StringTools.countMatches(keyToInspect, \"*\");\n\n if(numOfStars == 1){\n return new StarSinglePathElement( elementKey );\n }\n else if(numOfStars == 2){\n return new StarDoublePathElement( elementKey );\n }\n else {\n return new StarRegexPathElement( elementKey );\n }\n }\n else if ( keyToInspect.contains(\"#\" ) ) {\n return new HashPathElement( elementKey );\n }\n else {\n return new LiteralPathElement( elementKey );\n }\n }", "void createNode(NodeKey key);", "@Override\n protected Node createNodeForKey(Object key) {\n \n if (key instanceof SleuthkitVisitableItem) {\n return ((SleuthkitVisitableItem) key).accept(new CreateSleuthkitNodeVisitor());\n } else if (key instanceof AutopsyVisitableItem) {\n return ((AutopsyVisitableItem) key).accept(new RootContentChildren.CreateAutopsyNodeVisitor());\n }\n else {\n logger.log(Level.SEVERE, \"Unknown key type \", key.getClass().getName());\n return null;\n }\n }", "public TypeFilterHonSearch(String key) {\r\n\t\temptyKey = StringUtils.isEmpty(key);\r\n\t\tif (emptyKey == false) {\r\n\t\t\tkey = key.trim().toLowerCase();\r\n\t\t\tif (key.length() > 0) {\r\n\t\t\t\tif (key.charAt(key.length() - 1) != '*') {\r\n\t\t\t\t\tkey += '*';\r\n\t\t\t\t}\r\n\t\t\t\tpattern = Pattern.compile(StringUtils.replace(key, \"*\", \".*\"));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public static TreapNode newNode(int key)\n {\n TreapNode temp = new TreapNode();\n temp.key = key;\n temp.priority = (r.nextInt(100));\n temp.left = temp.right = null;\n return temp;\n }", "protected TSTNode<E> getOrCreateNode(String key) throws NullPointerException, IllegalArgumentException {\n if(key == null) throw new NullPointerException(\"attempt to get or create node with null key\");\n if(key.length() == 0) throw new IllegalArgumentException(\"attempt to get or create node with key of zero length\");\n if(rootNode == null) rootNode = new TSTNode<E>(key.charAt(0), null);\n \n TSTNode<E> currentNode = rootNode;\n int charIndex = 0;\n while(true) {\n int charComp = compareCharsAlphabetically(key.charAt(charIndex), currentNode.splitchar);\n\n if (charComp == 0) {\n charIndex++;\n if(charIndex == key.length()) return currentNode;\n if(currentNode.relatives[TSTNode.EQKID] == null) currentNode.relatives[TSTNode.EQKID] = new TSTNode<E>(key.charAt(charIndex), currentNode);\n\t\tcurrentNode = currentNode.relatives[TSTNode.EQKID];\n } else if(charComp < 0) {\n if(currentNode.relatives[TSTNode.LOKID] == null) currentNode.relatives[TSTNode.LOKID] = new TSTNode<E>(key.charAt(charIndex), currentNode);\n currentNode = currentNode.relatives[TSTNode.LOKID];\n } else { \n // charComp must be greater than zero\n if(currentNode.relatives[TSTNode.HIKID] == null) currentNode.relatives[TSTNode.HIKID] = new TSTNode<E>(key.charAt(charIndex), currentNode);\n currentNode = currentNode.relatives[TSTNode.HIKID];\n }\n }\n }", "private HPTNode<K, V> buildRoot() {\n HPTNode<K, V> node = new HPTNode<K, V>(keyIdSequence++, null);\n node.children = reallocate(ROOT_CAPACITY);\n return node;\n }", "static Node newNode(int key) {\n\t\tNode temp = new Node();\n\t\ttemp.key = key;\n\t\ttemp.left = temp.right = null;\n\t\treturn temp;\n\t}", "public static void registerTemplateElement(final String key) {\n registerTemplateElement(new TemplateElement(key));\n }", "abstract UrlPatternMatcher create( String pattern );", "public static void initMatchKey() {\n matchKey = mTeamNum + \"-\" + \"Q\" + mMatchNum + \"-\" + mScoutid;\n }", "public ClientDriverRequest withParam(String key, Pattern value) {\n params.put(key, value);\n return this;\n }", "public Node<K,V> getRootNode(K key) {\n\n\t\treturn nodes[getNewHash(key)];\n\n\t}", "@Override\r\n\tpublic CacheTreeNode getOneRootNode(String key) {\n\t\treturn searchTreeNode(key);\r\n\t}", "private RadixTree find(Signature key) {\n if (key.isEmpty()) {\n return this;\n } else {\n for (Signature label : children.keySet()) {\n if (label.equals(key)) {\n return children.get(label);\n } else if (label.isPrefix(key)) {\n RadixTree child = children.get(label);\n int len = label.size();\n return child.find(key.suffix(len));\n }\n }\n }\n\n return null;\n }", "public RegexPatternBuilder ()\n {\n this.regex = null;\n }", "public Builder key(String key) {\n this.key = key;\n return this;\n }", "boolean matches(String key) {\n int keyLength = key.length();\n int patternLength = pattern.length();\n boolean[][] state = new boolean[keyLength + 1][patternLength + 1];\n state[0][0] = true; // empty key matches empty pattern\n for (int i = 0; i < patternLength; i++) {\n if (pattern.charAt(i) == '*') state[0][i + 1] = state[0][i]; // whether first empty matches pattern\n }\n for (int i = 0; i < keyLength; i++) {\n for (int j = 0; j < patternLength; j++) {\n char ch = pattern.charAt(j);\n if (ch == '?' || key.charAt(i) == ch) {\n state[i + 1][j + 1] = state[i][j];\n } else if (ch == '*') {\n state[i + 1][j + 1] = state[i][j + 1] || state[i + 1][j];\n }\n }\n }\n return state[keyLength][patternLength];\n }", "public List<String> getKeysByPattern(String patternKey){\n RKeys keys = redissonClient.getKeys();\n Iterable<String> foundedKeys = keys.getKeysByPattern(patternKey);\n List<String> list = new ArrayList<>();\n foundedKeys.forEach(key -> list.add(key));\n return list;\n }", "Node insertRec(Node root, int key){\r\n if (root == null)\r\n {\r\n root = new Node(key);\r\n return root;\r\n }\r\n \r\n if (key < root.key)\r\n {\r\n root.left = insertRec(root.left, key); \r\n }\r\n else if (key > root.key)\r\n {\r\n root.right = insertRec(root.right, key); \r\n }\r\n return root;\r\n }", "GroupQueryBuilder setKey(String key);", "static void insert(WordNode root, String Key)\n {\n int n = Key.length();\n WordNode pChild = root;\n\n for (int i=0; i<n; i++)\n {\n int index = Key.charAt(i) - 'a';\n\n if (pChild.child[index] == null)\n pChild.child[index] = new WordNode();\n\n pChild = pChild.child[index];\n }\n\n // make last node as leaf node\n pChild.isWord = true;\n }", "public HashPrefixTree(HPTKeyComparator<K> comparator) {\n this(comparator, (int)System.currentTimeMillis());\n }", "public RBNode<T, E> createRBNode(T key, E value) {\r\n\t\tRBNode<T, E> tempRBNode = new RBNode<T, E>(key, value, 'r');\r\n\t\treturn tempRBNode;\r\n\t}", "public Node insertRec(Node root, int key)\n {\n if(root==null)\n {\n root = new Node(key);\n return root;\n }\n if(key<root.key)\n root.left = insertRec(root.left,key);\n else if(key>root.key)\n root.right = insertRec(root.right,key);\n return root;\n }", "public NodeKey createNodeKey();", "Match createMatch();", "private Node getReplacementKeyNode(Key key, Node node) {\n\t\tNode ret = node.getChild(node.getDataNumber(key));\r\n\t\t\r\n\t\twhile (!ret.isLeaf()) {\r\n\t\t\tret = ret.getChild(ret.getChildren().size() - 1);\r\n\t\t}\r\n\t\t\r\n\t\treturn ret;\r\n\t}", "public BSTNode(K key) {\n this.key = key;\n this.left = null;\n this.right = null;\n this.height = 0;\n }", "public RegularExpressionValueMatcher() {\n\t\tthis(null);\n\t}", "static void insert(String key)\n {\n \n int len=key.length();\n trie_node crawl=root;\n for(int i=0;i<len;i++)\n {\n int idx=key.charAt(i);\n if(crawl.child[idx]==null)\n crawl.child[idx]=new trie_node();\n else\n crawl.child[idx].f++;\n\n crawl=crawl.child[idx];\n } \n \n \n }", "private ImmutablePair<byte[], byte[]> getFuzzyKeyFor(MDSKey key) {\n byte[] keyBytes = key.getKey();\n // byte array is automatically initialized to 0, which implies fixed match in fuzzy info\n // the row key after targetId doesn't need to be a match.\n // Workaround for HBASE-15676, need to have at least one 1 in the fuzzy filter\n byte[] infoBytes = new byte[keyBytes.length + 1];\n infoBytes[infoBytes.length - 1] = 1;\n\n // the key array size and mask array size has to be equal so increase the size by 1\n return new ImmutablePair<>(Bytes.concat(keyBytes, new byte[1]), infoBytes);\n }", "public HPTNode<K, V> insert(List<K> key) {\n check(key);\n init();\n int size = key.size();\n HPTNode<K, V> current = root;\n for (int i = 0; i < size; i++) {\n HPTNode<K, V> result = find(current, i, key.get(i), true);\n current.maxDepth = Math.max(current.maxDepth, size - i);\n current = result;\n }\n return current;\n }", "public JOSEMatcher build() {\n\n\t\t\treturn new JOSEMatcher(classes, algs, encs, jkus, kids);\n\t\t}", "public static UriMatcher buildUriMatcher() {\n\n // Initialize a UriMatcher with no matches by passing in NO_MATCH to the constructor\n UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);\n\n /*\n All paths added to the UriMatcher have a corresponding int.\n For each kind of uri you may want to access, add the corresponding match with addURI.\n The two calls below add matches for the task directory and a single item by ID.\n */\n uriMatcher.addURI(OrderContract.AUTHORITY, OrderContract.PATH_ORDERS, ORDERS);\n uriMatcher.addURI(OrderContract.AUTHORITY, OrderContract.PATH_ORDERS + \"/*\", ORDERS_WITH_NAME);\n uriMatcher.addURI(OrderContract.AUTHORITY, OrderContract.PATH_ORDERS + \"/#\", ORDERS_WITH_CAL);\n\n return uriMatcher;\n }", "public GrandChildOfStringMatch() {}", "private PatternBuilder() { }", "static Node newNode(int key) {\n\t\tNode temp = new Node();\n\t\ttemp.data = key;\n\t\ttemp.next = null;\n\t\treturn temp;\n\t}", "@Override\n public void add(String key) {\n if (key == null || key.length() == 0 || root == null) {\n return;\n }\n Node p = root;\n for (int i = 0; i < key.length(); i++) {\n char current = key.charAt(i);\n if (!p.next.containsKey(current)) {\n p.next.put(current, new Node(current, false));\n }\n p = p.next.get(current);\n }\n p.isKey = true;\n }", "public Iterable<String> keysThatMatch(String pattern)\r\n {\r\n Queue<String> q = new Queue<String>();\r\n if ((pattern.equals(\"\") || pattern.equals(\".\")) && null_str_val != null)\r\n q.enqueue(\"\");\r\n collect(root, \"\", pattern, q);\r\n return q;\r\n }", "static Node newNode(int key) \n{ \n\tNode node = new Node(); \n\tnode.left = node.right = null; \n\tnode.data = key; \n\treturn node; \n}", "public void insert(int key)\n {\n root = insertRec(root,key);\n }", "public MapElement(int key) {\n this.key = key;\n }", "public Object create(String key_letters) throws XtumlException;", "public static ReactorResult<org.ontoware.rdf2go.model.node.Node> getAllInitialKey_asNode_(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\treturn Base.getAll_as(model, instanceResource, INITIALKEY, org.ontoware.rdf2go.model.node.Node.class);\r\n\t}", "@Test\n public void testGetRoot() {\n AVLNode<Integer> instance = new AVLNode<> ( 7 );\n AVLNode<Integer> expResult = new AVLNode<> (); \n expResult.setRoot(new AVLNode<>( 7 ));\n AVLNode<Integer> result = instance;\n assertEquals(expResult.getRoot().getKey(), result.getKey());\n }", "public KeyRefImpl(SchemaModelImpl model, org.w3c.dom.Element el) {\n super(model, el);\n }", "public Part(String key, boolean literal) {\n if (key == null) throw new NullPointerException(\"key must not be null\");\n\n if (literal) {\n this.key = key;\n } else {\n StringBuffer buffer = new StringBuffer();\n\n Matcher matcher = INDEX_PATTERN.matcher(key);\n while (matcher.find()) {\n String arrayIndexString = matcher.group(2);\n String keyIndexString = matcher.group(3);\n\n if (arrayIndexString != null) {\n hasArrayIndex = true;\n index = Integer.parseInt(arrayIndexString);\n } else {\n hasKeyIndex = true;\n index = Integer.parseInt(keyIndexString);\n }\n matcher.appendReplacement(buffer, \"\");\n }\n matcher.appendTail(buffer);\n\n this.key = buffer.toString();\n }\n }", "void createPropertyKeyToken( String key, int id );", "private Entry createEntry(String pattern) {\n\t\tEntry entry = null;\n\n\t\tif (pattern != null) {\n\t\t\tString item = pattern.trim();\n\t\t\tif (item.length() > 0) {\n\t\t\t\tentry = new Entry();\n\t\t\t\tentry.result = !item.startsWith(\"-\");\n\t\t\t\tentry.partial = item.endsWith(\".\");\n\t\t\t\tentry.classpath = entry.result ? item : item.substring(1).trim();\n\t\t\t}\n\t\t}\n\t\treturn entry;\n\t}", "private Node getChild(char key) {\n for (Node child : children) {\n if (child.getKey() == key) {\n return child;\n }\n }\n return null;\n }", "public RegularExpression() {\n }", "public void insert(int key){\n\t\tif(this.root == null){\n\t\t\tNode r = new Node(key);\n\t\t\tthis.root = r;\t\n\t\t}else{\n\t\t\t//if not recursively insert the node\n\t\t\trecInsert(this.root, key);\n\t\t}\n\t\treturn;\n\t}", "@Test\n public void testSetKey() {\n Integer key = 12;\n AVLNode<Integer> instance = new AVLNode<> ();\n instance.setKey( key );\n assertEquals( instance.getKey(), key );\n }", "public MyBinaryNode<K> search(K key) {\n\t\t\n\t\treturn searchRecursive(root, key);\n\t}", "private JBurgPatternMatcher()\n\t{\n\t}", "public void add(String key) {\n if (key == null || key.length() < 1) {\n return;\n }\n Node curr = root;\n for (int i = 0; i < key.length(); i++) {\n char c = key.charAt(i);\n if (!curr.next.items.containsKey(c)) {\n curr.next.items.put(c, new Node(c, false, 256));\n }\n curr = (Node)curr.next.items.get(c);\n }\n curr.isKey = true;\n }", "public RBNode<T> search(T key) {\r\n return search1(key);\r\n//\t\treturn search2(root, key); //recursive version\r\n }", "private SubnodeBTree(final long key, final BlockContext context)\n\tthrows\n\t\tCRCMismatchException,\n\t\tjava.io.IOException\n\t{\n\t\tsuper(key, context);\n\t\tthis.context = context;\n\t}", "protected <SubT extends E> Provider<SubT> getByKeyProvider(Key<SubT> key) {\n if(!injector.hasProvider(key)) {\n injector.putBinding(key, (Provider<SubT>) null);\n }\n return () -> injector.getInstance(key);\n }", "private Node findKey(Node R, String targetKey){ \n if(R == null || R.item.key.equals(targetKey)) return R;\n if(R.item.key.compareToIgnoreCase(targetKey)>0) return findKey(R.left, targetKey);\n else return findKey(R.right, targetKey); //(R.item.key.compareToIgnoreCase(targetKey)>0) \n }", "public AvlNode(int key) {\n this.key=key;\n this.left=null;\n this.right=null;\n this.parent=null;\n this.height=0; \n }", "public Node insert(Key key, Value value) { \r\n // inserting into an empty tree results in a single value leaf node\r\n return new LeafNode(key,value);\r\n }", "public Query regEx(String key, Object value) {\n Preconditions.checkNotNull(key);\n builder.addFilter(builder.getOperator(QueryFilterBuilder.Operators.REGEX), key, value);\n return this;\n }", "public Match(){\n this(-1, null, 0, 0, null, null);\n }", "public static void insert(String key)\n\t{\n\t\tint level;\n\t\tint length=key.length();\n\t\tint index;\n\t\tTrieNode pCrawl=root;\n\t\tfor(level=0;level<length;level++)\n\t\t{\n\t\t\tindex=key.charAt(level)-'a';\n\t\t\t\n\t\t\tif(pCrawl.children[index]==null)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tpCrawl.children[index]=new TrieNode();\n\t\t\t}\n\t\t\tpCrawl=pCrawl.children[index];\n\t\t\tpCrawl.freq++;\n\t\t}\n\t\tpCrawl.isEndOfWord=true;\n\t}", "public Node(int key, int level) {\n\t\tthis.key = key;\n\t\tthis.level = level;\n\t}", "protected SafeHashMap.KeySet instantiateKeySet()\n {\n return new KeySet();\n }", "public MultiKey() {}", "public void insert(int key) {\n\t\tprivateInsert(key, root, null, new Ref<Integer>(1));\n\t}", "private static UriMatcher buildUriMatcher(){\r\n UriMatcher matcher = new UriMatcher(UriMatcher.NO_MATCH);\r\n matcher.addURI(AUTHORITY, \"task\", LIST_TASK);\r\n matcher.addURI(AUTHORITY, \"task/#\", ITEM_TASK);\r\n return matcher;\r\n }", "public RBNode<T, E> searchAndRetrieve(T key) {\r\n\t\tRBNode<T, E> c = root;\r\n\t\tRBNode<T, E> p = nillLeaf;\r\n\t\twhile (c != nillLeaf) {\r\n\t\t\t// if when comparing if it hasnt found the key go to the left\r\n\t\t\tif (key.compareTo(c.uniqueKey) < 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t\t// if when comparing if it hasnt found the key go to the right\r\n\t\t\telse if (key.compareTo(c.uniqueKey) > 0) {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.rightChild;\r\n\t\t\t}\r\n\t\t\t// they are equal\r\n\t\t\telse {\r\n\t\t\t\tp = c;\r\n\t\t\t\tc = c.leftChild;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn p;\r\n\t}", "public static UriMatcher buildUriMatcher() {\n // Initialize a UriMatcher\n UriMatcher uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);\n // Add URI matches\n\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_RECIPES, RECIPES);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_RECIPES + \"/#\", RECIPE_WITH_ID);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_INGREDIENTS, INGREDIENTS);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_INGREDIENTS + \"/#\", INGREDIENTS_WITH_ID);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_STEPS, STEPS);\n uriMatcher.addURI(RecipeContract.AUTHORITY, RecipeContract.PATH_STEPS + \"/#\", STEPS_WITH_ID);\n\n return uriMatcher;\n }", "public Data poll(Key key) {\n var curr = root;\n var next = root;\n while (next != null && next.key.compareTo(key) != 0) {\n curr = next;\n\n if (key.compareTo(curr.key) < 0) {\n next = curr.left; \n } else {\n next = curr.right;\n }\n }\n\n if (next == null) {\n return null;\n } else {\n var ret = next.data;\n\n if (next.right != null && next.left != null) {\n int predHeight = 0;\n var pred = next.right;\n var predP = next;\n while (pred.left != null) {\n predP = pred;\n pred = pred.left;\n predHeight++;\n }\n\n int succHeight = 0;\n var succ = next.left;\n var succP = next;\n while (succ.right != null) {\n succP = succ;\n succ = succ.right;\n succHeight++;\n }\n \n Node newNode;\n Node newNodeP;\n Node newNodeS;\n if (succHeight > predHeight) {\n newNode = succ;\n newNodeP = succP;\n newNodeS = succ.left;\n } else {\n newNode = pred;\n newNodeP = predP;\n newNodeS = succ.right;\n }\n\n if (newNodeP.right == newNode) {\n newNodeP.right = newNodeS;\n } else {\n newNodeP.left = newNodeS;\n }\n\n next.key = newNode.key;\n next.data = newNode.data;\n } else {\n var child = next.right == null ? next.left\n : next.right;\n if (next == root) {\n root = child;\n } else {\n if (curr.left == next) {\n curr.left = child;\n } else {\n curr.right = child;\n }\n }\n }\n return ret;\n }\n }", "public void handlePatternKey(KnightSubject source);", "private BTNode search(BTNode btNode, DataPair key) {\n int i =0;\n while (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i]) > 0)\n i++;\n\n if (i < btNode.mCurrentKeyNum && key.compareTo(btNode.mKeys[i])==0)\n return btNode;//btNode.mKeys[i];\n if (btNode.mIsLeaf)\n return null;\n return search(btNode.mChildren[i],key);\n }", "public ContentKey() {}", "private RadixTree split(Signature key, Signature prefix) {\n Signature suffix = key.suffix(prefix.size());\n RadixTree son = children.get(key);\n RadixTree father = new RadixTree();\n\n children.remove(key);\n children.put(prefix, father);\n father.children.put(suffix, son);\n\n return father;\n }", "public Map.Entry<CharSequence,T> getLongestMatch(CharSequence key)\n\t{\n\t\tif(root == null || key == null)\n\t\t\treturn null;\n\t\treturn root.getLongestMatch(key, 0);\n\t}", "public V1Toleration withKey(String key) {\n this.key = key;\n return this;\n }", "public void findKeyPoints(){\n Mat descriptorFrame = new Mat();\n MatOfKeyPoint keyPointFrame = new MatOfKeyPoint();\n\n mDetector.detect(mGray.submat(mScanTop,mScanBottom,mScanLeft,mScanRight), keyPointFrame);\n mExtractor.compute(mGray.submat(mScanTop,mScanBottom,mScanLeft,mScanRight), keyPointFrame, descriptorFrame);\n\n /* matches the keypoints of incoming frame with the key points of template */\n MatOfDMatch matches = new MatOfDMatch();\n\n /* if descriptorFrame.cols()==0, mMatcher.match will cause exception */\n if(descriptorFrame.cols()==0){\n lostTrack();\n return;\n }else{\n mMatcher.match(mDescriptor, descriptorFrame, matches);\n mLostTrackCounter = 0;\n mRectBorder = new Scalar(150,200,150);\n }\n\n /* check if pattern exist by checking the sume of DMatch.distance */\n DMatch dm[] = matches.toArray();\n\n /* pattern found. go through matofdmatch again, find all the key points whose distance is lower than threshold */\n /* which, in theory, should mean that these points belong to the pattern */\n KeyPoint kp[] = keyPointFrame.toArray();\n List<Point> frameKp = new ArrayList<>();\n List<KeyPoint> kpNew = new ArrayList<>();\n List<Point3> kpTemplate = new ArrayList<>();\n\n /* form new points to monitor */\n double xTally = 0,\n yTally = 0,\n counter = 0;\n\n /* find the average point to monitor */\n\n for(int i = 0; i<dm.length;i++){\n if(dm[i].distance<800&&dm[i].distance>200){\n kpNew.add(new KeyPoint((float) kp[dm[i].trainIdx].pt.x+mScanLeft,(float) kp[dm[i].trainIdx].pt.y+mScanTop, kp[dm[i].trainIdx].size));\n frameKp.add(new Point((float) kp[dm[i].trainIdx].pt.x+mScanLeft,(float) kp[dm[i].trainIdx].pt.y+mScanTop));\n Point3 newPoint3 = new Point3(mArrayListTemplateKP.get(dm[i].queryIdx).x-90,mArrayListTemplateKP.get(dm[i].queryIdx).y-70,0);\n kpTemplate.add(newPoint3);\n\n xTally += kp[dm[i].trainIdx].pt.x + (double)mScanLeft;\n yTally += kp[dm[i].trainIdx].pt.y + (double)mScanTop;\n counter += 1;\n }\n }\n\n if(counter>2){\n mKpMat.fromList(kpNew);\n mRefCoord.fromList(kpTemplate);\n mFrameKP.fromList(frameKp);\n\n mScanCenter = new Point(xTally/counter,yTally/counter);\n }else{\n lostTrack();\n return;\n }\n\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n tvShutter.setBackground(ContextCompat.getDrawable(getApplicationContext(),R.drawable.shutter_active));\n }\n });\n\n adjustROI(mScanCenter, mDetectionBoxSize);\n }", "protected static String getVariablePath(String rootKey, String entityKey, String key) {\n int separatorIndex = key.indexOf(separator);\n String first = separatorIndex != -1 ? key.substring(0, separatorIndex) : key;\n String object = rootKey;\n if (first.equals(entityref)) {\n object = entityKey;\n key = key.substring(separatorIndex + 1);\n } else if (first.equals(registrationref)) {\n object = registrationref;\n key = key.substring(separatorIndex + 1);\n } else if (first.equals(effectref)) {\n object = effectref;\n key = key.substring(separatorIndex + 1);\n }\n object += \".\" + key;\n return object;\n }", "public Iterable<String> keysThatMatch(String pat) {\n LinkedList<String> q = new LinkedList<String>();\n collect(root, pat, \"\", q);\n return q;\n }", "public NodeKey createNodeKeyWithIdentifier( String identifier );", "@Override\r\n public Map<K, ICacheElement<K, V>> processGetMatching(final String pattern)\r\n {\r\n final Map<K, ICacheElement<K, V>> elements = new HashMap<>();\r\n Set<K> keyArray = null;\r\n storageLock.readLock().lock();\r\n try\r\n {\r\n keyArray = new HashSet<>(keyHash.keySet());\r\n }\r\n finally\r\n {\r\n storageLock.readLock().unlock();\r\n }\r\n\r\n final Set<K> matchingKeys = getKeyMatcher().getMatchingKeysFromArray(pattern, keyArray);\r\n\r\n for (final K key : matchingKeys)\r\n {\r\n final ICacheElement<K, V> element = processGet(key);\r\n if (element != null)\r\n {\r\n elements.put(key, element);\r\n }\r\n }\r\n return elements;\r\n }", "private MutateOperation createRoot() {\n AssetGroupListingGroupFilter listingGroupFilter =\n AssetGroupListingGroupFilter.newBuilder()\n .setResourceName(\n ResourceNames.assetGroupListingGroupFilter(\n customerId, assetGroupId, rootListingGroupId))\n .setAssetGroup(ResourceNames.assetGroup(customerId, assetGroupId))\n // Since this is the root node, do not set the ParentListingGroupFilter. For all other\n // nodes, this would refer to the parent listing group filter resource name.\n // .setParentListingGroupFilter(\"PARENT_FILTER_NAME\")\n //\n // Unlike AddPerformanceMaxRetailCampaign, the type for the root node here must be\n // SUBDIVISION because it will have child partitions under it.\n .setType(ListingGroupFilterType.SUBDIVISION)\n // Specifies that this is in the shopping vertical because it is a Performance Max\n // campaign for retail.\n .setVertical(ListingGroupFilterVertical.SHOPPING)\n // Note the case_value is not set because it should be undefined for the root node.\n .build();\n AssetGroupListingGroupFilterOperation operation =\n AssetGroupListingGroupFilterOperation.newBuilder().setCreate(listingGroupFilter).build();\n return MutateOperation.newBuilder()\n .setAssetGroupListingGroupFilterOperation(operation)\n .build();\n }", "public CacheTagImpl(String key) {\n this(key, ANY);\n }", "public TrieNode insert(Character key) {\n if (children.containsKey(key)) {\n return null;\n }\n\n TrieNode next = new TrieNode();\n next.key = key;\n children.put(key, next);\n\n return next;\n }", "private Element getElementByKeyRef(Node node) {\n\t\tElement ref ;\n\t\t\t\n\t\tString refType = getDocumentXpath(node);\n\t\tSystem.out.println(\"search ref for : \"+refType);\n\t\t/* get ref attribute */\n\t\tString refId = node.getTextContent();\n\t\tif (refId == null || refId.equals(\"\")){ \n\t\t\tfor (int i = 0; i< node.getAttributes().getLength(); i++) {\n//\t\t\t\tSystem.out.println(node.getAttributes().item(i).getNodeName()+\" :: \"+node.getAttributes().item(i).getTextContent());\n\t\t\t\tif (node.getAttributes().item(i).getNodeName().equals(refAttribute)){\n\t\t\t\t\t\trefId = node.getAttributes().item(i).getNodeValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tString referedType = (String) refType2referedType.get(refType)\t;\t\n\t\t\n\t\tref = (Element) xsKeyNodes.get(referedType+\"#\"+refId);\t\t\n\t\treturn ref;\n\t}", "@Factory\n public static Matcher<QueryTreeNode> times(Matcher<QueryTreeNode> leftMatcher, Matcher<QueryTreeNode> rightMatcher) {\n return new BinaryOperatorNodeMatcher(leftMatcher, \"*\", rightMatcher);\n }", "public void InsertNode(int key){\n boolean isRightChild = false;\n boolean isDuplicate = false;\n if(root == null){\n root = new Node(key);\n return;\n }\n Node temp = root;\n while(true){\n if(temp.value == key){\n isDuplicate = true ;\n break;\n }\n if(temp.value > key){\n if(temp.left == null){\n break;\n }\n temp = temp.left ;\n }\n if(temp.value < key){\n if(temp.right == null){\n isRightChild = true;\n break;\n }\n temp = temp.right ;\n }\n }\n if( !isDuplicate && isRightChild)\n temp.right = new Node(key);\n else if(!isDuplicate && !isRightChild)\n temp.left = new Node(key);\n else\n temp.count = temp.count + 1;\n }", "TrieNode root();", "public void addFilterMatcher(MatcherKey key, FilterMatcher matcher) {\n\n SupportUtils.setWebContext(matcher, webContext);\n getFilterMatcherRegistry().addFilterMatcher(key, matcher);\n }", "public void insert(T key) {\r\n RBNode<T> node = new RBNode<>(key, RED, null, null, null);\r\n if(node != null)\r\n insert(node);\r\n }", "private BTreeNode createNewRoot(BTreeNode rightChild) {\n BTreeNode newRoot = new BTreeNode(T_VAR);\n String key = getRoot().getKey(T_VAR - 1);\n newRoot.insert(key);\n newRoot.setChild(0, getRoot());\n newRoot.setChild(1, rightChild);\n newRoot.setLeaf(false);\n return newRoot;\n }", "private static ImmutableMap<String, Object> theme(String key, String... parentKeys) {\n ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();\n builder.put(\"path\", \".\");\n builder.put(\"key\", key);\n if (parentKeys != null) {\n builder.put(\"parent\", ImmutableList.copyOf(parentKeys));\n }\n return builder.build();\n }", "Set<String> getKeysMatchingPattern(String pattern);", "public\n BaseGenerator\n (\n Comparable key, \n CellPolicy policy\n ) \n throws ParseException\n {\n if(key == null) \n throw new ParseException\n (\"The cell value cannot be (null)!\");\n pCellKey = key;\n\n if(policy == null) \n throw new ParseException\n (\"The key generator cannot be (null)!\"); \n pCellPolicy = policy;\n\n pChildren = new TreeMap<Comparable,BaseGenerator>(); \n }", "private static <U extends Comparable<? super U>> NodePair<U> split(Node<U> root, U key) {\n if (root == null)\n return new NodePair<U>(null, null);\n if (root.value.compareTo(key) < 0) {\n NodePair<U> spl = split(root.right, key);\n root.right = spl.first;\n root.recalc();\n \n return new NodePair<U>(root, spl.second);\n } else {\n NodePair<U> spl = split(root.left, key);\n root.left = spl.second;\n root.recalc();\n \n return new NodePair<U>(spl.first, root);\n }\n }" ]
[ "0.5095629", "0.50605595", "0.49499527", "0.4923589", "0.4866785", "0.48343328", "0.48158774", "0.47713608", "0.46071532", "0.45635515", "0.45504752", "0.45461243", "0.45427024", "0.45352966", "0.4532345", "0.4528212", "0.45281819", "0.45240185", "0.4508791", "0.44884664", "0.44882983", "0.44731322", "0.44724706", "0.44532028", "0.4451626", "0.44391993", "0.44300288", "0.4406497", "0.43918687", "0.43902427", "0.43894008", "0.4384168", "0.4383624", "0.43754566", "0.43696764", "0.43641004", "0.43576068", "0.4351118", "0.43495026", "0.43466884", "0.43464196", "0.43387187", "0.43166047", "0.42865917", "0.4282367", "0.4266793", "0.42598525", "0.42552102", "0.42537588", "0.42496818", "0.4237713", "0.42366615", "0.4236447", "0.42289498", "0.42274427", "0.42176124", "0.42081916", "0.41902533", "0.4185951", "0.41840816", "0.41804722", "0.41787004", "0.41753843", "0.4165409", "0.41652375", "0.41514796", "0.4150355", "0.4149226", "0.41351086", "0.4132584", "0.41307303", "0.41287127", "0.4126146", "0.41216606", "0.41207483", "0.41146785", "0.4114096", "0.41125077", "0.41089842", "0.410676", "0.41013545", "0.41004297", "0.40980056", "0.40972513", "0.40962696", "0.4095444", "0.40912294", "0.40887052", "0.40885535", "0.40873036", "0.4086975", "0.40825197", "0.40811226", "0.40744862", "0.4066229", "0.40644774", "0.40632257", "0.4062268", "0.4056885", "0.40551493" ]
0.7359063
0
/ renamed from: androidx.appcompat.widget.m0$a / compiled from: ShareActionProvider
public interface C0531a { /* renamed from: a */ boolean mo2805a(C0530m0 m0Var, Intent intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void m122580a() {\n ((ShareActionBar) this.receiver).mo95951a();\n }", "public View mo1753d() {\n ActivityChooserView activityChooserView = new ActivityChooserView(this.f2117g);\n if (!activityChooserView.isInEditMode()) {\n activityChooserView.setActivityChooserModel(C0475c.m2615a(this.f2117g, this.f2118h));\n }\n TypedValue typedValue = new TypedValue();\n this.f2117g.getTheme().resolveAttribute(C0238R.attr.actionModeShareDrawable, typedValue, true);\n activityChooserView.setExpandActivityOverflowButtonDrawable(C0242a.m1109c(this.f2117g, typedValue.resourceId));\n activityChooserView.setProvider(this);\n activityChooserView.setDefaultActionButtonContentDescription(C0238R.string.abc_shareactionprovider_share_with_application);\n activityChooserView.setExpandActivityOverflowButtonContentDescription(C0238R.string.abc_shareactionprovider_share_with);\n return activityChooserView;\n }", "private void addShareAction() {\n\t\t// TODO Auto-generated method stub\n\t\tWindow window = getWindow();\n\t\tint width = getWindowManager().getDefaultDisplay().getWidth();\n\t\tint height = getWindowManager().getDefaultDisplay().getHeight();\n\t\tString shareContent = \"\" + 100 * mRightResultCount/mImagesID.size();\n\t\tString mShareFileName = File.separator + \"/color_blindness_result.png\";\n\t\t\n\t\tIntent shareIntent = new Intent(Intent.ACTION_SEND);\n\t\tFile file = ScreenShotForShare.GetScreenShotFile(window, width, height, mShareFileName); \n\t\tif (file != null)\n\t\t\tshareIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));\n\t\tshareIntent.setType(\"text/image/png\"); \n\t\tshareIntent.putExtra(Intent.EXTRA_SUBJECT, \"\");\n\t\tshareIntent.putExtra(Intent.EXTRA_TEXT, getString(R.string.shareResult, shareContent) + \"%\");\n \tstartActivity(Intent.createChooser(shareIntent, getString(R.string.share))); \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.SINA)\r\n .withText(share.getContent()).withTitle(share.getTitle()).withMedia(urlImage)\r\n .withTargetUrl(share.getUrl())\r\n .setCallback(umShareListener).share();\r\n\r\n }", "@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 }", "@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 }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n\n getMenuInflater().inflate(R.menu.menu_aboutus, menu);\n\n// Inflate the menu; this adds items to the action bar if it is present.\n\n MenuItem shareItem = menu.findItem(R.id.menu_share);\n myShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);\n myShareActionProvider.setShareHistoryFileName(\n ShareActionProvider.DEFAULT_SHARE_HISTORY_FILE_NAME);\n myShareActionProvider.setShareIntent(Shareintent());\n\n return super.onCreateOptionsMenu(menu);\n\n\n }", "private void configureViewElementsBasedOnProvider() {\n JRDictionary socialSharingProperties = mSelectedProvider.getSocialSharingProperties();\n \n if (socialSharingProperties.getAsBoolean(\"content_replaces_action\"))\n updatePreviewTextWhenContentReplacesAction();\n else\n updatePreviewTextWhenContentDoesNotReplaceAction();\n \n if (isPublishThunk()) {\n mMaxCharacters = mSelectedProvider.getSocialSharingProperties()\n .getAsDictionary(\"set_status_properties\").getAsInt(\"max_characters\");\n } else {\n mMaxCharacters = mSelectedProvider.getSocialSharingProperties()\n .getAsInt(\"max_characters\");\n }\n \n if (mMaxCharacters != -1) {\n mCharacterCountView.setVisibility(View.VISIBLE);\n } else\n mCharacterCountView.setVisibility(View.GONE);\n \n updateCharacterCount();\n \n boolean can_share_media = mSelectedProvider.getSocialSharingProperties()\n .getAsBoolean(\"can_share_media\");\n \n // Switch on or off the media content view based on the presence of media and ability to\n // display it\n boolean showMediaContentView = mActivityObject.getMedia().size() > 0 && can_share_media;\n mMediaContentView.setVisibility(showMediaContentView ? View.VISIBLE : View.GONE);\n \n // Switch on or off the action label view based on the provider accepting an action\n //boolean contentReplacesAction = socialSharingProperties.getAsBoolean(\"content_replaces_action\");\n //mPreviewLabelView.setVisibility(contentReplacesAction ? View.GONE : View.VISIBLE);\n \n mUserProfileInformationAndShareButtonContainer.setBackgroundColor(\n colorForProviderFromArray(socialSharingProperties.get(\"color_values\"), true));\n \n int colorWithNoAlpha = colorForProviderFromArray(\n mSelectedProvider.getSocialSharingProperties().get(\"color_values\"), false);\n \n mJustShareButton.getBackground().setColorFilter(colorWithNoAlpha, PorterDuff.Mode.MULTIPLY);\n mConnectAndShareButton.getBackground().setColorFilter(colorWithNoAlpha,\n PorterDuff.Mode.MULTIPLY);\n mPreviewBorder.getBackground().setColorFilter(colorWithNoAlpha, PorterDuff.Mode.SRC_ATOP);\n \n // Drawable providerIcon = mSelectedProvider.getProviderListIconDrawable(this);\n //\n // mConnectAndShareButton.setCompoundDrawables(null, null, providerIcon, null);\n // mJustShareButton.setCompoundDrawables(null, null, providerIcon, null);\n mProviderIcon.setImageDrawable(mSelectedProvider.getProviderListIconDrawable(this));\n }", "public void changeShareIntent(ShareActionProvider mShareActionProvider, Intent shareIntent) {\n mShareActionProvider.setShareIntent(shareIntent);\n }", "public static void m5823d() {\n if (f4669a != null) {\n f4669a.m12578a(\"whatsapp_app_share\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"whatsapp_app_share\"));\n }", "public static void onClickShareButton(Context context) {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, context.getResources().getString(R.string.share_msg));\n sendIntent.setType(\"*/*\");\n context.startActivity(sendIntent);\n }", "public void share(View view){\n Toast.makeText(this, \"Loading share options ...\", Toast.LENGTH_SHORT).show();\n //Create an intent to share\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = \"You should check out \" + getString(R.string.app_name) + \", an app where you can easily find books at the school library!\";\n if(currentBook.title != null)\n shareBody = \"Check out \\\"\" + currentBook.title + \"\\\", a book that I found with the app, \" + getString(R.string.app_name);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, \"\" + getString(R.string.app_name));\n sharingIntent.putExtra(Intent.EXTRA_TEXT, shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n }", "@Override\n\tpublic void onShareButton() {\n\t\tDialogs.getShareEditDialog(this, false).show();\n\t}", "@Override\n protected void sendChooserIntent(WindowAndroid windowAndroid, Intent sharingIntent) {\n super.sendChooserIntent(windowAndroid, sharingIntent);\n }", "@Override\n public void onClick(View v) {\n String shareBody =item.title.toString()+\"\\n\\n\"+getResources().getString(R.string.item_show)+\"\\n\"+ Config.APP_IMAGES_URL.replace(\"uploads/\",\"share/\")+item.id;\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n startActivity(Intent.createChooser(sharingIntent, getResources().getString(R.string.app_name)));\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail, menu);\n MenuItem mi = menu.findItem(R.id.shareid);\n\n sap = (ShareActionProvider) MenuItemCompat.getActionProvider(mi);\n Intent iu = new Intent(Intent.ACTION_SEND);\n TextView tv = (TextView) findViewById(R.id.my_weat);\n data = tv.getText().toString();\n iu.setType(\"text/plain\");\n Log.e(\"hello\", data);\n iu.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);\n iu.putExtra(Intent.EXTRA_TEXT, data + \" #Sunshineapp\");\n if(sap!=null) {\n Log.e(\"uclicked\", \"share button\");\n sap.setShareIntent(iu);\n //startActivity(iu);\n }\n return true;\n }", "public void shareViaWhatsappNativeOption() {\n nativeWhatsappShareButton.click();\n }", "public void shareApp() {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/*\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));\n shareIntent.putExtra(Intent.EXTRA_TEXT, \"Try this \" + getResources().getString(R.string.app_name) + \" App: https://play.google.com/store/apps/details?id=\" + getApplicationContext().getPackageName());\n startActivity(Intent.createChooser(shareIntent, \"Share Using\"));\n }", "@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tNoteEditView.this.addShare();\n \t\t\t}", "protected void addShare() {\n \t\t((InputMethodManager) this.getContext().getSystemService(\n \t\t\t\tContext.INPUT_METHOD_SERVICE)).hideSoftInputFromWindow(\n \t\t\t\tthis.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);\n \t\tIntent intent = new Intent(Intent.ACTION_SEND);\n \t\tArrayList<String> images = this.mNoteItemModel.getImages();\n \t\tLog.i(TAG, images.toString());\n \t\tif (images.isEmpty())\n \t\t\tintent.setType(\"text/plain\");\n \t\telse if (images.size() == 1) {\n \t\t\tintent.setType(\"image/*\");\n \t\t} else if (images.size() > 1) {\n \t\t\tintent.setAction(Intent.ACTION_SEND_MULTIPLE);\n \t\t\tintent.setType(\"images/*\");\n \t\t}\n \t\tintent.putExtra(Intent.EXTRA_TITLE, \"Share my note...\");\n \t\tintent.putExtra(Intent.EXTRA_TEXT, this.mNoteItemModel.getContent());\n \t\tif (images.size() == 1) {\n \t\t\tUri uri = this.mNoteItemModel.getImageUri(images.get(0));\n \t\t\tintent.putExtra(Intent.EXTRA_STREAM, uri);\n \t\t} else if (images.size() > 1) {\n \t\t\tArrayList<Uri> uris = new ArrayList<Uri>();\n \t\t\tfor (String image : images) {\n \t\t\t\turis.add(this.mNoteItemModel.getImageUri(image));\n \t\t\t}\n \t\t\tintent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);\n \t\t}\n \t\tthis.getContext().startActivity(Intent.createChooser(intent, \"Share\"));\n \t}", "private Intent getDefaultShareIntent(){\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n intent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n intent.putExtra(Intent.EXTRA_TEXT,\"Extra Text\");\n return intent;\n }", "@Override\r\n\t\t\tpublic void onClick(View v)\r\n\t\t\t{\n\t\t\t\tshareViaFacebook();\r\n\t\t\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n MenuItem item = menu.findItem(R.id.menu_item_share);\r\n ShareActionProvider myShareActionProvider = (ShareActionProvider)MenuItemCompat.getActionProvider(item);\r\n myShareActionProvider.setShareHistoryFileName(\"test\");\r\n \r\n Intent myIntent = new Intent();\r\n myIntent.setAction(Intent.ACTION_SEND);\r\n myIntent.putExtra(Intent.EXTRA_TEXT, getResources().getString(R.string.sms_body));\r\n myIntent.setType(\"text/plain\");\r\n\r\n myShareActionProvider.setShareIntent(myIntent);\r\n\r\n\t\treturn true;\r\n\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif(share!=null){\n\t\t\t\tif(v.getId()==R.id.QQShare){\n\t\t\t\t\tshare.QQShare();\n\t\t\t\t}else if(v.getId()==R.id.SinaShare){\n\t\t\t\t\tshare.SinaShare();\n\t\t\t\t}else if(v.getId()==R.id.WxShare){\n\t\t\t\t\tshare.WxShare();\n\t\t\t\t}else if(v.getId()==R.id.QQKJShare){\n\t\t\t\t\tshare.QQKJShare();\n\t\t\t\t}else if(v.getId()==R.id.SmsShare){\n\t\t\t\t\tshare.SMSShare();\n\t\t\t\t}\n\t\t\t}\n\t\t\tpw.dismiss();\n\t\t\t\n\t\t}", "private void setUpShareAppListener() {\n shareAppButton.setOnClickListener(v -> {\n try {\n Intent i = new Intent(Intent.ACTION_SEND);\n i.setType(\"text/plain\");\n i.putExtra(Intent.EXTRA_SUBJECT, getResources().getString(R.string.app_name));\n String aux = \"Download the app\\n\";\n aux = aux + \"https://drive.google.com/file/d/11oh5KY-V3GAdRjmZECbD5cOD1T8syDJs/view?usp=sharing\" + getBaseContext().getPackageName();\n i.putExtra(Intent.EXTRA_TEXT, aux);\n startActivity(i);\n } catch (Exception e) {\n }\n });\n }", "public interface ShareController {\r\n\r\n\t/** Share with dialog */\r\n\tvoid share();\r\n\r\n\t/** Share natively */\r\n\tvoid getBase64();\r\n}", "private Intent m34056c(Context context) {\n Intent intent = new Intent(\"miui.intent.action.APP_PERM_EDITOR\");\n intent.putExtra(\"extra_pkgname\", context.getPackageName());\n if (m34054a(context, intent)) {\n return intent;\n }\n intent.setClassName(\"com.miui.securitycenter\", \"com.miui.permcenter.permissions.AppPermissionsEditorActivity\");\n if (m34054a(context, intent)) {\n return intent;\n }\n return m34053a(context);\n }", "private Intent Shareintent(){\n Intent Shareintent = new Intent(Intent.ACTION_SEND);\n Shareintent.setType(\"text/html\");\n Shareintent.putExtra(Intent.EXTRA_SUBJECT, \"SUBJECT\");\n Shareintent.putExtra(Intent.EXTRA_TEXT, \"http://www.habeshastudent.com/m/video.html\");\n return Shareintent;\n\n\n }", "protected void shareIt() {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\r\n\t\tsharingIntent.setType(\"text/plain\");\r\n\t\tString shareBody = content.getText().toString();\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sharing\");\r\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\r\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\r\n\t}", "private void _tweetShare(Activity act, String title, String description)\n {\n try {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.setPackage(\"com.twitter.android\");\n shareIntent.putExtra(Intent.EXTRA_TITLE, title);\n shareIntent.putExtra(Intent.EXTRA_TEXT, description);\n act.startActivity(shareIntent);\n } catch (ActivityNotFoundException ex) {\n String tweetUrl = StringUtils.join(\" \",\"https://twitter.com/intent/tweet?text=\", title, description);\n Uri uri = Uri.parse(tweetUrl);\n act.startActivity(new Intent(Intent.ACTION_VIEW, uri));\n }\n }", "@Override\n public void onClick(View view) {\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_TITLE,title );\n sharingIntent.putExtra(Intent.EXTRA_TEXT,description);\n startActivity(Intent.createChooser(sharingIntent,\"Share using\"));\n\n }", "public interface ShareLinkDialogMvpPresenter<V extends MvpView> extends MvpPresenter<V> {\n\n void onSourceShareSelected(Intent shareIntent, ResolveInfo resolveInfo, String linkUrl);\n}", "@Override\n public void onClick(View v) {\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = caption + \" - \" + description;\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Sobers Stories\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share With Friends\"));\n\n }", "private void setShareIntent(Intent shareIntent) {\n if(shareIntent.resolveActivity(getActivity().getPackageManager())!=null) {\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(shareIntent);\n }\n } else {\n Toast.makeText(getActivity(), R.string.no_application_found,Toast.LENGTH_LONG).show();\n }\n }", "@Override\r\n\tpublic void ShowShare(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e(\"ShowShare\");\r\n\t}", "private void setShareIntent(String text) {\n\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, text);\n sendIntent.setType(\"text/plain\");\n\n if (shareActionProvider != null) {\n shareActionProvider.setShareIntent(sendIntent);\n }\n }", "@Override\r\n\tpublic void ShowShare(Context _in_context, String _in_data) {\n\t\tTypeSDKLogger.e( \"ShowShare\");\r\n\t}", "public void onClick(View v) {\n\t\t\t\taddShareAction();\n\t\t\t\t//>2014/01/24-33383-RubyJiang\n\t\t\t\t\n\t\t\t}", "public void onPressShareWithSMS() {\r\n if (!requireSMSPermissions()) {\r\n return;\r\n }\r\n\r\n shareSMS();\r\n }", "private void showShareView() {\n Timber.d(\"showShareView\");\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n // Locate MenuItem with ShareActionProvider\n MenuItem item = menu.findItem(R.id.menu_item_share);\n\n // Fetch and store ShareActionProvider\n mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(item);\n\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(mShareIntent);\n }\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\n // Get the SearchView and set the searchable configuration\n MenuItem menuItem = menu.findItem(R.id.action_search);\n SearchView searchView = (SearchView) menuItem.getActionView();\n\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchableInfo info = searchManager.getSearchableInfo(getComponentName());\n\n // Assumes current activity is the searchable activity\n searchView.setSearchableInfo(info);\n searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default\n }\n\n return true;\n }", "private void tjshowShare() {\n\t\tShareSDK.initSDK(getActivity(), \"171a7e7c3c736\");\n\t\tOnekeyShare oks = new OnekeyShare();\n\t\t// 关闭sso授权\n\t\toks.disableSSOWhenAuthorize();\n\n\t\t// 分享时Notification的图标和文字 2.5.9以后的版本不调用此方法\n\t\t// oks.setNotification(R.drawable.ic_launcher,\n\t\t// getString(R.string.app_name));\n\t\t// 信息分享时电话\n//\t\toks.setAddress(zhuproduct.getData().getStore_info().getStore_tel());\n\t\t// title标题,印象笔记、邮箱、信息、微信、人人网和QQ空间使用\n\t\toks.setTitle(\"【餐餐抢】\");\n\t\t// titleUrl是标题的网络链接,仅在人人网和QQ空间使用\n\t\toks.setTitleUrl(SharedUtil.getStringValue(\n\t\t\t\tSharedCommon.MALL_QRCODE_IMG_AZ_URL, \"\"));\n\t\t// text是分享文本,所有平台都需要这个字段\n\t\toks.setText(\"作为你的好朋友,我忍不住给你推荐一个平台帮你暴增客流量,提升营业额,别犹豫,相信我!马上入驻吧!\");\n\t\t// imagePath是图片的本地路径,Linked-In以外的平台都支持此参数\n\t\toks.setImagePath(SharedUtil.getStringValue(SharedCommon.MALL_FX, \"\"));// 确保SDcard下面存在此张图片\n\t\toks.setImageUrl(SharedUtil.getStringValue(SharedCommon.MALL_FX, \"\"));\n\t\t// url仅在微信(包括好友和朋友圈)中使用\n\t\toks.setUrl(\"http://www.28yun.com/api_wap/tmpl/merchant/merchant_enter.html\");\n\t\t// comment是我对这条分享的评论,仅在人人网和QQ空间使用\n\t\toks.setComment(\"我是测试评论文本\");\n\t\t// site是分享此内容的网站名称,仅在QQ空间使用\n\t\toks.setSite(getString(R.string.app_name));\n\t\t// siteUrl是分享此内容的网站地址,仅在QQ空间使用\n\t\toks.setSiteUrl(SharedUtil.getStringValue(\n\t\t\t\tSharedCommon.MALL_QRCODE_IMG_AZ_URL, \"\"));\n\n\t\t// 启动分享GUI\n\t\toks.show(getActivity());\n\t}", "private void shareToTwitter(Context context, Uri uri) {\n Toast.makeText(context, \"start sharing to twitter \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n String twitterPackage = \"com.twitter.android\";\n if (AppUtil.getInstance().isAppInstalled(context, twitterPackage)) {\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_STREAM, uri);\n intent.putExtra(Intent.EXTRA_TEXT, \"the simple text\");\n intent.setType(\"image/*\");\n intent.setPackage(twitterPackage);\n context.startActivity(intent);\n\n //using Twitter Tweet Composer\n //The Twitter Android Application allows apps to start the exported Tweet composer via an Intent.\n //The Twitter Android compose is feature-rich, familiar to users, and has options for attaching images and videos.\n //If the Twitter app is not installed, the intent will launch twitter.com in a browser, but the specified image will be ignored.\n// TweetComposer.Builder builder = new TweetComposer.Builder(this)\n// .text(\"just setting up my Fabric.\")\n// .image(uri);\n// builder.show();\n\n } else {\n //The TwitterKit Tweet Composer (Beta) is a lightweight composer which lets users compose Tweets with App Cards from within your application.\n // It does not depend on the Twitter for Android app being installed.\n\n// Card card = new Card.AppCardBuilder(MainActivity.this)\n// .imageUri(uri)\n// .iPhoneId(\"123456\")\n// .iPadId(\"654321\")\n// .build();\n//\n// TwitterSession session = TwitterCore.getInstance().getSessionManager().getActiveSession();\n// Intent intent = new ComposerActivity.Builder(MainActivity.this).session(session).card(card).createIntent();\n// startActivity(intent);\n Toast.makeText(context, \"to use this feature, you must have an Twitter application is installed\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v)\n\t\t\t{\n\t\t\t\tDialog dialog=new Dialog(Glory.this);\n\t\t\t\tdialog.setContentView(R.layout.share_dialog_layout);\n\t\t\t\tdialog.setTitle(\"Share Via\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfbIcon=(TextView)dialog.findViewById(R.id.fb_icon);\n\t\t\t\ttwitterIcon=(TextView)dialog.findViewById(R.id.twitter_icon);\n\t\t\t\tgPlusIcon=(TextView)dialog.findViewById(R.id.gplus_icon);\n\t\t\t\t\n\t\t\t\tfbIcon.setTypeface(font);\n\t\t\t\ttwitterIcon.setTypeface(font);\n\t\t\t\tgPlusIcon.setTypeface(font);\n\t\t\t\n\t\t\t\t\n\t\t\t\tfbIcon.setOnClickListener(new OnClickListener() \n\t\t\t\t{\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString url = \"https://www.facebook.com/dialog/feed?app_id=1507764116109075&\" +\n\t\t\t\t\t\t\t\t \t \"link=https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal&\" +\n\t\t\t\t\t\t\t\t \t \"caption=GuessIn&\" +\n\t\t\t\t\t\t\t\t \t \"description=\"+Uri.parse(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")+\n\t\t\t\t\t\t\t\t \t \"&redirect_uri=https://www.facebook.com/connect/login_success.html\"+\n\t\t\t\t\t\t\t\t \t \"&picture=http://nfnlabs.in/wp-content/uploads/2014/06/Share%20Image.png\";\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tintent.setData(Uri.parse(url));\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\ttwitterIcon.setOnClickListener(new OnClickListener() \n\t\t\t\t{\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tString url = \"https://twitter.com/intent/tweet?text=My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out Guessin by @nfnlabs:&url=\"+Uri.parse(\"http://goo.gl/CGmGEx\");\n\t\t\t\t\t\tIntent intent=new Intent(Intent.ACTION_VIEW);\n\t\t\t\t\t\tUri uri=Uri.parse(url);\n\t\t\t\t\t\tintent.setData(uri);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\tgPlusIcon.setOnClickListener(new OnClickListener() {\n\t\t\t\t\t\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\tIntent intent= new PlusShare.Builder(Glory.this)\n\t\t\t\t\t\t\t.setText(\"My smartphone just thought of a word and I guessed it in \"+attempts+\" attempts. Check out the new game by @nfnlabs called GuessIn!\")\n\t\t\t\t\t\t\t.setType(\"text/plain\")\n\t\t\t\t\t\t\t.setContentUrl(Uri.parse(\"https://play.google.com/store/apps/details?id=com.achyuthnfn.cnbfinal\"))\n\t\t\t\t\t\t\t.getIntent();\n\t\t\t\t\t\tstartActivityForResult(intent, 0);\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\tdialog.show();\n\t\t\t}", "@Override\r\n\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n\r\n switch (item.getItemId()) {\r\n\r\n case R.id.mShare:\r\n\r\n Intent i = new Intent(\r\n\r\n android.content.Intent.ACTION_SEND);\r\n\r\n i.setType(\"text/plain\");\r\n\r\n i.putExtra(\r\n\r\n android.content.Intent.EXTRA_TEXT, \"This is my grocery list\");\r\n\r\n startActivity(Intent.createChooser(\r\n\r\n i,\r\n\r\n \"Share using\"));\r\n\r\n break;\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n\r\n }", "private void sharePic(Uri uri)\n \t {\n\t\t Intent whatsappIntent = new Intent(Intent.ACTION_SEND);\n\t whatsappIntent.setType(\"image/*\");\n\t\n\t whatsappIntent.putExtra(Intent.EXTRA_TEXT, \"Your text here\");\n\t whatsappIntent.putExtra(Intent.EXTRA_STREAM, uri); \n\t whatsappIntent.setPackage(\"com.whatsapp\"); \n\t \n\t \n\t PackageManager pm = getApplicationContext().getPackageManager();\n \t final List<ResolveInfo> matches = pm.queryIntentActivities(whatsappIntent, 0);\n \t boolean temWhatsApp = false;\n \t for (final ResolveInfo info : matches)\n \t {\n \t \t if (info.activityInfo.packageName.startsWith(\"com.whatsapp\")) \n \t \t {\n\t \t final ComponentName name = new ComponentName(info.activityInfo.applicationInfo.packageName, info.activityInfo.name);\n\t \t temWhatsApp = true;\n\t \t break;\n \t \t }\n \t } \n \t if(temWhatsApp) \n \t {\n \t //abre whatsapp\n \t \t startActivity(Intent.createChooser(whatsappIntent, \"Your Awesome Text and Pic...\"));\n \t } else {\n \t //alerta - vocÍ deve ter o whatsapp instalado\n \t Toast.makeText(this, \"Error\", Toast.LENGTH_SHORT).show();\n \t }\n\t }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n provider = (ShareActionProvider) MenuItemCompat.getActionProvider((MenuItem) menu.findItem(R.id.share));\n return super.onCreateOptionsMenu(menu);\n }", "private void m125728w() {\n startFragment(ShareFragment.m79629a(new C25369ag(this.f90217G.mo110108d())));\n ZhihuAnalytics.m91829a().mo87834a(C31346k.EnumC31349c.Share, true, C30809ba.EnumC30812c.Icon, C31005cy.EnumC31008c.TopNavBar, new ZhihuAnalytics.C18103i(ContentType.EnumC30787c.Topic, this.f90217G.mo110111g()));\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id==R.id.action_share){\n Intent shareintent = Share.share(content);\n startActivity(Intent.createChooser(shareintent, getResources().getString(R.string.app_name)));\n\n }\n return super.onOptionsItemSelected(item);\n }", "private void shareLink(View v) {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // If you want to share a png image only, you can do:\n // setType(\"image/png\"); OR for jpeg: setType(\"image/jpeg\");\n share.setType(\"image/*\");\n\n // Make sure you put example png image named myImage.png in your\n // directory\n\n\n Log.d(\"\", \"PATH:\" + path);\n\n File imageFileToShare = new File(path);\n Uri uri = Uri.fromFile(imageFileToShare);\n share.putExtra(Intent.EXTRA_TEXT, \"https://play.google.com/store/apps/details?id=btech.natural.wallpaper\");\n share.putExtra(Intent.EXTRA_STREAM, uri);\n\n startActivity(Intent.createChooser(share, \"Share Image!\"));\n }", "private void shareToFacebook(Context context, CallbackManager callbackManager, Uri uri) {\n Toast.makeText(context, \"start sharing to facebook, \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n //com.facebook.orca\n //com.facebook.katana\n //com.example.facebook\n //com.facebook.android\n String facebookPackage = \"com.facebook.katana\";\n if (AppUtil.getInstance().isAppInstalled(context, facebookPackage)) {\n //using default intent\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"image/*\");\n// intent.putExtra(Intent.EXTRA_STREAM, uri);\n// intent.putExtra(Intent.EXTRA_TEXT, \"this is a simple extra text\");\n// intent.setPackage(facebookPackage);\n//// startActivity(Intent.createChooser(intent, \"pick an app to ...\"));\n// startActivity(intent);\n\n //using sdk but native facebook app has been installed\n sharePhotoToFacebook(context, callbackManager, uri);\n\n } else {\n loginAndShareToFacebook(context, callbackManager, uri);\n }\n\n\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View arg0) {\n Intent share=new Intent(android.content.Intent.ACTION_SEND);\n\n share.setType(\"text/plain\");\n share.putExtra(android.content.Intent.EXTRA_SUBJECT,news.getTitle());\n share.putExtra(android.content.Intent.EXTRA_TEXT,\"Follow the link : \"+MainActivity.base_url+news.getAbsolute_url()+\" to read more\");\n startActivity(Intent.createChooser(share,\"Share via\"));\n\t\t\t\t\t\t}", "public void shareToFacebook(View view) {\n Uri path = imageWithThumbnail.getImageUri();\n\n // create email intent first to remove bluetooth + others options\n Intent emailIntent = new Intent();\n emailIntent.setAction(Intent.ACTION_SEND);\n // Native email client doesn't currently support HTML, but it doesn't hurt to try in case they fix it\n emailIntent.putExtra(Intent.EXTRA_TEXT, \"#Selfie@NYPSIT\");\n emailIntent.putExtra(Intent.EXTRA_SUBJECT, \"#Selfie@NYPSIT\");\n emailIntent.putExtra(Intent.EXTRA_STREAM, path);\n emailIntent.setType(\"image/jpeg\");\n // Create the chooser based on the email intent\n Intent openInChooser = Intent.createChooser(emailIntent, \"Share to\");\n\n // Check for other packages that open our mime type\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n sendIntent.setType(\"image/jpeg\");\n\n PackageManager pm = getContext().getPackageManager();\n List<ResolveInfo> resInfo = pm.queryIntentActivities(sendIntent, 0);\n List<LabeledIntent> intentList = new ArrayList<LabeledIntent>();\n for (int i = 0; i < resInfo.size(); i++) {\n // Extract the label, append it, and repackage it in a LabeledIntent\n ResolveInfo ri = resInfo.get(i);\n String packageName = ri.activityInfo.packageName;\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n emailIntent.setPackage(packageName);\n }\n intentList.add(new LabeledIntent(emailIntent, packageName, ri.loadLabel(pm), ri.icon));\n }\n // Get our custom intent put here as we only want your app to get it not others\n Intent customIntent = new Intent(\"facebooktestingimageandtext.intent.action.SEND\");\n customIntent.setType(\"image/jpeg\");\n customIntent.setAction(\"facebooktestingimageandtext.intent.action.SEND\");\n\n resInfo = pm.queryIntentActivities(customIntent, 0);\n for (int i = 0; i < resInfo.size(); i++) {\n // Extract the label, append it, and repackage it in a LabeledIntent\n ResolveInfo ri = resInfo.get(i);\n String packageName = ri.activityInfo.packageName;\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n Intent intent = new Intent();\n intent.setComponent(new ComponentName(packageName, ri.activityInfo.name));\n intent.setAction(Intent.ACTION_SEND);\n intent.putExtra(Intent.EXTRA_STREAM, path);\n intent.setType(\"image/jpeg\");\n if (packageName.contains(\"com.amuletxheart.cameraderie\")) {\n // My custom facebook intent to do something very simple!\n intent.putExtra(Intent.EXTRA_TEXT, \"caption #testhashtag\");\n }\n intentList.add(new LabeledIntent(intent, packageName, ri.loadLabel(pm), ri.icon));\n }\n }\n // convert the list of intents(intentList) to array and add as extra intents\n LabeledIntent[] extraIntents = intentList.toArray(new LabeledIntent[intentList.size()]);\n openInChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents);\n\n mContext.startActivity(openInChooser);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_movie_detail, menu);\n MenuItem item = menu.findItem(R.id.action_share);\n mShareActionProvider = (ShareActionProvider) item.getActionProvider();\n return true;\n }", "private Intent getDefaultShareIntent(){\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n // Log.d(\"data\", data + \" Intent\");\n intent.putExtra(Intent.EXTRA_SUBJECT, \"Send Default Massage\");\n intent.putExtra(Intent.EXTRA_TEXT,data);\n return intent;\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}", "private void genSharedPostOnFacebook () {\n shareLinkContent = new ShareLinkContent.Builder()\n .setContentTitle(\"Your Title\")\n .setContentDescription(\"Your Description\")\n .setContentUrl(Uri.parse(\"URL[will open website or app]\"))\n .setImageUrl(Uri.parse(\"image or logo [if playstore or app store url then no need of this image url]\"))\n .build();\n\n }", "public static void m5821c() {\n if (f4669a != null) {\n f4669a.m12578a(\"bluetooth_app_share\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"bluetooth_app_share\"));\n }", "@Override\n\tpublic ToolStripButton getShareButton() {\n\t\treturn shareButton;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_one_page, menu);\n\n\n //Setting up the Share Action Provider\n provider = (ShareActionProvider) menu.findItem(R.id.menu_share).getActionProvider();\n provider.setShareIntent(getDefaultShareIntent());\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n // Find the MenuItem that we know has the ShareActionProvider\n MenuItem item = menu.findItem(R.id.menu_item_share);\n\n // Get its ShareActionProvider\n mShareActionProvider = (ShareActionProvider) item.getActionProvider();\n\n // Connect the dots: give the ShareActionProvider its Share Intent\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(mShareIntent);\n }\n\n // Return true so Android will know we want to display the menu\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n switch (item.getItemId()) {\n case R.id.action_share:\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n String link;\n //Test if its from google or b-ok\n if(book.getVolumeInfo().getWebLink().contains(\"books.google.com\")) {\n link = book.getVolumeInfo().getWebLink();\n }\n else {\n link = \"https://1lib.eu\" + book.getVolumeInfo().getWebLink();\n }\n intent.putExtra(Intent.EXTRA_TEXT, link);\n startActivity(Intent.createChooser(intent, \"Share with\"));\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "public void share(View view) {\n if (urlImage != \"\") {\n try {\n new ShareOnFacebook(bitmapArray, this).share();\n } catch (Exception e) {\n e.printStackTrace();\n Intent mIntentFacebookBrowser = new Intent(Intent.ACTION_SEND);\n String mStringURL = \"https://www.facebook.com/sharer/sharer.php?u=\" + urlImage;\n mIntentFacebookBrowser = new Intent(Intent.ACTION_VIEW, Uri.parse(mStringURL));\n startActivity(mIntentFacebookBrowser);\n }\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.detail, menu);\n\n // Retrieve the share menu item\n MenuItem menuItem = menu.findItem(R.id.action_share);\n\n // Get the provider and hold onto it to set/change the share intent\n ShareActionProvider mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);\n\n\n // Attach an intent to this ShareActionProvider. You can update this at any time,\n // like when the user selects a new piece of data they might like to share.\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(createShareForecastIntent());\n } else {\n Log.d(TAG, \"Share Action Provider is null?\");\n }\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.ex_002_manu_main, menu);\n\n MenuItem shareItem = menu.findItem(R.id.share);\n /** Getting the actionprovider associated with the menu ex_005_item whose id is share */\n mShareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(shareItem);\n Log.d(\"data\", data + \" Options menu\");\n\n Intent intent = getDefaultShareIntent();\n /** Setting a share intent */\n mShareActionProvider.setShareIntent(intent);\n\n return super.onCreateOptionsMenu(menu);\n\n }", "public void shareToFacebook(View view) {\n // more config: https://developers.facebook.com/docs/sharing/android\n\n String quoteMessage = \"Check out this fantastic film: \" + movieTitle\n + \" (\" + movieReleaseDate + \") -- MyMovieMemoir App\";\n\n if (ShareDialog.canShow(ShareLinkContent.class)) {\n ShareLinkContent linkContent = new ShareLinkContent.Builder()\n .setQuote(quoteMessage)\n .setContentUrl(Uri.parse(imageURL))\n .build();\n shareDialog.show(linkContent);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(Intent.ACTION_SEND);\n\t\t\t\ti.setType(\"text/plain\");\n\t\t\t\ti.putExtra(Intent.EXTRA_SUBJECT, \"Sharing URL\");\n\t\t\t\ti.putExtra(Intent.EXTRA_TEXT, prodUrl);\n\t\t\t\tstartActivity(Intent.createChooser(i, \"Share URL\"));\n\t\t\t}", "private void setShareIntent(Intent shareIntent) {\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(shareIntent);\n }\n }", "private void setShareIntent(Intent shareIntent) {\n if (mShareActionProvider != null) {\n mShareActionProvider.setShareIntent(shareIntent);\n }\n }", "public final Intent mo49194a(Context context) {\n Intent intent = new Intent(\"android.intent.action.SEND\");\n intent.setDataAndType(Uri.parse(C1642a.m8034a(\"snapchat://%s?link=%s\", new Object[]{this.f50510a.getDeeplinkUrlPath(), this.f50511b})), this.f50510a.getIntentType());\n Uri fileProviderUri = SnapUtils.getFileProviderUri(context, this.f50510a.getMediaFile());\n SnapSticker snapSticker = this.f50510a.getSnapSticker();\n if (snapSticker != null) {\n Uri fileProviderUri2 = SnapUtils.getFileProviderUri(context, snapSticker.getStickerFile());\n intent.putExtra(\"sticker\", snapSticker.getJsonForm(fileProviderUri2).toString());\n ArrayList arrayList = new ArrayList();\n if (fileProviderUri != null) {\n arrayList.add(fileProviderUri);\n }\n arrayList.add(fileProviderUri2);\n if (arrayList.size() > 1) {\n intent.putParcelableArrayListExtra(\"android.intent.extra.STREAM\", arrayList);\n intent.setAction(\"android.intent.action.SEND_MULTIPLE\");\n } else if (!arrayList.isEmpty()) {\n intent.putExtra(\"android.intent.extra.STREAM\", (Parcelable) arrayList.get(0));\n }\n } else if (fileProviderUri != null) {\n intent.putExtra(\"android.intent.extra.STREAM\", fileProviderUri);\n }\n String attachmentUrl = this.f50510a.getAttachmentUrl();\n if (!TextUtils.isEmpty(attachmentUrl)) {\n intent.putExtra(\"attachmentUrl\", attachmentUrl);\n }\n String captionText = this.f50510a.getCaptionText();\n if (!TextUtils.isEmpty(captionText)) {\n intent.putExtra(\"captionText\", captionText);\n }\n return intent;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetSupportMenuInflater().inflate(R.menu.fanart, menu);\n\t\t// Locate MenuItem with ShareActionProvider\n\t\tMenuItem item = menu.findItem(R.id.menu_item_share_fanart);\n\t\t// Fetch and store ShareActionProvider\n\t\tmShareActionProvider = (ShareActionProvider) item.getActionProvider();\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void Share(String url) {\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, url);\n Intent createChooser = Intent.createChooser(sharingIntent, \"Share via\");\n createChooser.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(createChooser);\n }", "public void onClickShare(MenuItem mi) {\n mCanvas.getSurfaceView().queueEvent(new Runnable() {public void run() {\n mCanvas.save(mSavePath, PaintPaint.AUTOSAVE);\n File file = new File(mSavePath+PaintPaint.AUTOSAVE);\n Intent intent = new Intent(android.content.Intent.ACTION_SEND);\n intent.setType(\"image/png\");\n intent.putExtra(Intent.EXTRA_STREAM,Uri.fromFile(file));\n startActivity(Intent.createChooser(intent, \"Share image\"));\n }});\n }", "private void shareRecipe(){\n Intent shareRecipeIntent = new Intent();\n shareRecipeIntent.setAction(Intent.ACTION_SEND);\n shareRecipeIntent.putExtra(Intent.EXTRA_TITLE, \"Check out this recipe that I found on My Recipes Book\");\n shareRecipeIntent.putExtra(Intent.EXTRA_TEXT, setTextForSharing());\n shareRecipeIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(shareRecipeIntent, getResources().getString(R.string.share_intent_text)));\n }", "public void shareDrawing(ShareActionProvider shareActionProvider) {\n File savedFile = saveDrawing();\n\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"text/plain\");\n intent.putExtra(Intent.EXTRA_STREAM, savedFile.toURI());\n\n shareActionProvider.setShareIntent(intent);\n }", "public static void showShareAppButton() {\n shareAppButton.show();\n }", "private static Pair<Drawable, CharSequence> getShareableIconAndName(Intent shareIntent) {\n Drawable directShareIcon = null;\n CharSequence directShareTitle = null;\n\n final ComponentName component = getLastShareComponentName();\n boolean isComponentValid = false;\n if (component != null) {\n shareIntent.setPackage(component.getPackageName());\n List<ResolveInfo> resolveInfoList =\n PackageManagerUtils.queryIntentActivities(shareIntent, 0);\n for (ResolveInfo info : resolveInfoList) {\n ActivityInfo ai = info.activityInfo;\n if (component.equals(new ComponentName(ai.applicationInfo.packageName, ai.name))) {\n isComponentValid = true;\n break;\n }\n }\n }\n if (isComponentValid) {\n boolean retrieved = false;\n final PackageManager pm = ContextUtils.getApplicationContext().getPackageManager();\n try {\n // TODO(dtrainor): Make asynchronous and have a callback to update the menu.\n // https://crbug.com/729737\n try (StrictModeContext ignored = StrictModeContext.allowDiskReads()) {\n directShareIcon = pm.getActivityIcon(component);\n directShareTitle = pm.getActivityInfo(component, 0).loadLabel(pm);\n }\n retrieved = true;\n } catch (NameNotFoundException exception) {\n // Use the default null values.\n }\n RecordHistogram.recordBooleanHistogram(\n \"Android.IsLastSharedAppInfoRetrieved\", retrieved);\n }\n\n return new Pair<>(directShareIcon, directShareTitle);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_child_web_alert_detail, menu);\n MenuItem menuItem = menu.findItem(R.id.url_action_share);\n ShareActionProvider mshareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(menuItem);\n if(mshareActionProvider!=null){\n mshareActionProvider.setShareIntent(createUrlAlertIntent());\n\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.toolbar_menu, menu);\n\n // Locate MenuItem with ShareActionProvider\n MenuItem item = menu.findItem(R.id.menu_item_share);\n\n // Fetch and store ShareActionProvider\n shareActionProvider = (ShareActionProvider) MenuItemCompat.getActionProvider(item);\n\n // Return true to display menu\n return true;\n }", "public void shareApp(String link) {\n\n\n String shareBody = link + \"\\n\" + \"https://play.google.com/store/apps/details?id=\" + getApplicationContext().getPackageName();\n\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getResources().getString(R.string.app_name) + \" -Download App from playstore\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody + \"\\n\" + \"Promo code-\" + new SessionManager(this).getREFERAL_CODE());\n\n Intent i = new Intent(Intent.createChooser(sharingIntent, \"Share via\"));\n startActivity(i);\n\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.action_settings) {\n\n Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n String shareBody = \"https://play.google.com/store/apps/details?id=lohitprojects.bitcointrack&hl=en\";\n String shareContent1=\"\\n✦ Bitcoin Track\\n\";\n String shareContent2=\"✦ Everything you need to know about Bitcoin \\n✦ Live bitcoin rate Tracking in any Currency | Wallets | Mining | Historical Records\";\n String shareContent3 = \"\\n✦ \";\n sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\n sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareContent1+shareContent2+shareContent3+shareBody);\n startActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "private void createShareIntent() {\n String body2 = TEXT_TO_SHARE2;\n\n //Step 2: Create the shareIntent with action 'Intent.ACTION_SEND'\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n\n //Step 3: Specify the intent type\n //E.g. shareIntent.setType(\"text/plain\");\n sendIntent.setType(\"text/plain\");\n\n //Step 4: Add the text to share as an extra data (Intent.EXTRA_TEXT)\n sendIntent.putExtra(Intent.EXTRA_TEXT, body2);\n\n Intent shareIntent = Intent.createChooser(sendIntent, null);\n\n //Step 5: Start shareIntent\n startActivity(shareIntent);\n\n }", "public boolean onOptionsItemSelected(MenuItem item) \n\t{\n\t\tswitch (item.getItemId())\n\t\t{\n\tcase R.id.share:\n \n\t\tIntent sendIntent = new Intent(Intent.ACTION_SEND);\n\t\t//sendIntent.setAction(Intent.ACTION_SEND);\n\t\tsendIntent.putExtra(Intent.EXTRA_TEXT,\"Download the App 'Nyimbo Za Kristo' with midi and categorized hymns. Click on this link https://play.google.com/store/apps/details?id=com.chalo.nzk\");\n\t\tsendIntent.setType(\"text/plain\");\n\t\tstartActivity(sendIntent);\n return true;\n \n \n default:\n \n\t\treturn super.onOptionsItemSelected(item);\n\t}\n\t}", "private static void shareToInstagram(Context context, Uri uri) {//content://media/external/images/media/451\n // /storage/emulated/0/メリーズ スマイルDays/20151106_032146.jpg\n // /storage/emulated/0/メリーズ スマイルDays/20151106_020312.jpg\n\n Toast.makeText(context, \"start sharing to instagram \" + uri.getPath(), Toast.LENGTH_SHORT).show();\n String instagramPackage = \"com.instagram.android\";\n if (AppUtil.getInstance().isAppInstalled(context, instagramPackage)) {\n Intent intent = new Intent(Intent.ACTION_SEND);\n intent.setType(\"image/*\");\n intent.putExtra(Intent.EXTRA_STREAM, uri);\n intent.setPackage(instagramPackage);\n// startActivity(Intent.createChooser(intent, \"Share to\"));\n context.startActivity(intent);\n } else {\n Toast.makeText(context, \"to use this feature, you must have an Instagram application is installed\", Toast.LENGTH_SHORT).show();\n }\n\n }", "public void showSharing(Callback changeCallback);", "public void onShareAdded(ShareEntry shareEntry);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_recipe_detail, menu);\n\n MenuItem item = menu.findItem(R.id.menu_share);\n ShareActionProvider miShare = (ShareActionProvider) MenuItemCompat.getActionProvider(item);\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n\n return super.onCreateOptionsMenu(menu);\n }", "public abstract void share(String content, Uri imageOrVideo);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.gesture_logger, menu);\n\n MenuItem item = menu.findItem(R.id.menu_item_share);\n shareProvider = (ShareActionProvider) item.getActionProvider();\n\n updateShareIntent();\n\n return true;\n }", "private void shareFlipzu() {\n\t\t\n\t\t//create the intent \n\t\tIntent shareIntent = \n\t\t new Intent(android.content.Intent.ACTION_SEND); \n\t\t \n\t\t//set the type \n\t\tshareIntent.setType(\"text/plain\"); \n\t\t \n\t\t//add a subject \n\t\tshareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \n\t\t \"Check out this cool App\");\t\t\n\t\t \n\t\t//build the body of the message to be shared \n\t\tString shareMessage = \"Flipzu, live audio broadcast from your Android phone: https://market.android.com/details?id=\" + APP_PNAME; \n\t\t \n\t\t//add the message \n\t\tshareIntent.putExtra(android.content.Intent.EXTRA_TEXT, \n\t\t shareMessage); \n\t\t \n\t\t//start the chooser for sharing \n\t\tstartActivity(Intent.createChooser(shareIntent, \n\t\t getText(R.string.share_app))); \n\n\t}", "private void _fbAppShare(Activity act, UiLifecycleHelper uiHelper, String link, String description)\n {\n try {\n FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(act)\n .setLink(link != null && !link.equals(\"\") ? link : \"\")\n .setDescription(description != null && !description.equals(\"\") ? description : \"\")\n .build();\n uiHelper.trackPendingDialogCall(shareDialog.present());\n } catch (FacebookException ex) {\n String urlParameters = String.format(Constants.FB_SHARE_URL,\n act.getString(R.string.app_url), act.getString(R.string.app_name));\n Utilities.getInstance().openURL(act, urlParameters);\n }\n }", "public static void attachShareIntent(Context context, ImageButton button, String url) {\n String subject = context.getResources().getString(R.string.intent_subject);\n String title = context.getResources().getString(R.string.intent_title);\n button.setOnClickListener(view -> {\n Intent sharingIntent = new Intent(Intent.ACTION_SEND);\n sharingIntent.setType(\"text/plain\");\n sharingIntent.putExtra(Intent.EXTRA_SUBJECT, subject);\n sharingIntent.putExtra(Intent.EXTRA_TEXT, url);\n context.startActivity(Intent.createChooser(sharingIntent, title));\n });\n }", "@Override\n public void onCancel(Platform arg0, int arg1) {\n mHandler.post(new Runnable() {\n public void run() {\n Toast.makeText(context, \"取消分享\", Toast.LENGTH_SHORT).show();\n }\n });\n if (mShareCallback!=null) {\n mShareCallback.onCancel();\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.details, menu);\n\n // Set up ShareActionProvider's default share intent\n mShareActionProvider = (ShareActionProvider) menu.findItem(R.id.action_share).getActionProvider();\n mShareActionProvider.setShareIntent(getDefaultIntent());\n\n return true;\n }", "public void run() {\n String str;\n String str2 = str;\n boolean z = jSONArray.length() > 1;\n final Intent intent = new Intent(z ? \"android.intent.action.SEND_MULTIPLE\" : \"android.intent.action.SEND\");\n final PendingIntent broadcast = PendingIntent.getBroadcast(SocialSharing.this.cordova.getActivity().getApplicationContext(), 0, new Intent(SocialSharing.this.cordova.getActivity().getApplicationContext(), ShareChooserPendingIntent.class), 134217728);\n intent.addFlags(524288);\n String str3 = null;\n try {\n if (jSONArray.length() <= 0 || \"\".equals(jSONArray.getString(0))) {\n intent.setType(\"text/plain\");\n if (SocialSharing.notEmpty(str2)) {\n intent.putExtra(\"android.intent.extra.SUBJECT\", str2);\n }\n if (SocialSharing.notEmpty(str3)) {\n str2 = SocialSharing.notEmpty(str2) ? str2 + \" \" + str3 : str3;\n }\n if (SocialSharing.notEmpty(str2)) {\n intent.putExtra(\"android.intent.extra.TEXT\", str2);\n if (Build.VERSION.SDK_INT < 21) {\n intent.putExtra(\"sms_body\", str2);\n }\n }\n intent.addFlags(268435456);\n str = str4;\n if (str == null) {\n if (str.contains(\"/\")) {\n String[] split = str4.split(\"/\");\n String str4 = split[0];\n str3 = split[1];\n str = str4;\n }\n ActivityInfo activity = SocialSharing.this.getActivity(this.callbackContext, intent, str, str6);\n if (activity == null) {\n return;\n }\n if (z) {\n this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));\n return;\n }\n intent.addCategory(\"android.intent.category.LAUNCHER\");\n String str5 = activity.applicationInfo.packageName;\n if (str3 == null) {\n str3 = activity.name;\n }\n intent.setComponent(new ComponentName(str5, str3));\n SocialSharing.this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass1 */\n\n public void run() {\n cordovaInterface.startActivityForResult(this, intent, 0);\n }\n });\n if (SocialSharing.this.pasteMessage != null) {\n new Timer().schedule(new TimerTask() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass2 */\n\n public void run() {\n SocialSharing.this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass2.AnonymousClass1 */\n\n public void run() {\n SocialSharing.this.copyHintToClipboard(str, SocialSharing.this.pasteMessage);\n SocialSharing.this.showPasteMessage(SocialSharing.this.pasteMessage);\n }\n });\n }\n }, 2000);\n }\n } else if (z) {\n this.callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK));\n } else {\n SocialSharing.this.cordova.getActivity().runOnUiThread(new Runnable() {\n /* class nl.xservices.plugins.SocialSharing.AnonymousClass2.AnonymousClass3 */\n\n public void run() {\n Intent intent;\n if (Build.VERSION.SDK_INT >= 22) {\n intent = Intent.createChooser(intent, str5, broadcast.getIntentSender());\n } else {\n intent = Intent.createChooser(intent, str5);\n }\n cordovaInterface.startActivityForResult(this, intent, z2 ? 1 : 2);\n }\n });\n }\n } else {\n String downloadDir = SocialSharing.this.getDownloadDir();\n if (downloadDir != null) {\n ArrayList arrayList = new ArrayList();\n Uri uri = null;\n for (int i = 0; i < jSONArray.length(); i++) {\n uri = FileProvider.getUriForFile(SocialSharing.this.webView.getContext(), SocialSharing.this.cordova.getActivity().getPackageName() + \".sharing.provider\", new File(SocialSharing.this.getFileUriAndSetType(intent, downloadDir, jSONArray.getString(i), str2, i).getPath()));\n arrayList.add(uri);\n }\n if (!arrayList.isEmpty()) {\n if (z) {\n intent.putExtra(\"android.intent.extra.STREAM\", arrayList);\n } else {\n intent.putExtra(\"android.intent.extra.STREAM\", uri);\n }\n }\n } else {\n intent.setType(\"text/plain\");\n }\n if (SocialSharing.notEmpty(str2)) {\n }\n if (SocialSharing.notEmpty(str3)) {\n }\n if (SocialSharing.notEmpty(str2)) {\n }\n intent.addFlags(268435456);\n str = str4;\n if (str == null) {\n }\n }\n } catch (Exception e) {\n this.callbackContext.error(e.getMessage());\n }\n }", "private void sharePlan(){\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, \"My Planit Plan\");\n shareIntent.putExtra(Intent.EXTRA_TEXT,\n \"Hi All! This is my plan made using Planit! www.planit.com/10293987\");\n startActivity(Intent.createChooser(shareIntent, \"Share with\"));\n }", "public Intent mo34965a(Context context) {\n Intent intent = new Intent(\"android.intent.action.SEND\");\n intent.setDataAndType(Uri.parse(String.format(\"snapchat://%s?link=%s\", new Object[]{this.f30606a.getDeeplinkUrlPath(), this.f30607b})), this.f30606a.getIntentType());\n Uri fileProviderUri = SnapUtils.getFileProviderUri(context, this.f30606a.getMediaFile());\n SnapSticker snapSticker = this.f30606a.getSnapSticker();\n String str = \"android.intent.extra.STREAM\";\n if (snapSticker != null) {\n Uri fileProviderUri2 = SnapUtils.getFileProviderUri(context, snapSticker.getStickerFile());\n intent.putExtra(\"sticker\", snapSticker.getJsonForm(fileProviderUri2).toString());\n ArrayList arrayList = new ArrayList();\n if (fileProviderUri != null) {\n arrayList.add(fileProviderUri);\n }\n arrayList.add(fileProviderUri2);\n if (arrayList.size() > 1) {\n intent.putParcelableArrayListExtra(str, arrayList);\n intent.setAction(\"android.intent.action.SEND_MULTIPLE\");\n } else if (!arrayList.isEmpty()) {\n intent.putExtra(str, (Parcelable) arrayList.get(0));\n }\n } else if (fileProviderUri != null) {\n intent.putExtra(str, fileProviderUri);\n }\n String attachmentUrl = this.f30606a.getAttachmentUrl();\n if (!TextUtils.isEmpty(attachmentUrl)) {\n intent.putExtra(\"attachmentUrl\", attachmentUrl);\n }\n String captionText = this.f30606a.getCaptionText();\n if (!TextUtils.isEmpty(captionText)) {\n intent.putExtra(\"captionText\", captionText);\n }\n return intent;\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tIntent sharingIntent = new Intent(android.content.Intent.ACTION_SEND); \n\t\tsharingIntent.setType(\"text/plain\");\n\t\tString shareBody = \"I scored \"+score+\" points!How much can you score?Install the game Space Prowler from the Play Store now!\";\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Subject Here\");\n\t\tsharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);\n\t\tstartActivity(Intent.createChooser(sharingIntent, \"Share via\"));\n\t\t\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_share, container, false);\n\n try {\n Intent shareIntent = new Intent(Intent.ACTION_SEND);\n shareIntent.setType(\"text/plain\");\n shareIntent.putExtra(Intent.EXTRA_SUBJECT, \"RannaGhar\");\n String shareMessage= \"\\nLet me recommend you this application\\n\\n\";\n shareMessage = shareMessage + \"https://play.google.com/store/apps/details?id=\" + BuildConfig.APPLICATION_ID +\"\\n\\n\";\n shareIntent.putExtra(Intent.EXTRA_TEXT, shareMessage);\n startActivity(Intent.createChooser(shareIntent, \"choose one\"));\n } catch(Exception e) {\n //e.toString();\n }\n\n return view;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case R.id.action_copy:\n SystemUtils.copy(result, this);\n Toast.makeText(this, \"复制到剪贴版\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.action_share:\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, result);\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, \"分享二维码内容\"));\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "private void launchShareIntent() {\n Intent sendIntent = new Intent();\n sendIntent.setAction(Intent.ACTION_SEND);\n sendIntent.putExtra(Intent.EXTRA_TEXT, gif.getFullGif().getUrl());\n sendIntent.setType(\"text/plain\");\n startActivity(Intent.createChooser(sendIntent, getString(R.string.share_dialog_title)));\n }" ]
[ "0.6618636", "0.6524277", "0.64660895", "0.6456472", "0.644385", "0.64279896", "0.6357381", "0.6351051", "0.62178", "0.6136001", "0.6114361", "0.60817295", "0.60717356", "0.60685796", "0.60631675", "0.6061937", "0.6039462", "0.60372305", "0.6029449", "0.59982634", "0.5987538", "0.59462047", "0.5924894", "0.59245807", "0.5907306", "0.59046066", "0.58998173", "0.5896718", "0.58915555", "0.5880952", "0.5856097", "0.5849222", "0.5847386", "0.58410174", "0.58159125", "0.58141273", "0.5814027", "0.5791732", "0.57773113", "0.57729805", "0.5770978", "0.5739373", "0.57017636", "0.57014966", "0.56966823", "0.5695732", "0.569431", "0.5686983", "0.5679835", "0.56795865", "0.5675891", "0.56756186", "0.56721675", "0.5655721", "0.5651545", "0.56479883", "0.5641242", "0.5626019", "0.5618157", "0.5609884", "0.5601251", "0.5598954", "0.55949616", "0.5583399", "0.55781645", "0.5572107", "0.5567615", "0.5564583", "0.5564583", "0.55638415", "0.5562375", "0.55622756", "0.5558391", "0.5555466", "0.5552513", "0.554776", "0.55447507", "0.55444473", "0.5538578", "0.5520831", "0.55179036", "0.551138", "0.5502677", "0.54892266", "0.54859096", "0.5460278", "0.54502416", "0.54467523", "0.5446269", "0.5441614", "0.5441045", "0.54276335", "0.5417706", "0.54156184", "0.5414812", "0.541402", "0.54020816", "0.5393577", "0.5371391", "0.53644735", "0.5349549" ]
0.0
-1
/ renamed from: a
boolean mo2805a(C0530m0 m0Var, Intent intent);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public boolean mo2512a(C0475c cVar, Intent intent) { C0530m0 m0Var = C0530m0.this; C0531a aVar = m0Var.f2119i; if (aVar != null) { aVar.mo2805a(m0Var, intent); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: i
private void m2843i() { if (this.f2119i != null) { if (this.f2120j == null) { this.f2120j = new C0532b(); } C0475c.m2615a(this.f2117g, this.f2118h).mo2495a(this.f2120j); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo17022c(int i);", "public final void mo5394iy(int i) {\n }", "void mo88773a(int i);", "void mo32046rn(int i);", "public final void mo91727g(int i) {\n }", "void mo54447l(int i);", "void mo1761g(int i);", "void mo54406a(int i);", "void mo23327tY(int i);", "void mo1753b(int i);", "@Override\n\tpublic void aumenta(int i) {\n\t\t\n\t}", "private void info3(int i) {\n\t\t\n\t}", "void mo54436d(int i);", "void mo6247nm(int i);", "void mo1933b(int i);", "void mo1494c(int i);", "void m15858a(int i);", "void mo54437e(int i);", "void mo1754c(int i);", "public int i() {\n \treturn i; \n }", "public final int getPos() { return i; }", "void mo1755d(int i);", "void mo1747a(int i);", "void mo54452q(int i);", "static int fixIndex(int i)\r\n {\r\n return i >= 0 ? i : -(i + 1);\r\n }", "void mo21050ml(int i);", "void mo37668e(int i);", "public final void mo91947k(int i) {\n }", "public abstract void mo4376b(int i);", "public void mo5332a(int i) {\n }", "void mo38565a(int i);", "public String select(int i)\r\n\t {\t\t \r\n\t\t String[] arr = this.infoToArray();\r\n\t\t if(i > arr.length)\r\n\t\t {\r\n\t\t\t return \"-1\";\r\n\t\t }\r\n\t\t return arr[i-1];\r\n\t }", "void mo22044oA(int i);", "void mo3796b(int i);", "void mo54446k(int i);", "void mo66998a(int i);", "private Index(int i) {\r\n _value = i;\r\n }", "void mo1485a(int i);", "void mo54448m(int i);", "private int elementNC(int i) {\n return first + i * stride;\n }", "public void setIndex(int i) {\n\t\t\n\t}", "public abstract void mo4385d(int i);", "void mo26876a(int i);", "void mo122221a(int i);", "private final void i() {\n }", "public abstract void mo9814c(int i);", "protected void dataTablePlan2(int i) {\n\t\t\r\n\t}", "void mo27576a(int i);", "public void mo44231a(int i) {\n }", "void mo85a(int i);", "void mo63039b(int i, int i2);", "void mo17020b(int i);", "public void mo3350a(int i) {\n }", "void mo62991a(int i);", "public int index(int i){\n \t\tif (i < 0 || i >= length()) throw new IllegalArgumentException();\n \t\treturn csa[i];\n \t}", "public abstract int mo12581RU(int i);", "private final int m28109e(int i) {\n return i + i;\n }", "public abstract void mo2156b(int i);", "public abstract void mo9809b(int i);", "@Override\n public String apply(Integer i) {\n //kombinowałem długo ale nie udało mi sie wykminić jak zrobić to zadanie przy użuciu tego interfejsu funkcyjnego\n //i zrobiłem to iteracyjnie\n return null;\n }", "public abstract int mo12574RN(int i);", "public abstract int mo12579RS(int i);", "void mo1763h(int i);", "public void mo23980a(int i, String str) {\n }", "void mo13163e(int i);", "private int advance(int[] n, int i) {\n i += n[i];\n i%=len;\n while (i<0) i+=len;\n return i;\n }", "public final void mo91724f(int i) {\n }", "private int parentIndex(int i) {\n return i / 2;\n }", "public void worked(int i) {\n\t\t\n\t}", "public int nextIndex(int i) {\n\t\treturn (i + 1) % data.length;\n\t}", "void mo17016a(int i);", "public abstract void mo4361a(int i);", "void mo1491b(int i);", "void mo7304b(int i, int i2);", "public int index(int i) {\n\t\tif (i < 0 || i >= text.length) throw new IndexOutOfBoundsException();\n\t\treturn r2p[i];\n\t}", "private int rightIndex(int i) {\n return i * 2 + 1;\n }", "public abstract void mo9734b(int i);", "public abstract int start(int i);", "void mo3767a(int i);", "protected void dataTableleibie(int i) {\n\t\r\n}", "void mo34684de(int i, int i2);", "public void mo29749op(int i) {\n if (i == 0) {\n C6638d.this.daT.mo29698og(0);\n }\n }", "private int leftIndex(int i) {\n return i * 2;\n }", "public abstract AbstractC5666g mo39572a(int i);", "C3579d mo19710g(int i) throws IOException;", "public abstract C14407a mo11609c(int i);", "void mo7306c(int i, int i2);", "void mo54424b(int i);", "public abstract int mo12582RV(int i);", "void mo63037a(int i, int i2);", "public abstract void mo4377b(int i, int i2);", "private int convertX(int i) {\n return i % width;\n }", "public void processed(int i);", "public abstract void mo4379b(int i, zzwt zzwt);", "public item getI() {\n return i;\n }", "public void getResult (int i){\n\t\tString result = items.get(i).toString();\n\t\tformatText(result);\n\t System.out.println(result);\n\t}", "public int index(int i) {\n if (i < 0 || i >= lng) {\n throw new IllegalArgumentException(\"index out of range.\");\n }\n\n return arr[i];\n }", "void setIdx(int i);", "public int withdraw(int i) {\n\t\treturn i;\n\t}", "public abstract C14407a mo11604a(int i);", "void mo54408a(int i, int i2, int i3, int i4);" ]
[ "0.68150276", "0.67924464", "0.6714078", "0.67086816", "0.66985506", "0.6697436", "0.66779053", "0.6652412", "0.66520256", "0.6647883", "0.6642103", "0.663781", "0.6593486", "0.658991", "0.6587463", "0.6563837", "0.6560967", "0.6547643", "0.6537753", "0.6529683", "0.65124357", "0.6491836", "0.6474811", "0.6474725", "0.64536864", "0.64508307", "0.64426833", "0.64410865", "0.64373136", "0.6435963", "0.63939893", "0.6376853", "0.6371321", "0.63619655", "0.6331468", "0.6324355", "0.6312324", "0.6309139", "0.6304931", "0.6291395", "0.62837946", "0.62799037", "0.62772596", "0.6260679", "0.62546074", "0.624466", "0.6238518", "0.62294096", "0.6225393", "0.6222436", "0.62174714", "0.62165767", "0.6202269", "0.620117", "0.6193076", "0.61869997", "0.6183436", "0.6183379", "0.61739427", "0.6171168", "0.61709243", "0.6167211", "0.6166964", "0.6160486", "0.6159958", "0.6144932", "0.61435384", "0.6140353", "0.61272746", "0.6116683", "0.610939", "0.610455", "0.6099106", "0.608801", "0.6080768", "0.6068957", "0.60686165", "0.6068008", "0.6055161", "0.6054756", "0.60478455", "0.6045554", "0.6040231", "0.6036243", "0.60259706", "0.6023259", "0.60227436", "0.6020562", "0.59961563", "0.59917885", "0.5989433", "0.59892696", "0.5988037", "0.59717184", "0.59678066", "0.5967677", "0.5966657", "0.5964691", "0.5961796", "0.5960056", "0.5955672" ]
0.0
-1
/ renamed from: a
public void mo2802a(C0531a aVar) { this.f2119i = aVar; m2843i(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ access modifiers changed from: 0000 / renamed from: b
public void mo2804b(Intent intent) { if (VERSION.SDK_INT >= 21) { intent.addFlags(134742016); } else { intent.addFlags(524288); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public void mo115190b() {\n }", "public abstract void mo70713b();", "public abstract void mo70702a(C30989b c30989b);", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public abstract C0631bt mo9227aB();", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public abstract Object mo1185b();", "@Override\n public void b() {\n }", "public void mo21825b() {\n }", "public abstract void mo6549b();", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public abstract void mo53562a(C18796a c18796a);", "public final void mo1285b() {\n }", "void mo2508a(bxb bxb);", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public final /* bridge */ /* synthetic */ void mo43569b() {\n super.mo43569b();\n }", "public /* bridge */ /* synthetic */ void mo55095b() {\n super.mo55095b();\n }", "@Override\n\tpublic void b() {\n\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public abstract void mo35054b();", "public /* bridge */ /* synthetic */ void mo55094a() {\n super.mo55094a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public void mo23813b() {\n }", "public void mo9137b() {\n }", "public abstract String mo118046b();", "@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 b2() {\n\t\t\n\t}", "public interface C0938b {\n }", "public final void mo51373a() {\n }", "public interface AbstractC5208b {\n\n /* renamed from: com.iflytek.voiceads.a.b$a */\n public static final class C5209a implements AbstractC5208b {\n\n /* renamed from: a */\n private final byte[] f22887a;\n\n /* renamed from: b */\n private int f22888b;\n\n C5209a(byte[] bArr) {\n this.f22887a = bArr;\n }\n\n @Override // com.iflytek.voiceads.p619a.AbstractC5208b\n /* renamed from: a */\n public void mo38565a(int i) {\n this.f22888b = i;\n }\n\n @Override // com.iflytek.voiceads.p619a.AbstractC5208b\n /* renamed from: a */\n public byte[] mo38566a() {\n return this.f22887a;\n }\n\n @Override // com.iflytek.voiceads.p619a.AbstractC5208b\n /* renamed from: b */\n public int mo38567b() {\n return this.f22888b;\n }\n }\n\n /* renamed from: a */\n void mo38565a(int i);\n\n /* renamed from: a */\n byte[] mo38566a();\n\n /* renamed from: b */\n int mo38567b();\n}", "public abstract void mo4360a(byte b);", "public void m23075a() {\n }", "public abstract C0270jy mo5354b();", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public interface C0764b {\n}", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public abstract void mo9246b(C0707b bVar);", "public interface C0999b {\n }", "public abstract String mo11611b();", "public void mo5251b() {\n }", "public abstract void mo9244b(C0620bi biVar);", "public abstract void mo9798a(byte b);", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public abstract void mo45765b();", "public final void mo8775b() {\n }", "public abstract int mo4375b();", "public abstract long mo24409b();", "public /* bridge */ /* synthetic */ void mo55097d() {\n super.mo55097d();\n }", "void m1864a() {\r\n }", "public void b() {\r\n }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public abstract int mo13680b();", "void mo57277b();", "public void mo23438b() {\n }", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "public /* bridge */ /* synthetic */ void mo55096c() {\n super.mo55096c();\n }", "void mo72113b();", "void mo41086b();", "public abstract void mo27464a();", "public abstract void m15813a();", "public void mo38117a() {\n }", "public abstract Object mo26777y();", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "public final /* bridge */ /* synthetic */ void mo43566a() {\n super.mo43566a();\n }", "public abstract void mo27385c();", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract Object mo1771a();", "public abstract void mo9809b(int i);", "public abstract void mo42329d();", "void mo80455b();", "public abstract boolean mo66253b();", "public final void mo91715d() {\n }", "public void mo12930a() {\n }", "public interface C11922a {\n void bvR();\n }", "public interface C1372b {\n}", "public abstract void mo56925d();", "public void b() {\n }", "public void b() {\n }", "public void mo5097b() {\n }", "public interface C9223b {\n }", "public abstract Member mo23408O();", "public abstract void mo27386d();", "public void mo23981a(C4321b bVar) {\n }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract C14407a mo11608b(int i);", "public void mo97908d() {\n }", "public void method_4270() {}", "private final zzgy zzgb() {\n }", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "private C6310a m35240b() {\n return new C6310a() {\n public final void handleMsg(Message message) {\n }\n };\n }", "void mo119582b();", "private void m50366E() {\n }" ]
[ "0.7316015", "0.6803759", "0.6712111", "0.67048204", "0.66646415", "0.6619312", "0.66174126", "0.6600416", "0.65210277", "0.6494179", "0.64865243", "0.64419717", "0.6440986", "0.64153117", "0.6403416", "0.64004207", "0.6388945", "0.63789034", "0.6378066", "0.6369168", "0.6366253", "0.6366188", "0.6357036", "0.6347676", "0.63442016", "0.63241315", "0.63122225", "0.62967694", "0.6295346", "0.629159", "0.6269795", "0.6269795", "0.62617576", "0.6259792", "0.62453145", "0.62351245", "0.6233097", "0.62329257", "0.6225432", "0.62232625", "0.62028867", "0.6198165", "0.6192403", "0.61882544", "0.6172372", "0.6171858", "0.6168451", "0.61651534", "0.6158347", "0.6156767", "0.6148864", "0.61373055", "0.61369973", "0.61367565", "0.61364985", "0.6127322", "0.6110957", "0.61070365", "0.61064905", "0.61040366", "0.6091294", "0.608643", "0.60833657", "0.60803294", "0.6076059", "0.60687244", "0.6063127", "0.60572016", "0.60561264", "0.6038519", "0.60347027", "0.6028867", "0.6028502", "0.60279334", "0.60247266", "0.6015707", "0.6003151", "0.6000629", "0.5994176", "0.59906113", "0.599026", "0.5983684", "0.59798414", "0.5977351", "0.59652895", "0.59635997", "0.59635997", "0.59627354", "0.5961181", "0.59559137", "0.59552896", "0.5951257", "0.5948419", "0.5947836", "0.59463036", "0.5938268", "0.5937254", "0.59353715", "0.59339345", "0.59330076", "0.5929949" ]
0.0
-1
/ renamed from: b
public boolean mo1752b() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void mo2508a(bxb bxb);", "@Override\n public void func_104112_b() {\n \n }", "@Override\n public void b() {\n }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "@Override\n\tpublic void b2() {\n\t\t\n\t}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "@Override\n\tpublic void b() {\n\n\t}", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public bb b() {\n return a(this.a);\n }", "@Override\n\tpublic void b1() {\n\t\t\n\t}", "public void b() {\r\n }", "@Override\n\tpublic void bbb() {\n\t\t\n\t}", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public abstract void b(StringBuilder sb);", "public void b() {\n }", "public void b() {\n }", "protected b(int mb) {\n/* 87 */ this.b = mb;\n/* */ }", "public u(b paramb)\r\n/* 7: */ {\r\n/* 8: 9 */ this.a = paramb;\r\n/* 9: */ }", "public interface b {\n void H_();\n\n void I_();\n\n void J_();\n\n void a(C0063d dVar);\n\n void a(byte[] bArr);\n\n void b(boolean z);\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public void b() {\n ((a) this.a).b();\n }", "public np a()\r\n/* 33: */ {\r\n/* 34:49 */ return this.b;\r\n/* 35: */ }", "b(a aVar) {\n super(0);\n this.this$0 = aVar;\n }", "public t b() {\n return a(this.a);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "public static String a(int c) {\n/* 89 */ return b.a(c);\n/* */ }", "private void m678b(byte b) {\n byte[] bArr = this.f523r;\n bArr[0] = b;\n this.f552g.mo502b(bArr);\n }", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "public abstract T zzm(B b);", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public void b(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 27: */ {\r\n/* 28: 47 */ bcm localbcm = paramaqu.s(paramdt);\r\n/* 29: 48 */ if ((localbcm instanceof bdv)) {\r\n/* 30: 49 */ ((bdv)localbcm).h();\r\n/* 31: */ } else {\r\n/* 32: 51 */ super.b(paramaqu, paramdt, parambec);\r\n/* 33: */ }\r\n/* 34: */ }", "public abstract void zzc(B b, int i, int i2);", "public interface b {\n}", "public interface b {\n}", "private void m10263b(byte b) throws cf {\r\n this.f6483r[0] = b;\r\n this.g.m10347b(this.f6483r);\r\n }", "BSubstitution createBSubstitution();", "public void b(ahd paramahd) {}", "void b();", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "B database(S database);", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public abstract C0631bt mo9227aB();", "public an b() {\n return a(this.a);\n }", "protected abstract void a(bru parambru);", "static void go(Base b) {\n\t\tb.add(8);\n\t}", "void mo46242a(bmc bmc);", "public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }", "public interface bca extends bbn {\n bca a();\n\n bca a(String str);\n\n bca b(String str);\n\n bca c(String str);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public abstract BoundType b();", "public void b(amj paramamj)\r\n/* 538: */ {\r\n/* 539:579 */ this.f = paramamj;\r\n/* 540: */ }", "b(a aVar, com.bytedance.jedi.model.h.a aVar2) {\n super(aVar2);\n this.f21531a = aVar;\n this.f21532b = new com.bytedance.jedi.model.h.f(aVar);\n }", "private void b(int paramInt)\r\n/* 193: */ {\r\n/* 194:203 */ this.h.a(a(paramInt));\r\n/* 195: */ }", "public void b(ahb paramahb)\r\n/* 583: */ {\r\n/* 584:625 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 585:626 */ this.a[i] = amj.b(paramahb.a[i]);\r\n/* 586: */ }\r\n/* 587:628 */ for (i = 0; i < this.b.length; i++) {\r\n/* 588:629 */ this.b[i] = amj.b(paramahb.b[i]);\r\n/* 589: */ }\r\n/* 590:631 */ this.c = paramahb.c;\r\n/* 591: */ }", "interface b {\n\n /* compiled from: CreditAccountContract */\n public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }\n\n /* compiled from: CreditAccountContract */\n public interface b extends c {\n void a(Float f);\n\n void a(Integer num);\n\n void b(Float f);\n\n void c(Float f);\n\n String d();\n\n void d(Float f);\n\n void d(String str);\n\n void e(Float f);\n\n void e(String str);\n\n void f(String str);\n\n void g(String str);\n\n Long j();\n\n LineChart k();\n }\n}", "@Override\n\tpublic void visit(PartB partB) {\n\n\t}", "public abstract void zzb(B b, int i, long j);", "public abstract void zza(B b, int i, zzeh zzeh);", "int metodo2(int a, int b) {\r\n\r\n\t\tthis.a += 5; // se modifica el campo del objeto, el uso de la palabra reservada this se utiliza para referenciar al campo.\r\n\t\tb += 7;\r\n\t\treturn a; // modifica en la asignaci\\u00f3n\r\n\t}", "private void internalCopy(Board b) {\n for (int i = 0; i < SIDE * SIDE; i += 1) {\n set(i, b.get(i));\n }\n\n _directions = b._directions;\n _whoseMove = b._whoseMove;\n _history = b._history;\n }", "public int b()\r\n/* 69: */ {\r\n/* 70:74 */ return this.b;\r\n/* 71: */ }", "public void b(StringBuilder sb) {\n sb.append(this.a);\n sb.append(')');\n }", "public void b() {\n e$a e$a;\n try {\n e$a = this.b;\n }\n catch (IOException iOException) {\n return;\n }\n Object object = this.c;\n e$a.b(object);\n }", "public abstract void a(StringBuilder sb);", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public abstract void zzf(Object obj, B b);", "public interface bdp {\n\n /* renamed from: a */\n public static final bdp f3422a = new bdo();\n\n /* renamed from: a */\n bdm mo1784a(akh akh);\n}", "@Override\n\tpublic void parse(Buffer b) {\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public abstract void a(b paramb, int paramInt1, int paramInt2);", "public void mo1945a(byte b) throws cf {\r\n m10263b(b);\r\n }", "void mo83703a(C32456b<T> bVar);", "public void a(String str) {\n ((b.b) this.b).d(str);\n }", "public void selectB() { }", "BOperation createBOperation();", "void metodo1(int a, int b) {\r\n\t\ta += 5;//par\\u00e1metro con el mismo nombre que el campo.\r\n\t\tb += 7;\r\n\t}", "private static void m2196a(StringBuffer stringBuffer, byte b) {\n stringBuffer.append(\"0123456789ABCDEF\".charAt((b >> 4) & 15)).append(\"0123456789ABCDEF\".charAt(b & 15));\n }", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public void b(fv paramfv)\r\n/* 408: */ {\r\n/* 409:423 */ this.a = new amj[36];\r\n/* 410:424 */ this.b = new amj[4];\r\n/* 411:425 */ for (int i = 0; i < paramfv.c(); i++)\r\n/* 412: */ {\r\n/* 413:426 */ fn localfn = paramfv.b(i);\r\n/* 414:427 */ int j = localfn.d(\"Slot\") & 0xFF;\r\n/* 415:428 */ amj localamj = amj.a(localfn);\r\n/* 416:429 */ if (localamj != null)\r\n/* 417: */ {\r\n/* 418:430 */ if ((j >= 0) && (j < this.a.length)) {\r\n/* 419:431 */ this.a[j] = localamj;\r\n/* 420: */ }\r\n/* 421:433 */ if ((j >= 100) && (j < this.b.length + 100)) {\r\n/* 422:434 */ this.b[(j - 100)] = localamj;\r\n/* 423: */ }\r\n/* 424: */ }\r\n/* 425: */ }\r\n/* 426: */ }", "public void b(String str) {\n ((b.b) this.b).e(str);\n }", "public String b()\r\n/* 35: */ {\r\n/* 36:179 */ return a();\r\n/* 37: */ }", "public abstract void zza(B b, int i, T t);", "public Item b(World paramaqu, BlockPosition paramdt)\r\n/* 189: */ {\r\n/* 190:220 */ return null;\r\n/* 191: */ }", "public abstract void zza(B b, int i, long j);", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public abstract void mo9798a(byte b);", "public void mo9798a(byte b) {\n if (this.f9108f == this.f9107e) {\n mo9827i();\n }\n byte[] bArr = this.f9106d;\n int i = this.f9108f;\n this.f9108f = i + 1;\n bArr[i] = b;\n this.f9109g++;\n }", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "private void m676a(TField bkVar, byte b) {\n if (b == -1) {\n b = m687e(bkVar.f538b);\n }\n short s = bkVar.f539c;\n short s2 = this.f519n;\n if (s <= s2 || s - s2 > 15) {\n m678b(b);\n mo446a(bkVar.f539c);\n } else {\n m686d(b | ((s - s2) << 4));\n }\n this.f519n = bkVar.f539c;\n }", "private static void m831a(C0741g<?> gVar, C0747b bVar) {\n gVar.mo9477a(C0743i.f718b, (C0739e<? super Object>) bVar);\n gVar.mo9476a(C0743i.f718b, (C0738d) bVar);\n gVar.mo9474a(C0743i.f718b, (C0736b) bVar);\n }", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "private void j()\n/* */ {\n/* 223 */ c localc = this.b;\n/* 224 */ this.b = this.c;\n/* 225 */ this.c = localc;\n/* 226 */ this.c.b();\n/* */ }", "public lj ar(byte b) {\n throw new Runtime(\"d2j fail translate: java.lang.RuntimeException: can not merge I and Z\\r\\n\\tat com.googlecode.dex2jar.ir.TypeClass.merge(TypeClass.java:100)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeRef.updateTypeClass(TypeTransformer.java:174)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.provideAs(TypeTransformer.java:780)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.e1expr(TypeTransformer.java:496)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:713)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.enexpr(TypeTransformer.java:698)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:719)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.exExpr(TypeTransformer.java:703)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.s1stmt(TypeTransformer.java:810)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.sxStmt(TypeTransformer.java:840)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer$TypeAnalyze.analyze(TypeTransformer.java:206)\\r\\n\\tat com.googlecode.dex2jar.ir.ts.TypeTransformer.transform(TypeTransformer.java:44)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.optimize(Dex2jar.java:162)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertCode(Dex2Asm.java:414)\\r\\n\\tat com.googlecode.d2j.dex.ExDex2Asm.convertCode(ExDex2Asm.java:42)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar$2.convertCode(Dex2jar.java:128)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertMethod(Dex2Asm.java:509)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertClass(Dex2Asm.java:406)\\r\\n\\tat com.googlecode.d2j.dex.Dex2Asm.convertDex(Dex2Asm.java:422)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.doTranslate(Dex2jar.java:172)\\r\\n\\tat com.googlecode.d2j.dex.Dex2jar.to(Dex2jar.java:272)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.doCommandLine(Dex2jarCmd.java:108)\\r\\n\\tat com.googlecode.dex2jar.tools.BaseCmd.doMain(BaseCmd.java:288)\\r\\n\\tat com.googlecode.dex2jar.tools.Dex2jarCmd.main(Dex2jarCmd.java:32)\\r\\n\");\n }", "public interface AbstractC10485b {\n /* renamed from: a */\n void mo64153a(boolean z);\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.64558864", "0.6283203", "0.6252635", "0.6250949", "0.6244743", "0.6216273", "0.6194491", "0.6193556", "0.61641675", "0.6140157", "0.60993093", "0.60974354", "0.6077849", "0.6001867", "0.5997364", "0.59737104", "0.59737104", "0.5905105", "0.5904295", "0.58908087", "0.5886636", "0.58828026", "0.5855491", "0.584618", "0.5842517", "0.5824137", "0.5824071", "0.58097327", "0.5802052", "0.58012927", "0.579443", "0.5792392", "0.57902914", "0.5785124", "0.57718205", "0.57589084", "0.5735892", "0.5735892", "0.5734873", "0.5727929", "0.5720821", "0.5712531", "0.5706813", "0.56896514", "0.56543154", "0.5651059", "0.5649904", "0.56496733", "0.5647035", "0.5640965", "0.5640109", "0.563993", "0.5631903", "0.5597427", "0.55843794", "0.5583287", "0.557783", "0.55734867", "0.55733293", "0.5572254", "0.55683887", "0.55624336", "0.55540246", "0.5553985", "0.55480546", "0.554261", "0.5535739", "0.5529958", "0.5519634", "0.5517503", "0.55160624", "0.5511545", "0.5505353", "0.5500533", "0.5491741", "0.5486198", "0.5481978", "0.547701", "0.54725856", "0.5471632", "0.5463497", "0.5460805", "0.5454913", "0.5454885", "0.54519916", "0.5441594", "0.5436747", "0.5432453", "0.5425923", "0.5424724", "0.54189867", "0.54162544", "0.54051477", "0.53998184", "0.53945845", "0.53887725", "0.5388146", "0.5387678", "0.53858143", "0.53850687", "0.5384439" ]
0.0
-1
/ renamed from: d
public View mo1753d() { ActivityChooserView activityChooserView = new ActivityChooserView(this.f2117g); if (!activityChooserView.isInEditMode()) { activityChooserView.setActivityChooserModel(C0475c.m2615a(this.f2117g, this.f2118h)); } TypedValue typedValue = new TypedValue(); this.f2117g.getTheme().resolveAttribute(C0238R.attr.actionModeShareDrawable, typedValue, true); activityChooserView.setExpandActivityOverflowButtonDrawable(C0242a.m1109c(this.f2117g, typedValue.resourceId)); activityChooserView.setProvider(this); activityChooserView.setDefaultActionButtonContentDescription(C0238R.string.abc_shareactionprovider_share_with_application); activityChooserView.setExpandActivityOverflowButtonContentDescription(C0238R.string.abc_shareactionprovider_share_with); return activityChooserView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void d() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "public int d()\r\n/* 79: */ {\r\n/* 80:82 */ return this.d;\r\n/* 81: */ }", "public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }", "public abstract int d();", "private void m2248a(double d, String str) {\n this.f2954c = d;\n this.f2955d = (long) d;\n this.f2953b = str;\n this.f2952a = ValueType.doubleValue;\n }", "public int d()\n {\n return 1;\n }", "public interface C19512d {\n /* renamed from: dd */\n void mo34676dd(int i, int i2);\n }", "void mo21073d();", "@Override\n public boolean d() {\n return false;\n }", "int getD();", "public void dor(){\n }", "public int getD() {\n\t\treturn d;\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public String getD() {\n return d;\n }", "@Override\n\tpublic void dibuja() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "public D() {}", "void mo17013d();", "public int getD() {\n return d_;\n }", "void mo83705a(C32458d<T> dVar);", "public void d() {\n\t\tSystem.out.println(\"d method\");\n\t}", "public float d()\r\n/* 15: */ {\r\n/* 16:163 */ return this.b;\r\n/* 17: */ }", "double d();", "protected DNA(Population pop, DNA d) {\n\t\t// TODO: implement this\n\t}", "public ahb(ahd paramahd)\r\n/* 12: */ {\r\n/* 13: 36 */ this.d = paramahd;\r\n/* 14: */ }", "public abstract C17954dh<E> mo45842a();", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void visitTdetree(Tdetree p) {\n\n\t}", "public abstract void mo56925d();", "void mo54435d();", "public void mo21779D() {\n }", "public void d() {\n this.f20599d.a(this.f20598c);\n this.f20598c.a(this);\n this.f20601f = new a(new d());\n d.a(this.f20596a, this.f20597b, this.f20601f);\n this.f20596a.setLayoutManager(new NPALinearLayoutManager(getContext()));\n ((s) this.f20596a.getItemAnimator()).setSupportsChangeAnimations(false);\n this.f20596a.setAdapter(this.f20601f);\n this.f20598c.a(this.f20602g);\n }", "@Override\r\n public String getStringRepresentation()\r\n {\r\n return \"D\";\r\n }", "void mo28307a(zzgd zzgd);", "List<String> d();", "d(l lVar, m mVar, b bVar) {\n super(mVar);\n this.f11484d = lVar;\n this.f11483c = bVar;\n }", "public int getD() {\n return d_;\n }", "public void addDField(String d){\n\t\tdfield.add(d);\n\t}", "public void mo3749d() {\n }", "public a dD() {\n return new a(this.HG);\n }", "public String amd_to_dma(java.sql.Date d)\n {\n String resp = \"\";\n if (d!=null)\n {\n String sdat = d.toString();\n String sano = sdat.substring(0,4);\n String smes = sdat.substring(5,7);\n String sdia = sdat.substring(8,10);\n resp = sdia+\"/\"+smes+\"/\"+sano;\n }\n return resp;\n }", "public void mo130970a(double d) {\n SinkDefaults.m149818a(this, d);\n }", "public abstract int getDx();", "public void mo97908d() {\n }", "public com.c.a.d.d d() {\n return this.k;\n }", "private static String toPsString(double d) {\n return \"(\" + d + \")\";\n }", "public boolean d() {\n return false;\n }", "void mo17023d();", "String dibujar();", "@Override\n\tpublic void setDurchmesser(int d) {\n\n\t}", "public void mo2470d() {\n }", "public abstract VH mo102583a(ViewGroup viewGroup, D d);", "public abstract String mo41079d();", "public void setD ( boolean d ) {\n\n\tthis.d = d;\n }", "public Dx getDx() {\n/* 32 */ return this.dx;\n/* */ }", "DoubleNode(int d) {\n\t data = d; }", "DD createDD();", "@java.lang.Override\n public float getD() {\n return d_;\n }", "public void setD(String d) {\n this.d = d == null ? null : d.trim();\n }", "public int d()\r\n {\r\n return 20;\r\n }", "float getD();", "public static int m22546b(double d) {\n return 8;\n }", "void mo12650d();", "String mo20732d();", "static void feladat4() {\n\t}", "public void mo2198g(C0317d dVar) {\n }", "void mo130799a(double d);", "@Override\n public void d(String TAG, String msg) {\n }", "private double convert(double d){\n\t\tDecimalFormatSymbols symbols = DecimalFormatSymbols.getInstance();\n\t\tsymbols.setDecimalSeparator('.');\n\t\tDecimalFormat df = new DecimalFormat(\"#.##\",symbols); \n\t\treturn Double.valueOf(df.format(d));\n\t}", "public void d(String str) {\n ((b.b) this.b).g(str);\n }", "public abstract void mo42329d();", "public abstract long mo9229aD();", "public abstract String getDnForPerson(String inum);", "public interface ddd {\n public String dan();\n\n}", "@Override\n public void func_104112_b() {\n \n }", "public Nodo (String d){\n\t\tthis.dato = d;\n\t\tthis.siguiente = null; //para que apunte el nodo creado a nulo\n\t}", "public interface C27442s {\n /* renamed from: d */\n List<EffectPointModel> mo70331d();\n}", "public void mo5117a(C0371d c0371d, double d) {\n new C0369b(this, c0371d, d).start();\n }", "public final void m22595a(double d) {\n mo4383c(Double.doubleToRawLongBits(d));\n }", "public void d() {\n this.f23522d.a(this.f23521c);\n this.f23521c.a(this);\n this.i = new a();\n this.i.a(new ae(this.f23519a));\n this.f23519a.setAdapter(this.i);\n this.f23519a.setOnItemClickListener(this);\n this.f23521c.e();\n this.h.a(hashCode(), this.f23520b);\n }", "public Vector2d(double d) {\n\t\tthis.x = d;\n\t\tthis.y = d;\n\t}", "DomainHelper dh();", "static double DEG_to_RAD(double d) {\n return d * Math.PI / 180.0;\n }", "@java.lang.Override\n public float getD() {\n return d_;\n }", "private Pares(PLoc p, PLoc s, int d){\n\t\t\tprimero=p;\n\t\t\tsegundo=s;\n\t\t\tdistancia=d;\n\t\t}", "public Double getDx();", "private final VH m112826b(ViewGroup viewGroup, D d) {\n return mo102583a(viewGroup, d);\n }", "public void m25658a(double d) {\n if (d <= 0.0d) {\n d = 1.0d;\n }\n this.f19276f = (float) (50.0d / d);\n this.f19277g = new C4658a(this, this.f19273c);\n }", "boolean hasD();", "public abstract void mo27386d();", "MergedMDD() {\n }", "@ReflectiveMethod(name = \"d\", types = {})\n public void d(){\n NMSWrapper.getInstance().exec(nmsObject);\n }", "@Override\n public Chunk d(int i0, int i1) {\n return null;\n }", "public void d(World paramaqu, BlockPosition paramdt, Block parambec)\r\n/* 47: */ {\r\n/* 48: 68 */ BlockPosition localdt = paramdt.offset(((EnumDirection)parambec.getData(a)).opposite());\r\n/* 49: 69 */ Block localbec = paramaqu.getBlock(localdt);\r\n/* 50: 70 */ if (((localbec.getType() instanceof bdq)) && (((Boolean)localbec.getData(bdq.b)).booleanValue())) {\r\n/* 51: 71 */ paramaqu.g(localdt);\r\n/* 52: */ }\r\n/* 53: */ }", "double defendre();", "public static int setDimension( int d ) {\n int temp = DPoint.d;\n DPoint.d = d;\n return temp;\n }", "public Datum(Datum d) {\n this.dan = d.dan;\n this.mesec = d.mesec;\n this.godina = d.godina;\n }", "public Nodo (String d, Nodo n){\n\t\tdato = d;\n\t\tsiguiente=n;\n\t}" ]
[ "0.637724", "0.6160382", "0.6070847", "0.5993489", "0.587634", "0.5868696", "0.58239543", "0.5755673", "0.57014745", "0.5660435", "0.5650112", "0.5635051", "0.5621533", "0.5615009", "0.5609681", "0.5609681", "0.56053764", "0.5598181", "0.5588647", "0.55685943", "0.55585486", "0.5540982", "0.55319315", "0.55297035", "0.5503284", "0.5502158", "0.5500014", "0.5492224", "0.5475212", "0.5465356", "0.5449315", "0.5447821", "0.5445231", "0.54386353", "0.5435587", "0.54315525", "0.54280716", "0.54219437", "0.54217356", "0.54168373", "0.54160315", "0.5408191", "0.5392229", "0.53900015", "0.5377672", "0.5373491", "0.5367681", "0.5366207", "0.5353261", "0.5352031", "0.53403777", "0.533293", "0.5325272", "0.5324332", "0.5320519", "0.53199506", "0.5314555", "0.53123736", "0.52957165", "0.52745944", "0.5270837", "0.52589273", "0.5244756", "0.5244297", "0.5241962", "0.5240939", "0.52404463", "0.52333504", "0.5231061", "0.52307147", "0.5229125", "0.52198946", "0.52126193", "0.5212172", "0.5208094", "0.52072304", "0.5193083", "0.5192012", "0.5185478", "0.51787496", "0.5177592", "0.5168682", "0.5164327", "0.51573545", "0.515715", "0.5157143", "0.51562715", "0.51558095", "0.5155498", "0.5154851", "0.5153278", "0.5152205", "0.51500297", "0.51420474", "0.5139897", "0.5139196", "0.51366395", "0.513445", "0.5127337", "0.5123604", "0.51194715" ]
0.0
-1
/ renamed from: a
public void mo1751a(SubMenu subMenu) { subMenu.clear(); C0475c a = C0475c.m2615a(this.f2117g, this.f2118h); PackageManager packageManager = this.f2117g.getPackageManager(); int a2 = a.mo2490a(); int min = Math.min(a2, this.f2115e); for (int i = 0; i < min; i++) { ResolveInfo b = a.mo2497b(i); subMenu.add(0, i, i, b.loadLabel(packageManager)).setIcon(b.loadIcon(packageManager)).setOnMenuItemClickListener(this.f2116f); } if (min < a2) { SubMenu addSubMenu = subMenu.addSubMenu(0, min, min, this.f2117g.getString(C0238R.string.abc_activity_chooser_view_see_all)); for (int i2 = 0; i2 < a2; i2++) { ResolveInfo b2 = a.mo2497b(i2); addSubMenu.add(0, i2, i2, b2.loadLabel(packageManager)).setIcon(b2.loadIcon(packageManager)).setOnMenuItemClickListener(this.f2116f); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public void mo2803a(String str) { this.f2118h = str; m2843i(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
/ renamed from: a
public void mo2801a(Intent intent) { if (intent != null) { String action = intent.getAction(); if ("android.intent.action.SEND".equals(action) || "android.intent.action.SEND_MULTIPLE".equals(action)) { mo2804b(intent); } } C0475c.m2615a(this.f2117g, this.f2118h).mo2493a(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface C4521a {\n /* renamed from: a */\n void mo12348a();\n }", "public interface C1423a {\n /* renamed from: a */\n void mo6888a(int i);\n }", "interface bxc {\n /* renamed from: a */\n void mo2508a(bxb bxb);\n}", "interface C33292a {\n /* renamed from: a */\n void mo85415a(String str);\n }", "interface C10331b {\n /* renamed from: a */\n void mo26876a(int i);\n }", "public interface C0779a {\n /* renamed from: a */\n void mo2311a();\n}", "public interface C6788a {\n /* renamed from: a */\n void mo20141a();\n }", "public interface C0237a {\n /* renamed from: a */\n void mo1791a(String str);\n }", "public interface C35013b {\n /* renamed from: a */\n void mo88773a(int i);\n}", "public interface C11112n {\n /* renamed from: a */\n void mo38026a();\n }", "@Override\n\t\t\t\tpublic void a() {\n\n\t\t\t\t}", "public interface C23407b {\n /* renamed from: a */\n void mo60892a();\n\n /* renamed from: b */\n void mo60893b();\n }", "interface C0312e {\n /* renamed from: a */\n void mo4671a(View view, int i, int i2, int i3, int i4);\n }", "public interface C34379a {\n /* renamed from: a */\n void mo46242a(bmc bmc);\n }", "public interface C32456b<T> {\n /* renamed from: a */\n void mo83696a(T t);\n }", "private String convertir(String a) {\n StringBuilder atributo = new StringBuilder(a);\n atributo.insert(0, Character.toUpperCase(atributo.charAt(0)));\n return atributo.deleteCharAt(1).toString();\n }", "protected m a(String name) {\n/* 42 */ return this.a.get(name);\n/* */ }", "public interface AbstractC23925a {\n /* renamed from: a */\n void mo105476a();\n }", "private interface C0257a {\n /* renamed from: a */\n float mo196a(ViewGroup viewGroup, View view);\n\n /* renamed from: b */\n float mo195b(ViewGroup viewGroup, View view);\n }", "public interface C3598a {\n /* renamed from: a */\n void mo11024a(int i, int i2, String str);\n }", "public interface C2459d {\n /* renamed from: a */\n C2451d mo3408a(C2457e c2457e);\n}", "public interface am extends ak {\r\n /* renamed from: a */\r\n void mo194a(int i) throws RemoteException;\r\n\r\n /* renamed from: a */\r\n void mo195a(List<LatLng> list) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo196b(float f) throws RemoteException;\r\n\r\n /* renamed from: b */\r\n void mo197b(boolean z);\r\n\r\n /* renamed from: c */\r\n void mo198c(boolean z) throws RemoteException;\r\n\r\n /* renamed from: g */\r\n float mo199g() throws RemoteException;\r\n\r\n /* renamed from: h */\r\n int mo200h() throws RemoteException;\r\n\r\n /* renamed from: i */\r\n List<LatLng> mo201i() throws RemoteException;\r\n\r\n /* renamed from: j */\r\n boolean mo202j();\r\n\r\n /* renamed from: k */\r\n boolean mo203k();\r\n}", "public interface C32459e<T> {\n /* renamed from: a */\n void mo83698a(T t);\n }", "public interface C32458d<T> {\n /* renamed from: a */\n void mo83695a(T t);\n }", "public interface C5482b {\n /* renamed from: a */\n void mo27575a();\n\n /* renamed from: a */\n void mo27576a(int i);\n }", "public interface C27084a {\n /* renamed from: a */\n void mo69874a();\n\n /* renamed from: a */\n void mo69875a(List<Aweme> list, boolean z);\n }", "public void a() {\n ((a) this.a).a();\n }", "public interface C1153a {\n /* renamed from: a */\n void mo4520a(byte[] bArr);\n }", "public interface C13373b {\n /* renamed from: a */\n void mo32681a(String str, int i, boolean z);\n}", "public interface C40453c {\n /* renamed from: a */\n void mo100442a(C40429b bVar);\n\n /* renamed from: a */\n void mo100443a(List<String> list);\n\n /* renamed from: b */\n void mo100444b(List<C40429b> list);\n}", "public interface AbstractC17367b {\n /* renamed from: a */\n void mo84655a();\n }", "@Override\r\n\tpublic void a() {\n\t\t\r\n\t}", "public interface C43270a {\n /* renamed from: a */\n void mo64942a(String str, long j, long j2);\n}", "public interface C18928d {\n /* renamed from: a */\n void mo50320a(C18924b bVar);\n\n /* renamed from: b */\n void mo50321b(C18924b bVar);\n}", "public interface C0087c {\n /* renamed from: a */\n String mo150a(String str);\n}", "public interface C1529m {\n /* renamed from: a */\n void mo3767a(int i);\n\n /* renamed from: a */\n void mo3768a(String str);\n}", "interface C4483e {\n /* renamed from: a */\n boolean mo34114a();\n}", "public interface C1234b {\r\n /* renamed from: a */\r\n void m8367a();\r\n\r\n /* renamed from: b */\r\n void m8368b();\r\n}", "public interface C10965j<T> {\n /* renamed from: a */\n T mo26439a();\n}", "public interface C28772a {\n /* renamed from: a */\n View mo73990a(View view);\n }", "@Override\n\tpublic void a() {\n\t\t\n\t}", "public interface C8326b {\n /* renamed from: a */\n C8325a mo21498a(String str);\n\n /* renamed from: a */\n void mo21499a(C8325a aVar);\n}", "void metodo1(int a, int[] b) {\r\n\t\ta += 5;//Par\\u00e1metro con el mismo nombre que el campo de la clase.\r\n\t\tb[0] += 7;//se produce un env\\u00edo por referencia, apunta a una copia de un objeto, que se asigna aqu\\u00ed.\r\n\t}", "public interface C2367a {\n /* renamed from: a */\n C2368d mo1698a();\n }", "interface C30585a {\n /* renamed from: b */\n void mo27952b(C5379a c5379a, int i, C46650a c46650a, C7620bi c7620bi);\n }", "public interface C4211a {\n\n /* renamed from: com.iab.omid.library.oguryco.c.a$a */\n public interface C4212a {\n /* renamed from: a */\n void mo28760a(View view, C4211a aVar, JSONObject jSONObject);\n }\n\n /* renamed from: a */\n JSONObject mo28758a(View view);\n\n /* renamed from: a */\n void mo28759a(View view, JSONObject jSONObject, C4212a aVar, boolean z);\n}", "public interface C4697a extends C5595at {\n /* renamed from: a */\n void mo12634a();\n\n /* renamed from: a */\n void mo12635a(String str);\n\n /* renamed from: a */\n void mo12636a(boolean z);\n\n /* renamed from: b */\n void mo12637b();\n\n /* renamed from: c */\n void mo12638c();\n }", "public interface C4773c {\n /* renamed from: a */\n void m15858a(int i);\n\n /* renamed from: a */\n void m15859a(int i, int i2);\n\n /* renamed from: a */\n void m15860a(int i, int i2, int i3);\n\n /* renamed from: b */\n void m15861b(int i, int i2);\n}", "public interface C4869f {\n /* renamed from: a */\n C4865b mo6249a();\n}", "public interface C1799a {\n /* renamed from: b */\n void mo3314b(String str);\n }", "public interface C43499b {\n /* renamed from: a */\n void mo8445a(int i, String str, int i2, byte[] bArr);\n}", "public interface C0601aq {\n /* renamed from: a */\n void mo9148a(int i, ArrayList<C0889x> arrayList);\n}", "public interface C45101e {\n /* renamed from: b */\n void mo3796b(int i);\n}", "public interface AbstractC6461g {\n /* renamed from: a */\n String mo42332a();\n}", "public interface AbstractC1645a {\n /* renamed from: a */\n String mo17375a();\n }", "public interface C6178c {\n /* renamed from: a */\n Map<String, String> mo14888a();\n}", "public interface C5101b {\n /* renamed from: a */\n void mo5289a(C5102c c5102c);\n\n /* renamed from: b */\n void mo5290b(C5102c c5102c);\n}", "public interface C19045k {\n /* renamed from: a */\n void mo50368a(int i, Object obj);\n\n /* renamed from: b */\n void mo50369b(int i, Object obj);\n}", "public b a()\r\n/* 12: */ {\r\n/* 13:13 */ return this.a;\r\n/* 14: */ }", "public interface C7720a {\n /* renamed from: a */\n long mo20406a();\n}", "public String a()\r\n/* 25: */ {\r\n/* 26:171 */ return \"dig.\" + this.a;\r\n/* 27: */ }", "public interface ayt {\n /* renamed from: a */\n int mo1635a(long j, List list);\n\n /* renamed from: a */\n long mo1636a(long j, alb alb);\n\n /* renamed from: a */\n void mo1637a();\n\n /* renamed from: a */\n void mo1638a(long j, long j2, List list, ayp ayp);\n\n /* renamed from: a */\n void mo1639a(ayl ayl);\n\n /* renamed from: a */\n boolean mo1640a(ayl ayl, boolean z, Exception exc, long j);\n}", "public interface C24221b extends C28343z<C28318an> {\n /* renamed from: a */\n void mo62991a(int i);\n\n String aw_();\n\n /* renamed from: e */\n Aweme mo62993e();\n}", "public interface C4051c {\n /* renamed from: a */\n boolean mo23707a();\n}", "public interface C45112b {\n /* renamed from: a */\n List<C45111a> mo107674a(Integer num);\n\n /* renamed from: a */\n List<C45111a> mo107675a(Integer num, Integer num2);\n\n /* renamed from: a */\n void mo107676a(C45111a aVar);\n\n /* renamed from: b */\n void mo107677b(Integer num);\n\n /* renamed from: c */\n long mo107678c(Integer num);\n}", "public void acionou(int a){\n\t\t\tb=a;\n\t\t}", "public interface C44963i {\n /* renamed from: a */\n void mo63037a(int i, int i2);\n\n void aA_();\n\n /* renamed from: b */\n void mo63039b(int i, int i2);\n}", "public interface C32457c<T> {\n /* renamed from: a */\n void mo83699a(T t, int i, int i2, String str);\n }", "public interface C5861g {\n /* renamed from: a */\n void mo18320a(C7251a aVar);\n\n @Deprecated\n /* renamed from: a */\n void mo18321a(C7251a aVar, String str);\n\n /* renamed from: a */\n void mo18322a(C7252b bVar);\n\n /* renamed from: a */\n void mo18323a(C7253c cVar);\n\n /* renamed from: a */\n void mo18324a(C7260j jVar);\n}", "public interface C0937a {\n /* renamed from: a */\n void mo3807a(C0985po[] poVarArr);\n }", "public interface C8466a {\n /* renamed from: a */\n void mo25956a(int i);\n\n /* renamed from: a */\n void mo25957a(long j, long j2);\n }", "public interface C39684b {\n /* renamed from: a */\n void mo98969a();\n\n /* renamed from: a */\n void mo98970a(C29296g gVar);\n\n /* renamed from: a */\n void mo98971a(C29296g gVar, int i);\n }", "public interface C43470b {\n /* renamed from: a */\n void mo61496a(C43469a aVar, C43471c cVar);\n }", "public interface AbstractC18255a {\n /* renamed from: a */\n void mo88521a();\n\n /* renamed from: a */\n void mo88522a(String str);\n\n /* renamed from: b */\n void mo88523b();\n\n /* renamed from: c */\n void mo88524c();\n }", "public interface C1436d {\n /* renamed from: a */\n C1435c mo1754a(C1433a c1433a, C1434b c1434b);\n}", "public interface C4150sl {\n /* renamed from: a */\n void mo15005a(C4143se seVar);\n}", "public void a(nm paramnm)\r\n/* 28: */ {\r\n/* 29:45 */ paramnm.a(this);\r\n/* 30: */ }", "public interface C19351a {\n /* renamed from: b */\n void mo30633b(int i, String str, byte[] bArr);\n }", "public interface C11113o {\n /* renamed from: a */\n void mo37759a(String str);\n }", "public interface C39504az {\n /* renamed from: a */\n int mo98207a();\n\n /* renamed from: a */\n void mo98208a(boolean z);\n\n /* renamed from: b */\n int mo98209b();\n\n /* renamed from: c */\n int mo98355c();\n\n /* renamed from: d */\n int mo98356d();\n\n /* renamed from: e */\n int mo98357e();\n\n /* renamed from: f */\n int mo98358f();\n}", "protected a<T> a(Tag.e<T> var0) {\n/* 80 */ Tag.a var1 = b(var0);\n/* 81 */ return new a<>(var1, this.c, \"vanilla\");\n/* */ }", "public interface C35565a {\n /* renamed from: a */\n C45321i mo90380a();\n }", "public interface C21298a {\n /* renamed from: a */\n void mo57275a();\n\n /* renamed from: a */\n void mo57276a(Exception exc);\n\n /* renamed from: b */\n void mo57277b();\n\n /* renamed from: c */\n void mo57278c();\n }", "public interface C40108b {\n /* renamed from: a */\n void mo99838a(boolean z);\n }", "public interface C0456a {\n /* renamed from: a */\n void mo2090a(C0455b bVar);\n\n /* renamed from: a */\n boolean mo2091a(C0455b bVar, Menu menu);\n\n /* renamed from: a */\n boolean mo2092a(C0455b bVar, MenuItem menuItem);\n\n /* renamed from: b */\n boolean mo2093b(C0455b bVar, Menu menu);\n }", "public interface C4724o {\n /* renamed from: a */\n void mo4872a(int i, String str);\n\n /* renamed from: a */\n void mo4873a(C4718l c4718l);\n\n /* renamed from: b */\n void mo4874b(C4718l c4718l);\n}", "public interface C7654b {\n /* renamed from: a */\n C7904c mo24084a();\n\n /* renamed from: b */\n C7716a mo24085b();\n }", "public interface C2603a {\n /* renamed from: a */\n String mo1889a(String str, String str2, String str3, String str4);\n }", "public interface afp {\n /* renamed from: a */\n C0512sx mo169a(C0497si siVar, afj afj, afr afr, Context context);\n}", "public interface C0615ja extends b<HomeFragment> {\n\n /* renamed from: c.c.a.h.b.ja$a */\n /* compiled from: FragmentModule_HomeFragment$app_bazaarRelease */\n public static abstract class a extends b.a<HomeFragment> {\n }\n}", "public interface a {\n\n /* renamed from: c.b.a.c.b.b.a$a reason: collision with other inner class name */\n /* compiled from: DiskCache */\n public interface C0054a {\n a build();\n }\n\n /* compiled from: DiskCache */\n public interface b {\n boolean a(File file);\n }\n\n File a(c cVar);\n\n void a(c cVar, b bVar);\n}", "public interface C0940d {\n /* renamed from: a */\n void mo3305a(boolean z);\n }", "public interface AbstractC17368c {\n /* renamed from: a */\n void mo84656a(float f);\n }", "interface C0932a {\n /* renamed from: a */\n void mo7438a(int i, int i2);\n\n /* renamed from: b */\n void mo7439b(C0933b bVar);\n\n /* renamed from: c */\n void mo7440c(int i, int i2, Object obj);\n\n /* renamed from: d */\n void mo7441d(C0933b bVar);\n\n /* renamed from: e */\n RecyclerView.ViewHolder mo7442e(int i);\n\n /* renamed from: f */\n void mo7443f(int i, int i2);\n\n /* renamed from: g */\n void mo7444g(int i, int i2);\n\n /* renamed from: h */\n void mo7445h(int i, int i2);\n }", "public interface C10330c {\n /* renamed from: a */\n C7562b<C10403b, C10328a> mo25041a();\n}", "public interface C3819a {\n /* renamed from: a */\n void mo23214a(Message message);\n }", "private Proof atoAImpl(Expression a) {\n Proof where = axm2(a, arrow(a, a), a); //a->(a->a) -> (a->(a->a)->a) -> (a -> a)\n Proof one = axm1(a, a); //a->a->a\n Proof two = axm1(a, arrow(a, a)); //a->(a->a)->A\n return mpTwice(where, one, two);\n }", "interface C1939a {\n /* renamed from: a */\n Bitmap mo1406a(Bitmap bitmap, float f);\n}", "public interface a extends com.bankeen.d.b.b.a {\n void a();\n\n void b();\n }", "public b[] a() {\n/* 95 */ return this.a;\n/* */ }", "interface C8361a {\n /* renamed from: b */\n float mo18284b(ViewGroup viewGroup, View view);\n\n /* renamed from: c */\n float mo18281c(ViewGroup viewGroup, View view);\n }" ]
[ "0.62497115", "0.6242887", "0.61394435", "0.61176854", "0.6114027", "0.60893", "0.6046901", "0.6024682", "0.60201293", "0.5975212", "0.59482527", "0.59121317", "0.5883635", "0.587841", "0.58703005", "0.5868436", "0.5864884", "0.5857492", "0.58306104", "0.5827752", "0.58272064", "0.5794689", "0.57890314", "0.57838726", "0.5775679", "0.57694733", "0.5769128", "0.57526815", "0.56907034", "0.5677874", "0.5670547", "0.56666386", "0.56592244", "0.5658682", "0.56574154", "0.5654324", "0.5644676", "0.56399715", "0.5638734", "0.5630582", "0.56183887", "0.5615435", "0.56069666", "0.5605207", "0.56005067", "0.559501", "0.55910283", "0.5590222", "0.55736613", "0.5556682", "0.5554544", "0.5550076", "0.55493855", "0.55446684", "0.5538079", "0.5529058", "0.5528109", "0.552641", "0.5525864", "0.552186", "0.5519972", "0.5509587", "0.5507195", "0.54881203", "0.5485328", "0.54826045", "0.5482066", "0.5481586", "0.5479751", "0.54776895", "0.54671466", "0.5463307", "0.54505056", "0.54436916", "0.5440517", "0.5439747", "0.5431944", "0.5422869", "0.54217863", "0.5417556", "0.5403905", "0.5400223", "0.53998446", "0.5394735", "0.5388649", "0.5388258", "0.5374842", "0.5368887", "0.53591394", "0.5357029", "0.5355688", "0.535506", "0.5355034", "0.53494394", "0.5341044", "0.5326166", "0.53236824", "0.53199095", "0.53177035", "0.53112453", "0.5298229" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof MetodoPagoCliente)) { return false; } MetodoPagoCliente other = (MetodoPagoCliente) object; if ((this.idMetodoPagoCliente == null && other.idMetodoPagoCliente != null) || (this.idMetodoPagoCliente != null && !this.idMetodoPagoCliente.equals(other.idMetodoPagoCliente))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "protected abstract String getId();", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public int getId(){\r\n return localId;\r\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "@Override\n public Integer getId() {\n return id;\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "public void setId(Long id){\n this.id = id;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public long getId() {\n return this.id;\n }", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "public String getId(){ return id.get(); }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.6894075", "0.6838163", "0.6703205", "0.6639082", "0.6639082", "0.6590798", "0.65762895", "0.65762895", "0.65737987", "0.65737987", "0.65737987", "0.65737987", "0.65737987", "0.65737987", "0.6559597", "0.6559597", "0.6543704", "0.65236825", "0.6515142", "0.6486868", "0.64753777", "0.64260715", "0.6418153", "0.6416081", "0.6401557", "0.6366464", "0.63543844", "0.6350908", "0.6346934", "0.6323781", "0.63184375", "0.6300766", "0.62926793", "0.62926793", "0.6282387", "0.62707525", "0.6265919", "0.62644845", "0.6261943", "0.6258684", "0.6255518", "0.62512594", "0.6246854", "0.6246854", "0.62422425", "0.6238503", "0.6238503", "0.6229613", "0.62216103", "0.6219872", "0.62193286", "0.6211117", "0.62067485", "0.6201226", "0.6200104", "0.61919725", "0.61885476", "0.61885476", "0.6188485", "0.6188485", "0.6188485", "0.61835754", "0.6182646", "0.6174005", "0.61738306", "0.6165114", "0.61649585", "0.61589617", "0.6155461", "0.6155461", "0.6155461", "0.6155461", "0.6155461", "0.6155461", "0.6155461", "0.6154748", "0.6154748", "0.6139939", "0.6133394", "0.6127901", "0.61270005", "0.610337", "0.610337", "0.6103118", "0.61024684", "0.6102068", "0.6101378", "0.60989213", "0.6097915", "0.60941154", "0.60903585", "0.60903585", "0.60899234", "0.608963", "0.6088946", "0.6074049", "0.60707915", "0.6070737", "0.60696197", "0.6069213", "0.6068868" ]
0.0
-1
On Start Of Details Activity bind views
@Override public void onStart(Pastry pastry) { if (pastry != null) { view.bindViews(pastry); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void initView() {\n\t\tIntent intent=getIntent();\n\t\tString title=intent.getStringExtra(\"title\");\n\t\tcontext=intent.getStringExtra(\"context\");\n\t\tsetTitle(title);\n\t\tsetGone();\n\t\tsetBack();\n\t\tlist=new ArrayList<GameFighterBean>();\n\t\ttopNewsMoreLV = (LoadListViewnews) findViewById(R.id.lv_more_topnew);\n\t\txuanshou_quanbu_wu = (Button) findViewById(R.id.xuanshou_quanbu_wu);\n\t\txuanshou_quanbu_wu.setVisibility(View.VISIBLE);\n\t\tinitNetwork(context);\n\n\t}", "private void setUpViews() {\n\n updateFooterCarInfo();\n updateFooterUsrInfo();\n\n\n setResultActionListener(new ResultActionListener() {\n @Override\n public void onResultAction(AppService.ActionType actionType) {\n if (ModelManager.getInstance().getGlobalInfo() != null) {\n GlobalInfo globalInfo = ModelManager.getInstance().getGlobalInfo();\n\n switch (actionType) {\n case CarInfo:\n updateFooterCarInfo();\n break;\n case UsrInfo:\n updateFooterUsrInfo();\n break;\n case Charger:\n updateChargeStationList();\n break;\n }\n }\n }\n });\n }", "@Override\n protected void onCreate(Bundle savedInstanceState)\n {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_product_details);\n ActivityManager.getInstance().pushActivity(ProductDetailsActivity.this);\n mContext = ProductDetailsActivity.this;\n initTitle();\n initView();\n initData();\n }", "@Override\n\tprotected int initView() {\n\t\treturn R.layout.activity_zhusu_detail;\n\t}", "private void initViews(){\n rootView = View.inflate(getContext(), R.layout.fragment_titles, null);\n unbinder = ButterKnife.bind(this, rootView);\n listener = new TitleListener() {\n @Override\n public void onClick(View view, int position, String id , String label) {\n Intent intent = new Intent();\n intent.putExtra(MEConstants.TITLE_ID, id);\n intent.putExtra(MEConstants.TITLE_LABEL , label);\n\n getTargetFragment().onActivityResult(getTargetRequestCode() , 109 , intent);\n\n dismiss();\n }\n };\n if(!DeviceConnectivity.isNetworkAvailable(getContext())) {\n loader.setVisibility(View.GONE);\n noTitles.setVisibility(View.GONE);\n llConnectivityDialog.setVisibility(View.VISIBLE);\n llTitles.setVisibility(View.GONE);\n } else {\n getTitlesWS();\n }\n }", "private void displayContactDetails() {\n bindTextViews();\n populateTextViews();\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tinitView();\r\n\t\tgetListDataFromLocal();\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "private void initViews() {\n ListFragment listFragment = ListFragment.newInstance();\n fragmentManager.beginTransaction().replace(R.id.holder, listFragment, \"List fragment\").commit();\n\n if (findViewById(R.id.detail_fragment) != null) {\n isTablet = true;\n DetailFragment detailFragment = DetailFragment.newInstance();\n fragmentManager.beginTransaction().replace(R.id.detail_fragment, detailFragment, \"Detail fragment\").addToBackStack(null).commit();\n }\n }", "private void startViewData() {\n startActivity(new Intent(this, ViewDataActivity.class));\n }", "public void setUpViews(){\n listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n // ListView Clicked item index\n Intent i = new Intent(getActivity(), MediaDetailActivity.class);\n Media media = lectures.get(position);\n i.putExtra(\"url\", media.getUrl());\n i.putExtra(\"type\", media.type);\n i.putExtra(\"author\", media.author);\n i.putExtra(\"author_image_url\", media.getImageUrl());\n i.putExtra(\"name\", media.getName());\n startActivity(i);\n }\n });\n }", "private void initView() {\n\t\tsna_viewpager = (ViewPager) findViewById(R.id.sna_viewpager);\r\n\t\thost_bt = (Button) findViewById(R.id.host_bt);\r\n\t\tcomment_bt = (Button) findViewById(R.id.comment_bt);\r\n\t\tback_iv = (ImageView) findViewById(R.id.back_iv);\r\n\t\trelativeLayout_project = (RelativeLayout) findViewById(R.id.relativeLayout_project);\r\n\t\trelativeLayout_addr = (RelativeLayout) findViewById(R.id.relativeLayout_addr);\r\n\t\trelativeLayout_activity = (RelativeLayout) findViewById(R.id.relativeLayout_activity);\r\n\t\trelativeLayout_host = (RelativeLayout) findViewById(R.id.relativeLayout_host);\r\n\t\trelativeLayout_comment = (RelativeLayout) findViewById(R.id.relativeLayout_comment);\r\n\t\tll_point = (LinearLayout) findViewById(R.id.ll_point);\r\n\t\tstoyrName = (TextView) findViewById(R.id.stoyrName);\r\n\t\tstory_addr = (TextView) findViewById(R.id.story_addr);\r\n\t\t\r\n\t}", "private void bindView() {\n mToolbar = (Toolbar) findViewById(R.id.tb_main);\n mMainLayout = (CoordinatorLayout) findViewById(R.id.crdl_main);\n mProgressDialog = (AVLoadingIndicatorView) findViewById(R.id.avi_progress_dialog);\n mPersonsView = (RecyclerView) findViewById(R.id.rv_persons);\n mPersonsView.setLayoutManager(new LinearLayoutManager(context));\n }", "public void populateView() {\r\n populateHead();\r\n ArrayList arrayList = new ArrayList();\r\n arrayList.add(new AccDetailItem(\"Loan Amount\", this.account.totLoanAmt, MiscUtils.getColor(getResources(), this.account.totLoanAmt)));\r\n arrayList.add(new AccDetailItem(\"Interest Rate\", this.account.interestRate));\r\n arrayList.add(new AccDetailItem(\"Repayment Amount\", this.account.repaymentAmt, MiscUtils.getColor(getResources(), this.account.repaymentAmt)));\r\n arrayList.add(new AccDetailItem(\"Start Date\", this.account.startDt));\r\n arrayList.add(new AccDetailItem(\"End Date\", this.account.endDt));\r\n arrayList.add(new AccDetailItem(\"Status\", this.account.loanStatus));\r\n ArrayList arrayList2 = new ArrayList();\r\n arrayList2.add(new AccDetailItem(\"Outstanding Amount\", this.account.formattedOutstandingAmount, ContextCompat.getColor(getContext(), R.color.primary_red)));\r\n arrayList2.add(new AccDetailItem(\"Overdue Amount\", String.valueOf(this.account.overdueAmount), MiscUtils.getColor(getResources(), (double) this.account.overdueAmount)));\r\n arrayList2.add(new AccDetailItem(\"No. of Repayments Overdue\", this.account.overdueCount));\r\n this.list.setAdapter(new AccountDetailItemAdapter(getActivity(), arrayList));\r\n this.list2.setAdapter(new AccountDetailItemAdapter(getActivity(), arrayList2));\r\n MiscUtils.setListViewHeightBasedOnChildren(this.list);\r\n MiscUtils.setListViewHeightBasedOnChildren(this.list2);\r\n }", "@Override\n public void initViews() {\n adapter = new PaymentAdapter(context, MainActivity.os.getPayments());\n ((ListView)views.get(\"LIST_VIEW\")).setAdapter(adapter);\n (views.get(\"ADD_BUTTON\")).setOnClickListener(this);\n }", "private void initView() {\n \t textDate = (TextView) findViewById(R.id.nextInspectionDate);\n \t textTime = (TextView) findViewById(R.id.nextInspectionTime);\n \t textAddress = (TextView) findViewById(R.id.textAddressInspection);\n \t textPermitType = (TextView) findViewById(R.id.textPermitType);\n \t buttonScheduleInspection = (Button) findViewById(R.id.buttonScheduleInspection);\n \t buttonViewInspections = (Button) findViewById(R.id.buttonViewInspections);\n \t loadingProgress = (ProgressBar) findViewById(R.id.spinnerInpsection);\n \t LinearLayout landingNextInspectionId = (LinearLayout) findViewById(R.id.landingNextInspectionId);\n \t landingNextInspectionId.setOnClickListener(new View.OnClickListener(){\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif(projectsLoader.getNextInspection()!=null){\n\t\t\t\t\tString recordId = projectsLoader.getNextInspection().getRecordId_id();\n\t\t\t\t\tif(recordId==null)\n\t\t\t\t\t\treturn;\n\t\t\t\t\tActivityUtils.startScheduleInspectionActivity(LandingPageActivity.this, projectsLoader.getParentProject(recordId).getProjectId(), recordId, projectsLoader.getNextInspection(), AppConstants.CANCEL_INSPECTION_SOURCE_OTHER);\n\t\t\t\t}\n\t\t\t}\t\n\t\t});\n\t}", "private void initview() {\n\t\tMyOnClickLinstener clickLinstener = new MyOnClickLinstener();\n\t\tdeliverynote_query_back.setOnClickListener(clickLinstener);\n\t\tdate_layout.setOnClickListener(clickLinstener);\n\t\t\n\t\t//listview条目点击事件\n\t\tDeliveryQueryListView.setOnItemClickListener(new OnItemClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onItemClick(AdapterView<?> adapterView, View view, int position,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent(DeliveryNoteQueryActivity.this, DeliveryNoteDetailActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tDeliveryNote deliveryNote = (DeliveryNote) adapterView.getItemAtPosition(position);\n\t\t\t\tbundle.putString(\"currenttime\",currenttime);\n\t\t\t\tbundle.putSerializable(\"deliveryNote\", deliveryNote);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}", "@Override\n public void prepareView() {\n }", "private void bindViews() {\n\n xlv_postlist = (com.mrz.searchenginefortieba.view.XListView) findViewById(R.id.xlv_postlist);\n }", "@Override\n public void onClick(View v) {\n MainActivity.getMainActivity().loadDetailScreen(station);\n\n }", "@Override\n protected void onStart() {\n super.onStart();\n Log.i(TAG, \"onStart: 1st view\");\n }", "private void initViews() {\n /* Intent get data handler */\n fullScreenSnap = (ImageView) findViewById(R.id.fullScreenSnap);\n mToolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbar);\n getSupportActionBar().setTitle(AppConstants.imageName);\n getSupportActionBar().setDisplayShowHomeEnabled(true);\n mToolbar.setNavigationIcon(R.drawable.back_button);\n }", "private void prepareContactDetailsView(){\n contactDetails = new ContactsListItem();\n contactDetails.setName(getIntent().getStringExtra(\"name\"));\n contactDetails.setEmail(getIntent().getStringExtra(\"email\"));\n contactDetails.addNumber(getIntent().getStringExtra(\"phone\"));\n\n contactName.setText(contactDetails.getName());\n\n if (contactDetails.getNumbers() == null)\n phoneNumberLayout.setVisibility(View.GONE);\n else {\n phoneNumber.setText(contactDetails.getNumbers().get(0));\n callButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent intent = new Intent(Intent.ACTION_CALL);\n intent.setData(Uri.parse(\"tel:\" + contactDetails.getNumbers().get(0)));\n /**\n * Checking for CALL_PHONE permission and explicitly asking for it if not granted\n */\n if (ContextCompat.checkSelfPermission(ContactDetailsActivity.this, Manifest.permission.CALL_PHONE)\n != PackageManager.PERMISSION_GRANTED) {\n ActivityCompat.requestPermissions(ContactDetailsActivity.this, new String[]{Manifest.permission.CALL_PHONE}\n , PHONE_CALL_PERMISSION_REQUEST);\n } else\n startActivity(intent);\n }\n });\n }\n\n if (contactDetails.getEmail() == null)\n emailLayout.setVisibility(View.GONE);\n else\n email.setText(contactDetails.getEmail());\n }", "private void initView() {\n\t\tself_info.setOnClickListener(this);\r\n\t\twhich_org.setOnClickListener(this);\r\n\t\tmember_information.setOnClickListener(this);\r\n\t}", "private void bindViewsById(View view) {\n mViewPager = (ViewPager) view.findViewById(R.id.pager);\n mViewPager.setOffscreenPageLimit(1);\n mTabLayout = (TabLayout) view.findViewById(R.id.tab_layout);\n\n // mTvNoFavAvail = (TextView) view.findViewById(R.id.tv_no_fav_available);\n // mTvNoInternet = (TextView) view.findViewById(R.id.tv_no_internet_available);\n }", "@Override\n public void onStart()\n {\n super.onStart();\n getListView();\n }", "public void initView() {\n ((TextView) _$_findCachedViewById(R.id.tvCancelResv)).setOnClickListener(new MyResvDetailActivity$initView$1(this));\n getResvDetail();\n }", "private void initview() {\n\t\tmtvWorkerListTitle=(MyTitleView) findViewById(R.id.worker_list_title);\n\t\tzlvWorkerList=(ZListView) findViewById(R.id.worker_list_zlistview);\n\t\t\n\t\tmtvWorkerListTitle.setOnLeftClickListener(new OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tfinish();\n\t\t\t}\n\t\t});\n\t\t\n\t}", "@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 void onStart() {\n super.onStart();\n showVenuesOnListview();\n }", "Object getViewDetails();", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_details, container, false);\n ButterKnife.bind(this, rootView);\n Bundle b = getArguments();\n rate.setText(b.getString(\"user rating\"));\n release_data.setText(b.getString(\"release date\"));\n overview.setText(b.getString(\"overview\"));\n title.setText(b.getString(\"origin title\"));\n Picasso.with(getContext()).load(\"https://image.tmdb.org/t/p/w500\"+b.getString(\"movie poster\")).into(movie_poster);\n return rootView;\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n View mainView = inflater.inflate(R.layout.fragment_task_details, container, false);\n taskTitle = (TextView) mainView.findViewById(R.id.titleView);\n taskDetails = (TextView) mainView.findViewById(R.id.detailView);\n\n\n Bundle bundle = getArguments();\n tasks = bundle.getParcelable(\"DETAIL\");\n taskTitle.setText(tasks.title);\n taskDetails.setText(tasks.description);\n return mainView;\n }", "public void setupView() {\n PagerAdapter mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());\n viewPager.setAdapter(mPagerAdapter);\n viewPager.setCurrentItem(0);\n\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.act_selfinfo_detail);\r\n\t\timageLoader = ImageLoader.getIncetence(this);\r\n\t\tinitView();\r\n\t\tloadData();\r\n\t}", "private void prepareView(){\n mAvatar = (ImageButton)findViewById(R.id.btnAvatar);\n mAvatar.setOnClickListener(this);\n\n mName = (TextView)findViewById(R.id.tvName);\n mEmail = (TextView)findViewById(R.id.tvEmail);\n mWelcome = (TextView)findViewById(R.id.tvSelectionTitle);\n\n mDesigner = (ImageButton)findViewById(R.id.btnDesigner);\n mDesigner.setOnClickListener(this);\n\n mDeveloper = (ImageButton)findViewById(R.id.btnDeveloper);\n mDeveloper.setOnClickListener(this);\n }", "private void setViews() {\n lv.setAdapter(adapter);\n\n dialog2 = new MiddleDialog2(INSTANCE, getResources().getString(R.string.title), getResources().getString(R.string.value), new MiddleDialog2.onBottonListener() {\n @Override\n public void onOk() {\n\n finish();\n }\n },R.style.registDialog);\n }", "@Override\n public void onResume() {\n super.onResume();\n initViewData();\n initdata();\n }", "private void initView() {\n\t\tbtnMapMode = contentView.findViewById(R.id.venue_iv_map);\n\t\tbtnMapMode.setOnClickListener(this);\n\t\tbtnSearch = contentView.findViewById(R.id.venue_iv_search);\n\t\tbtnSearch.setOnClickListener(this);\n\t\temptyView = contentView.findViewById(R.id.event_ll_empty);\n\t\temptyView.findViewById(R.id.event_empty_other_area).setOnClickListener(\n\t\t\t\tthis);\n\t\temptyView.findViewById(R.id.event_empty_add_event).setOnClickListener(\n\t\t\t\tthis);\n\n\t\tglHotImage = (ViewPager) vHeader.findViewById(R.id.header_viewpager);\n\t\tllIndic = (LinearLayout) vHeader.findViewById(R.id.header_ll_indic);\n\t\tbtnPlace = (Button) vHeader.findViewById(R.id.header_btn_place);\n\t\tbtnVenue = (Button) vHeader.findViewById(R.id.header_btn_venue);\n//\t\tviewGroup = (ViewGroup) vHeader.findViewById(R.id.viewGroup);\n\t\tbtnPlace.setOnClickListener(this);\n\t\tbtnVenue.setOnClickListener(this);\n\n\t\tmPullRefreshListView = (PullToRefreshListView) contentView\n\t\t\t\t.findViewById(R.id.venue_lv);\n\t\tmPullRefreshListView.setMode(Mode.BOTH);\n\t\tmListView = mPullRefreshListView.getRefreshableView();\n\t\tmListView.setHeaderDividersEnabled(false);\n\t\tmPullRefreshListView.getRefreshableView().setSelector(\n\t\t\t\tnew ColorDrawable(Color.TRANSPARENT));\n\t\t// android.R.color.transparent\n\t\t// mListView.setEmptyView(emptyView);\n\t\tmPullRefreshListView.setOnItemClickListener(this);\n\t\tmListView.addHeaderView(vHeader, null, true);\n\t\tmListView.setScrollBarStyle(View.SCROLLBARS_OUTSIDE_OVERLAY);\n\t\tmAdapter = new VenueListAdapter(getActivity(), mList);\n\t\tmPullRefreshListView.setAdapter(mAdapter);\n\t\tmPullRefreshListView.setOnRefreshListener(this);\n\t\tglHotImage.setOnPageChangeListener(new HeaderChangeListener());\n\t\tif (null != pagerAdapter) {\n\t\t\tpagerAdapter.notifyDataSetChanged();\n\t\t}\n\t}", "@Override\r\n protected void setupViews(Bundle bundle) {\n initPersonalInfo();\r\n }", "public void initView()\n {\n try {\n MainActivity hs = (MainActivity) getActivity();\n BookingsHistoryFragment mof = (BookingsHistoryFragment) hs.fragment;\n bookingsHistoryList = mof.unAssignedBookings;\n bookingDetailsList = mof.unAssignedBookingDetails;\n size = mof.unassignedBookingsList.size();\n\n unassignedBookingsAdapter = new UnassignedBookingsAdapter(getActivity(), bookingsHistoryList, bookingDetailsList, view);\n lv_history_bookings.setAdapter(unassignedBookingsAdapter);\n lv_history_bookings.setOnItemClickListener(unassignedBookingsAdapter);\n\n hideView(size);\n tv_history_run_now.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n ((MainActivity) getActivity()).displayView(1);\n }\n });\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n }", "protected void setupDetails(View rootView) {\n Locale locale = getActivity().getResources().getConfiguration().locale;\n TextView date = (TextView) rootView.findViewById(R.id.date);\n TextView time = (TextView) rootView.findViewById(R.id.time);\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"MMMM dd, yyyy\", locale);\n SimpleDateFormat timeFormat = new SimpleDateFormat(\"EEEE h:mm a\", locale);\n date.setText(dateFormat.format(mOriginalLabel.getTimeStamp()));\n time.setText(timeFormat.format(mOriginalLabel.getTimeStamp()));\n }", "private void viewInit() {\n }", "@Override\n protected void onResume() {\n super.onResume();\n Log.i(TAG, \"onResume: 1st view\");\n }", "private void prepareViews() {\n mTextViewHeader = (TextView) mHeaderView.findViewById(R.id.tv_text_header_enhanced_listview);\n mTextViewFooter = (TextView) mFooterView.findViewById(R.id.tv_text_footer_enhanced_listview);\n mTextViewTime = (TextView) mHeaderView.findViewById(R.id.tv_time_update_header);\n\n mArrowHeader = mHeaderView.findViewById(R.id.arrow_header);\n mArrowFooter = mFooterView.findViewById(R.id.arrow_footer);\n\n mPbHeader = mHeaderView.findViewById(R.id.pb_header_enhanced_listview);\n mPbFooter = mFooterView.findViewById(R.id.pb_footer_enhanced_listview);\n\n }", "private void initialiseViews() {\n setDefaultKeyMode(DEFAULT_KEYS_SEARCH_LOCAL);\n bindings = DataBindingUtil.setContentView(this, R.layout.activity_catalog_product);\n bindings.activityCatalogProductPb.setVisibility(View.GONE);\n\n bindings.activityCatalogProductFab.setOnClickListener(v -> {\n\n Intent addProductIntent = new Intent(ProductCatalogMain.this,\n ProductEditor.class);\n startActivity(addProductIntent);\n\n overridePendingTransition(R.anim.slide_in_right, R.anim.slide_out_left);\n\n });\n\n setSupportActionBar(bindings.activityCatalogProductToolbar);\n getSupportActionBar().setDisplayHomeAsUpEnabled(true);\n\n tabPageAdapter = new ProductCatalogFragmentPageAdapter(getSupportFragmentManager());\n tabViewPager = bindings.activityCatalogProductVp;\n tabViewPager.setAdapter(tabPageAdapter);\n\n if (bindings.activityCatalogProductVp != null) {\n setupViewPager(bindings.activityCatalogProductVp);\n }\n\n // Sets up the Tab's and their titles.\n bindings.activityCatalogProductTl.setupWithViewPager(bindings.activityCatalogProductVp);\n\n }", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}", "protected void onStart(){\n super.onStart();\n //String test = \"testing name\";\n //nameText.setText(test);\n Log.d(\"myTag\",\"view detail on start\");\n Intent intent = getIntent();\n Bundle bundle = intent.getExtras();\n\n if (bundle != null){\n\n\n String name_string = bundle.getString(\"current_name\");\n String date_string = bundle.getString(\"current_date\");\n String comment_string = bundle.getString(\"current_comment\");\n nameDisplay.setText(name_string);\n\n\n if (date_string != null){\n dateDisplay.setText(date_string);\n }\n\n if (!comment_string.isEmpty()) {\n Log.d(\"mytag\",\"comment set :\"+comment_string);\n commentDisplay.setText(comment_string);\n }\n\n if (Double.parseDouble(bundle.getString(\"current_neck\")) > 0) {\n neckDisplay.setText(bundle.getString(\"current_neck\"));\n }\n\n if (Double.parseDouble(bundle.getString(\"current_bust\")) > 0) {\n bustDisplay.setText(bundle.getString(\"current_bust\"));\n }\n\n if (Double.parseDouble(bundle.getString(\"current_chest\")) > 0) {\n chestDisplay.setText(bundle.getString(\"current_chest\"));\n }\n\n if (Double.parseDouble(bundle.getString(\"current_waist\")) > 0) {\n waistDisplay.setText(bundle.getString(\"current_waist\"));\n }\n\n if (Double.parseDouble(bundle.getString(\"current_hip\")) > 0) {\n hipDisplay.setText(bundle.getString(\"current_hip\"));\n }\n\n if (Double.parseDouble(bundle.getString(\"current_inseam\")) > 0) {\n inseamDisplay.setText(bundle.getString(\"current_inseam\"));\n }\n\n }\n\n }", "@Override\n\tprotected void onCreate(Bundle arg0) {\n\t\tsuper.onCreate(arg0);\n\t\tsetContentView(R.layout.commodity_infos_activity);\n\t\tprodInfo = (ProdInfo) getIntent().getSerializableExtra(\"prodInfo\");\n\t\t\n\t\tinitview();\n\t\tinitdata();\n\t}", "public void bindView(android.view.View r16, android.content.Context r17, android.database.Cursor r18) {\n /*\n r15 = this;\n java.lang.Object r2 = r16.getTag()\n r11 = r2\n com.pccw.mobile.sip.AddCallCallLogFragment$CallLogItemViews r11 = (com.pccw.mobile.sip.AddCallCallLogFragment.CallLogItemViews) r11\n r2 = 1\n r0 = r18\n java.lang.String r2 = r0.getString(r2)\n if (r2 == 0) goto L_0x00d3\n r2 = 1\n r0 = r18\n java.lang.String r3 = r0.getString(r2)\n L_0x0017:\n r9 = 0\n r2 = 5\n r0 = r18\n java.lang.String r5 = r0.getString(r2)\n r2 = 6\n r0 = r18\n int r6 = r0.getInt(r2)\n r2 = 7\n r0 = r18\n java.lang.String r7 = r0.getString(r2)\n java.util.HashMap<java.lang.String, com.pccw.mobile.sip.AddCallCallLogFragment$ContactInfo> r2 = r15.contactHashMap\n java.lang.Object r2 = r2.get(r3)\n r8 = r2\n com.pccw.mobile.sip.AddCallCallLogFragment$ContactInfo r8 = (com.pccw.mobile.sip.AddCallCallLogFragment.ContactInfo) r8\n if (r8 != 0) goto L_0x00d7\n com.pccw.mobile.sip.AddCallCallLogFragment$ContactInfo r8 = com.pccw.mobile.sip.AddCallCallLogFragment.ContactInfo.EMPTY\n java.util.HashMap<java.lang.String, com.pccw.mobile.sip.AddCallCallLogFragment$ContactInfo> r2 = r15.contactHashMap\n r2.put(r3, r8)\n int r4 = r18.getPosition()\n r2 = r15\n r2.enqueueRequest(r3, r4, r5, r6, r7)\n L_0x0047:\n r2 = r9\n L_0x0048:\n java.lang.String r9 = r8.name\n int r4 = r8.type\n java.lang.String r10 = r8.label\n long r12 = r8.personId\n boolean r14 = android.text.TextUtils.isEmpty(r9)\n if (r14 == 0) goto L_0x0227\n boolean r14 = android.text.TextUtils.isEmpty(r5)\n if (r14 != 0) goto L_0x0227\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n java.lang.String r2 = r2.formatPhoneNumber(r3)\n L_0x0062:\n java.lang.String r4 = \"-2\"\n boolean r4 = r3.equals(r4)\n if (r4 == 0) goto L_0x0109\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n r4 = 2131165670(0x7f0701e6, float:1.7945564E38)\n java.lang.String r2 = r2.getString(r4)\n android.widget.TextView r4 = r11.line1View\n r4.setText(r2)\n android.widget.TextView r2 = r11.labelView\n r4 = 8\n r2.setVisibility(r4)\n android.widget.TextView r2 = r11.numberView\n r4 = 0\n r2.setVisibility(r4)\n android.widget.TextView r2 = r11.numberView\n java.lang.String r4 = \"\"\n r2.setText(r4)\n android.widget.ImageView r2 = r11.photoView\n r4 = 2130837710(0x7f0200ce, float:1.7280382E38)\n r2.setImageResource(r4)\n L_0x0094:\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n int r2 = r2.currentQuery\n switch(r2) {\n case 0: goto L_0x01ed;\n default: goto L_0x009d;\n }\n L_0x009d:\n r2 = 2\n r0 = r18\n long r4 = r0.getLong(r2)\n long r6 = java.lang.System.currentTimeMillis()\n r8 = 60000(0xea60, double:2.9644E-319)\n r10 = 262144(0x40000, float:3.67342E-40)\n r3 = r17\n java.lang.CharSequence r2 = com.pccw.mobile.sip.util.RelativeDateUtils.getRelativeTimeSpanString(r3, r4, r6, r8, r10)\n android.widget.TextView r3 = r11.dateView\n r3.setText(r2)\n r2 = 4\n r0 = r18\n int r2 = r0.getInt(r2)\n switch(r2) {\n case 1: goto L_0x0213;\n case 2: goto L_0x0209;\n case 3: goto L_0x01ff;\n case 21: goto L_0x021d;\n default: goto L_0x00c2;\n }\n L_0x00c2:\n android.view.ViewTreeObserver$OnPreDrawListener r2 = r15.mPreDrawListener\n if (r2 != 0) goto L_0x00d2\n r2 = 1\n r15.mFirst = r2\n r15.mPreDrawListener = r15\n android.view.ViewTreeObserver r2 = r16.getViewTreeObserver()\n r2.addOnPreDrawListener(r15)\n L_0x00d2:\n return\n L_0x00d3:\n java.lang.String r3 = \"-1\"\n goto L_0x0017\n L_0x00d7:\n com.pccw.mobile.sip.AddCallCallLogFragment$ContactInfo r2 = com.pccw.mobile.sip.AddCallCallLogFragment.ContactInfo.EMPTY\n if (r8 == r2) goto L_0x0047\n java.lang.String r2 = r8.name\n boolean r2 = android.text.TextUtils.equals(r2, r5)\n if (r2 == 0) goto L_0x00ef\n int r2 = r8.type\n if (r2 != r6) goto L_0x00ef\n java.lang.String r2 = r8.label\n boolean r2 = android.text.TextUtils.equals(r2, r7)\n if (r2 != 0) goto L_0x00f7\n L_0x00ef:\n int r4 = r18.getPosition()\n r2 = r15\n r2.enqueueRequest(r3, r4, r5, r6, r7)\n L_0x00f7:\n java.lang.String r2 = r8.formattedNumber\n if (r2 != 0) goto L_0x0105\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n java.lang.String r4 = r8.number\n java.lang.String r2 = r2.formatPhoneNumber(r4)\n r8.formattedNumber = r2\n L_0x0105:\n java.lang.String r2 = r8.formattedNumber\n goto L_0x0048\n L_0x0109:\n java.lang.String r4 = \"-1\"\n boolean r4 = r3.equals(r4)\n if (r4 == 0) goto L_0x013d\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n r4 = 2131165739(0x7f07022b, float:1.7945704E38)\n java.lang.String r2 = r2.getString(r4)\n android.widget.TextView r4 = r11.line1View\n r4.setText(r2)\n android.widget.TextView r2 = r11.labelView\n r4 = 8\n r2.setVisibility(r4)\n android.widget.TextView r2 = r11.numberView\n r4 = 0\n r2.setVisibility(r4)\n android.widget.TextView r2 = r11.numberView\n java.lang.String r4 = \"\"\n r2.setText(r4)\n android.widget.ImageView r2 = r11.photoView\n r4 = 2130837710(0x7f0200ce, float:1.7280382E38)\n r2.setImageResource(r4)\n goto L_0x0094\n L_0x013d:\n boolean r4 = android.text.TextUtils.isEmpty(r5)\n if (r4 != 0) goto L_0x01a0\n android.widget.TextView r4 = r11.line1View\n r4.setText(r5)\n android.widget.TextView r4 = r11.labelView\n r5 = 0\n r4.setVisibility(r5)\n java.lang.String r4 = r8.thumbnailUri\n java.lang.String r5 = java.lang.Long.toString(r12)\n java.lang.String r8 = com.pccw.sms.service.PhoneListService.normalizeContactNumber(r3)\n android.graphics.Bitmap r4 = r15.getUserContactPhoto(r4, r5, r8)\n if (r4 == 0) goto L_0x0183\n android.widget.ImageView r5 = r11.photoView\n r5.setImageBitmap(r4)\n L_0x0163:\n if (r6 != 0) goto L_0x018c\n L_0x0165:\n android.widget.TextView r4 = r11.numberView\n r5 = 0\n r4.setVisibility(r5)\n android.widget.TextView r4 = r11.numberView\n r4.setText(r2)\n boolean r2 = android.text.TextUtils.isEmpty(r7)\n if (r2 != 0) goto L_0x0197\n android.widget.TextView r2 = r11.labelView\n r2.setText(r7)\n android.widget.TextView r2 = r11.labelView\n r4 = 0\n r2.setVisibility(r4)\n goto L_0x0094\n L_0x0183:\n android.widget.ImageView r4 = r11.photoView\n r5 = 2130837710(0x7f0200ce, float:1.7280382E38)\n r4.setImageResource(r5)\n goto L_0x0163\n L_0x018c:\n com.pccw.mobile.sip.AddCallCallLogFragment r4 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n int r5 = android.provider.ContactsContract.CommonDataKinds.Phone.getTypeLabelResource(r6)\n java.lang.String r7 = r4.getString(r5)\n goto L_0x0165\n L_0x0197:\n android.widget.TextView r2 = r11.labelView\n r4 = 8\n r2.setVisibility(r4)\n goto L_0x0094\n L_0x01a0:\n java.lang.String r2 = \"-1\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x01d4\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n r4 = 2131165739(0x7f07022b, float:1.7945704E38)\n java.lang.String r2 = r2.getString(r4)\n L_0x01b1:\n android.widget.TextView r4 = r11.line1View\n r4.setText(r2)\n android.widget.TextView r2 = r11.labelView\n r4 = 8\n r2.setVisibility(r4)\n android.widget.TextView r2 = r11.numberView\n r4 = 0\n r2.setVisibility(r4)\n android.widget.TextView r2 = r11.numberView\n java.lang.String r4 = \"\"\n r2.setText(r4)\n android.widget.ImageView r2 = r11.photoView\n r4 = 2130837710(0x7f0200ce, float:1.7280382E38)\n r2.setImageResource(r4)\n goto L_0x0094\n L_0x01d4:\n java.lang.String r2 = \"-2\"\n boolean r2 = r3.equals(r2)\n if (r2 == 0) goto L_0x01e6\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n r4 = 2131165670(0x7f0701e6, float:1.7945564E38)\n java.lang.String r2 = r2.getString(r4)\n goto L_0x01b1\n L_0x01e6:\n com.pccw.mobile.sip.AddCallCallLogFragment r2 = com.pccw.mobile.sip.AddCallCallLogFragment.this\n java.lang.String r2 = r2.formatPhoneNumber(r3)\n goto L_0x01b1\n L_0x01ed:\n android.view.View r2 = r11.unreadMsgLayout\n r4 = 4\n r2.setVisibility(r4)\n com.pccw.mobile.sip.AddCallCallLogFragment$CallLogAdapter$2 r2 = new com.pccw.mobile.sip.AddCallCallLogFragment$CallLogAdapter$2\n r2.<init>(r3)\n r0 = r16\n r0.setOnClickListener(r2)\n goto L_0x009d\n L_0x01ff:\n android.widget.ImageView r2 = r11.calltypeimageView\n r3 = 2130838591(0x7f02043f, float:1.7282169E38)\n r2.setImageResource(r3)\n goto L_0x00c2\n L_0x0209:\n android.widget.ImageView r2 = r11.calltypeimageView\n r3 = 2130838600(0x7f020448, float:1.7282187E38)\n r2.setImageResource(r3)\n goto L_0x00c2\n L_0x0213:\n android.widget.ImageView r2 = r11.calltypeimageView\n r3 = 2130838580(0x7f020434, float:1.7282146E38)\n r2.setImageResource(r3)\n goto L_0x00c2\n L_0x021d:\n android.widget.ImageView r2 = r11.calltypeimageView\n r3 = 2130838590(0x7f02043e, float:1.7282167E38)\n r2.setImageResource(r3)\n goto L_0x00c2\n L_0x0227:\n r6 = r4\n r5 = r9\n r7 = r10\n goto L_0x0062\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.pccw.mobile.sip.AddCallCallLogFragment.CallLogAdapter.bindView(android.view.View, android.content.Context, android.database.Cursor):void\");\n }", "@Override\n protected void iniView()\n {\n txtHead = (TextView) findViewById(R.id.txtHead);\n imgBack = (ImageView) findViewById(R.id.img_left);\n\n txtHead.setText(\"回复列表\");\n\n TopicID = this.getIntent().getExtras().getString(\"TopicID\").toString();\n LeftID = this.getIntent().getExtras().getString(\"LeftID\").toString();\n listview = (ListView) findViewById(R.id.listview_postlist);\n TopicType = this.getIntent().getExtras().getString(\"TopicType\").toString();\n }", "@Override\r\n\tprotected void initViews() {\n\t\t\r\n\t}", "@Override protected void initViews() {\n\t\tsetFragments(F_PopularFragment.newInstance(T_HomeActivity.this), F_TimelineFragment.newInstance(T_HomeActivity.this));\n\t}", "@Override\n\tpublic void initView() {\n\t\tmylis_show.setTitleText(\"我的物流\");\n\t\tlistView = mylis_listview.getRefreshableView();\n\t\t\n\t}", "private void initView() {\n mBinding.swipeRefresh.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {\n @Override\n public void onRefresh() {\n\n mBinding.swipeRefresh.setRefreshing(false);\n }\n });\n\n\n setUpBookingRecycler();\n bindStaticData();\n setUpBookingAdapter();\n }", "private void inIt() {\n\t\t\t\t\t\n\t\t\t\t\tLV_MoView = (ListView)findViewById(R.id.LV_Movie);\n\t\t\t\t\tTV_All = (TextView)findViewById(R.id.TV_All);\n\t\t\t\t\tTV_Collect = (TextView)findViewById(R.id.TV_Collect);\n\t\t\t\t\tTV_History = (TextView)findViewById(R.id.TV_History);\t\n\t\t\t\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tLogger.d(TAG, \"onCreate.....\");\n\t\tsetContentView(R.layout.mv_video_details);\n\t\tcontext = this;\n\t\tdao = new VodDao(this);\n\t\tinitData();\n\t\tinitView();\n\n\t}", "@Override\r\n\tpublic void setupView() {\n\t\tbitmapUtils.configDefaultBitmapConfig(Config.RGB_565);//设置图片压缩类型\r\n\t\tbitmapUtils.configDefaultLoadingImage(R.drawable.test_default_wait_img);// 默认背景图片\r\n\t\tbitmapUtils.configDefaultLoadFailedImage(R.drawable.test_default_wait_img);// 加载失败图片\r\n\t\t\r\n\t\t// 获取数据\r\n\t\tintent = getIntent();\r\n\t\tBlogsInfoEntity entity = (BlogsInfoEntity) intent.getSerializableExtra(\"entity\");\r\n\t\tlist_images = entity.getImg_attachment();\r\n\t\tint position = intent.getIntExtra(\"position\", 0);\r\n\t\tleft_btn = (ImageView) findViewById(R.id.left_btn);\r\n\t\tleft_btn.setOnClickListener(l);\r\n\t\tcenter_content = (TextView) findViewById(R.id.center_content);\r\n\t\tcenter_content.setText(String.valueOf(position + 1) + \"/\"+ String.valueOf(list_images.size()));\r\n\t\tmViewPager = (CustomViewPager) findViewById(R.id.pager);\r\n\t\tmViewPager.setScanScroll(true);\r\n\t\tSamplePagerAdapter adapter = new SamplePagerAdapter();// 声明适配器\r\n\t\tmViewPager.setAdapter(adapter);// 绑定\r\n\t\tmViewPager.setCurrentItem(position);\r\n\t\tmViewPager.setOnPageChangeListener(new OnPageChangeListener() {\r\n\t\t\t// 页面更变\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageSelected(int position) {\r\n\t\t\t\tcenter_content.setText(String.valueOf(position + 1) + \"/\"+ String.valueOf(list_images.size()));\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int state) {\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 onPageScrolled(int position, float positionOffset,\r\n\t\t\t\t\tint positionOffsetPixels) {\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.car_details);\n\n\t\tsetupWidgets();\n\t}", "@Override\n public View initView() {\n View view = View.inflate(mContext, R.layout.tab_detail_pager, null);\n listview = (RefreshListView ) view.findViewById(R.id.listview);\n View topnewsView = View.inflate(mContext, R.layout.topnews, null);\n// 使用ButterKnife绑定XML文件\n //ButterKnife.bind(this, view);\n ButterKnife.bind(this, topnewsView);\n// 监听ViewPage页面的变化动态改变红点和标题\n viewpage.addOnPageChangeListener(new MyOnPageChangeListener());\n// 把顶部新闻模块以头的方式加载到ListView中\n// listview.addHeaderView(topnewsView);\n// ListView自定义方法\n listview.addTopNews(topnewsView);\n// 监听控件刷新\n listview.setOnRefreshListener(new MysetOnRefreshListener());\n// 设置单击监听\n listview.setOnItemClickListener(new MyOnItemClickListener());\n return view;\n }", "@Override\n public void onStart() {\n super.onStart();\n getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> av, View v, int pos,\n long id) {\n\n // TODO Auto-generated method stub\n Toast.makeText(getActivity(), data.get(pos).get(\"Desc\"), Toast.LENGTH_SHORT).show();\n Intent i = new Intent(getActivity(), DetailActivity.class);\n i.putExtra(\"Play\",data.get(pos).get(\"Desc\"));\n i.putExtra(\"Detail\",data.get(pos).get(\"Player\"));\n i.putExtra(\"Category\",\"Diversity\");\n i.putExtra(\"Img\",data.get(pos).get(\"Imagemain\"));\n startActivity(i);\n }\n });\n }", "private void initViews() {\n\t\t// TODO Auto-generated method stub\n\t\t// venuePager = (ViewPager)findViewById(R.id.pager);\n\n\t\tmyGallery = (LinearLayout) findViewById(R.id.horizontalScrollItems);\n\n\t\tvenueImageLarge = (ImageView) findViewById(R.id.imageVenueLarge);\n\n\t\tinfoImageView = (ImageView) findViewById(R.id.imageInfo);\n\n\t\tcloseBtn = (ImageView) findViewById(R.id.imageclose);\n\n\t\tvenueCapacity = (TextView) findViewById(R.id.venueCapacity);\n\n\t\tvenueDes = (TextView) findViewById(R.id.venueDes);\n\n\t\tvenueName = (TextView) findViewById(R.id.venueName);\n\n\t\tvenueRelative = (RelativeLayout) findViewById(R.id.venue_relative);\n\n\t\tviewAnimator = (ViewAnimator) this.findViewById(R.id.viewFlipper_venue);\n\n\t\tvenueFullname = (TextView) findViewById(R.id.venueFullnameValue);\n\n\t\tvenueCity = (TextView) findViewById(R.id.venueCityValue);\n\n\t\tvenueOwner = (TextView) findViewById(R.id.venueOwnerValue);\n\n\t\tvenueOpened = (TextView) findViewById(R.id.venueOpenedValue);\n\n\t\tvenueSurface = (TextView) findViewById(R.id.venueSurfaceValue);\n\n\t\tvenueWebsite = (TextView) findViewById(R.id.venueWebsiteValue);\n\n\n\t}", "private void bindViews() {\n txt_home = (TextView) findViewById(R.id.txt_home);\n txt_progress = (TextView) findViewById(R.id.txt_progress);\n txt_community = (TextView) findViewById(R.id.txt_community);\n txt_profile = (TextView) findViewById(R.id.txt_profile);\n\n txt_home.setOnClickListener(this);\n txt_progress.setOnClickListener(this);\n txt_community.setOnClickListener(this);\n txt_profile.setOnClickListener(this);\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\n\t\tView rootView = inflater.inflate(R.layout.fragment_exploredetails,\n\t\t\t\tcontainer, false);\n\n\t\tWindowManager wm = (WindowManager) getActivity().getSystemService(\n\t\t\t\tContext.WINDOW_SERVICE);\n\t\tDisplay display = wm.getDefaultDisplay();\n\t\tPoint size = new Point();\n\t\tdisplay.getSize(size);\n\t\tscreenWidth = size.x;\n\t\tscreenHeight = size.y / 2;\n\n\t\tplace_title = (TextView) rootView.findViewById(R.id.place_title);\n\t\ttext_walk = (TextView) rootView.findViewById(R.id.text_walk);\n\t\ttext_duration = (TextView) rootView.findViewById(R.id.text_duration);\n\t\ttext_accessible = (TextView) rootView.findViewById(R.id.text_);\n\t\ttxt_eventdetails = (TextView) rootView\n\t\t\t\t.findViewById(R.id.txt_eventdetails);\n\t\timg_imagedetls = (ImageView) rootView.findViewById(R.id.img_imagedetls);\n\t\ttext_time = (TextView) rootView.findViewById(R.id.text_time);\n\t\tdynamic_innerlayout = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.dynamic_innerlayout);\n\t\ttvStartTheTrail = (TextView) rootView\n\t\t\t\t.findViewById(R.id.tvStartTheTrail);\n\t\trlBannerImage = (RelativeLayout) rootView\n\t\t\t\t.findViewById(R.id.rlBannerImage);\n\t\tpageTitle = (String) getActivity().getIntent().getExtras()\n\t\t\t\t.get(\"PAGETITLE\");\n\n\t\tif (pageTitle.equals(\"Facilities\")) {\n\t\t\ttext_time.setVisibility(View.VISIBLE);\n\t\t\tdynamic_innerlayout.setVisibility(View.GONE);\n\t\t} else {\n\t\t\ttext_time.setVisibility(View.GONE);\n\t\t\tdynamic_innerlayout.setVisibility(View.VISIBLE);\n\t\t}\n\n\t\tif (LLDCApplication.selectedModel.getModelType() == LLDCApplication.TRAILS) {\n\t\t\t/*\n\t\t\t * if (LLDCApplication.isInsideThePark || LLDCApplication.isDebug) {\n\t\t\t * tvStartTheTrail.setVisibility(View.VISIBLE); } else {\n\t\t\t * tvStartTheTrail.setVisibility(View.GONE); }\n\t\t\t */\n\t\t\ttvStartTheTrail.setVisibility(View.VISIBLE);\n\t\t\tmExploreDetailsFragHandler.sendEmptyMessageDelayed(1101, 300000);\n\t\t} else {\n\t\t\ttvStartTheTrail.setVisibility(View.GONE);\n\t\t}\n\n\t\timg_imagedetls.setOnClickListener(new OnClickListener() {\n\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\tif (pageTitle.equals(\"Trails\")) {\n\t\t\t\t\tif (!LLDCApplication.isInsideThePark\n\t\t\t\t\t\t\t&& !LLDCApplication.isDebug) {\n\t\t\t\t\t\tLLDCApplication\n\t\t\t\t\t\t\t\t.onShowToastMesssage(\n\t\t\t\t\t\t\t\t\t\tgetActivity(),\n\t\t\t\t\t\t\t\t\t\t\"Navigation will not function as it appears you are outside of the park or your GPS is not active.\");\n\t\t\t\t\t} else if (LLDCApplication.selectedModel.getWyapoitnList()\n\t\t\t\t\t\t\t.size() > 0) {\n\t\t\t\t\t\tIntent intent = new Intent(getActivity(),\n\t\t\t\t\t\t\t\tMapNavigationActivity.class);\n\t\t\t\t\t\tintent.putExtra(\"PAGETITLE\", \"Trails\");\n\t\t\t\t\t\tgetActivity().startActivity(intent);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLLDCApplication.onShowToastMesssage(getActivity(),\n\t\t\t\t\t\t\t\t\"Trail data is not present.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tonLoadData();\n\t\treturn rootView;\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void initViews() {\n\t\t\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\tinsertView();\n\t}", "@Override\n\tpublic void InitView() {\n\t\t\n\t}", "private void initView() {\n userAction = UserAction.getInstance();\n// person_list.setPullLoadEnable(false);// 初始化时候 loadmore 不可见\n// person_list.setPullRefreshEnable(false);\n//\n// adaper = new person_orderAdapter(publishedData, mContext);\n// person_list.setAdapter(adaper);\n person_phone = (TextView) findViewById(R.id.person_phone);\n person_phone.setText(UserData.getSettingString(mContext,\n UserData.user_phone));\n person_gerenxinxi = (LinearLayout) findViewById(R.id.person_gerenxinxi);\n person_gerenxinxi.setOnClickListener(this);\n person_wodedingdan = (LinearLayout) findViewById(R.id.person_wodedingdan);\n person_wodedingdan.setOnClickListener(this);\n person_youhuiquan = (LinearLayout) findViewById(R.id.person_youhuiquan);\n person_youhuiquan.setOnClickListener(this);\n person_xiaoxi = (LinearLayout) findViewById(R.id.person_xiaoxi);\n person_xiaoxi.setOnClickListener(this);\n person_jiamubiao = (LinearLayout) findViewById(R.id.person_jiamubiao);\n person_jiamubiao.setOnClickListener(this);\n person_guanyuwomen = (LinearLayout) findViewById(R.id.person_guanyuwomen);\n person_guanyuwomen.setOnClickListener(this);\n person_fenxiang = (LinearLayout) findViewById(R.id.person_fenxiang);\n person_fenxiang.setOnClickListener(this);\n person_shezhi = (LinearLayout) findViewById(R.id.person_shezhi);\n person_shezhi.setOnClickListener(this);\n person_signout = (TextView) findViewById(R.id.person_signout);\n person_signout.setOnClickListener(this);\n\n }", "@Override\n public void onDetailsClick(int position) {\n Intent intent = new Intent(getActivity(), MovieViewActivity.class);\n intent.putExtra(\"movieName\", memoirs.get(position).getMovieName());\n intent.putExtra(\"userId\", userId);\n intent.putExtra(\"from\", \"memoir\");\n startActivity(intent);\n }", "@Override\n public void onViewCreate() {\n }", "private void initializeView() {\n mBinding = DataBindingUtil.setContentView(this, R.layout.activity_product_details);\n DisplayMetrics displayMetrics = new DisplayMetrics();\n getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);\n mBinding.vPPdpProductImages.getLayoutParams().height = displayMetrics.widthPixels;\n mBinding.vPPdpProductImages.requestFocus();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tsetContentView(R.layout.detail);\r\n\r\n\t\t// Use provided data to figure out which widget was selected\r\n\t\tfinal Intent intent = getIntent();\r\n\t\tmData = intent.getData();\r\n\t\tif (mData == null) {\r\n\t\t\tfinish();\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\tLog.d(TAG, \"Showing details for data=\" + mData);\r\n\t\t}\r\n\r\n\t\t// Pull widget title and desired units\r\n\t\tDataWidget dw = LoadDataNet.getDataWidget(this, mData, false);\r\n\r\n\t\t\r\n\t\tif (dw != null) {\r\n\t\t\tImageView forecastImage = (ImageView) findViewById(R.id.dForecastImage);\r\n\t\t\tTextView cityText = (TextView) findViewById(R.id.dCityText);\r\n\t\t\tTextView conditionText = (TextView) findViewById(R.id.dConditionText);\r\n\t\t\tTextView humidityText = (TextView) findViewById(R.id.dHumidityText);\r\n\t\t\tTextView windText = (TextView) findViewById(R.id.dWindText);\r\n\t\t\tTextView tempcText = (TextView) findViewById(R.id.dTempCText);\r\n\r\n\t\t\tforecastImage.setImageResource(WeatherUtil.getForecastImage(\r\n\t\t\t\t\tdw.getIcon(), WeatherUtil.isDaytime()));\r\n\t\t\tcityText.setText(dw.getCity());\r\n\t\t\tconditionText.setText(dw.getCondition());\r\n\t\t\thumidityText.setText(dw.getHumidity());\r\n\t\t\twindText.setText(dw.getWindcondition());\r\n\t\t\ttempcText.setText(dw.getTempc() + \"íŠ\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tupdateAnimtation(dw.getIcon());\r\n\t\t}\r\n\r\n\t\t// Query for any matching forecast data and create adapter\r\n\t\tUri forecastUri = Uri.withAppendedPath(mData,\r\n\t\t\t\tWeatherWidgets.FORECAST_END);\r\n\t\tCursor forecastCursor = managedQuery(forecastUri,\r\n\t\t\t\tDetailDateWidget.detailProjection, null, null, null);\r\n\r\n\t\tlistAdapter = new ForecastAdapter(this, forecastCursor);\r\n\r\n\t\tsetListAdapter(listAdapter);\r\n\t}", "private void initView(){\n recordData = NewDataManager.getIntance(this).getRecordData();\n Log.w(\"zsbin\",\"recordData size= \"+recordData.size());\n objects = recordData.keySet().toArray();\n for(Object tmp: objects){\n long time = (long)tmp;\n mTopStrings.add((time/100000000)+\"年\"+\n (time%100000000/1000000)+\"月\"+\n (time%1000000/10000)+\"日\"+\n (time%10000/100)+\":\"+\n (time%100));\n }\n Log.w(\"zsbin\",\"mTopStrings= \"+mTopStrings.toString());\n HeadLIstViewAdapter topAdapter = new HeadLIstViewAdapter(this,mTopStrings);\n mTopListView.setAdapter(topAdapter);\n setListViewHeightBasedOnChildren(mTopListView);\n mTopListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n long object = (long) objects[position];\n Intent intent = new Intent(ShowDataActivity.this,ChengbenActivity2.class);\n intent.putExtra(\"time\",object);\n startActivity(intent);\n }\n });\n\n }", "public void bind() {\n trackDetails.setSelected(true);\n trackDetails.setText(tracks.get(getAdapterPosition()).getmTitle()\n .concat(\" * \")\n .concat((tracks.get(getAdapterPosition()).getmArtist() != null) ? tracks.get(getAdapterPosition()).getmArtist() : \"\"));\n }", "@SuppressLint(\"ResourceAsColor\")\n @Override\n protected void onCreate(Bundle arg0) {\n super.onCreate(arg0);\n this.setContentView(R.layout.materialactivity);\n initview();\n loadData(pageNo);\n }", "private void initializeViewModel() {\n mProductDetailsViewModel = ViewModelProviders.of(this, mViewModelFactory).get(\n ProductDetailsViewModel.class);\n mBinding.setViewmodel(mProductDetailsViewModel);\n mProductDetailsViewModel.getDeviceDetails(EcomUtil.getIpAddress(this));\n // EcomUtil.generateDeepLink(getIntent(), this);\n setupNestedScrollView();\n mProductDetailsViewModel.onCartUpdate();\n }", "private void initInstances(View rootView) {\n\n value = getActivity().getIntent().getStringExtra(\"x\");\n\n\n\n\n\n\n\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t\tLayoutInflater inflater = getActivity().getLayoutInflater();\r\n\t\tmMainView = inflater.inflate(R.layout.tzfrag, (ViewGroup) getActivity()\r\n\t\t\t\t.findViewById(R.id.vp), false);\r\n\t\ttzlv = (AutoListView) mMainView.findViewById(R.id.tzlv);\r\n\t\tprocess=(ProgressBar) mMainView.findViewById(R.id.progressBar1);\r\n\t\ttips=(TextView) mMainView.findViewById(R.id.tips);\r\n\t\ttzlv.setOnRefreshListener(this);\r\n\t\ttzlv.setOnLoadListener(this);\r\n\t\ttzlv.setFocusableInTouchMode(true);\r\n\t\ttzlv.setOnItemClickListener(new OnItemClickListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tIntent i = new Intent(getActivity(), TzIn.class);\r\n\t\t\t\tSystem.out.println(position);\r\n\t\t\t\tif (position != 0 && position != tz.size() + 1) {\r\n\t\t\t\t\ti.putExtra(\"tzid\", tz.get(position - 1).getId());\r\n\t\t\t\t\ti.putExtra(\"bkid\", tz.get(position - 1).getBkid());\r\n\t\t\t\t\tstartActivityForResult(i, 0);\r\n\t\t\t\t\tgetActivity().overridePendingTransition(R.anim.push_left_in,\r\n\t\t\t\t\t\t\tR.anim.push_left_out);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\tinitView();\r\n\t\t\r\n\t}", "private void loadDetails() {\n TextView tvName = (TextView) findViewById(R.id.tvPropertyName);\n TextView tvAddress = (TextView) findViewById(R.id.tvFullAddress);\n TextView tvCategory = (TextView) findViewById(R.id.tvPropCategory);\n TextView tvSize = (TextView) findViewById(R.id.tvRoomSize);\n TextView tvPrice = (TextView) findViewById(R.id.tvPropPrice);\n\n tvName.setText(name);\n tvAddress.setText(address);\n tvCategory.setText(category);\n tvSize.setText(size + \"m2\");\n tvPrice.setText(\"R\" + price + \".00 pm\");\n getImage();\n }", "private void initViews() {\n setActionBarTitle(R.string.my_energy_metabolism);\n mViewPager = (CustomViewPager) findViewById(R.id.viewPager);\n }", "@Override\n\tprotected void setViews() {\n\t\tlv = (XListView) findViewById(R.id.activity_fund_history_lv_content);\n\t\tlv.setPullRefreshEnable(false);\n\t\tlv.setPullLoadEnable(false);\n\t\tlv.setAdapter(adapter);\n\t\tgetMoneyChageRequest();\n\t}", "private void initViews() {\n\n\t}", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View detailsView = inflater.inflate(R.layout.movie_details, container, false);\n\n ActionBar actionBar = getActivity().getActionBar();\n if (actionBar!=null)\n actionBar.setDisplayHomeAsUpEnabled(true);\n //Start associating variables with views\n bindViews(detailsView);\n movieColumnHolder = null;\n //Intent intent = getActivity().getIntent();\n // Get the extras (if there are any)\n Bundle extras = getArguments();\n if (extras != null) {\n if (extras.containsKey(getString(R.string.movie_list))) {\n movieColumnHolder = extras.getParcelable(getString(R.string.movie_list));\n }\n }\n //If chosen movie content exits\n if (movieColumnHolder != null) {\n Picasso.with(getActivity().getApplicationContext())\n .load(Constants.IMAGE_URL + movieColumnHolder.getPoster_path())\n .error(R.mipmap.error_background)\n .placeholder(R.mipmap.placeholder_background)\n .into(posterImage);\n movieName.setText(movieColumnHolder.getOriginal_title());\n movieDate.setText(movieColumnHolder.getRelease_date());\n movieRate.setText(getString(R.string.vote,Float.toString(movieColumnHolder.getVote_average())));\n movieOverview.setText(movieColumnHolder.getOverview());\n detail_id = movieColumnHolder.getId();\n detail_scroll.smoothScrollTo(0,0);\n\n }\n return detailsView;\n }", "public interface DetailView {\n void initTabHost(JSONObject mJsonObject);\n\n void ExecutionUnitReuilt(String ExecutionUnit);\n\n void setAdapterListFileAttach(FileAttachAdapter attachAdapter, ArrayList<AttachFile> arrAttach, String TabName);\n\n void setVisibilitiesButtonForward(String Resuilt, String TabName);\n\n void setAdapterListDetais(List<DetailsRows> arrDetails, String TabName);\n\n void setAdapterMsgGroupTask(List<GroupMsgTasksRow> arrDocConnect,String TabName);\n\n void setAdapterContentTask(List<ContentTasksRow> arrDocConnect, String TabName, ModuleRow moduleRow);\n\n void setAdapterReportTask(List<ReportTasksRow> arrDocConnect,String TabName, ModuleRow moduleRow);\n\n void SetViewList(AndroidTreeView treeView,String TabName);\n\n void setAdapterFeedBack(List<FeedBackRow> arrFeedBack,String TabName, ModuleRow moduleRow);\n\n void deleteNotify();\n\n void CheckShowMenuOther(JSONObject mOther, String other);\n\n void closeProgress();\n\n void ToastError(String s);\n\n boolean isDestroy();\n\n void getContextMenu(ArrayList<ContextMenuForwardRow> arrContextMenu);\n\n void startIntent();\n\n void showError();\n\n void inseartInputPersonDatabase(String s);\n\n void DetleteRow(boolean mResuilt);\n\n void setVisible(int i);\n\n void getArrMenuDialog(List<DialogMenuDetailAdapter.ItemMenu> arrMenu);\n\n void startAddTransfer(int tapType);\n}", "private void initializeViews()\n {\n ButterKnife.bind(this);\n\n LinearLayoutManager layoutManager = new LinearLayoutManager(this);\n rv_my_vehicles.setLayoutManager(layoutManager);\n rv_my_vehicles.setAdapter(myVehiclesAdapter);\n\n myVehiclesAdapter.setParent(getIntent().getIntExtra(COMING_FROM,0));\n presenter.fetchMyVehicles();\n progressDialog = alerts.getProcessDialog(this);\n progressDialog.setCancelable(false);\n\n tv_all_tool_bar_title.setText(my_vehicles);\n tv_all_tool_bar_title.setTypeface(appTypeface.getPro_narMedium());\n tv_add_new_vehicle.setTypeface(appTypeface.getPro_narMedium());\n tv_vehicles_empty.setTypeface(appTypeface.getPro_narMedium());\n }", "private void initViews() {\n\n }", "private void inizialiteViews() {\n tvDirectionStore = findViewById(R.id.tvDirectionStore);\n tvNameOwner = findViewById(R.id.tvNameOwnerView);\n tvNameStore = findViewById(R.id.tvNameStoreView);\n tvPhonestore = findViewById(R.id.tvPhoneNumberOwner);\n editStore = findViewById(R.id.btnEditStore);\n imageViewStore = findViewById(R.id.imageStore);\n }", "@Override\n public void onStart(View v) {\n }", "public void onResume() {\n super.onResume();\n MiStatInterface.recordPageStart((Activity) this, \"SetMyOtherInfoActivity\");\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_history_detail, container, false);\n initId();\n getdatafromIntent();\n Glide.with(getContext()).load(product_image).into(historyImage);\n return view;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n mView = inflater.inflate(R.layout.fragment_tab_tracking_sovilocation, container, false);\r\n\r\n setup(mView);\r\n GetData(true,\"\");\r\n\r\n return mView;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view= inflater.inflate(R.layout.fragment_my_requirement_detail0, container, false);\n getActivity().setTitle(\"\"+getArguments().getString(\"title\"));\n MainActivity.linerFilter.setVisibility(View.INVISIBLE);\n grigView=view.findViewById(R.id.grigView);\n DataList=new ArrayList<>();\n\n Log.d(\"sdfsdfgsdfgdsfhgdfh\",getArguments().getString(\"id\"));\n Log.d(\"sdfsdfgsdfgdsfhgdfh\",getArguments().getString(\"date\"));\n\n new ReqListing().execute();\n\n\n\n return view;\n }", "public void initViews(){\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_detail, container, false);\n //Loading IT list item\n mDetails = getArguments().getParcelableArrayList(ARG_DETAIL_LIST);\n mTableListLab = TableListLab.getInstance();\n //Display items in expandable recyclerview\n mExpandableView = view.findViewById(R.id.detail_expandable_view);\n for (Detail detail : mDetails) {\n switch (detail.getType()) {\n case Detail.ONLY_TEXT_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new InfoView(getActivity(), detail));\n break;\n case Detail.IMAGE_TEXT_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTextInfoView(getActivity(), detail));\n break;\n case Detail.ONLY_IMAGE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageOnlyInfoView(getActivity(), detail));\n break;\n case Detail.TWO_IMAGES_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTableInfoView(getActivity(), detail));\n break;\n case Detail.DIRECT_TEXT_TYPE:\n mExpandableView.addView(new DirectTextView(getActivity(), detail));\n break;\n case Detail.FACULTY_INFO_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new FacultyInfoView(getActivity(), detail));\n break;\n case Detail.MAP_ADDRESS_TYPE:\n mExpandableView.addView(new MapAddressView(getActivity(), detail));\n break;\n case Detail.ONLY_TABLE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new TableInfoView(getActivity(), detail));\n break;\n case Detail.IMAGE_TABLE_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new ImageTableInfoView(getActivity(), detail));\n break;\n case Detail.BODY_CHAPTERS_INFO_TYPE:\n mExpandableView.addView(new HeadingView(getActivity(), detail.getHeaderResId()));\n mExpandableView.addView(new BodyChaptersInfoView(getActivity(), detail));\n break;\n case Detail.ABOUT_DEVELOPERS_TYPE:\n mExpandableView.addView(new DevelopersInfoView());\n break;\n case Detail.TOP_RECRUITERS_TYPE:\n mExpandableView.addView(new RecruitersInfoView(getActivity(), RecruiterListLab.getInstance()));\n break;\n }\n }\n\n return view;\n }", "private void initView() {\n initRefreshListView(mListview);\n }", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_card_info);\n\n initViews();\n\n readCard();\n }", "private void addDataForListView() {\n \t\n \tif(loadable)\n \t{\t\n \tloadable = false;\n \tdirection = BACKWARD;\n \tstrUrl = Url.composeHotPageUrl(type_id, class_id, last_id);\n \trequestData();\n \t}\n\t}", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_data_display_page);\r\n\r\n\r\n }" ]
[ "0.6815005", "0.66322494", "0.659813", "0.65896755", "0.65731865", "0.65590304", "0.6512372", "0.6494863", "0.648589", "0.6478347", "0.6473502", "0.64342415", "0.64123577", "0.6397461", "0.63759804", "0.6354344", "0.6343365", "0.63362557", "0.6335649", "0.6333996", "0.6321339", "0.6308802", "0.62994456", "0.62973005", "0.6293976", "0.62734663", "0.62704086", "0.62699324", "0.6266054", "0.6264204", "0.6259502", "0.6248903", "0.6237485", "0.6230171", "0.62169015", "0.62052006", "0.62012565", "0.61956686", "0.6191579", "0.6187948", "0.6182671", "0.61728626", "0.61692905", "0.6163828", "0.61591506", "0.615823", "0.6158179", "0.6156214", "0.614993", "0.6135068", "0.6126373", "0.6122104", "0.61162025", "0.6116163", "0.6115354", "0.6112986", "0.6107523", "0.610577", "0.6102782", "0.610193", "0.60976464", "0.6097275", "0.60966426", "0.6092614", "0.6091864", "0.6091864", "0.6090375", "0.6078819", "0.60754", "0.6063929", "0.6057656", "0.60513824", "0.60495776", "0.60479057", "0.60452104", "0.604521", "0.60450876", "0.60385585", "0.6037391", "0.6036526", "0.6032846", "0.60326564", "0.60306007", "0.60286087", "0.60278213", "0.6027219", "0.6025641", "0.60217494", "0.60205853", "0.60203004", "0.6019821", "0.6015855", "0.6014495", "0.6004816", "0.6004785", "0.6004572", "0.6003812", "0.60032356", "0.6002574", "0.60013074", "0.59989446" ]
0.0
-1