query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Gets the first name.
public StringFilter getFirstName() { return firstName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getNameFirst() {\n\t\t\treturn nameFirst;\n\t\t}", "public java.lang.String getFirst_name() {\n return first_name;\n }", "public String getFirstname() {\n return (String) get(\"firstname\");\n }", "public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}", "public String getFirstname() {\n\t\treturn firstname;\n\t}", "public String getFirstName()\n\t{\n\t\t//local consants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Return the firstName.\n\t\treturn firstName;\n\n\t}", "public static String getFirstName() {\r\n\t\treturn firstName;\r\n\t}", "public java.lang.CharSequence getFirstName() {\n return first_name;\n }", "public String getFirst_name() {\n return first_name;\n }", "public final String getFirstName() {\r\n\t\treturn firstName;\r\n\t}", "public final String getFirstName() {\n\t\treturn firstName;\n\t}", "java.lang.String getFirstName();", "java.lang.String getFirstName();", "public java.lang.CharSequence getFirstName() {\n return first_name;\n }", "public String getFirstName() {\n\t\treturn getfirstName.getText();\n\t}", "public String getFirstName() {\n return (String)getAttributeInternal(FIRSTNAME);\n }", "public java.lang.String getFirstName() {\n return firstName;\n }", "public java.lang.String getFirstName() {\n return firstName;\n }", "public java.lang.String getFirstName() {\r\n return firstName;\r\n }", "public java.lang.String getFirstName() {\r\n return firstName;\r\n }", "public String getFirstName() {\n\t\t System.out.println(\"method getFirstName() called.\");\n\t\t return firstName;\n\t\t}", "public String getFirstName()\r\n\t{\r\n\t\treturn firstName;\r\n\t}", "public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}", "public String getFirstName() {\r\n\t\treturn firstName;\r\n\t}", "public String getFirstName() {\n\t\treturn firstName;\r\n\t}", "public String getFirstName() {\r\n\t\treturn firstName;\t\t\r\n\t}", "public String getFirstName()\r\n\t{\r\n\t\treturn firstName.getModelObjectAsString();\r\n\t}", "public java.lang.String getFirstName();", "public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}", "public String getFirstName()\n\t{\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "public String getFirstName() {\n\t\treturn firstName;\n\t}", "@Override\r\n\tpublic String getFistName() {\n\t\treturn first_name;\r\n\t}", "public String getFirstName() {\n\t\treturn this.FirstName ;\n\t}", "public String getFirstName() {\r\n\t\treturn this.firstName;\r\n\t}", "public String getFirstName() {\n\t\treturn myFirstName;\n\t}", "public String getFirstName(){\r\n\t\treturn firstName;\r\n\t}", "public String getFirstName() {\n\t\treturn this.firstName;\n\t}", "@Override\n\tpublic java.lang.String getFirstName() {\n\t\treturn _candidate.getFirstName();\n\t}", "public String getFirstName() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_FIRST_NAME);\r\n }", "public String getFirstName(){\n\t\treturn firstName;\n\t}", "public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getFirstName() {\n return userItem.getFirstName();\n }", "public String getFirstName() {\n return firstNameField.getText();\n }", "public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getFirstName() {\n\t\tthis.setFirstName(this.firstName);\n\t\treturn this.firstName;\n\t}", "@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }", "public String getFirstName() {\r\n return firstName;\r\n }", "public String getFirstName() {\r\n return firstName;\r\n }", "public String getFirstName() {\r\n return firstName;\r\n }", "public java.lang.String getFirstName() {\n\t\t\t\tjava.lang.Object ref = firstName_;\n\t\t\t\tif (!(ref instanceof java.lang.String)) {\n\t\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\t\tfirstName_ = s;\n\t\t\t\t\treturn s;\n\t\t\t\t} else {\n\t\t\t\t\treturn (java.lang.String) ref;\n\t\t\t\t}\n\t\t\t}", "public String getFirstName() {\n return fName;\n }", "public String getFirstName(){\n\t\treturn this.firstName;\n\t}", "public String getFirstName() {\n return _firstName;\n }", "public java.lang.String getFirstName() {\n\t\t\tjava.lang.Object ref = firstName_;\n\t\t\tif (ref instanceof java.lang.String) {\n\t\t\t\treturn (java.lang.String) ref;\n\t\t\t} else {\n\t\t\t\tcom.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;\n\t\t\t\tjava.lang.String s = bs.toStringUtf8();\n\t\t\t\tfirstName_ = s;\n\t\t\t\treturn s;\n\t\t\t}\n\t\t}", "public String getFirstName()\r\n {\r\n return firstName;\r\n }", "@AutoEscape\n\tpublic String getFirst_name();", "public String getFirstName(){\n\t\treturn this.firstName;\r\n\t}", "@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getFirstName() {\n java.lang.Object ref = firstName_;\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 firstName_ = s;\n return s;\n }\n }", "public static String getFirstName() {\n String firstName = \"George\";\n String lastName = \"Washington\";\n return lastName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }", "public String getFirstName() {\n return firstName;\n }" ]
[ "0.8738096", "0.86660486", "0.8656761", "0.8647086", "0.85867167", "0.84922266", "0.8482891", "0.8464327", "0.84549195", "0.8441651", "0.8416578", "0.83963585", "0.83963585", "0.8394841", "0.8295318", "0.8292146", "0.82880825", "0.82880825", "0.8285703", "0.8285703", "0.82844484", "0.8251115", "0.8245555", "0.8245555", "0.8233805", "0.8226571", "0.8225978", "0.82192", "0.82172745", "0.82172745", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8196219", "0.8164624", "0.8153939", "0.8140982", "0.8137294", "0.81333756", "0.81120914", "0.80968416", "0.809468", "0.80876386", "0.8087003", "0.80846363", "0.8075887", "0.8071878", "0.8071878", "0.8062746", "0.806156", "0.8050962", "0.8050962", "0.8050962", "0.8045565", "0.8034129", "0.80255246", "0.80094254", "0.8005714", "0.7997335", "0.79870206", "0.79822946", "0.79803056", "0.79803056", "0.7967358", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.79638386", "0.788401", "0.788401" ]
0.0
-1
Sets the first name.
public void setFirstName(StringFilter firstName) { this.firstName = firstName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setFirstName(String first)\n {\n firstName = first;\n }", "public void setFirstName( String first )\r\n {\r\n firstName = first;\r\n }", "public void setFirstName(String value) {\n setAttributeInternal(FIRSTNAME, value);\n }", "public void setFirstName(String inFirst)\n\t{\n\t\t//local constants\n\n\t\t//local variables\n\n\t\t/*******************************************************************************/\n\n\t\t//Set firstName to inFirst.\n\t\tfirstName = inFirst;\n\n\t}", "public void setFirstName(String s) {\r\n\t\tfirstName = s;\t\r\n\t}", "public final void setFirstName(String firstName) {\r\n\t\tthis.firstName = firstName;\r\n\t}", "public void setFirst_name(java.lang.String first_name) {\n this.first_name = first_name;\n }", "public void setFirstName(String fname) {\n firstNameField.setText(fname);\n }", "public final void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirst_name(String first_name) {\n this.first_name = first_name;\n }", "public void setFirstname(String firstname) {\r\n\t\tthis.firstname = firstname;\r\n\t}", "public void setFirstName(java.lang.CharSequence value) {\n this.first_name = value;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "public void setFirstname(String firstname) {\n this.firstname = firstname;\n }", "public void setFirstName(String fname) {\n\t\t System.out.println(\"method setFirstName(String fname) called.\");\n\t\t}", "public void setFirstName(String firstName) {\n\t\tif (firstName == null)\n\t\t\tfirstName = \"\";\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String fName) {\n this.firstName = fName;\n }", "public void setFirstName(String firstName){\r\n\t\tthis.firstName = firstName;\r\n\t}", "public com.politrons.avro.AvroPerson.Builder setFirstName(java.lang.CharSequence value) {\n validate(fields()[4], value);\n this.first_name = value;\n fieldSetFlags()[4] = true;\n return this; \n }", "public void setFirstName(final String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName)\r\n {\r\n this.firstName = firstName;\r\n }", "public void setFirstName(String fName){\n\t\t//If the user hits cancel a null is sent. Error message to let the user know they must enter a first name. \n\t\tif(fName == null){\n\t\t\tthrow new IllegalArgumentException(\"Sorry, but a first name must be entered.\");\n\t\t}\n\t\t\n\t\t//If the name is blank then an exception is thrown to inform the user.\n\t\tif(fName.trim().equals(\"\")){\n\t\t\tthrow new IllegalArgumentException(\"The first name cannot be blank\");\n\t\t}\n\t\t//If the name is not blank then the name is stored and a true is return.\n\t\telse{\n\t\t\t//Loop to check that all characters are letters and there are no digits.\n\t\t\tfor(int x = 0; x < fName.length(); x++){\n\t\t\t\tif(Character.isDigit(fName.charAt(x))){\n\t\t\t\t\tthrow new IllegalArgumentException(\"No digits are allowed in the name.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.firstName = fName;\n\t\t}\n\t}", "public void setFirstName(String firstName) {\n if (firstName.length() >= 3 && firstName.length() <= 20)\n this.firstName = firstName;\n }", "public void setFirstName(String newFirstName) {\n this.firstName = newFirstName;\n }", "public void setFirstName(String firstName) {\r\n\t\tthis.firstName = firstName;\r\n\t}", "public void setFirstName(String firstName) {\r\n\t\tthis.firstName = firstName;\r\n\t}", "public void setFirstName(java.lang.String firstName) {\r\n this.firstName = firstName;\r\n }", "public void setFirstName(java.lang.String firstName) {\r\n this.firstName = firstName;\r\n }", "public void setFirstName(String firstName)\n\t{\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n String old = this.firstName;\n this.firstName = firstName;\n firePropertyChange(FIRST_NAME_PROPERTY, old, firstName);\n }", "public void setFirstName(java.lang.String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(java.lang.String firstName) {\n this.firstName = firstName;\n }", "public void setFirst_name(String first_name);", "public void setFirstName(String firstName) {\r\n this.firstName = firstName;\r\n }", "public void setFirstName(String newFirstName) {\n _firstName = newFirstName;\n }", "public void setFirstNameFieldName(final String value) {\n setProperty(FIRST_NAME_FIELD_NAME_KEY, value);\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n\t\tthis.firstName = StringUtils.trimString( firstName );\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n\t\tthis.firstName = firstName;\n\t}", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public void setFirstName(String firstName) {\n this.firstName = firstName;\n }", "public static void setFirstName(String name){\n setUserProperty(Constants.ZeTarget_keyForUserPropertyFName, name);\n }", "void setFirstName(String firstName);", "public void setFirstName(String newFirstName)\r\n {\r\n firstName = newFirstName;\r\n }", "public void setFirstName(String fname){ firstName.set(fname); }", "public void setUserFirstName(String firstName) {\n profile.setFirstName(currentUser, firstName);\n }", "public void setFirstName(String fn)\n\t{\n\t\tfirstName = fn;\n\t}", "public void setFirstName(final String value)\n\t{\n\t\tsetFirstName( getSession().getSessionContext(), value );\n\t}", "public void setFirstName(final String value)\n\t{\n\t\tsetFirstName( getSession().getSessionContext(), value );\n\t}", "@Override\n\tpublic void FirstName(String firstName) {\n\t\t\n\t}", "@Override\r\n\tpublic void setFistName(String fname) {\n\t\tif (fname == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (fname.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.first_name = fname;\r\n\t}", "public void setFirstName(String firstName) {\n if(firstName.length()>0)\n this.firstName = firstName;\n else this.firstName =\"undefined\";\n }", "public void setFirstName(String firstName) {\r\n this.firstName = doTrim(firstName);\r\n }", "@Override\n public void setFirstName(java.lang.String firstName) {\n _entityCustomer.setFirstName(firstName);\n }", "public Builder setFirstName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n firstName_ = value;\n onChanged();\n return this;\n }", "public Builder setFirstName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n firstName_ = value;\n onChanged();\n return this;\n }", "public void setName(String firstName, String lastName){\r\n this.firstname = firstName;\r\n this.lastname = lastName;\r\n }", "public void setName(String first, String last) {\r\n // Bouml preserved body begin 00040F02\r\n\t firstName = first;\r\n\t lastName = last;\r\n // Bouml preserved body end 00040F02\r\n }", "@Override\n\tpublic void setFirstName(java.lang.String firstName) {\n\t\t_candidate.setFirstName(firstName);\n\t}", "public Builder setFirstName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n firstName_ = value;\n onChanged();\n return this;\n }", "public void setFirstName(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, FIRSTNAME,value);\n\t}", "public void setFirstName(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, FIRSTNAME,value);\n\t}", "public void setName(String firstname, String lastname) {\n\t\tname = firstname + \" \" + lastname;\n\t}", "public void setFirstName(java.lang.String newFirstName);", "public void setFirstName(String firstName) {\n this.firstName = firstName == null ? null : firstName.trim();\n }", "public void setFirstName(String firstName) {\n this.firstName = Objects.requireNonNull(firstName,\n \"First name can't be null.\");\n }", "public void setUserFirstName(java.lang.String userFirstName) {\r\n this.userFirstName = userFirstName;\r\n }", "public void setFirstName(String firstName) {\r\n this.firstName = firstName == null ? null : firstName.trim();\r\n }", "public Builder setFirstName(java.lang.String value) {\n\t\t\t\tif (value == null) {\n\t\t\t\t\tthrow new NullPointerException();\n\t\t\t\t}\n\n\t\t\t\tfirstName_ = value;\n\t\t\t\tonChanged();\n\t\t\t\treturn this;\n\t\t\t}", "public void setFirstName(String firstName);", "public void changeName(String first, String last) {\n this.firstName = first;\n this.lastName = last;\n }", "public void changeName(String first, String last) {\n this.firstName = first;\n this.lastName = last;\n }", "public void setFirstName(String strFirstName){\n\t\tdriver.findElement(firstname).sendKeys(strFirstName);;\n\t}", "public void setSrcFirstName(String value) {\r\n setAttributeInternal(SRCFIRSTNAME, value);\r\n }", "public void enterFirstName(String firstName) {\n waitUntilElementToBeClickable(_firstNameField, 20);\n Reporter.addStepLog(\"Enter first Name: \" + firstName + \" to first name field \" + _firstNameField.toString());\n sendTextToElement(_firstNameField, firstName);\n log.info(\"Enter first Name: \" + firstName + \" to first name field \" + _firstNameField.toString());\n }", "public void setName(String firstName, String lastName)\n {\n this.name = firstName +\" \"+ lastName;\n\n }", "public void setFirstName() {\n\n\t}", "public void setFirstName( String name ) {\n if ( name == null ) \r\n throw new NullPointerException( \"Customer first name can't be null.\" );\r\n else \r\n\t this.firstName = name; \r\n }", "public void setFirstNameState(String firstNameState) {\r\n\t\tthis.firstNameState = firstNameState;\r\n\t}", "Employee setFirstname(String firstname);", "public void name(String first, String last) {\r\n String display = first + \" \" + last;\r\n textName.setText(display);\r\n }", "public void promptFirstName(String firstName)\n {\n this.firstName = firstName;\n }", "public void setStudentFirstName(String studentFirstName){\r\n this.studentFirstName.set(studentFirstName);\r\n }", "public String getFirstname() {\r\n\t\treturn firstname;\r\n\t}" ]
[ "0.87176645", "0.8553043", "0.84547496", "0.8328459", "0.83112997", "0.8299842", "0.8268987", "0.82469046", "0.8244104", "0.8236495", "0.82348204", "0.8233637", "0.8142234", "0.8142234", "0.81131166", "0.8113104", "0.8110515", "0.80996615", "0.8080055", "0.8079065", "0.8044802", "0.8043082", "0.8036151", "0.8035361", "0.80320984", "0.80320984", "0.80297774", "0.80297774", "0.8004997", "0.79921174", "0.79915404", "0.79915404", "0.7976998", "0.79733115", "0.7966587", "0.79571086", "0.7956632", "0.7948378", "0.79364514", "0.79364514", "0.79364514", "0.79364514", "0.79364514", "0.79364514", "0.79364514", "0.79364514", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7911792", "0.7899667", "0.7888831", "0.78621125", "0.78603816", "0.78582454", "0.78580034", "0.78313243", "0.78313243", "0.78217316", "0.78030646", "0.77888066", "0.77874595", "0.77862215", "0.7776991", "0.7776991", "0.77590424", "0.77575827", "0.77417576", "0.7736609", "0.77195275", "0.77195275", "0.77087444", "0.77071", "0.7699011", "0.7693298", "0.7689148", "0.76867765", "0.76706773", "0.76545835", "0.7618558", "0.7618558", "0.7606291", "0.75807744", "0.7368699", "0.73659515", "0.73540795", "0.7347027", "0.7255198", "0.7246888", "0.72004104", "0.7194733", "0.71442455", "0.71130705" ]
0.7590277
89
Gets the street address.
public StringFilter getStreetAddress() { return streetAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getAddress()\n\t{\n\t\treturn streetAddress;\n\t}", "public String getStreetAddress() {\n return address;\n }", "public String getStreetAddress() {\r\n\t\treturn streetAddress;\r\n\t}", "public String getStreetAddress() {\n return this.streetAddress;\n }", "public java.lang.String getStreet() {\n return street;\n }", "public java.lang.String getStreet() {\n return street;\n }", "public String getStreet() {\n return street;\n }", "public String getStreet() {\n return street;\n }", "public String getStreet() {\r\n\t\treturn street;\r\n\t}", "public String getStreet() {\r\n\t\treturn street;\r\n\t}", "public String getStreet() {\n return this.street;\n }", "public String getStreet()\n {\n return street;\n }", "@Override\n\tpublic String getStreet() {\n\t\treturn this.street;\n\t}", "String getStreet();", "public CustomerAddressQuery street() {\n startField(\"street\");\n\n return this;\n }", "public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }", "public String getAddress()\r\n {\r\n return address.getFullAddress();\r\n }", "public String getAccountStreetAddress() {\n return accountStreetAddress;\n }", "public String getStreetName() {\n return streetName;\n }", "public int getStreet() {\n\t\treturn street;\n\t}", "public String getStreetName() {\r\n return streetName;\r\n }", "public String getStreetName() {\r\n return streetName;\r\n }", "public String getStreet(){\n return street;\n }", "public String getStreetName()\n \t{\n \t\treturn this.streetName;\n \t}", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "java.lang.String getAddress();", "public String getAddress()\r\n\t{\r\n\t\treturn address.getModelObjectAsString();\r\n\t}", "public java.lang.String getSTREET()\n {\n \n return __STREET;\n }", "public String getContactStreet() {\n return contactStreet;\n }", "java.lang.String getHotelAddress();", "public final String getAddress() {\n return address;\n }", "public String getStreetNr() {\r\n return streetNr;\r\n }", "public String getStreetNum()\r\n {\r\n\treturn streetNum;\r\n }", "public String getAddress() {\n return definition.getString(ADDRESS);\n }", "public java.lang.String getAddress() {\r\n return address;\r\n }", "public int getStreetNumber()\n \t{\n \t\treturn this.streetNumber;\n \t}", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress() {\r\n return address;\r\n }", "public String getAddress()\r\n\t{\r\n\t\treturn address;\r\n\t}", "public com.commercetools.api.models.common.Address getAddress() {\n return this.address;\n }", "public String getAddress() {\n return this._address;\n }", "public String getAddress() {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\treturn address;\t\t\r\n\t}", "public Integer getStreetNumber() {\n return streetNumber;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "String getAddress();", "String getAddress();", "public String getAddress() {\n return address;\n }", "public String getAddress() {\n return address;\n }", "public List<String> getStreet() {\n return (List<String>) get(\"street\");\n }", "public String getAddress() {\n return m_Address;\n }", "public String getAddress();", "public String getAddress() {\n return this.address;\n }", "public String getAddress() {\n return this.address;\n }", "public String getAddress() {\n return m_address;\n }", "public String getAddress()\n {\n \treturn address;\n }", "public String getAddress(){\n\t\treturn this.address;\n\t}", "public String getFormattedAddress() {\n return formattedAddress;\n }", "public String getAddress() {\r\n\t\treturn address;\r\n\t}" ]
[ "0.84444785", "0.8355263", "0.8306866", "0.8194694", "0.80244476", "0.80244476", "0.80046135", "0.80046135", "0.79873806", "0.79873806", "0.79038453", "0.789502", "0.7662376", "0.75526553", "0.7501026", "0.74907535", "0.74907535", "0.747483", "0.74219495", "0.7401924", "0.7400246", "0.7400246", "0.7353223", "0.73122084", "0.726687", "0.726687", "0.726687", "0.726687", "0.726687", "0.726687", "0.72007424", "0.71979445", "0.71604073", "0.71313477", "0.7096122", "0.7079983", "0.70634425", "0.7062627", "0.70504504", "0.69953674", "0.6990389", "0.6990389", "0.6990389", "0.6990389", "0.6990389", "0.6990389", "0.6990389", "0.6990321", "0.6987031", "0.697124", "0.69682443", "0.6966608", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6963861", "0.6961658", "0.6961658", "0.69564927", "0.69564927", "0.6953333", "0.69398147", "0.69214547", "0.69177604", "0.69177604", "0.6905461", "0.68837273", "0.68813765", "0.68801314", "0.6867332" ]
0.76210004
13
Sets the street address.
public void setStreetAddress(StringFilter streetAddress) { this.streetAddress = streetAddress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setStreet(String street);", "public void setStreetAddress(String newStreetAddress) {\n this.address = newStreetAddress;\n }", "public void setStreet(java.lang.String street) {\n this.street = street;\n }", "public void setStreet(java.lang.String street) {\n this.street = street;\n }", "public void setAddress(String street, String town, String postcode)\r\n {\r\n address.setFullAddress(street, town, postcode);\r\n }", "public void setAddress(String street, String town, String postcode)\r\n {\r\n address.setFullAddress(street, town, postcode);\r\n }", "public void setStreetAddress(String streetAddress) {\r\n\t\tthis.streetAddress = streetAddress;\r\n\t}", "public void setStreet(String street) {\n this.street = street;\n }", "public void setStreet(String street) {\r\n\t\tthis.street = street;\r\n\t}", "public void setAddress(String s) {\r\n\t\t// Still deciding how to do the address to incorporate apartments\r\n\t\taddress = s;\t\t\r\n\t}", "public void setStreet(String street) {\n\t\tthis.street = street;\n\t}", "public boolean setStreetAddress(String someStreet) {\n if (VMSPro.checkString(someStreet)) {\n this.streetAddress = someStreet;\n return true;\n }\n return false;\n }", "public PersonAddressBuilderDFB at(String streetAddress){\n person.streetAddress = streetAddress;\n return this;\n }", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(String address);", "public void setAddress(final String address){\n this.address=address;\n }", "public void setAddress(String _address){\n address = _address;\n }", "public void setAddress(String adrs) {\n address = adrs;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(Address address) {\n this.address = address;\n }", "public void setAddress(java.lang.String address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ADDRESS$2);\n }\n target.setStringValue(address);\n }\n }", "public void setName (String name) {\n\t streetName = name ;\n }", "public void setAddress(String address)\n {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "@Generated(hash = 607080948)\n public void setAddress(Address address) {\n synchronized (this) {\n this.address = address;\n addressId = address == null ? null : address.getId();\n address__resolvedKey = addressId;\n }\n }", "public void setAddress(final String address) {\n this._address = address;\n }", "public void setAddress(java.lang.String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\r\n this.address = address;\r\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) { this.address = address; }", "public void setStreetFieldName(final String value) {\n setProperty(STREET_FIELD_NAME_KEY, value);\n }", "public void setAddress(PostalAddress address) {\n this.address = address;\n }", "public void setAddress(String stNo,String stName,String sburb,String state,String pstCde) {\n Address nAddress = new Address(stNo,stName,sburb,state,pstCde);\n setAddress(nAddress);\n }", "Builder setAddress(String address);", "public void setAddress(final String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n this.address = address;\n }", "public void setAddress(String address) {\n\t\tthis.address = StringUtils.trimString( address );\n\t}", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "public void setAddress(String address){\n\t\tthis.address = address;\n\t}", "@Override\r\n\tpublic void setAddress(String address) {\n\t\tif (address == null) {\r\n\t\t\tthrow new IllegalArgumentException(\"Null argument is not allowed\");\r\n\t\t}\r\n\t\tif (address.equals(\"\")) {\r\n\t\t\tthrow new IllegalArgumentException(\"Empty argument is not allowed\");\r\n\t\t}\r\n\t\tthis.address = address;\r\n\t}", "public void setAddress (java.lang.String address) {\n\t\tthis.address = address;\n\t}", "public void setStreetNo(int value) {\n this.streetNo = value;\n }", "public void setAddress(final Address address) {\n\n // Check sanity\n Validate.notNull(address, \"address\");\n\n // Assign internal state\n this.address = address;\n }", "public void setAddress(String address) {\n if (getAddresses().isEmpty()) {\n getAddresses().add(address);\n } else {\n getAddresses().set(0, address);\n }\n }", "public void setAccountStreetAddress(String accountStreetAddress) {\n this.accountStreetAddress = accountStreetAddress;\n }", "@Override\n\tpublic void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "public void setAddress(java.lang.String newAddress) {\n\taddress = newAddress;\n}", "void setAddress(String address) throws IllegalArgumentException;", "public AddressEntry setPostalAddress(String street,String city,String state,String zipcode,String country){\r\n\t\tpostalAddress=new PostalAddress(street,city,state,zipcode,country);\r\n\t\treturn this;\r\n\t}", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setStreetNumber(String streetNumber) {\r\n\t\t\tif(streetNumber == null || streetNumber.isEmpty()) \r\n\t\t\t{\r\n\t\t\t\tthis.streetNumber = \"N/A\";\r\n\t\t\t}else \r\n\t\t\t{\r\n\t\t\t\tthis.streetNumber = streetNumber;\r\n\t\t\t}\r\n\t\t}", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n address_ = value;\n onChanged();\n return this;\n }", "public void setStreetName(String streetName) \n \t{\n \t\tthis.streetName = streetName;\n \t}", "public void setaddress(String address) {\n\t\t_address = address;\n\t}", "public void setStreetName(String streetName) {\r\n this.streetName = streetName;\r\n }", "public CustomerBuilder setStreet(final String streetParam) {\n this.streetNested = streetParam;\n return this;\n }", "public Builder setAddress(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000008;\n address_ = value;\n onChanged();\n return this;\n }", "public void setExternalAddress(String address);", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void setAddress(String address) {\n\t\tthis.address = address;\n\t}", "public void xsetAddress(org.apache.xmlbeans.XmlString address)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ADDRESS$2);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ADDRESS$2);\n }\n target.set(address);\n }\n }", "public void setAddress(String string) {\n\t\tthis.address = string;\n\t}", "public void setClosedStreet(Street s)\r\n {\r\n closed_street = s;\r\n }", "public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }", "public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }", "public void setAddress(String address) {\r\n this.address = address == null ? null : address.trim();\r\n }", "public void setStreetAddress( EAIMMCtxtIfc theCtxt, java.lang.String theStreetAddress) throws EAIException;", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }", "public void setAddress(String address) {\n this.address = address == null ? null : address.trim();\n }" ]
[ "0.8128966", "0.7989913", "0.7846054", "0.7846054", "0.783207", "0.783207", "0.7767416", "0.77659905", "0.7719151", "0.76979405", "0.7593392", "0.75873494", "0.749804", "0.7401124", "0.7401124", "0.7401124", "0.7401124", "0.729553", "0.7184624", "0.7183498", "0.717468", "0.717468", "0.717468", "0.7169394", "0.71379304", "0.71157163", "0.71037024", "0.70689833", "0.7062013", "0.70569575", "0.7035885", "0.7035885", "0.7035885", "0.7033217", "0.7033217", "0.7032055", "0.7021953", "0.70071405", "0.7000651", "0.6997676", "0.6936669", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.6933857", "0.69236565", "0.6899533", "0.6899533", "0.688403", "0.68736047", "0.68508685", "0.6844684", "0.6826214", "0.6823535", "0.6809128", "0.6806297", "0.6806297", "0.68014526", "0.6792793", "0.6791603", "0.6781073", "0.67741716", "0.67741716", "0.6770692", "0.6770692", "0.67680836", "0.6765921", "0.6763067", "0.67558163", "0.6754905", "0.67430973", "0.67356825", "0.67356825", "0.67356825", "0.67356825", "0.67356825", "0.67313653", "0.6724223", "0.6722958", "0.6720773", "0.6720773", "0.6720773", "0.6720275", "0.6713706", "0.6713706", "0.6713706", "0.6713706" ]
0.74566996
13
Gets the mobile phone.
public StringFilter getMobilePhone() { return mobilePhone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getMobilePhone() {\r\n return mobilePhone;\r\n }", "public Long getMobile_phone();", "public String getMobilePhone() {\n return mobilePhone;\n }", "public java.lang.String getMobile () {\r\n\t\treturn mobile;\r\n\t}", "public String getMobile() {\n\t\treturn mobile;\n\t}", "public String getMobile() {\r\n return mobile;\r\n }", "public String getMobile() {\r\n return mobile;\r\n }", "public String getMobilePhoneNumber() {\n\t\treturn mobilePhoneNumber;\n\t}", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public int getMobile() {\n\t\t\treturn Mobile;\r\n\t\t}", "@Override\n\tpublic String getMobileNum() {\n\t\treturn get.getMobileNum();\n\t}", "public final String getPhone() {\n return phone;\n }", "public String getMobileNum() {\n return mobileNum;\n }", "public java.lang.String getMobile_number() {\n return mobile_number;\n }", "public String getMobliephone() {\n return mobliephone;\n }", "public String getMobileNum() {\r\n\t\treturn mobileNum;\r\n\t}", "public String getMobileNum() {\n\t\treturn mobileNum;\n\t}", "public String getmobileNum() {\n\t\treturn _mobileNum;\n\t}", "public Long getHome_phone();", "public String getMallPhone() {\n return mallPhone;\n }", "public java.lang.String getPhone () {\n\t\treturn phone;\n\t}", "public String getMobileNumber() {\n return mobileNumber;\n }", "public String getPhone() {\r\n\t\treturn this.phone;\r\n\t}", "public String getSMemMobile() {\n return sMemMobile;\n }", "public Phone getPhone() {\n\t\treturn phone;\n\t}", "public java.lang.String getPhone() {\n return phone;\n }", "public String getMobile_number() {\n return mobile_number;\n }", "public String getPhoneNumber(){\n\t\t \n\t\t TelephonyManager mTelephonyMgr;\n\t\t mTelephonyMgr = (TelephonyManager)\n\t\t activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t\t return mTelephonyMgr.getLine1Number();\n\t\t \n\t\t}", "public String getPhone() {\n\t\treturn phone;\n\t}", "public int getMobile() {return mobile;}", "public Mobile getMobile(String ram, String os, Integer storage) {\n\t\treturn new IPhone(ram, os, storage);\n\t}", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return _phone;\n }", "public String getUserMobile() {\n return userMobile;\n }", "public String getUserMobile() {\n return userMobile;\n }", "public java.lang.String getTelePhone() {\r\n return telePhone;\r\n }", "String getMobile(String name);", "@Override\n public String getPhoneNumber() {\n\n if(this.phoneNumber == null){\n\n this.phoneNumber = TestDatabase.getInstance().getClientField(token, id, \"phoneNumber\");\n }\n\n return phoneNumber;\n }", "public long getPhone() {\n return phone;\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone() {\r\n return phone;\r\n }", "public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}", "public String getPhone()\n\t{\n\t\treturn getPhone( getSession().getSessionContext() );\n\t}", "java.lang.String getPhone();", "public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}", "public String getPhone(final SessionContext ctx)\n\t{\n\t\treturn (String)getProperty( ctx, PHONE);\n\t}", "@Override\r\n\tpublic String getPhone() {\n\t\treturn phone;\r\n\t}", "public java.lang.String getTelphone () {\r\n\t\treturn telphone;\r\n\t}", "public String getMobileCode() {\n return mobileCode;\n }", "public String getMobileNo() {\n return (String)getAttributeInternal(MOBILENO);\n }", "public String getSMemPhone() {\n return sMemPhone;\n }", "public String getPhone(){\n\t\treturn phone;\n\t}", "public String getPhone() {\n return mPhone;\n }", "public String getPhone() {\n return mPhone;\n }", "public String getUserphone() {\n return userphone;\n }", "public String getReceiverMobile() {\n return receiverMobile;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getTelphone() {\n return telphone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public String getPhone() {\n return phone;\n }", "public Phonenumber.PhoneNumber getPhoneNumber() {\n return mCurrentPhoneNumber;\n }", "@ApiModelProperty(value = \"手机\")\n\tpublic String getPhone() {\n\t\treturn phone;\n\t}", "public long getPhoneNumber() {\r\n\t\treturn phoneNumber;\r\n\t}", "java.lang.String getUserPhone();", "public String getUserPhone() {\r\n return userPhone;\r\n }", "public String getCustomerMobile() {\n\t\treturn customerMobile;\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getPhone() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(PHONE_PROP.get());\n }", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getPhone() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(PHONE_PROP.get());\n }" ]
[ "0.7871315", "0.7627167", "0.7616229", "0.7613633", "0.74628717", "0.74626034", "0.74626034", "0.7447671", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7447619", "0.7396138", "0.71615094", "0.71515006", "0.71429354", "0.71356326", "0.7115471", "0.70926756", "0.70828813", "0.70454454", "0.70382446", "0.70176595", "0.7013801", "0.699643", "0.69784075", "0.6973795", "0.6970728", "0.69584584", "0.6955659", "0.6949623", "0.6936313", "0.6933608", "0.69273996", "0.6919132", "0.6901024", "0.68931365", "0.68931365", "0.68781763", "0.6860062", "0.68504655", "0.6840077", "0.6836927", "0.6836927", "0.6836927", "0.6836927", "0.6836927", "0.6836927", "0.6821363", "0.6821363", "0.6819449", "0.68108785", "0.68108785", "0.6798506", "0.6797761", "0.67611885", "0.6758048", "0.6755778", "0.67479324", "0.6726876", "0.6726876", "0.67246085", "0.6720693", "0.67048013", "0.67048013", "0.67048013", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.6687218", "0.667633", "0.6658428", "0.66493964", "0.66306615", "0.6629829", "0.66295826", "0.6624189", "0.6614848" ]
0.7051147
30
Sets the mobile phone.
public void setMobilePhone(StringFilter mobilePhone) { this.mobilePhone = mobilePhone; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMobile(int number) {\n\t\t\tthis.Mobile = number;\r\n\t\t}", "public void setMobilePhone(String mobilePhone) {\n this.mobilePhone = mobilePhone;\n }", "public void setMobilePhone(java.lang.String mobilePhone) {\r\n this.mobilePhone = mobilePhone;\r\n }", "public void setMobile_phone(Long mobile_phone);", "public void setPhone(String mPhone) {\n this.mPhone = mPhone;\n }", "void setPhone(int phone);", "public void setPhone(String phone);", "public void setMobile(String mobile) {\n this.mobile = mobile;\n }", "public void setMobile(String mobile) {\n this.mobile = mobile;\n }", "public void setMobile(String mobile) {\n this.mobile = mobile;\n }", "public void setMobile(String mobile) {\n this.mobile = mobile;\n }", "public void setPhone(String phone) {\n this.mPhone = phone;\n }", "public void setMobilePhone(String mobilePhone) {\n this.mobilePhone = mobilePhone == null ? null : mobilePhone.trim();\n }", "public void setMobile (java.lang.String mobile) {\r\n\t\tthis.mobile = mobile;\r\n\t}", "public void set_phone(String Phone)\n {\n phone =Phone;\n }", "public void setMobliephone(String mobliephone) {\n this.mobliephone = mobliephone;\n }", "public void setPhone(long phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\r\n this.phone = phone;\r\n }", "public void setTelphone(String telphone) {\n this.telphone = telphone;\n }", "public void setTelphone(String telphone) {\n this.telphone = telphone;\n }", "public void setPhone(String phone)\r\n/* 46: */ {\r\n/* 47:58 */ this.phone = phone;\r\n/* 48: */ }", "public void setPhone( String phone ) {\n this.phone = phone;\n }", "public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }", "public void setPhone(java.lang.String value) {\n __getInternalInterface().setFieldValueForCodegen(PHONE_PROP.get(), value);\n }", "public void setPhone(String phone){\n\t\tthis.phone = phone;\n\t}", "public void setPhone(String phone)\n {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setmobileNum(String mobileNum) {\n\t\t_mobileNum = mobileNum;\n\t}", "public void setPhone(final String phone) {\n this.phone = phone;\n }", "public void setHome_phone(Long home_phone);", "public void setMobileNum(String mobileNum) {\r\n\t\tthis.mobileNum = mobileNum;\r\n\t}", "public void setMobile(String mobile) {\r\n this.mobile = mobile == null ? null : mobile.trim();\r\n }", "public void setMobile(String mobile) {\r\n this.mobile = mobile == null ? null : mobile.trim();\r\n }", "public final void setPhone(final String phoneNew) {\n this.phone = phoneNew;\n }", "public void setPhone(String phonenum) {\n\t\tPHONE = phonenum;\n\t}", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setMobile(String mobile) {\n this.mobile = mobile == null ? null : mobile.trim();\n }", "public void setPhone(String phone) {\r\n // Bouml preserved body begin 00041002\r\n\t this.phoneNumber = phone;\r\n // Bouml preserved body end 00041002\r\n }", "private void setMobileNum(String mobileNum) {\n this.mobileNum = StringExtension.nullFilter(mobileNum);\n }", "public void setMobile(String mobile) {\n\t\tthis.mobile = mobile == null ? null : mobile.trim();\n\t}", "public void setMobileNumber(String mobileNumber) {\n this.mobileNumber = mobileNumber;\n }", "public void setUserPhone( String userPhone )\n {\n this.userPhone = userPhone;\n }", "public void setPhone(String phone) {\n\t\tthis.phone = StringUtils.trimString( phone );\n\t}", "public void setPhone(java.lang.String phone) {\n this.phone = phone;\n }", "public void setPhone(String newPhone) {\r\n\t\tthis.phone = newPhone;\r\n\t}", "public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}", "public void setPhone(final String value)\n\t{\n\t\tsetPhone( getSession().getSessionContext(), value );\n\t}", "public void setMobileNum(String mobileNum) {\n\t\tthis.mobileNum = mobileNum;\n\t}", "public void setPhoneNumber(String phone_number){\n this.phone_number = phone_number;\n }", "public void setPhone(String phone) {\n\t\tthis.phone = phone == null ? null : phone.trim();\n\t}", "public void setTelphone(String telphone) {\n this.telphone = telphone == null ? null : telphone.trim();\n }", "public void setMobileNo(String value) {\n setAttributeInternal(MOBILENO, value);\n }", "public void setPhone(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PHONE,value);\n\t}", "public void setPhone(final SessionContext ctx, final String value)\n\t{\n\t\tsetProperty(ctx, PHONE,value);\n\t}", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "public void setPhone(String phone) {\n this.phone = phone == null ? null : phone.trim();\n }", "void setPhone(String phone) throws IllegalArgumentException;", "public void setMobilePhoneNumber(String mobilePhoneNumber) {\n\t\tthis.mobilePhoneNumber = mobilePhoneNumber;\n\t}", "public com.politrons.avro.AvroPerson.Builder setPhoneNumber(java.lang.CharSequence value) {\n validate(fields()[3], value);\n this.phone_number = value;\n fieldSetFlags()[3] = true;\n return this; \n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone(String phone) {\r\n this.phone = phone == null ? null : phone.trim();\r\n }", "public void setPhone (java.lang.String phone) {\n\t\tthis.phone = phone;\n\t}", "public void setTelePhone(java.lang.String telePhone) {\r\n this.telePhone = telePhone;\r\n }", "public void setTelephone(String telephone) {\n\t\tthis.telephone = telephone;\n\t}", "public void setTelphone (java.lang.String telphone) {\r\n\t\tthis.telphone = telphone;\r\n\t}", "public Builder setPhone(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000004;\n phone_ = value;\n onChanged();\n return this;\n }", "public void setMobile_number(String mobile_number) {\n this.mobile_number = mobile_number;\n }", "public void setPhoneNumber(String phoneNumber) {\n this.phoneNumber = phoneNumber;\n }", "public String getMobilePhoneNumber() {\n\t\treturn mobilePhoneNumber;\n\t}", "public void setMallPhone(String mallPhone) {\n this.mallPhone = mallPhone == null ? null : mallPhone.trim();\n }", "public void setSMemPhone(String sMemPhone) {\n this.sMemPhone = sMemPhone;\n }", "public abstract void setPhone1(String sValue);", "public void setPhoneNumber(String phoneNumber) {\n\t\tthis.phoneNumber=phoneNumber;\r\n\t}", "public void setTelephone(String telephone) {\n this.telephone = telephone == null ? null : telephone.trim();\n }", "public void setTelephone(String telephone) {\n this.telephone = telephone == null ? null : telephone.trim();\n }", "public void setPhoneNumber(java.lang.CharSequence value) {\n this.phone_number = value;\n }" ]
[ "0.75783813", "0.7538987", "0.7418773", "0.7385735", "0.7340704", "0.7191691", "0.7165151", "0.7121721", "0.7121721", "0.7121721", "0.7121721", "0.71158564", "0.7059561", "0.70576096", "0.70177424", "0.69888645", "0.69568473", "0.6946712", "0.692115", "0.692115", "0.69078755", "0.68872976", "0.6881859", "0.68694997", "0.68677294", "0.68675214", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.68603915", "0.685744", "0.683112", "0.6827112", "0.68146485", "0.6808821", "0.6808821", "0.6807217", "0.67866486", "0.6781501", "0.6781501", "0.6781501", "0.6781501", "0.6781501", "0.6781501", "0.6781501", "0.6781501", "0.6781501", "0.6765209", "0.6747676", "0.6722643", "0.6719254", "0.6711571", "0.6709084", "0.6689097", "0.667042", "0.6658438", "0.6658438", "0.6633533", "0.66263247", "0.6621587", "0.6598275", "0.6595077", "0.6590842", "0.6590842", "0.6580866", "0.6580866", "0.6580866", "0.6580866", "0.6580866", "0.6580866", "0.6580866", "0.657886", "0.6573572", "0.6573316", "0.6569548", "0.6569548", "0.6569548", "0.6569548", "0.65663266", "0.65607715", "0.6556857", "0.65504336", "0.6534864", "0.6509568", "0.6493951", "0.6431539", "0.64182085", "0.64115816", "0.6410018", "0.6405624", "0.6401789", "0.6401789", "0.63993764" ]
0.6516026
90
Gets the user id.
public LongFilter getUserId() { return userId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "java.lang.String getUserId();", "long getUserId();", "long getUserId();", "Long getUserId();", "String getUserId();", "String getUserId();", "public long getUserId();", "public long getUserId();", "public long getUserId();", "public long getUserId();", "public String getUserId() {\n if (this.isTokenValide()) {\n JWT jwt = new JWT(getToken());\n Claim claim = jwt.getClaim(\"user_id\");\n return claim.asString();\n } else {\n return \"\";\n }\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public Long getUserID() {\n Authentication authentication = SecurityContextHolder.getContext().getAuthentication();\n return getByUsername(authentication.getName()).getId();\n }", "public Long getUserId() {\n return this.user.getId();\n }", "@Override\n\tpublic long getUserId() {\n\t\treturn _userSync.getUserId();\n\t}", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "public int getUserID() {\n return userID_;\n }", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public Integer getIdUser() {\r\n\t\treturn idUser;\r\n\t}", "public Integer getUser_id() {\n\t\treturn user_id;\n\t}", "public Integer getUserid() {\r\n\t\treturn userid;\r\n\t}", "public Integer getUserid() {\n\t\treturn this.userid;\n\t}", "public int getUserId() {\n return instance.getUserId();\n }", "public int getUserID() {\n return userID;\n }", "public int getUserID() {\n return userID;\n }", "public int getUserID() {\n return userID;\n }", "protected long getUserID() {\n return userID;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public Integer getUserid() {\n return userid;\n }", "public String getUserID(){\n return mSharedPreferences.getString(SharedPrefContract.PREF_USER_ID, null);\n }", "@Override\n\tpublic Long getUserId() {\n\t\treturn user.getKey().getId();\n\t}", "public java.lang.String getUserid() {\n return userid;\n }", "public java.lang.String getUserid() {\n return userid;\n }", "@Override\n\tpublic long getUserId();", "@Override\n\tpublic long getUserId();", "public String getUserId() {\r\n\t\treturn this.userid.getText();\r\n\t}", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "int getUserID();", "public Integer getUserID() {\n return userID;\n }", "public java.lang.String getUserid() {\n return userid;\n }" ]
[ "0.82338023", "0.8096441", "0.8096441", "0.8096441", "0.80811423", "0.80811423", "0.8017687", "0.80149627", "0.80149627", "0.79248077", "0.79248077", "0.79248077", "0.79248077", "0.79055446", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.7904576", "0.79041296", "0.79041296", "0.7888136", "0.78804857", "0.7872091", "0.78669363", "0.78669363", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7865927", "0.7860897", "0.7860897", "0.7860897", "0.7838884", "0.78350574", "0.7819632", "0.77972126", "0.77920616", "0.77786344", "0.77786344", "0.77786344", "0.77782553", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.7777492", "0.77749956", "0.77720547", "0.7771746", "0.7771702", "0.77697736", "0.77697736", "0.7769734", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.77575046", "0.7757366", "0.77541465" ]
0.0
-1
Sets the user id.
public void setUserId(LongFilter userId) { this.userId = userId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdUser(int value) {\n this.idUser = value;\n }", "public void setIdUser(String idUser) {\n\t\tthis.idUser = idUser;\n\t}", "public void setIdUser(Integer idUser) {\r\n\t\tthis.idUser = idUser;\r\n\t}", "public void setId_user(int id_user) {\n this.id_user = id_user;\n }", "public void setId_user(int id_user) {\r\n this.id_user = id_user;\r\n }", "public void setUserid(java.lang.String value) {\n this.userid = value;\n }", "public void setIduser(int aIduser) {\n iduser = aIduser;\n }", "private void setUserId(int value) {\n \n userId_ = value;\n }", "@Override\n\tvoid setId(final UserId userId);", "private void setUserId(long value) {\n \n userId_ = value;\n }", "public void setUserid(Integer userid) {\r\n\t\tthis.userid = userid;\r\n\t}", "public void setUserId(int value) {\n this.userId = value;\n }", "public void setUserid(Long userid) {\r\n this.userid = userid;\r\n }", "void setUser(User user, int id) {\n this.user = user;\n this.id = id;\n }", "private void setUserId(long value) {\n\n userId_ = value;\n }", "public void setUserid(java.lang.String userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserid(Integer userid) {\n this.userid = userid;\n }", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserId(long userId);", "public void setUserId(long userId);", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_userSync.setUserId(userId);\n\t}", "@Override\n\tpublic void setUserId(long userId);", "@Override\n\tpublic void setUserId(long userId);", "void setUserId(int newId) {\r\n\t\t\tuserId = newId;\r\n\t\t}", "void setUserId(Long userId);", "public void setUserId(long value) {\r\n this.userId = value;\r\n }", "public void setUserId(long value) {\n this.userId = value;\n }", "public void setUserId(String value) {\r\n setAttributeInternal(USERID, value);\r\n }", "public void setUserId(String id) {\n\t\t_userLoginId = id;\n\t}", "public void setUserID(int value) {\n this.userID = value;\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_userTracker.setUserId(userId);\n\t}", "public synchronized static void setUserId(String userId){\n setUserId(context,userId);\n }", "public de.hpi.msd.salsa.serde.avro.Edge.Builder setUserId(long value) {\n validate(fields()[0], value);\n this.userId = value;\n fieldSetFlags()[0] = true;\n return this;\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\tmodel.setUserId(userId);\n\t}", "@Override\n\tpublic void setUserId(long userId) {\n\t\tmodel.setUserId(userId);\n\t}", "@Override\n\tpublic void setUserId(long userId) {\n\t\tmodel.setUserId(userId);\n\t}", "public Builder setUserId(long value) {\n \n userId_ = value;\n onChanged();\n return this;\n }", "@Override\n public void setUserId(long userId) {\n _partido.setUserId(userId);\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_changesetEntry.setUserId(userId);\n\t}", "private void setUserId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n userId_ = value;\n }", "public org.mddarr.rides.event.dto.AvroRide.Builder setUserid(java.lang.String value) {\n validate(fields()[1], value);\n this.userid = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_esfTournament.setUserId(userId);\n\t}", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000004;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000004;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000004;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000004;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public Builder setUserID(int value) {\n bitField0_ |= 0x00000001;\n userID_ = value;\n onChanged();\n return this;\n }", "public void setUserId(int userId) {\n this.userId = userId;\n }", "public void setUserId(int userId) {\n this.userId = userId;\n }", "public void setUserId(int userId) {\n this.userId = userId;\n }", "public void setUserid(String userid) {\n this.userid = userid == null ? null : userid.trim();\n }", "public void setUserid(String userid) {\n this.userid = userid == null ? null : userid.trim();\n }", "@Override\n\tpublic void setUserId(String userId) {\n\t\tsuper.setUserId(userId);\n\t}", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_scienceApp.setUserId(userId);\n\t}", "public void setUserId(Integer userId) {\r\n this.userId = userId;\r\n }", "public void setUserId(Integer userId) {\r\n this.userId = userId;\r\n }", "@Override\n public void setId(UserDetailsPk id) {\n this.id = id;\n }", "public void setUserId(int userId) {\n this.mUserId = userId;\n }", "public void setUserId(int userId)\r\n\t{\r\n\t\tthis.userId = userId;\r\n\t}", "public static void setUserId(int zUserId) {\n userId = zUserId;\n }", "@Override\n\tpublic void setUserId(long userId) {\n\t\t_employee.setUserId(userId);\n\t}", "public void setUserId(){\n AdGyde.setClientUserId(\"ADG1045984\");\n Toast.makeText(this, \"UserId = ADG1045984\", Toast.LENGTH_SHORT).show();\n }", "public void setId(User user) {\n this.id = new GoogleInfoKey(user);\n }", "@Override\n public void setUserId(long userId) {\n _usersCatastropheOrgs.setUserId(userId);\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }", "public void setUserId(Integer userId) {\n this.userId = userId;\n }" ]
[ "0.8424531", "0.8338321", "0.83239496", "0.8144418", "0.81207603", "0.8083222", "0.7980484", "0.7801382", "0.7704092", "0.7645542", "0.76327235", "0.7625344", "0.7555822", "0.75469667", "0.7541217", "0.7525742", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.75121963", "0.7501926", "0.7501926", "0.7501926", "0.7501926", "0.7490734", "0.74551684", "0.74551684", "0.7419362", "0.73955816", "0.73947275", "0.73807573", "0.72851545", "0.7283587", "0.7268561", "0.7262591", "0.7186145", "0.71838814", "0.71499765", "0.71499765", "0.71499765", "0.712127", "0.7103352", "0.7101177", "0.71005285", "0.7099431", "0.7086366", "0.7085826", "0.7085826", "0.7085826", "0.7085826", "0.705764", "0.705764", "0.705764", "0.705764", "0.705764", "0.705764", "0.70566463", "0.70566463", "0.70566463", "0.70566463", "0.70566463", "0.70566463", "0.70566463", "0.70392513", "0.70392513", "0.70392513", "0.7033083", "0.7033083", "0.70156884", "0.70135736", "0.7004735", "0.7004735", "0.69975555", "0.6962234", "0.6962093", "0.69593537", "0.6947284", "0.694708", "0.69459", "0.69426084", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204", "0.69177204" ]
0.0
-1
Gets the document id.
public LongFilter getDocumentId() { return documentId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getDocumentId();", "public java.lang.String getDocumentId() {\n java.lang.Object ref = documentId_;\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 documentId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "@java.lang.Override\n public java.lang.String getDocumentId() {\n java.lang.Object ref = documentId_;\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 documentId_ = s;\n return s;\n }\n }", "public String getDocumentId() {\n return documentId;\n }", "public String getDocumentId() {\n\t\treturn documentId;\n\t}", "public com.kingdee.eas.fdc.market.DocumentInfo getDocumentId()\n {\n return (com.kingdee.eas.fdc.market.DocumentInfo)get(\"documentId\");\n }", "public String getDocumentId() {\n return this.documentId;\n }", "public String getId() {\n\t\treturn docid;\n\t}", "public String getDocId() {\n return docId;\n }", "public com.google.protobuf.ByteString\n getDocumentIdBytes() {\n java.lang.Object ref = documentId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n documentId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getDocumentIdBytes();", "public Number getDocId() {\n return (Number)getAttributeInternal(DOCID);\n }", "public Number getDocId() {\n return (Number)getAttributeInternal(DOCID);\n }", "@java.lang.Override\n public com.google.protobuf.ByteString\n getDocumentIdBytes() {\n java.lang.Object ref = documentId_;\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 documentId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public String getDocId() {\n\t\treturn this.docId;\n\t}", "public long getIdentificationDocumentID(){\n\t\treturn identificationDocumentID;\n\t}", "public String getId() {\n return getObjectId();\n }", "@Override\r\n public String getDocid() {\r\n return docid;\r\n }", "@JsonProperty(\"document_id\")\n @ApiModelProperty(value = \"The unique identifier of the document\")\n public String getDocumentId() {\n return documentId;\n }", "@XmlElement\n @Nullable\n public String getDocumentId() {\n return this.documentId;\n }", "public Number getBookDocId() {\n return (Number)getAttributeInternal(BOOKDOCID);\n }", "public String getIddocument() {\r\n\t\treturn iddocument;\r\n\t}", "String getDocumentNumber();", "public String getDocID() {\n if (Problem_Type.featOkTst && ((Problem_Type)jcasType).casFeat_docID == null)\n jcasType.jcas.throwFeatMissing(\"docID\", \"hw1.qa.Problem\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((Problem_Type)jcasType).casFeatCode_docID);}", "public String getObjectId()\r\n {\r\n /*\r\n * Author : DJ\r\n * Date : 02/04/2003\r\n * Notes :\r\n * History :\r\n */\r\n return _objectId;\r\n }", "public String getDocument(int documentId) {\n return myDocuments.get(documentId);\n }", "public long getDocumentName();", "public static String id()\n {\n return _id;\n }", "@Override\n\tpublic String getDocumentKey() {\n\t\treturn uid.toString();\n\t}", "public K getSavedId() {\n if (dbObjects.length == 0) {\n throw new MongoException(\"No objects to return\");\n }\n if (dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n return jacksonDBCollection.convertFromDbId(dbObjects[0].get(\"_id\"));\n }", "public Object getObjectId() {\n\t\treturn null;\n\t}", "public EI getHealthDocumentReferenceIdentifier() { \r\n\t\tEI retVal = this.getTypedField(19, 0);\r\n\t\treturn retVal;\r\n }", "java.lang.String getID();", "public java.lang.String getId() {\n return this._id;\n }", "Integer getID();", "Integer getID();", "public Long getId() {\r\n\t\treturn objectId;\r\n\t}", "public String getObjectId();", "public int getDocumentNumber() {\n return documentNumber;\n }", "public java.lang.String getId() {\r\n return this._id;\r\n }", "java.lang.String getClientRecordId();", "public String getLastProcessedDocId() {\n return producer.getLastDocId();\n }", "public int get_id() {\n return _id;\n }", "public java.lang.String getId() {\n return _id;\n }", "public int getObjectId() {\n\t\t\treturn objectId;\n\t\t}", "public java.lang.Integer getId () {\n\t\treturn _id;\n\t}", "public long getId() {\n\t\treturn Long.parseLong(_id);\n\t}", "public String getDocumentNo();", "public String getDocumentNo();", "public String getDocumentNo();", "public String getDocumentNo() {\n return documentNo;\n }", "public java.lang.String getBusinessDocumentId() {\n return businessDocumentId;\n }", "public gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId getObjectId()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId target = null;\r\n target = (gov.nih.nlm.ncbi.www.ObjectIdDocument.ObjectId)get_store().find_element_user(OBJECTID$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target;\r\n }\r\n }", "public java.lang.String getBusinessDocumentId() {\n return businessDocumentId;\n }", "public java.lang.Integer getDocumentNumber() {\n return documentNumber;\n }", "public final int getId() {\n\t\treturn JsUtils.getNativePropertyInt(this, \"id\");\n\t}", "public Long getId() {\n return this.id.get();\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getID() {\n return _id;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public String getObjectId() {\n switch (getObjectType()) {\n case Campaign:\n return campaignId;\n case Ad:\n return adId;\n case AdSet:\n return adSetId;\n case Account:\n return accountId;\n default:\n throw new IllegalArgumentException(\"Unknown object type\");\n }\n }", "public long getId ()\r\n {\r\n return _id;\r\n }", "public Long getId()\n\t{\n\t\treturn (Long) this.getKeyValue(\"id\");\n\n\t}", "public String getID() {\r\n return insertMode ? null : stringValue(CONTACTS_ID);\r\n }", "public int getId() {\n return oid ;\n }", "public long getID();", "public int getObjectId() {\n\t\treturn this.objectId;\n\t}", "public long getId()\n\t{\n\t\treturn id;\n\t}", "public String getObjectId() {\n\t\treturn objectId;\n\t}", "public Integer getObjectId() {\n\t\treturn objectId;\n\t}", "public int getID() {\n this.use();\n\n return ID;\n }", "public long getDocumentName() {\n\t\treturn _tempNoTiceShipMessage.getDocumentName();\n\t}", "public static int getIdNumber() {\n return idNumber;\n }", "public long getId() {\n\t\treturn getTo(true).getId();\n\t}", "public static String get() {\n\t\treturn new ObjectId()+\"\";\n\t}", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId() {\n return id_;\n }", "public long getId()\r\n {\r\n return _id;\r\n }", "public String getId() {\n if (id == null)\n return \"\"; //$NON-NLS-1$\n return id;\n }", "public int getID() {\n return this._id;\n }", "public long getId() {\n\t\t\treturn id;\n\t\t}" ]
[ "0.8870874", "0.82723784", "0.81805116", "0.81805116", "0.8156886", "0.8156886", "0.81354505", "0.8117171", "0.807613", "0.80295545", "0.80057937", "0.7888054", "0.78073764", "0.7710824", "0.7689828", "0.75848454", "0.75848454", "0.75645036", "0.7560838", "0.72622037", "0.6950044", "0.6886325", "0.68700355", "0.68552357", "0.6829505", "0.6630654", "0.66244555", "0.660717", "0.65933", "0.6579407", "0.6577763", "0.6561793", "0.65404403", "0.6504678", "0.64982575", "0.6490751", "0.6478865", "0.6461454", "0.6456333", "0.6456333", "0.64364815", "0.64318526", "0.6427254", "0.6422595", "0.6405374", "0.6393112", "0.63903636", "0.6383024", "0.6380236", "0.6359847", "0.6351649", "0.63483435", "0.63483435", "0.63483435", "0.6348307", "0.63464075", "0.6346106", "0.63439995", "0.6340715", "0.6337199", "0.6334438", "0.6313789", "0.6313789", "0.6313789", "0.6313789", "0.6313789", "0.6313789", "0.6313789", "0.6313789", "0.6308956", "0.6303386", "0.6303386", "0.6303386", "0.6303386", "0.6303386", "0.6303386", "0.6303386", "0.63009125", "0.62922513", "0.6279671", "0.62774175", "0.62771964", "0.62662095", "0.6263384", "0.6253261", "0.6251525", "0.6249591", "0.6248549", "0.6244836", "0.62435937", "0.62433785", "0.624148", "0.62381727", "0.62381727", "0.62381727", "0.62381727", "0.6236029", "0.6233148", "0.62325275", "0.62289476" ]
0.7175934
20
Sets the document id.
public void setDocumentId(LongFilter documentId) { this.documentId = documentId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public com.opentext.bn.converters.avro.entity.DocumentEvent.Builder setDocumentId(java.lang.String value) {\n validate(fields()[8], value);\n this.documentId = value;\n fieldSetFlags()[8] = true;\n return this;\n }", "public com.opentext.bn.converters.avro.entity.ContentErrorEvent.Builder setDocumentId(java.lang.String value) {\n validate(fields()[1], value);\n this.documentId = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "public Builder setDocumentId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n documentId_ = value;\n onChanged();\n return this;\n }", "public void setDocId(Number value) {\n setAttributeInternal(DOCID, value);\n }", "public void setDocId(Number value) {\n setAttributeInternal(DOCID, value);\n }", "public void setDocumentId(String documentId) {\n this.documentId = documentId;\n }", "public void setDocument(int docid) {\n leafLookup.setDocument(docid);\n }", "public void setDocumentId(String documentId) {\n\t\tthis.documentId = documentId;\n\t}", "public void setIddocument(String iddocument) {\r\n\t\tthis.iddocument = iddocument;\r\n\t}", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setBookDocId(Number value) {\n setAttributeInternal(BOOKDOCID, value);\n }", "java.lang.String getDocumentId();", "public void setDocumentId(@Nullable String documentId) {\n this.documentId = documentId;\n }", "public void setDocId(String docId) {\n this.docId = docId;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public String getDocumentId() {\n return documentId;\n }", "public void setId(java.lang.Integer _id)\n {\n id = _id;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public String getDocumentId() {\n\t\treturn documentId;\n\t}", "public void setId (String id)\n {\n _id = id;\n }", "public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(String id) {\r\n\t\tsId = id;\r\n\t}", "public void setId(String id)\n {\n data().put(_ID, id);\n }", "public void setId(long id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int value) {\n this.id = value;\n }", "public void setId(long id){\n\t\tthis.id = id;\n\t}", "public void setId(long id) {\n id_ = id;\n }", "public void setId(String id) {\n _id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setidnumber(int id) {\r\n idnumber = id;\r\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public java.lang.String getDocumentId() {\n return documentId;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setDocID(String v) {\n if (Problem_Type.featOkTst && ((Problem_Type)jcasType).casFeat_docID == null)\n jcasType.jcas.throwFeatMissing(\"docID\", \"hw1.qa.Problem\");\n jcasType.ll_cas.ll_setStringValue(addr, ((Problem_Type)jcasType).casFeatCode_docID, v);}", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public void setId(java.lang.String value) {\n this.id = value;\n }", "public String getDocId() {\n return docId;\n }", "public String getDocumentId() {\n return this.documentId;\n }", "public void setIdNumber(String idNumber) {\n this.idNumber = idNumber;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(int id) {\r\n\t\t_id = id;\r\n\t}", "public void setId(String id) {\n\t\tthis._id = id;\n\t}", "protected void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id) {\n\tthis.id = id;\n }", "public void setDocumentNo (String DocumentNo);", "public void setDocumentNo (String DocumentNo);", "public void setDocumentNo (String DocumentNo);", "public Builder setDocumentIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n documentId_ = value;\n onChanged();\n return this;\n }", "public void setId(int id){\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(long id) { this.id = id; }" ]
[ "0.81468666", "0.7889941", "0.7867837", "0.74408585", "0.74408585", "0.7074753", "0.70632637", "0.70270485", "0.69319123", "0.6897175", "0.68290824", "0.67822385", "0.6779195", "0.6757341", "0.6717025", "0.667057", "0.6668697", "0.6667183", "0.6656891", "0.66399115", "0.6633424", "0.6631932", "0.6631932", "0.66202486", "0.6616691", "0.66095424", "0.6582611", "0.6581013", "0.6581013", "0.6579351", "0.6579351", "0.6579351", "0.6579351", "0.6579351", "0.6579351", "0.6579351", "0.6579351", "0.6579351", "0.6577036", "0.6577036", "0.6577036", "0.6577036", "0.6577036", "0.6577036", "0.6577036", "0.65760404", "0.65694445", "0.65664625", "0.6557235", "0.6554829", "0.6554829", "0.6551699", "0.6551699", "0.6545934", "0.65450466", "0.65450466", "0.6527989", "0.6527989", "0.6526341", "0.6526341", "0.6519817", "0.6519817", "0.6519817", "0.6519817", "0.6519817", "0.6512277", "0.6507282", "0.6507282", "0.6507282", "0.64962256", "0.64902824", "0.6488153", "0.64838547", "0.64838547", "0.64838547", "0.64838547", "0.64838547", "0.64838547", "0.64838547", "0.6473654", "0.6473654", "0.6473654", "0.64681125", "0.64681125", "0.64681125", "0.64681125", "0.6464686", "0.6462473", "0.6456624", "0.6455356", "0.64534783", "0.64534783", "0.64534783", "0.6452853", "0.64459854", "0.6443387", "0.6443387", "0.6443387", "0.6443387", "0.64404786" ]
0.66038454
26
Gets the job experience id.
public LongFilter getJobExperienceId() { return jobExperienceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}", "long getJobIDTarget();", "@Override\n\tpublic long getJobId() {\n\t\treturn model.getJobId();\n\t}", "public Long getJobID() {\n return jobID;\n }", "public String getJobID() {\n\t\t\treturn JobID;\n\t\t}", "public long getJobIDTarget() {\n return jobIDTarget_;\n }", "long getJobIDSource();", "public long getJobIDTarget() {\n return jobIDTarget_;\n }", "long getEncounterId();", "public JobId job() { return Objects.requireNonNull(job, \"production revisions have no associated job\"); }", "public int getExperience() {\n\t\treturn experience;\n\t}", "public int getExperience() {\r\n\t\treturn experience;\r\n\t}", "public int getJobId() {\r\n\t\treturn jobId;\r\n\t}", "public int getHC_EmployeeJob_ID();", "public BigDecimal getJOB_ID() {\r\n return JOB_ID;\r\n }", "@DISPID(1)\r\n\t// = 0x1. The runtime will prefer the VTID if present\r\n\t@VTID(7)\r\n\tint jobID();", "@Override\n\tpublic long getEmpId() {\n\t\treturn _employee.getEmpId();\n\t}", "public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n jobId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getJobId() {\n\t\treturn this.jobId;\n\t}", "public java.lang.String getJobId() {\n java.lang.Object ref = jobId_;\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 jobId_ = s;\n }\n return s;\n }\n }", "public int getExperience() {\n return _experience;\n }", "public int getJobId() ;", "public String getJobId() {\n return this.jobId;\n }", "public String getJobId() {\n return this.jobId;\n }", "public String getJobId() {\n return this.jobId;\n }", "ExperimenterId getExperimenterId();", "private synchronized int generateJobID() {\n\t\t/* generate JobID */\n\t\tint jobID = lastJobID;\n\t\tlastJobID += 1;\n\t\treturn jobID;\n\t}", "public int getJobNum()\n\t{\n\t\treturn jobNum;\n\t}", "public String getJobReqID() {\n\t\treturn jobReqID;\n\t}", "public String getJobId();", "public String getJobId() {\n return jobId;\n }", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-09-06 12:50:58.282 -0400\", hash_original_method = \"2053F7A68C82ABE32C2AF1BAEC4B5064\", hash_generated_method = \"ADA06475869C2F7BC91A27631CA3BF7E\")\n \npublic PrintJobId getId() {\n return mCachedInfo.getId();\n }", "long getProposalId();", "public int getEmpId() {\n\t\treturn empId;\n\t}", "public int getEmpId() {\n\t\treturn empId;\n\t}", "public long getJobIDSource() {\n return jobIDSource_;\n }", "public int getEmpId() {\n\t\treturn empId; \n\t}", "public long getJobIDSource() {\n return jobIDSource_;\n }", "java.lang.String getJobId();", "@Override\n\tpublic long getResumeId() {\n\t\treturn _candidate.getResumeId();\n\t}", "public void setJobExperienceId(LongFilter jobExperienceId) {\n\t\tthis.jobExperienceId = jobExperienceId;\n\t}", "public int getEmpId() {\n\t\treturn 0;\n\t}", "String experimentId();", "public int getHC_JobDataChange_ID();", "public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}", "int getSkillId();", "public Integer getResumeId() {\n return resumeId;\n }", "public String getJob() {\n return job;\n }", "public int getEmployeeId() {\n return employeeId_;\n }", "public int getEmployeeId() {\n return employeeId_;\n }", "int getEmployeeId();", "public long getEmployeeId() {\n\t\treturn employeeId;\n\t}", "public java.lang.String getJobNumber() {\r\n return jobNumber;\r\n }", "public int getEmployeeId() {\r\n\t\r\n\t\treturn employeeId;\r\n\t}", "com.google.protobuf.ByteString\n getJobIdBytes();", "long getWorkflowID();", "@Override\r\n\tpublic Experience getExperienceById(int id) {\n\t\treturn null;\r\n\t}", "public int getEmpId() {\n return id;\n }", "public int getExpId() {\n return expId;\n }", "public EntityID getAssignedAgentID();", "public String jobRunResourceId() {\n return this.jobRunResourceId;\n }", "@javax.annotation.Nullable\n @ApiModelProperty(value = \"The identifier of the job\")\n\n public String getJob() {\n return job;\n }", "public byte[] getNextJobID() {\n // Get next job id from GCS.\n synchronized (GlobalStateAccessor.class) {\n validateGlobalStateAccessorPointer();\n return this.nativeGetNextJobID(globalStateAccessorNativePointer);\n }\n }", "public long getEmployeeId();", "public int getExperience();", "public int getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "public Long getResumeId() {\n return resumeId;\n }", "public Integer getOpportunityID() {\n return opportunityID;\n }", "public java.lang.Object getOpportunityID() {\n return opportunityID;\n }", "protected abstract String getJobSubmitId();", "public int getEmployeeId() {\n\t\treturn employeeId;\n\t}", "@Override\n public String getTypeID() {\n return job_id;\n }", "public String getEntityId() {\r\n\t\treturn EngineTools.getEntityId(getEntityKeys()[2]);\r\n\t}", "@Digits(integer=9,fraction=0)\n\t@Override\n\tpublic String getJob() {\n\t\treturn super.getJob();\n\t}", "public long getEmployeeId() {\n return employeeId;\n }", "public Long getEmployeeId() {\r\n\t\treturn employeeId;\r\n\t}", "@Override\n public String getResumeID() {\n return resume_id;\n }", "@Override\n\tpublic String getId() {\n\t\tString pName = ctx.getCallerPrincipal().getName();\n\t\tPerson p = userEJB.findPerson(pName);\n\t\tString id = p.getId()+\"\";\n\t\treturn id;\n\t\t\n\t}", "int getQuestId();", "int getQuestId();", "int getQuestId();", "int getQuestId();", "public int getEmpID() {\n return empID;\n }", "public String getempID() {\n\t\treturn _empID;\n\t}", "public Job getJob();", "public static JobID generate() {\n return new JobID();\n }", "public int getEntityId ( ) {\n\t\treturn invokeSafe ( \"getEntityId\" );\n\t}", "public String getId() {\n return mBundle.getString(KEY_ID);\n }", "public BigDecimal getEmployerId() {\n return getEmployerIdProperty().getValue();\n }", "public Long getOpportunityId() {\n return opportunityId;\n }", "@Override\n\tpublic long getEmployeeId() {\n\t\treturn _userSync.getEmployeeId();\n\t}", "public com.google.protobuf.ByteString\n getJobIdBytes() {\n java.lang.Object ref = jobId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n jobId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "String getGameId();", "public String getEmpID() {\r\n return empID;\r\n }", "String getProcessInstanceID();", "@ApiModelProperty(required = true, value = \"JobId of associated job\")\n public String getJobId() {\n return jobId;\n }", "public int getEmulationId() {\n\t\treturn (id);\n\t}", "public JobOrder getJob() {\n\t\tif (job == null) {\n\t\t\tsetJob(findJobOrder(getPlacement().getJobOrder().getId()));\n\t\t}\n\t\treturn job;\n\t}", "public int getExamId();", "public String getJobName() {\n return this.mJob;\n }" ]
[ "0.7269919", "0.69500077", "0.68303925", "0.676199", "0.6616968", "0.6515507", "0.65071774", "0.6506822", "0.64220333", "0.64186704", "0.6373122", "0.6346345", "0.63343763", "0.63090557", "0.63014215", "0.6285017", "0.62804943", "0.6257167", "0.62092483", "0.6205595", "0.61357987", "0.6134735", "0.61320907", "0.61320907", "0.61320907", "0.6083994", "0.6071501", "0.60452926", "0.602468", "0.60117614", "0.6007555", "0.60033405", "0.5979702", "0.59228945", "0.59228945", "0.59148496", "0.59110594", "0.590813", "0.58877283", "0.5857592", "0.5854218", "0.5845332", "0.58166474", "0.57848984", "0.57547915", "0.57364947", "0.5725963", "0.57129234", "0.5679173", "0.5676379", "0.5669381", "0.5665337", "0.56348515", "0.5625227", "0.5623729", "0.56108415", "0.56047523", "0.5601011", "0.5599859", "0.55785847", "0.5577854", "0.55777985", "0.5574031", "0.55685365", "0.5554133", "0.5552704", "0.5551631", "0.55469114", "0.5546817", "0.55439824", "0.55346894", "0.55273604", "0.55220836", "0.5518654", "0.55136234", "0.55094284", "0.55089813", "0.54790395", "0.54734147", "0.54734147", "0.54734147", "0.54734147", "0.5472338", "0.5471964", "0.5458986", "0.5448453", "0.54484427", "0.5442522", "0.54418546", "0.54302365", "0.5428124", "0.5414068", "0.54135317", "0.54096127", "0.5399932", "0.53971285", "0.5384038", "0.53740156", "0.5373499", "0.5370976" ]
0.7536718
0
Sets the job experience id.
public void setJobExperienceId(LongFilter jobExperienceId) { this.jobExperienceId = jobExperienceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setExperience(int experience) {\n _experience = experience;\n }", "public void setExperience(int experience) {\r\n\t\tthis.experience = experience;\r\n\t}", "void setExperimentId(final int newExperimentID);", "public void setHC_EmployeeJob_ID (int HC_EmployeeJob_ID);", "public LongFilter getJobExperienceId() {\n\t\treturn jobExperienceId;\n\t}", "public void assignId(int id);", "public void setId(int id) {\r\n this.id = id;\r\n job = acceptFreelancerBean.getJob(id); \r\n if (job!= null){\r\n fid=job.getFid();\r\n }\r\n }", "public void setJobId( int jobId ) ;", "public JobBuilder id(int id) {\r\n job.setId(id);\r\n return this;\r\n }", "public Builder setJobIDTarget(long value) {\n bitField0_ |= 0x00000010;\n jobIDTarget_ = value;\n onChanged();\n return this;\n }", "public void setJob(Job jobNum){\n job = jobNum;\n }", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setJobIDs(Collection<Integer> jobIds) {\n\t\tthis.jobsId.addAll(jobIds);\n\t}", "public void setEmployeeId(long employeeId);", "int incExperimentId();", "public Object setID(int iD)\r\n/* */ {\r\n\t\t\t\tlogger.info(count++ + \" About to setId : \" + \"Agent\");\r\n/* 51 */ \tthis.myID = iD;\r\n/* 52 */ \treturn this;\r\n/* */ }", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setCurrentPersonId(int personId) {\n currentPersonId = personId;\n }", "public void setId(long id){\n\t\tthis.id = id;\n\t}", "public void setId(java.lang.Long newId);", "@Override\n\tpublic void setEmpId(long empId) {\n\t\t_employee.setEmpId(empId);\n\t}", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\r\n this.id = id;\r\n }", "@Override\n\tpublic void setJobId(long jobId) {\n\t\tmodel.setJobId(jobId);\n\t}", "public void setID(long id);", "@Override\r\n\tpublic void setId(String id) {\n\t\tmProductionId = id;\r\n\t}", "public void setIdImovel(String idImovel) {\r\n this.idImovel = idImovel;\r\n }", "public void setId(long id) throws InvalidIdException {\n// System.out.println(\"Id passed is: \" + id);\n // Check if the ID is within range\n if(id >= MINIMUM_ID_NUMBER && id <= MAXIMUM_ID_NUMBER) {\n \n // Set this value to the attribtue\n this.id = id;\n } else { // If not\n \n // Then throw error and display error message.\n throw new InvalidIdException(\"Employee ID must be between \" + \n MINIMUM_ID_NUMBER + \" and \" + MAXIMUM_ID_NUMBER);\n } \n }", "public void setId(String agendaItemId) {\r\n if (agendaItemId != null && StringUtils.isBlank(agendaItemId)) {\r\n throw new IllegalArgumentException(\"agendaItemId must be null or non-blank\");\r\n }\r\n\t\t\tthis.id = agendaItemId;\r\n\t\t}", "void setId(int val);", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\r\n\t\tthis.id = id;\r\n\t}", "public JobLog setId(long id) {\n this.id = id;\n return this;\n }", "protected void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id) {\n\tthis.id = id;\n }", "public void setId(String anId) {\n _theId = anId;\n }", "public void setJobId(int jobId) {\r\n\t\tthis.jobId = jobId;\r\n\t}", "public br.unb.cic.bionimbus.avro.gen.JobInfo.Builder setId(java.lang.String value) {\n validate(fields()[0], value);\n this.id = value;\n fieldSetFlags()[0] = true;\n return this; \n }", "@Override\n public void setId(final long id) {\n super.setId(id);\n }", "public void setId(final int id);", "public abstract void setEspe_id(java.lang.Integer newEspe_id);", "public JobPreference(Integer id) {\n super.id=id;\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "public void setId(long value) {\r\n this.id = value;\r\n }", "void setId(int id);", "void setId(Long id);", "private void setEmployeeID() {\n try {\n employeeID = userModel.getEmployeeID(Main.getCurrentUser());\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }", "@Override\n\tpublic void setId(long id) {\n\t\tthis.id = id;\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\tthis.id = id;\n\t}", "@Override\n\tpublic void setResumeId(long resumeId) {\n\t\t_candidate.setResumeId(resumeId);\n\t}", "protected void setId(long id) {\n if (this.id == -1)\n this.id = id;\n }", "public void setJobID(int jobId) {\n\t\tthis.jobsId.add(jobId);\n\t}", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setId(String id) {\n mBundle.putString(KEY_ID, id);\n }", "public void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id) {\n\t\tthis.id = id;\n\t}", "public void xsetEnumSkillId(org.apache.xmlbeans.XmlString enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.set(enumSkillId);\n }\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "public void setId(long value) {\n this.id = value;\n }", "@Override\n\tpublic void setId(long id) {\n\t\t_phieugiahan.setId(id);\n\t}", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setHC_JobDataChange_ID (int HC_JobDataChange_ID);", "@Override\r\n\tpublic Experience getExperienceById(int id) {\n\t\treturn null;\r\n\t}", "public void setId(long id) {\n id_ = id;\n }", "@Override\n\tpublic void setId(int id) {\n\t\tthis.ID = id;\n\t}", "@Override\n\tpublic void setId(long value) {\n super.setId(value);\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "long getJobIDTarget();", "public void setEmployeeid(long employeeid)\n {\n this.employeeid = employeeid;\n }", "@Override\n public void setId(int id) {\n this.id = id;\n }", "public void setId(int id);", "public void setId(int id);", "public void setEmpId(int parseInt) {\n\t\t\n\n\n\t\t\n\t}", "public void setUpInterview(String jobID, String email){\n appList= JobSystemCoordinator.appManager.getPendingApplications(jobID);\n currentJob = getJobAtIndex(jobID);\n for(Application app : appList){\n if(app.getApplicant().getEmail().equals(email)){\n app.setStatus(\"Awaiting Interview\");\n String success = String.format(\"===========SETTING UP INTERVIEWS FOR A JOB========\\n\" +\n \"Details of setting up interviews:\\n\" +\n \"Job ID: %s\\n\" +\n \"Candidate list: %s\\n\",currentJob.getJobID(),app.getApplicant().getEmail());\n System.out.println(success);\n }\n }\n }", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "public void setId(int id){\r\n this.id = id;\r\n }", "public void setJOB_ID(BigDecimal JOB_ID) {\r\n this.JOB_ID = JOB_ID;\r\n }", "public void setId(int newId) {\n this.id = newId;\n }", "public void setId(int id){\n\t\tthis.id = id;\n\t}" ]
[ "0.6823854", "0.6749702", "0.6466542", "0.63897055", "0.62478507", "0.600294", "0.588622", "0.5881706", "0.57696605", "0.56940114", "0.56871104", "0.5605373", "0.5605373", "0.5605373", "0.5605373", "0.5564715", "0.55641085", "0.5539473", "0.5528798", "0.5483728", "0.54715323", "0.5463092", "0.54625607", "0.54624254", "0.54554796", "0.54554796", "0.54513776", "0.54513776", "0.5437573", "0.5423689", "0.5421443", "0.54187906", "0.5417769", "0.5394319", "0.5393889", "0.53922516", "0.53873515", "0.53873515", "0.53873515", "0.53873515", "0.53873515", "0.5381128", "0.5381128", "0.5375245", "0.5375245", "0.5375245", "0.5369579", "0.53669924", "0.5365492", "0.5364436", "0.5359182", "0.53583026", "0.5352111", "0.53496915", "0.5349084", "0.5346252", "0.53412485", "0.53412485", "0.5340115", "0.5340044", "0.53399223", "0.53353643", "0.53353643", "0.5333209", "0.53276336", "0.5326179", "0.53207725", "0.532014", "0.5317849", "0.5317849", "0.5317849", "0.5317849", "0.5305979", "0.5303166", "0.5303166", "0.5303166", "0.5303166", "0.5303166", "0.5303166", "0.5303166", "0.5296506", "0.5295953", "0.52861065", "0.52813286", "0.5278458", "0.527135", "0.52671117", "0.52655816", "0.5260116", "0.52591205", "0.5258072", "0.52545", "0.52545", "0.5254352", "0.52523774", "0.525157", "0.5248051", "0.52475005", "0.52472425", "0.5246392" ]
0.67332715
2
Gets the education id.
public LongFilter getEducationId() { return educationId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getEducationId() {\n return educationId;\n }", "public Integer getEduId() {\n return eduId;\n }", "public void setEducationId(Integer educationId) {\n this.educationId = educationId;\n }", "long getEncounterId();", "public Long getCollegeId() {\n return collegeId;\n }", "public Integer getCollege_id() {\n\t\treturn college_id;\n\t}", "public int getId() {\n\n\t\treturn id; // returns student id\n\n\t}", "public String getEducationLevel(){\n\t\t\n\t\treturn this.edulvl;\n\t}", "public int getInstructorID()\n\t{\n\t\treturn instructorID;\n\t}", "public int getExamId();", "public Long getIdCourse() {\n return idCourse;\n }", "public int setEducationalGrade(String education) {\n return Integer.parseInt(education.split(\"\\\\s+\")[1]);\n }", "public long getEulaId() {\n return eulaId;\n }", "public String getIdCourse() {\n\t\t\treturn idCourse;\n\t\t}", "public void setEduId(Integer eduId) {\n this.eduId = eduId;\n }", "int getDoctorId();", "int getDoctorId();", "public abstract java.lang.Integer getEspe_id();", "public final Long getId_etudiant() {\n return this.id_etudiant;\n }", "public long getStudentID();", "@Override\n public String getHighEdu() {\n return high_education;\n }", "public Long getGradeCourseId() {\n\t\treturn gradeCourseId;\n\t}", "public Integer geteId() {\n return eId;\n }", "public Integer geteId() {\n return eId;\n }", "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 }", "@RequestMapping(value = \"/resume-educations/{id}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public ResponseEntity<ResumeEducation> getResumeEducation(@PathVariable Long id) {\n log.debug(\"REST request to get ResumeEducation : {}\", id);\n ResumeEducation resumeEducation = resumeEducationRepository.findOne(id);\n return Optional.ofNullable(resumeEducation)\n .map(result -> new ResponseEntity<>(\n result,\n HttpStatus.OK))\n .orElse(new ResponseEntity<>(HttpStatus.NOT_FOUND));\n }", "int getSkillId();", "@ApiModelProperty(value = \"Unique Identifier of the Detailed Estimate Deduction\")\n\n\tpublic String getId() {\n\t\treturn id;\n\t}", "public void setEducationId(LongFilter educationId) {\n\t\tthis.educationId = educationId;\n\t}", "public int getID() {\n return courseID;\n }", "public long getPersonId();", "int getEmployeeId();", "public ArrayList<Education> getEducation(){\r\n\t\treturn edu;\t\t\r\n\t}", "public Integer getExpertId() {\n return expertId;\n }", "@Override\n\tpublic long getId() {\n\t\treturn _phieugiahan.getId();\n\t}", "public int getCourseId()\n {\n return this.courseId;\n }", "public long getLichChiTietId();", "public int getId() \r\n {\r\n return studentId;\r\n }", "public int getStudentId();", "long getProposalId();", "private int getTeacherID(){\n return getSharedPreferences(\"TEACHER_INFO\", Context.MODE_PRIVATE).\n getInt(\"ID_TEACHER\",0);\n }", "public Integer getIdAluguel() {\n\t\treturn idAluguel;\n\t}", "public long getCourseId() {\n return _courseImage.getCourseId();\n }", "public String getSelectedEducation() {\n if (cbxEducation.getSelectedIndex() > 0 && cbxEducation.getSelectedIndex() < vecEducationKeys.size())\n return ((String)vecEducationKeys.elementAt(cbxEducation.getSelectedIndex())).trim();\n return \"\";\n }", "Enrollment findOne(Long id);", "public Identificator getId() {\n\t\tIdentificator id = null;\n\t\tif ((getMdht().getIds() != null) && (getMdht().getIds().size() > 0)) {\n\t\t\tid = new Identificator(getMdht().getIds().get(0));\n\t\t}\n\t\treturn id;\n\t}", "long getAdId();", "public Integer getId() {\n\t\treturn getPatientId();\n\t}", "public Integer getProfessionId() {\n return professionId;\n }", "public Integer getEnterpriseId() {\n return enterpriseId;\n }", "public Education getEducation(int n) {\r\n\t\tif(edu.size()>n && n>=0)\r\n\t\t\treturn edu.get(n);\r\n\t\telse\r\n\t\t\treturn null;\r\n\t}", "public Long getSchoolId() {\n return schoolId;\n }", "public Long getSchoolid() {\n return schoolid;\n }", "public static String getIdd() {\n return idd;\n }", "java.lang.String getAoisId();", "public long getIdTutorIndustrial() {\n return this.idTutorIndustrial;\n }", "public int getEducationalGrade() {\n return educationalGrade;\n }", "java.lang.String getID();", "Integer getID();", "Integer getID();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "long getId();", "public String getEadid() {\n return this.eadid;\n }", "public String getCourseID() {\r\n return COURSE_ID;\r\n }", "public int getExamGradeId() {\n return examGradeId;\n }", "public int getEdad();", "@Override\n\tpublic long getStudentId() {\n\t\treturn model.getStudentId();\n\t}", "public long getEmployeeId();", "@GET\n @Path(\"/{educationId : \\\\d+}\") // catch only numeric identifiers\n @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n public Response getEducation( @PathParam(\"educationId\") Long educationId,\n @BeanParam GenericBeanParam params ) throws ForbiddenException, NotFoundException {\n\n RESTToolkit.authorizeAccessToWebService(params);\n logger.log(Level.INFO, \"returning given Education by executing EducationResource.getEducation(educationId) method of REST API\");\n\n Education foundEducation = educationFacade.find(educationId);\n if(foundEducation == null)\n throw new NotFoundException(\"Could not find education for id \" + educationId + \".\");\n\n // adding hypermedia links to education resource\n EducationResource.populateWithHATEOASLinks(foundEducation, params.getUriInfo());\n\n return Response.status(Status.OK).entity(foundEducation).build();\n }", "public int getCourseID() {\n return courseID;\n }", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();", "public int getAD_Org_ID();" ]
[ "0.8400157", "0.72539246", "0.69760424", "0.6635546", "0.6531398", "0.6476964", "0.6427482", "0.63793916", "0.63714224", "0.63478386", "0.6341603", "0.62582743", "0.62469816", "0.6237007", "0.6237005", "0.62183964", "0.62183964", "0.6164355", "0.6119109", "0.61173135", "0.6115892", "0.60898477", "0.6088737", "0.6088737", "0.60704744", "0.60615855", "0.6059741", "0.6033955", "0.603389", "0.6006168", "0.5962945", "0.59622806", "0.59470946", "0.5943494", "0.5927847", "0.5920913", "0.59190726", "0.5905086", "0.58973503", "0.5884016", "0.58684087", "0.58536816", "0.584001", "0.5836565", "0.583546", "0.58253634", "0.5816315", "0.58157444", "0.5810885", "0.5808049", "0.58068174", "0.5806401", "0.5801122", "0.5799648", "0.5790923", "0.57874745", "0.5780355", "0.5768689", "0.5768433", "0.5768433", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.57677627", "0.5763469", "0.5762163", "0.57596296", "0.57586735", "0.5752509", "0.5748827", "0.5741543", "0.57409734", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401", "0.57401" ]
0.78037626
1
Sets the education id.
public void setEducationId(LongFilter educationId) { this.educationId = educationId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEducationId(Integer educationId) {\n this.educationId = educationId;\n }", "public Integer getEducationId() {\n return educationId;\n }", "public LongFilter getEducationId() {\n\t\treturn educationId;\n\t}", "public void setEduId(Integer eduId) {\n this.eduId = eduId;\n }", "public void setEducation(Education edu) {\n\t\tthis.edu = edu;\n\t}", "public void setIdTutorIndustrial(long idTutorIndustrial) {\n this.id = this.idTutorIndustrial = idTutorIndustrial;\n }", "public void setIdCourse(Long idCourse) {\n this.idCourse = idCourse;\n }", "private void setStudentId() {\n\t id++;\n\t this.studentId=gradeYear+\"\"+id;\n }", "public EducationalLevel setEducationalLevel(String education) {\n switch (education.split(\"\\\\s+\")[0]) {\n case \"Primary\":\n return EducationalLevel.Primary;\n case \"Secondary\":\n return EducationalLevel.Secondary;\n default:\n return EducationalLevel.JC;\n }\n }", "public abstract void setEspe_id(java.lang.Integer newEspe_id);", "void setExperimentId(final int newExperimentID);", "public int setEducationalGrade(String education) {\n return Integer.parseInt(education.split(\"\\\\s+\")[1]);\n }", "public final void setId_etudiant(final Long id_etudiant) {\n this.id_etudiant = id_etudiant;\n }", "public void setIdExperienciaEducativa(Integer idExperienciaEducativa) {\r\n this.idExperienciaEducativa = idExperienciaEducativa;\r\n }", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setCollegeId(Long collegeId) {\n this.collegeId = collegeId;\n }", "public void assignId(int id);", "@RequestMapping(\"/editEducation\")\r\n\t\tpublic String editEducation(@RequestParam(\"id\") Long id, ModelMap modelMap) {\r\n\t\tEducationQualification education = educationRepo.findEducationById(id);\r\n\t\tmodelMap.addAttribute(\"education\", education);\r\n\t\t\treturn \"updateEducationDetails\";\r\n\r\n\t\t}", "private void setStudentID() {\n\t\tid++;\n\t\tthis.studentId = gradeYear + \"\" + id;\n\t\tSystem.out.println(this.studentId);\n\t}", "@PUT\n @Path(\"/{educationId : \\\\d+}\") // catch only numeric identifiers\n @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})\n public Response updateEducation( @PathParam(\"educationId\") Long educationId,\n Education education,\n @BeanParam GenericBeanParam params ) throws ForbiddenException, UnprocessableEntityException, InternalServerErrorException {\n\n RESTToolkit.authorizeAccessToWebService(params);\n logger.log(Level.INFO, \"updating existing Education by executing EducationResource.updateEducation(educationId, education) method of REST API\");\n\n // set resource ID passed in path param on updated resource object\n education.setEducationId(educationId);\n\n Education updatedEducation = null;\n try {\n // reflect updated resource object in database\n updatedEducation = educationFacade.update(education, true);\n // populate created resource with hypermedia links\n EducationResource.populateWithHATEOASLinks(updatedEducation, params.getUriInfo());\n\n } catch (EJBTransactionRolledbackException ex) {\n ExceptionHandler.handleEJBTransactionRolledbackException(ex);\n } catch (EJBException ex) {\n ExceptionHandler.handleEJBException(ex);\n } catch (Exception ex) {\n throw new InternalServerErrorException(ExceptionHandler.ENTITY_UPDATE_ERROR_MESSAGE);\n }\n\n return Response.status(Status.OK).entity(updatedEducation).build();\n }", "public static void setsemesterId(int semesterId) {\n ListOfSubjects.semesterId =semesterId;\n\n }", "private void setId(int ida2) {\n\t\tthis.id=ida;\r\n\t}", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setAD_Org_ID (int AD_Org_ID);", "public void setId(java.lang.Long newId);", "public void setId(String eId) {\n\t\tmId = eId;\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\t_phieugiahan.setId(id);\n\t}", "public void setCollege_id(Integer college_id) {\n\t\tthis.college_id = college_id;\n\t}", "public final void setId_entreprise(final Long id_entreprise) {\n this.id_entreprise = id_entreprise;\n }", "public void setID(long id);", "public void setIdade(int idade) {\n\t\tthis.idade = idade;\n\t}", "public void setIdade(int idade) {\r\n\t\t// QUALIFICADOR = THIS\r\n\t\tthis.idade = idade;\r\n\t}", "public void setStudentId(int studentId);", "public void setId(final int id);", "public void setId(final TeamStudentPK id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setStudentID(long studentID);", "public void setId(String anId) {\n _theId = anId;\n }", "public void setIdPerson(Integer idPerson) {\r\n this.idPerson = idPerson;\r\n }", "public void setIdCandidatura(int idCandidatura){\n if (idCandidatura < 0 ) {\n throw new IdInvalidoException(\"Id da Candidatura é inválido!\");\n }\n this.idCandidatura = idCandidatura;\n }", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setIden(int iden) {\n this.iden = iden;\n }", "public void setID(int id);", "public void setId_sede(int id_sede) {\n this.id_sede = id_sede;\n }", "public void setIdDePropiedad(long newIdDePropiedad) {\r\n this.idDePropiedad = newIdDePropiedad;\r\n }", "public void setIdInstitution(String idInstitution) {\n this.idInstitution = UUID.fromString(idInstitution);\n }", "void setId(Long id);", "public Integer getEduId() {\n return eduId;\n }", "public void setId(int newId) {\n this.id = newId;\n }", "public void setId( Long id );", "public void setCurrentPersonId(int personId) {\n currentPersonId = personId;\n }", "public void setId(int id);", "public void setId(int id);", "@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}", "public void setId_anneeScolaire(int id_anneeScolaire) {this.id_anneeScolaire = id_anneeScolaire;}", "void setId(int id);", "public void setId(long id){\n\t\tthis.id = id;\n\t}", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id){\n\t\tthis.id = id;\n\t}", "@Override\n\tpublic void setId(int id) {\n\t\t_keHoachKiemDemNuoc.setId(id);\n\t}", "final public void setId(int idp) {\n\t\tid = idp;\n\t\tidSet = true;\n\t}", "private void setId(int value) {\n \n id_ = value;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\n public void testSetId_edificio() {\n System.out.println(\"setId_edificio\");\n int id_edificio = 1;\n DboEdificio instance = new DboEdificio(1, \"T-3\");\n instance.setId_edificio(id_edificio);\n \n }", "public void setID(String newID)\r\n {\r\n id=newID;\r\n }", "public void setId(int newId) {\n roomId = newId;\n }", "public void setId(String id)\n\t{\n\t\tm_sID=id;\t\n\t}", "public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId(String id) {\r\n\t\tsId = id;\r\n\t}", "public void setId(int newId) {\n\tid = newId;\n}", "public void setId(long id) {\r\n this.id = id;\r\n }", "public void addEducation(Education e) {\r\n\t\tedu.add(e);\t\t\r\n\t}", "public void setId(String idIn) {\n this.id = idIn;\n }", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(long id) {\n id_ = id;\n }", "public void setId(int id)\n {\n\tthis.id = id;\n }", "ReEducation selectByPrimaryKey(Integer educationid);", "public void setId(int id) {\n \t\tthis.id = id;\n \t}", "public void setId(int id) {\r\n\t\t_id = id;\r\n\t}", "void setId(Integer id);", "public void setId(int value) {\r\n this.id = value;\r\n }", "public void setId(Long id) {\n\t\t\n\t}", "public void setId(long id) {\n this.id = id;\n }", "public void setId(long id) {\n this.id = id;\n }" ]
[ "0.76139724", "0.71283615", "0.6637101", "0.6551539", "0.63970715", "0.6348243", "0.6291561", "0.6169684", "0.6131925", "0.61161625", "0.60368955", "0.59849334", "0.5951123", "0.58917934", "0.5884953", "0.5884953", "0.5884953", "0.5884953", "0.58534145", "0.58456415", "0.58420485", "0.58411735", "0.5839794", "0.5812752", "0.58050275", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5780427", "0.5763674", "0.57574856", "0.5755838", "0.57412475", "0.5735964", "0.5720573", "0.5718994", "0.571869", "0.5698279", "0.5692984", "0.5659549", "0.5658669", "0.56500316", "0.5643886", "0.5640957", "0.5638802", "0.56378406", "0.56322896", "0.5631693", "0.56297797", "0.5626887", "0.56208", "0.561966", "0.56192815", "0.561886", "0.5614293", "0.5609523", "0.5609523", "0.5607872", "0.560773", "0.5607116", "0.5602286", "0.5598657", "0.5598657", "0.5597582", "0.55918956", "0.5591809", "0.55909085", "0.55858016", "0.55776316", "0.5573734", "0.5563892", "0.5557923", "0.55573034", "0.55489606", "0.5546785", "0.5546672", "0.5538533", "0.5536963", "0.5536598", "0.5535598", "0.5535444", "0.5530196", "0.5529954", "0.5526775", "0.55232483", "0.5522228", "0.5517791", "0.55129033", "0.5512157", "0.55108887", "0.55108887" ]
0.6892828
2
Gets the skill id.
public LongFilter getSkillId() { return skillId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getSkillId();", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "public Integer getSkillId() {\n return skillId;\n }", "public String getSkill() {\n\t\treturn skill;\n\t}", "public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public LongFilter getSkillTagId() {\n\t\treturn skillTagId;\n\t}", "Skill getSkill(Long skillId) throws DbException;", "public org.apache.xmlbeans.XmlString xgetEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n return target;\n }\n }", "public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }", "public Builder setSkillId(int value) {\n \n skillId_ = value;\n onChanged();\n return this;\n }", "@Override\n\tpublic Skill getSkill(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t//now retrieve/read from database using the primary key\n\t\tSkill theSkill = currentSession.get(Skill.class, theId);\n\t\t\n\t\treturn theSkill;\n\t}", "public com.transerainc.aha.gen.agent.SkillDocument.Skill getSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Double getSkillNumber() {\n return skillNumber;\n }", "public int getId() {\n\n\t\treturn id; // returns student id\n\n\t}", "String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }", "@Override\n public int getSkillLevel(int skillId) {\n final Skill skill = getKnownSkill(skillId);\n return (skill == null) ? 0 : skill.getLevel();\n }", "int getQuestId();", "int getQuestId();", "int getQuestId();", "int getQuestId();", "public String getSkillsetName() {\n return skillsetName;\n }", "java.lang.String getCombatNpcPersonalityId();", "public int getSkillType() {\n\t\treturn 1;\n\t}", "@Override\n\tpublic long getId() {\n\t\treturn _phieugiahan.getId();\n\t}", "public wbcadventure.Skill getSkill(int skillNumber){\n switch(skillNumber){\n case 0 : return skill1;\n case 1 : return skill2;\n case 2 : return skill3;\n case 3 : return skill4;\n }\n return null;\n }", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "public String getId() {\n return mBundle.getString(KEY_ID);\n }", "public int getId(){\n if (ID != null) {\n int i = Integer.parseInt(ID);\n return i;\n }\n return 0;\n }", "public String getId()\r\n {\r\n return getAttribute(\"id\");\r\n }", "java.lang.String getRecognitionId();", "Skill getSkill(String name);", "public long getId() {\n\t\treturn getTo(true).getId();\n\t}", "public Integer getId() {\n return (Integer) get(0);\n }", "public Long getQuestionId();", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public long getId() {\n\t\treturn Long.parseLong(_id);\n\t}", "public int getId() {\n\t\treturn Integer.parseInt(Id);\n\t}", "public Integer getId() {\n\t\treturn getPatientId();\n\t}", "long getProposalId();", "@NonNull\n String getId();", "public java.lang.Integer getId () {\n\t\treturn _id;\n\t}", "public int getId() {\n if (!this.registered)\n return -1;\n return id;\n }", "public String getId ()\n {\n org.omg.CORBA.portable.InputStream $in = null;\n try {\n org.omg.CORBA.portable.OutputStream $out = _request (\"getId\", true);\n $in = _invoke ($out);\n String $result = $in.read_string ();\n return $result;\n } catch (org.omg.CORBA.portable.ApplicationException $ex) {\n $in = $ex.getInputStream ();\n String _id = $ex.getId ();\n throw new org.omg.CORBA.MARSHAL (_id);\n } catch (org.omg.CORBA.portable.RemarshalException $rm) {\n return getId ( );\n } finally {\n _releaseReply ($in);\n }\n }", "@SneakyThrows\n @Override\n public DeveloperSkill findByID(Long id) {\n return null; //parse.get(Math.toIntExact(id));\n }", "java.lang.String getPlayerId();", "public long getId() {\n\t\treturn(id);\n\t}", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "int getQuestID();", "int getQuestID();", "int getQuestID();", "int getQuestID();", "String getSlingId();", "public java.lang.Integer getId () {\r\n return id;\r\n }", "public int getId() {\n return parameter.getId();\n }", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public java.lang.Integer getId () {\n\t\treturn id;\n\t}", "public Integer getId() {\n return id.get();\n }", "public int getHighestCombatSkill() {\r\n int id = 0;\r\n int last = 0;\r\n for (int i = 0; i < 5; i++) {\r\n if (staticLevels[i] > last) {\r\n last = staticLevels[i];\r\n id = i;\r\n }\r\n }\r\n return id;\r\n }", "public static String getSkillName(int skillId) {\n switch (skillId) {\n case Constants.SKILLS_ATTACK:\n return \"Attack\";\n case Constants.SKILLS_STRENGTH:\n return \"Strength\";\n case Constants.SKILLS_RANGE:\n return \"Range\";\n case Constants.SKILLS_DEFENSE:\n return \"Defence\";\n case Constants.SKILLS_MAGIC:\n return \"Magic\";\n case Constants.SKILLS_COOKING:\n return \"Cooking\";\n case Constants.SKILLS_FISHING:\n return \"Fishing\";\n case Constants.SKILLS_WOODCUTTING:\n return \"WC\";\n case Constants.SKILLS_HITPOINTS:\n return \"HitPoints\";\n case Constants.SKILLS_AGILITY:\n return \"Agility\";\n default:\n return \"None\";\n }\n }", "public Integer getId() {\n return (Integer) get(\"id\");\n }", "public Long getId() {\n return this.id.get();\n }", "public int getStoryId();", "public int getQuestId() {\n return questId_;\n }", "public int getQuestId() {\n return questId_;\n }", "public int getQuestId() {\n return questId_;\n }", "public int getQuestId() {\n return questId_;\n }", "long getEncounterId();", "public String getId()\n\t{\n\t\treturn getId( getSession().getSessionContext() );\n\t}", "public final int getId() {\n\t\treturn this.accessor.getId();\n\t}", "long getPlayerId();", "public Skill find(Long id) {\n\t\treturn entityManager.find(Skill.class, id);\n\t}", "int getMyId();" ]
[ "0.8097341", "0.79250205", "0.7914065", "0.7879266", "0.6739141", "0.6522001", "0.63940805", "0.63481915", "0.6325051", "0.6312896", "0.6176276", "0.61573267", "0.6153627", "0.60240066", "0.5992534", "0.5915808", "0.5904005", "0.5894325", "0.5894325", "0.5894325", "0.5894325", "0.5871635", "0.5820485", "0.5785097", "0.5783344", "0.5781786", "0.5756068", "0.57273716", "0.5708729", "0.5706067", "0.56941086", "0.564838", "0.5646118", "0.56314313", "0.5626743", "0.5598104", "0.5586876", "0.555185", "0.5548833", "0.5548719", "0.5520862", "0.5520111", "0.5519419", "0.5514599", "0.55131704", "0.5505711", "0.5505143", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.55030704", "0.5501129", "0.5501129", "0.5501129", "0.5501129", "0.5498874", "0.54943496", "0.5494026", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.549088", "0.5490197", "0.54848486", "0.54829085", "0.5482541", "0.5478554", "0.5474459", "0.5473302", "0.5473302", "0.5473302", "0.5473302", "0.54662937", "0.54646915", "0.54644346", "0.5460652", "0.5458994", "0.54467285" ]
0.74389416
4
Sets the skill id.
public void setSkillId(LongFilter skillId) { this.skillId = skillId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setSkillId(int value) {\n \n skillId_ = value;\n onChanged();\n return this;\n }", "public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "public Integer getSkillId() {\n return skillId;\n }", "public void xsetEnumSkillId(org.apache.xmlbeans.XmlString enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.set(enumSkillId);\n }\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "public void setEnumSkillId(java.lang.String enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.setStringValue(enumSkillId);\n }\n }", "int getSkillId();", "public Builder clearSkillId() {\n \n skillId_ = 0;\n onChanged();\n return this;\n }", "public LongFilter getSkillId() {\n\t\treturn skillId;\n\t}", "@Override\n\tpublic void setId(long id) {\n\t\t_phieugiahan.setId(id);\n\t}", "void changeSkill(Long pokemonId, int newSkill);", "public Builder setQuestId(int value) {\n bitField0_ |= 0x00000002;\n questId_ = value;\n onChanged();\n return this;\n }", "public Builder setQuestId(int value) {\n bitField0_ |= 0x00000002;\n questId_ = value;\n onChanged();\n return this;\n }", "public Builder setQuestId(int value) {\n bitField0_ |= 0x00000002;\n questId_ = value;\n onChanged();\n return this;\n }", "public Builder setQuestId(int value) {\n bitField0_ |= 0x00000010;\n questId_ = value;\n onChanged();\n return this;\n }", "public void setId(final int id);", "public void resetSkill(int id) {\r\n this.staticLevels[id] = id == HITPOINTS ? 10 : 1;\r\n this.dynamicLevels[id] = id == HITPOINTS ? 10 : 1;\r\n this.experience[id] = id == HITPOINTS ? 1154 : 0;\r\n refresh();\r\n updateCombatLevel();\r\n if (entity instanceof Player) {\r\n Player player = (Player) entity;\r\n player.getAppearance().sync();\r\n }\r\n }", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(long id);", "public void setId(final TeamStudentPK id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\n mBundle.putString(KEY_ID, id);\n }", "public void setId (int id) {\r\n\t\tthis.id=id;\r\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int id) {\n\t\tthis._id = id;\n\t}", "public void setId(int id){\n\t\tthis.id = id;\n\t}", "public Builder setQuestID(int value) {\n bitField0_ |= 0x00000002;\n questID_ = value;\n onChanged();\n return this;\n }", "public Builder setQuestID(int value) {\n bitField0_ |= 0x00000002;\n questID_ = value;\n onChanged();\n return this;\n }", "public Builder setQuestID(int value) {\n bitField0_ |= 0x00000002;\n questID_ = value;\n onChanged();\n return this;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = String.valueOf(this.hashCode());\n }", "public void setId(int id) {\n \t\tthis.id = id;\n \t}", "public void setId(final String id);", "public void setId(final String id);", "public void setId(int id_)\n\t{\n\t\tthis.id=id_;\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id){\r\n this.id = id;\r\n }", "public Builder setQuestID(int value) {\n bitField0_ |= 0x00000001;\n questID_ = value;\n onChanged();\n return this;\n }", "public void setId(int id) {\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(int id) {\n this.id = id;\n }", "public void setId(String id){\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String id) {\r\n\t\tsId = id;\r\n\t}", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId(int id) {\r\n this.id = id;\r\n }", "public void setId (String id)\n {\n _id = id;\n }", "private void setId(String id) {\r\n\t\tAssert.hasText(id, \"This state must have a valid identifier\");\r\n\t\tthis.id = id;\r\n\t}", "public void setId (long id)\r\n {\r\n _id = id;\r\n }", "public void setId(String id) {\n\t\tthis._id = id;\n\t}", "@Override\n public void setId(int id) {\n this.id = id;\n }", "public void setId(String id)\n\t{\n\t\tm_sID=id;\t\n\t}", "public void setId(ID id){\r\n\t\tthis.id = id;\r\n\t}", "public void setId(int id) {\r\n\t\t_id = id;\r\n\t}", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id)\n {\n this.id = id;\n }", "public void setId(int id) {\n\t\tif(id > 0)\n\t\t\tthis.id = id;\n\t}", "public void setId(String anId) {\n _theId = anId;\n }", "public void setId(String id) {\n _id = id;\n }", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(int id) {\n\t\tthis.id = id;\n\t}", "public void setId(long id){\n\t\tthis.id = id;\n\t}", "public void setId(String id) {\r\n \t\tthis.id = id;\r\n \t}", "void setId(int id) {\n this.id = id;\n }" ]
[ "0.8023471", "0.734437", "0.7061175", "0.67471", "0.67302465", "0.6608712", "0.6602479", "0.6532396", "0.6345891", "0.6337168", "0.6329478", "0.6293489", "0.6155522", "0.6116455", "0.5924669", "0.5924669", "0.5924669", "0.5858566", "0.5825397", "0.5814757", "0.5813394", "0.5813394", "0.5813394", "0.5813394", "0.5806307", "0.5803971", "0.58006597", "0.5798705", "0.5798705", "0.5787406", "0.5781394", "0.5781394", "0.5781394", "0.5775683", "0.5775683", "0.57615566", "0.576008", "0.5745795", "0.5745795", "0.57348466", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.57276815", "0.5722187", "0.5718761", "0.5718749", "0.5714797", "0.5714797", "0.5714797", "0.5714722", "0.57146686", "0.57114005", "0.57114005", "0.57114005", "0.57114005", "0.57105255", "0.5709191", "0.5707689", "0.5704372", "0.57025087", "0.57000965", "0.5694159", "0.5693511", "0.5693146", "0.5693146", "0.5691752", "0.5689042", "0.56877", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56820333", "0.56819504", "0.5681843", "0.5680994" ]
0.6536112
7
Gets the current job country.
public CountryFilter getCurrentJobCountry() { return currentJobCountry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final String getCountry() {\n\t\treturn country;\n\t}", "public java.lang.String getCountry () {\n\t\treturn country;\n\t}", "private static String getCountryLocale() {\n return Locale.getDefault().getCountry();\n }", "public java.lang.String getCountry() {\n return country;\n }", "java.lang.String getCountry();", "java.lang.String getCountry();", "public java.lang.String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public java.lang.String getCountry() {\n return Country;\n }", "public String getCountry() {\n return country;\n }", "Country getCountry();", "public java.lang.String getOriginatingCountry() {\r\n return originatingCountry;\r\n }", "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry() {\n return Country;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public CountryEntry getCountry(){\n\t\treturn (CountryEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_LINK);\n\t}", "public String getCountryName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_NAME);\n\t}", "public String getCompanyCountry() {\n return companyCountry;\n }", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\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 country_ = s;\n }\n return s;\n }\n }", "@Nonnull public CountryCode getCountry() { return country; }", "public String getCountry() {\n return country;\n }", "public static String getCountrySetting() {\r\n\t\treturn countrySetting;\r\n\t}", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n country_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getCountry() {\r\n return this.country;\r\n }", "public String getReqCurLocCountry() {\n return reqCurLocCountry;\n }", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "java.lang.String getCountryName();", "public String getCountry()\n {\n return country;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryCode() {\n return instance.getCountryCode();\n }", "public String getCountryName();", "public CountryType getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getcountryCode() {\n return countryCode;\n }", "public String countryCode() {\n return countryCode;\n }", "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public String getCountry() {\n\t\treturn addressFormat;\n\t}", "public java.lang.String getCountryCode() {\n return countryCode;\n }", "public CountryCode getCountry() {\n return country;\n }", "java.lang.String getCountryCode();", "java.lang.String getCountryCode();", "public CountryFilter getCurrentCountry() {\n\t\treturn currentCountry;\n\t}", "public String getCountryCode()\r\n\t{\r\n\t\treturn this.countryCode;\r\n\t}", "public String getCountryCode() {\n return normalizedBic.substring(COUNTRY_CODE_INDEX, COUNTRY_CODE_INDEX + COUNTRY_CODE_LENGTH);\n }", "public String getJobCity() {\r\n return jobCity;\r\n }", "public String getContactCountry() {\n return contactCountry;\n }", "String getCountryCode();", "public String getCountryCode() {\n // Always extract from phone number object instead of using mCurrentRegionCode just in case\n return mCurrentPhoneNumber == null ? null : PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(mCurrentPhoneNumber.getCountryCode());\n }", "public String getCountryLink(){\n\t\treturn (String)this.entryMap.get(GeoKeys.LOCAL_GEO_COUNTRY_LINK);\n\t}", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public IsoCountry getCountry() {\n return country;\n }", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "public String getCountryCode() {\n return countryCode_;\n }", "public String getCountryCode() {\n\t\treturn countryCode;\n\t}", "@ApiModelProperty(example = \"null\", value = \"Country resource corresponding to the dial-in number\")\n public DialInNumbersCountryInfo getCountry() {\n return country;\n }", "public long getCountryId() {\n return countryId;\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "com.google.protobuf.ByteString\n getCountryBytes();", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\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 country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public CountryEbo getOffCampusCountry() {\n if ( StringUtils.isBlank(offCampusCountryCode) ) {\n offCampusCountry = null;\n } else {\n if ( offCampusCountry == null || !StringUtils.equals( offCampusCountry.getCode(),offCampusCountryCode) ) {\n ModuleService moduleService = SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(CountryEbo.class);\n if ( moduleService != null ) {\n Map<String,Object> keys = new HashMap<String, Object>(1);\n keys.put(LocationConstants.PrimaryKeyConstants.CODE, offCampusCountryCode);\n offCampusCountry = moduleService.getExternalizableBusinessObject(CountryEbo.class, keys);\n } else {\n throw new RuntimeException( \"CONFIGURATION ERROR: No responsible module found for EBO class. Unable to proceed.\" );\n }\n }\n }\n return offCampusCountry;\n }", "public Country getCountry() {\r\n return country;\r\n }", "public StrColumn getCountry() {\n return delegate.getColumn(\"country\", DelegatingStrColumn::new);\n }", "public int getCountryCode() {\r\n\t\treturn countryCode;\r\n\t}", "public int getCountryCallingCode() {\n return countryCallingCode;\n }", "public Country getCountry() {\n return country;\n }", "public String getHospitalCountry() {\n return hospitalCountry;\n }", "public Long getCountryId() {\n return this.countryId;\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public String getCountryFeature() {\n\n return (String) this.getAdditionalTagValue(\n GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTRY);\n }", "public String getCountryFieldName() {\n return getStringProperty(COUNTRY_FIELD_NAME_KEY);\n }", "public java.lang.String getIssuingCountry() {\r\n return issuingCountry;\r\n }", "com.google.protobuf.ByteString\n getCountryBytes();", "public String getCountryCode() {\n return (String)getAttributeInternal(COUNTRYCODE);\n }", "public String getCountryCode() {\n return (String)getAttributeInternal(COUNTRYCODE);\n }", "public String getCountryID() {\n return countryID;\n }", "String getCountryOfOrigin(long id) throws RemoteException;", "public com.google.protobuf.ByteString\n getCountryCodeBytes() {\n return instance.getCountryCodeBytes();\n }", "public String getLanguagesCountryCode() {\n return mLanguagesCountryCode;\n }", "Country getAvailableCountryById(int countryId);", "public java.lang.String getSenderCountry() {\r\n return senderCountry;\r\n }", "private String getCountry(int countryCode) {\n switch (countryCode) {\n case 1:\n return countryName = \"Korea\";\n case 2:\n return countryName = \"England\";\n case 3:\n return countryName = \"France\";\n default:\n return \"Error\";\n }\n }", "public int getId() {\n\t\treturn (m_country_id);\n\t}" ]
[ "0.72246206", "0.7141929", "0.71405137", "0.7138818", "0.7133654", "0.7133654", "0.708769", "0.7051701", "0.7051701", "0.7051701", "0.70137864", "0.69736177", "0.69634", "0.6893248", "0.686001", "0.68333966", "0.68333966", "0.68333966", "0.68333966", "0.68333966", "0.68333966", "0.68333966", "0.68299437", "0.68299437", "0.68299437", "0.68233097", "0.6820452", "0.6820452", "0.6791116", "0.6788013", "0.67824244", "0.6774485", "0.6743829", "0.6741754", "0.6736086", "0.67181605", "0.670762", "0.66986775", "0.6687789", "0.6658507", "0.66569275", "0.66569275", "0.6651985", "0.6636048", "0.6619173", "0.6619173", "0.6619173", "0.65792006", "0.65184695", "0.65161777", "0.6501904", "0.64951724", "0.64571136", "0.64497775", "0.6433219", "0.6423351", "0.6399079", "0.6399079", "0.63966566", "0.63865477", "0.63633084", "0.6352562", "0.634984", "0.6344031", "0.6338363", "0.6321614", "0.6318605", "0.6318605", "0.6310604", "0.6298553", "0.62936276", "0.6219954", "0.62026113", "0.6202383", "0.61818427", "0.61785376", "0.61728436", "0.61714685", "0.6159617", "0.61568046", "0.61339337", "0.6124209", "0.6107477", "0.6107182", "0.6105597", "0.61004376", "0.60635793", "0.6057433", "0.60542285", "0.60516036", "0.60355604", "0.60355604", "0.6025353", "0.6025236", "0.5991727", "0.5978625", "0.5945019", "0.5936279", "0.59349906", "0.59335554" ]
0.8037821
0
Sets the current job country.
public void setCurrentJobCountry(CountryFilter currentJobCountry) { this.currentJobCountry = currentJobCountry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCountry(Country country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(java.lang.String country) {\r\n this.country = country;\r\n }", "public void setCountry(java.lang.String country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(java.lang.String Country) {\n this.Country = Country;\n }", "public void setCountry(String country) {\n\t\tthis.country = country;\n\t}", "public void setCountry(String country) {\r\n this.country = country.trim();\r\n }", "public void setCountry (java.lang.String country) {\n\t\tthis.country = country;\n\t}", "public final void setCountry(final String ccountry) {\n\t\tthis.country = ccountry;\n\t}", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountry(Country v) throws TorqueException\n {\n if (v == null)\n {\n setCustCountryId( 999);\n }\n else\n {\n setCustCountryId(v.getCountryId());\n }\n aCountry = v;\n }", "public void setCountry(java.lang.CharSequence value) {\n this.country = value;\n }", "public void setCountryName(String value);", "public DocumentLifecycleWorkflowRequest setCountryName(String countryName) {\n\t\tthis.countryName = countryName;\n\t\treturn this;\n\t}", "public Builder setCountry(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public void setCurrentCountry(CountryFilter currentCountry) {\n\t\tthis.currentCountry = currentCountry;\n\t}", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "public void setLocale(final String language, final String country) {\r\n setLocale(new Locale(language, country));\r\n }", "public DocumentLifecycleWorkflowRequest setCountryID(String countryID) {\n\t\tthis.countryID = countryID;\n\t\treturn this;\n\t}", "public CountryFilter getCurrentJobCountry() {\n\t\treturn currentJobCountry;\n\t}", "public void setcountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setCountryCode(String countryCode)\r\n\t{\r\n\t\tthis.countryCode = countryCode;\r\n\t}", "public void setCountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountryId(long countryId) {\n this.countryId = countryId;\n }", "public void setCountryCode(java.lang.String countryCode) {\n this.countryCode = countryCode;\n }", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setCountry(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.country = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public void setContactCountry(String contactCountry) {\n this.contactCountry = contactCountry;\n }", "public void setCountryName(){\n\t\tcountry_name = JOptionPane.showInputDialog(FrameHandler.main_frame, \"Enter the name of your country\");\n\t}", "public Builder setCountry(CountryCode country) {\n this.country = country;\n return this;\n }", "static public void set_country_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3), Edit_row_window.selected[0].getText(4), \n\t\t\t\tEdit_row_window.selected[0].getText(5), Edit_row_window.selected[0].getText(6)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_locations l, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.location_id=l.id and lc.country_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\" from curr_places_locations l \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"location name\", \"rating\", \"population\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"LOCATIONS\";\n\t}", "public void setCountryId(int value);", "public void setCountryCode(String countryCode) {\r\n\t\t\tthis.countryCode = countryCode;\r\n\t\t}", "public void setOffCampusCountry(CountryEbo offCampusCountry) {\n this.offCampusCountry = offCampusCountry;\n }", "public void setSenderCountry(java.lang.String senderCountry) {\r\n this.senderCountry = senderCountry;\r\n }", "private void setCountryCode( Office office ) {\n String country = null;\n switch ( office ) {\n case BRISTOL:\n case EDINBURGH:\n case GLASGOW:\n case LONDON:\n case MANCHESTER:\n case TAUNTON:\n country = Country.UK.getLongName();\n break;\n case PERTH:\n case SYDNEY:\n country = Country.AUSTRALIA.getLongName();\n break;\n case SINGAPORE:\n country = Country.SINGAPORE.getLongName();\n break;\n }\n\n countryCode.setText( new StringBuilder()\n .append( country )\n .append( \" \" )\n .append( \"(\" )\n .append( Country.getCountryFromName( country ).getIntCode() )\n .append( \")\" )\n .toString() );\n }", "public void setOriginatingCountry(java.lang.String originatingCountry) {\r\n this.originatingCountry = originatingCountry;\r\n }", "public void setCountryId(String countryId) {\r\n this.countryId = countryId;\r\n }", "public void setCountryFieldName(final String value) {\n setProperty(COUNTRY_FIELD_NAME_KEY, value);\n }", "@NonNull\n public PhoneBuilder setDefaultCountryIso(@NonNull String iso) {\n Preconditions.checkUnset(getParams(),\n \"Cannot overwrite previously set phone number\",\n ExtraConstants.PHONE,\n ExtraConstants.COUNTRY_ISO,\n ExtraConstants.NATIONAL_NUMBER);\n if (!PhoneNumberUtils.isValidIso(iso)) {\n throw new IllegalStateException(\"Invalid country iso: \" + iso);\n }\n\n getParams().putString(ExtraConstants.COUNTRY_ISO,\n iso.toUpperCase(Locale.getDefault()));\n\n return this;\n }", "public void setCountryCode(int value) {\r\n\t\tthis.countryCode = value;\r\n\t}", "public Address country(String country) {\n this.country = country;\n return this;\n }", "public String getCountry() {\n return country;\n }", "public void setDestinationCountry(String value) {\r\n this.destinationCountry = value;\r\n }", "public void setCountry_id(String country_id) {\n this.country_id = country_id;\n }", "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public void setCountryCode(@Nullable String countryCode) {\n this.countryCode = countryCode;\n api.setCountryCode(this.countryCode);\n }", "public void setLanguage(String lang, String country, String variant) {\n mSelf.setLanguage(lang, country, variant);\n }", "public void setCountryKey(ObjectKey key) throws TorqueException\n {\n \n setCustCountryId(((NumberKey) key).intValue());\n }", "public String getCountry() {\r\n return this.country;\r\n }", "private void setCountryCode(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n countryCode_ = value;\n }", "public void setCountryId(java.lang.String countryId) {\r\n this.countryId = countryId;\r\n }", "private void setCountrySelected(String countrySelected, String divisionSelected) {\n for (Countries country : countriesList) {\n if (country.getCountry().equals(countrySelected)){\n this.countryCB.setValue(country);\n this.firstLevelDivisions = FirstLevelDivisionsDAOImpl.getAllStatesProvinces(country.getCountryID());\n stateProvinceCB.setItems(this.firstLevelDivisions);\n setSelectedStateProvince(country.getCountryID(), divisionSelected);\n return;\n }\n }\n }", "@Override\n\tpublic void setCountryId(long countryId) {\n\t\t_candidate.setCountryId(countryId);\n\t}", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public void switchToCountry()\n {\n questionLabel.setText(currentQuestion.getQuestion());\n d.setVisible(true);\n atQuestionStage=true;\n mapImageLabel.setVisible(false);\n a.setText(\"A\");\n b.setText(\"B\");\n c.setText(\"C\");\n a.setBounds(380,220,a.getPreferredSize().height+20,30);\n b.setBounds(500,220,b.getPreferredSize().height+20,30);\n c.setBounds(380,320,c.getPreferredSize().height+20,30);\n d.setBounds(500,320,d.getPreferredSize().height+20,30);\n questionLabel.setBounds(380,100,600,100);\n revalidate();\n }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry() {\n return country;\n }", "public void setCountryCode(String value) {\r\n setAttributeInternal(COUNTRYCODE, value);\r\n }", "public LCountry() {\n this(DSL.name(\"L_COUNTRY\"), null);\n }", "public void setCanceledCountryName(String val) {\n // ProtectBlock setCanceledCountryName\n // ProtectBlock End\n this.canceledCountryName = val;\n }", "public void setCountryCode(String value) {\n setAttributeInternal(COUNTRYCODE, value);\n }", "public void setCountryCode(String value) {\n setAttributeInternal(COUNTRYCODE, value);\n }", "public Country(String countryName) {\n\t\tthis.countryName = countryName.toLowerCase();\n\t}", "private void setCountries(List<Country> countries) {\n this.countries = countries;\n }", "public void testSetCountry() {\r\n try {\r\n address.setCountry(null);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "public Builder clearCountry() {\n bitField0_ = (bitField0_ & ~0x00000080);\n country_ = getDefaultInstance().getCountry();\n onChanged();\n return this;\n }", "public void setCountryCode(final String newCountryCode) {\n if (TextUtils.isEmpty(mPhoneNumberInput.getText())) {\n updateCountryCode(newCountryCode);\n } else {\n // Clear old prefix from phone before assigning new one\n String updatedPhone = mPhoneNumberInput.getText().toString();\n if (mCurrentPhonePrefix != null && updatedPhone.startsWith(mCurrentPhonePrefix)) {\n updatedPhone = updatedPhone.substring(mCurrentPhonePrefix.length());\n }\n updateCountryCode(newCountryCode);\n\n if (!TextUtils.isEmpty(updatedPhone)) {\n formatPhoneNumber(updatedPhone);\n } else if (mCountryCodeInput.getVisibility() == View.VISIBLE) {\n initPhoneWithPrefix();\n }\n }\n }", "public Builder setCountryName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n countryName_ = value;\n onChanged();\n return this;\n }", "public String getCompanyCountry() {\n return companyCountry;\n }", "public void setCountryCallingCode(int countryCallingCode) {\n this.countryCallingCode = countryCallingCode;\n }", "public Builder setCountryBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public String getCountry() {\n return Country;\n }", "@Override\r\n public void assignCountries() {\r\n printInvalidCommandMessage();\r\n }" ]
[ "0.7093405", "0.7021614", "0.7021614", "0.7021614", "0.7021614", "0.7021614", "0.7021614", "0.699873", "0.6963388", "0.69362277", "0.6921342", "0.6921342", "0.6920768", "0.6920768", "0.6920768", "0.68586123", "0.680821", "0.67617244", "0.6721904", "0.65174425", "0.6500344", "0.6500344", "0.6450942", "0.64356136", "0.63859266", "0.6345529", "0.6338938", "0.6313134", "0.6302286", "0.6302286", "0.6302286", "0.62548727", "0.6177854", "0.6154282", "0.61322725", "0.60838336", "0.6077796", "0.6077796", "0.60598797", "0.6005304", "0.60046893", "0.5998814", "0.5978433", "0.59614044", "0.59329474", "0.59314895", "0.59018636", "0.5853267", "0.58481926", "0.5833756", "0.57768524", "0.5743288", "0.5737081", "0.573706", "0.57302314", "0.5696777", "0.5693186", "0.56886375", "0.56486696", "0.5638464", "0.5631648", "0.5631284", "0.5630492", "0.5630492", "0.5630492", "0.56281793", "0.5609153", "0.5599066", "0.5596348", "0.55921704", "0.55900437", "0.5580141", "0.5575109", "0.5540131", "0.5540131", "0.5540131", "0.5540131", "0.5540131", "0.5540131", "0.5540131", "0.55282044", "0.551376", "0.551376", "0.550254", "0.5502389", "0.54926485", "0.5485532", "0.5485125", "0.5485125", "0.5475931", "0.5471079", "0.54601985", "0.5450033", "0.5449709", "0.5449122", "0.5445565", "0.5418668", "0.5416812", "0.5411284", "0.5405984" ]
0.7954102
0
Gets the skill tag name.
public StringFilter getSkillTagName() { return skillTagName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTagname() {\n return tagname;\n }", "java.lang.String getTag();", "java.lang.String getTag();", "public String getSkillsetName() {\n return skillsetName;\n }", "public String getName() {\n if (_lastTag == null)\n return null;\n return _lastTag.getName();\n }", "public java.lang.String getEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getTagName() {\n return TAG_NAME;\n }", "public org.apache.xmlbeans.XmlString xgetEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLNAME$8);\n return target;\n }\n }", "public String getSkill() {\n\t\treturn skill;\n\t}", "@Override\n public String getName() {\n if (tags.isEmpty()) {\n return name;\n }\n return getNameWithTags(tags.get(tags.size() - 1));\n }", "public String getTagByName(String tagName) {\r\n\t\treturn dcmObj.getString(Tag.toTag(tagName));\r\n\t}", "String getTag();", "public String getTag() {\n return tag;\n }", "public String getTag() {\r\n return tag;\r\n }", "public String getTag()\n\t{\n\t\treturn tag;\n\t}", "public String getTag()\n\t{\n\t\treturn tag;\n\t}", "public String getTag() {\n\t\treturn tag;\n\t}", "public String getTag() {\n return this.tag;\n }", "public String getTag() {\n return tag;\n }", "public String getTag() {\n return tag;\n }", "public String getTag()\n {\n return this.tag;\n }", "@Override\n\tpublic String getName() {\n\t\tfinal PsiElement nameIdentifier = getNameIdentifier();\n\t\treturn nameIdentifier != null ? nameIdentifier.getText() : getText();\n\t}", "public static String getSkillName(int skillId) {\n switch (skillId) {\n case Constants.SKILLS_ATTACK:\n return \"Attack\";\n case Constants.SKILLS_STRENGTH:\n return \"Strength\";\n case Constants.SKILLS_RANGE:\n return \"Range\";\n case Constants.SKILLS_DEFENSE:\n return \"Defence\";\n case Constants.SKILLS_MAGIC:\n return \"Magic\";\n case Constants.SKILLS_COOKING:\n return \"Cooking\";\n case Constants.SKILLS_FISHING:\n return \"Fishing\";\n case Constants.SKILLS_WOODCUTTING:\n return \"WC\";\n case Constants.SKILLS_HITPOINTS:\n return \"HitPoints\";\n case Constants.SKILLS_AGILITY:\n return \"Agility\";\n default:\n return \"None\";\n }\n }", "public String tag()\r\n {\r\n return this.tag;\r\n }", "public java.lang.String getTag() {\n java.lang.Object ref = tag_;\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 tag_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getTagName() {\n return tagName;\n }", "public String getTagName() {\n return tagName;\n }", "public String getTag();", "String getTag() {\n return tag;\n }", "public static String getTag(String name) {\n\t\treturn tags.get(name);\n\t}", "public String getTag() {\n return tagNum;\n }", "public java.lang.String getTag() {\n java.lang.Object ref = tag_;\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 tag_ = s;\n return s;\n }\n }", "public @NotNull String getTag() {\n\n String tag = getConfig().getString(\"messages.tag\");\n return (tag == null) ? \"\" : Utils.format(tag);\n }", "public String getTagName() {\r\n\t\treturn tagName;\r\n\t}", "public String getTagName() {\n\t\treturn tagName;\n\t}", "public final native java.lang.String getTagName() /*-{\n return this.tagName;\n }-*/;", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "public String getName() { \n\t\treturn getNameElement().getValue();\n\t}", "@Override\r\n\tpublic String getTagName() {\n\t\treturn tagName;\r\n\t}", "public String getFromTag();", "public String getTagName() {\n return this.tagName;\n }", "public String getTag() {\n\t\treturn mStag;\n\t}", "public java.lang.String getName();", "public String getName()\n {\n return (String)getAttributeInternal(NAME);\n }", "public LongFilter getSkillTagId() {\n\t\treturn skillTagId;\n\t}", "public String getTagName() {\n return this.tagName;\n }", "public GTag getTag() {\r\n\t\treturn tag;\r\n\t}", "@Override\n\tpublic String getTagName() {\n\t\treturn getClass().getSimpleName();\n\t}", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();", "java.lang.String getName();" ]
[ "0.6941346", "0.67910206", "0.67910206", "0.6745012", "0.6721722", "0.67035174", "0.6684659", "0.6566915", "0.6558999", "0.6520932", "0.64662766", "0.63667107", "0.6334494", "0.631782", "0.6312733", "0.6312733", "0.6299095", "0.628842", "0.62864506", "0.62864506", "0.6271457", "0.62586945", "0.62553793", "0.62502193", "0.62421465", "0.6207692", "0.6207692", "0.61901885", "0.6187313", "0.614915", "0.61414164", "0.61383325", "0.61281794", "0.6108175", "0.60980237", "0.60979795", "0.60765296", "0.60765296", "0.60765296", "0.60584724", "0.6042634", "0.6032389", "0.6011433", "0.6008257", "0.59876466", "0.598155", "0.59611845", "0.59542304", "0.5954051", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655", "0.59335655" ]
0.7494421
0
Sets the skill tag name.
public void setSkillTagName(StringFilter skillTagName) { this.skillTagName = skillTagName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setTag(java.lang.String tag);", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "public void setTagname(String tagname) {\n this.tagname = tagname == null ? null : tagname.trim();\n }", "public void setTag(String tag);", "public void setEnumSkillName(java.lang.String enumSkillName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ENUMSKILLNAME$8);\n }\n target.setStringValue(enumSkillName);\n }\n }", "public final void setName(java.lang.String name)\r\n\t{\r\n\t\tsetName(getContext(), name);\r\n\t}", "public void xsetEnumSkillName(org.apache.xmlbeans.XmlString enumSkillName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLNAME$8);\n }\n target.set(enumSkillName);\n }\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "public final void setName(java.lang.String name)\n\t{\n\t\tsetName(getContext(), name);\n\t}", "public void setTag( String tag )\n {\n this.tag = tag;\n }", "public String getSkillsetName() {\n return skillsetName;\n }", "public void setTag(Tag tag) {\n\t\tProgramTags newTag = program.getTagIfPresent(tag); // throws if no such tag in program\n\t\tsetTag(newTag);\n\t}", "protected void addSkill(String name) {\r\n\t\tthis.skills.add(name.toLowerCase());\r\n\t}", "public void setTagName(String tagName) {\n this.tagName = tagName;\n }", "Tag(String name){\r\n this.tagName = name;\r\n }", "public void setTag(String tag) {\r\n this.tag = tag;\r\n }", "public void setStandNAME(ItemStack stack, String name) {\n/* 314 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 316 */ if (nbttagcompound == null) {\n/* */ \n/* 318 */ nbttagcompound = new NBTTagCompound();\n/* 319 */ stack.setTagCompound(nbttagcompound);\n/* */ } \n/* */ \n/* 322 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* */ \n/* 324 */ if (!nbttagcompound.hasKey(this.standInfo))\n/* */ {\n/* 326 */ nbttagcompound.setTag(this.standInfo, nbttagcompound1);\n/* */ }\n/* */ \n/* 329 */ nbttagcompound1.setString(this.standName, name);\n/* */ }", "@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}", "public void setTag(String tag) {\n this.tag = tag;\n }", "public void setTag(String tag) {\n this.tag = tag;\n }", "public final void setName(String name) {\n\t\tthis.name = name;\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\r\n\t\t_name = name;\r\n\t}", "@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}", "public void setTagName(String tagName) {\r\n\t\tthis.tagName = tagName;\r\n\t}", "public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}", "public void setName(String name) {\n\t this.name = name;\n\t }", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setTag(Object tag)\n {\n fTag = tag;\n }", "public void setTagName(String tagName) {\n this.tagName = tagName == null ? null : tagName.trim();\n }", "public void setTagName(String tagName) {\n this.tagName = tagName == null ? null : tagName.trim();\n }", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(final String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "public void setName(String name) {\r\n\t\tthis.name = name;\r\n\t}", "@Override\n public void setName(String name) {\n this.name = name;\n }", "@Override\n public void setName(String name) {\n this.name = name;\n }", "public void setName(String name) {\r\r\n\t\tthis.name = name;\r\r\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}", "public void setName(String name) {\n\t\tthis.name = name;\n\t}" ]
[ "0.69502187", "0.6711303", "0.66103053", "0.65987056", "0.6420262", "0.64034504", "0.6402999", "0.6398763", "0.63728404", "0.6370193", "0.6337414", "0.6324894", "0.62814444", "0.6273577", "0.62694454", "0.6267226", "0.62158734", "0.62083304", "0.62016904", "0.62016904", "0.6192839", "0.61824805", "0.6166778", "0.61658865", "0.6163863", "0.61579204", "0.61579204", "0.6153454", "0.6138329", "0.6138329", "0.6138329", "0.61376286", "0.61376286", "0.6136375", "0.61340153", "0.61340153", "0.6133746", "0.6133746", "0.6133746", "0.6133746", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.6130867", "0.61282945", "0.61282945", "0.6119882", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595", "0.611595" ]
0.69935286
0
Gets the current job title.
public StringFilter getCurrentJobTitle() { return currentJobTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getJobTitle() {\r\n\t\treturn jobTitle;\r\n\t}", "public String getJobTitle() {\r\n return jobTitle;\r\n }", "public String getJob_title() {\r\n return job_title;\r\n }", "public String getSrcJobTitle() {\r\n return (String) getAttributeInternal(SRCJOBTITLE);\r\n }", "@Override\n\tpublic String getJobName() {\n\t\treturn model.getJobName();\n\t}", "public String getJobName() {\n return this.mJob;\n }", "public String getJobName() {\n return jobName;\n }", "public String getJobName() {\n return jobName;\n }", "public String getJobName() {\n return this.jobName;\n }", "public String getJobName() {\n return this.JobName;\n }", "public String getCurrentTitle() {\n\t\tif (getSelectedIndex() == -1) {\n\t\t\treturn \"\";\n\t\t}\n\t\treturn getTitleAt(getSelectedIndex());\n\t}", "public String getTitle() {\n return getString(CommandProperties.TASK_TITLE);\n }", "public @Nullable CharSequence getQueueTitle() {\n try {\n return mSessionBinder.getQueueTitle();\n } catch (RemoteException e) {\n Log.wtf(TAG, \"Error calling getQueueTitle\", e);\n }\n return null;\n }", "public String getFullJobName() {\n return jobGroup + \".\" + jobName;\n }", "public String getCurrentWindowTitle(){\n buffer = new char[MAX_TITLE_LENGTH * 2];\n GetWindowTextW(GetForegroundWindow(), buffer, MAX_TITLE_LENGTH);\n return Native.toString(buffer);\n }", "public String getActiveTitle() {\n\t\treturn getTitle(TitleBuilder.byActiveWindow());\n\t}", "public String getCurrentPageTitle() {\n return driver.getTitle();\n }", "public String getTitle() {\n return titleName;\n }", "public String getTitle() {\n addParameter(\"title.number\" , iBundle.getString(\"reminderreport.title.date\") );\n\n return iBundle.getString(\"reminderreport.title\");\n }", "public String getName() {\r\n\t\treturn this.title;\r\n\t}", "@ObjectSupport public final String title() {\n return title==null\n ? title = createTitle()\n : title;\n }", "public String getTitle()\n {\n return (this.title);\n }", "public String getApplicationTitle() {\n return applicationTitle.get();\n }", "public java.lang.String getTitle() {\n return title;\n }", "public static String getPageTitle() {\n\t\tLOG.info(\"Reading current page title.\");\n\t\treturn Constants.driver.getTitle();\n\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public String getTitle() {\n\t\treturn this.title;\n\t}", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public java.lang.String getTitle() {\n return title;\n }", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getTitle() {\r\n\t\treturn title;\r\n\t}", "public String getJob() {\r\n\t\t\treturn job;\r\n\t\t}", "public static String getJobTitle(final File file) throws IOException {\n final FileReader fileReader = new FileReader(file);\n final LineNumberReader lnreader = new LineNumberReader(fileReader);\n String jobTitle = file.getName();\n String line = lnreader.readLine();\n while (line != null && line.length() > 0) {\n if (line.replace(\" \", \"\").trim().startsWith(\"--partialJobStatus=\")) {\n jobTitle = line.substring(line.indexOf('=') + 1, line.length());\n break;\n }\n line = lnreader.readLine();\n }\n fileReader.close();\n lnreader.close();\n return jobTitle;\n }", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle() {\n\t\treturn title;\n\t}", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle()\n\t{\n\t\treturn title;\n\t}", "public String getTitle() \r\n\t{\r\n\t\treturn this.title;\r\n\t}", "public String getJob() {\n return job;\n }", "public String getTitle() {\n return getProperty(Property.TITLE);\n }", "public String getTaskTitle() {\n return String.valueOf(comboBox.getSelectedItem());\n }", "public String getTitle() {\n \t\treturn title;\n \t}", "public java.lang.String getTitle() {\n return title;\n }", "public String getProjectTitle() {\n return getProperty(Property.PROJECT_TITLE);\n }", "public String getTitle(){\n\n\t\treturn title;\n\t}", "public String getTitle() {\r\n\t\treturn (String) getProperty(\"title\");\t\r\n\t}", "public String getTitle() {\n\t\treturn this.Title; \n\t}", "public java.lang.String getWorkertitle() {\n\treturn workertitle;\n}", "public String getTitle() {\n return title;\n }", "public String getTitle() {\n return title;\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle()\r\n\t{\r\n\t\treturn TITLE;\r\n\t}", "public String getTitle() {\n\t\treturn fTitle;\n\t}", "public String getProjectTitle()\r\n {\r\n return (m_projectTitle);\r\n }", "public String title()\n\t{\n\t\treturn title;\n\t}", "public String title() {\n\t\treturn title;\n\t}", "public String getCurrentPageTitle() {\n return webDriver.getTitle();\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public String getTitle() {\r\n return title;\r\n }", "public static String getTitle() {\r\n\t\tString titleStr = null;\r\n\t\ttry {\r\n\t\t\ttitleStr = driver.getTitle();\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"Unable to open the WebSite: \" + e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn titleStr;\r\n\t}", "public java.lang.String getTitle()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TITLE$2);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public String getTitle() {\r\n return insertMode ? \"\" : stringValue(CONTACTS_TITLE);\r\n }", "public String getWindowTitle() {\r\n\t\treturn windowTitle;\r\n\t}", "public java.lang.String getTitle()\n {\n return this.title;\n }", "public String getTitle()\r\n {\r\n return this.title;\r\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "public String getTitle() {\n return this.title;\n }", "protected static String getTitle() {\r\n return Lock.title;\r\n }", "public String getTitle() {\r\n return this.title;\r\n }", "public String getWindowTitle() {\n\t\treturn windowTitle;\n\t}", "public String getTitle(){\n\t\treturn this.title;\n\t}", "@Override\r\n\tpublic String getName() {\r\n\t\treturn this.title;\r\n\t}", "public String getTitle()\r\n {\r\n return title;\r\n }", "public String getTitle()\r\n {\r\n return title;\r\n }" ]
[ "0.82103497", "0.81809556", "0.8058297", "0.7672578", "0.7491221", "0.7423266", "0.7275332", "0.7275332", "0.727113", "0.7260869", "0.7184141", "0.71204114", "0.7058585", "0.70205224", "0.69595325", "0.69583607", "0.6937213", "0.6859887", "0.68542546", "0.68376195", "0.6835978", "0.67934346", "0.67912835", "0.678515", "0.67833", "0.6766913", "0.6766913", "0.6766913", "0.67631245", "0.67631245", "0.67631245", "0.67603713", "0.67603713", "0.67603713", "0.67603713", "0.67603713", "0.67603713", "0.67603713", "0.6754367", "0.6743036", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67396957", "0.67381185", "0.67381185", "0.6737685", "0.673532", "0.67297506", "0.6719111", "0.6717879", "0.6715801", "0.67151356", "0.6704632", "0.6689151", "0.66750056", "0.664958", "0.66379726", "0.66379726", "0.6629672", "0.6623881", "0.6610452", "0.66079175", "0.66008306", "0.65937215", "0.6587674", "0.65785855", "0.65785855", "0.65785855", "0.65785855", "0.65785855", "0.65785855", "0.65785855", "0.6572132", "0.6569626", "0.6567331", "0.6564231", "0.6550835", "0.654995", "0.6541661", "0.6541661", "0.6541661", "0.6541661", "0.6541661", "0.65412986", "0.6532819", "0.6531936", "0.65317047", "0.6529119", "0.65253747", "0.65253747" ]
0.80709946
2
Sets the current job title.
public void setCurrentJobTitle(StringFilter currentJobTitle) { this.currentJobTitle = currentJobTitle; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setJob_title(String job_title) {\r\n this.job_title = job_title;\r\n }", "public void setJobTitle(String jobTitle) {\r\n this.jobTitle = jobTitle;\r\n }", "public void setJobTitle(String jobTitle) {\r\n\t\tthis.jobTitle = jobTitle;\r\n\t}", "public void setTitle_(String title_) {\n this.title_ = title_;\n }", "public void setSrcJobTitle(String value) {\r\n setAttributeInternal(SRCJOBTITLE, value);\r\n }", "@Override\r\n\tpublic void setTitle(String title) {\n\t\tthis.title = title;\r\n\t}", "private void setTitle(java.lang.String title) {\n System.out.println(\"setting title \"+title);\n this.title = title;\n }", "public void setTitle(String title) {\r\n _title = title;\r\n }", "public void setTitle( String title ) {\n\t\t_title = title;\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String title) {\r\n\t\tthis.title = title;\r\n\t}", "public void setTitle(String newTitle)\r\n {\r\n title = newTitle;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title){\n\t\tthis.title = title;\n\t}", "public void setTitle( String title )\n {\n _strTitle = title;\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\r\n this.title = title;\r\n }", "public void setTitle(String title)\n\t{\n\t\tthis.title = title;\n\t}", "@Override\n public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\t\tthis.title = title; \n\t}", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(String title) {\n\t\tthis.title = title;\n\t}", "public void setTitle(Title title) {\r\n this.title = title;\r\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n this.title = title;\n }", "public void setTitle(String title)\n {\n mTitle = title;\n }", "public void setTitle(String title) {\r\n\tthis.title = title;\r\n }", "public void setTitle(String title){\n \tthis.title = title;\n }", "public void setTitle(final String title)\n {\n this.title = title;\n }", "public void setTitle(String title) { this.title = title; }", "public void setTitle(final String title) {\n\t\tthis.title = title;\n\t}", "public void insertJobTitle(String jobTitle) {\n\t\tthis.jobTitle = jobTitle;\n\t}", "public void setTitle(java.lang.String title);", "public void setTitle(final String title) {\n this.title = title;\n }", "public void setTitle(String title){\n this.title = title;\n }", "@Override\r\n\t\tpublic void setTitle(String title)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}", "protected void setTitle(String title) {\n this.title = title;\n }", "public void setTitle(String title) {\n mTitle = title;\n }", "private void setTitle(String userTitle){\n title = userTitle;\n }", "public void setTitle(String title) {\n\tthis.title = title;\n}", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title) {\n this.title = title;\n }", "public void setTitle(java.lang.String title)\n {\n this.title = title;\n }", "public void setTitle(String title);", "public void setTitle(String title);", "public void setTitle(String title);", "void setTitle(java.lang.String title);", "public void setTitle(Title Title) {\n\t\ttitle = Title;\n\t}", "public void setTitle(String strTitle) { m_strTitle = strTitle; }", "private void setWindowTitle(String title) {\n this.title = title;\n }", "public void doSetTitle(String newTitle) \n {\n this.title = newTitle;\n }", "protected void setPopUpTitle(String title){\r\n\t\tthis.stage.setTitle(title);\r\n\t}", "@Override\n\tpublic void setTitle(java.lang.String title) {\n\t\t_scienceApp.setTitle(title);\n\t}", "public void setTitle(String title) {\r\n if (title != null) {\r\n this.title = title;\r\n }\r\n else{\r\n System.out.println(\"Not a valid title\");\r\n }\r\n }", "public void setNewTitle(final String title){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n setTitle(title);\n }\n });\n }", "public void setTitle(String title){\n lblTitle.setText(title);\n }", "protected void SetTitle(String newTitle){ title = newTitle; }", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "void setTitle(String title);", "@Override\n public void setTitle(CharSequence title) {\n mTitle = title;\n getSupportActionBar().setTitle(mTitle);\n }" ]
[ "0.7634889", "0.7578937", "0.75284356", "0.7360222", "0.731592", "0.73100764", "0.73054814", "0.72994995", "0.729091", "0.7284381", "0.7284381", "0.7284381", "0.7284381", "0.7284381", "0.72836906", "0.7279875", "0.7279875", "0.72702134", "0.7259677", "0.7246931", "0.7246931", "0.72288835", "0.72281814", "0.72239083", "0.72211206", "0.7207438", "0.7207438", "0.7207438", "0.7207438", "0.7207438", "0.7207438", "0.7207438", "0.7207438", "0.7207438", "0.72059816", "0.720264", "0.720264", "0.720264", "0.720264", "0.7199235", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.7195551", "0.71935135", "0.71935135", "0.71935135", "0.7190681", "0.7188599", "0.71877635", "0.7185892", "0.7182468", "0.7182463", "0.7170409", "0.7170225", "0.7169211", "0.71490645", "0.7148062", "0.71456206", "0.713253", "0.710199", "0.7093091", "0.70916545", "0.70916545", "0.70916545", "0.7087723", "0.70861626", "0.70861626", "0.70861626", "0.7085985", "0.7035631", "0.7017939", "0.7017569", "0.70155495", "0.70095915", "0.70074457", "0.6972142", "0.69582784", "0.6951283", "0.69463825", "0.69257635", "0.69257635", "0.69257635", "0.69257635", "0.69257635", "0.6917244" ]
0.7981436
0
Gets the current country.
public CountryFilter getCurrentCountry() { return currentCountry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final String getCountry() {\n\t\treturn country;\n\t}", "public java.lang.String getCountry () {\n\t\treturn country;\n\t}", "public java.lang.String getCountry() {\n return country;\n }", "public java.lang.String getCountry() {\r\n return country;\r\n }", "Country getCountry();", "public java.lang.String getCountry() {\n return Country;\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "java.lang.String getCountry();", "java.lang.String getCountry();", "public String getCountry() {\n return country;\n }", "@Nonnull public CountryCode getCountry() { return country; }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\n return (String)getAttributeInternal(COUNTRY);\n }", "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public CountryType getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry() {\n return Country;\n }", "public java.lang.CharSequence getCountry() {\n return country;\n }", "public java.lang.String getOriginatingCountry() {\r\n return originatingCountry;\r\n }", "public String getCountry() {\n return country;\n }", "public CountryEntry getCountry(){\n\t\treturn (CountryEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_LINK);\n\t}", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\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 country_ = s;\n }\n return s;\n }\n }", "public String getCountry()\n {\n return country;\n }", "public IsoCountry getCountry() {\n return country;\n }", "public CountryCode getCountry() {\n return country;\n }", "public java.lang.String getCountry() {\n java.lang.Object ref = country_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n country_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static String getCountrySetting() {\r\n\t\treturn countrySetting;\r\n\t}", "public String getCountry() {\r\n return this.country;\r\n }", "private static String getCountryLocale() {\n return Locale.getDefault().getCountry();\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public String getCountryName() {\n return countryName;\n }", "public Country getCountry() {\r\n return country;\r\n }", "public String countryCode() {\n return countryCode;\n }", "public Country getCountry() {\n return country;\n }", "public String getCountryCode() {\n return instance.getCountryCode();\n }", "public String getReqCurLocCountry() {\n return reqCurLocCountry;\n }", "public String getCountryName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_COUNTRY_NAME);\n\t}", "public java.lang.String getCountryId() {\r\n return countryId;\r\n }", "@ApiModelProperty(example = \"null\", value = \"Country resource corresponding to the dial-in number\")\n public DialInNumbersCountryInfo getCountry() {\n return country;\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\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 country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public com.google.protobuf.ByteString\n getCountryBytes() {\n java.lang.Object ref = country_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n country_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public CountryFilter getCurrentJobCountry() {\n\t\treturn currentJobCountry;\n\t}", "java.lang.String getCountryName();", "public String getCountryName();", "com.google.protobuf.ByteString\n getCountryBytes();", "@Override\n\tpublic long getCountryId() {\n\t\treturn _candidate.getCountryId();\n\t}", "public java.lang.String getCountryCode() {\n return countryCode;\n }", "public String getCountryId() {\r\n return countryId;\r\n }", "public String getcountryCode() {\n return countryCode;\n }", "public String getCountry() {\n\t\treturn addressFormat;\n\t}", "public String getCountryID() {\n return countryID;\n }", "public int getCountryCallingCode() {\n return countryCallingCode;\n }", "public long getCountryId() {\n return countryId;\n }", "com.google.protobuf.ByteString\n getCountryBytes();", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode;\n }", "public String getCountryCode() {\n return countryCode_;\n }", "public Integer getCountryId() {\n return countryId;\n }", "public Long getCountryId() {\n return this.countryId;\n }", "public String getContactCountry() {\n return contactCountry;\n }", "public String getCompanyCountry() {\n return companyCountry;\n }", "public String getCountryLink(){\n\t\treturn (String)this.entryMap.get(GeoKeys.LOCAL_GEO_COUNTRY_LINK);\n\t}", "public String getCountryFeature() {\n\n return (String) this.getAdditionalTagValue(\n GeographicErrorTest.MAPPED_FEATURE_TAG_ID, BGConcepts.COUNTRY);\n }", "public StrColumn getCountry() {\n return delegate.getColumn(\"country\", DelegatingStrColumn::new);\n }", "String getCountryCode();", "public String getCountry_id() {\n return country_id;\n }", "public com.google.protobuf.ByteString\n getCountryCodeBytes() {\n return instance.getCountryCodeBytes();\n }", "java.lang.String getCountryCode();", "java.lang.String getCountryCode();", "public int getCountryCode() {\r\n\t\treturn countryCode;\r\n\t}", "public String getCountryCode() {\n\t\treturn countryCode;\n\t}", "Country getAvailableCountryById(int countryId);", "public String getCountryIso() {\n return mCountryIso;\n }", "public String getCountryCode()\r\n\t{\r\n\t\treturn this.countryCode;\r\n\t}", "public int getCountryId() {\n return countryId;\n }", "public java.lang.String getSenderCountry() {\r\n return senderCountry;\r\n }", "public Integer getOriginCountryId() {\r\n\t\treturn originCountryId;\r\n\t}", "public String getCountryCode() {\n return normalizedBic.substring(COUNTRY_CODE_INDEX, COUNTRY_CODE_INDEX + COUNTRY_CODE_LENGTH);\n }", "public String getCountryCode() {\n return (String)getAttributeInternal(COUNTRYCODE);\n }", "public String getCountryCode() {\n return (String)getAttributeInternal(COUNTRYCODE);\n }", "public String getInstitutionCountry() {\n return institutionCountry;\n }", "public String getCountryAccessCode() {\n return countryAccessCode;\n }", "public int getId() {\n\t\treturn (m_country_id);\n\t}", "public String getHospitalCountry() {\n return hospitalCountry;\n }", "public String getCountryCode() {\n // Always extract from phone number object instead of using mCurrentRegionCode just in case\n return mCurrentPhoneNumber == null ? null : PhoneNumberUtil.getInstance().getRegionCodeForCountryCode(mCurrentPhoneNumber.getCountryCode());\n }" ]
[ "0.8104942", "0.80398", "0.80295926", "0.7973456", "0.79287726", "0.7919861", "0.7892817", "0.7892817", "0.7892817", "0.78216994", "0.78216994", "0.7817404", "0.7720954", "0.7698517", "0.7698517", "0.7698517", "0.7684596", "0.76823175", "0.76823175", "0.76823175", "0.76823175", "0.76823175", "0.76823175", "0.76823175", "0.76506525", "0.76468253", "0.7643894", "0.7643894", "0.7631284", "0.75967443", "0.7571453", "0.7559445", "0.7541973", "0.7537647", "0.7537647", "0.75162256", "0.7498457", "0.7481123", "0.7474516", "0.74623996", "0.744233", "0.7420509", "0.741702", "0.7286317", "0.7286317", "0.7286317", "0.71989036", "0.71891934", "0.7167182", "0.7151609", "0.7146253", "0.712441", "0.7117019", "0.71017694", "0.70844775", "0.70828396", "0.70791477", "0.7043879", "0.7033316", "0.70058084", "0.69594693", "0.6945873", "0.69213283", "0.69169664", "0.6907329", "0.69003046", "0.68977016", "0.688897", "0.681928", "0.68161213", "0.68161213", "0.67848414", "0.67734325", "0.6767056", "0.67496824", "0.674544", "0.6725774", "0.6713196", "0.67058927", "0.6697883", "0.6696628", "0.6689556", "0.66889024", "0.66889024", "0.66771024", "0.66740257", "0.66629684", "0.6618314", "0.6603248", "0.6599227", "0.65787315", "0.6570965", "0.65650785", "0.6522695", "0.6522695", "0.651049", "0.650321", "0.65004814", "0.6491917", "0.6487448" ]
0.7868183
9
Sets the current country.
public void setCurrentCountry(CountryFilter currentCountry) { this.currentCountry = currentCountry; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCountry(Country country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(Integer country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(String country) {\n this.country = country;\n }", "public void setCountry(java.lang.String country) {\r\n this.country = country;\r\n }", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(String country) {\r\n\t\tthis.country = country;\r\n\t}", "public void setCountry(java.lang.String country) {\n this.country = country;\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(String value) {\n setAttributeInternal(COUNTRY, value);\n }", "public void setCountry(java.lang.String Country) {\n this.Country = Country;\n }", "public void setCountry(String country) {\n\t\tthis.country = country;\n\t}", "public void setCountry (java.lang.String country) {\n\t\tthis.country = country;\n\t}", "public void setCountry(java.lang.CharSequence value) {\n this.country = value;\n }", "public void setCountry(Country v) throws TorqueException\n {\n if (v == null)\n {\n setCustCountryId( 999);\n }\n else\n {\n setCustCountryId(v.getCountryId());\n }\n aCountry = v;\n }", "public void setCountry(String country) {\r\n this.country = country.trim();\r\n }", "public void setCurrentJobCountry(CountryFilter currentJobCountry) {\n\t\tthis.currentJobCountry = currentJobCountry;\n\t}", "public final void setCountry(final String ccountry) {\n\t\tthis.country = ccountry;\n\t}", "public Builder setCountry(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountry(String country) {\n this.country = country == null ? null : country.trim();\n }", "public void setCountryName(String value);", "public com.luisjrz96.streaming.birthsgenerator.models.BirthInfo.Builder setCountry(java.lang.CharSequence value) {\n validate(fields()[2], value);\n this.country = value;\n fieldSetFlags()[2] = true;\n return this;\n }", "public void setCountryId(int value);", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setCountryName(String countryName) {\n this.countryName = countryName;\n }", "public void setAddressCountry(String addressCountry) {\n this.addressCountry = addressCountry;\n }", "public void setLocale(final String language, final String country) {\r\n setLocale(new Locale(language, country));\r\n }", "public void setCountryCode(String countryCode)\r\n\t{\r\n\t\tthis.countryCode = countryCode;\r\n\t}", "public void setcountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "private void setCountries(List<Country> countries) {\n this.countries = countries;\n }", "public void setCountryId(long countryId) {\n this.countryId = countryId;\n }", "public Builder setCountry(CountryCode country) {\n this.country = country;\n return this;\n }", "public void setCountryCode(java.lang.String countryCode) {\n this.countryCode = countryCode;\n }", "public void setCountryFieldName(final String value) {\n setProperty(COUNTRY_FIELD_NAME_KEY, value);\n }", "public void setCountryCode(String countryCode) {\n this.countryCode = countryCode;\n }", "public DocumentLifecycleWorkflowRequest setCountryName(String countryName) {\n\t\tthis.countryName = countryName;\n\t\treturn this;\n\t}", "public void setCountryId(String countryId) {\r\n this.countryId = countryId;\r\n }", "public Builder setCountryBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000080;\n country_ = value;\n onChanged();\n return this;\n }", "public void setSenderCountry(java.lang.String senderCountry) {\r\n this.senderCountry = senderCountry;\r\n }", "public void setCountryCode(String value) {\r\n setAttributeInternal(COUNTRYCODE, value);\r\n }", "public void setCountryCode(String value) {\n setAttributeInternal(COUNTRYCODE, value);\n }", "public void setCountryCode(String value) {\n setAttributeInternal(COUNTRYCODE, value);\n }", "public void setCountryCode(@Nullable String countryCode) {\n this.countryCode = countryCode;\n api.setCountryCode(this.countryCode);\n }", "public void setCountryCode(int value) {\r\n\t\tthis.countryCode = value;\r\n\t}", "public String getCountry() {\n return country;\n }", "public void setDestinationCountry(String value) {\r\n this.destinationCountry = value;\r\n }", "public void setCountryCode(String countryCode) {\r\n\t\t\tthis.countryCode = countryCode;\r\n\t\t}", "public Address country(String country) {\n this.country = country;\n return this;\n }", "public void setCountry_id(String country_id) {\n this.country_id = country_id;\n }", "public String getCountry() {\r\n return country;\r\n }", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "public String getCountry() {\r\n\t\treturn country;\r\n\t}", "private void setCountryFlag(View view, String country) {\n ImageView countryView = view.findViewById(R.id.collected_country);\n if (country != null) {\n String countryResource = String.format(\"country_%s\", country.toLowerCase());\n int id = mContext.getResources().getIdentifier(countryResource, \"drawable\", mContext.getPackageName());\n if (id != 0) {\n countryView.setImageResource(id);\n countryView.setVisibility(View.VISIBLE);\n return;\n }\n }\n countryView.setVisibility(View.GONE);\n }", "public void setContactCountry(String contactCountry) {\n this.contactCountry = contactCountry;\n }", "public DocumentLifecycleWorkflowRequest setCountryID(String countryID) {\n\t\tthis.countryID = countryID;\n\t\treturn this;\n\t}", "public void setCountries(List<Country> countries)\n {\n this.countries = countries;\n\n countriesMap = countries.stream().\n filter(c -> !\"-99\".equals(c.getIsoCode())).\n collect(Collectors.toMap(Country::getIsoCode, Function.identity()));\n\n LOGGER.info(\"Stored {} countries with valid code ( != -99) \", countriesMap.size());\n\n regions = new WorldRegions(countries);\n }", "public void setCountryId(java.lang.String countryId) {\r\n this.countryId = countryId;\r\n }", "public void setOriginatingCountry(java.lang.String originatingCountry) {\r\n this.originatingCountry = originatingCountry;\r\n }", "private void setCountryCode(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n countryCode_ = value;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "public String getCountry() {\n return country;\n }", "@Nonnull public CountryCode getCountry() { return country; }", "public void setCountryName(){\n\t\tcountry_name = JOptionPane.showInputDialog(FrameHandler.main_frame, \"Enter the name of your country\");\n\t}", "public String getCountry() {\r\n return this.country;\r\n }", "public String getCountry() {\n return country;\n }", "public Country(String countryName) {\n\t\tthis.countryName = countryName.toLowerCase();\n\t}", "public void setLanguage(String lang, String country, String variant) {\n mSelf.setLanguage(lang, country, variant);\n }", "public void setCountryCallingCode(int countryCallingCode) {\n this.countryCallingCode = countryCallingCode;\n }", "public String getCountry(){\n\t\treturn country;\n\t}", "public String getCountry(){\n\t\treturn country;\n\t}", "public void setId(int p_id) {\n\t\tm_country_id = p_id;\n\t}", "public Builder clearCountry() {\n bitField0_ = (bitField0_ & ~0x00000080);\n country_ = getDefaultInstance().getCountry();\n onChanged();\n return this;\n }", "public CountryCode getCountry() {\n return country;\n }", "boolean update(Country country);", "public Builder setCountryName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n countryName_ = value;\n onChanged();\n return this;\n }", "public void testSetCountry() {\r\n try {\r\n address.setCountry(null);\r\n fail(\"IAE expected\");\r\n } catch (IllegalArgumentException e) {\r\n //good\r\n }\r\n }", "private void setCountrySelected(String countrySelected, String divisionSelected) {\n for (Countries country : countriesList) {\n if (country.getCountry().equals(countrySelected)){\n this.countryCB.setValue(country);\n this.firstLevelDivisions = FirstLevelDivisionsDAOImpl.getAllStatesProvinces(country.getCountryID());\n stateProvinceCB.setItems(this.firstLevelDivisions);\n setSelectedStateProvince(country.getCountryID(), divisionSelected);\n return;\n }\n }\n }", "@FXML\n public void changeCountry(ActionEvent event) {\n Countries countries = countryCB.getSelectionModel().getSelectedItem();\n\n showStatesProvinces(countries.getCountryID());\n }", "public String getCountry() {\n return Country;\n }", "public void switchToCountry()\n {\n questionLabel.setText(currentQuestion.getQuestion());\n d.setVisible(true);\n atQuestionStage=true;\n mapImageLabel.setVisible(false);\n a.setText(\"A\");\n b.setText(\"B\");\n c.setText(\"C\");\n a.setBounds(380,220,a.getPreferredSize().height+20,30);\n b.setBounds(500,220,b.getPreferredSize().height+20,30);\n c.setBounds(380,320,c.getPreferredSize().height+20,30);\n d.setBounds(500,320,d.getPreferredSize().height+20,30);\n questionLabel.setBounds(380,100,600,100);\n revalidate();\n }", "private void setCountryCode( Office office ) {\n String country = null;\n switch ( office ) {\n case BRISTOL:\n case EDINBURGH:\n case GLASGOW:\n case LONDON:\n case MANCHESTER:\n case TAUNTON:\n country = Country.UK.getLongName();\n break;\n case PERTH:\n case SYDNEY:\n country = Country.AUSTRALIA.getLongName();\n break;\n case SINGAPORE:\n country = Country.SINGAPORE.getLongName();\n break;\n }\n\n countryCode.setText( new StringBuilder()\n .append( country )\n .append( \" \" )\n .append( \"(\" )\n .append( Country.getCountryFromName( country ).getIntCode() )\n .append( \")\" )\n .toString() );\n }", "public Integer getCountry() {\n return country;\n }", "public Integer getCountry() {\n return country;\n }", "public String getCountry()\n {\n return country;\n }", "static public void set_country_data(){\n\n\t\tEdit_row_window.attrs = new String[]{\"country name:\", \"area (1000 km^2):\", \"GDP per capita (1000 $):\",\n\t\t\t\t\"population (million):\", \"capital:\", \"GDP (billion $):\"};\n\t\tEdit_row_window.attr_vals = new String[]\n\t\t\t\t{Edit_row_window.selected[0].getText(1), Edit_row_window.selected[0].getText(2), \n\t\t\t\tEdit_row_window.selected[0].getText(3), Edit_row_window.selected[0].getText(4), \n\t\t\t\tEdit_row_window.selected[0].getText(5), Edit_row_window.selected[0].getText(6)};\n\t\t\n\t\tEdit_row_window.linked_query =\t\" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\t\t\t\t\t\t\t\" from curr_places_locations l, \" +\n\t\t\t\t\t\t\t\t\t\t\t\" curr_places_location_country lc \" +\n\t\t\t\t\t\t\t\t\t\t\t\" where lc.location_id=l.id and lc.country_id=\"+Edit_row_window.id+\n\t\t\t\t\t\t\t\t\t\t\t\" order by num_links desc \";\n\t\t\t\t\n\t\tEdit_row_window.not_linked_query = \" select distinct l.id, l.name, l.num_links, l.population \" +\n\t\t\t\t\" from curr_places_locations l \";\n\t\t\n\t\tEdit_row_window.linked_attrs = new String[]{\"id\", \"location name\", \"rating\", \"population\"};\n\t\tEdit_row_window.label_min_parameter=\"min. population:\";\n\t\tEdit_row_window.linked_category_name = \"LOCATIONS\";\n\t}" ]
[ "0.7789656", "0.7582852", "0.7582852", "0.7558983", "0.7558983", "0.7558983", "0.7558983", "0.7558983", "0.7558983", "0.7523704", "0.7478884", "0.74575716", "0.74575716", "0.74575716", "0.7450129", "0.73693115", "0.73693115", "0.73693115", "0.7366807", "0.73191917", "0.72462755", "0.72119904", "0.71649", "0.71502876", "0.7023554", "0.69972116", "0.6984259", "0.6853286", "0.6853286", "0.6849489", "0.6840416", "0.64699227", "0.6412296", "0.6412296", "0.63202757", "0.63087016", "0.6294505", "0.62690234", "0.6264042", "0.6260255", "0.6251509", "0.62423784", "0.62421227", "0.6228516", "0.6224087", "0.62002814", "0.61831665", "0.61691517", "0.6141993", "0.61300635", "0.61300635", "0.6084924", "0.60788304", "0.6076925", "0.60685384", "0.6065234", "0.6055908", "0.6054262", "0.6049253", "0.6046017", "0.6046017", "0.6046017", "0.60337985", "0.60319436", "0.6022897", "0.60087556", "0.5988822", "0.5981398", "0.5978171", "0.59734344", "0.59734344", "0.59734344", "0.59734344", "0.59734344", "0.59734344", "0.59734344", "0.59627897", "0.59420717", "0.59388006", "0.5937817", "0.5915337", "0.5914442", "0.59140974", "0.59039485", "0.59039485", "0.5882668", "0.58774984", "0.5869652", "0.5855546", "0.58490026", "0.5840419", "0.5817378", "0.5814577", "0.57861793", "0.57849944", "0.5775992", "0.5738747", "0.5738747", "0.5730461", "0.5710139" ]
0.7558611
9
Gets the current city.
public StringFilter getCurrentCity() { return currentCity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCity () {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public java.lang.String getCity() {\n return city;\n }", "public java.lang.String getCity() {\n return city;\n }", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getLocationCity() {\n return locationCity;\n }", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public String getCity() {\n return (String) get(\"city\");\n }", "public java.lang.String getCity() {\r\n return city;\r\n }", "public String getCity() {\n return city;\n }", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public java.lang.String getCity() {\n return City;\n }", "public String getCity()\n {\n \treturn city;\n }", "public String getCity()\r\n\t{\r\n\t\treturn city.getModelObjectAsString();\r\n\t}", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "private String getCurrentCity(double lat, double longitude) {\n String currentCity = \"\";\n Geocoder geocoder = new Geocoder(this, Locale.getDefault());\n try {\n List<Address> addresses = geocoder.getFromLocation(lat,longitude,1);\n currentCity = addresses.get(0).getLocality();\n } catch(IOException e){\n e.printStackTrace();\n }\n return currentCity;\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public CityEntry getCity(){\n\t\treturn (CityEntry)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_LINK);\n\t}", "public static String getOpenCity() {\n\t\tif (!mInitialized) Log.v(\"OpenIp\", \"Initialisation isn't done\");\n\t\treturn city;\n\t}", "public String getCity() {\n return (String)getAttributeInternal(CITY);\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return City;\n }", "@Override\n\tpublic java.lang.String getCity() {\n\t\treturn _candidate.getCity();\n\t}", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public City getCity() {\n return city;\n }", "@Override\n public String getCity() {\n return this.city;\n }", "public Integer getCity() {\n return city;\n }", "public Integer getCity() {\n return city;\n }", "public String getCorpCity() {\n return corpCity;\n }", "String getCity();", "public String getCityName() {\n return cityName;\n }", "public String getCityName() {\n return cityName;\n }", "public String getOriginCityName() {\n return origin.getCityName();\n }", "public String getCityName(){\n\t\treturn (String)this.entryMap.get(ObjectGeoKeys.OBJ_GEO_CITY_NAME);\n\t}", "String getCity(){\n return prefs.getString(\"city\", null);\n }", "public String getJobCity() {\r\n return jobCity;\r\n }", "@AutoEscape\n\tpublic String getCity();", "public String getCompanyCity() {\n return companyCity;\n }", "@Override\n\tpublic int getCityId() {\n\t\treturn _locMstLocation.getCityId();\n\t}", "public String getCityname() {\n return cityname;\n }", "public String getAccountCityName() {\n return accountCityName;\n }", "public java.lang.String getCitycode() {\n\t\treturn _dmHistoryMaritime.getCitycode();\n\t}", "public String getContactCity() {\n return contactCity;\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCityCode() {\n return cityCode;\n }", "public String getCity(){\n return city;\n }", "public String getCity(){\n return city;\n }", "public String getArrivalCity() {\n\t\treturn arrivalCityElement.getAttribute(\"value\");\n\t}", "public String getCityId() {\r\n return cityId;\r\n }", "java.lang.String getTransitAirportCity();", "public String getCityId() {\n return cityId;\n }", "public Long getOriginCityId() {\n return origin.getCityId();\n }", "public Long getCityId() {\n\t\treturn cityId;\n\t}", "java.lang.String getCityName();", "public CustomerAddressQuery city() {\n startField(\"city\");\n\n return this;\n }", "City city(int i) {\r\n\t\treturn tsp.cities[this.index[i]];\r\n\t}", "public String getCityno() {\n return cityno;\n }", "public String getCityCode() {\n return (String)getAttributeInternal(CITYCODE);\n }", "public String getCreatecity() {\n return createcity;\n }", "public String getAdmCity() {\n return admCity;\n }", "public Long getCityId() {\n return cityId;\n }", "java.lang.String getArrivalAirportCity();", "public String getRegisterCity() {\n return registerCity;\n }", "@Override\n\tpublic ArrayList<String> getCityList() {\n\t\treturn constantPO.getCityList();\n\t}", "java.lang.String getRegisteredOfficeCity();", "java.lang.String getDepartureAirportCity();", "public City fst() {\n return city1;\n }", "public String getdArrivedcity() {\n return dArrivedcity;\n }", "public String getCity_id() {\n return city_id;\n }", "public Long getCitiesCityCode() {\n return citiesCityCode;\n }", "public String getCity() {\n\n return \" \\n\" +\n \" B BB \\n\" +\n \" BB BBBB \\n\" +\n \" BBBB BBB BBBBBBB \\n\" +\n \" BBBbBBBB BBBBbbbbBBBBB \\n\" +\n \" BBBbbbBBBBBbbbbbbBBBBBBB\\n\" +\n \" BBbbbbbbbBBbbbbbbbBBBBBBB\\n\" +\n \"BBbbbbbLLLbbbbbbbLbbbbbBBBB\\n\" +\n \"BbbbbLLLLLLLLLLLLLLbbbbbbbB\\n\";\n }", "public String getHospitalCity() {\n return hospitalCity;\n }", "public String getDestinationCityName() {\n return destination.getCityName();\n }", "public Integer getCityId() {\n return cityId;\n }", "public Integer getCityId() {\n return cityId;\n }", "public String getDepartCity() {\n\t\treturn departCityElement.getAttribute(\"value\");\n\t}", "public String getCityLink(){\n\t\treturn (String)this.entryMap.get(GeoKeys.LOCAL_GEO_CITY_LINK);\n\t}", "public String getdStartcity() {\n return dStartcity;\n }", "public String getOffCampusCityName() {\n return offCampusCityName;\n }" ]
[ "0.81358945", "0.8039266", "0.8030491", "0.8030491", "0.8030491", "0.8030491", "0.80164045", "0.79989135", "0.79989135", "0.7997939", "0.79963803", "0.79963803", "0.7996232", "0.7992021", "0.7971736", "0.7960722", "0.78835213", "0.7859628", "0.7830819", "0.7814774", "0.7807957", "0.7775954", "0.77729034", "0.7729041", "0.7729041", "0.7729041", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.77119017", "0.76795584", "0.76561546", "0.76552826", "0.75880027", "0.75820893", "0.75805223", "0.7564031", "0.7564031", "0.7564031", "0.75597113", "0.74596435", "0.73177135", "0.73177135", "0.73155755", "0.7314957", "0.72501844", "0.72501844", "0.7229716", "0.71601343", "0.7147787", "0.7143986", "0.71372515", "0.7121528", "0.70846266", "0.7064888", "0.7001183", "0.69517803", "0.6935586", "0.6923325", "0.6923325", "0.69084704", "0.69084704", "0.68997055", "0.68764645", "0.687498", "0.6843166", "0.6835326", "0.68261003", "0.68049264", "0.6804711", "0.67988265", "0.679849", "0.67979026", "0.67962307", "0.6759756", "0.6751184", "0.67392814", "0.67320484", "0.67291117", "0.67230076", "0.67225677", "0.66853625", "0.6678575", "0.66597915", "0.6634016", "0.66249156", "0.6623513", "0.66197574", "0.6612168", "0.6612168", "0.66095316", "0.6600202", "0.65986675", "0.65776956" ]
0.78766847
17
Sets the current city.
public void setCurrentCity(StringFilter currentCity) { this.currentCity = currentCity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCity(City city) {\n this.city = city;\n }", "public void setCurrentCity(City newCity) {\n\t\tcurrentCity = newCity;\n\t\tchange();\n\t}", "public void setCity(City city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city);", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity(String city) {\r\n this.city = city;\r\n }", "public void setCity (String city) {\n\t\tthis.city=city;\n\t}", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city) {\n this.city = city;\n }", "public void setCity(String city)\n\t{\n\t\tCity = city;\n\t}", "public void setCity(String city){\n this.city = city;\n }", "public void setCity(String city){\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(String city) {\r\n\t\tthis.city = city;\r\n\t}", "public void setCity(java.lang.String city) {\r\n this.city = city;\r\n }", "public void setCity(java.lang.String city) {\n this.city = city;\n }", "public void setCity(java.lang.String city) {\n this.city = city;\n }", "public void setCity(String value) {\n setAttributeInternal(CITY, value);\n }", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(String city) {\n\t\tthis.city = city;\n\t}", "public void setCity(java.lang.String City) {\n this.City = City;\n }", "public void setCity (java.lang.String city) {\n\t\tthis.city = city;\n\t}", "@SuppressWarnings(\"All\")\n void setCity(String city){\n prefs.edit().putString(\"city\", city).commit();\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "public void setCity(Integer city) {\n this.city = city;\n }", "@Override\n public void setCity(String a) {\n this.city = a;\n }", "@Override\n\tpublic void setCity(java.lang.String city) {\n\t\t_candidate.setCity(city);\n\t}", "public void setCity(String s) {\r\n\t\tstate = s;\t\t\r\n\t}", "public void setCity(int tourPosition, City city) {\n tour.set(tourPosition, city);\n // If the tours been altered we need to reset the fitness and distance\n fitness = 0;\n distance = 0;\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public void setCity(String city) {\n this.city = city == null ? null : city.trim();\n }", "public abstract void setCity(String sValue);", "public boolean setCity(String someCity) {\n if (VMSPro.checkString(someCity)) {\n this.city = someCity;\n return true;\n }\n return false;\n }", "public void setLocationCity(String locationCity) {\n this.locationCity = locationCity;\n }", "public void setCityname(String cityname) {\n this.cityname = cityname;\n }", "public void setCityName(String cityName) {\n this.cityName = cityName;\n }", "public void setCityName(String cityName) {\n this.cityName = cityName;\n }", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public String getCity() {\r\n\t\treturn city;\r\n\t}", "public void setSrcCity(String value) {\r\n setAttributeInternal(SRCCITY, value);\r\n }", "public String getCity() {\r\n\t\treturn city;\t\t\r\n\t}", "public void setCity( EAIMMCtxtIfc theCtxt, java.lang.String theCity) throws EAIException;", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn city;\n\t}", "public Address city(String city) {\n this.city = city;\n return this;\n }", "public String getCity() {\n return city;\n }", "protected void setCities(Vector<Site> cities){\n this.cities=cities;\n }", "public void setCityFieldName(final String value) {\n setProperty(CITY_FIELD_NAME_KEY, value);\n }", "public String getCity()\n\t{\n\t\treturn city;\n\t}", "public String getCity() \n\t{\n\t\treturn city;\n\t}", "public String getCity() {\n\t\treturn this.city;\n\t}", "public void setAddressCity(String addressCity) {\n this.addressCity = addressCity;\n }", "public void setCityId(String cityId) {\n this.cityId = cityId;\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public String getCity() {\r\n return city;\r\n }", "public void setCorpCity(String corpCity) {\n this.corpCity = corpCity;\n }", "public void setCityId(String cityId) {\r\n this.cityId = cityId;\r\n }", "@Override\n\tpublic void setCityId(int CityId) {\n\t\t_locMstLocation.setCityId(CityId);\n\t}", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public String getCity() {\n return this.city;\n }", "public void setCITY1(java.lang.String value)\n {\n if ((__CITY1 == null) != (value == null) || (value != null && ! value.equals(__CITY1)))\n {\n _isDirty = true;\n }\n __CITY1 = value;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public String getCity() {\n return city;\n }", "public void setCity_id(String city_id) {\n this.city_id = city_id;\n }", "public Builder setCityName(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n cityName_ = value;\n onChanged();\n return this;\n }", "public void setJobCity(String jobCity) {\r\n this.jobCity = jobCity;\r\n }", "public String getCity() {\n return city;\n }", "public String getCity()\n {\n \treturn city;\n }", "public CustomerAddressQuery city() {\n startField(\"city\");\n\n return this;\n }", "public void setCityId(Long cityId) {\n this.cityId = cityId;\n }", "public void setCityId(Integer cityId) {\n this.cityId = cityId;\n }", "public String getCity()\n\t{\n\t\treturn City;\n\t\t\n\t}", "public void setCityCode(String value) {\n setAttributeInternal(CITYCODE, value);\n }", "@Override\n\tpublic String getCity() {\n\t\treturn this.city;\n\t}", "public void setCity(AirportDTO airportDTO, Airport airport) {\n City cityFound = cityDAO.findCityByName(airportDTO.getCityDTO().getName());\n if (cityFound != null) {\n airport.setCity(cityFound);\n } else {\n City city = new City();\n city.setName(airportDTO.getCityDTO().getName());\n setCountry(airportDTO, city);\n airport.setCity(city);\n }\n }", "public void setCityid(Integer cityid) {\n this.cityid = cityid;\n }", "public void setContactCity(String contactCity) {\n this.contactCity = contactCity;\n }", "public void setRegisterCity(String registerCity) {\n this.registerCity = registerCity;\n }" ]
[ "0.78182817", "0.7790616", "0.7663355", "0.7643661", "0.7620953", "0.7620953", "0.76043296", "0.75825083", "0.7574321", "0.7574321", "0.7574321", "0.7574321", "0.7574321", "0.7574321", "0.75609326", "0.7546554", "0.75458014", "0.75133663", "0.75133663", "0.74503726", "0.74318993", "0.74318993", "0.742031", "0.7412809", "0.7412809", "0.7412809", "0.7412809", "0.74041057", "0.7315441", "0.73001444", "0.7248964", "0.7248964", "0.72445667", "0.7205159", "0.7204832", "0.715743", "0.7042371", "0.7042371", "0.7042371", "0.7042371", "0.7042371", "0.7002827", "0.69197094", "0.67394936", "0.6640072", "0.6608821", "0.6608821", "0.6585176", "0.6585176", "0.6574942", "0.6547844", "0.65471405", "0.6521697", "0.6521697", "0.6521697", "0.6521697", "0.64908767", "0.6488275", "0.6471797", "0.64624864", "0.64050764", "0.64030635", "0.6396418", "0.63959944", "0.63958263", "0.63871443", "0.63871443", "0.63871443", "0.63769877", "0.63574505", "0.6327283", "0.631623", "0.631623", "0.631623", "0.6309767", "0.630155", "0.630155", "0.630155", "0.630155", "0.630155", "0.630155", "0.630155", "0.630155", "0.630155", "0.630155", "0.6297208", "0.6276073", "0.6262768", "0.623465", "0.6202115", "0.619707", "0.61946076", "0.6188513", "0.61787486", "0.61772716", "0.61653316", "0.61639625", "0.61521524", "0.6151098", "0.6098154" ]
0.7670231
2
Gets the skill tag id.
public LongFilter getSkillTagId() { return skillTagId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getSkillId();", "public Integer getTagId() {\n return tagId;\n }", "public Integer getTagId() {\n return tagId;\n }", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "public String getTagId() {\n return tagId;\n }", "public Long getTagId() {\r\n return tagId;\r\n }", "public Integer getSkillId() {\n return skillId;\n }", "public Long getTagid() {\n return tagid;\n }", "public LongFilter getSkillId() {\n\t\treturn skillId;\n\t}", "public int getTag() {\n return tag;\n }", "public String getTag() {\n return tagNum;\n }", "public long getTagId(String tag) {\n\n\t\tCursor cursor = m_db.query(TAG_TABLE_NAME,\n\t\t\t\tnew String[] { TAG_FIELD_ID }, TAG_FIELD_NAME + \"=?\",\n\t\t\t\tnew String[] { tag }, null, null, null);\n\n\t\t//\n\t\t// get first entry of result set\n\t\t//\n\t\tString result = getFirstEntryOfResultSet(cursor);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\tif (result == null)\n\t\t\treturn -1;\n\t\telse\n\t\t\treturn Long.parseLong(result);\n\t}", "public int getMyTag()\n\t{\n\t\treturn myTag;\n\t}", "public int getTagNum() {\n return Integer.parseInt(getTag());\n }", "public java.lang.String getIdTag()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(IDTAG$0, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "public StringFilter getSkillTagName() {\n\t\treturn skillTagName;\n\t}", "public java.lang.String getEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "java.lang.String getTag();", "java.lang.String getTag();", "public org.apache.xmlbeans.XmlString xgetEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n return target;\n }\n }", "int getTagNo();", "public String getTag()\n\t{\n\t\treturn tag;\n\t}", "public String getTag()\n\t{\n\t\treturn tag;\n\t}", "public String getSkill() {\n\t\treturn skill;\n\t}", "public String getTag() {\n return tag;\n }", "public String getTag() {\n\t\treturn tag;\n\t}", "public String getTag() {\r\n return tag;\r\n }", "public String getTag() {\n return tag;\n }", "public String getTag() {\n return tag;\n }", "@Override\n public int getTag() {\n return this.tag;\n }", "public String getTag()\n {\n return this.tag;\n }", "String getTag();", "public String getTag() {\n return this.tag;\n }", "String getTag() {\n return tag;\n }", "public String tag()\r\n {\r\n return this.tag;\r\n }", "public String getTagKey() {\n return tagKey;\n }", "public ocpp.IdTagInfo getIdTagInfo()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ocpp.IdTagInfo target = null;\n target = (ocpp.IdTagInfo)get_store().find_element_user(IDTAGINFO$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public int getTagNumber() {\n return tagNumber;\n }", "public ocpp.IdToken xgetIdTag()\n {\n synchronized (monitor())\n {\n check_orphaned();\n ocpp.IdToken target = null;\n target = (ocpp.IdToken)get_store().find_element_user(IDTAG$0, 0);\n return target;\n }\n }", "public String getTag();", "public java.lang.String getTag() {\n java.lang.Object ref = tag_;\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 tag_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getTag() {\n java.lang.Object ref = tag_;\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 tag_ = s;\n return s;\n }\n }", "public String getRfidTagNum() {\n return rfidTagNum;\n }", "public GTag getTag() {\r\n\t\treturn tag;\r\n\t}", "public String getTag() {\n if (mTag == null) {\n try {\n mTag = mSessionBinder.getTag();\n } catch (RemoteException e) {\n Log.d(TAG, \"Dead object in getTag.\", e);\n }\n }\n return mTag;\n }", "public int getTag()\n {\n return this.m_descriptor[0] & 0xFF;\n }", "public int tag () { return MyTag; }", "long getTraceTag();", "public void setSkillTagId(LongFilter skillTagId) {\n\t\tthis.skillTagId = skillTagId;\n\t}", "public String getId() {\n\t\treturn this.token.get(\"id\").toString();\n\t}", "java.lang.String getRecognitionId();", "public @NotNull String getTag() {\n\n String tag = getConfig().getString(\"messages.tag\");\n return (tag == null) ? \"\" : Utils.format(tag);\n }", "public String getTag() {\n\t\treturn mStag;\n\t}", "public com.transerainc.aha.gen.agent.SkillDocument.Skill getSkill()\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public String getId() {\n return mBundle.getString(KEY_ID);\n }", "Skill getSkill(Long skillId) throws DbException;", "public String getFromTag();", "public String getTAG() {\r\n return TAG;\r\n }", "public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }", "public void getGenericID(int seqid, String tag, String gid);", "public String getTagNum(String tagName) {\n\t\treturn tagNameToNumber.get(tagName);\n\t\t// return tagName;\n\t}", "public long getTraceTag() {\n return traceTag_;\n }", "public String getTagAt(int pos){\n\t\treturn sentence.get(pos).getTag();\n\t}", "public String getId()\r\n {\r\n return getAttribute(\"id\");\r\n }", "public int getTag(int position) {\r\n return dataTag.get(position);\r\n }", "public long getTraceTag() {\n return traceTag_;\n }", "public String getSkillsetName() {\n return skillsetName;\n }", "private String tagKey() {\n return tags.values().toString();\n }", "public String getSentenceID() {\n if (GeneTAG_Type.featOkTst && ((GeneTAG_Type)jcasType).casFeat_SentenceID == null)\n jcasType.jcas.throwFeatMissing(\"SentenceID\", \"GeneTAG\");\n return jcasType.ll_cas.ll_getStringValue(addr, ((GeneTAG_Type)jcasType).casFeatCode_SentenceID);}", "public ULong getXbtId() {\n return (ULong) get(2);\n }", "public String getTagname() {\n return tagname;\n }", "public int getId() {\r\n \t\r\n \treturn textureId;\r\n }", "public String getTag() {\r\n return new String(XML_TAG);\r\n }", "@JsonGetter(\"tag\")\r\n public String getTag() {\r\n return tag;\r\n }", "public String getId() {\n return (String)getAttributeInternal(ID);\n }", "public String getId() {\n return (String)getAttributeInternal(ID);\n }", "java.lang.String getTid();", "java.lang.String getTid();", "public String getTag() {\n return new String(XML_TAG);\n }", "String getSkill( String key, Integer index ) {\n return developer.skills.get( index );\n }", "@Override\n public String getTag() {\n return this.reference;\n }", "public Integer getId() {\n return (Integer) get(0);\n }", "public Integer getTid() {\r\n return tid;\r\n }", "public Double getSkillNumber() {\n return skillNumber;\n }", "public void setTagid(Long tagid) {\n this.tagid = tagid;\n }", "org.multibit.hd.core.protobuf.MBHDContactsProtos.Tag getTag(int index);", "public UUID getID() {\r\n if(!getPayload().has(\"id\")) return null;\r\n return UUID.fromString(getPayload().getString(\"id\"));\r\n }", "@Override\n public int getSkillLevel(int skillId) {\n final Skill skill = getKnownSkill(skillId);\n return (skill == null) ? 0 : skill.getLevel();\n }", "public Object getWindowTag() {\n if (null != mChatMap) {\n Object tag = mChatMap.getTag();\n return tag;\n } else {\n Logger.w(TAG, \"getWindowTag() mChatMap is null\");\n return null;\n }\n }", "public int getTid();", "@XmlElement(name = \"identifier\", namespace = Namespaces.SRV)\n final String getIdentifier() {\n if (LEGACY_XML) {\n final ScopedName name = getScopedName();\n if (name != null) {\n return name.tip().toString();\n }\n }\n return null;\n }", "public String getId()\r\n\t{\n\t\treturn id.substring(2, 5);\r\n\t}", "public String getItTag() {\n return itTag;\n }", "public final int getInt(final String tagToGet) {\n try {\n return Integer.parseInt(getStr(tagToGet));\n } catch (final Exception t) {\n return 0;\n }\n }", "public org.multibit.hd.core.protobuf.MBHDContactsProtos.Tag getTag(int index) {\n return tag_.get(index);\n }", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();", "java.lang.String getId();" ]
[ "0.69736594", "0.68763334", "0.68763334", "0.68576264", "0.68570375", "0.68406814", "0.6836566", "0.68235666", "0.675078", "0.6331318", "0.6296396", "0.629064", "0.6286646", "0.62646496", "0.6228018", "0.61808395", "0.61468154", "0.6127701", "0.61148757", "0.61148757", "0.6046349", "0.6002078", "0.599147", "0.599147", "0.59907085", "0.59506494", "0.5946789", "0.5925825", "0.59146625", "0.59146625", "0.59073514", "0.58693004", "0.5861452", "0.5855054", "0.58360356", "0.5804394", "0.5745316", "0.5741347", "0.5740984", "0.5740371", "0.57383966", "0.5723054", "0.5696", "0.56779987", "0.5660964", "0.56476223", "0.5630685", "0.55813587", "0.55773884", "0.5571347", "0.5489061", "0.54865944", "0.5464308", "0.5462697", "0.5447101", "0.54432917", "0.5419842", "0.540608", "0.53903794", "0.5370396", "0.53371596", "0.5329323", "0.5308375", "0.53080446", "0.52981853", "0.52883846", "0.5287258", "0.5282894", "0.52764285", "0.5269432", "0.52694315", "0.52448565", "0.52290165", "0.5222716", "0.5209766", "0.520809", "0.520809", "0.52075565", "0.52075565", "0.5202749", "0.5196554", "0.5185199", "0.51833093", "0.5163186", "0.51584923", "0.5158134", "0.5153882", "0.51497006", "0.5143191", "0.5142249", "0.5141916", "0.5134544", "0.5128627", "0.51142025", "0.5111225", "0.5108127", "0.5104071", "0.5104071", "0.5104071", "0.5104071" ]
0.7462816
0
Sets the skill tag id.
public void setSkillTagId(LongFilter skillTagId) { this.skillTagId = skillTagId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setSkillId(int value) {\n \n skillId_ = value;\n onChanged();\n return this;\n }", "public void xsetIdTag(ocpp.IdToken idTag)\n {\n synchronized (monitor())\n {\n check_orphaned();\n ocpp.IdToken target = null;\n target = (ocpp.IdToken)get_store().find_element_user(IDTAG$0, 0);\n if (target == null)\n {\n target = (ocpp.IdToken)get_store().add_element_user(IDTAG$0);\n }\n target.set(idTag);\n }\n }", "public void setIdTag(java.lang.String idTag)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(IDTAG$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(IDTAG$0);\n }\n target.setStringValue(idTag);\n }\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "public void setTag(int tag) {\n this.tag = tag;\n }", "public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }", "public void setTagid(Long tagid) {\n this.tagid = tagid;\n }", "void setTag(java.lang.String tag);", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "public void setTag(String tag);", "public LongFilter getSkillTagId() {\n\t\treturn skillTagId;\n\t}", "public void setTag(Tag tag) {\n\t\tProgramTags newTag = program.getTagIfPresent(tag); // throws if no such tag in program\n\t\tsetTag(newTag);\n\t}", "public void setMyTag(int theTag)\n\t{\n\t\tmyTag = theTag;\n\t}", "public void setTagId(Long tagId) {\r\n this.tagId = tagId;\r\n }", "public void setTagId(Integer tagId) {\n this.tagId = tagId;\n }", "public void setTagId(Integer tagId) {\n this.tagId = tagId;\n }", "public void setTagId(String tagId) {\n this.tagId = tagId == null ? null : tagId.trim();\n }", "public void setTagId(String tagId) {\n this.tagId = tagId;\n }", "public void xsetEnumSkillId(org.apache.xmlbeans.XmlString enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.set(enumSkillId);\n }\n }", "public void setTag(ProgramTags tag) {\n\t\tthis.tag = program.getTagIfPresent(tag.getTag());\n\t}", "public void setTag(Object tag)\n {\n fTag = tag;\n }", "public void setTag( String tag )\n {\n this.tag = tag;\n }", "public void setTag(String tag) {\r\n this.tag = tag;\r\n }", "@Override\n public void setTag(int t) {\n this.tag = t;\n\n }", "public void setTag(String tag) {\n this.tag = tag;\n }", "public void setTag(String tag) {\n this.tag = tag;\n }", "public boolean setTag(int tag)\n {\n if (tag < 0) {\n return false;\n }\n\n tag_ = tag;\n return true;\n }", "@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{id}/tag/\")\n @javax.transaction.Transactional\n public void assignTag(@PathParam(\"id\") final long id, final int tagId) {\n service.assignTag(id, tagId);\n }", "public void setSkillId(LongFilter skillId) {\n\t\tthis.skillId = skillId;\n\t}", "public void setEnumSkillId(java.lang.String enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.setStringValue(enumSkillId);\n }\n }", "public void setSkillTagName(StringFilter skillTagName) {\n\t\tthis.skillTagName = skillTagName;\n\t}", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "@java.lang.Override\n public int getSkillId() {\n return skillId_;\n }", "public void setIdTagInfo(ocpp.IdTagInfo idTagInfo)\n {\n synchronized (monitor())\n {\n check_orphaned();\n ocpp.IdTagInfo target = null;\n target = (ocpp.IdTagInfo)get_store().find_element_user(IDTAGINFO$0, 0);\n if (target == null)\n {\n target = (ocpp.IdTagInfo)get_store().add_element_user(IDTAGINFO$0);\n }\n target.set(idTagInfo);\n }\n }", "public Integer getSkillId() {\n return skillId;\n }", "@JsonSetter(\"tag\")\r\n public void setTag(String tag) {\r\n this.tag = tag;\r\n }", "public void setToTag(String tag) throws ParseException,NullPointerException;", "public TagAttributeHandlerBuilder tag(String tag) {\n this.tag = tag;\n return this;\n }", "void changeSkill(Long pokemonId, int newSkill);", "public Tag(String tag) {\n\t\tthis.tag = tag;\n\t}", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "public String getTagId() {\n return tagId;\n }", "public void setStandID(ItemStack stack, int ID) {\n/* 219 */ NBTTagCompound nbttagcompound = stack.getTagCompound();\n/* */ \n/* 221 */ if (nbttagcompound == null) {\n/* */ \n/* 223 */ nbttagcompound = new NBTTagCompound();\n/* 224 */ stack.setTagCompound(nbttagcompound);\n/* */ } \n/* */ \n/* 227 */ NBTTagCompound nbttagcompound1 = nbttagcompound.getCompoundTag(this.standInfo);\n/* */ \n/* 229 */ if (!nbttagcompound.hasKey(this.standInfo))\n/* */ {\n/* 231 */ nbttagcompound.setTag(this.standInfo, nbttagcompound1);\n/* */ }\n/* */ \n/* 234 */ nbttagcompound1.setInteger(this.standID, ID);\n/* */ }", "public LongFilter getSkillId() {\n\t\treturn skillId;\n\t}", "public Long getTagId() {\r\n return tagId;\r\n }", "int getSkillId();", "public void setFromTag(String tag) throws ParseException,NullPointerException;", "public Builder clearSkillId() {\n \n skillId_ = 0;\n onChanged();\n return this;\n }", "public Long getTagid() {\n return tagid;\n }", "public Integer getTagId() {\n return tagId;\n }", "public Integer getTagId() {\n return tagId;\n }", "public void addTag(String tag) {\n this.tag = tag;\n }", "public void setTag(String tagName, Object value);", "public static void setTag(Tag tag, String newValue){\n makeInstance();\n //set the new tag value\n settingsFile.setTag(tag, newValue);\n //notify all of the listeners of the modified tag that its value changed\n notifyListenersOfTag(tag);\n }", "@POST\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"/{id}/protectedtag/\")\n @javax.transaction.Transactional\n public void assignPermissionProtectedTag(@PathParam(\"id\") final long id, final int tagId) {\n service.assignTag(id, tagId);\n }", "@Override\n\tpublic void setId(long id) {\n\t\t_phieugiahan.setId(id);\n\t}", "public void setTid(int tid);", "void xsetTag(org.apache.xmlbeans.XmlString tag);", "public void setId(String id) {\n mBundle.putString(KEY_ID, id);\n }", "public static void increaseSkill(int skillId, Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tplayerSkillsArray[playerNumber][skillId]++;\n\t\tbackupSkills();\n\t\tsaveSkills();\n\t}", "public void setSkillPrediction(Skills skill);", "public JdwpId (byte tag)\r\n {\r\n _tag = tag;\r\n }", "void updateSkill(Skill skill);", "@Override\r\n\tpublic void setId(final K id) {\n\t\tsuper.setId(id);\r\n\t}", "public void addTag(String table, int id, String tag) throws SQLException {\n\t\tquery = \"UPDATE \" + table + \" SET tag='\" + tag + \"' WHERE id=\" + id;\n\t\tstmt.execute(query);\n\t\tif(table.equals(\"publication\")) {\n\t\t\tquery = \"UPDATE dance SET tag='\" + tag + \"' WHERE id in \"\n\t\t\t\t\t+ \"(SELECT dance_id FROM dancespublicationsmap WHERE publication_id=\" + id + \")\";\n\t\t\tstmt.execute(query);\n\t\t} else if(table.equals(\"album\")) {\n\t\t\tquery = \"UPDATE recording SET tag='\" + tag + \"' WHERE id in \"\n\t\t\t\t\t+ \"(SELECT recording_id FROM albumsrecordingsmap WHERE album_id=\" + id + \")\";\n\t\t\tstmt.execute(query);\n\t\t}\n\t}", "public void xsetEnumSkillName(org.apache.xmlbeans.XmlString enumSkillName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLNAME$8);\n }\n target.set(enumSkillName);\n }\n }", "private void setHasTag(int value) {\n \n hasTag_ = value;\n }", "public void setId(String i) {\n\t\tid = i;\n\t}", "public Builder setTag(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n tag_ = value;\n onChanged();\n return this;\n }", "@Api(1.1)\n @NonNull\n public Builder tag(Object tag) {\n mRequestBuilder.tag(tag);\n return this;\n }", "public void setTagKey(String tagKey) {\n this.tagKey = tagKey;\n }", "public void setToTag(String tag) {\n try{\n toHeader.setTag(tag);\n }\n catch(ParseException e) {}\n }", "public void resetSkill(int id) {\r\n this.staticLevels[id] = id == HITPOINTS ? 10 : 1;\r\n this.dynamicLevels[id] = id == HITPOINTS ? 10 : 1;\r\n this.experience[id] = id == HITPOINTS ? 1154 : 0;\r\n refresh();\r\n updateCombatLevel();\r\n if (entity instanceof Player) {\r\n Player player = (Player) entity;\r\n player.getAppearance().sync();\r\n }\r\n }", "@Override\n\tpublic void setId(Integer arg0) {\n\n\t}", "@Override\n\t\tpublic void setId(final String identifier) {\n\t\t}", "public void addTag (@Nonnull ITag tag);", "public void setIdrequest(String idrequest) {\r\n\t\tthis.idrequest = idrequest;\r\n\t}", "public void setIdKlinik(String idKlinik) {\n this.idKlinik = idKlinik;\r\n }", "public void setID(beaver.Symbol symbol) {\n if(symbol.value != null && !(symbol.value instanceof String))\n throw new UnsupportedOperationException(\"setID is only valid for String lexemes\");\n tokenString_ID = (String)symbol.value;\n IDstart = symbol.getStart();\n IDend = symbol.getEnd();\n }", "public void SetID(int id) {\n TextureID = id;\n }", "public void setID(String id) {\r\n element.setAttributeNS(WSU_NS, WSU_PREFIX + \":Id\", id);\r\n }", "public static void setTag(String string) {\n\t\ttags.put(last[0], string);\n\t}", "public Gateway setTid(java.lang.String tid) {\n return genClient.setOther(tid, CacheKey.tid);\n }", "public Builder setTraceTag(long value) {\n bitField0_ |= 0x00004000;\n traceTag_ = value;\n onChanged();\n return this;\n }", "public void AddSkill(int aSkill_ID)\n\t{\n\t\tSkill aSkill= new Skill(aSkill_ID);\n\t\taSkill.user_Id=this.id;\n\t\tmySkills.add(aSkill);\n\t}", "public void setTagProperty(String tagProperty);", "public void setId(Uuid uuid) {\n\t\t this.id = uuid;;\n\t}", "public Event setTag(String tag) {\n this.tag = tag;\n return this;\n }", "public void setTitleID(String val){\n\t\ttid = val;\n\t}", "private void setId(String id) {\r\n\t\tAssert.hasText(id, \"This state must have a valid identifier\");\r\n\t\tthis.id = id;\r\n\t}", "public void setId(String tmp) {\n this.setId(Integer.parseInt(tmp));\n }", "public void setId(String id)\n\t{\n\t\tm_sID=id;\t\n\t}", "public void setId(UUID id) {\n this.id = id;\n }", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }", "public void setId(String id) {\n this.ide = id;\n //System.out.println(\"linkyhandler setid \" + ide);\n }", "public void setTagReference(String tag, int new_reference_count) {\n\n\t\t//\n\t\t// construct new content values\n\t\t//\n\t\tContentValues values = new ContentValues();\n\n\t\t//\n\t\t// set reference count\n\t\t//\n\t\tvalues.put(TAG_FIELD_USAGE, new Integer(new_reference_count));\n\n\t\t//\n\t\t// FIXME: fix race conditions\n\t\t//\n\t\tlong affected = m_db.update(TAG_TABLE_NAME, values, TAG_FIELD_NAME\n\t\t\t\t+ \"=?\", new String[] { tag });\n\n\t\t//\n\t\t// informal debug print\n\t\t//\n\t\tLogger.i(\"DBManager::setTagReference> result \" + affected);\n\t}", "public void setId(Object id) {\n this.id = id;\n }", "public void setId(Object id) {\n this.id = id;\n }", "void setId(String id);", "void setId(String id);" ]
[ "0.6814408", "0.6712586", "0.66308403", "0.6565713", "0.6506564", "0.6504899", "0.64155054", "0.6348466", "0.6334512", "0.6313581", "0.63098645", "0.6289516", "0.62721455", "0.62235045", "0.6214506", "0.6214506", "0.6189274", "0.6172818", "0.61583394", "0.6120725", "0.6098944", "0.60573006", "0.6007323", "0.595637", "0.5948353", "0.5948353", "0.59384006", "0.59281665", "0.5900287", "0.5884632", "0.5875792", "0.5860669", "0.585693", "0.5789145", "0.57368314", "0.57333875", "0.5730793", "0.56979245", "0.5612905", "0.5605767", "0.5512216", "0.54575324", "0.5422621", "0.5419864", "0.54185814", "0.5402354", "0.53610677", "0.5345452", "0.5333677", "0.53122073", "0.53122073", "0.5300478", "0.52955514", "0.5293828", "0.52756935", "0.52654684", "0.5242906", "0.52227366", "0.5196122", "0.51922446", "0.5171076", "0.51618516", "0.51316386", "0.51269746", "0.5111731", "0.5110449", "0.510713", "0.5075516", "0.5074114", "0.50591934", "0.50513154", "0.504099", "0.50218606", "0.50217384", "0.5018871", "0.5016749", "0.50141144", "0.5003369", "0.49957573", "0.4994996", "0.49897665", "0.49837035", "0.4981223", "0.49721217", "0.49678403", "0.4962597", "0.4955379", "0.49492553", "0.49434528", "0.49413145", "0.49375272", "0.4935542", "0.4930515", "0.4929967", "0.49245036", "0.49207765", "0.492051", "0.492051", "0.49111742", "0.49111742" ]
0.6696503
2
Checks if is macth all skill tag.
public boolean isMacthAllSkillTag() { return macthAllSkillTag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMacthAllSkillTag(boolean macthAllSkillTag) {\n\t\tthis.macthAllSkillTag = macthAllSkillTag;\n\t}", "public void setAllTags (boolean allTags) {\n\t\tthis.allTags = allTags;\n\t}", "@Override\n public boolean isTagged() {\n for (List<String> t : tags.values()) {\n if(!t.isEmpty()) return true;\n }\n return false;\n }", "private boolean isAll(String level) {\r\n\t\treturn level.equalsIgnoreCase(\"all\") || level.equalsIgnoreCase(\"private\");\r\n\t}", "public boolean hasAll() {\n return allBuilder_ != null || all_ != null;\n }", "public boolean hasAll() {\n return allBuilder_ != null || all_ != null;\n }", "private boolean checkSelectAll(){\n\t\tboolean ans = false;\n\t\tint i =0;//# of *\n\t\tfor(String temp : this.attrList){\n\t\t\tif(temp.equals(\"*\")){\n\t\t\t\t// ans = true;\n\t\t\t\ti++;\n\t\t\t\t// break;\n\t\t\t\tif (i==tableNames.size()) {\n\t\t\t\t\tans = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}", "public boolean hasAll() {\n return all_ != null;\n }", "public boolean hasAll() {\n return all_ != null;\n }", "public boolean isInterestedInAllItems();", "public boolean areAllAtLeast(int level) {\r\n for (int i = 0; i < SKILL_NAME.length; i++) {\r\n if (!ENABLED_SKILLS[i]) {\r\n continue;\r\n }\r\n // TODO CONSTRUCTION\r\n if (Objects.equals(SKILL_NAME[i], \"Construction\")) {\r\n continue;\r\n }\r\n if (getStaticLevel(i) < level) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "protected boolean isTargetTag(String tag) {\n\t\treturn this.nlpTagSet.contains(tag);\n\t}", "private boolean areAllChildrenIgnored(ExtensionContext context) {\n if (enabledTags.isEmpty()) {\n LOGGER.info(\"Test class {} with tags {} does not have any tag restrictions by tags: {}\",\n context.getDisplayName(), declaredTags, enabledTags);\n return false;\n } else {\n if (CollectionUtils.containsAny(enabledTags, declaredTags) || declaredTags.isEmpty()) {\n LOGGER.info(\"Test class {} with tags {} does not have any tag restrictions by tags: {}. Checking method tags ...\",\n context.getDisplayName(), declaredTags, enabledTags);\n for (Method method : testClass.getDeclaredMethods()) {\n if (method.getAnnotation(Test.class) == null) {\n continue;\n }\n if (!isWrongClusterType(method) && !isIgnoredByTag(method)) {\n LOGGER.info(\"One of the test group {} is enabled for test: {} with tags {} in class: {}\",\n enabledTags, method.getName(), declaredTags, context.getDisplayName());\n return false;\n }\n }\n }\n }\n LOGGER.info(\"None test from class {} is enabled for tags {}\", context.getDisplayName(), enabledTags);\n return true;\n }", "boolean hasTags();", "public abstract boolean hasSkill(Skill skill);", "boolean hasAll();", "boolean hasAll();", "private void setAllTags(ArrayList<String> allTags) {\r\n this.allTags = allTags;\r\n }", "boolean isSetTag();", "public boolean isSetSldAll()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(SLDALL$6) != 0;\n }\n }", "@Override\r\n\tpublic boolean isAllHit() {\r\n\t\treturn priorityElements.isEmpty();\r\n\t}", "private boolean isWanted(Node n) {\n if (use_All) {\n return true;\n }\n String name = n.getNodeName();\n for (int ix = 0; ix < remove_tags.length; ix++) {\n if (name.compareTo(remove_tags[ix]) == 0) {\n return false;\n }\n }\n for (int ix = 0; ix < add_tags.length; ix++) {\n if (name.compareTo(add_tags[ix]) == 0) {\n return true;\n }\n }\n return false;\n }", "@Override\n\tpublic ArrayList<Unit> useSkill() {\n\t\tArrayList<Unit> canExit = new ArrayList<Unit>();\n\t\tGameBoard gameBoard = GameController.gameBoard;\n\t\tfor (int i = 0; i < gameBoard.getWidth(); i++) {\n\t\t\tfor (int j = 0; j < gameBoard.getHeight(); j++) {\n\t\t\t\tif (gameBoard.getUnit(i, j) instanceof Defender) {\n\t\t\t\t\tdef = (Defender) gameBoard.getUnit(i, j);\n\t\t\t\t\tif (def.getCaptureUnit() == null) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (def.getCaptureUnit() instanceof Silva) {\n\t\t\t\t\t\tfor (Unit u: gameBoard.getAdjacentUnit(i, j)) {\n\t\t\t\t\t\t\tif (u instanceof Empty) {\n\t\t\t\t\t\t\t\tcanExit.add(u);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn canExit;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn canExit;\n\t}", "public boolean hasSkill(String name)\r\n\t{\treturn this.skills.contains(name.toLowerCase());\t}", "@Override\n\t\tpublic boolean areAllItemsEnabled() {\n\t\t\treturn true;\n\t\t}", "private boolean isAllIngredientOk(ArrayList<Boolean> listOfBool) {\n if (listOfBool.isEmpty() || listOfBool.contains(false))\n return false;\n return true;\n }", "boolean isNotAllMedia();", "default boolean isEmpty() {\n\t\treturn this.getContents().values().stream().allMatch(ItemStack::isEmpty);\n\t}", "public boolean isAllValues() { return this.isAll; }", "boolean hasTigTag();", "private boolean allMUsSet() {\n\t\tVector meaningUnits = Model.getIllocutionUnitRoots().getMeaningUnits();\n\t\tfor (int i = 0; i < meaningUnits.size(); i++) {\n\t\t\tMeaningUnit mu = (MeaningUnit) meaningUnits.get(i);\n\t\t\tVector sememeGroups = mu.getSememeGroups();\n\t\t\tif (sememeGroups.isEmpty()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "private boolean isIgnoredByTag(AnnotatedElement element) {\n Tag[] annotations = element.getDeclaredAnnotationsByType(Tag.class);\n\n if (annotations.length == 0 || enabledTags.isEmpty()) {\n LOGGER.info(\"Test method {} is not ignored by tag\", ((Method) element).getName());\n return false;\n }\n\n for (Tag annotation : annotations) {\n if (enabledTags.contains(annotation.value())) {\n LOGGER.info(\"Test method {} is not ignored by tag: {}\", ((Method) element).getName(), annotation.value());\n return false;\n }\n }\n LOGGER.info(\"Test method {} is ignored by tag\", ((Method) element).getName());\n return true;\n }", "public boolean isSetEnumSkillName()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ENUMSKILLNAME$8) != null;\n }\n }", "public static boolean markedAsInLexiconInAnyAnalysis(final SentenceTheory st, final Token tok) {\n for (final MorphTokenSequence morphTokenSequence : st.morphTokenSequences()) {\n final Optional<MorphToken> forToken = morphTokenSequence.morphTokenForToken(tok);\n if (forToken.isPresent()) {\n for (final MorphTokenAnalysis analysis : forToken.get().analyses()) {\n for (final LexicalForm lemma : analysis.lemmas()) {\n if (lemma.inLexicon()) {\n return true;\n }\n }\n }\n }\n }\n return false;\n }", "public boolean hasAll(Intent intent, String... extras) {\n for (String extra : extras) {\n if (!intent.hasExtra(extra)) {\n return false;\n }\n }\n return true;\n }", "public boolean hasTags() {\n return isTagged();\n }", "public boolean isSetEnumSkillId()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().find_attribute_user(ENUMSKILLID$10) != null;\n }\n }", "boolean hasAttributes();", "boolean hasAttributes();", "public static Predicate<BiomeSelectionContext> all() {\n\t\treturn context -> true;\n\t}", "boolean anyAudioTriggered() {\n for (final Datum d : this.datumList) {\n if (d instanceof Cell) {\n final Cell c = (Cell)d;\n if (c.isAudioTriggered())\n return true;\n }\n }\n\n return false;\n }", "public boolean hasSpecial(){\n return (alg.containSpecial(input.getText().toString()));\n }", "@SuppressWarnings(\"unused\")\n\tprivate boolean wasAnyButtonPressed() {\n\t\tfor (ArcadeButton button : buttons) {\n\t\t\tif (button.getPressCounter() > 0) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean areAllItemsEnabled() {\n\t\treturn false;\n\t}", "public boolean allElementsInEng() {\n if (!allMenuCommandsInLang(\"Eng\")) return false;\n return true;\n }", "private static boolean checkForMethod1() {\n\n \t\tif( easyTag1.size() < 3 || mediumTag2.size() < 3 || hardTag3.size() < 3 || easyTag4.size() < 3 || mediumTag5.size() < 3 || hardTag6.size() < 3 ) {\n \t\t\treturn true;\n \t\t}else {\n \t\t\treturn false;\n \t\t}\n\t}", "public boolean hasIndustrialTSM() {\n for (Mounted m : getEquipment()) {\n if ((m.getType() instanceof MiscType) && m.getType().hasFlag(MiscType.F_INDUSTRIAL_TSM)) {\n return true;\n }\n }\n return false;\n }", "boolean isAllMedia();", "public boolean anyMetadataEnabled() {\n\n boolean result = false;\n ConfigurationSection ymlMetadata = getConfig().getConfigurationSection(\"metadata\");\n if (ymlMetadata != null) {\n for (String key : ymlMetadata.getKeys(false)) {\n if (ymlMetadata.isBoolean(key) && ymlMetadata.getBoolean(key)) {\n result = true;\n break;\n }\n }\n }\n return result;\n }", "public boolean isArrAll() {\n\t\treturn isArrAll;\n\t}", "public boolean isSetTag() {\n return this.tag != null;\n }", "private boolean containsAll(final NullnessAnnotation... search) {\n boolean result = true;\n if (annotations.isEmpty()) {\n // an empty list of annotations can never contain all\n result = false;\n }\n else {\n for (final NullnessAnnotation obj : search) {\n if (!annotations.contains(obj)) {\n result = false;\n break;\n }\n }\n }\n return result;\n }", "@Override\n public boolean equals(Object other) {\n if (other == this) {\n return true;\n }\n\n // instanceof handles nulls\n if (!(other instanceof TagAllCommand)) {\n return false;\n }\n\n // state check\n TagAllCommand t = (TagAllCommand) other;\n return tagToAdd.equals(t.tagToAdd);\n }", "public boolean hasTags() {\n return fieldSetFlags()[4];\n }", "public final void mT__51() throws RecognitionException {\n try {\n int _type = T__51;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:119:7: ( 'all' )\n // C:\\\\Documents and Settings\\\\D043530\\\\runtime-workspace\\\\com.sap.ap.cts.editor\\\\generated\\\\generated\\\\Binding.g:119:9: 'all'\n {\n match(\"all\"); if (state.failed) return ;\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "boolean isAllInview();", "default boolean canFit(ItemStack stack) {\n return !InvTools.isEmpty(stack) && stream().anyMatch(inv -> {\n InventoryManipulator im = InventoryManipulator.get(inv);\n return im.canAddStack(stack);\n });\n }", "private static boolean checkForMethod3() {\n\t\t\n\t\tif(easyTag3.size() < 3 || mediumTag1.size() < 3 || hardTag2.size() < 3 || easyTag6.size() < 3 || mediumTag4.size() < 3 || hardTag5.size() < 3) {\n\t\t\treturn true;\n\t\t}else {\n\t\t\treturn false;\n\t\t}\n\t}", "default boolean contains(ItemStack... items) {\n return contains(StackFilters.anyOf(items));\n\n }", "boolean isItEmpty(){\n\t\t\tif (this.items.isEmpty() && (this.receptacle.isEmpty() || findSpecialtyContainers())){//if there's nothing in there.\n\t\t\t\tSystem.out.println(\"\\nThere's nothing here to do anything with.\");\n\t\t\t\treturn true;}\n\t\t\treturn false;\n\t\t}", "public boolean isSetTags() {\n return this.Tags != null;\n }", "public boolean isEmpty()\n{\n // If any attributes are not default return false\n if(getMaxTime()!=5 || getFrameRate()!=25 || !SnapUtils.equals(getEndAction(),\"Loop\"))\n return false;\n \n // Iterate over owner children and if any are not empty, return false\n for(int i=0, iMax=getOwner().getChildCount(); i<iMax; i++)\n if(!isEmpty(getOwner().getChild(i)))\n return false;\n \n // Return true since every child was empty\n return true;\n}", "private boolean isTag(String item) {\n return storiesToTags.keySet().contains(item);\n }", "public final void mT__121() throws RecognitionException {\n try {\n int _type = T__121;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalEsm.g:115:8: ( 'all' )\n // InternalEsm.g:115:10: 'all'\n {\n match(\"all\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "private boolean isAllCardsPicked(){\n\t\t\n\t\tboolean isCardsPicked = true;\n\t\tfor ( int i = 0; i < pickedCards.length; i++ ){\n\t\t\tif(!pickedCards[i]) {\n\t\t\t\tisCardsPicked = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn isCardsPicked;\n\t}", "public boolean isEmpty(){\n\t\treturn isPassable&&!containsItems()&&!containsMonster()&&tileItems.noGold();\r\n\t}", "private boolean isIgnoredByTag(ExtensionContext context) {\n AnnotatedElement element = context.getElement().get();\n return isIgnoredByTag(element);\n }", "public String getIsSelectedAll() {\r\n return this.stemSearch.getIsSelectedAll().toString();\r\n }", "private static boolean isMentionedIn(Attribute attr, Test t) {\n\n if (t == null) { \n return false;\n }\n if (t.m_attr == attr.index()) {\n return true;\n }\n return isMentionedIn(attr, t.m_next);\n }", "@Override\n public boolean hasHipCrit() {\n for (int loc = 0; loc < NUM_MECH_LOCATIONS; loc++) {\n if (legHasHipCrit(loc)) {\n return true;\n }\n }\n return false;\n }", "public boolean hasVoidSig() {\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_VOIDSIG)) {\n // The Mek has Void-Sig\n return true;\n }\n }\n return false;\n }", "public boolean anyTagFound (Tags selTags) {\n\n boolean tagSelected = false;\n if (selTags == null || selTags.length() == 0) {\n tagSelected = true;\n } else {\n int i = 0;\n String selTag = selTags.getTag(i);\n while (selTag.length() > 0 && (! tagSelected)) {\n tagSelected = tagFound (selTag);\n if (! tagSelected) {\n i++;\n selTag = selTags.getTag(i);\n }\n } // While more item tags for comparision \n } // End if we have selection tags\n return tagSelected;\n }", "boolean hasMent();", "public boolean isAllGranted(){\n //PackageManager.PERMISSION_GRANTED\n return false;\n }", "protected final boolean anyMsg() {\n\t\tDoorPulseCriterion dpc = new DoorPulseCriterion(this.getPulse() - 1);\n\t\treturn this.existMessage(dpc);\n\t}", "private boolean isAllTestsRun() {\n Collection<TestPackage> pkgs = getTestPackages();\n for (TestPackage pkg : pkgs) {\n if (!pkg.isAllTestsRun()) {\n return false;\n }\n }\n return true;\n }", "@Override\n public boolean isStealthOn() {\n // Try to find a Mek Stealth system.\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_STEALTH)) {\n if (mEquip.curMode().equals(\"On\")) {\n // Return true if the mode is \"On\"\n return true;\n }\n }\n }\n // No Mek Stealth or system inactive. Return false.\n return false;\n }", "private boolean caughtEmAll(){\n\t\tint howMany = 1;\n\t\tArrayList<Pokemon> pokedex = theTrainer.getPokedex();\n\t\tCollections.sort(pokedex);\n\t\tfor(int i = 0; i < pokedex.size() - 1; i++){\n\t\t\tif(pokedex.get(i+1).getPokemonID() != pokedex.get(i).getPokemonID()){\n\t\t\t\thowMany++;\n\t\t\t}\n\t\t}\n\t\treturn (howMany == 10);\n\t}", "public boolean any(Trait... flags)\n {\n return any(traits, flags);\n }", "@Override\n public boolean isEmpty() {\n return super.isEmpty() && ElementUtil.isEmpty(subsidyCode, programCode, prescriberTypes, notes, cautionaryNotes,\n restriction, commonwealthExManufacturerPrice, manufacturerExManufacturerPrice);\n }", "private boolean isEncapsulatingBet(BetSlipResponse betSlipResponse) {\n boolean result = betSlipResponse.getTransactions().size() > 0;\n\n for (TransactionResponse transactionResponse : betSlipResponse.getTransactions()) {\n result &= transactionResponse.getTransactionTypeId() == TransactionType.BET.getId();\n }\n\n return result;\n }", "public boolean hasOverallSampling() {\n return overallSamplingBuilder_ != null || overallSampling_ != null;\n }", "boolean hasMinExperience();", "public static boolean isSecurityAllRestrictedActions() {\r\n return (isSecurityAllRestrictedActions);\r\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn super.isEmpty() || getFluid() == Fluids.EMPTY;\n\t}", "public boolean isCat() {\r\n\t\tboolean isCat = false;\r\n\r\n\t\tif (numOfLeg == 4 && mammal == true && sound.equals(\"meow\")) {\r\n\r\n\t\t\tisCat = true;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tisCat = false;\r\n\t\t}\r\n\r\n\t\treturn isCat;\r\n\t}", "public void setAll(boolean all) {\n uppercase = all;\n lowercase = all;\n numbers = all;\n symbols = all;\n }", "public default boolean activeFromObject(SpellData dataIn, World worldIn){ return getRangeType() != RangeType.PERSONAL; }", "boolean hasKeyword();", "public boolean isAltACTGN() {\n for (Alt a : alts) {\n if (a.isSeq()) {\n if (!a.getSeq().toString().matches(\"[ACTGN]*\")) {\n return false;\n }\n }\n }\n return true;\n }", "default boolean willAcceptAny(List<ItemStack> stacks) {\n return stacks.stream().anyMatch(this::willAccept);\n }", "private boolean isAllRevealed() {\n for (int row = 0; row < minefield.getRows(); row++) {\n for (int col = 0; col < minefield.getCols(); col++) {\n if (!isRevealed(getTd(row, col))\n && !minefield.isMine(row, col)) {\n return false;\n }\n }\n }\n return true;\n }", "private boolean isAllStrike() {\n\t\treturn false;\r\n\t}", "public boolean isBlank() {\n return (tags.length() == 0);\n }", "@Override\n public boolean areAllItemsEnabled() {\n return mBaseAdapter.areAllItemsEnabled();\n }", "boolean hasExtra();", "boolean hasSummonMaxCountMeta();", "public final void mT__157() throws RecognitionException {\n try {\n int _type = T__157;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalMyDsl.g:155:8: ( 'All' )\n // InternalMyDsl.g:155:10: 'All'\n {\n match(\"All\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "private void cheakIfDataIsAll(){\n\n try {\n if (categoryId.equals(\"0\")){\n categoryId = \"\";\n }\n\n if (Filter.itemMaxPrice.equals(\"all\")) {\n Filter.itemMaxPrice = \"\";\n\n }if(Filter.itemMinPrice.equals(\"all\")){\n Filter.itemMinPrice = \"\";\n\n } if(Filter.itemMinPrice.equals(\"all\")){\n Filter.itemMinPrice = \"\";\n\n }if(Filter.itemMaxArea.equals(\"all\")){\n Filter.itemMaxArea = \"\";\n\n }else if(Filter.itemMinArea.equals(\"all\")){\n Filter.itemMinArea = \"\";\n\n }if(Filter.itemMaxBedroom.equals(\"all\")){\n Filter.itemMaxBedroom = \"\";\n\n } if(Filter.itemMinBedroom.equals(\"all\")){\n Filter.itemMinBedroom = \"\";\n\n } if(Filter.itemMaxBathroom.equals(\"all\")){\n Filter.itemMaxBathroom = \"\";\n\n } if(Filter.itemMinBathroom.equals(\"all\")){\n Filter.itemMinBathroom = \"\";\n\n }if(Filter.locationOfSpinner.equals(\"all\")) {\n Filter.locationOfSpinner = \"\";\n }\n\n }catch (Exception e){}\n\n }" ]
[ "0.80988014", "0.6291524", "0.57948387", "0.5759121", "0.5728731", "0.5728731", "0.5724778", "0.5669102", "0.5669102", "0.562187", "0.5584634", "0.5573317", "0.5555335", "0.5524912", "0.54649425", "0.5461144", "0.5461144", "0.5440445", "0.5362899", "0.53553253", "0.5340996", "0.5305528", "0.53037137", "0.52891225", "0.5177441", "0.51619035", "0.51390266", "0.51351476", "0.50988066", "0.5073998", "0.5060095", "0.5053978", "0.50470203", "0.5044049", "0.5043147", "0.50391704", "0.50362825", "0.5032788", "0.5032788", "0.5007234", "0.49987328", "0.49955103", "0.49858344", "0.49713016", "0.49697512", "0.49542508", "0.49536964", "0.4927431", "0.49179426", "0.49106902", "0.49066156", "0.48853904", "0.48812717", "0.48789665", "0.4876467", "0.48624957", "0.4860415", "0.48552233", "0.48494735", "0.4848459", "0.48463136", "0.48275512", "0.48052448", "0.48007298", "0.47891366", "0.47891366", "0.4785599", "0.47845656", "0.4782848", "0.4773444", "0.47730145", "0.47603375", "0.4753786", "0.4753145", "0.47450295", "0.473661", "0.47344324", "0.47336948", "0.47334012", "0.4728042", "0.4725609", "0.4714291", "0.4712399", "0.47085553", "0.47022378", "0.46990114", "0.46956033", "0.46948364", "0.4681883", "0.4679066", "0.46776664", "0.46767044", "0.4676408", "0.46717572", "0.46685472", "0.4668239", "0.4667986", "0.4665869", "0.46582055", "0.4648199" ]
0.8431091
0
Sets the macth all skill tag.
public void setMacthAllSkillTag(boolean macthAllSkillTag) { this.macthAllSkillTag = macthAllSkillTag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setAllTags(ArrayList<String> allTags) {\r\n this.allTags = allTags;\r\n }", "public boolean isMacthAllSkillTag() {\n\t\treturn macthAllSkillTag;\n\t}", "public void setAllTags (boolean allTags) {\n\t\tthis.allTags = allTags;\n\t}", "void addToAllTags(Tag T){\r\n this.allTags.add(T.getTagName());\r\n }", "void skillsFound( String key ) {\n developer.skills = new ArrayList<>();\n }", "public void setSkill(int skill){\n\t\tskillSelection = skill;\n\t}", "public void setTag(ProgramTags tag) {\n\t\tthis.tag = program.getTagIfPresent(tag.getTag());\n\t}", "void skill( String key, String value ){\n developer.skills.add( value );\n }", "public void setTag(Tag tag) {\n\t\tProgramTags newTag = program.getTagIfPresent(tag); // throws if no such tag in program\n\t\tsetTag(newTag);\n\t}", "public void Skill() {\n\t\tBuilding ig = new Iglu(this.GetWater());\n\t\tthis.GetWater().GetBuilding().ReplaceBuilding(ig);\n\t}", "@Override\n public void setTag(int t) {\n this.tag = t;\n\n }", "public void setTagSet(Tag [] TagSet) {\n this.TagSet = TagSet;\n }", "public void setTags(ArrayList<String> tags){\n for(String s : tags){\n this.tags.add(s);\n }\n }", "public void setAll(boolean all) {\n uppercase = all;\n lowercase = all;\n numbers = all;\n symbols = all;\n }", "public void setSkill(com.transerainc.aha.gen.agent.SkillDocument.Skill skill)\n {\n synchronized (monitor())\n {\n check_orphaned();\n com.transerainc.aha.gen.agent.SkillDocument.Skill target = null;\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().find_element_user(SKILL$0, 0);\n if (target == null)\n {\n target = (com.transerainc.aha.gen.agent.SkillDocument.Skill)get_store().add_element_user(SKILL$0);\n }\n target.set(skill);\n }\n }", "public void deleteAllTags(boolean toResetName){\r\n\t\ttags.clear();\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t\tclearChanged();\r\n\t\tdeleteObservers();\t\r\n\t\t\r\n\t\tif (toResetName){\r\n\t\t\tsetName();\r\n\t\t}\r\n\t}", "public void setMyTag(int theTag)\n\t{\n\t\tmyTag = theTag;\n\t}", "public void setSGMLtags (String[] tags) {\n\t\tSGMLtags = tags;\n\t}", "public void setTag(List<Tag> tag)\n\t{\n\t\t this.addKeyValue(\"Tag\", tag);\n\n\t}", "public void setTag(Object tag)\n {\n fTag = tag;\n }", "public void setTag(String tag);", "@Override\r\n\tpublic void useSkill() {\n\t\tthis.defense+=20;\r\n\t\tthis.maxHp+=(this.maxHp/2);\r\n\t\tthis.hp+=(this.hp/2);\r\n\t\tthis.skillActive = true;\r\n\t\tthis.skillLast = 2;\r\n\t}", "public void skills(){\n\t\tup = false;\n\t\tdown = false;\n\t\tleft = false;\n\t\tright = false;\n\t\tskillmode = true;\n\t\t\n\t\tif(player.hasSkillHealth1()){\n\t\t\tt1.setEnabled(false);\n\t\t\tt3.setEnabled(true);\n\t\t}else{\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillHealth2()){\n\t\t\tt3.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength1()){\n\t\t\tt2.setEnabled(false);\n\t\t\tt4.setEnabled(true);\n\t\t}else{\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tif(player.hasSkillStrength2()){\n\t\t\tt4.setEnabled(false);\n\t\t}\n\t\tskills.setVisible(true);\n\t\t\n\t}", "private void initHeroRollSkills() {\n if (heroRoll.skills.isEmpty()) {\n for (int i : heroRoll.hero.skills40) {\n heroRoll.skills.add(singleton.skillsMap.get(i));\n }\n }\n }", "public void resetSkills()\r\n\t{\r\n\t\t// TODO Keep Skill List upto date\r\n\t\tfarming = 0;\r\n\t}", "public void resetSkill(int id) {\r\n this.staticLevels[id] = id == HITPOINTS ? 10 : 1;\r\n this.dynamicLevels[id] = id == HITPOINTS ? 10 : 1;\r\n this.experience[id] = id == HITPOINTS ? 1154 : 0;\r\n refresh();\r\n updateCombatLevel();\r\n if (entity instanceof Player) {\r\n Player player = (Player) entity;\r\n player.getAppearance().sync();\r\n }\r\n }", "public void setTag(int tag) {\n this.tag = tag;\n }", "public void setTags(List<Tag> tags) {\n this.tags.clear();\n if (tags != null) {\n this.tags.addAll(tags);\n }\n }", "public skills(){\n\t\tname = \"tempName\";\n\t\tmanaCost =0;\n\t\tskillDmg = 0;\n\t\tcritFactor = 0;\n\t\tcritChance = 0;\n\t\tnoOfTargets = 1;\n\t\thitChance = 0;\n\t\tmyAttribute = null;\n\t\t\n\t\t//instantiates the original values, prob will have no need\n\t\torigSkillDmg = 0;\n\t\torigCritFac = 0;\n\t\torigCritChan = 0;\n\t\torigHitChan =0;\n\t\t\n\t\t//stores the current buffs on the person\n\t\tcurrBuff = null;\n\t}", "public void setSkillPending(int skillNumber){\n switch(skillNumber){\n case 0 : skill1Label.setIcon(skill1.getSkillArr(skillNumber).get(0));break;\n case 1 : skill2Label.setIcon(skill1.getSkillArr(skillNumber).get(0));break;\n case 2 : skill3Label.setIcon(skill1.getSkillArr(skillNumber).get(0));break;\n case 3 : skill4Label.setIcon(skill1.getSkillArr(skillNumber).get(0));break;\n }\n }", "void updateTags();", "public void setSkillPrediction(Skills skill);", "private void adminGiveAllSkills(Player activeChar)\r\n\t{\r\n\t\tGameObject target = activeChar.getTarget();\r\n\t\tPlayer player = null;\r\n\t\tif(target != null && target.isPlayer())\r\n\t\t\tplayer = (Player) target;\r\n\t\telse\r\n\t\t{\r\n\t\t\tactiveChar.sendPacket(SystemMsg.INVALID_TARGET);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint unLearnable = 0;\r\n\t\tint skillCounter = 0;\r\n\t\tCollection<SkillLearn> skills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\twhile(skills.size() > unLearnable)\r\n\t\t{\r\n\t\t\tunLearnable = 0;\r\n\t\t\tfor(SkillLearn s : skills)\r\n\t\t\t{\r\n\t\t\t\tSkill sk = SkillTable.getInstance().getInfo(s.getId(), s.getLevel());\r\n\t\t\t\tif(sk == null || !sk.getCanLearn(player.getClassId()))\r\n\t\t\t\t{\r\n\t\t\t\t\tunLearnable++;\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\tif(player.getSkillLevel(sk.getId()) == -1)\r\n\t\t\t\t\tskillCounter++;\r\n\t\t\t\tplayer.addSkill(sk, true);\r\n\t\t\t}\r\n\t\t\tskills = SkillAcquireHolder.getInstance().getAvailableSkills(player, AcquireType.NORMAL);\r\n\t\t}\r\n\r\n\t\tplayer.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message22\", player, skillCounter));\r\n\t\tplayer.sendPacket(new SkillList(player));\r\n\t\tactiveChar.sendMessage(new CustomMessage(\"l2r.gameserver.handler.admincommands.impl.adminskill.message23\", activeChar, skillCounter, player.getName()));\r\n\t}", "void skillsComplete( String key ) {\n //do nothing\n }", "public void setIdTagsOff () {\n\t\tidTags = false;\n\t}", "public Builder addAllTag(\n java.lang.Iterable<? extends org.multibit.hd.core.protobuf.MBHDContactsProtos.Tag> values) {\n if (tagBuilder_ == null) {\n ensureTagIsMutable();\n super.addAll(values, tag_);\n onChanged();\n } else {\n tagBuilder_.addAllMessages(values);\n }\n return this;\n }", "public void setSldAll(org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty sldAll)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty target = null;\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().find_element_user(SLDALL$6, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.presentationml.x2006.main.CTEmpty)get_store().add_element_user(SLDALL$6);\n }\n target.set(sldAll);\n }\n }", "public void setToTag(String tag) throws ParseException,NullPointerException;", "public void setSkillTagName(StringFilter skillTagName) {\n\t\tthis.skillTagName = skillTagName;\n\t}", "public void setSkillTagId(LongFilter skillTagId) {\n\t\tthis.skillTagId = skillTagId;\n\t}", "@Override\n public void applyDefaults(DynamicSkill skill, String prefix) { }", "private void setName(){\r\n\t\tString tagString = new String();\r\n\t\tfor (String k : tags.keySet()){\r\n\t\t\ttagString += \"@\" + k;\r\n\t\t}\r\n\t\tString newName = originalName + tagString +\".\"+ extension;\r\n\t\tif (!newName.equals(name)){\r\n\t\t\tremovePrevNames(newName); //if the new name is a previous name\r\n\t\t\taddPrevNames(name);\r\n\t\t\tupdateLog(newName);\r\n\t\t\tname = newName;\r\n\t\t\t//notify the tag observer\r\n\t\t\tsetChanged();\r\n\t\t\tnotifyObservers();\r\n\t\t\tclearChanged();\r\n\t\t}\r\n\t}", "public final void setAlgoTags(Set<BrokerAlgoTag> inAlgoTags)\n {\n algoTags = inAlgoTags;\n }", "protected void setAll() {\n for (int i=0; i <= (Numbers.INTEGER_WIDTH*8-2); i++) {\n \tthis.setBitAt(i);\n } \t\n }", "public void setSkills(String group) {\n top.removeAll();\n\n // Header\n constrItem.gridy = 0;\n\n constrItem.gridx = 0;\n top.add(new JLabel(\"Skill\"), constrItem);\n constrItem.gridx = 1;\n top.add(new JLabel(\"ML\"), constrItem);\n constrItem.gridx = 2;\n top.add(new JLabel(\"Dice\"), constrItem);\n constrItem.gridx = 3;\n top.add(new JLabel(\"Adj-1\"), constrItem);\n constrItem.gridx = 4;\n top.add(new JLabel(\"Adj-2\"), constrItem);\n constrItem.gridx = 5;\n top.add(new JLabel(\"Adj-3\"), constrItem);\n constrItem.gridx = 6;\n top.add(new JLabel(\" \"), constrItem);\n constrItem.gridx = 7;\n top.add(new JLabel(\"EML/Roll\"), constrItem);\n constrItem.gridx = 8;\n top.add(new JLabel(\"Success\"), constrItem);\n constrItem.gridx = 9;\n top.add(new JLabel(\"Type\"), constrItem);\n constrItem.gridx = 10;\n top.add(new JLabel(\"Result\"), constrItem);\n\n ArrayList skills =\n (ArrayList) main.getState().getSkillList(group);\n if (skills != null)\n main.getState().recalibrateGuiLines(skills);\n\n for (int i = 0; skills != null && i < skills.size(); i++) {\n ((State.Section) skills.get(i)).gui = null;\n ((State.Section) skills.get(i)).addGui(top);\n }\n\n revalidate(group);\n }", "public void setAllTransformable() {\n for (Iterator<TransformLayer> itr =tLayerPool.values().iterator(); itr.hasNext(); ) {\n TransformLayer layer = itr.next();\n layer.setAllTransformable();\n }\n }", "public Skill() {\n\t\tsuper();\n\t}", "@Override\r\n public void applyAttributes() {\r\n super.applyAttributes();\r\n getEntity().setColor(color);\r\n getEntity().setOwner(MbPets.getInstance().getServer().getPlayer(getOwner()));\r\n getEntity().setAgeLock(true);\r\n\r\n if (isBaby) {\r\n getEntity().setBaby();\r\n } else {\r\n getEntity().setAdult();\r\n }\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_ATTACK_WOLF);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.LLAMA_FOLLOW_CARAVAN);\r\n Bukkit.getMobGoals().removeGoal(getEntity(), VanillaGoal.TRADER_LLAMA_DEFEND_WANDERING_TRADER);\r\n }", "public void setTag( String tag )\n {\n this.tag = tag;\n }", "public void setItTag(String itTag) {\n this.itTag = itTag == null ? null : itTag.trim();\n }", "@Override\n public void useSkill(Creature activeChar, Creature targets) {\n }", "void setTag(java.lang.String tag);", "public void set(String inTags) {\n tags.delete (0, tags.length());\n merge (inTags);\n }", "public void setTag(String tag) {\r\n this.tag = tag;\r\n }", "protected void deleteAllTag() {\n\t\tReaderDataBase.deleteAll(this);\n\t}", "@Override\n public void feature(gherkin.formatter.model.Feature feature) {\n setTagStatementAttributes(testedFeature, feature);\n }", "public void xsetEnumSkillId(org.apache.xmlbeans.XmlString enumSkillId)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLID$10);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLID$10);\n }\n target.set(enumSkillId);\n }\n }", "ArrayList<String> getAllTags() {\r\n return allTags;\r\n }", "@Override\n\tpublic List<JobSkill> findAllSkill() {\n\t\treturn jobskillRepository.findAll();\n\t}", "public void skillControl() {\n\t\tif(skillActive) {\r\n\t\t\tif(skillLast > 0)\r\n\t\t\t{\r\n\t\t\t\tskillLast--;\r\n\t\t\t}else if(skillLast == 0) {\r\n\t\t\t\tskillActive = false;\r\n\t\t\t\tthis.hp/=2;\r\n\t\t\t\tthis.maxHp/=2;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void setAll(Person person) {\n this.lastName = person.getLastName();\n this.firstName = person.getFirstName();\n this.address = person.getAddress();\n this.tid = person.getOid();\n this.phone = person.getPhone();\n this.mobile = person.getMobile();\n this.email = person.getEmail();\n }", "@Override\n\tpublic void onSetTags(Context context, int errorCode,\n\t\t\tList<String> sucessTags, List<String> failTags, String requestId) {\n\t\t\n\t}", "public void xsetEnumSkillName(org.apache.xmlbeans.XmlString enumSkillName)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlString target = null;\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ENUMSKILLNAME$8);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ENUMSKILLNAME$8);\n }\n target.set(enumSkillName);\n }\n }", "@Override\n\tpublic void skill1(Fightable f) {\n\t\tsuper.setDamage(super.getStrength()*3);\n\t\tsuper.setAtkRange((int)(super.getDamage()/5));\n\t\t\n\t\tthis.attack(f, 2);\n\t}", "public void setTag(String tag) {\n this.tag = tag;\n }", "public void setTag(String tag) {\n this.tag = tag;\n }", "public TagAttributeHandlerBuilder tag(String tag) {\n this.tag = tag;\n return this;\n }", "@Override\n public void onLoad() {\n\n new CommandAPICommand(\"killall\")\n .executes((sender, args) -> {\n //Kills all enemies in all worlds\n Bukkit.getWorlds().forEach(w -> w.getLivingEntities().forEach(e -> e.setHealth(0)));\n \t})\n .register();\n }", "public <T> void putAll(Map<String,T> attr) {\r\n attributeMap.putAll(attr);\r\n fireStateChanged();\r\n }", "public Tags() {\n set (\"\");\n }", "void setNilTag();", "public Builder clearSkillId() {\n \n skillId_ = 0;\n onChanged();\n return this;\n }", "public void transformedSkills()\r\n\t{\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5491, 1), false);\r\n\t\t// Cancel Gatekeeper Transformation\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(8248, 1), false);\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5656, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5657, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5658, 1), false);//Update by rocknow\r\n\t\tgetPlayer().addSkill(SkillTable.getInstance().getInfo(5659, 1), false);//Update by rocknow\r\n\r\n\t\tgetPlayer().setTransformAllowedSkills(SKILLS);\r\n\t}", "@Override\n\tpublic void all() {\n\t\t\n\t}", "@Override\n protected void applyEntityAttributes() {\n super.applyEntityAttributes();\n this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(100.0);\n }", "public void toNBT(NBTTagCompound tag)\n {\n tag.setString(\"Name\", this.name);\n }", "public void setSkillId(Integer skillId) {\n this.skillId = skillId;\n }", "@Override\n\tpublic void setTagged(boolean tagged) {\n\t\tthis.tagged = tagged;\n\t\t\n\t}", "public void initializeAllCharacters(Tree story){\n//\t\tfor (Tree subtree : story){\n//\t\t\tif (subtree.label().value().equals(\"NP\")){//extracting all noun phrases to initialize all of the characters.\n//\t\t\t\taddCharacterToMap(subtree);\n//\t\t\t}\n//\t\t}\n//\t\tgetAllVerbPhrases(story);\n\t}", "private void initializeTag()\n {\n Iterator<node_info> it=this.ga.getV().iterator();\n while(it.hasNext())\n {\n it.next().setTag(Double.POSITIVE_INFINITY);\n }\n }", "public Builder putAllTags(\n java.util.Map<java.lang.String, java.lang.String> values) {\n internalGetMutableTags().getMutableMap()\n .putAll(values);\n return this;\n }", "protected void setupTags() {\r\n\t\t// Dataset information: one per file\r\n\t\tmetaTags.put(\"^dataset\", \"id\");\r\n\t\tmetaTags.put(\"!dataset_title\", \"title\");\r\n\t\tmetaTags.put(\"!dataset_update_date\", \"date\");\r\n\t\tmetaTags.put(\"!dataset_pubmed_id\", \"pmid\");\r\n\t\tmetaTags.put(\"!dataset_description\", \"description\");\r\n\t\tmetaTags.put(\"!dataset_sample_count\", \"sampleCount\");\r\n\r\n\t\t// Platform information: possibly multiple per file\r\n\t\tmetaTags.put(\"!dataset_platform_organism\", \"organisms\");\r\n\t\tmetaTags.put(\"!dataset_sample_organism\", \"organisms\");\r\n\t\tmetaTags.put(\"!dataset_platform\", \"platformIDs\");\t\t\t\r\n\t\tmetaTags.put(\"!dataset_platform_technology_type\", \"platformTitles\");\r\n\t\tmetaTags.put(\"!dataset_feature_count\", \"rowCounts\");\r\n\r\n\t\t// Sample information: possibly multiple per file\r\n\t\tmetaTags.put(\"!subset_sample_id\", \"sampleIDs\");\r\n\t\tmetaTags.put(\"!subset_description\", \"sampleTitles\");\t\t \r\n\t\tmetaTags.put(\"!dataset_channel_count\", \"channelCounts\");\r\n\t\tmetaTags.put(\"!dataset_value_type\", \"valueTypes\");\r\n\r\n\t\tif (! checkTags()) {\r\n\t\t\tthrow new RuntimeException(\"Tags not initialized properly\");\r\n\t\t}\r\n\t}", "public void setTags(List<Tag> tags) {\n this.tags = tags;\n }", "public Builder setSkillId(int value) {\n \n skillId_ = value;\n onChanged();\n return this;\n }", "public void xsetIdTag(ocpp.IdToken idTag)\n {\n synchronized (monitor())\n {\n check_orphaned();\n ocpp.IdToken target = null;\n target = (ocpp.IdToken)get_store().find_element_user(IDTAG$0, 0);\n if (target == null)\n {\n target = (ocpp.IdToken)get_store().add_element_user(IDTAG$0);\n }\n target.set(idTag);\n }\n }", "void updateSkill(Skill skill);", "public void resetAttributes()\r\n\t{\r\n\t\t// TODO Keep Attribute List upto date\r\n\t\tintelligence = 0;\r\n\t\tcunning = 0;\r\n\t\tstrength = 0;\r\n\t\tagility = 0;\r\n\t\tperception = 0;\r\n\t\thonor = 0;\r\n\t\tspeed = 0;\r\n\t\tloyalty = 0;\r\n\t}", "@Override\n public void cancelAllForTag(Object tag) {\n getRequestQueue().cancelAll(tag);\n }", "public void clearTagArray(){\n\t\t\n\t\ttagArray.clear();\n\t\t\n\t}", "public void setSkillEnable(int healthPointMax){\n if(healthPointMax >= 200000){\n if(skill1.getEnable() == false){\n setSkillPending(0);\n skill1.setEnable(true);\n skill1.setCanUse(true);\n }\n if(skill2.getEnable() == false){\n setSkillPending(1);\n skill2.setEnable(true);\n skill2.setCanUse(true);\n }\n if(skill3.getEnable() == false){\n setSkillPending(2);\n skill3.setEnable(true);\n skill3.setCanUse(true);\n }\n if(skill4.getEnable() == false){\n setSkillPending(3);\n skill4.setEnable(true);\n skill4.setCanUse(true);\n }\n }\n else if(healthPointMax >= 50000){\n if(skill1.getEnable() == false){\n setSkillPending(0);\n skill1.setEnable(true);\n skill1.setCanUse(true);\n }\n if(skill2.getEnable() == false){\n setSkillPending(1);\n skill2.setEnable(true);\n skill2.setCanUse(true);\n }\n if(skill3.getEnable() == false){\n setSkillPending(2);\n skill3.setEnable(true);\n skill3.setCanUse(true);\n }\n }\n else if(healthPointMax >= 10000){\n if(skill1.getEnable() == false){\n setSkillPending(0);\n skill1.setEnable(true);\n skill1.setCanUse(true);\n }\n if(skill2.getEnable() == false){\n setSkillPending(1);\n skill2.setEnable(true);\n skill2.setCanUse(true);\n }\n }\n else if(healthPointMax >= 500){\n if(skill1.getEnable() == false){\n setSkillPending(0);\n skill1.setEnable(true);\n skill1.setCanUse(true);\n }\n }\n }", "void setTagCollection(Collection<Tag> tagCollection);", "public void setRoomTag(Room room){\n roomTag.setRoomName(room.getName());\n roomTag.addAction(Actions.sequence(\n Actions.parallel(\n Actions.fadeIn(1f),\n Actions.moveBy(0, -roomTag.getHeight() - 10, 1f)),\n Actions.delay(2f),\n Actions.fadeOut(1f)));\n }", "public void setTags(String tags) {\n this.tags = tags;\n }", "public void changeHasTagBoost()\r\n\t{\r\n\t\thasTagBoost = !hasTagBoost;\r\n\t}", "public void setEmptyTags (String[] tags) {\n\t\temptyTags = tags;\n\t}", "public abstract void setEffects(Tank t);", "public void setSkillUnable(int skillNumber){\n switch(skillNumber){\n case 0 : skill1Label.setIcon(new ImageIcon(\"src/source/uplayer/skillIcon/Cooldown.png\"));break;\n case 1 : skill2Label.setIcon(new ImageIcon(\"src/source/uplayer/skillIcon/Cooldown.png\"));break;\n case 2 : skill3Label.setIcon(new ImageIcon(\"src/source/uplayer/skillIcon/Cooldown.png\"));break;\n case 3 : skill4Label.setIcon(new ImageIcon(\"src/source/uplayer/skillIcon/Cooldown.png\"));break;\n }\n }", "public void clearEntityTagsForSelectedEntities() {\n getRTParent().clearEntityTagsForSelectedEntities();\n }", "private void setOneAllChecks() {\r\n\r\n checkIman.setEnabled(true);\r\n checkBonferroni.setEnabled(true);\r\n checkHolm.setEnabled(true);\r\n checkHochberg.setEnabled(true);\r\n checkHommel.setEnabled(true);\r\n checkHolland.setEnabled(true);\r\n checkRom.setEnabled(true);\r\n checkFinner.setEnabled(true);\r\n checkLi.setEnabled(true);\r\n\r\n }", "private void addSkill(Skill skill) {\n Species.Characteristic att = skill.getGoverningAtt();\n int ability = character.getSpecies().getCharacteristicValue(att);\n skill.setAbility(ability);\n\n skillList.add(skill);\n }" ]
[ "0.6512858", "0.63345397", "0.6242136", "0.5803964", "0.5695853", "0.56206065", "0.54712737", "0.54248667", "0.5383616", "0.53740644", "0.53642064", "0.5301204", "0.5205839", "0.51470387", "0.51264185", "0.5122393", "0.5101749", "0.50952387", "0.5084716", "0.507461", "0.50703096", "0.5054745", "0.50532824", "0.50019294", "0.4956298", "0.49536398", "0.49501768", "0.494186", "0.4940804", "0.49395853", "0.49213386", "0.4910939", "0.4903688", "0.4867853", "0.48591557", "0.4815892", "0.48136595", "0.4795911", "0.47798485", "0.47750652", "0.47741833", "0.47616482", "0.47598585", "0.47504818", "0.47502434", "0.4749946", "0.47494802", "0.47312045", "0.47295645", "0.47022352", "0.4692075", "0.46832672", "0.46616995", "0.46613646", "0.46596503", "0.46500704", "0.46426737", "0.4631878", "0.46301922", "0.46263266", "0.4623872", "0.46170357", "0.46139997", "0.46093652", "0.46030575", "0.46030575", "0.45954424", "0.4585097", "0.45831662", "0.45817474", "0.45785213", "0.4575497", "0.457532", "0.45717543", "0.45707816", "0.45673805", "0.4563464", "0.45596895", "0.45574057", "0.45536643", "0.45528987", "0.45526162", "0.45460886", "0.4537407", "0.45201895", "0.45189932", "0.4514818", "0.45124105", "0.45036918", "0.44953555", "0.44915557", "0.44844016", "0.44824186", "0.44785705", "0.44669503", "0.44658244", "0.4464269", "0.44582483", "0.4451482", "0.4440282" ]
0.758101
0
sorts array with quicksort recursively
private void quicksortSeq(Comparable[] array, int low, int up){ if(low < up){ rekursionsSchritte += 2; int p = findPiv(array, low, up); quicksortSeq(array, low, p); quicksortSeq(array, p + 1, up); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void quickSort(int arr[], int low, int high) \n { \n if (low < high) \n { \n /* pi is partitioning index, arr[pi] is \n now at right place */\n int pi = partition(arr, low, high); \n \n // Recursively sort elements before \n // partition and after partition \n quickSort(arr, low, pi-1); \n quickSort(arr, pi+1, high); \n } \n }", "public void quickSortIter(){\n int pivot = 0;\n int partition;\n boolean unordered = false;\n do {\n unordered = false;\n partition = pivot;\n for (int i = pivot + 1; i < array.length; i++) {\n if (((Comparable) array[pivot]).compareTo(array[i]) >= 0) {\n if (i - partition > 1) {\n T temp = array[i];\n array[i] = array[partition];\n array[partition] = temp;\n partition++;\n unordered = true;\n } else {\n partition++;\n unordered = true;\n }\n }\n }\n T temp = array[partition];\n array[partition] = array[pivot];\n array[pivot] = temp;\n if (partition < array.length) {\n pivot = partition + 1;\n for (int i = 0; i < partition; i++) {\n if (((Comparable) array[i]).compareTo(array[i + 1]) > 0) {\n pivot = i;\n break;\n }\n }\n }\n } while (unordered);\n\n }", "private void quickSort(List<T> array, int startIndex, int endIndex, FuncInterface<T> ICompare)\n {\n if (startIndex < endIndex)\n {\n // calculate the pivotIndex\n int pivotIndex = partition(array, startIndex, endIndex, ICompare);\n // quickSort the left sub-array\n quickSort(array, startIndex, pivotIndex, ICompare);\n // quickSort the right sub-array\n quickSort(array, pivotIndex + 1, endIndex, ICompare); \n }\n }", "void quick_sort(int intArray[], int low, int high)\n {\n if (low < high)\n {\n // partition the array around pi=>partitioning index and return pi\n int pi = partition(intArray, low, high);\n // sort each partition recursively\n quick_sort(intArray, low, pi - 1);\n quick_sort(intArray, pi + 1, high);\n }\n }", "private static void quickSort(double arr[],Integer[] pageIDS, int low, int high)\n {\n if (low < high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(arr,pageIDS, low, high);\n\n // Recursively sort elements before\n // partition and after partition\n quickSort(arr, pageIDS, low, pi-1);\n quickSort(arr, pageIDS,pi+1, high);\n }\n }", "private void sort(T[] arr, int lo, int hi) {\n if (lo >= hi) return; // we return if the size of the part equals 1\n int pivot = partition(arr, lo, hi); // receiving the index of the pivot element\n sort(arr, lo, pivot - 1); // sorting the left part\n sort(arr, pivot + 1, hi); // sorting the right part\n }", "public void quicksort() {\r\n quicksort(mArray, 0, mArray.length -1);\r\n }", "private void quickSort(int low, int high) {\n\t\tint i = low;\n\t\tint k = high;\n\t\tint pivot = array[low + (high - low) / 2];\n\n\t\twhile (i <= k) {\n\t\t\t// Stops when element on left side is greater than the pivot\n\t\t\twhile (array[i] < pivot) {\n\t\t\t\ti++;\n\t\t\t}\n\t\t\t// Stops when the element on the right side is less than the pivot\n\t\t\twhile (array[k] > pivot) {\n\t\t\t\tk--;\n\t\t\t}\n\t\t\t// Swap the left and right elements, since the one on the left is\n\t\t\t// greater than the one on the right (proved via pivot)\n\t\t\tif (i <= k) {\n\t\t\t\texchangeNums(i, k);\n\t\t\t\t// Move on to the next elements\n\t\t\t\ti++;\n\t\t\t\tk--;\n\t\t\t}\n\t\t}\n\t\t// Recursive calls\n\t\tif (low < k) {\n\t\t\tquickSort(low, k);\n\t\t}\n\t\tif (i < high) {\n\t\t\tquickSort(i, high);\n\t\t}\n\t}", "public void sort() {\n Stack<Pair> stack = new Stack();\n //fill the stack\n Pair temp = new Pair(0, a.length);\n stack.push(temp);\n quickSort(stack,stack.peek().first, stack.peek().n);\n }", "private static <AnyType extends Comparable<? super AnyType>> void quicksort(AnyType[] a, int left, int right)\n {\n if(left + CUTOFF <= right)\n {\n AnyType pivot = median3(a, left, right);\n\n // Begin partitioning\n int i = left, j = right - 1;\n for( ; ; )\n {\n while(a[++i].compareTo(pivot) < 0);\n while(a[--j].compareTo(pivot) > 0);\n if(i < j)\n CommonFunc.swapReference(a, i, j);\n else\n break;\n }\n\n CommonFunc.swapReference(a, i, right - 1);\n\n quicksort(a, left, i - 1);\n quicksort(a, i + 1, right);\n }\n else // Do an insertion sort on the subarray\n Insertionsort.insertionsort(a, left, right);\n }", "public static void quickSort(Integer[] arr) {\n int len = arr.length;\n// qsort3way(arr, 0, len - 1);\n qsort(arr, 0, len - 1);\n }", "private void quickSort(int[] array, int left, int right) {\n if (left>=right){\n return;\n }\n\n //2. Pick a pivot element -> we will choose the centre element:\n // Note: Better would be to choose left + (right-left)/2 (as this would avoid overflow error for large arrays i.e. 2GB))\n\n int pivot = array[(left+right)/2];\n\n //3. Partition the array around this pivot and return the index of the partition.\n int index = partition(array,left,right,pivot);\n\n //4. Sort on the left and right side recursively.\n quickSort(array,left,index-1); //Left side\n quickSort(array,index,right); //Right side\n }", "public static void quickSort(int[] arr, int lo, int hi) {\n //write your code here\n if(lo>hi){\n return;\n }\n int pivot = partition(arr, arr[hi], lo, hi);\n quickSort(arr, lo, pivot-1);\n quickSort(arr, pivot+1, hi);\n }", "static void quickSort(int[] arr, int left, int right){\n int position = partition(arr, left, right);\n if(left<position){\n quickSort(arr,left,position);\n }\n if(position+1<right){\n quickSort(arr,position+1,right);\n }\n }", "void sort(int arr[], int low, int high) {\n\t\tif (low < high) {\n\t\t\t/*\n\t\t\t * pi is partitioning index, arr[pi] is now at right place\n\t\t\t */\n\t\t\tint pi = partition(arr, low, high);\n\n\t\t\t// Recursively sort elements before\n\t\t\t// partition and after partition\n\t\t\tsort(arr, low, pi - 1);\n\t\t\tsort(arr, pi + 1, high);\n\t\t}\n\t}", "public void quicksort(ArrayList<Node> array, int low, int high)\n {\n Node pivot = new Node(array.get(low).element);\n //Start value for pivot index\n int pivotIndex = low;\n //Define index in list where values start being higher than the pivot \n int higherThan = -1;\n //Begin the for loop after the first element\n for (int i = low + 1; i <= high; i++)\n \n { int gap = Math.abs(pivotIndex - i);\n if (array.get(i).element.compareTo(pivot.element) <= 0 && gap == 1)\n { switchPosition(i,pivotIndex);\n pivotIndex = i;\n }\n else if (array.get(i).element.compareTo(pivot.element) <= 0 && gap > 1)\n { //higherThan = i;\n switchPosition(i, pivotIndex);\n int temp = i;\n i = pivotIndex;\n pivotIndex = temp;\n switchPosition(i+1, pivotIndex); \n pivotIndex = i+1;\n //i++;\n //pivotIndex = higherThan;\n //higherThan++;\n }\n else // (array.get(i).element.compareTo(pivot.element) > 0 )\n { //Do nothing, element should stay in its position greater than the pivot\n }\n \n }\n System.out.println(\"Pivot index: \" + pivotIndex + \"\\n\");\n for (int i = 0; i < array.size(); i++)\n {\n System.out.println(\" \" + array.get(i).element.toString());\n }\n if ((pivotIndex - 1) >= 1)\n { quicksort(array, 0, pivotIndex - 1);\n System.out.println(\"\\n low index call, pivot element \" + array.get(pivotIndex).element.toString());\n }\n if ((high - pivotIndex) >= 1)\n {\n quicksort(array, pivotIndex + 1, high-1); \n }\n }", "private static void quicksort( Comparable [ ] a, int low, int high ) {\n if( low + CUTOFF > high )\n insertionSort( a, low, high );\n else {\n// Sort low, middle, high\n int middle = ( low + high ) / 2;\n if( a[ middle ].lessThan( a[ low ] ) )\n swapReferences( a, low, middle );\n if( a[ high ].lessThan( a[ low ] ) )\n swapReferences( a, low, high );\n if( a[ high ].lessThan( a[ middle ] ) )\n swapReferences( a, middle, high );\n// Place pivot at position high - 1\n swapReferences( a, middle, high - 1 );\n Comparable pivot = a[ high - 1 ];\n// Begin partitioning\n int i, j;\n for( i = low, j = high - 1; ; ) {\n while( a[ ++i ].lessThan( pivot ) );\n while( pivot.lessThan( a[ --j ] ) );\n if( i < j )\n swapReferences( a, i, j );\n else\n break;\n }\n// Restore pivot\n swapReferences( a, i, high - 1 );\n quicksort( a, low, i - 1 ); // Sort small elements\n quicksort( a, i + 1, high ); // Sort large elements\n }\n }", "private static void quicksort(Object a[], int lo0, int hi0) {\n int lo = lo0;\n int hi = hi0;\n int mid;\n\n if (hi0 > lo0) {\n swapReferences(a, lo0, (lo0 + hi0)/2);\n Object[] midObject = (Object[]) a[(lo0 + hi0) / 2];\n mid = (int)midObject[2];\n while (lo <= hi) {\n Object[] loObject = (Object[])a[lo];\n int loWeight = (int)loObject[2];\n while((lo < hi0) && (loWeight < mid)) {\n loObject = (Object[])a[lo];\n loWeight = (int)loObject[2];\n if (loWeight < mid) {\n lo++;\n }\n }\n\n Object[] hiObject = (Object[])a[hi];\n int hiWeight = (int)hiObject[2];\n while((hi > lo0) && (hiWeight > mid)) {\n hiObject = (Object[])a[hi];\n hiWeight = (int)hiObject[2];\n if (hiWeight > mid) {\n hi--;\n }\n }\n\n if (lo <= hi) {\n swapReferences(a, lo, hi);\n lo++;\n hi--;\n }\n }\n\n if (lo0 < hi) {\n quicksort(a, lo0, hi);\n }\n\n if (lo < hi0) {\n quicksort(a, lo, hi0);\n }\n }\n }", "public T[] sortAux(T array[], int low, int high, int switchSize) {\n\t\t \n\t if (low < high) {\n\t \t \n\t \t \tif (array.length < switchSize) {\n\t \t \t\tarray = insertionSort.sort(array);\n\t \t \t} else {\n\t \t \t\t//Find the correct index for the pivot\n\t \t int pivotCorrected = helpers.partition(array, low, high);\n\n\t \t //Recursively sort elements to the left and right of pivot\n\t \t array = sortAux(array, low, pivotCorrected - 1, switchSize);\n\t \t array = sortAux(array, pivotCorrected + 1, high, switchSize);\n\t \t \t}\n\t }\n\t return array;\n\t }", "private static void quickSortArray(int[] a, int startIndex, int endIndex) {\n\t\t\n\t\t\n\t\tif (startIndex<endIndex){\n\t\t\t\n\t\t\t// calculate the partitioned index\n\t\t\t\n\t\t\tint partitionIndex= partion(a, startIndex,endIndex);\n\t\t\t\n\t\t\tquickSortArray(a,startIndex,partitionIndex-1);\n\t\t\tquickSortArray(a,partitionIndex+1,endIndex);\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t\n\t}", "public void quickSort(Comparable[] arr, int low, int high) {\n\t\tint pivot;\n\t\tif (low < high) {\n\t\t\tpivot = partition(arr, low, high);\n\t\t\tquickSort(arr, low, pivot - 1);\n\t\t\tquickSort(arr, pivot + 1, high);\n\t\t}\n\t}", "public void quicksort()\n { quicksort(this.heap, 0, heap.size()-1);\n }", "private void quickSortM(int[] arr, int start, int end) {\n\t\tif(start>=end)\r\n\t\t\treturn ;\r\n\t\tint bounary = partition(arr,start,end);\r\n\t\tquickSortM(arr,start,bounary-1);\r\n\t\tquickSortM(arr, bounary+1, end);\r\n\t}", "static void quickSort (double a[], int lo, int hi){\n int i=lo, j=hi;\r\n\t\tdouble h;\r\n double pivot=a[lo];\r\n\r\n // pembagian\r\n do{\r\n while (a[i]<pivot) i++;\r\n while (a[j]>pivot) j--;\r\n if (i<=j)\r\n {\r\n h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n i++; j--;\r\n }\r\n } while (i<=j);\r\n\r\n // pengurutan\r\n if (lo<j) quickSort(a, lo, j);\r\n if (i<hi) quickSort(a, i, hi);\r\n }", "public static void quickSort(int[] a, int left, int right)\r\n {\r\n int pivot = partition(a, left, right);\r\n if(left < pivot - 1)\r\n quickSort(a, left, pivot - 1);\r\n if(pivot < right)\r\n quickSort(a, pivot, right);\r\n }", "public void quickSortHelper(int start, int end){\n if(start < end){\n //partition index calls partition that returns idx\n //and also puts toSort[partitionidx] in the right place\n int partitionidx = partition(start, end);\n\n //sorts elements before and after the partitions\n //recursive - nice\n //System.out.println(\"test\");\n quickSortHelper(start, partitionidx - 1); //befre\n quickSortHelper(partitionidx + 1, end); //after\n }\n }", "public void quicksort(int[] a, int start, int end){\n\t\tif(end <= start) return;\r\n\t\t//2 number\r\n//\t\tif(end - start == 1 && a[start] > a[end]){\r\n//\t\t\tswap(a, start, end);\r\n//\t\t\treturn;\r\n//\t\t}\r\n\t\tif((end - start )< 20){\r\n\t\t\tinsertSort(a, start,end);\r\n\t\t\treturn;\r\n\t\t}\r\n\t int pivot = getPivot(a, start, end);\r\n\t int i = start, j = end - 1;\r\n\t while(i < j){\r\n\t while(i < j && a[++i] < pivot);\r\n\t while(i < j && a[--j] > pivot);\r\n\t if(i < j)\r\n\t swap(a, i, j);\r\n\t }\r\n\t swap(a, i, end -1);\r\n\t quicksort(a, start, i - 1);\r\n\t quicksort(a, i + 1, end);\r\n\t}", "private void quickSort(int start, int end) {\n\t\tint pivot, i, j;\n\t\tif (start < end) {\n\t\t\t// Select first element as Pivot\n\t\t\tpivot = start;\n\t\t\ti = start;\n\t\t\tj = end;\n\n\t\t\t// Base condition\n\t\t\twhile (i < j) {\n\t\t\t\t// increment i till found greater element than pivot\n\t\t\t\tfor (i = start; i <= end; i++) {\n\t\t\t\t\tif (data.get(i) > data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// decrement j till found lesser element than pivot\n\t\t\t\tfor (j = end; j >= start; j--) {\n\t\t\t\t\tif (data.get(j) <= data.get(pivot)) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// if i<j than swap\n\t\t\t\tif (i < j) {\n\t\t\t\t\tswap(i, j);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// set pivot to jth element & move pivot to proper position\n\t\t\tswap(j, pivot);\n\n\t\t\t// Repeat for sub arrays\n\t\t\tquickSort(start, j - 1);\n\t\t\tquickSort(j + 1, end);\n\t\t}\n\t}", "private static void quickSort(int[] array, int startIndex, int rightIndex) {\n if (startIndex < rightIndex) {\n int pivot = partition(array, startIndex, rightIndex);\n quickSort(array, startIndex, pivot - 1);\n quickSort(array, pivot + 1, rightIndex);\n }\n }", "public void sort(int[] seq, int begin, int end) {\n if (seq == null || end - begin <= 1) {// only seq with length larger than 1 is needed to sort\n return;\n }\n // divide and conquer\n int p = partition(seq, begin, end);// the pivot is now in the final place\n sort(seq, begin, p); // sort the left part\n sort(seq, p + 1, end); // sort the right part, p+1 excludes p because p is the final place of pivot\n }", "public int[] quickSort(int[] array) {\n if(array==null || array.length==1){\n return array;\n }\n int left = 0;\n int right = array.length-1;\n quickSort1(array,left,right);\n return array;\n }", "public static void QuickSort(int arr[], int low, int high) {\n\n if (low < high) {\n int pivot = partition(arr, low, high);\n\n //Sort elements before and after partition\n QuickSort(arr, low, pivot - 1);\n QuickSort(arr, pivot + 1, high);\n }\n }", "private void quicksort(int low, int high) {\r\n\t\tint i = low, j = high;\r\n\t\t// Get the pivot element from the middle of the list\r\n\t\tint pivot = mutualNum[low + (high-low)/2];\r\n\t\t// Divide into two lists\r\n\t\twhile (i <= j) {\r\n\t\t\twhile (mutualNum[i] > pivot) {\r\n\t\t\t\ti++;\r\n\t\t\t}\r\n\t\t\twhile (mutualNum[j] < pivot) {\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t\tif (i <= j) {\r\n\t\t\t\texchange(i, j);\r\n\t\t\t\ti++;\r\n\t\t\t\tj--;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Recursion\r\n\t\tif (low < j)\r\n\t\t\tquicksort(low, j);\r\n\t\tif (i < high)\r\n\t\t\tquicksort(i, high);\r\n\t}", "static void quickSort (int a[], int lo, int hi){\n\t int i=lo, j=hi, h;\r\n\t int pivot=a[lo];\r\n\r\n\t // pembagian\r\n\t do{\r\n\t while (a[i]<pivot) i++;\r\n\t while (a[j]>pivot) j--;\r\n\t if (i<=j)\r\n\t {\r\n\t h=a[i]; a[i]=a[j]; a[j]=h;//tukar\r\n\t i++; j--;\r\n System.out.println(\"i = \"+i + \" j = \" + j);\r\n\t }\r\n\t } while (i<=j);\r\n\r\n\t // pengurutan\r\n\t if (lo<j) quickSort(a, lo, j);\r\n\t if (i<hi) quickSort(a, i, hi);\r\n\t }", "static double [] quickSort (double a[]){\r\n \tif(a==null||a.length==0) {\r\n \t\tSystem.out.print(\"Array empty\");\r\n \t\treturn null;\r\n \t}\r\n \tdoQuickSort(a,0,a.length-1);\r\n \treturn a;\r\n\r\n }", "@Test\n public void sortArrayQuickSortTest() {\n int[] array1 = new int[]{5, 2, 3, 1};\n int[] expectedArray1 = new int[]{1, 2, 3, 5};\n int[] actualArray1 = sortArrayQuickSort(array1);\n assertArrayEquals(expectedArray1, actualArray1);\n /**\n * Example 2:\n * Input: nums = [5,1,1,2,0,0]\n * Output: [0,0,1,1,2,5]\n */\n int[] array2 = new int[]{5, 1, 1, 2, 0, 0};\n int[] expectedArray2 = new int[]{0, 0, 1, 1, 2, 5};\n int[] actualArray2 = sortArrayQuickSort(array2);\n assertArrayEquals(expectedArray2, actualArray2);\n }", "public static void QuickSort(int a[]) {\n\t Sort(a, 0, a.length-1); \n\t }", "public T[] quickSortRecur(T[] array, int length) {\n if (length == 1) {\n return array;\n }\n T[] left = (T[]) new Object[length];\n T[] right = (T[]) new Object[length];\n int j = 0;\n int k = 0;\n for (int i = 1; i < length; i++) {\n if (array[i] != null) {\n if (((Comparable) array[0]).compareTo(array[i]) <= 0) {\n right[k] = array[i];\n k++;\n } else {\n left[j] = array[i];\n j++;\n }\n }\n }\n left[j] = array[0];\n j++;\n if (j > 0) {\n left = quickSortRecur(left, j);\n }\n if (k > 0) {\n right = quickSortRecur(right, k);\n }\n j = 0;\n for (int i = 0; i < left.length; i++) {\n if (left[i] != null) {\n array[j] = left[i];\n j++;\n }\n }\n for (int i = 0; i < right.length; i++) {\n if (right[i] != null) {\n array[j] = right[i];\n j++;\n }\n }\n return array;\n }", "public static void quickSort(int[] a, int startIndex, int endIndex) {\r\n int pivotIndex; // the index of pivot returned by the quicksort partition\r\n // if the set has more than one element, then partition\r\n if (startIndex < endIndex) {\r\n // partition and return the pivotIndex\r\n pivotIndex = partition(a, startIndex, endIndex);\r\n // recursive call to quicksort on low half\r\n quickSort(a, startIndex, pivotIndex - 1);\r\n // recursive call to quicksort on high half \r\n quickSort(a, pivotIndex + 1, endIndex);\r\n } // end if\r\n }", "public void quickSort() {\n\t\tquickSort(0, data.size() - 1);\n\t}", "void sort( int low, int high)\n {\n if (low > high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(low, high);\n\n // Recursively sort elements before\n // partition and after partition\n sort( low, pi-1);\n sort( pi+1, high);\n }\n }", "private static <T extends Comparable<T>> void quicksort(T v[], int left, int right) {\n if(left<right){\n int indexP = partition(v,left,right);\n quicksort(v, left, indexP - 1);\n quicksort(v, indexP + 1, right );\n\n }\n\n }", "private void sort(T[] arr, T[] temp, int lo, int hi) {\n if (lo >= hi) return; // we return if the size of the part equals 1\n int mid = lo + (hi - lo) / 2;\n sort(arr, temp, lo, mid); // sorting the left part\n sort(arr, temp, mid + 1, hi); // sorting the right part\n merge(arr, temp, lo, hi, mid); // merging two parts\n }", "public static int[] quicksort(int[] array, int start, int end) {\n\t\tif (start < end) {\r\n\t\t\t// returns correct index for pivot\r\n\t\t\tint pivotIndex = partition(array, start, end);\r\n\t\t\t// recursively sort from start until pivot\r\n\t\t\tquicksort(array, start, pivotIndex - 1);\r\n\t\t\t// recursively sort from after pivot to end\r\n\t\t\tquicksort(array, pivotIndex + 1, end);\r\n\t\t}\r\n\r\n\t\treturn array;\r\n\t}", "public static void sort(int[] arr) {\n // Base Case\n if (arr.length == 1) return;\n\n // Splitting the array\n int midpoint = arr.length / 2;\n int[] left_arr = Arrays.copyOfRange(arr, 0, midpoint);\n int[] right_arr = Arrays.copyOfRange(arr, midpoint, arr.length);\n\n // Sorting the subarrays \n sort(left_arr);\n sort(right_arr);\n\n // Combining the subarrays\n int left_pointer = 0;\n int right_pointer = 0;\n /** \n * Check which array has smaller value then \n * assign it to sorted array\n */ \n while (left_pointer + right_pointer < arr.length) {\n // Left array has been traversed\n if (left_pointer >= left_arr.length) {\n arr[left_pointer + right_pointer] \n = right_arr[right_pointer];\n right_pointer++;\n }\n // Right array has been traversed\n else if (right_pointer >= right_arr.length) {\n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Both arrays still have values.\n else {\n // Left array has smaller or equal value\n if (left_arr[left_pointer] <= right_arr[right_pointer]) { \n arr[left_pointer + right_pointer]\n = left_arr[left_pointer];\n left_pointer++;\n }\n // Right array has smaller value\n else {\n arr[left_pointer + right_pointer]\n = right_arr[right_pointer];\n right_pointer++;\n }\n }\n }\n // Array is sorted. Replace given array.\n }", "protected abstract void partialQuickSort(Integer[] map, int left, int right, int minIdx, int maxIdx);", "static void quickSortFirst(int[] array, int left, int right) {\n if (left < right) {\n //Selecting first element as pivot\n int pivot = array[left];\n //For partition\n int i = left;\n int j = right;\n while (i < j) {\n //Shift one place to past pivot element\n i += 1;\n //Search right part to find elements greater than pivot\n while (i <= right && array[i] < pivot) {\n i += 1;\n\n }\n //Search left part to find elements smaller than pivot\n while (j >= left && array[j] > pivot) {\n j -= 1;\n\n }\n if (i <= right && i < j) {\n //Swap\n swap(array, i, j);\n\n }\n }\n //Place pivot in correct place\n swap(array, left, j);\n //Sorting again for partition parts\n quickSortFirst(array, left, j - 1);\n quickSortFirst(array, j + 1, right);\n }\n }", "private void quickSort(Comparable[] items, int left, int right) {\n if (left < right) {\n /**\n * Split the list at the pivot through partitioning it,\n * and return the pivot to separate out the less than\n * and greater than sides.\n */\n int pivot = partition(items, left, right);\n if (pivot - 1 > left) {\n quickSort(items, left, pivot - 1);\n }\n if (pivot + 1 < right) {\n quickSort(items, pivot + 1, right);\n }\n }\n }", "public void quickSort() {\n if (actualArray == null || actualArray.length == 0) {\n return;\n }\n quickSort(0, actualArray.length - 1);\n }", "private void doSort (Column A, int [] i, int p, int r, int begin) {//double[] A, int p, int r, MutableTable t) {\n\t\tif (p < r) {\n\t\t\tint q = partition(A, i, p, r, begin);\n\t\t\tdoSort(A, i, p, q, begin);\n\t\t\tdoSort(A, i, q + 1, r, begin);\n\t\t}\n\t}", "@Test\n public void testQuickSort() {\n System.out.println(\"QuickSort listo\");\n Comparable[] list = {3,2,5,4,1};\n QuickSort instance = new QuickSort();\n Comparable[] expResult = {1,2,3,4,5};\n Comparable[] result = instance.QuickSort(list, 0, list.length-1);\n assertArrayEquals(expResult, result);\n }", "private void sort(int[] array, int start, int end){\n //base condition\n if(start >= end)\n return;\n int boundary = partition(array, start, end);\n sort(array, start, boundary - 1);\n sort(array, boundary + 1, end);\n }", "public int[] quickSort(int[] array) {\n\t\t\t if (array == null) {\n\t\t\t\t return array;\n\t\t\t }\n\t\t\t\t apartSort(array, 0, array.length-1);\n\t\t\t\t return array;\n\t\t }", "public static void quickSort(ArrayList<Integer> S){\n\t\t\n\t\tif (S.isEmpty()) { //if empty just return itself \n\t\t\treturn; \n\t\t}\n\t\t\n\t\tint pivot = S.get(S.size()-1); //creating a pivot point for the sort \n\t\t\n\t\tArrayList<Integer> L = new ArrayList<Integer>(); //Creating array list for Less than\n\t\tArrayList<Integer> E = new ArrayList<Integer>(); //Creating array list for Equal than\n\t\tArrayList<Integer> G = new ArrayList<Integer>(); //Creating array list for Greater than \n\t\t\n\t\twhile (!S.isEmpty()) { //run while the array list isn't empty \n\t\t\t\n\t\t\tif (S.get(0)< pivot) { //if its less than the pivot, add less than \n\t\t\t\t\n\t\t\t\tL.add(S.get(0)); //adds the less than \n\t\t\t\tS.remove(0); //removes the elements at that index position \n\t\t\t}\n\t\t\telse if(S.get(0) == pivot) { //if its equal to the pivot, add equal to \n\t\t\t\t\n\t\t\t\tE.add(S.get(0));\n\t\t\t\tS.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\telse if (S.get(0) > pivot) { //if its greater than the pivot point, add greater than \n\t\t\t\t\n\t\t\t\tG.add(S.get(0));\n\t\t\t\tS.remove(0);\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\tif (!L.isEmpty()) { //if Less than isn't empty, call quick sort on less than \n\t\t\t\n\t\t\tquickSort(L); //calls the quick sort for less than \n\t\t}\n\t\t\n\t\tif (!G.isEmpty()) { //if Greater than isn't empty, call quick sort on greater than \n\t\t\t\n\t\t\tquickSort(G); //calls quick sort for greater than \n\t\t}\n\t\t\n\t\tS.addAll(L); //Shifting all of the elements to the right \n\t\tS.addAll(E); //Shifting all of the elements to the right \n\t\tS.addAll(G); //Shifting all of the elements to the right \n\t}", "public abstract void sort(int[] array);", "public int[] quicksort(int A[], int izq, int der) {\r\n\r\n\t\t int piv=A[izq]; // tomamos el primer elemento como pivote\r\n\t\t int i=izq; // i realiza la búsqueda de izquierda a derecha\r\n\t\t int j=der; // j realiza la búsqueda de derecha a izquierda\r\n\t\t int aux;\r\n\t\t \r\n\t\t while(i<j){ // mientras no se crucen...\r\n\t\t while(A[i]<=piv && i<j) i++; // busca un elemento mayor que pivote,\r\n\t\t while(A[j]>piv) j--; // busca un elemento menor que pivote,\r\n\t\t if (i<j) { // si los encuentra y no se han cruzado... \r\n\t\t aux= A[i]; // los intercambia.\r\n\t\t A[i]=A[j];\r\n\t\t A[j]=aux;\r\n\t\t }\r\n\t\t }\r\n\t\t A[izq]=A[j]; // colocamos el pivote en su lugar de la forma [menores][pivote][mayores]\r\n\t\t A[j]=piv; \r\n\t\t if(izq<j-1)\r\n\t\t quicksort(A,izq,j-1); // ordenamos mitad izquierda\r\n\t\t if(j+1 <der)\r\n\t\t quicksort(A,j+1,der); // ordenamos mitad derecha\r\n\t\t \r\n\t return A;\r\n\t\t\t }", "public static void shellSort(Comparable[] a) {\n int n = a.length;\n int h = 1;\n // Iteratively increase the stride h until the stride will at most sort 2 elements.\n while (h < n/3) h = 3*h + 1;\n while (h >= 1) {\n for (int i = 1; i < n; i += h) {\n for (int j = i; j > 0; j--) {\n if (less(a[j], a[j-1])) exch(a, j, j-1);\n else break;\n }\n }\n h /= 3;\n }\n\n }", "private int[] sort(int arr[]) {\r\n\t\tint n = arr.length;\r\n\r\n\t\tif (n == 1) { // base case\r\n\t\t\treturn arr;\r\n\t\t}\r\n\t\t// divide\r\n\t\tint[] arrL = Arrays.copyOfRange(arr, 0, (n / 2));\r\n\t\tint[] arrR = Arrays.copyOfRange(arr, (n / 2), (n));\r\n\t\t// and conquer\r\n\t\treturn merge(sort(arrL), sort(arrR));\r\n\t}", "private static <T> void quickSort(@Nonnull List<T> x, @Nonnull Comparator<? super T> comparator, int off, int len) {\n if (len < 7) {\n for (int i = off; i < len + off; i++) {\n for (int j = i; j > off && comparator.compare(x.get(j), x.get(j - 1)) < 0; j--) {\n swapElements(x, j, j - 1);\n }\n }\n return;\n }\n\n // Choose a partition element, v\n int m = off + (len >> 1); // Small arrays, middle element\n if (len > 7) {\n int l = off;\n int n = off + len - 1;\n if (len > 40) { // Big arrays, pseudomedian of 9\n int s = len / 8;\n l = med3(x, comparator, l, l + s, l + 2 * s);\n m = med3(x, comparator, m - s, m, m + s);\n n = med3(x, comparator, n - 2 * s, n - s, n);\n }\n m = med3(x, comparator, l, m, n); // Mid-size, med of 3\n }\n T v = x.get(m);\n\n // Establish Invariant: v* (<v)* (>v)* v*\n int a = off;\n int b = a;\n int c = off + len - 1;\n int d = c;\n while (true) {\n while (b <= c && comparator.compare(x.get(b), v) <= 0) {\n if (comparator.compare(x.get(b), v) == 0) {\n swapElements(x, a++, b);\n }\n b++;\n }\n while (c >= b && comparator.compare(v, x.get(c)) <= 0) {\n if (comparator.compare(x.get(c), v) == 0) {\n swapElements(x, c, d--);\n }\n c--;\n }\n if (b > c) break;\n swapElements(x, b++, c--);\n }\n\n // Swap partition elements back to middle\n int n = off + len;\n int s = Math.min(a - off, b - a);\n vecswap(x, off, b - s, s);\n s = Math.min(d - c, n - d - 1);\n vecswap(x, b, n - s, s);\n\n // Recursively sort non-partition-elements\n if ((s = b - a) > 1) quickSort(x, comparator, off, s);\n if ((s = d - c) > 1) quickSort(x, comparator, n - s, s);\n }", "public static void quickSort (int[] nums, int start, int end) {\n\t\t// check if it's a valid array\n\t\tif (nums == null || nums.length == 0) {\n\t\t\treturn;\n\t\t}\n\n // exit condition\n\t\tif (start >= end) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tint left = start, right = end;\n\t\tint pivot = nums[start + (end - start) / 2];\n\t\t\n\t\twhile (left <= right) {\n\t\t\twhile (left <= right && nums[left] < pivot) {\n\t\t\t\tleft++;\n\t\t\t}\n\t\t\twhile (left <= right && nums[right] > pivot) {\n\t\t\t\tright--;\n\t\t\t}\n\t\t\tif (left <= right) {\n\t\t\t\tswap(nums, left, right);\n\t\t\t\tleft++;\n\t\t\t\tright--;\n\t\t\t}\n\t\t}\n\n // call quickSort recursively\n\t\tquickSort(nums, start, right);\n\t\tquickSort(nums, left, end);\n\t}", "private static void sort(Object[] a, Object[] tmp,\n int from, int to, Fun isLess) {\n int split = (from + to) / 2;\n if (split - from > 1)\n sort(tmp, a, from, split, isLess);\n if (to - split > 1)\n sort(tmp, a, split, to, isLess);\n int i = from, j = split;\n while (i < split && j < to) {\n if (isLess.apply(tmp[i], tmp[j]) == Boolean.TRUE)\n a[from] = tmp[i++];\n else\n a[from] = tmp[j++];\n ++from;\n }\n if (i < split)\n System.arraycopy(tmp, i, a, from, split - i);\n else if (j < to)\n System.arraycopy(tmp, j, a, from, to - j);\n }", "public static void quickSort(int[] array, int left, int right) {\n\n\t\tif (left < right) {\n\t\t\tint pivotNewIndex = partition(array, left, right);\n\t\t\tquickSort(array, left, pivotNewIndex - 1);\n\t\t\tquickSort(array, pivotNewIndex + 1, right);\n\t\t}\n\n\t}", "public static int[] quickSort(int[] arr, int low, int high) {\n if (arr == null || arr.length == 0)\n return arr;\n if (low >= high)\n return arr;\n int middle = low + (high - low) / 2;\n int pivot = arr[middle];\n int i = low, j = high;\n while (i <= j) {\n while (arr[i] < pivot) {\n i++;\n }\n while (arr[j] > pivot) {\n j--;\n }\n if (i <= j) {\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n i++;\n j--;\n }\n }\n if (low < j)\n quickSort(arr, low, j);\n\n if (high > i)\n quickSort(arr, i, high);\n\n return arr;\n }", "public ListUtilities quicksort(){\n\t\t\n\t\tListUtilities lo = this.returnToStart();\n\t\tListUtilities hi = this.goToEnd();\n\t\tListUtilities sorted = this.partition(lo, hi);\n\t\t\n\t\treturn sorted.returnToStart();\t\t\n\t}", "private void doQuickSort(int lowerIndex, int higherIndex){\n\t\tint lowItter = lowerIndex;\n\t\tint highItter = higherIndex;\n \n\t\t// use the middle as a pivot numberr\n int middleIndex = lowerIndex + (higherIndex - lowerIndex)/2;\n\t\tint pivot = sortArray[middleIndex];\n \n\t\twhile (lowItter <= highItter) {\n\t\t\twhile (sortArray[lowItter] < pivot)\n lowItter++;\n \n\t\t\twhile (sortArray[highItter] > pivot)\n highItter--;\n \n compCount++;\n\t\t\tif (lowItter <= highItter) {\n\t\t\t\tswap(lowItter, highItter);\n swapCount++;\n \n\t\t\t\tlowItter++;\n\t\t\t\thighItter--;\n\t\t }\n\t\t}\n \n compCount++;\n\t\tif (lowerIndex < higherIndex)\n\t\t\tdoQuickSort(lowerIndex, highItter);\n \n compCount++;\n\t\tif (lowItter < higherIndex)\n\t\t\tdoQuickSort(lowItter, higherIndex);\n \n\t}", "public void quickSortRecur() {\n this.array = quickSortRecur(array, size);\n }", "public static void quickSort(int[] a, int levy, int pravy) {\n if (levy < pravy) {\n int pom;\n int m = levy;\n for (int i = levy + 1; i <= pravy; i++) {\n if (a[i] < a[levy]) {\n m++;\n pom = a[i];\n a[i] = a[m];\n a[m] = pom;\n }\n }\n pom = a[levy];\n a[levy] = a[m];\n a[m] = pom;\n quickSort(a, levy, m - 1);\n quickSort(a, m + 1, pravy);\n }\n }", "private static <T> void quicksort(Comparable<T>[] array, int fromIndex,\r\n\t\t\tint toIndex) {\r\n\t\tComparable<T> pivot = array[toIndex];\r\n\t\tint j = toIndex;\r\n\r\n\t\t// searching for a bigger value than pivot starting at fromIndex\r\n\t\tfor (int i = fromIndex; i <= toIndex; i++) {\r\n\t\t\tif (compareTo(array[i], pivot) >= 0) {\r\n\r\n\t\t\t\t// searching for a smaller value than pivot starting at toIndex\r\n\t\t\t\twhile (j > i) {\r\n\t\t\t\t\tj--;\r\n\t\t\t\t\tif (compareTo(array[j], pivot) <= 0) {\r\n\r\n\t\t\t\t\t\t// swap values at i and j\r\n\t\t\t\t\t\tswap(array, j, i);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * if right position for pivot has been found swap pivot and\r\n\t\t\t\t * element at reached position\r\n\t\t\t\t */\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tswap(array, i, toIndex);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Checks if there are more elements to sort on the left\r\n\t\t\t\t\t * side of the right of pivot\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (i - 1 > fromIndex) {\r\n\t\t\t\t\t\tquicksort(array, fromIndex, i - 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * calls quicksort if there are more elements to sort on the\r\n\t\t\t\t\t * right side of the of pivot\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (i + 1 < toIndex) {\r\n\t\t\t\t\t\tquicksort(array, i + 1, toIndex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// i shouldn't be bigger than j\r\n\t\t\tif (i > j) {\r\n\t\t\t\tthrow new IllegalStateException(\"i > j\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private static void quickSort(int[] array, int begin, int end, boolean useMedian) {\n int i = begin;\n int j = end;\n if (array.length==0 || array == null) {\n return;\n }\n int pivot = array[begin];\n if (useMedian) { \n pivot = array[begin + (end - begin) / 2];\n }\n\n while (i <= j) { \n while (array[i] < pivot) { \n i++;\n }\n while (array[j] > pivot) { \n j--; r\n }\n if (i <= j) { \n swap(array, i, j); \n i++;\n j--;\n }\n }\n\n if (begin < j) { \n quickSort(array, begin, j, useMedian);\n }\n if (i < end) { \n quickSort(array, i, end, useMedian);\n }\n }", "public void sort(T[] arr, T[] aux, int begin, int end){\n\n if(end-begin < 7){\n insertionSort(arr, begin, end);\n return;\n }\n\n int mid = (begin+end)/2;\n\n sort(arr, aux, begin, mid);\n sort(arr, aux, mid+1, end);\n\n if(arr[mid].compareTo(arr[mid+1]) != 1){\n return;\n }else{\n merge(arr, aux, begin, mid, end);\n }\n }", "public String[][] quickSort(String[][] arr, int inicio, int fim, int requiredData) { // Função que realiza\r\n\t\tif (requiredData != 4) {\r\n\t\t\tif (inicio < fim) {\r\n\t\t\t\tint pivo;\r\n\t\t\t\tpivo = Integer.parseInt(arr[fim][requiredData]); // Pivo ser� o ultimo de cada galho\r\n\r\n\t\t\t\tint i = (inicio - 1);\r\n\t\t\t\tfor (int j = inicio; j <= fim - 1; j++) {\r\n\r\n\t\t\t\t\tif (Integer.parseInt(arr[j][requiredData]) < pivo) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[fim];\r\n\t\t\t\tarr[fim] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\t// Funcao recursiva para cada ramo da arvore\r\n\t\t\t\tquickSort(arr, inicio, piAux - 1, requiredData);\r\n\t\t\t\tquickSort(arr, piAux + 1, fim, requiredData);\r\n\t\t\t\treturn arr;\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tCollator collator = Collator.getInstance();\r\n\t\t\tcollator.setStrength(Collator.NO_DECOMPOSITION);\r\n\t\t\tif (inicio < fim) {\r\n\t\t\t\tString pivo = arr[fim][requiredData];\r\n\r\n\t\t\t\tint i = (inicio - 1);\r\n\t\t\t\tfor (int j = inicio; j <= fim - 1; j++) {\r\n\r\n\t\t\t\t\tif (collator.compare(pivo, arr[j][requiredData]) > 0) {\r\n\t\t\t\t\t\ti++;\r\n\t\t\t\t\t\tString[] aux = arr[i];\r\n\t\t\t\t\t\tarr[i] = arr[j];\r\n\t\t\t\t\t\tarr[j] = aux;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tString[] aux = arr[i + 1];\r\n\t\t\t\tarr[i + 1] = arr[fim];\r\n\t\t\t\tarr[fim] = aux;\r\n\t\t\t\tint piAux = i + 1;\r\n\r\n\t\t\t\t// Funcao recursiva para cada ramo da arvore\r\n\t\t\t\tquickSort(arr, inicio, piAux - 1, requiredData);\r\n\t\t\t\tquickSort(arr, piAux + 1, fim, requiredData);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\treturn arr;\r\n\t}", "private static <E extends Comparable<? super E>> void quickSortHelper(\r\n\t\t\tComparable<E>[] data, int left, int right) {\r\n\t\tif (left + CUTOFF <= right) {\r\n\t\t\tE pivot = median3(data, left, right);\r\n\t\t\tint partition = partition(data, left, right, pivot);\r\n\t\t\tquickSortHelper(data, left, partition - 1);\r\n\t\t\tquickSortHelper(data, partition + 1, right);\r\n\t\t} else {\r\n\t\t\tinsertionSort(data, left, right);\r\n\t\t}\r\n\t}", "private void sort(int arr1[], int arr2[], int low, int high) {\n if (low < high) {\n /* index is partitioning index, arr[index] is\n now at right place */\n int index = partition(arr1, arr2, low, high);\n // Recursively sort elements before partition and after partition\n sort(arr1, arr2, low, index-1);\n sort(arr1, arr2, index+1, high);\n }\n }", "public void quickSort(int[] list, int p, int r){\r\n\t\tif(p<r){\r\n\t\t\tint q = partition(list, p, r);\r\n\t\t\tquickSort(list, p, q-1);\r\n\t\t\tquickSort(list, q+1, r); \r\n\t\t}\r\n\t}", "private static void quicksort(int[] array, int fromIndex, int toIndex) {\r\n\t\tint pivot = array[toIndex];\r\n\t\tint j = toIndex;\r\n\r\n\t\t// searching for a bigger value than pivot starting at fromIndex\r\n\t\tfor (int i = fromIndex; i <= toIndex; i++) {\r\n\t\t\tif (array[i] >= pivot) {\r\n\r\n\t\t\t\t// searching for a smaller value than pivot starting at toIndex\r\n\t\t\t\twhile (j > i) {\r\n\t\t\t\t\tj--;\r\n\r\n\t\t\t\t\t// swap values at i and j\r\n\t\t\t\t\tif (array[j] <= pivot) {\r\n\t\t\t\t\t\tswap(array, j, i);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * if right position for pivot has been found swap pivot and\r\n\t\t\t\t * element at reached position\r\n\t\t\t\t */\r\n\t\t\t\tif (i == j) {\r\n\t\t\t\t\tswap(array, i, toIndex);\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * Checks if there are more elements to sort on the left\r\n\t\t\t\t\t * side of the right of pivot\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (i - 1 > fromIndex) {\r\n\t\t\t\t\t\tquicksort(array, fromIndex, i - 1);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t/*\r\n\t\t\t\t\t * calls quicksort if there are more elements to sort on the\r\n\t\t\t\t\t * right side of the of pivot\r\n\t\t\t\t\t */\r\n\t\t\t\t\tif (i + 1 < toIndex) {\r\n\t\t\t\t\t\tquicksort(array, i + 1, toIndex);\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// i shouldn't be bigger than j\r\n\t\t\tif (i > j) {\r\n\t\t\t\tthrow new IllegalStateException(\"i > j\");\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public abstract void sort(int[] sortMe);", "public static void main(String[] args){\n\tint[] o = {3,1,2,2,4};\n\tint[] p = {3,7,1,4,32,95,47,12,50,41};\n\tSystem.out.println(toString(o));\n\tSystem.out.println(toString(quicksort(o,0,o.length)));\n }", "public static void quicksortByX(Point[] A, int left, int right) {\n if (left < right) {\n // Array partitioning (any partitioning algorithm can be used here).\n int pivot = hoarePartitioning(A, left, right);\n // Recursive application of Quicksort to left-part and right-part.\n quicksortByX(A, left, pivot - 1);\n quicksortByX(A, pivot + 1, right);\n }\n }", "private int partition(Comparable[] items, int first, int last) {\n /**\n * Get a random pivot for the current section.\n * <p/>\n * It should be noted that I made a decision to choose a randomized pivot\n * over selecting a hard-coded pivot (i.e. the middle), or a median. This\n * is to avoid situations where we might get the 'worst case' scenario for\n * QuickSort, leading to O(n^2) time complexity. By using a random pivot,\n * it becomes highly unlikely for the algorithm to run into this situation.\n * <p/>\n * I felt this was the safest and most reliable way of implementing the\n * pivot selection.\n */\n int pivot = (int) Math.floor(UtilityMethods.getPivot(first, last));\n\n /**\n * Swap the pivot item with the first element to move it out\n * of the way during sorting. Assign a variable to hold this\n * for quick comparison.\n */\n UtilityMethods.swapElements(items, pivot, first);\n Comparable pivotElement = items[first];\n\n /**\n * The index to begin the swapping of the elements is the next\n * index after the pivot, currently at first.\n */\n int swapPosition = first + 1;\n\n /**\n * For each element within the current section, we iterate through\n * the section, starting from one after the pivot (the swap position)\n */\n for (int currentElement = swapPosition; currentElement <= last; currentElement++) {\n\n /**\n * If the currently being checked element is smaller than the pivot,\n * we swap the current element with the 'swap position'. This results\n * in gathering all of the numbers less than the pivot element to\n * one side of the array.\n *\n * The index that is then to be swapped is incremented. This means\n * that any elements before the swap position will be sorted as 'less'\n * than the pivot. We don't need to move any elements greater than\n * the pivot.\n */\n if (items[currentElement].compareTo(pivotElement) < 0) {\n UtilityMethods.swapElements(items, swapPosition, currentElement);\n swapPosition++;\n }\n\n }\n\n /**\n * After all elements have been swapped around, we switch the first element\n * (the pivot element), with the last sorted 'less than' element in swap\n * position -1. The works, as it doesn't matter what element is in what\n * position, as long as there are greater and less than sections. By\n * doing this swap, we keep the elements less than the pivot to the left\n * of the pivot, and put the pivot in the 'correct' sorted place in the list.\n */\n UtilityMethods.swapElements(items, first, swapPosition - 1);\n\n /**\n * We return the swapPosition -1, which is the final index of the pivot element.\n */\n return swapPosition - 1;\n }", "public int[] quickSort(int[] array) {\n\t\tif(array == null || array.length == 1){\n\t\t\treturn array;\n\t\t}\n\t\tquickSort(array, 0, array.length - 1);\n\t\treturn array;\n\t}", "private void quicksort(int inLow, int inHigh) {\n\t\tint i = inLow; int j = inHigh;\n\t\t//____| Get Pivot from middle.\n\t\tfloat pivot = gameObjectsList.get(inLow + (inHigh - inLow)/2).getX();\n\t\t//____| Divide List\n\t\twhile (i <= j){\n\t\t\twhile(gameObjectsList.get(i).getX() < pivot){\n\t\t\t\ti++;\n\t\t\t}\n\t\t\twhile(gameObjectsList.get(j).getX() > pivot){\n\t\t\t\tj--;\n\t\t\t}\n\t\t\tif (i<=j){\n\t\t\t\tCollections.swap(gameObjectsList, i, j);\n\t\t\t\ti++;\n\t\t\t\tj--;\n\t\t\t}\n\t\t}\n\t\tif (inLow < j)\n\t\t\tquicksort(inLow, j);\n\t\tif (i < inHigh)\n\t\t\tquicksort(i, inHigh);\n\t}", "public void sortArray() {\n\t\tSystem.out.println(\"QUICK SORT\");\n\t}", "public static void intQSort(int v[], int l, int r) {\n\n int tmp; //tmp variable for swapping\n\n if (INSERTIONENABLED) {\n\n //Use insertion sort for arrays smaller than CUTOFF\n if (r < CUTOFF) {\n\n for(int i = l; i < r; i++) {\n for(int j = i; j > 0 && v[j - 1] > v[j]; j--) {\n // swap(j, j -1) {\n tmp=v[j - 1];\n v[j - 1]=v[j];\n v[j]=tmp;\n // }\n }\n }\n\n return;\n }\n }\n\n int pivot;\n int m = l + (int) (Math.random() * ((r - l) + 1)); // random number between first and last, Peto's remark\n\n //median(v[l], v[m], v[r]) {\n if (v[l] <= v[m]) {\n if (v[m] <= v[r])\n pivot = v[m];\n else {\n if (v[l] <= v[r])\n pivot = v[r];\n else\n pivot = v[l];\n }\n } else {\n if (v[m] <= v[r]) {\n if (v[l] <= v[r])\n pivot = v[l];\n else\n pivot = v[r];\n } \n else\n pivot = v[m];\n }\n // }\n\n int i=l,j=r;\n\n //Partioning\n while(i<=j) {\n\n while(v[i]<pivot) i++;\n while(v[j]>pivot) j--;\n\n if(i<=j) {\n //swap(i, j) {\n tmp=v[i];\n v[i]=v[j];\n v[j]=tmp;\n // }\n\n i++;\n j--;\n }\n }\n\n if(l<j) \n intQSort(v,l,j);\n\n if(i<r) \n intQSort(v,i,r);\n }", "public static void quickSort(int[] src) {\n if (src == null || src.length <= 1) return;\n\n rPartition(src, 0, src.length - 1);\n }", "public void sort() {\n\t\tSystem.out.println(\"Quick Sort Algorithm invoked\");\n\n\t}", "private void quickSort(Node<T> low, Node<T> high) {\n if (!Objects.isNull(high) &&\n low != high && low != high.getNext()) {\n\n Node<T> pivot = partition(low, high);\n quickSort(low, pivot.getPrev());\n quickSort(pivot.getNext(), high);\n }\n }", "public static void quickSort (int[] elts) {\r\n\t\tquickSortSegment (elts, 0, elts.length);\r\n\t}", "public static void quickSort (int[] elts) {\r\n\t\tquickSortSegment (elts, 0, elts.length);\r\n\t}", "public static ArrayList<Integer> quickSortSubset(ArrayList<Integer> input, int level){\n if(input.size() < 2){\n return input;\n }\n\n //pivot is the last number in the input array\n //currentPos is the current index being compared to pivot\n int pivot = input.get(input.size()-1);\n int currentPos = 0;\n ArrayList<Integer> auxList = new ArrayList<>();\n\n /* the loop runs until currentPos reaches the pivot\n * each time the loop runs, input[currentPos] is either kept if less than\n * the pivot, or moved to the auxList if greater than or equal */\n while(currentPos < input.size()-1) {\n\n if(debug) {\n tabPrint(\"input: \" + input.toString(), level);\n tabPrint(\"auxList: \" + auxList.toString(), level);\n tabPrint(\"Pivot: \" + pivot, level);\n }\n\n\n if (input.get(currentPos) >= pivot) { //move number to auxList if it's greater or equal to pivot\n if(debug) tabPrint(\"Move \"+input.get(currentPos)+\" to auxList\",level);\n auxList.add(input.remove(currentPos));\n } else { //keep number if it's less than pivot\n if(debug) tabPrint(\"Keep \"+input.get(currentPos),level);\n currentPos++;\n }\n }\n\n //remove pivot from subset to be sorted since it is already in it's correct position\n input.remove(input.size()-1);\n\n //recursively sorts both sets of numbers\n input = quickSortSubset(input, level+1);\n auxList = quickSortSubset(auxList,level+1);\n\n //recombines all elements into one array\n input.add(pivot);\n input.addAll(auxList);\n\n return input;\n\n }", "public static int quickSortInAscendingOrder(int[] array, int start, int end) {\n\n int pivot = array[start];\n int index1 = start;\n int index2 = end;\n\n while (index1 < index2) {\n while (index1 < index2 && array[--index2] >= pivot);\n if (index1 < index2) {\n array[index1] = array[index2];\n }\n\n while (index1 < index2 && array[++index1] <= pivot);\n\n if (index1 < index2) {\n array[index2] = array[index1];\n }\n }\n\n array[index2] = pivot;\n return index2;\n }", "private static void quickSort(Array A, int iStart, int iEnd)\n\t{\n\t\tif (iStart == iEnd)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tint pivot = Rand.randInt(iStart, iEnd);\n\t\tpivot = partition(A, iStart, iEnd, pivot);\n\t\tif (pivot > iStart)\n\t\t{\n\t\t\tquickSort(A, iStart, pivot - 1);\n\t\t}\n\t\tif (pivot < iEnd)\n\t\t{\n\t\t\tquickSort(A, pivot + 1, iEnd);\n\t\t}\n\t}", "public static void ordenarQuickSort( Comparable[ ] datos )\n\t{\n\t\t// TODO \n\t\t// Ejecuto Quick Sort y ordeno recursivamente las secciones restantes\n\t\tint inicio = 0;//indice que indica el inicio del ordenamiento por pivote\n\t\tint fin = datos.length; //indice que indica el final del ordenamiento por pivote\n\t\tComparable pivote = datos[inicio]; //escogo el pivote como el primer termino del arreglo\n\t\tint primermayor = inicio;\n\t\tif( inicio != fin)\n\t\t{\n\t\t\t//primer ordenamiento\n\t\t\tfor(int i=inicio +1; i<fin; i++) //ordena los elementos con respecto al pivote empezando por el segundo de la lista\n\t\t\t{\n\t\t\t\tif(less(datos[i], pivote)) \n\t\t\t\t{\n\t\t\t\t\t//si el elemento en la posicion i es menor al pivote se intercambio con el indice del primer elemento mayor al pivote\n\t\t\t\t\texchange(datos, i, primermayor);\n\t\t\t\t\tprimermayor++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//ordenamientos sucesivos\n\t\t\tQuickSort (datos, inicio, primermayor);\n\t\t\tQuickSort (datos, primermayor+1, fin);\n\t\t}\n\t}", "public static void quickSortIn(int[] array, int left, int right, int n) {\n\n\t\tif (right - left < n) {\n\t\t\tinsertionSort(array, left, right);\n\t\t}\n\t\telse{\n\t\t\tif (left < right) {\n\t\t\t\tint pivotNewIndex = partition(array, left, right);\n\t\t\t\tquickSortIn(array, left, pivotNewIndex - 1, n);\n\t\t\t\tquickSortIn(array, pivotNewIndex + 1, right, n);\n\t\t\t}\n\t\t}\n\n\t}", "public static void quickSort(int arr[]) {\n\t\tquickSort(arr, 0, arr.length - 1);\n\t}", "public void partitionArray(int startIndex, int lastIndex, int[] array) {\n\t\tif (startIndex < lastIndex) { //If the start index is lower than the last one, there are elements to sort\n\t\t\tint middle = (lastIndex + startIndex)/2; //This is the middle of the array\n\t\t\tpartitionArray(startIndex, middle, array); //Keep partitioning the left side\n\t\t\tpartitionArray(middle+1, lastIndex, array); //Now keep partitioning the right side\n\t\t\tmergePartitions(startIndex, middle, lastIndex, array); //Now merge all the partitions\n\t\t}\n\t}", "public void mergeSort(int[] array){\n if(array.length <= 1){\r\n return;\r\n }\r\n // divide into 2 arrays\r\n int split = array.length/2;\r\n // create 2 arrays\r\n int[] front = Arrays.copyOfRange(array, 0, split);\r\n int[] back = Arrays.copyOfRange(array, split, array.length);\r\n \r\n // recursively sort\r\n mergeSort(front);\r\n mergeSort(back);\r\n \r\n // put numbers in correct spot\r\n // keeping track of where we are\r\n int fSpot = 0;\r\n int bSpot = 0;\r\n for(int i = 0; i < array.length; i++){\r\n // no more items in front array\r\n if(fSpot == front.length){\r\n // put item from back array in\r\n array[i] = back[bSpot];\r\n bSpot++;\r\n }else if(bSpot == back.length){\r\n // put item from front array in\r\n array[i] = front[fSpot];\r\n fSpot++;\r\n }else if(front[fSpot] < back[bSpot]){\r\n // put front item in\r\n array[i] = front[fSpot];\r\n fSpot++;\r\n }else{\r\n // put back item in\r\n array[i] = back[bSpot];\r\n bSpot++;\r\n }\r\n }\r\n }", "@Test\n public void heapSort(){\n int[] array = {3, 9, 6, 5, 2, 8, 7};\n SortTestHelper.testSort(new QuickSort(), array);\n SortTestHelper.print(array);\n }", "private static void sort(int[] a) {\n shufle(a);\n // we use quicksort here because there's no need for stability\n sort(a, 0, a.length - 1);\n }", "@Test\n\tpublic void testSortNormalElements() {\n\t\tint[] arrayBeforeSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tint[] arrayAfterSort = { 565, 78, 34, 2, 23, 2222, 34 };\n\t\tArrayQuickSort.sort(arrayAfterSort);\n\t\tif (!isSorted(arrayBeforeSort, arrayAfterSort)) {\n\t\t\tAssert.fail(\"The array is not sorted!\");\n\t\t}\n\t}", "public void quickSort(Node node)\n {\n // Find last node\n Node head1 = lastNode(node);\n \n // Call the recursive QuickSort\n _quickSort(node,head1);\n }" ]
[ "0.77119356", "0.7422064", "0.72906995", "0.72903377", "0.7264028", "0.7233089", "0.72067374", "0.70948", "0.70808846", "0.7080852", "0.70578355", "0.7016374", "0.7015121", "0.69942725", "0.6985177", "0.6975996", "0.6974449", "0.6962425", "0.69552916", "0.69496053", "0.6902415", "0.6872818", "0.6856626", "0.6854962", "0.6848839", "0.68438494", "0.6836538", "0.6829488", "0.6805446", "0.6797328", "0.6795043", "0.6786489", "0.67708", "0.67686266", "0.67632", "0.6740359", "0.6725063", "0.6724958", "0.67240095", "0.6714927", "0.67133963", "0.670619", "0.66810995", "0.6673166", "0.66644", "0.6655849", "0.6650808", "0.66489637", "0.66296655", "0.6590056", "0.658359", "0.6557643", "0.6557536", "0.6556151", "0.6543454", "0.6542962", "0.65386707", "0.65371114", "0.65338516", "0.6519946", "0.65120757", "0.6482781", "0.64514196", "0.64457405", "0.6443297", "0.643791", "0.6430216", "0.64265203", "0.64225554", "0.6421345", "0.6418072", "0.6414478", "0.64120126", "0.6401097", "0.63878", "0.6370173", "0.6364282", "0.63606", "0.63585514", "0.63573086", "0.63438773", "0.6338173", "0.6332223", "0.6327867", "0.6319079", "0.63149405", "0.6307489", "0.6307489", "0.629734", "0.6291054", "0.6288613", "0.62771004", "0.6273274", "0.6273076", "0.6265383", "0.62640065", "0.6263872", "0.6255371", "0.62467295", "0.6245836" ]
0.6934469
20
swaps two elements of an array
private void swap(Comparable[] array, int toSwapOne, int toSwapTwo){ swaps++; Comparable storage = array[toSwapOne]; array[toSwapOne] = array[toSwapTwo]; array[toSwapTwo] = storage; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void swap(int[] arr, int a, int b) {\n int temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }", "private static void swap(int[] a, int x, int y) {\n\t\tint temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}", "private void swap(T[] arr, int a, int b) {\n T temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }", "private static void swap(int[] A, int i, int j) {\n int temp = A[i];\n A[i] = A[j];\n A[j] = temp;\n }", "private static void swap(int[] array, int first, int second) {\n int temp = array[first];\n array[first] = array[second];\n array[second] = temp;\n }", "private static void swap(Integer[] a, int x, int y) {\n\t\tInteger temp = a[x];\n\t\ta[x] = a[y];\n\t\ta[y] = temp;\n\t}", "private void swap(int[] a, int i, int j) {\n int tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n }", "private static <T> void swap(byte x[],T[] a2, int a, int b) {\n\t\tbyte t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static void swap(Object[] x, int a, int b)\n {\n Object t = x[a];\n x[a] = x[b];\n x[b] = t;\n }", "private static void swap(int[] A, int a, int b){\n\t\tint temp = A[a];\n\t\tA[a] = A[b];\n\t\tA[b] = temp;\n\t}", "private static void swap(int[] array, int ind1, int ind2) {\n int temp = array[ind1];\n array[ind1] = array[ind2];\n array[ind2] = temp;\n }", "private void swap(int []a, int i, int j){\n\t\tint temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}", "private static void swap(int x[], int[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static void swap(int[] array, int i, int j) {\n\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "private static void swap(double x[], double[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static void swap(int[] array, int index1, int index2) {\n int x = array[index1];\n array[index1] = array[index2];\n array[index2] = x;\n }", "public void swapAdjacentElements(int[] values)\n {\n // your work here\n\n\n\n\n }", "private static void swap(int[] arry , int a,int b) {\n int temp = arry[a];\n arry[a]=arry[b];\n arry[b]=temp;\n }", "private static void swap(int[] a, int i, int j) {\n int swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void swap(double x[], int[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "static void swap(int[] array, int i, int j) {\n if (i >= 0 && j >= 0 && i < array.length && j < array.length) {\n int tmp = array[i];\n array[i] = array[j];\n array[j] = tmp;\n }\n }", "public static void swap(int[] a, int x, int y) {\n int tmp = a[x];\n a[x] = a[y];\n a[y] = tmp;\n }", "private static <T> void swap(int x[], T[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private int[] swap(int[] a, int i, int j) {\n int tmp;\n tmp = a[i];\n a[i] = a[j];\n a[j] = tmp;\n return a;\n }", "void swap(int[] array, int i, int j) {\n\t\tint t = array[i];\n\t\tarray[i] = array[j];\n\t\tarray[j] = t;\n\t}", "private void swap(int[] a, int index1, int index2) {\n int temp = a[index1];\n a[index1] = a[index2];\n a[index2] = temp;\n }", "private static <T> void vecswap(byte x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private void swap(Comparable[] array, int pos1, int pos2) {\n\t\tComparable tmp = array[pos1];\n\t\tarray[pos1] = array[pos2];\n\t\tarray[pos2] = tmp;\n\t}", "private static void swap(int[] arr, int i, int j) {\n arr[i] = arr[j]^arr[i]^(arr[j] = arr[i]);\n }", "private static void vecswap(double x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static <T> void vecswap(int x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private static void vecswap(int x[], int[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private static <T> void swap(int x[], double[] a2, int a, int b) {\n\t\tint t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tdouble t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static <T,S> void swap(T x[], int[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tint t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static <T> void vecswap(char x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private static void swap(int[] array, int j, int i) {\r\n\t\tint temp = array[i];\r\n\t\tarray[i] = array[j];\r\n\t\tarray[j] = temp;\r\n\t}", "private static void vecswap(double x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static <T,P> void vecswap(T x[], P[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static void vecswap(char x[], char[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "public static void swap(int[] arr, int i, int j)\n {\n arr[i] = arr[i] ^ arr[j];\n arr[j] = arr[i] ^ arr[j];\n arr[i] = arr[i] ^ arr[j];\n }", "private static <T,P> void vecswap(T x[], int[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "protected static void swapReferences(List<?> array, int a, int b){\n Collections.swap(array, a, b);\n }", "private void swap(double x[], int a, int b) {\r\n double t = x[a];\r\n x[a] = x[b];\r\n x[b] = t;\r\n }", "private void swap(int one, int two)\r\n {\r\n//*** one->two\r\n long temp = a[two];\r\n a[one] = a[two];\r\n a[two] = temp;\r\n }", "private static <T,S> void swap(T x[], S[] a2, int a, int b) {\n\t\tT t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tS t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "public void swap(int i, int j) {\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }", "private void swap(int i, int j){\n \t\tint temp = a[i];\n \t\ta[i] = a[j];\n \t\ta[j] = temp;\n }", "public static void swap(int i, int j, int[] arr)\n {\n int temp=0;\n temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }", "private static int[] ArraySwapper(int[] arr) {\n\t\tint size=Array.getLength(arr),temp;\n\t\tfor(int i=0;i<size/2;i++) {\n\t\t\ttemp =arr[i];\n\t\t\tarr[i]=arr[size-i-1];\n\t\t\tarr[size-i-1]=temp;\n\t\t}\n\t\treturn arr;\n\t\t\n\t}", "public static void swap(int[] array, int i, int j)\n {\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "private static <T> void vecswap(float x[],T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private static void swap(char x[], char[] a2, int a, int b) {\n\t\tchar t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tchar t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static <T> void vecswap(double x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static void swap(int[] A, int i , int j){\r\n\t\tint temp = A[i];\r\n\t\tA[i] = A[j];\r\n\t\tA[j] = temp;\r\n\t}", "private void flipArray(T[] array) {\n int point1 = 0,point2 = array.length - 1;\r\n while (point1 < point2) {\r\n T t = array[point1];\r\n array[point1] = array[point2];\r\n array[point2] = t;\r\n point1++;\r\n point2--;\r\n }\r\n }", "private static <T> void swap(int a, int b, T[] arr) {\n T temp = arr[a];\n arr[a] = arr[b];\n arr[b] = temp;\n }", "public static void swap(int[] arr,int i,int j){\n int temp=arr[i];\n arr[i]=arr[j];\n arr[j]=temp;\n }", "private static <T> void swap(double x[], T[] a2, int a, int b) {\n\t\tdouble t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static <T> void swap(long x[], T[] a2, int a, int b) {\n\t\tlong t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static void exch(Object[] a, int i, int j) {\r\n Object swap = a[i];\r\n a[i] = a[j];\r\n a[j] = swap;\r\n }", "private void swap(int[] nums, int i, int j) {\n\t\tint tmp=nums[i];\n\t\tnums[i]=nums[j];\n\t\tnums[j]=tmp;\n\t}", "private static <T> void vecswap(int x[], double[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "private static void vecswap(int x[], int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a, b);\n\t}", "public static void swap(int[] a, int i, int j)\n {\n int temp = a[i];\n a[i] = a[j];\n a[j] = temp;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "private static void exch(Object[] a, int i, int j) {\n Object swap = a[i];\n a[i] = a[j];\n a[j] = swap;\n }", "public static void swap(int arr[], int i, int j){\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }", "private void swap(int[] nums, int i, int j) {\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }", "public void swapArrayElement(int elem1, int elem2) {\n int index1 = 0, index2 = 0, temp;\n for (int i = 1; i < myArray.length; i++) {\n if (myArray[i] == elem1)\n index1 = i;\n if (myArray[i] == elem2)\n index2 = i;\n }\n temp = myArray[index1];\n myArray[index1] = myArray[index2];\n myArray[index2] = temp;\n }", "private static void swap(char[] array, int a, int b) {\r\n // Swaps\r\n char temp = array[a];\r\n array[a] = array[b];\r\n array[b] = temp;\r\n }", "@Given(\"I swap values in array\")\n public void iSwapValuesInArray() {\n int[] numrs = {5, 2, 9, 7, 3};\n System.out.println(\"I have an array:\");\n for (int numr : numrs) {\n System.out.print(numr + \" \");\n }\n System.out.println(\" \");\n System.out.println(\"I swap the values: \");\n int temp = numrs[2];\n numrs[2] = numrs[4];\n numrs[4] = temp;\n for (int numr : numrs) {\n System.out.print(numr + \" \");\n }\n }", "public static void swap(int[] arr, int a, int b) {\n\t\tint temp = arr[a];\n\t\tarr[a] = arr[b];\n\t\tarr[b] = temp;\n\t}", "public static void swap (int[] elts, int i, int j) {\r\n\t\tint temp = elts[i];\r\n\t\telts[i] = elts[j];\r\n\t\telts[j] = temp;\r\n\t}", "public static void swap (int[] elts, int i, int j) {\r\n\t\tint temp = elts[i];\r\n\t\telts[i] = elts[j];\r\n\t\telts[j] = temp;\r\n\t}", "private static <T> void vecswap(short x[], T[] a2, int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x, a2, a, b);\n\t}", "public static void swap(int[] arr, int i, int j) {\r\n int temp = arr[i];\r\n arr[i] = arr[j];\r\n arr[j] = temp;\r\n }", "private static <T> void swap(char x[], T[] a2, int a, int b) {\n\t\tchar t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static <T> void vecswap(long x[], T[] a2,int a, int b, int n) {\n\t\tfor (int i=0; i<n; i++, a++, b++)\n\t\t\tswap(x,a2, a, b);\n\t}", "private static void swap(char[] arr,int i,int j){\n char temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "public static void swap(int[] a, int first, int second) {\r\n\r\n int c; // a catalyst variable used for the swap\r\n c = a[first]; //value of first item assigned to catalyst\r\n a[first] = a[second];//value of second item assigned to first\r\n a[second] = c; //value of catalyst assigned to second item\r\n }", "public static void swap2DArr(int a[][], int i, int j, int x, int y) {\n\t\tint temp = a[i][j];\n\t\ta[i][j] = a[x][y];\n\t\ta[x][y] = temp;\n\n\t}", "public static void swap(int[] array,int i, int j)\n {\n if( i==j)\n {\n return;\n }\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "private static <T> void swap(short x[], T[] a2, int a, int b) {\n\t\tshort t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static <T> void swap(float x[], T[] a2,int a, int b) {\n\t\tfloat t = x[a];\n\t\tx[a] = x[b];\n\t\tx[b] = t;\n\t\tT t2 = a2[a];\n\t\ta2[a] = a2[b];\n\t\ta2[b] = t2;\n\t}", "private static void swap(int[] nums, int i, int j) {\n nums[i] += nums[j];\n nums[j] = nums[i] - nums[j];\n nums[i] = nums[i] - nums[j];\n }", "public static void swap(int[] array, int i, int j) {\n if (i == j) {\n return;\n }\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }", "void swap(int index_1,int index_2){\n int temp=arr[index_1];\n arr[index_1]=arr[index_2];\n arr[index_2]=temp;\n }", "private void swap(int i, int j) {\n\t\tlong temp = a[i];\n\t\ta[i] = a[j];\n\t\ta[j] = temp;\n\t}", "private void swap(int[] values, int p1, int p2) {\n int temp = values[p1];\n values[p1] = values[p2];\n values[p2] = temp;\n moves++;\n }", "public static void swap(int arr[], int i, int j) {\n int tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n }", "static void swap(int[] A, int i, int j) {\n\t\tint temp = A[i];\n\t\tA[i] = A[j];\n\t\tA[j] = temp;\n\t}", "public static void swap(int[] array, int i, int j) {\n if (array == null || array.length == 0){\n return;\n }\n int temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\n }", "private void exchange(int i, int j){\n\t\tString temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n\t}", "@Override\n \tpublic void swap(int i, int j) {\n \t\tint t=data[i];\n \t\tdata[i]=data[j];\n \t\tdata[j]=t;\n \t}", "private void swapElement ( int p1, int p2 )\n\t{\n\t}", "public void swap(int[] nums, int i, int j) {\n int temp = nums[i];\n nums[i] = nums[j];\n nums[j] = temp;\n }", "public void swap( Ingredient array[], int first, int second ){\t\t\n\t\tIngredient hold; // temp variable\n\t\thold = array[ first ];\n\t\tarray[ first ] = array[ second ];\n\t\tarray[ second ] = hold;\n\t}", "public static void swap(int[] arr, int i, int j) {\n System.out.println(\"Swapping \" + arr[i] + \" and \" + arr[j]);\n int temp = arr[i];\n arr[i] = arr[j];\n arr[j] = temp;\n }", "private static void swap(int[] arr, int j) {\n\t\t\n\t\tint temp = arr[j];\n\t\tarr[j] = arr[j+1];\n\t\tarr[j+1] = temp;\n\t}" ]
[ "0.7805072", "0.7800578", "0.7792999", "0.7784474", "0.7779131", "0.77636075", "0.7743246", "0.77414584", "0.77319425", "0.7701348", "0.7697663", "0.7683197", "0.76812863", "0.76749575", "0.7658205", "0.7648946", "0.7631001", "0.76186997", "0.7607441", "0.7599201", "0.75899947", "0.75795686", "0.7578794", "0.75774765", "0.75604695", "0.75537854", "0.7537185", "0.7534992", "0.7521219", "0.75211644", "0.7513095", "0.7510151", "0.7509819", "0.7504996", "0.7500552", "0.74971485", "0.7490628", "0.7490536", "0.74881077", "0.74871075", "0.7477553", "0.74704796", "0.74701655", "0.74693984", "0.7458713", "0.7452293", "0.7440398", "0.74375296", "0.7434181", "0.7432839", "0.74318427", "0.7431785", "0.7428399", "0.74253356", "0.7423021", "0.7422824", "0.7414255", "0.74095523", "0.7404798", "0.74042964", "0.73961234", "0.7395564", "0.73924005", "0.7391388", "0.7385564", "0.7385564", "0.7385564", "0.73803675", "0.737535", "0.7372945", "0.7372716", "0.7360725", "0.7351841", "0.73496306", "0.73496306", "0.73488694", "0.7345257", "0.73433894", "0.7333012", "0.7329742", "0.73193634", "0.73176324", "0.73085046", "0.73057735", "0.73000777", "0.72971344", "0.72838455", "0.72809637", "0.7261487", "0.724826", "0.7239405", "0.72297126", "0.72296697", "0.7222411", "0.72050357", "0.7197978", "0.71798277", "0.717896", "0.7154589", "0.71527475" ]
0.7543996
26
TODO Autogenerated method stub
private void initView() { Button bt1 = (Button)findViewById(R.id.button1); bt1.setOnClickListener(this); Button bt2 = (Button)findViewById(R.id.button2); bt2.setOnClickListener(this); Button bt3 = (Button)findViewById(R.id.button3); bt3.setOnClickListener(this); Button bt4 = (Button)findViewById(R.id.button4); bt4.setOnClickListener(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg) { switch(arg.getId()) { // led 模式1 on case R.id.button1: new Thread(){ public void run() { String str = "06010000000D"; try { dos.writeUTF(str); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }; }.start(); break; // led 模式1 off case R.id.button2: new Thread(){ public void run() { String str = "06000000000D ";; try { dos.writeUTF(str); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }; }.start(); break; // led 模式二 on case R.id.button3: new Thread(){ public void run() { String str = "06020000000D"; try { dos.writeUTF(str); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }; }.start(); break; // led 模式二 Off case R.id.button4: new Thread(){ public void run() { String str = "06000000000D"; try { dos.writeUTF(str); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }; }.start(); break; } }
{ "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
recreating account upon processing
public void recreateAccount(int sin) { this.name=name; this.sin=sin; this.balance=this.balance; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createNewAccount() {\n\n // if user has not provided valid data, do not create an account and return from method\n if (!validateData()) {\n return;\n }\n\n // If flag value is false, that means email provided by user doesn't exists in database\n // so initialize the loader to create a new account\n if (!mEmailExistsFlag) {\n getLoaderManager().initLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n } else {\n // If flag is true, that means email provided by user already exists in database\n // so restart the loader and allow user to enter new email address for account\n getLoaderManager().restartLoader(CREATE_NEW_ACCOUNT_LOADER_ID, null, this);\n }\n\n }", "public void createUserAccount(UserAccount account);", "public void createAccount() {\n\t\tSystem.out.print(\"Enter Name: \");\n\t\tString name = nameCheck(sc.next());\n\t\tSystem.out.print(\"Enter Mobile No.: \");\n\t\tlong mobNo = mobCheck(sc.nextLong());\n\t\tlong accNo = mobNo - 1234;\n\t\tSystem.out.print(\"Enter Balance: \"); \n\t\tfloat balance = amountCheck(sc.nextFloat());\n\t\tuserBean BeanObjCreateAccountObj = new userBean(accNo, name, mobNo, balance);\n\t\tSystem.out.println(\"Account created with Account Number: \" +accNo);\n\t\tServiceObj.bankAccountCreate(BeanObjCreateAccountObj);\n\t\t\n\t\n\t}", "private void createAccount()\n {\n // check for blank or invalid inputs\n if (Utils.isEmpty(edtFullName))\n {\n edtFullName.setError(\"Please enter your full name.\");\n return;\n }\n\n if (Utils.isEmpty(edtEmail) || !Utils.isValidEmail(edtEmail.getText().toString()))\n {\n edtEmail.setError(\"Please enter a valid email.\");\n return;\n }\n\n if (Utils.isEmpty(edtPassword))\n {\n edtPassword.setError(\"Please enter a valid password.\");\n return;\n }\n\n // check for existing user\n AppDataBase database = AppDataBase.getAppDataBase(this);\n User user = database.userDao().findByEmail(edtEmail.getText().toString());\n\n if (user != null)\n {\n edtEmail.setError(\"Email already registered.\");\n return;\n }\n\n user = new User();\n user.setId(database.userDao().findMaxId() + 1);\n user.setFullName(edtFullName.getText().toString());\n user.setEmail(edtEmail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n\n database.userDao().insert(user);\n\n Intent intent = new Intent(this, LoginActivity.class);\n intent.putExtra(\"user\", user);\n startActivity(intent);\n }", "@Override\n public void run() {\n try {\n stringOrganizationIds.remove(defaultOrg);\n List<Integer> organizationIds = FluentIterable.from(stringOrganizationIds)\n .transform(Ints.stringConverter()).toList();\n\n newUser.setActive(false);\n UserProfileStruct savedUser = createAccountInternal(conn, newUser, password, resetQuestion,\n resetAnswer, givenName, surname, organizationId);\n for (Integer orgId : organizationIds) {\n Profile profile = new Profile();\n profile.setGivenName(givenName);\n profile.setSurname(surname);\n profile.setOrganizationId(orgId);\n profile.setUserId(savedUser.credentialedUser.getId());\n profile = profilePersister.createProfile(profile, conn);\n\n authService.grantAtLeast(profile.getId(), ROLE_READER, orgId);\n authService.grantAtLeast(orgId, ROLE_ADMIN, profile.getId());\n }\n\n User user = savedUser.credentialedUser.getUser();\n user.setActive(true);\n persistenceService.process(conn, new UserPersister.UpdateUserFunc(user));\n conn.commit();\n } catch (Exception e) {\n closeConnection(conn);\n }\n }", "public void createAccount() {\n System.out.println(\"Would you like to create a savings or checking account?\");\n String AccountRequest = input.next().toLowerCase().trim();\n createAccount(AccountRequest);\n\n }", "int createAccount(Account account);", "Account create();", "void updateAccount();", "public void createAccount(){\n System.out.println(\"vi skal starte \");\n }", "@Override\n\tpublic String createAccount() {\n\t\treturn \"Created Saving Account Sucessfully\";\n\t}", "public void createAccount() {\n\t\t// Assigns variables based on user input\n\t\tString username = usernameField.getText();\n\t\tString firstName = firstNameField.getText();\n\t\tString lastName = lastNameField.getText();\n\t\tString address = addressField.getText();\n\t\tString postCode = postcodeField.getText();\n\t\tString phoneNumber = phoneNumberField.getText();\n\t\tlong phoneNumberLong;\n\t\tif (username.isEmpty() || firstName.isEmpty() || lastName.isEmpty() || address.isEmpty() || postCode.isEmpty()\n\t\t\t\t|| phoneNumber.isEmpty()) { // Checks if number is correct format\n\n\t\t\tAlert alert = new Alert(AlertType.ERROR); // Error message\n\t\t\talert.setTitle(\"Error\");\n\n\t\t\talert.setHeaderText(\"Could not create an user\");\n\t\t\talert.setContentText(\"Make sure you fill all fields and press button again\");\n\t\t\talert.showAndWait();\n\n\t\t\treturn;\n\t\t}\n\n\t\telse {\n\t\t\ttry {\n\t\t\t\tphoneNumberLong = Long.parseLong(phoneNumber);\n\t\t\t} catch (Exception e) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"Wrong format of phone number\");\n\t\t\t\talert.setContentText(\"Please enter correct phone number\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tif(FileReader.exists(username)) {\n\t\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\t\talert.setTitle(\"Error\");\n\n\t\t\t\talert.setHeaderText(\"User with the username \"+ username +\" already exists. \");\n\t\t\t\talert.setContentText(\"Please choose another username\");\n\t\t\t\talert.showAndWait();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tString userdata = \"\";\n\t\t\tuserdata += \"\\n Username: \" + username;\n\t\t\tuserdata += \"\\n First name: \" + firstName;\n\t\t\tuserdata += \"\\n Last name: \" + lastName;\n\t\t\tuserdata += \"\\n Address: \" + address;\n\t\t\tuserdata += \"\\n Post code: \" + postCode;\n\t\t\tuserdata += \"\\n Phone number: \" + phoneNumberLong;\n\t\t\t\n\n\t\t\tif(custom) {\n\t\t\t\tavatarIndex = 101;\n\t\t\t\t// Gives users the custom avatar\n\t\t\t\tFile file1 = new File(\"artworkImages/\" + username);\n\t\t\t\tfile1.mkdir();\n\t\t\t\tPath path = Paths.get(\"customAvatars/\" + username + \".png\");\n\t\t\t\tString path1 = \"tmpImg.png\";\n\t\t\t\tFile file = new File(path1);\n\n\t\t\t\ttry {\n\t\t\t\t\tFiles.copy(file.toPath(), path, StandardCopyOption.REPLACE_EXISTING);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tUser user = new User(username, firstName, lastName, address, postCode, phoneNumberLong, avatarIndex);\n\t\t\tFileReader.addUser(user); // Creates user\n\n\t\t\ttry {\n\t\t\t\tWriter.writeUserFile(user); // Adds user to memory\n\t\t\t} catch (IOException e) {\n\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\n\t\t\tAlert alert = new Alert(AlertType.INFORMATION); // Success message\n\t\t\talert.setTitle(\"Success\");\n\n\t\t\talert.setHeaderText(\"The user has been created\");\n\t\t\talert.setContentText(\"Close this window to return to login screen\");\n\t\t\talert.showAndWait();\n\n\t\t\tcreateAccountButton.getScene().getWindow().hide();\n\t\t}\n\n\t}", "GenerateUserAccount () {\r\n }", "Account refresh();", "@Override\r\n\tpublic boolean create(Account newAccount) {\n\t\treturn daoref.create(newAccount);\r\n\t}", "private void initial(){\n storeAccount(\"201799990001030047\");\n }", "public void AddToAccountInfo();", "public void saveAccount() {\n\n }", "public abstract void createAccount(JSONObject account);", "@Test\n\tpublic void createAccount() {\t\n\t\t\n\t\tRediffOR.setCreateAccoutLinkClick();\n\t\tRediffOR.getFullNameTextField().sendKeys(\"Kim Smith\");\n\t\tRediffOR.getEmailIDTextField().sendKeys(\"Kim Smith\");\n\t\t\t\t\t\n\t\t\n\t}", "private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }", "@Override\n\tpublic void createAccount(Account p) {\n\t\t\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\t\n\t\t\tString deleteFromTable = \"DELETE FROM accounts WHERE owner_id='8'\";\n\t try (Connection conn = conUtil.getConnection();\n\t PreparedStatement pstmt = conn.prepareStatement(deleteFromTable)) {\n\n\t // set the corresponding param\n\t pstmt.setInt(1, p.getOwner_id());\n\t // execute the delete statement\n\t pstmt.executeUpdate();\n\n\t } catch (SQLException e) {\n\t System.out.println(e.getMessage());\n\t }\n\t\t\t\n\t\t\tString sql = \"insert into accounts( owner_id, balance ) values (?,?)\";\n\t\t\tCallableStatement cs = con.prepareCall(sql);\n\t\t\t\n\t\t\tcs.setInt(1, p.getOwner_id());\n\t\t\tcs.setDouble(2, p.getBalance());\n\t\t\t\n\t\t\tcs.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void handleAccountUpdateOnPre() {\n }", "void updateAccount(Account account);", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_INTERVAL/2);\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n syncNextPage(context, true);\n }", "public final void activateAccount() {\n\t\tthis.setIsAccountLocked(false);\n\t}", "int updateAccountInfo(Account account);", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "@Override\r\n\tpublic boolean createAccount(Account account) {\n\t\treturn dao.createAccount(account);\r\n\t}", "private void createAccountActivity() {\n // everything is converted to string\n String userName = createUserName.getText().toString().trim();\n String phoneNumber = createPhoneNumber.getText().toString().trim();\n String email = createEmail.getText().toString().trim();\n String password = createPassword.getText().toString().trim();\n\n\n // Validate that the entry should not be empty\n if (userName.isEmpty()) {\n createUserName.setError(\"It should not be empty. \");\n createUserName.requestFocus();\n return;\n }\n if (phoneNumber.isEmpty()) {\n createPhoneNumber.setError(\"It should not be empty. \");\n createPhoneNumber.requestFocus();\n return;\n }\n if (email.isEmpty()) {\n createEmail.setError(\"It should not be empty. \");\n createEmail.requestFocus();\n return;\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n createEmail.setError(\"Invalid email\");\n createEmail.requestFocus();\n return;\n }\n\n if (password.isEmpty()) {\n createPassword.setError(\"It should not be empty. \");\n createPassword.requestFocus();\n return;\n }\n\n // connect to the firebase\n auth.createUserWithEmailAndPassword(email, password).addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n String userID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n User user = new User(userName, phoneNumber, email, password, userID);\n // We will send everything in user to the firebase database\n FirebaseDatabase.getInstance()\n .getReference(\"User\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(RegisterUser.this, \"The account has been created successfully. \", Toast.LENGTH_LONG).show();\n finish(); //basically same as clicking back button\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n } else {\n Toast.makeText(RegisterUser.this, \"The account creation failed!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "private void CreateNewAccount(final String phone, final String password, final String name) {\n if (TextUtils.isEmpty(phone)){\n Toast.makeText(this,\"Please enter your phone number ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(password)){\n Toast.makeText(this,\"Please enter your phone password ...\",Toast.LENGTH_SHORT).show();\n }\n else if(TextUtils.isEmpty(name)){\n Toast.makeText(this,\"Please enter your phone name ...\",Toast.LENGTH_SHORT).show();\n }\n else{\n //start creating account\n LoadingBar.show();\n\n final DatabaseReference mRef;\n mRef = FirebaseDatabase.getInstance().getReference();\n mRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n if (!(snapshot.child(\"Users\").child(phone).exists())){\n //if user not exist then we create account in database\n HashMap<String,Object> userdata = new HashMap<>();\n userdata.put(\"phone\",phone);\n userdata.put(\"password\",password);\n userdata.put(\"name\",name);\n mRef.child(\"Users\").child(phone).updateChildren(userdata)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Registration Successful\",Toast.LENGTH_SHORT).show();\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"Please try again after sometime ....\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n else{\n LoadingBar.dismiss();\n Toast.makeText(RegisterActivity.this,\"User with this number already exist ....\",Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n }\n }", "public void addAccount() {\n\t\t\n\t\ttry {\n\t\t\tlog.log(Level.INFO, \"Please enter name\");\n String custName = scan.next();\n validate.checkName(custName);\n \t\tlog.log(Level.INFO, \"Select Account Type: \\n 1 for Savings \\n 2 for Current \\n 3 for FD \\n 4 for DEMAT\");\n\t\t\tint bankAccType = Integer.parseInt(scan.next());\n\t\t\tvalidate.checkAccType(bankAccType);\n\t\t\tlog.log(Level.INFO, \"Please Enter your Aadar Card Number\");\n\t\t\tString aadarNumber = scan.next();\n\t\t\tlog.log(Level.INFO, \"Please Enter Phone Number: \");\n\t\t\tString custMobileNo = scan.next();\n\t\t\tvalidate.checkPhoneNum(custMobileNo);\n\t\t\tlog.log(Level.INFO, \"Please Enter Customer Email Id: \");\n\t\t\tString custEmail = scan.next();\n\t\t\tvalidate.checkEmail(custEmail);\n\t\t\tbankop.add(accountNumber, custName, bankAccType, custMobileNo, custEmail, aadarNumber);\n\t\t\taccountNumber();\n\t\t\n\t\t} catch (AccountDetailsException message) {\n\t\t\tlog.log(Level.INFO, message.getMessage()); \n }\n\n\t}", "UserAccount createUserAccount(User user, double amount);", "public static void requestNewAccount(String uid){\n accountManager.requestNewAccount(uid);\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n ScoreSyncAdapter.configurePeriodicSync(context);\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "public void startAccountUpdater() {\n\t}", "public void onClickcreateUserSignup(View view){\n\n String newName = ((EditText)findViewById(R.id.createUserUsername)).getText().toString();\n if(!newName.equals(\"\")) {\n Account.getInstance().setName(newName);\n\n SharedPreferences settings = getSharedPreferences(Utils.ACCOUNT_PREFS, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putString(\"accountName\", newName);\n editor.commit();\n\n startActivity(new Intent(this, MainActivity.class));\n }\n }", "private static void onAccountCreated(Account newAccount, Context context) {\n MovieSyncAdapter.configurePeriodicSync(context, SYNC_INTERVAL, SYNC_FLEXTIME);\n\n /*\n * Without calling setSyncAutomatically, our periodic sync will not be enabled.\n */\n ContentResolver.setSyncAutomatically(newAccount, context.getString(R.string.content_authority), true);\n\n /*\n * Finally, let's do a sync to get things started\n */\n syncImmediately(context);\n }", "void reinstate() {\n\t\tisSuspended = false;\n\t\tSystem.out.println(\"Reinstate account successfully.\");\n\t}", "@Override\n public void onSuccess(final Account account) {\n userid = account.getId();\n user = getApplicationContext().getSharedPreferences(\"USER_INFO\", Context.MODE_PRIVATE);\n editor = user.edit();\n editor.clear();\n editor.putString(\"ID\", userid);\n editor.commit();\n\n }", "Account apply();", "void addNewAccountToFile(Account newAccount);", "@Override\r\n\tpublic void NroAccount() {\n\t\t\r\n\t}", "@TargetApi(Build.VERSION_CODES.FROYO)\n public static void createSyncAccount(Context context) {\n boolean newAccount = false;\n boolean setupComplete = PreferenceManager\n .getDefaultSharedPreferences(context).getBoolean(PREF_SETUP_COMPLETE, false);\n\n // Create account, if it's missing. (Either first run, or user has deleted account.)\n Account account = acccountBuilder(context);\n AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);\n if (accountManager.addAccountExplicitly(account, null, null)) {\n // Inform the system that this account supports sync\n ContentResolver.setIsSyncable(account, CONTENT_AUTHORITY, 1);\n // Inform the system that this account is eligible for auto sync when the network is up\n ContentResolver.setSyncAutomatically(account, CONTENT_AUTHORITY, true);\n // Recommend a schedule for automatic synchronization. The system may modify this based\n // on other scheduled syncs and network utilization.\n ContentResolver.addPeriodicSync(account, CONTENT_AUTHORITY, new Bundle(), SYNC_FREQUENCY);\n newAccount = true;\n }\n\n if (newAccount) {\n AccountUtils.setActiveAccount(context, account.name);\n }\n\n // Schedule an initial sync if we detect problems with either our account or our local\n // data has been deleted. (Note that it's possible to clear app data WITHOUT affecting\n // the account list, so wee need to check both.)\n if (newAccount || !setupComplete) {\n requestManualSync(account);\n PreferenceManager.getDefaultSharedPreferences(context).edit()\n .putBoolean(PREF_SETUP_COMPLETE, true).commit();\n }\n }", "public static void createAccount()throws IOException{\n\t\ttry{\n\t\t\tFile accountInfo = new File(\"account.txt\");\n\t\t\tFile Information = new File(\"information.txt\");\n\t\t\tArrayList<String> temp = new ArrayList<String>();\n\t\t\tArrayList<String> info = new ArrayList<String>();\n\t\t\tScanner inputFromInformation = new Scanner(Information);\n\t\t\tScanner inputFromAccount = new Scanner(accountInfo);\n\t\t\twhile (inputFromAccount.hasNextLine()){\n\t\t\t\ttemp.add(inputFromAccount.nextLine());\n\t\t\t}\n\t\t\tScanner input = new Scanner(System.in);\n\t\t\t// This is where we will start the new account process\n\t\t\t// first by telling us who you are.\n\t\t\tSystem.out.println(\"Enter your First Name\");\n\t\t\tString firstName = input.next();\n\t\t\t\n\t\t\tSystem.out.println(\"Enter your Last Name\");\n\t\t\tString lastName = input.next();\n\t\t\t// This will give the user recommended\n\t\t\t// user names if they cannot think of one.\n\t\t\tRecommendedUserNames(firstName,lastName);\n\t\t\t// here they will be prompt to enter their preferred user name\n\t\t\tSystem.out.println(\"Enter your preferred username\");\n\t\t\tString UserName = input.next();\n\t\t\t// This will prompt the user for a password\n\t\t\t// The password will have to meet these requirements\n\t\t\tSystem.out.println(\"Your password should meet the following requirements:\");\n\t\t\tSystem.out.println(\"-It must have at least eight characters.\\n-It must consist of only letters and digits.\"\n\t\t\t\t\t\t\t+ \"\\n-It must contain more than two digits and two characters.\");\n\t\t\tSystem.out.println(\"\\nEnter your new Password\");\n\t\t\tString Password = input.next();\n\t\t\t\n\t\t\t// this is what will verify the user password and see if it meets the recommended requirements\n\t\t\t// for security reasons of course.\n\t\t\tString Pass;\n\n\t\t\tboolean check=false;\n\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\twhile(!check){\n\t\t\t\tSystem.out.println(\"Please recheck the password requirement and try again.\");\n\t\t\t\tPassword = input.next();\n\t\t\t\tif(validigits(Password)&&letter_digit_check(Password))check=true;\n\t\t\t}\n\t\t\tdo{\n\t\t\t\tSystem.out.println(\"\\nPlease re-enter the Password\");\n\t\t\t\tPass = input.next();\n\t\t\t\tif(!Pass.equals(Password))System.out.println(\"Passwords do not match!\");\n\t\t\t}while(!Pass.equals(Password));\n\t\t\tboolean CreateAccount = true;\n\t\t\tSystem.out.println(\"You need to fill the information for completion of your account registration\");\n\t\t\teditInfo(UserName,CreateAccount);\n\t\t\tPrintWriter output = new PrintWriter(accountInfo);\n\t\t\ttemp.add(UserName+\" \"+Password);\n\t\t\tfor (int i=0; i<temp.size(); i++){\n\t\t\t\toutput.println(temp.get(i));\n\t\t\t}\n\t\t\toutput.close();\n\t\t\tSystem.out.println(\"Your account has been created and your information has been saved\"\n\t\t\t\t\t+ \"\\nYou have been logged out for this session\\n\");\n\t\t\tstarter();\n\t\t}\n\t\tcatch (java.io.IOException ex){\n\t\t\tSystem.out.println(\"I/O Errors: File is not found\");\n\t\t}\t\n\t}", "@Override\n public void createNewAccount(String accountType) {\n FragmentTransaction fragmentTransaction = getSupportFragmentManager().beginTransaction();\n fragmentTransaction.replace(R.id.create_container, new CreateAccount().newInstance(accountType)).commit();\n }", "public abstract void createAccount(final GDataAccount account)\n throws ServiceException;", "String addAccount(UserInfo userInfo);", "@PostMapping(\"/createAccount\")\r\n\tpublic String valNewAccount(@ModelAttribute(value=\"account\") @Valid Accounts account, BindingResult bindingResultAccount, @ModelAttribute(value=\"client\") @Valid Client client, BindingResult bindingResultClient, @ModelAttribute(value=\"user\") @Valid Users user, BindingResult bindingResultUser, Accounts acc, Transactions welcomeBalance, Model model) {\n\t\tif(bindingResultUser.hasErrors() || bindingResultClient.hasErrors() || (userDB.getUserEmailByEmail(user.getEmail()) != null && user.getEmail().equals(userDB.getUserEmailByEmail(user.getEmail()))) || (clientDB.getClientSINBySIN(client.getSin()) != null && client.getSin().intValue() == clientDB.getClientSINBySIN(client.getSin()).intValue()) ) {\r\n\t\t\tif((userDB.getUserEmailByEmail(user.getEmail()) != null) && (user.getEmail().equals(userDB.getUserEmailByEmail(user.getEmail())))) {\r\n\t\t\t\tmodel.addAttribute(\"user_message\",\"You already have an account. Login with \" + user.getEmail() + \" to view your account.\");\r\n\t\t\t}\r\n\t\t\tif((clientDB.getClientSINBySIN(client.getSin()) != null && client.getSin() != null) && (client.getSin().intValue() == clientDB.getClientSINBySIN(client.getSin()).intValue())) {\r\n\t\t\t\tmodel.addAttribute(\"user_message_two\",\"The SIN number you entered is already registered with another account.\");\r\n\t\t\t}\r\n\t\t\treturn \"/user/open.html\";\r\n\t\t}else {\r\n\t\t\t/*Process New Account*/\r\n\t\t\tDate today = new Date();\r\n\t\t\tclientDB.save(client);\r\n\t\t\tSystem.out.println(\"Processed Client - Saved\");\r\n\t\t\t\r\n\t\t\tuser.setClientID(clientDB.getClient(client.getId()).getId());\r\n\t\t\tuser.setJoinDate(\"2019-12-08\");\r\n\t\t\tuserDB.save(user);\r\n\t\t\tSystem.out.println(\"Processed Users - Saved\");\r\n\t\t\t\r\n\t\t\tacc.setClientID(clientDB.getClient(client.getId()).getId());\r\n\t\t\tacc.setBalance(500.00);\r\n\t\t\tacc.setOpenDate(today.toString());\r\n\t\t\taccountDB.save(acc);\r\n\t\t\tSystem.out.println(\"Processed Accounts - Saved\");\r\n\t\t\t\r\n\t\t\twelcomeBalance.setClient(clientDB.getClient(client.getId()).getId());\r\n\t\t\twelcomeBalance.setAccount(accountDB.getAccount(acc.getAccNum(), client.getId()).getAccNum());\r\n\t\t\twelcomeBalance.setType(\"Debit\");\r\n\t\t\twelcomeBalance.setMemo(\"Welcome to Pocket\");\r\n\t\t\twelcomeBalance.setPostDate(today.toString());\r\n\t\t\twelcomeBalance.setProcessDate(today.toString());\r\n\t\t\twelcomeBalance.setAmount(500.00);\r\n\t\t\ttransactionDB.save(welcomeBalance);\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"Processed Transactions\");\r\n\t\t\treturn \"/user/accountCreated.html\";\r\n\t\t}\r\n\t}", "public void createAccount(Account account) \n\t\t\tthrows SQLException, RegisterAccountDBException {\n\t\t\n\t\tString msg =\"Could not create account\";\n\t\tint updateRows=0;\n\t\t\n\t\ttry {\n\t\t\t//if(!accountExist(account.getPersonnr())) {\n\t\t\tif(getStudentInfo(account.getPersonnr())==null) {\n\t\t\tString personnr = account.getPersonnr();\n\t\t\tcreateAccountStmt.setString(1, personnr);\n\t\t updateRows = createAccountStmt.executeUpdate();\n\t\t if(updateRows!=1) {\n\t\t \thandleException(msg, null);\n\t\t }\n\t\t\tconnection.commit();\n\t\t }\n\t\t}catch (SQLException ex) {\n\t\t\thandleException(msg , ex);\t\n\t\t}\n\t}", "public void switchToCreateAccount() {\r\n\t\tlayout.show(this, \"createPane\");\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}", "@Override\n\tpublic void updateAccount(String pwd, String field, String company) {\n\t}", "void openAccount(String name, String address, String cnic, int contact_no, int age, String email_address,\r\n int noOfAccounts, String incomeSource, String AccountType, String securityquestion) {\n\r\n if (bankPolicy.isEligibilityCriteriaFulfilled(age)) {// is customer eligible\r\n System.out.println(\"Criteria fulfilled\");\r\n\r\n boolean newCustomer = isItANewCustomer(cnic);\r\n\r\n if (newCustomer) {// is customer new\r\n Customer C = new Customer(Integer.toString(customers.size() + 1), cnic, name, address, contact_no,\r\n email_address, incomeSource, securityquestion);\r\n // Print and ASK FOR SECURITY QUESTION\r\n System.out.println(\"Its a new Customer\");\r\n System.out.println(\"Password: \" + C.credentials.password);\r\n // add customer to arraylist\r\n customers.add(C);\r\n // save new customer to database\r\n record.SaveCustomer(C);\r\n // save customer credentials to database\r\n record.SaveCredentials(C.credentials, C.customerID);\r\n\r\n }\r\n int index = -1;\r\n for (int i = 0; i < customers.size(); i++) {\r\n if (customers.get(i).CNIC.equals(cnic))\r\n index = i;\r\n }\r\n\r\n Account A = new Account(String.valueOf(accounts.size() + 1), getDateFormat(), AccountType,\r\n \"Pending\", customers.get(index).customerID);\r\n // add account to customer\r\n accounts.add(A);\r\n customers.get(index).customerAccount.add(A);\r\n // save account to database\r\n record.SaveAccount(A);\r\n }\r\n\r\n }", "@Override\n public Employee process(Employee employee) throws Exception {\n try {\n if (employee.getId() % 13 == 0) {\n throw new Exception(\"unable to create account for employee with id \" + employee.getId());\n }\n employee.setUserId(\"userId\" + employee.getId());\n } catch (Exception e) {\n // otherwise the job halts!\n LOG.error(\"error \", e);\n }\n return employee;\n }", "@Override\n\tpublic void createSavingAccount(Account as) {\n\t\ttry {\n\t\t\tConnection con = conUtil.getConnection();\n\t\t\t//To use our functions/procedure we need to turn off autocommit\n\t\t\tcon.setAutoCommit(false);\n\t\t\tString saving = \"insert into savings( owner_id, balance) values (?,?)\";\n\t\t\tCallableStatement chaccount = con.prepareCall(saving);\n\t\t\n\t\t\tchaccount.setInt(1,as.getOwner_id() );\n\t\t\tchaccount.setDouble(2, as.getBalance());\n\t\t\tchaccount.execute();\n\t\t\t\n\t\t\tcon.setAutoCommit(true);\n\t\t\t\n\t\t} catch(SQLException e) {\n\t\t\t\n\t\t\tSystem.out.println(\"In CheckingDaoDB Exception\");\n\t\t\te.printStackTrace();\n\t\t}\n}", "public Account createAccount(Account account){\n\t\t\n\t\taccount.createdDate = new Date();\n\t\taccount.isActive = true;\n\t\t\n\t\t\n\t\taccount.person = personService.createPerson(account.person);\n\t\taccount.person.personSettings = personalSettingsService.createSettings(account.person.personSettings);\n\t\t\n\t\t\n\t\treturn account;\n\t}", "@FXML\r\n void createAccount(MouseEvent event) throws SQLException {\r\n ta_employeeAccount.clear();\r\n account();\r\n\r\n }", "@Override\r\n\tpublic boolean createAccount(Account account) throws Exception {\n\t\tboolean flag = false;\r\n\t\ttry {\r\n\t\t\tflag = this.dao.createAccount(account);\r\n\t\t}catch(Exception e) {\r\n\t\t\tthrow e;\r\n\t\t}finally {\r\n\t\t\tthis.dbc.close();\r\n\t\t}\r\n\t\treturn flag;\r\n\t}", "private void createAccount(String username, String passphrase, String email) {\n\tif (!AccountManager.getUniqueInstance().candidateUsernameExists(username)) {\n\t try {\n\t\tAccountManager.getUniqueInstance().createCandidateAccount(username, \n\t\t\t\t\t\t\t\t\t passphrase, \n\t\t\t\t\t\t\t\t\t email);\n\t } catch (Exception e) {\n\t\tthrow new RuntimeException(\"creation failed\");\n\t }\n\t} else {\n\t throw new RuntimeException(\"username already exists\");\n\t}\n }", "@Override\n public void onClick(View v) {\n CreateAccount();\n }", "boolean refillUserAccount(User user, double delta);", "void accountSet(boolean admin, String username, String password, String fName, String lName, int accountId);", "protected void finishLogin() {\n\t\tLog.i(TAG, \"finishLogin()\");\n\t\tfinal Account account = new Account(data.getmHost(), Constants.ACCOUNT_TYPE);\n\n\t\tif (data.ismRequestNewAccount()) {\n\t\t\tBundle userData = new Bundle();\n\t\t\tuserData.putString(Constants.PARAM_USERNAME, data.getmUsername());\n\t\t\tuserData.putString(Constants.PARAM_PORT, data.getmPort() + \"\");\n\t\t\tuserData.putString(Constants.PARAM_HOST, data.getmHost());\n\t\t\tuserData.putString(Constants.PARAM_ENCRYPTION, data.getmEncryption() + \"\");\n\t\t\tuserData.putString(Constants.PARAM_SEARCHFILTER, data.getmSearchFilter());\n\t\t\tuserData.putString(Constants.PARAM_BASEDN, data.getmBaseDN());\n\t\t\t// Mappings for LDAP data\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.FIRSTNAME, data.getmFirstName());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.LASTNAME, data.getmLastName());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.TELEPHONE, data.getmOfficePhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.MOBILE, data.getmCellPhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.HOMEPHONE, data.getmHomePhone());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.MAIL, data.getmEmail());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.PHOTO, data.getmImage());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.STREET, data.getmStreet());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.CITY, data.getmCity());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.ZIP, data.getmZip());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.STATE, data.getmState());\n\t\t\tuserData.putString(Constants.PARAM_MAPPING + Contact.COUNTRY, data.getmCountry());\n\t\t\tdata.getmAccountManager().addAccountExplicitly(account, data.getmPassword(), userData);\n\n\t\t\t// Set contacts sync for this account.\n\t\t\tContentResolver.setSyncAutomatically(account, ContactsContract.AUTHORITY, true);\n\t\t\tContactManager.makeGroupVisible(account.name, getContentResolver());\n\t\t} else {\n\t\t\tdata.getmAccountManager().setPassword(account, data.getmPassword());\n\t\t}\n\t\tfinal Intent intent = new Intent();\n\t\tdata.setmAuthtoken(data.getmPassword());\n\t\tintent.putExtra(AccountManager.KEY_ACCOUNT_NAME, account.name);\n\t\tintent.putExtra(AccountManager.KEY_ACCOUNT_TYPE, Constants.ACCOUNT_TYPE);\n\t\tif (data.getmAuthtokenType() != null && data.getmAuthtokenType().equals(Constants.AUTHTOKEN_TYPE)) {\n\t\t\tintent.putExtra(AccountManager.KEY_AUTHTOKEN, data.getmAuthtoken());\n\t\t}\n\t\tsetAccountAuthenticatorResult(intent.getExtras());\n\t\tsetResult(RESULT_OK, intent);\n\t\tfinish();\n\t}", "void save(Account account);", "public int makeNewAccount(int balance){\n int generated_id = 0;\n\n try {\n accountLock.lock();\n executeNewAccount(generated_id = currentAccountId++, balance, rawDataSource.getConnection());\n accountLock.unlock();\n\n cache.add(new Account(generated_id, balance));\n\n operationLock.lock();\n logNewAccount(currentOperationId, generated_id, balance);\n currentOperationId++;\n operationLock.unlock();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n\n return generated_id;\n }", "@Override\n\tpublic boolean addAccount(Account account) {\n\t\taccount.setStatus(-1);\n\t\t//String passwd = new UU\n\t\treturn accountDAO.addAccount(account);\n\t}", "public void addAccount(Account account,Person person);", "public LandingPage registerNewAccount(){\n\t\taction.WaitForWebElement(linkRegisterNewAccount)\n\t\t\t .Click(linkRegisterNewAccount);\n\t\treturn this;\n\t}", "private boolean requestNewAccount() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() > 0) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username already exists\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuserTasks = new ServerAPITask();\n\t\t\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/create/\" + uName);\n\t\t\t\t\n\t\t\t\tString createResp = userTasks.execute(\"\").get();\n\t\t\t\tLog.e(\"Create Response\", createResp);\n\t\t\t\tJSONObject cObj = new JSONObject(createResp);\n\t\t\t\t\n\t\t\t\tString success = cObj.getString(\"success\");\n\t\t\t\tif (success.equals(\"false\")) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"The username already exists\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\telse if (success.equals(\"true\")) {\t\t\t\t\t\n\t\t\t\t\tuserTasks = new ServerAPITask();\n\t\t\t\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\t\t\t\t\n\t\t\t\t\tcreateResp = userTasks.execute(\"\").get();\n\t\t\t\t\tLog.e(\"Get User ID\", createResp);\n\t\t\t\t\t\n\t\t\t\t\tjsonResponse = new JSONArray(createResp);\n\t\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\t\t\n\t\t\t\t\tif (jsObj == null) {\n\t\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn true;\n\t}", "public void onCreateAccountPressed(View view) {\n\n\n mUserName = mEditTextUsernameCreate.getText().toString();\n mUserEmail = mEditTextEmailCreate.getText().toString().toLowerCase();\n mPassword = mEditTextPasswordCreate.getText().toString();\n\n /**\n * Check that email and user name are okay\n */\n boolean validEmail = isEmailValid(mUserEmail);\n boolean validUserName = isUserNameValid(mUserName);\n boolean validPassword = isPasswordValid(mPassword);\n if (!validEmail || !validUserName || !validPassword) return;\n /**\n * If everything was valid show the progress dialog to indicate that\n * account creation has started\n */\n mAuthProgressDialog.show();\n\n\n // [START create_user_with_email]\n mAuth.createUserWithEmailAndPassword(mUserEmail, mPassword)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LOG_TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n // If sign in fails, display a message to the user. If sign in succeeds\n // the auth state listener will be notified and logic to handle the\n // signed in user can be handled in the listener.\n if (!task.isSuccessful()) {\n Toast.makeText(CreateAccountActivity.this, R.string.auth_failed,\n Toast.LENGTH_SHORT).show();//error message\n //showErrorToast(\"createUserWithEmail : \"+task.isSuccessful());\n }\n\n // [START_EXCLUDE]\n mAuthProgressDialog.dismiss();\n Intent intent = new Intent(CreateAccountActivity.this, LoginActivity.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n startActivity(intent);\n finish();\n // [END_EXCLUDE]\n //end\n }\n });\n // [END create_user_with_email]\n\n\n\n /**\n * Create new user with specified email and password\n */\n /*mFirebaseRef.createUser(mUserEmail, mPassword, new Firebase.ValueResultHandler<Map<String, Object>>() {\n @Override\n public void onSuccess(Map<String, Object> result) {\n Dismiss the progress dialog\n mAuthProgressDialog.dismiss();\n Log.i(LOG_TAG, getString(R.string.log_message_auth_successful));\n }\n\n @Override\n public void onError(FirebaseError firebaseError) {\n *//* Error occurred, log the error and dismiss the progress dialog *//*\n Log.d(LOG_TAG, getString(R.string.log_error_occurred) +\n firebaseError);\n mAuthProgressDialog.dismiss();\n *//* Display the appropriate error message *//*\n if (firebaseError.getCode() == FirebaseError.EMAIL_TAKEN) {\n mEditTextEmailCreate.setError(getString(R.string.error_email_taken));\n } else {\n showErrorToast(firebaseError.getMessage());\n }\n\n }\n });*/\n }", "private void charge_up() throws GB_Exception {\n try{\n if(PersonalDataController.getInstance().existRegistry(username)){\n putPersonalInformation();\n }else{\n putDefaultInformation();\n }\n } catch (SQLException | IOException ex) {\n LOG.error(ex);\n throw new GB_Exception(\"Error al carga informacion de usuario. Comuniquese con su administrador.\");\n }\n }", "public SavingAccount()\n\t\t{\n\t\t\tsuper();\n\t\t}", "void setAccountName(String newName) {\n this.accountName = newName;\n }", "Account.Update update();", "int insert(TmpUserPayAccount record);", "private void createPassenger() {\n account = new Account(\"driver\", \"password\", \"driver@uclive.ac.nz\",\n \"Dan\", \"20 Howard Street\", 1234567, 64278182123L);\n }", "@Override\n public boolean createAccount(String fullName, String username, String password, String email){\n // will change this if we make some errors.\n if(!usernameToPerson.containsKey(username)) { // check that there is not someone with that username\n Organizer og = new Organizer(fullName, username, password, email);\n updateUsernameToPerson(og.getUsername(), og); // see below\n idToPerson.put(og.getID(), og);\n return true;\n }\n\n return false;\n\n }", "@Override\n public void onClick(View v) {\n Phone = RegisterPhone.getText().toString();\n Password = RegisterPassword.getText().toString();\n Name = RegisterName.getText().toString();\n\n\n CreateNewAccount(Phone,Password,Name);\n }", "@PostMapping(\"/account\")\n Account updateOrCreateAccount(@RequestBody @Valid AccountRequest accountRequest) {\n if (accountRequest.getUserId() == null) {\n ensureAdminAccess();\n // create account\n // validate password\n if (StringUtils.hasText(accountRequest.getPassword())) {\n throw new IllegalArgumentException(\"Account password must be present.\");\n }\n // validate username\n if (accountRepository.existsByUsername(accountRequest.getUsername())) {\n throw new IllegalArgumentException(\"Account already exists.\");\n }\n // build account\n Account account = new Account();\n account.setUsername(accountRequest.getUsername());\n account.setPassword(accountRequest.getPassword());\n account.setAdmin(false);\n accountRepository.save(account);\n return account;\n } else {\n Account currentAccount = SecurityContextHolder.getContext().getAccount();\n // update account\n boolean isAdmin = currentAccount.isAdmin();\n if (!currentAccount.getId().equals(accountRequest.getUserId()) && !isAdmin) {\n throw new IllegalStateException(\"Permission denied.\");\n }\n // update account\n if (isAdmin && currentAccount.getId().equals(accountRequest.getUserId())) {\n // if admin want to update himself/herself\n throw new IllegalArgumentException(\"Do not try to update adminself.\");\n }\n // update username\n Account updatingAccount = accountRepository.getById(accountRequest.getUserId());\n if (StringUtils.hasText(accountRequest.getUsername()) && !accountRequest.getUsername().equals(updatingAccount.getUsername())) {\n // validate username\n if (accountRepository.existsByUsername(accountRequest.getUsername())) {\n throw new IllegalArgumentException(\"Account already exists.\");\n }\n }\n // update account\n updatingAccount.setUsername(accountRequest.getUsername());\n return accountRepository.save(updatingAccount);\n }\n }", "@Override\n public void createOnlineAccount(String name, \n String ssn, String id, String psw)\n {\n final String url = \n \"jdbc:mysql://mis-sql.uhcl.edu/<username>?useSSL=false\";\n \n Connection connection = null;\n Statement statement = null;\n ResultSet resultSet = null;\n \n try\n {\n \n //connect to the databse\n connection = DriverManager.getConnection(url, \n db_id, db_password);\n connection.setAutoCommit(false);\n //crate the statement\n statement = connection.createStatement();\n \n //do a query\n resultSet = statement.executeQuery(\"Select * from onlineAccount \"\n + \"where id = '\" + id + \"' or ssn = '\"\n + ssn + \"'\");\n \n if(resultSet.next())\n {\n //either the ssn is used or the id is used\n System.out.println(\"Account creation failed\");\n }\n else\n {\n //insert a record into onlineAccount\n int r = statement.executeUpdate(\"insert into onlineAccount values\"\n + \"('\" + name + \"', '\" + id + \"', '\" + ssn + \"', '\"\n + psw +\"')\");\n System.out.println(\"Account creation successful!\");\n System.out.println();\n }\n connection.commit();\n connection.setAutoCommit(true);\n \n }\n catch (SQLException e)\n {\n System.out.println(\"Something wrong during the creation process!\");\n e.printStackTrace();\n }\n finally\n {\n //close the database\n try\n {\n resultSet.close();\n statement.close();\n connection.close();\n }\n catch(Exception e)\n {\n e.printStackTrace();\n }\n }\n \n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();\n //delete user just created\n user.delete();\n //prompt user to create account\n Toast.makeText(MainActivity.this, \"No Email Exist \", Toast.LENGTH_SHORT).show();\n Toast.makeText(MainActivity.this, \"Create New Account \", Toast.LENGTH_SHORT).show();\n } else {\n // if failed, email already exist and move on to verify passoword\n //Toast.makeText(MainActivity.this, \"Loggin In\", Toast.LENGTH_SHORT).show();\n sentReset(finalInputUsername);\n }\n }", "public void testUpdateAccount(){\n\t\tint id = 10 ;\n\t\tAccount acc = this.bean.findAccountById(id ) ;\n\t\tacc.setDatetime(CommUtil.getNowDate()) ;\n\t\tint r = this.bean.updateAccount(acc) ;\n\t\tAssert.assertEquals(r, 1) ;\n\t}", "public JavaaccountModel postaccount(JavaaccountModel oJavaaccountModel){\n\n \t/* Create a new hibernate session and begin the transaction*/\n Session hibernateSession = HibernateUtil.getSessionFactory().openSession();\n Transaction hibernateTransaction = hibernateSession.beginTransaction();\n\n /* Insert the new account to database*/\n int accountId = (Integer) hibernateSession.save(oJavaaccountModel);\n\n /* Commit and terminate the session*/\n hibernateTransaction.commit();\n hibernateSession.close();\n\n /* Return the JavaaccountModel with updated accountId*/\n oJavaaccountModel.setaccountId(accountId);\n return oJavaaccountModel;\n }", "boolean save(Account account);", "private void signUpNewUserToDB(){\n dbAuthentication.createUserWithEmailAndPassword(this.newUser.getEmail(), this.newUser.getPassword())\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n /**signUp success, will update realTime DB ant firebase Authentication*/\n FirebaseUser currentUser = dbAuthentication.getCurrentUser();\n addToRealDB(currentUser.getUid());\n /**will send verification email to the user from Firebase Authentication*/\n currentUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n }\n });\n }else{isBadEmail = true;}\n }\n });\n }", "@Override\n\tpublic Account createAccount(Account account) {\n\t\tif(account != null) {\n\t\t\taccountList.add(account);\n\t\t\treturn account;\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public void createAccount(String accountType, double balance){\r\n // check what is the type of the account being created\r\n /* update the list each time an account is being created and then put it into the hashtable. Then increase the\r\n counter do this for each of the following accounts each time an account is created*/\r\n switch (accountType){\r\n case \"1\":\r\n credits[creditCounter]= new CreditCardAccount(balance);\r\n allAccounts.replace(\"CreditCard\",credits);\r\n creditCounter++;\r\n break;\r\n case \"2\":\r\n lineOfCredits[lineOfCreditCounter] = new LineOfCreditAccount(balance);\r\n allAccounts.replace(\"LineOfCredit\",lineOfCredits);\r\n lineOfCreditCounter++;\r\n break;\r\n case \"3\":\r\n chequing[chequingCounter] = new ChequingAccount(balance);\r\n allAccounts.replace(\"Chequing\",chequing);\r\n chequingCounter++;\r\n break;\r\n case \"4\":\r\n saving[savingCounter] = new SavingsAccount(balance);\r\n allAccounts.replace(\"Saving\",saving);\r\n savingCounter++;\r\n break;\r\n default:\r\n System.out.println(\"ERROR IN CREATE ACCOUNT\");\r\n break;\r\n }\r\n }", "private void createAccounts(){\r\n for(int i = 0; i < accountInTotal; i++){\r\n try {\r\n Account tempAccount = new Account(startingBonds);\r\n theAccounts.add(tempAccount);\r\n } catch(Exception e){\r\n System.err.println(\"Error\");\r\n }\r\n }\r\n }", "public void createAccount(String acctId, String pass, String cardNo, String email) {\n accountId = acctId;\n password = pass;\n cardNumber = cardNo;\n customerEmail = email;\n \n try {\n //conect to database\n Class.forName(\"com.mysql.jdbc.Driver\");\n con = DriverManager.getConnection(\"jdbc:mysql://localhost:3306/make_order_request\", \"root\", \"admin\");\n Statement mystmt = con.createStatement();\n\n //write SQL query to update code in database\n String query = \"INSERT INTO customer_account(account_id, password, card_no, customer_email) VALUES (?,?,?,?)\";\n PreparedStatement ps = con.prepareStatement(query);\n ps.setString(1, accountId);\n ps.setString(2, password);\n ps.setInt(3, Integer.parseInt(cardNumber));\n ps.setString(4, customerEmail);\n\n ps.executeUpdate();\n\n return;\n\n } catch (Exception e) {\n e.printStackTrace();\n \n }\n\n }", "public boolean makeNewAccount(String name, BigDecimal balance, int type)\n throws SQLException, ConnectionFailedException, DatabaseInsertException {\n if (currentCustomerAuthenticated && currentUserAuthenticated) {\n int id = DatabaseInsertHelper.insertAccount(name, balance, type);\n EnumMapRolesAndAccounts map = new EnumMapRolesAndAccounts();\n map.createEnumMap();\n // find out what account type the account is and create and add that account to the customer\n if (type == map.accountTypes.get(AccountTypes.CHEQUING)) {\n ChequingAccount chequing = new ChequingAccountImpl(id, name, balance);\n currentCustomer.addAccount(chequing);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.SAVINGS)) {\n SavingsAccount savings = new SavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(savings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.TFSA)) {\n TFSA tfsa = new TFSAImpl(id, name, balance);\n currentCustomer.addAccount(tfsa);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n } else if (type == map.accountTypes.get(AccountTypes.RESTRICTEDSAVING)) {\n RestrictedSavingsAccount rsavings = new RestrictedSavingsAccountImpl(id, name, balance);\n currentCustomer.addAccount(rsavings);\n DatabaseInsertHelper.insertUserAccount(currentCustomer.getId(), id);\n System.out.println(\"Account ID - \" + id);\n return true;\n }\n return false;\n }\n System.out.println(\"reached here\");\n throw new ConnectionFailedException();\n }", "private void updateAccountStatus() {\n\r\n }", "@Override\n\tpublic void createAccount(String username, Bank bank) {\n\t\ttry {\n\t\tAccount newAccount = new Account(username, bank.getBankID(), bank.getNumOfAccounts()+1);\n\t\tbank.setNumOfAccounts(bank.getNumOfAccounts()+1);\n\t\taddAccount(bank, newAccount);\n\t\t}catch(NullPointerException e) {\n\t\t\tSystem.out.println(\"Could not find bank\");\n\t\t}\n\t\t\n\t}", "private void addAccount(Account account)\n\t {\n\t\t if(accountExists(account)) return;\n\t\t \n\t\t ContentValues values = new ContentValues();\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_USERNAME, account.getUsername());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_BALANCE, account.getBalance());\n\t\t values.put(DatabaseContract.AccountContract.COLUMN_NAME_AUTH_TOKEN, account.getAuthenticationToken());\n\t\t \n\t\t db.insert(DatabaseContract.AccountContract.TABLE_NAME,\n\t\t\t\t null,\n\t\t\t\t values);\n\t\t \n\t }", "@Override\n public void insertAccount() throws Exception {\n\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n try {\n Account account = new Account(APPKEY, APPSECRET);\n accounts.add(account);\n int mc = JOptionPane.WARNING_MESSAGE;\n if (!accountDispName.getText().contains(account.screenName)) {\n accountDispName.setText(accountDispName.getText() + account.screenName + \"\\n\");\n accountDispName.setOpaque(true);\n statusDisplay.setText(statusDisplay.getText() + \"active\\n\");\n if (!accountDisplayNameHeader.isVisible())\n accountDisplayNameHeader.setVisible(true);\n if (!accountStatusHeader.isVisible())\n accountStatusHeader.setVisible(true);\n if (!accountDispName.isVisible())\n accountDispName.setVisible(true);\n if (!statusDisplay.isVisible())\n statusDisplay.setVisible(true);\n //f1.validate();\n account.persistAccount();\n JOptionPane.showMessageDialog(null, \"Account Added Successfully!!\", \"Success!!\", mc);\n nAccounts++;\n } else {\n JOptionPane.showMessageDialog(null, \"Account Already Exists\", \"Duplicate!!\", mc);\n }\n } catch (Exception e1) {\n int mc = JOptionPane.WARNING_MESSAGE;\n JOptionPane.showMessageDialog(null, \"Unable To Add Account!\", \"Error\", mc);\n e1.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.\n }\n }", "@Override\n\tpublic int upAccount(AccountUser au) {\n\t\tau.setName(au.getUsername());\n\t\tau.setStatus(1);\n\t\tau.setSalt(CommTool.getSalt());\n\t\tau.setPwd(\"666666\");\n\t\tau.setPwd(PasswordUtil.generate(au.getPwd(), au.getSalt()));\n\t\treturn auMapper.upAccount(au);\n\t}", "@Test\n public void createDuplicateAccount() {\n final String username1 = \"william@shakespeare.com\";\n final String username2 = \"william@shakespeare.net\";\n final String username3 = \"william@shakespeare.org\";\n final String firstname = \"william\";\n final String lastname = \"shakespeare\";\n final String address = \"@iaeste.org\";\n\n final CreateUserRequest request1 = new CreateUserRequest(username1, firstname, lastname);\n final CreateUserResponse response1 = administration.createUser(token, request1);\n assertThat(response1, is(not(nullValue())));\n assertThat(response1.isOk(), is(true));\n assertThat(response1.getUser(), is(not(nullValue())));\n assertThat(response1.getUser().getAlias(), is(firstname + '.' + lastname + address));\n\n final CreateUserRequest request2 = new CreateUserRequest(username2, firstname, lastname);\n final CreateUserResponse response2 = administration.createUser(token, request2);\n assertThat(response2, is(not(nullValue())));\n assertThat(response2.isOk(), is(true));\n assertThat(response2.getUser(), is(not(nullValue())));\n assertThat(response2.getUser().getAlias(), is(firstname + '.' + lastname + 2 + address));\n\n final CreateUserRequest request3 = new CreateUserRequest(username3, firstname, lastname);\n final CreateUserResponse response3 = administration.createUser(token, request3);\n assertThat(response3, is(not(nullValue())));\n assertThat(response3.isOk(), is(true));\n assertThat(response3.getUser(), is(not(nullValue())));\n assertThat(response3.getUser().getAlias(), is(firstname + '.' + lastname + 3 + address));\n }", "@Generated(hash = 121514453)\n public synchronized void resetAccounts() {\n accounts = null;\n }", "private void attemptCreation() {\n newFlat.setAddressLine1(\"\");\n newFlat.setPostcode(\"\");\n newFlat.setNotes(\"\");\n newFlat.setFlatNum(\"\");\n newFlat.setTenant(\"\");\n\n // Reset errors\n actvProperty.setError(null);\n etFlatNum.setError(null);\n etFlatNotes.setError(null);\n flatTenant.setError(null);\n\n boolean cancel = false;\n View focusView = null;\n\n // Check for valid address, if the user entered one\n if (TextUtils.isEmpty(actvProperty.getText().toString())) {\n actvProperty.setError(\"This field is required\");\n cancel = true;\n focusView = actvProperty;\n } else if (!isAddressValid(actvProperty.getText().toString())) {\n actvProperty.setError(\"This address is invalid\");\n cancel = true;\n focusView = actvProperty;\n }\n\n // Check for a valid flat number, if the user entered one\n if (TextUtils.isEmpty(etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This field is required\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n } else if (!isFlatNumValid(\"Flat \" + etFlatNum.getText().toString())) {\n etFlatNum.setError(\"This flat number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = etFlatNum;\n }\n\n Collections.sort(flatNums);\n\n new AlertDialog.Builder(this)\n .setIcon(android.R.drawable.ic_dialog_alert)\n .setTitle(\"Warning\")\n .setMessage(\"These flats already exist in \" + actvProperty.getText().toString()\n + \":\\n\\n\" + flatNums.toString() + \"\\n\\nPlease enter a unique number.\")\n .setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n })\n .show();\n }\n\n // Check for valid tenant, if the user entered one\n if (TextUtils.isEmpty(flatTenant.getText().toString())) {\n // No need to add a tenant\n } else if (!isTenantValid(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant does not exist in the system\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n } else if (!isTenantFree(flatTenant.getText().toString())) {\n flatTenant.setError(\"This tenant number is in use\");\n cancel = true;\n if (focusView == null) {\n focusView = flatTenant;\n }\n }\n\n // Check for notes and add default notes if null\n if (TextUtils.isEmpty(etFlatNotes.getText().toString())) {\n etFlatNotes.setText(\"No notes yet. That's okay, you can add some later..\");\n }\n\n if (cancel) {\n // There was an error; don't attempt creation and focus the first\n // form field with an error.\n focusView.requestFocus();\n } else {\n // Show a progress spinner, and kick off a background task to\n // perform the user login attempt.\n inputMethodManager.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0);\n saveNewFlat();\n }\n }", "private void createAccount(User user) throws IOException {\n File accounts = new File(\"accounts.txt\");\n if (!accounts.exists()) {\n accounts.createNewFile();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(accounts, true);\n BufferedWriter bufferedWriter = new BufferedWriter(new OutputStreamWriter(fileOutputStream));\n\n bufferedWriter.write(user.getUserName() + \":\" + user.getUserPass());\n bufferedWriter.newLine();\n bufferedWriter.flush();\n }" ]
[ "0.73406446", "0.69840986", "0.68615764", "0.68273014", "0.67409754", "0.6653499", "0.66412085", "0.6625383", "0.66118103", "0.653763", "0.6470673", "0.64346194", "0.6378047", "0.63563246", "0.6339601", "0.6299146", "0.6282566", "0.6270799", "0.62701756", "0.6256204", "0.62472284", "0.6230596", "0.6230109", "0.62119377", "0.61700237", "0.6169177", "0.61655974", "0.6162242", "0.61547846", "0.6129859", "0.6121888", "0.6119313", "0.60908973", "0.6086706", "0.60843015", "0.60794365", "0.6078216", "0.607633", "0.6049422", "0.60453016", "0.60426426", "0.60297585", "0.6004578", "0.600287", "0.6000905", "0.5993808", "0.59853786", "0.5971244", "0.59565794", "0.59553945", "0.5951075", "0.5949277", "0.5948263", "0.5929936", "0.5928422", "0.5917062", "0.5916678", "0.59144104", "0.59109974", "0.59037066", "0.5903465", "0.59027547", "0.5896903", "0.5874026", "0.5867533", "0.58655834", "0.5861535", "0.5861082", "0.5860918", "0.5859039", "0.5855318", "0.58551043", "0.58482647", "0.58474344", "0.5847012", "0.5834276", "0.5830675", "0.5829452", "0.5823875", "0.58138025", "0.581042", "0.5809105", "0.5808927", "0.5808357", "0.5807862", "0.58065915", "0.5796956", "0.57955384", "0.5793421", "0.5788157", "0.57826924", "0.576596", "0.57579756", "0.5755286", "0.5754956", "0.5748762", "0.574804", "0.5747324", "0.5738743", "0.5735505" ]
0.65118396
10
Adds an image to the incoming object, with different images depending on which direction the object is pointing at
public Image(String path) { this.south = loadImage(path + "-South" + ".png"); this.north = loadImage(path + "-North" + ".png"); this.west = loadImage(path + "-West" + ".png"); this.east = loadImage(path + "-East" + ".png"); currentImage = north; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Builder addImage(ImageObject value);", "public void addImage(Image img, int x, int y) {\n\n\t}", "Person addImage(String name, String imagePath);", "public GameObject addObject(String imageName, int x, int y, boolean updateID) {\n\t\tMovementParameters myMove = new MovementParameters(\n\t\t\t\tmyObjectStatsPanel.getMovementName(),\n\t\t\t\tmyObjectStatsPanel.getMovementDuration()\n\t\t\t\t\t\t* MOVEMENT_DURATION_SCALING_CONSTANT,\n\t\t\t\tmyObjectStatsPanel.getMovementSpeed());\n\t\tUninstantiatedGameObject newObject = new UninstantiatedGameObject(\n\t\t\t\tmyObjectStatsPanel.getObjectName(), new JGPoint(x, y),\n\t\t\t\tmyObjectStatsPanel.getCollisionID(), imageName, myMove,\n\t\t\t\tmyObjectStatsPanel.getFloating(),\n\t\t\t\tmyObjectStatsPanel.getScreenFollow(), objectID,\n\t\t\t\tmyObjectStatsPanel.getHitPoints());\n\t\tnewObject.setMovementName(myObjectStatsPanel.getMovementName());\n\t\tobjectID++;\n\t\taddObjectsToLevel(newObject);\n\t\treturn newObject.instantiate(updateID);\n\t}", "public void updateImage(GameObject.Direction direction) {\n switch (direction) {\n case NORTH:\n currentImage = north;\n break;\n\n case SOUTH:\n currentImage = south;\n break;\n\n case WEST:\n currentImage = west;\n break;\n\n case EAST:\n currentImage = east;\n break;\n }\n }", "public void drawImage(Graphics gameImage){\n AffineTransform currRotation = AffineTransform.getTranslateInstance(x, y);\n currRotation.rotate(Math.toRadians(angle),this.objectImg.getWidth() / 2.0, this.objectImg.getHeight() /2.0);\n Graphics2D currImage = (Graphics2D) gameImage;\n currImage.drawImage(this.objectImg, currRotation, null);\n\n if(drawHitBox){\n gameImage.setColor(Color.GREEN);\n gameImage.drawRect(x,y,this.objectImg.getWidth(),this.objectImg.getHeight());\n }\n }", "Builder addImage(ImageObject.Builder value);", "public void changeDirection(int image){\n this.image = image; \n }", "public void place() {\n\t\tprocessing.image(Image, x, y);\n\t}", "private Image addImageToGameObject(Class gameObject, double width, double height) {\n InputStream inputStream;\n imageWidth = 64;\n imageHeight = 64;\n if (gameObject.equals(Asteroid.class)) {\n inputStream = getClass().getClassLoader().getResourceAsStream(mediumAsteroidFilePath);\n assert inputStream != null;\n image = new Image(inputStream);\n if (width > 32) {\n imageWidth = 100;\n imageHeight = 100;\n }\n } else if (gameObject.equals(HealthPowerUp.class)) {\n inputStream = getClass().getClassLoader().getResourceAsStream(shieldFilePath);\n assert inputStream != null;\n image = new Image(inputStream);\n } else if (gameObject.equals(ShieldPowerUp.class)) {\n inputStream = getClass().getClassLoader().getResourceAsStream(hpFilePath);\n assert inputStream != null;\n image = new Image(inputStream);\n } else if (gameObject.equals(Spaceship.class)) {\n inputStream = getClass().getClassLoader().getResourceAsStream(spaceshipImageName);\n assert inputStream != null;\n image = new Image(inputStream);\n } else if (gameObject.equals(SlowDebuff.class)) {\n imageWidth = 32;\n imageHeight = 32;\n inputStream = getClass().getClassLoader().getResourceAsStream(timeDebuffPath);\n assert inputStream != null;\n image = new Image(inputStream);\n } else if (gameObject.equals(LaserBeam.class)) {\n laserGUI.setIsVertical(width < height);\n image = laserGUI.getFrame(animationTime);\n imageWidth = image.getWidth();\n imageHeight = image.getHeight();\n }\n return image;\n }", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif(directY != 0){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\tif(lastDirectX == 1){\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t\t}else{\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(isMove){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 1) * 150, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 4)* 150, 150, 150, 150);\n\t\t\t}\n\t\t}else{\n\t\t\tif(lastDirectX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),0, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 150, 150, 150);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgc.drawImage(hanzoBody, x-55, y-50);\n\t\tgc.drawImage(hanzoLeg, x-55, y-50);\n\t\t//gc.drawImage(hanzoFX, x-55, y-50);\n\t\t\n\t}", "public void addImg(){\n // Add other bg images\n Image board = new Image(\"sample/img/board.jpg\");\n ImageView boardImg = new ImageView();\n boardImg.setImage(board);\n boardImg.setFitHeight((tileSize* dimension)+ (tileSize*2) );\n boardImg.setFitWidth( (tileSize* dimension)+ (tileSize*2) );\n\n Tile infoTile = new Tile(getTileSize(), getTileSize()*7);\n infoTile.setTranslateX(getTileSize()*3);\n infoTile.setTranslateY(getTileSize()*6);\n\n tileGroup.getChildren().addAll(boardImg, infoTile);\n\n }", "public <I extends Image<?, I>> I add(I in1, I in2) {\n\t\tCLQueue queue = context.createDefaultQueue();\n\t\t\n\t\tCLImage2D clin1 = CLImageConversion.convert(context, in1);\n\t\tCLImage2D clin2 = CLImageConversion.convert(context, in2);\n\t\tCLImage2D clout = context.createImage2D(CLMem.Usage.Output, clin1.getFormat(), clin1.getWidth(), clin1.getHeight());\n\t\t\n\t\tCLEvent evt = process(addImage, queue, clin1, clin2, clout);\n\t\t\n\t\tI out = CLImageConversion.convert(queue, evt, clout, in1.newInstance(in1.getWidth(), in1.getHeight()));\n\t\t\n\t\tclin1.release();\n\t\tclin2.release();\n\t\tclout.release();\n\t\tqueue.release();\n\t\t\n\t\treturn out;\n\t}", "public Objects(String image){\n\t\tthis.face = new Image(\"file:res/\" + image);\n\t\tthis.MoveSpeed = 6;\n\t}", "public void drawImage(ImageResource imageResource, float destinationX, float destinationY);", "private void setImage(){\n if(objects.size() <= 0)\n return;\n\n IImage img = objects.get(0).getImgClass();\n boolean different = false;\n \n //check for different images.\n for(IDataObject object : objects){\n IImage i = object.getImgClass();\n \n if((img == null && i != null) || \n (img != null && i == null)){\n different = true;\n break;\n }else if (img != null && i != null){ \n \n if(!i.getName().equals(img.getName()) ||\n !i.getDir().equals(img.getDir())){\n different = true;\n break;\n }\n } \n }\n \n if(!different){\n image.setText(BUNDLE.getString(\"NoImage\"));\n if(img != null){\n imgName = img.getName();\n imgDir = img.getDir();\n image.setImage(img.getImage());\n }else{\n image.setImage(null);\n }\n }else{\n image.setText(BUNDLE.getString(\"DifferentImages\"));\n }\n \n image.repaint();\n }", "public void addPng(ImageView png){\n vertexImages.add(png);\n }", "@Override\n protected void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawImage(image, 1, 0, null); \n g.drawImage(player, 1, 0, null); \n \n }", "public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"location\") {\n //add the new picture for the location type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }else if(this.type == \"picture\") {\n //add the new picture for the picture type\n Bitmap bitmap = BitmapFactory.decodeResource(res, R.drawable.generic_new);\n imgView.setImageBitmap(bitmap);\n }\n }", "public void createImage() {\n\t\tBufferedImage crab1ststep = null;\n\t\tBufferedImage crab2ndstep = null;\n\t\tBufferedImage crabhalf = null;\n\t\tBufferedImage crabfull = null;\n\t\tBufferedImage eye6 = null;\n\t\tBufferedImage eye5 = null;\n\t\tBufferedImage eye4 = null;\n\t\tBufferedImage eye3 = null;\n\t\tBufferedImage eye2 = null;\n\t\tBufferedImage eye1 = null;\n\t\tBufferedImage eyeClosed = null;\n\t\ttry {\n\t\t crabImage = ImageIO.read(new File(\"src/images/crab.png\"));\n\t\t crab1ststep = ImageIO.read(new File(\"src/images/crab1ststep.png\"));\n\t\t crab2ndstep = ImageIO.read(new File(\"src/images/crab2ndstep.png\"));\n\t\t crabhalf = ImageIO.read(new File(\"src/images/crabhalf.png\"));\n\t\t crabfull = ImageIO.read(new File(\"src/images/crabfull.png\"));\n\t\t crabWin = ImageIO.read(new File(\"src/images/crabwin.png\"));\n\t\t crabLose = ImageIO.read(new File(\"src/images/crablose.png\"));\n\t\t eye6 = ImageIO.read(new File(\"src/images/crab_eye6.png\"));\n\t\t eye5 = ImageIO.read(new File(\"src/images/crab_eye5.png\"));\n\t\t eye4 = ImageIO.read(new File(\"src/images/crab_eye4.png\"));\n\t\t eye3 = ImageIO.read(new File(\"src/images/crab_eye3.png\"));\n\t\t eye2 = ImageIO.read(new File(\"src/images/crab_eye2.png\"));\n\t\t eye1 = ImageIO.read(new File(\"src/images/crab_eye1.png\"));\n\t\t eyeClosed = ImageIO.read(new File(\"src/images/eyes_closed.png\"));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"bad\");\n\t\t}\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n\t\tcrabAni.add(crab1ststep);\n//\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n\t\tcrabAni.add(crabImage);\n//\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\tcrabAni.add(crab2ndstep);\n\t\t\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabImage);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabhalf);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\tcrabAni2.add(crabfull);\n\t\t\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n\t\tblink.add(eyeClosed);\n//\t\tblink.add(eye1);\n//\t\tblink.add(eye1);\n\t\tblink.add(eye2);\n\t\tblink.add(eye2);\n//\t\tblink.add(eye3);\n//\t\tblink.add(eye3);\n\t\tblink.add(eye4);\n\t\tblink.add(eye4);\n//\t\tblink.add(eye5);\n//\t\tblink.add(eye5);\n\t\tblink.add(eye6);\n\t\tblink.add(eye6);\n\t}", "private static void addShaped()\n {}", "public void act() \n {\n setImage(\"1up.png\");\n setImage(\"acrate.png\");\n setImage(\"Betacactus.png\");\n setImage(\"bullet1.png\");\n setImage(\"bullet2.png\");\n setImage(\"burst.png\");\n setImage(\"cowboy.png\");\n setImage(\"fOxen1.png\");\n setImage(\"fOxen2.png\");\n setImage(\"fOxen3.png\");\n setImage(\"fOxen4.png\");\n setImage(\"fOxenH.png\");\n setImage(\"fWagon1.png\");\n setImage(\"fWagon2.png\");\n setImage(\"fWagon3.png\");\n setImage(\"fWagon4.png\");\n setImage(\"fWagonH.png\");\n setImage(\"health.png\");\n setImage(\"indian.png\");\n setImage(\"normal.png\");\n setImage(\"oxen.png\");\n setImage(\"oxen2.png\");\n setImage(\"oxen3.png\");\n setImage(\"oxen4.png\");\n setImage(\"oxen-hit.png\");\n setImage(\"plasma.png\");\n setImage(\"rapid.png\");\n setImage(\"snake1.png\");\n setImage(\"snake2.png\");\n setImage(\"snake3.png\");\n setImage(\"snake4.png\");\n setImage(\"spread.png\");\n setImage(\"theif.png\");\n setImage(\"train1.png\");\n setImage(\"train-hit.png\");\n setImage(\"wagon.png\");\n setImage(\"wagonhit.png\");\n setImage(\"wave.png\");\n getWorld().removeObject(this);\n }", "public void addImage(Image image) {\n\t\tlist.add(image);\n\n\t}", "public void createImageSet() {\n\t\t\n\t\t\n\t\tString image_folder = getLevelImagePatternFolder();\n \n String resource = \"0.png\";\n ImageIcon ii = new ImageIcon(this.getClass().getResource(image_folder + resource));\n images.put(\"navigable\", ii.getImage());\n\n\t}", "@Override\n public void addLovePhoto(User user, Image image) {\n user.addLoveImage(image);\n }", "@Override\n public Action update() {\n // draws the image \"image\" at position \"this.x\" and \"this.y\" and then returns null\n Thing.getProcessing().image(this.image, this.x, this.y);\n return null;\n }", "public void drawImage(ImageResource imageResource, float destinationX, float destinationY, float destinationWidth, float destinationHeight,\n float sourceX, float sourceY, float sourceWidth, float sourceHeight);", "public void updateImage(ColorImage newImage) {\n currentImage.push(newImage);\n }", "public abstract void addArrowObject(ShortPoint2D attackedPos, ShortPoint2D shooterPos, byte shooterPlayerId, float hitStrength);", "public void addObject(final PhysicalObject obj) {\n \t\tmyScene.addChild(obj.getGroup());\n \t\tmyObjects.add(obj);\n \t}", "protected void addedToWorld(World world) \n {\n createImages();\n }", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "private void drawImage(){\n Integer resourceId = imageId.get(this.name);\n if (resourceId != null) {\n drawAbstract(resourceId);\n } else {\n drawNone();\n }\n }", "public void render() { image.drawFromTopLeft(getX(), getY()); }", "void setImage(Layer layer, Image image);", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "@SuppressWarnings({\"AndroidApiChecker\", \"FutureReturnValueIgnored\"})\n // setImage is used to place an animated file.\n // setImage takes arguments image, and augmentedImageIndex, which is used to index the list of renderables.\n public void setImage(AugmentedImage image, Integer augmentedImageIndex) {\n this.augmentedImage = image;\n\n if (!currentRenderable.isDone()) {\n CompletableFuture.allOf(currentRenderable)\n // in the case that more than one renderable is used to create a scene,\n // use CompletableFuture.allOf(currentRenderable, other renderables needed for the scene)\n .thenAccept((Void aVoid) -> setImage(image, augmentedImageIndex))\n .exceptionally(\n throwable -> {\n Log.e(TAG, \"Exception loading\", throwable);\n return null;\n });\n }\n\n // Set the anchor based on the center of the image.\n setAnchor(image.createAnchor(image.getCenterPose()));\n\n\n // creates the node\n // in the case that there is more than one renderable in the scene, run the code again, replacing\n // currentRenderable with the other renderables\n\n Node fullnode;\n\n fullnode = new Node();\n fullnode.setParent(this);\n fullnode.setWorldPosition(new Vector3((this.getWorldPosition().x + (nodePosition[augmentedImageIndex].x)), (this.getWorldPosition().y + (nodePosition[augmentedImageIndex].y)), (this.getWorldPosition().z + (nodePosition[augmentedImageIndex].z))));\n fullnode.setLocalScale(new Vector3(0.1f, 0.1f, 0.1f));\n Quaternion newQuaternion = Quaternion.axisAngle(new Vector3(nodeRotation[augmentedImageIndex].x, nodeRotation[augmentedImageIndex].y, nodeRotation[augmentedImageIndex].z), nodeRotation[augmentedImageIndex].q);\n fullnode.setLocalRotation(Quaternion.multiply(fullnode.getLocalRotation(), newQuaternion));\n fullnode.setRenderable(currentRenderable.getNow(null));\n\n }", "public void addIcon(Direction dir, Color clr){\r\n\t\t \r\n\t\t Graphics2D g = bufferedImage.createGraphics();\r\n\t\t BufferedImage imgPiece;\r\n\t\t File fileImg = new File(\"src/main/java/data/smallfollower_0.png\");\r\n\t \t try {\r\n\t\t\timgPiece = ImageIO.read(fileImg);\r\n\r\n\t\t\t Graphics2D g1 = imgPiece.createGraphics();\t\r\n\t\t\t for (int x = 0; x < imgPiece.getWidth(); x++) {\r\n\t\t\t\t for (int y = 0; y < imgPiece.getHeight(); y++) {\r\n\t\t\t\t\t int color = imgPiece.getRGB(x,y);\r\n\t\t\t\t\t if(color == -65281){\r\n\t\t\t\t\t\t g1.setColor(clr);\r\n\t\t\t\t\t\t g1.fillRect(x,y,1,1);\r\n\t\t\t\t\t }\r\n\t\t\t\t }\r\n\t\t\t }\r\n\t\t g.drawImage(imgPiece, getX(dir), getY(dir), 20, 20, null);\r\n\t\t }\r\n\t\t catch (IOException e) {\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t }", "public Sprite(Texture newImage){\n\t\timages = new Texture[1];\n\t\timages[0] = newImage;\n\t}", "public <I extends Image<?, I>> I add(I in1, float[] amt) {\n\t\tCLQueue queue = context.createDefaultQueue();\n\t\t\n\t\tCLImage2D clin1 = CLImageConversion.convert(context, in1);\n\t\tCLImage2D clout = context.createImage2D(CLMem.Usage.Output, clin1.getFormat(), clin1.getWidth(), clin1.getHeight());\n\t\t\n\t\tCLEvent evt = process(addImage, queue, clin1, amt, clout);\n\t\t\n\t\tI out = CLImageConversion.convert(queue, evt, clout, in1.newInstance(in1.getWidth(), in1.getHeight()));\n\t\t\n\t\tclin1.release();\n\t\tclout.release();\n\t\tqueue.release();\n\t\t\n\t\treturn out;\n\t}", "public void add(Image img, Point higher, Point lower, int size) {\n int column = jumpCursor();\n set(img, cl, column, higher, lower, size);\n }", "public void imageSwap() {\n GreenfootImage image = (movement.dx < 1) ? leftImage : rightImage;\n setImage(image);\n }", "public abstract BufferedImage applyTo(BufferedImage image);", "protected void setSprite(Image i){\n sprites = new HashMap<Facing,Image>();\n sprites.put(Facing.RIGHT, i);\n sprites.put(Facing.LEFT , i.getFlippedCopy(true, false));\n }", "public void drawImage(ImageResource imageResource, float destinationX, float destinationY, float destinationWidth, float destinationHeight);", "public void updateImage() {\n Graphics2D g = img.createGraphics();\n for (Circle gene : genes) {\n gene.paint(g);\n }\n g.dispose();\n }", "public void addGraphicObject(GraphicObject obj)\n {\n graphicObjects.addLast(obj);\n }", "private void loadShipImage() {\r\n\t\tshipImageView = Ship.getImage();\r\n\t\tshipImageView.setX(ship.getCurrentLocation().x * scalingFactor);\r\n\t\tshipImageView.setY(ship.getCurrentLocation().y * scalingFactor);\r\n\r\n\t\troot.getChildren().add(shipImageView);\r\n\r\n\t}", "ElementImage createElementImage();", "public void addSprite(String state, BufferedImage[] images) {\n // checkValidState(state);\n this.sprites.put(state, images);\n }", "private void createImage()\n {\n GreenfootImage image = new GreenfootImage(width, height);\n setImage(\"Player.png\");\n }", "public void openImage() {\n InputStream f = Controller.class.getResourceAsStream(\"route.png\");\n img = new Image(f, mapImage.getFitWidth(), mapImage.getFitHeight(), false, true);\n h = (int) img.getHeight();\n w = (int) img.getWidth();\n pathNodes = new GraphNodeAL[h * w];\n mapImage.setImage(img);\n //makeGrayscale();\n }", "public void addShipImage(String imgPath, BoardValue[][] boardArray, int row, int col, char orientation) {\r\n if (boardArray[row][col] != BoardValue.HIT) {\r\n ImageView shipImg = getImage(imgPath);\r\n //have to rotate image if horizontal\r\n if (orientation == 'h') {\r\n shipImg.setRotate(-90);\r\n }\r\n board.add(shipImg, col, row);\r\n }\r\n }", "void lSetImage(Image img);", "public void setImage(Image itemImg) \n {\n img = itemImg;\n }", "public void secondDraw(Graphics2D g2d, BufferedImage image1) {\n// try {\n// image = ImageIO.read(new File(\"Enemy2Bullet.png\"));\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n AffineTransform tx20 = g2d.getTransform();\n AffineTransform tx22 = g2d.getTransform();\n tx20.rotate(theta, location.locX + image1.getWidth() / 2, location.locY + 18 + image1.getHeight() / 2);\n g2d.setTransform(tx20);\n g2d.drawImage(image, location.locX + 112, location.locY + 80, null);\n g2d.setTransform(tx22);\n setLocation(new Location(location.locX + speedX, location.locY + speedY));\n }", "Builder addImage(String value);", "private void setImage() {\r\n\t\ttry{\r\n\r\n\t\t\twinMessage = ImageIO.read(new File(\"obstacles/win.gif\"));\r\n\t\t\tcoin = ImageIO.read(new File(\"obstacles/Coin.gif\"));\r\n\t\t\toverMessage = ImageIO.read(new File(\"obstacles/over.gif\"));\r\n\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.err.println(\"Image file not found\");\r\n\t\t}\r\n\r\n\t}", "public int addPicture(byte[] arg0, int arg1) {\n\t\treturn 0;\n\t}", "private void enhanceImage(){\n }", "private void addEntity(Entity entity, ImageView view) {\n trackPosition(entity, view);\n entityImages.add(view);\n }", "public void arrow()\n{\n\nPImage img1,img2;\nimg1=loadImage(\"compass.png\");\nimage(img1,630,110);\nimg2=loadImage(\"compass.png\");\nimage(img2,1490,110);\n\n}", "void addTextureCoordinate(Vector t);", "@Override\n protected void paintComponent(final Graphics g) {\n super.paintComponent(g);\n g.drawImage(image, 0, 0, this);\n }", "void add(GeometricalObject object);", "public void createObject(float posX, float posY)\n\t{\n\t\tdrawableItems.add(new ObjectItem(posX,posY));\n\t}", "public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}", "public void setImageView() {\n \timage = new Image(\"/Model/boss3.png\", true);\n \tboss = new ImageView(image); \n }", "public void update(float delta) {\n\t\timage.setPosition(body.getPosition().x * PPM - 16, body.getPosition().y * PPM - 16);\n\t\tif (start) {\n\t\t\tGdxGame.get().gameScreen.stage.addActor(image);\n\t\t\tstart = false;\n\t\t}\n\t}", "void setSourceImage(BufferedImage mySourceImage);", "@Override\r\n\tpublic boolean addNewBird(BIrd imageObj) throws Exception {\n\t\t boolean b = false;\r\n\t\t try\r\n\t\t {\r\n\t\t session = sessionfactory.openSession();\r\n\t\t transaction = session.beginTransaction();\r\n\t\t session.save(imageObj);\r\n\t\t transaction.commit();\r\n\t\t session.close();\r\n\t\t b = true;\r\n\t\t }catch(Exception e){\r\n\t\t e.printStackTrace();\r\n\t\t }\r\n\t\t return b;\r\n\t}", "public void move(){\n switch(image){\n case 0: // Case 0: Ant moves up/north. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] -= 1;\n if(this.position[0] < 0){\n this.position[0] = 19;\n }\n break;\n case 1: // Case 1: Ant moves right/east. If the ant hits the right border of the screen the ant will appear at the left border of it\n this.position[1] += 1;\n if(this.position[1] == 20){\n this.position[1] = 0;\n }\n break;\n case 2: // Case 2: Ant moves down/south. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] += 1;\n if(this.position[0] == 20){\n this.position[0] = 0;\n }\n break;\n case 3: // Case 3: Ant moves left/west. If the ant hits the left border of the screen the ant will appear at the right border of it\n this.position[1] -= 1;\n if(this.position[1] < 0){\n this.position[1] = 19;\n }\n break;\n default: // Default: This shouldn't happen on a normal run. It prints an error.\n System.err.println(\"Something went wrong while the ant was trying to move\");\n }\n }", "private void addGraphicObject(GraphicObject g_obj, int x, int y) {\n\t\tg_obj.setFillColor(this.currentFillColor);\n g_obj.setStroke(this.currentStrokeColor, this.currentStrokeSize.getValue());\n\n\t\tthis.canvas.add(g_obj, x, y);\n\t}", "public void Boom()\r\n {\r\n image1 = new GreenfootImage(\"Explosion1.png\");\r\n image2 = new GreenfootImage(\"Explosion2.png\");\r\n image3 = new GreenfootImage(\"Explosion3.png\");\r\n image4 = new GreenfootImage(\"Explosion4.png\");\r\n image5 = new GreenfootImage(\"Explosion5.png\");\r\n image6 = new GreenfootImage(\"Explosion6.png\");\r\n setImage(image1);\r\n\r\n }", "IMG createIMG();", "Image createImage();", "private void addImage(int row, int col, String imageName,\n\t\t\t\t\t\t\t\t\t\t\t\tString imageFileName) {\n\t\tDirectionalPanel panel = nextEmpty(row, col);\n\t\tif (panel != null) {\n\t\t\tpanel.setImage(imageFileName);\n\t\t\tpanel.setImageName(imageName);\n\t\t\tpanel.invalidate();\n\t\t\tpanel.repaint();\n\t\t}\n\t}", "void setImage(BufferedImage valueImage, BufferedImage BackImage);", "void doPlaceObject() {\r\n\t\tif (renderer.surface == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (currentBaseTile != null) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tdeleteEntitiesOf(renderer.surface.basemap, renderer.placementRectangle, false);\r\n\t\t\tSurfaceFeature sf = new SurfaceFeature();\r\n\t\t\tsf.id = currentBaseTile.id;\r\n\t\t\tsf.type = currentBaseTile.type;\r\n\t\t\tsf.tile = currentBaseTile.tile;\r\n\t\t\tsf.location = Location.of(renderer.placementRectangle.x, renderer.placementRectangle.y);\r\n\t\t\trenderer.surface.features.add(sf);\r\n\t\t\t\r\n\t\t\tplaceTile(currentBaseTile.tile, renderer.placementRectangle.x, renderer.placementRectangle.y, SurfaceEntityType.BASE, null);\r\n\t\t\t\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trenderer.repaint();\r\n\t\t} else\r\n\t\tif (currentBuildingType != null && renderer.canPlaceBuilding(renderer.placementRectangle) && renderer.placementRectangle.width > 0) {\r\n\t\t\tUndoableMapEdit undo = new UndoableMapEdit(renderer.surface);\r\n\t\t\tBuilding bld = new Building(currentBuildingType, currentBuildingRace);\r\n\t\t\tbld.makeFullyBuilt();\r\n\t\t\tbld.location = Location.of(renderer.placementRectangle.x + 1, renderer.placementRectangle.y - 1); // leave room for the roads!\r\n\t\t\trenderer.surface.buildings.add(bld);\r\n\t\t\t\r\n\t\t\tplaceTile(bld.tileset.normal, bld.location.x, bld.location.y, SurfaceEntityType.BUILDING, bld);\r\n\t\t\tplaceRoads(currentBuildingRace);\r\n\t\t\t\r\n\t\t\tundo.setAfter();\r\n\t\t\taddUndo(undo);\r\n\t\t\trenderer.repaint();\r\n\t\t}\r\n\t}", "public void addToImages(final GPImageLinkComponent value)\n\t{\n\t\taddToImages( getSession().getSessionContext(), value );\n\t}", "void setImage(IViewModel image);", "public void addSpaceObject(Image i, Point spaceP, int frameCount, Dimension dim){\n\t\tspaceObjectImages.add(i);\n\t\t//System.out.println(i + \" added in view\");\n\t\tspaceObjectLocations.add(spaceP);\n\t\tspaceObjectFrameCt.add(frameCount);\n\t\tspaceObjectDimension.add(dim);\n\t}", "private void render(){\n planeImage.draw(currPos.x,currPos.y, drawOps);\n }", "public void addEventToImageView(ImageView image) {\n image.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {\n @Override\n public void handle(MouseEvent event) {\n\n MyImageView imageView = (MyImageView) event.getSource();\n pathToFile = imageView.getId();\n Image img = new Image(imageView.getImagePath());\n\n ImageView mainImageView = new ImageView(img);\n mainImageView.setPreserveRatio(true);\n mainImageView.setFitWidth(imageStackPane.getWidth());\n mainImageView.setFitHeight(imageStackPane.getHeight());\n imageStackPane.getChildren().clear();\n imageStackPane.getChildren().add(mainImageView);\n\n }\n });\n }", "private void createUpdateImage(Item item) throws Exception {\r\n //cria a imagem\r\n new Image().saveImage(item.getImagem(), item.getNome());\r\n \t}", "Builder addImage(URL value);", "public static void addImage(BufferedImage buff1, BufferedImage buff2, float opaque, int x, int y) {\n Graphics2D g2d = buff1.createGraphics();\n g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opaque));\n g2d.drawImage(buff2, x, y, null);\n g2d.dispose();\n }", "private void setUpImage() {\n Bitmap icon = BitmapFactory.decodeResource( this.getResources(), R.drawable.hotel_icon );\n map.addImage( MARKER_IMAGE_ID, icon );\n }", "public void putFrame()\n {\n if (currImage != null)\n {\n super.putFrame(currImage, faceRects, new Scalar(0, 255, 0), 0);\n }\n }", "protected void addObject(Obstacle obj) {\n\t\tassert inBounds(obj) : \"Object is not in bounds\";\n\t\tobjects.add(obj);\n\t\tobj.activatePhysics(world);\n\t}", "public void drawImage()\n {\n imageMode(CORNERS);\n //image(grayImgToFit, firstCellPosition[0], firstCellPosition[1]);\n image(canvas, firstCellPosition[0], firstCellPosition[1]);\n //image(tileMiniaturesV[0],10,250);\n //if(avaragedImgs.length > 4)\n // image(avaragedImgs[3],200,200);\n //getTileIntensityAtIndex(15,15);\n //println(tiles[7].getEndBrightness());\n \n }", "@Override\r\n public void drawImage(Graphics g) {\r\n AffineTransform rotation = AffineTransform.getTranslateInstance(this.collider.x, this.collider.y);\r\n rotation.rotate(Math.toRadians(this.rotation), this.collider.width / 2.0, this.collider.height / 2.0);\r\n Graphics2D g2d = (Graphics2D) g;\r\n g2d.drawImage(this.sprite, rotation, null);\r\n }", "WorldImage getImage();", "@Override\r\n\t\tpublic MyImage createMyImage(MyImage myimage) {\r\n\t\t\t\r\n\t\t\treturn myimg.createMyImage(myimage);\r\n\t\t}", "public void add(GeometricalObject object);", "IbeisAnnotation addAnnotation(IbeisImage image, BoundingBox boundingBox) throws IOException, MalformedHttpRequestException, UnsuccessfulHttpRequestException, IndividualNameAlreadyExistsException;", "public Image() {\n\t\tsuper();\n\t\taddNewAttributeList(NEW_ATTRIBUTES);\n\t\taddNewResourceList(NEW_RESOURCES);\n\t}", "Actor(int x, int y, Texture image) {\n this.setX(x);\n this.setY(y);\n setImage(image);\n }", "public Sprite(Image img){\n\t\tsuper();\n\t\t_img = img;\n\t\tsetOrigin(_img.getWidth()/2,_img.getHeight()/2);\n\t\ttranslate(0, 0);\n\t}", "private void addObjectTo(Obstacle obj, int l) {\r\n\t\tassert inBounds(obj) : \"Object is not in bounds\";\r\n\t\tif (l == LevelCreator.allTag) {\r\n\t\t\tsharedObjects.add(obj);\r\n\t\t\t//obj.activatePhysics(world);\r\n\t\t}\r\n\t\telse if (l == LevelCreator.lightTag) {\r\n\t\t\tlightObjects.add(obj);\r\n\t\t\t//obj.activatePhysics(world);\r\n\t\t}else if (l == LevelCreator.darkTag) {\r\n\t\t\tdarkObjects.add(obj);\r\n\t\t\t//obj.activatePhysics(world);\r\n\t\t}\r\n\t}", "public ImagePicture(ImageIcon img) { \r\n\t\tsuper();\r\n\t\tsetxPos(0);\r\n\t\tsetyPos(0);\r\n\t\tthis.image = img;\r\n\t\trepaint();\r\n\t}" ]
[ "0.68785936", "0.6704131", "0.64160866", "0.6206518", "0.6194813", "0.6166441", "0.61032116", "0.6039019", "0.60311216", "0.5975703", "0.59203625", "0.5916491", "0.58917344", "0.58801943", "0.57587224", "0.57453454", "0.57324064", "0.5730537", "0.5723259", "0.5663779", "0.5647544", "0.5640001", "0.56360424", "0.56321883", "0.56102324", "0.56006044", "0.55976635", "0.55833656", "0.55826265", "0.55812025", "0.5580316", "0.55797833", "0.5559606", "0.5546586", "0.5534801", "0.5529848", "0.5528902", "0.55247706", "0.55139333", "0.5511389", "0.55066425", "0.5505744", "0.55015063", "0.54922944", "0.5491499", "0.5485412", "0.54823893", "0.5467228", "0.54642797", "0.5461871", "0.5452895", "0.545089", "0.5448149", "0.5421205", "0.54210955", "0.54158163", "0.5410779", "0.54093903", "0.54023397", "0.5393136", "0.5392812", "0.5389521", "0.5388696", "0.5382958", "0.53631234", "0.5357631", "0.53395295", "0.53364426", "0.53296006", "0.53282696", "0.53275764", "0.5326706", "0.5321856", "0.5316949", "0.5310919", "0.5307652", "0.53070384", "0.5304518", "0.5304399", "0.52991515", "0.5294711", "0.5292637", "0.5287968", "0.5285334", "0.52826416", "0.5277842", "0.52764064", "0.5272365", "0.52645135", "0.52641904", "0.52628195", "0.5262429", "0.525181", "0.52517486", "0.52452314", "0.52420014", "0.5241669", "0.52331716", "0.5233045", "0.52321833", "0.5230858" ]
0.0
-1
Gets an image from the selected path
private BufferedImage loadImage(String path) { try { return ImageIO.read(getClass().getClassLoader().getResource(path)); } catch (IOException e) { e.printStackTrace(); System.exit(1); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void selectImage(String path);", "public void getImagePath(String imagePath);", "java.lang.String getImagePath();", "String getImagePath();", "String getImagePath();", "BufferedImage getSelectedImage();", "java.lang.String getImage();", "private void selectImage() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(\n Intent.createChooser(\n intent,\n \"Select Image from here...\"),\n PICK_IMAGE_REQUEST);\n }", "static public AppImage browseForImage() {\n // If there is no image ask the user to choose image from file:\n JFileChooser file_chooser = new JFileChooser();\n file_chooser.setAcceptAllFileFilterUsed(false);\n file_chooser.addChoosableFileFilter(new FileFilter() {\n public boolean accept(File file) {\n if (file.isDirectory()) return true;\n String extension = FileUtils.getFileExtension(file);\n return extension.equals(\"png\");\n }\n\n public String getDescription() {\n return \"Portable Network Graphics (PNG)\";\n }\n });\n int ret_value = file_chooser.showOpenDialog(App.instance);\n AppImage app_image = null;\n if (ret_value == JFileChooser.APPROVE_OPTION) {\n // Read the selected file and do scaling on it:\n File file = file_chooser.getSelectedFile();\n String path = file.getAbsolutePath();\n\n // Create the image and add it to cache:\n app_image = Resources.loadAppImage(path);\n addImage(app_image);\n writeRepository();\n }\n\n return app_image;\n }", "String getImage();", "public static BufferedImage readImageFromFile() {\r\n BufferedImage img = null;\r\n final JFileChooser fileChooser = new JFileChooser();\r\n File selectedFile = null;\r\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\r\n int result = fileChooser.showOpenDialog(null);\r\n if (result == JFileChooser.APPROVE_OPTION) {\r\n selectedFile = fileChooser.getSelectedFile();\r\n System.out.println(\"Selected file: \" + selectedFile.getAbsolutePath());\r\n }\r\n try {\r\n img = ImageIO.read(selectedFile);\r\n } catch (IOException e) {\r\n }\r\n return img;\r\n }", "public static Image getImage(String path) {\n\t\tString nomFichier = \"src/main/resources/images/\" + path;\n\t\tImage image = null;\n\t\ttry {\n\t\t\timage = new Image(new FileInputStream(nomFichier));\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "private Image getImage(boolean isSelected) {\n\t\tString key = isSelected ? CHECKED_IMAGE : UNCHECKED_IMAGE;\n\t\treturn imageRegistry.get(key);\n\t}", "private Image loadImage (String path) {\n\t\tImageIcon imageicon = new ImageIcon (path);\r\n\t\tImage newImage = imageicon.getImage();\r\n\t\treturn newImage;\r\n\t}", "private Image getImage(Proposal proposal, boolean selected) {\n\t\tif (proposal == null)\n\t\t\treturn null;\n\t\t// return labelProvider.getImage(proposal);\n\t\tif (proposal.isPartial() && partialContentImage != null)\n\t\t\treturn selected ? partialContentImageSelected : partialContentImage;\n\t\tif (proposal.isFunction() && functionContentImage != null)\n\t\t\treturn selected ? functionContentImageSelected : functionContentImage;\n\t\treturn null;\n\t}", "public void getImage(View view)\n {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), PICK_IMAGE);\n\n }", "public void getImage(int index) {\n\t\tcurrentIndex = index;\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickPhoto, 1);//one can be replaced with any action code\n }", "@Override\n public void actionPerformed(ActionEvent e) {\n JFileChooser fc = new JFileChooser(); \n int returnVal = fc.showOpenDialog(null);\n if (returnVal == JFileChooser.APPROVE_OPTION) {\n File file = fc.getSelectedFile();\n System.out.println(file.getAbsolutePath()); \n image = loadImage( file);\n }\n }", "public void choosePicture() {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\"); //inserting all images inside this Image folder\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, 1);\n\n }", "private void choseImage() {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, GALLERY_REQ_CODE);\n } else {\n Toast.makeText(this, R.string.no_image_picker, Toast.LENGTH_SHORT).show();\n }\n }", "private void getImage() {\n\n Intent intent = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //intent.setType(\"text/xls\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n\n try {\n startActivityForResult(\n Intent.createChooser(intent, \"Complete action using\"),\n MY_INTENT_CLICK);\n }catch (Exception e) {\n e.getMessage();\n }\n }", "private String getImagePath(@Nullable Intent data) {\n Uri selectedImage = Objects.requireNonNull(data).getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(Objects.requireNonNull(selectedImage), filePathColumn,\n null, null, null);\n Objects.requireNonNull(cursor).moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n\n String imagePath = cursor.getString(columnIndex);\n cursor.close();\n return imagePath;\n }", "public void selectImage(View view){\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.INTERNAL_CONTENT_URI);\n startActivityForResult(intent,PICK_IMAGE);\n }", "String avatarImageSelected();", "private BufferedImage getImage(String f) {\n BufferedImage image = null;\n File file = new File(f);\n\n try {\n image = ImageIO.read(file);\n }\n catch (Exception ex) {\n JOptionPane.showMessageDialog(\n null,\n \"Image could not be read!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "@JavascriptInterface\n public String choosePhoto() {\n String file = \"test\";\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n photoPickerIntent.setType(\"image/*\");\n startActivityForResult(photoPickerIntent, SELECT_GALLERY_PHOTO);\n return file;\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n switch (requestCode) {\n case SELECTED_PICTURE:\n if (resultCode == RESULT_OK) {\n uri = data.getData();\n\n\n Log.e(\"Image path is \", \"\" + uri);\n String[] projection = {MediaStore.Images.Media.DATA};\n\n Cursor cursor = getContentResolver().query(uri, projection,\n null, null, null);\n cursor.moveToFirst();\n\n int columnIndex = cursor.getColumnIndex(projection[0]);\n String filePath = cursor.getString(columnIndex);\n String path = filePath;\n img = path;\n\n cursor.close();\n\n\n Bitmap yourSelectedImage = BitmapFactory.decodeFile(filePath);\n\n Drawable d = new BitmapDrawable(yourSelectedImage);\n\n newImage.setImageDrawable(d);\n Toast.makeText(getApplicationContext(), filePath,\n Toast.LENGTH_SHORT).show();\n\n\n\n }\n break;\n\n default:\n break;\n }\n }", "private void openFileChoose() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(intent, PEGA_IMAGEM);\n }", "public BufferedImage getImage()\n\t{\n\t\tif (image == null)\n\t\t\tif (imagePath == null)\n\t\t\t\treturn null;\n\t\t\telse\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tBufferedImage oimg = ImageIO.read(new File(imagePath));\n\t\t\t\t\timage = new BufferedImage(oimg.getWidth(), oimg.getHeight(), BufferedImage.TYPE_INT_RGB);\n\t\t\t\t\timage.getGraphics().drawImage(oimg,0,0,null);\n\t\t\t\t\treturn image;\n\t\t\t\t}\n\t\t\t\tcatch (Exception ex)\n\t\t\t\t{\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\treturn image;\n\t}", "public BufferedImage open() {\n\t\tJFileChooser choose = new JFileChooser(); //Removed path from the chooser!\n\n\t\tif (choose.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)\n\t\t\treturn null;\n\t\tString file = choose.getSelectedFile().getAbsolutePath();\n\t\ttry {\n\t\t\tthis.x = 0;\n\t\t\tthis.y = 0;\n\t\t\tFileInputStream fis = new FileInputStream(file); \n\t\t\tObjectInputStream ois = new ObjectInputStream(fis);\n\t\t\tString iden = \"\";\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\tiden += ois.readChar();\n\t\t\t\n\t\t\tif (iden.compareTo(\"PPL\") != 0)\treturn null;\n\t\t\tbyte by = ois.readByte();\n\t\t\tSystem.out.println(by);\n\t\t\t\n\t\t\tswitch (by) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.image = loadRGB(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.image = loadCMY(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.image = loadGS(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.image = loadBW(ois);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.image = loadLT(ois);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tois.close();\n\t\t\t//int b = ois.readByte(); //lee 8 bits, lee -16, y no 240\n\t\t\t//si el bit mas significativo del byte antes de introducirse fue 1, el numero leido se interpreta como negativo\n\t\t\t//if(b < 0) b += 256; //para leer bytes sin signo\n\t\t\t//int i = ois.readInt(); //lee 32 bits, lee 3500\n\t\t} catch (FileNotFoundException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) {\n Uri selectedImage = data.getData();\n String[] filePathColumn = {MediaStore.Images.Media.DATA};\n Cursor cursor = getContentResolver().query(selectedImage,\n filePathColumn, null, null, null);\n cursor.moveToFirst();\n int columnIndex = cursor.getColumnIndex(filePathColumn[0]);\n picturePath = cursor.getString(columnIndex);\n cursor.close();\n Bitmap bitmap = BitmapFactory.decodeFile(picturePath);\n mItemImageView.setImageBitmap(bitmap);\n }\n }", "public void getPhoto() {\n Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n //for startActivityForResult, the second parameter, requestCode is used to identify this particular intent\n startActivityForResult(intent, 1);\n }", "void imageChooser() {\n\n\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "public YuiImage getSelectedImg() {\r\n\t\treturn selectedImg;\r\n\t}", "File resolveImage(Box box);", "int img(String path) {\n //TODO: is this correct?\n return this.renderEngine.b(path);\n }", "private static Image getImageInProject(String targetPath) {\n try {\n return new Image(null, PluginUtil.getPluginDir() + targetPath);\n } catch (SWTException e) {\n return null;\n }\n }", "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "private void selectImageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.select_picture)),\n REQUEST_IMAGE_OPEN);\n }", "@Override\n\tpublic void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tif (resultCode == Activity.RESULT_OK) {\n\t\t\tif (requestCode == SELECT_PICTURE) {\n\t\t\t\tUri selectedImageUri = data.getData();\n\n\t\t\t\t//OI FILE Manager\n\t\t\t\tfilemanagerstring = selectedImageUri.getPath();\n\n\t\t\t\t//MEDIA GALLERY\n\t\t\t\tselectedImagePath = getPath(selectedImageUri);\n\t\t\t\timg2.setImageURI(selectedImageUri);\n\n\n\t\t\t\t//img.setImageURI(selectedImageUri);\n\n\t\t\t\timagePath.getBytes();\n\n\t\t\t\timagePath=(imagePath.toString());\n\t\t\t\tSystem.out.println(\"MY PATH: \"+imagePath);\n\t\t\t\tBitmap bm = BitmapFactory.decodeFile(imagePath);\n\n\t\t\t}\n\n\t\t}\n\n\t}", "String getItemImage();", "public int getImage();", "private URL browseIcon( ImagePreview preview ) {\n URL res = null;\n JFileChooser chooser = UIUtil.getIconFileChooser();\n int ret = chooser.showDialog(this, NbBundle.getMessage(getClass(), \"LBL_Select\")); // NOI18N\n if (ret == JFileChooser.APPROVE_OPTION) {\n File file = chooser.getSelectedFile();\n try {\n res = Utilities.toURI(file).toURL();\n preview.setImage(new ImageIcon(res));\n setModified();\n } catch (MalformedURLException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n return res;\n }", "protected Image retrieveImage(String imageLocationPath) {\t\n\t\tImage image = null;\n\t\ttry {\n\t\t\timage = new Image(imageLocationPath);\n\t\t}\n\t\tcatch (NullPointerException | IllegalArgumentException e) {\n\t\t\tnew ErrorHandler(\"Fatal error displaying media\");\n\t\t}\n\t\t\n\t\treturn image;\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), IMG_RESULT);\n\n }", "private Uri getImageUri(String path) {\n return Uri.fromFile(new File(path));\n }", "protected void OpenImageFile(String path) {\n\t\tSystem.out.println(\"path\"+path);\n\t\tIntent intent = new Intent(\"android.intent.action.VIEW\");\n\t\tintent.addCategory(\"android.intent.category.DEFAULT\");\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tUri uri = Uri.fromFile(new File(path));\n\t\tintent.setDataAndType(uri, \"image/*\");\n\t\tstartActivity(intent);\n\n\t}", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\t//打开图片\n\t\tif(resultCode == RESULT_OK && requestCode == IMAGE_OPEN) {\n\t\t\tUri uri = data.getData();\n\t\t\t//查询选择图片\n\t\t\tif(!TextUtils.isEmpty(uri.getAuthority())) {\n\t\t\t\tCursor cursor = getContentResolver().query(uri, new String[]{MediaStore.Images.Media.DATA}, null, null, null);\n\n\t\t\t\tif(null == cursor){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t//光标移动至开头 获取图片路径;\n\t\t\t\tcursor.moveToFirst();\n\t\t\t\tpathImage = cursor.getString(cursor.getColumnIndex(MediaStore.Images.Media.DATA));\n\t\t\t}\n\n\t\t}//end if\n\t}", "void imageChooser() {\n\n // create an instance of the\n // intent of the type image\n Intent i = new Intent();\n i.setType(\"image/*\");\n i.setAction(Intent.ACTION_GET_CONTENT);\n\n\n // pass the constant to compare it\n // with the returned requestCode\n startActivityForResult(Intent.createChooser(i, \"Select Picture\"), SELECT_PICTURE);\n }", "@Override\n\tpublic File getImage(String name) {\n\n\t\tFile returnValue = new File(RestService.imageDirectory + name + \".png\");\n\t\t\n\t\tif(returnValue.exists() && !returnValue.isDirectory()) \n\t\t{ \n\t\t return returnValue;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturnValue = new File(RestService.imageDirectory + name + \".jpg\");\n\t\t\t\n\t\t\tif(returnValue.exists() && !returnValue.isDirectory()) \n\t\t\t{ \n\t\t\t return returnValue;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t}", "@Override\n public String getImagePath() {\n return IMAGE_PATH;\n }", "public Image getImage(String imagePath) {\n\t\tfinal ImageDescriptor descriptor = getImageDescriptor(imagePath);\n\t\tif (descriptor == null) {\n\t\t\treturn null;\n\t\t}\n\t\treturn descriptor.createImage();\n\t}", "public void getImage(View view){\n if(Build.VERSION.SDK_INT > 19) {\n Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n } else {\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n intent.setType(\"image/*\");\n intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 100);\n }\n }", "public Image getOne();", "public static Image loadImage(String path) {\n File file = new File(path);\n String imagePath = file.getAbsolutePath();\n //Modify based on OS\n if (File.separatorChar == '\\\\') {\n // From Windows to Linux/Mac\n imagePath=imagePath.replace('/', File.separatorChar);\n imagePath = imagePath.replace(\"\\\\\", \"\\\\\\\\\");\n } else {\n // From Linux/Mac to Windows\n imagePath=imagePath.replace('\\\\', File.separatorChar);\n\n }\n \n //Add file: to work with JavaFX\n imagePath=\"file:\"+imagePath;\n\n return new Image(imagePath);\n }", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n Intent pickIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n pickIntent.setType(\"image/*\");\n Intent chooserIntent = Intent.createChooser(intent, \"Select Image\");\n chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, new Intent[] {pickIntent});\n startActivityForResult(chooserIntent,PICK_IMAGE_REQUEST);\n }", "private void selectImage(){\n final CharSequence[] options = { \"Choose from Gallery\",\"Cancel\" };\n AlertDialog.Builder builder = new AlertDialog.Builder(activity);\n builder.setItems(options, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int item) {\n if (options[item].equals(\"Choose from Gallery\"))\n {\n Intent intent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivityForResult(intent, 2);\n }\n else if (options[item].equals(\"Cancel\")) {\n dialog.dismiss();\n }\n }\n });\n builder.show();\n }", "public void onClick(View arg0) {\n Intent intent = new Intent();\r\n intent.setType(\"image/*\");\r\n intent.setAction(Intent.ACTION_GET_CONTENT);\r\n startActivityForResult(Intent.createChooser(intent,\r\n \"Select Picture\"), SELECT_PICTURE);\r\n }", "private void invokeGetPhoto() {\n // invoke the image gallery using an implicit intent.\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n // Show only images, no videos or anything else\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.ACTION_GET_CONTENT);\n // Always show the chooser (if there are multiple options available)\n startActivityForResult(Intent.createChooser(photoPickerIntent, \"Choose a picture\"), REQUEST_IMAGE_CAPTURE);\n }", "public String getImagePath() {\n\t\treturn mPath;\n\t}", "public static BufferedImage getImage(String path) {\n File f = null;\n BufferedImage img = null;\n try{\n f = new File(path);\n if (!f.exists()) return null;\n boolean good = false;\n if (f.getName().toLowerCase().endsWith(\".png\") || f.getName().toLowerCase().endsWith(\".jpg\")) good = true;\n if (!good) return null;\n img = ImageIO.read(f);\n }catch(Exception e){\n return null;\n }\n return img;\n }", "public Label getPic(){\n //try {//getPic is only called if isPic is true, so side1 would contain picture path\n /*BufferedImage unsized = ImageIO.read(new File(side1));\n BufferedImage resized = resizeImage(unsized,275,250, unsized.getType());\n frontPic.setIcon(new ImageIcon(resized));*/\n\n\t\t\tImage image = new Image(new File(side1).toURI().toString());\n\t\t\tImageView iv = new ImageView(image);\n\t\t\tLabel imageLabel = new Label(\"Image\");\n\t\t\timageLabel.setGraphic(iv);\n\t\t\treturn imageLabel;\n /*} catch (IOException ex) {\n System.out.println(\"Trouble reading from the file: \" + ex.getMessage());\n }\n return frontPic;*/\n }", "public String getImage() {\n\t\tString ans=\"Data/NF.png\";\n\t\tif(image!=null)\n\t\t\tans=\"Data/Users/Pics/\"+image;\n\t\treturn ans;\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent,\n \"Select Picture\"), SELECT_PICTURE);\n }", "public void loadInputImage()\n{\n selectInput(\"Select a file to process:\", \"imageLoader\"); // select image window -> imageLoader()\n}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"), REQUEST_IMAGE);\n }", "protected static ImageIcon createImageIcon(String path) {\r\n java.net.URL imgURL = FileChooser.class.getResource(path);\r\n if (imgURL != null) {\r\n return new ImageIcon(imgURL);\r\n } else {\r\n System.err.println(\"Couldn't find file: \" + path);\r\n return null;\r\n }\r\n \r\n\t\t\r\n\t}", "public String getLinkOfFoto()\n{\n\tJFileChooser fileChooser = new JFileChooser(\".\");\n\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\"(png, gif, jpg, jpeg)\", \"png\", \"jpeg\", \"gif\", \"jpg\");\n\tfileChooser.setAcceptAllFileFilterUsed(false);\n\tfileChooser.setFileFilter(filter);\n\tString path=\"\";\n\n fileChooser.addActionListener(new ActionListener() {\n public void actionPerformed(ActionEvent e) {\n }\n });\n \n int status = fileChooser.showOpenDialog(null);\n\n\n\n if (status == JFileChooser.APPROVE_OPTION) {\n File selectedFile = fileChooser.getSelectedFile();\n path = selectedFile.getAbsolutePath();\n } else if (status == JFileChooser.CANCEL_OPTION) {\n \treturn \"\";\n }\n return path;\n}", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == PICK_IMAGE_REQUEST && resultCode == RESULT_OK && data != null && data.getData() != null) {\n filePath = data.getData();\n try {\n Bitmap bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), filePath);\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i , RESULT_LOAD_IMAGE);\n\n\n }", "public Image getImage(String key)\n {\n return imageRegistry.get(key);\n }", "@Override\n public void onClick(View v) {\n Intent i = new Intent(\n Intent.ACTION_PICK,\n android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(i, SELECTED_PICTURE);\n }", "public BufferedImage getImage() {\n\t\tTelaInterna ti = ( TelaInterna )contentPane.getSelectedFrame();\n\t\tBufferedImage img;\n\t\timg = ti.getImage();\n\t\treturn img;\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"SELECT IMAGE\"), GALLERY_PICK);\n }", "public void openFile()\n { \n JFileChooser chooser = new JFileChooser();\n chooser.setCurrentDirectory(new File(\".\"));\n \n chooser.setFileFilter(new\n javax.swing.filechooser.FileFilter()\n { \n public boolean accept(File f)\n { \n String name = f.getName().toLowerCase();\n return name.endsWith(\".gif\") || name.endsWith(\".jpg\") || name.endsWith(\".jpeg\")\n || f.isDirectory();\n }\n public String getDescription() { return \"Image files\"; }\n });\n\n int r = chooser.showOpenDialog(this);\n if(r != JFileChooser.APPROVE_OPTION) return;\n\n try\n {\n image = ImageIO.read(chooser.getSelectedFile());\n }\n catch (IOException e)\n {\n JOptionPane.showMessageDialog(this, e);\n }\n repaint();\n }", "@Nullable\n @Generated\n @Selector(\"image\")\n public native UIImage image();", "@Override\n public void onClick(View v) {\n Intent i = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n startActivityForResult(i, RESULT_LOAD_IMAGE);\n }", "@Override\n public void onClick(View v) {\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n //Where do we want to find the data\n File pictureDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n //Get the name of the directory\n String pictureDirectoryPath = pictureDirectory.getPath();\n //Get a URI representation of the Path because this is what android needs to deal with\n Uri data = Uri.parse(pictureDirectoryPath);\n //Set the data (where we want to look for this media) and the type (what media do we want to look for).Get all image types\n photoPickerIntent.setDataAndType(data, \"image/*\");\n //We invoke the image gallery and receive something from it\n if (photoPickerIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(photoPickerIntent, IMAGE_GALLERY_REQUEST);\n }\n\n }", "public static URL loadImage(String path) {\r\n Utilities tmp = new Utilities();\r\n ClassLoader classLoader = tmp.getClass().getClassLoader();\r\n return classLoader.getResource(path);\r\n }", "@Override\n public void imageFromGallery() {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select picture\"), PICK_IMAGE);\n }", "private void pickImageFromGallery() {\n Intent intent = new Intent(Intent.ACTION_PICK);\n intent.setType(\"image/*\");\n startActivityForResult(intent, IMAGE_PICK_CODE);\n\n }", "public abstract String getFotoPath();", "private String getSelectedFile() {\r\n\t\tString file = \"\";\r\n\t\tIFile selectedFile = fileResource.getSelectedIFile();\r\n\t\tif (selectedFile != null) {\r\n\t\t\tIPath selectedPath = selectedFile.getLocation();\r\n\t\t\tif (selectedPath != null) {\r\n\t\t\t\tfile = selectedPath.toFile().toString();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn file;\r\n\t}", "public ImageIcon getSelectionHandlerImageIcon();", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent( Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n intent.setType(\"image/*\");\n startActivityForResult(Intent.createChooser(intent, \"Select File\"), 1);\n }", "public BufferedImage readImage(String path) {\n File file = new File(path);\n BufferedImage image = null;\n try {\n image = ImageIO.read(file);\n } catch (IOException ex) {\n Logger.getLogger(ProcessImage.class.getName()).log(Level.SEVERE, null, ex);\n }\n return image;\n }", "public void selectedImageButtonPushed(ActionEvent event) throws IOException {\n // get the Stage to open a new window\n Stage stage = (Stage)((Node)event.getSource()).getScene().getWindow();\n FileChooser fileChooser = new FileChooser();\n fileChooser.setTitle(\"open Image\");\n //filter for .jpg and .png\n FileChooser.ExtensionFilter imageFilter = new FileChooser.ExtensionFilter(\"Image Files\",\"*.jpg\",\"*.png\");\n fileChooser.getExtensionFilters().add(imageFilter);\n // set the start directory\n String userDirectoryString = System.getProperty(\"user.home\")+\"\\\\Pictures\";\n File userDirectory = new File(userDirectoryString);\n // confirm that system can reach the directory\n if (!userDirectory.canRead())\n userDirectory = new File(System.getProperty(\"user.home\"));\n //set the file chooser to select initial directory\n fileChooser.setInitialDirectory(userDirectory);\n File imageFile = fileChooser.showOpenDialog(stage);\n if (imageFile != null && imageFile.isFile())\n {\n selectImage.setImage(new Image(imageFile.toURI().toString()));\n }\n }", "@Override\r\n\tpublic ArrayList<theaterImageVo> selectImage() {\n\t\treturn theaterRentalDaoImpl.selectImage();\r\n\t}", "public Img getImage(long id){\n\n Img imageObj = null;\n\n List<Img> imgList = null;\n imgList = Img.getImageList(id);\n if(imgList!=null && imgList.size()>0) {\n\n imageObj = imgList.get(0);\n }\n return imageObj;\n }", "private void dispatchGetPictureFromGalleryIntent() {\n Intent pickPhoto = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n if (pickPhoto.resolveActivity(getContext().getPackageManager()) != null) {\n this.startActivityForResult(pickPhoto, PICK_IMAGE);\n }\n }", "public BufferedImage readImage(String id) {\n BufferedImage bufImg = null;\n try {\n PreparedStatement pstmt = conn.prepareStatement(\n \"SELECT photo FROM vehicles WHERE veh_reg_no = ?\");\n pstmt.setString(1, id);\n System.out.println(pstmt); // for debugging\n ResultSet rset = pstmt.executeQuery();\n // Only one result expected\n rset.next();\n // Read image via InputStream\n InputStream in = rset.getBinaryStream(\"photo\"); \n // Decode the inputstream as BufferedImage\n bufImg = ImageIO.read(in); \n } catch(Exception ex) {\n ex.printStackTrace();\n }\n return bufImg;\n }", "private void pickFromGallery() {\n Intent intent = new Intent(Intent.ACTION_PICK);\r\n // Sets the type as image/*. This ensures only components of type image are selected\r\n intent.setType(\"image/*\");\r\n //We pass an extra array with the accepted mime types. This will ensure only components with these MIME types as targeted.\r\n String[] mimeTypes = {\"image/jpeg\", \"image/png\"};\r\n intent.putExtra(Intent.EXTRA_MIME_TYPES, mimeTypes);\r\n // Launching the Intent\r\n startActivityForResult(intent, 0);\r\n }", "public void showImageChooser() {\n Intent intent2 = new Intent();\n intent2.setType(\"image/*\");\n intent2.setAction(\"android.intent.action.GET_CONTENT\");\n startActivityForResult(Intent.createChooser(intent2, \"Select Picture\"), PICK_IMAGE_REQUEST);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n // image k selection k liey requesting code jo hai upar vo 1234 hai ye dena hota hai\n startActivityForResult(Intent.createChooser(intent, \"Select Image\"), REQUEST_CODE);\n }", "public static Bitmap getPhotoBitmap(String path) {\n File imgFile = new File(Environment.getExternalStorageDirectory(), path);\n Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());\n return myBitmap;\n }", "public static Bitmap getBitmap(String path) {\n Bitmap bitmap = null;\n try {\n Log.i(\"FileManager\", \"GetBitmap: \" + path);\n FileInputStream imgIS = new FileInputStream(new File(path));\n BufferedInputStream bufIS = new BufferedInputStream(imgIS);\n bitmap = BitmapFactory.decodeStream(bufIS);\n Log.i(\"FileManager\", \"GetBitmap Finished: \" + bitmap);\n } catch (FileNotFoundException e) { //catch fileinputstream exceptions\n e.printStackTrace();\n } //trying to get wallpaper from display cycle node\n return bitmap;\n }", "public Intent select() {\n final Activity activity = (Activity)getContext();\n try {\n\n final List<Intent> cameraIntents = new ArrayList<>();\n final Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n final PackageManager packageManager = activity.getPackageManager();\n final List<ResolveInfo> listCam = packageManager.queryIntentActivities(captureIntent, 0);\n for (ResolveInfo res : listCam) {\n final String packageName = res.activityInfo.packageName;\n final Intent intent = new Intent(captureIntent);\n intent.setPackage(packageName);\n cameraIntents.add(intent);\n }\n Intent galleryIntent;\n\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.KITKAT) {\n galleryIntent = new Intent();\n galleryIntent.setAction(Intent.ACTION_GET_CONTENT);\n } else {\n galleryIntent = new Intent(Intent.ACTION_OPEN_DOCUMENT);\n galleryIntent.addCategory(Intent.CATEGORY_OPENABLE);\n }\n galleryIntent.setType(\"image/*\");\n\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {\n galleryIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);\n }\n\n final Intent chooserIntent = Intent.createChooser(galleryIntent, \"Select Source\");\n chooserIntent.putExtra(\n Intent.EXTRA_INITIAL_INTENTS,\n cameraIntents.toArray(new Parcelable[]{}));\n\n return chooserIntent;\n } catch (Exception e) {\n Toast.makeText(\n getContext(),\n getResources().getString(R.string.unknown_error),\n Toast.LENGTH_SHORT\n ).show();\n Log.e(getResources().getString(R.string.app_name), \"exception\", e);\n }\n return null;\n }", "public ParseFile getPicture(){\n return getParseFile(KEY_PICTURE);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, getString(R.string.photo_selector)), RESULT_PHOTO_OK);\n }" ]
[ "0.7912292", "0.700016", "0.6946192", "0.6910103", "0.6910103", "0.68795097", "0.6642309", "0.66223884", "0.6593854", "0.6550678", "0.6521378", "0.6503244", "0.64454335", "0.63745975", "0.63325113", "0.6304403", "0.6259719", "0.6233726", "0.62219554", "0.6169477", "0.61642164", "0.6147076", "0.61411464", "0.6128094", "0.61152357", "0.61106956", "0.61046124", "0.60934216", "0.60721827", "0.606775", "0.6063715", "0.60558456", "0.6024344", "0.6013963", "0.6002977", "0.5971956", "0.5967045", "0.5966299", "0.596385", "0.59484816", "0.5932521", "0.59047306", "0.58881676", "0.5877665", "0.58536834", "0.5846853", "0.5835974", "0.5835095", "0.58261234", "0.58251053", "0.5801547", "0.5799361", "0.5796613", "0.57865316", "0.578621", "0.57817096", "0.57665825", "0.57423", "0.57297754", "0.57278425", "0.5716841", "0.57146084", "0.57137066", "0.570994", "0.57044214", "0.5700662", "0.5689913", "0.5687239", "0.5686522", "0.568425", "0.5680563", "0.5677155", "0.5674361", "0.5673467", "0.5664715", "0.5655868", "0.56471676", "0.56403667", "0.562365", "0.5614604", "0.5613179", "0.5610962", "0.5608523", "0.56044257", "0.5604052", "0.5601913", "0.5599381", "0.5598487", "0.5583943", "0.55804807", "0.5573981", "0.55738133", "0.5552477", "0.55489075", "0.55447376", "0.55421937", "0.55343205", "0.5534052", "0.55286676", "0.55255646" ]
0.56904745
66
Updates the image if depending on the direction
public void updateImage(GameObject.Direction direction) { switch (direction) { case NORTH: currentImage = north; break; case SOUTH: currentImage = south; break; case WEST: currentImage = west; break; case EAST: currentImage = east; break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean update(long elapsed) {\n\t\timg.paint(gBuffered, 0, 0);\n\t\tgBuffered.drawImage(img.getCurrentImage(), 0, 0, x, y, width - x,\n\t\t\t\theight - y, width, height, null);\n\t\tgBuffered.drawImage(img.getCurrentImage(), 0, y, x, height, width - x,\n\t\t\t\t0, width, height - y, null);\n\n\t\tgBuffered.drawImage(img.getCurrentImage(), x, 0, width, y, 0, height\n\t\t\t\t- y, width - x, height, null);\n\t\tgBuffered.drawImage(img.getCurrentImage(), x, y, width, height, 0, 0,\n\t\t\t\twidth - x, height - y, null);\n\n\t\tif ((direction & LEFT) == LEFT) {\n\t\t\tx -= speed;\n\t\t\tif (x < 0)\n\t\t\t\tx = width - 1;\n\t\t}\n\n\t\tif ((direction & RIGHT) == RIGHT) {\n\t\t\tx += speed;\n\t\t\tif (x > width)\n\t\t\t\tx = 1;\n\t\t}\n\n\t\tif ((direction & UP) == UP) {\n\t\t\ty += speed;\n\t\t\tif (y > height)\n\t\t\t\ty = 1;\n\t\t}\n\t\tif ((direction & DOWN) == DOWN) {\n\t\t\ty -= speed;\n\t\t\tif (y < 0)\n\t\t\t\ty = height - 1;\n\t\t}\n\t\treturn false;\n\t}", "public void changeDirection(int image){\n this.image = image; \n }", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height) {\n\t\treturn false;\n\t}", "public void imageSwap() {\n GreenfootImage image = (movement.dx < 1) ? leftImage : rightImage;\n setImage(image);\n }", "@Override\r\n\tpublic void motion() {\r\n\t\tframeCount = frameCount== IMAGE_RATE*getImages().size() ? 1 : frameCount+1; \t//count the frames\r\n\r\n\t\tif(frameCount%IMAGE_RATE == 0 || isDirectionChanged() ) {\r\n\t\t\tsetDirectionChanged(false);\r\n\r\n\t\t\tif(isLeft()) {\r\n\t\t\t\tif(imgIndex < getImages().size()/2)\r\n\t\t\t\t\timgIndex =+ getImages().size()/2;\t\t\t\t\t\t\t\t\t\t\t\t\t//Set left Images [4,5,6,7]\r\n\t\t\t\telse\r\n\t\t\t\t\timgIndex = imgIndex == getImages().size()-1 ? getImages().size()/2 : imgIndex+1; \t//if index == list.size() -1 than index will be list.size()/2\r\n\t\t\t}else {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//otherwise it will increment by 1\r\n\t\t\t\tif(imgIndex >= getImages().size()/2) \r\n\t\t\t\t\timgIndex -= 4;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Set right Images [0,1,2,3]\r\n\t\t\t\telse\r\n\t\t\t\t\timgIndex = imgIndex == getImages().size()/2 -1 ? 0 : imgIndex+1; \t\t\t\t\t//if index == list.size()/2 -1 than index will be 0\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//otherwise it will increment by 1\r\n\r\n\t\t\tsetImage(getImages().get(imgIndex));\r\n\t\t}\r\n\t}", "public void update()\n {\n if(x + image.getWidth(null) < 0)\n {\n x = 0;\n }\n else\n {\n x--;\n }\n }", "public void updateDirectionFace();", "@Override\n\tpublic boolean imageUpdate(Image arg0, int arg1, int arg2, int arg3, int arg4, int arg5) {\n\t\treturn false;\n\t}", "public final boolean imageUpdate(java.awt.Image image, int infoflags, int x, int y, int width, int height) {\r\n\treturn false;\r\n}", "public void update() {\n if (this.active) {\n GameObject.processing.image(this.image, this.xPosition, this.yPosition);\n }\n }", "public void updateImage() {\n \t\tAnimation anim = this.animationCollection.at(\n \t\t\t\tfak.getCurrentAnimationTextualId());\n \n \t\t// if animation is set to something bad, then set it to back to initial\n \t\tif(anim==null)\n \t\t{\n \t\t\tfak.setCurrentAnimationTextualId(ConstantsForAPI.INITIAL);\n \t\t\tanim = this.animationCollection.at(\n \t\t\t\t\tfak.getCurrentAnimationTextualId());\n \t\t}\n \n \t\tif(anim==null)\n \t\t{\n \t\t\tanim = this.animationCollection.at(0);\n \t\t\tfak.setCurrentAnimationTextualId(anim.getTextualId());\n \t\t}\n \n \t\tif (anim != null) {\n \t\t\tif (fak.getCurrentFrame()\n \t\t\t\t\t>= anim.getLength()) {\n \t\t\t\tfak.setCurrentFrame(\n \t\t\t\t\t\tanim.getLength() - 1);\n \t\t\t}\n \n \t\t\tcom.github.a2g.core.objectmodel.Image current = anim.getImageAndPosCollection().at(\n \t\t\t\t\tfak.getCurrentFrame());\n \n \t\t\t// yes current can equal null in some weird cases where I place breakpoints...\n \t\t\tif (current != null\n \t\t\t\t\t&& !current.equals(this)) {\n \t\t\t\tif (this.currentImage != null) {\n \t\t\t\t\tthis.currentImage.setVisible(\n \t\t\t\t\t\t\tfalse, new Point(this.left,this.top));\n \t\t\t\t}\n \t\t\t\tthis.currentImage = current;\n \t\t\t}\n \t\t}\n \t\t// 2, but do this always\n \t\tif (this.currentImage != null) {\n \t\t\tthis.currentImage.setVisible(\n \t\t\t\t\tthis.visible, new Point(this.left,\n \t\t\t\t\t\t\tthis.top));\n \t\t}\n \n \t}", "@Override\n\tvoid update(){\n\n\t\t\tif(Frogger.flag==1){\n\t\t\t\tif(orientation == Orientation.UP) y -= step;\n\t\t\t\telse if (orientation == Orientation.DOWN) y += step;\n\t\t\t\telse if (orientation == Orientation.RIGHT) x += step;\n\t\t\t\telse if (orientation == Orientation.LEFT) x -= step;\n\t\t}\n\t\tsetChanged();\n\t\tnotifyObservers();\n\t}", "public void update() {\n\t\tif (MainClass.getPlayer().isJumping()) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(Math.abs(MainClass.getPlayer().getSpeedY()) > Player.getFallspeed() ) {\n\t\t\tcurrentImage = characterJumped;\n\t\t} else if(MainClass.getPlayer().isCovered() == true) {\n\t\t\tcurrentImage = characterCover;\n\t\t} else if(MainClass.getPlayer().isJumping() == false && MainClass.getPlayer().isCovered() == false) {\n\t\t\tcurrentImage = super.getCurrentImage();\n\t\t}\n\t\tthis.update(25);\n\t\n\t}", "private void setDirection(int row, int col, String imageName,\n\t\t\t\t\t\t\t\t\t\t\t\t\tint direction) {\n\t\tDirectionalPanel[] room = rooms[row][col];\n\t\tint index = -1;\n\t\tfor (int i = 0; index == -1 && i < room.length; i++) {\n\t\t\tString roomImageName = room[i].getImageName();\n\t\t\tif (roomImageName != null && roomImageName.equals(imageName)) {\n\t\t\t\tindex = i;\n\t\t\t}\n\t\t}\n\t\tif (index != -1) {\n\t\t\troom[index].setDirection(direction);\n\t\t\troom[index].invalidate();\n\t\t\troom[index].repaint();\n\t\t}\n\t}", "@Override\n\tpublic void draw(GraphicsContext gc) {\n\t\tif(directY != 0){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\tif(lastDirectX == 1){\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),900, 150, 150, 150);\n\t\t\t\t}else{\n\t\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),1050, 150, 150, 150);\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(isMove){\n\t\t\tif(directX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 1) * 150, 150, 150, 150);\n\t\t\t}else if(directX == -1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),((Main.getInstance().getCurrentFrame() % 2) + 4)* 150, 150, 150, 150);\n\t\t\t}\n\t\t}else{\n\t\t\tif(lastDirectX == 1){\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),150, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),0, 150, 150, 150);\n\t\t\t}else{\n\t\t\t\thanzoBody = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 0, 150, 150);\n\t\t\t\thanzoLeg = new WritableImage(ObjectHolder.getInstance().hanzoPic.getPixelReader(),450, 150, 150, 150);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tgc.drawImage(hanzoBody, x-55, y-50);\n\t\tgc.drawImage(hanzoLeg, x-55, y-50);\n\t\t//gc.drawImage(hanzoFX, x-55, y-50);\n\t\t\n\t}", "public void move(){\n switch(image){\n case 0: // Case 0: Ant moves up/north. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] -= 1;\n if(this.position[0] < 0){\n this.position[0] = 19;\n }\n break;\n case 1: // Case 1: Ant moves right/east. If the ant hits the right border of the screen the ant will appear at the left border of it\n this.position[1] += 1;\n if(this.position[1] == 20){\n this.position[1] = 0;\n }\n break;\n case 2: // Case 2: Ant moves down/south. If the ant hits the top of the screen the ant will appear at the bottom of it\n this.position[0] += 1;\n if(this.position[0] == 20){\n this.position[0] = 0;\n }\n break;\n case 3: // Case 3: Ant moves left/west. If the ant hits the left border of the screen the ant will appear at the right border of it\n this.position[1] -= 1;\n if(this.position[1] < 0){\n this.position[1] = 19;\n }\n break;\n default: // Default: This shouldn't happen on a normal run. It prints an error.\n System.err.println(\"Something went wrong while the ant was trying to move\");\n }\n }", "@Override\n public Action update() {\n // draws the image \"image\" at position \"this.x\" and \"this.y\" and then returns null\n Thing.getProcessing().image(this.image, this.x, this.y);\n return null;\n }", "public void move() {\r\n\t\tsetY(getY() + 134);\r\n\t\tmyImage = myImage.getScaledInstance(100, 300, 60);\r\n\r\n\t}", "private void setDirection() {\r\n\t\tif (destinationFloor > initialFloor){\r\n\t\t\tdirection = 1;\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t}\r\n\t}", "public void setDirection(int direction) {\r\n\t\tsuper.setDirection(direction);\r\n\t\trobotImage.setImage(Constant.ROBOTIMAGEPATHS[direction]);\r\n\t}", "public void updateDirectionView();", "protected void update() {\n setWidth(gridSize);\n setHeight(gridSize);\n\n switch(direction) {\n case UP:\n setRotate(0.0);\n break;\n case RIGHT:\n setRotate(90.0);\n break;\n case DOWN:\n setRotate(180.0);\n break;\n case LEFT:\n setRotate(270.0);\n break;\n }\n\n setLayoutX(position.getX() * gridSize);\n setLayoutY(position.getY() * gridSize);\n }", "public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)\r\n\t\t{\n\t\t\tif ((flags & ALLBITS) != 0) {\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\treturn ((flags & (ALLBITS | ERROR)) == 0);\r\n\t\t}", "public boolean imageUpdate(Image img, int flags, int x, int y, int w, int h)\r\n\t\t{\n\t\t\tif ((flags & ALLBITS) != 0) {\r\n\t\t\t\trepaint();\r\n\t\t\t}\r\n\t\t\treturn ((flags & (ALLBITS | ERROR)) == 0);\r\n\t\t}", "public void updateDirection(float dir)\n {\n firstDraw = false;\n direction = dir;\n invalidate();\n }", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n \n Color color;\n ImageIcon image;\n \n switch ( terrain )\n {\n case SAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sand.jpg\")); break;\n case FOREST : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\")); break;\n case WETLAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/forest.jpg\")); break;\n case SCRUB : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\")); break;\n case WATER : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\")); break;\n case BRICK : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick.jpg\")); break;\n default : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/gray.jpg\")); break; \n }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column));\n lblText.setHorizontalTextPosition((int) CENTER_ALIGNMENT);\n lblText.setVerticalTextPosition((int) CENTER_ALIGNMENT);\n \n setVisible(true);\n \n //Kiwifruit\n if( row == 6 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick2.jpg\"));\n }\n \n if( row == 0 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n \n if( row == 7 && column == 0 || row == 7 && column == 7 || row == 6 && column == 6 || row == 8 && column == 3 || row == 9 && column == 3 || row == 9 && column == 4 || row == 9 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassk.jpg\"));\n }\n \n if( row == 2 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n //Trap\n if(\"T\".equals(game.getOccupantStringRepresentation(row, column))){\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/trap.jpg\"));\n lblText.setIcon(image);\n }\n //Food\n //if(game.getOccupantStringRepresentation(row, column) == \"apple\" ) {\n //image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n //}\n if( row == 6 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 5 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassm.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 2 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubs.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 8 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grasso.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n //Predator\n if( row == 2 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 9 && column == 7 ||row == 5 && column == 2 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassp.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 3 && column == 4 || row == 6 && column == 4 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 4 && column == 1) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/waters.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\"));\n }\n }\n //Mystical Creature\n if( row == 7 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brickf.jpg\"));\n }\n \n if( row == 4 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandph.jpg\"));\n }\n \n if( row == 0 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandm.jpg\"));\n }\n \n if( row == 4 && column == 6 || row == 6 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubp.jpg\"));\n }\n \n if( row == 8 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassd.jpg\"));\n }\n \n \n //Hazard\n if( squareExplored && row == 2 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n\n \n if( squareExplored && row == 3 && column == 5 || squareExplored && row == 7 && column == 4 || squareExplored && row == 6 && column == 5 || squareExplored && row == 7 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 1 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 5 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if ( squareVisible && !squareExplored ) \n {\n\n }\n lblText.setIcon(image);\n \n // set border colour according to \n // whether the player is in the grid square or not\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n }\n else\n {\n lblText.setText(\"\");\n lblText.setIcon(null);\n setBorder(normalBorder);\n }\n }", "void walkAnimation(int direction, int index) {\n switch (direction) {\n case 0:\n if (flip) { tile.setImg(upSprites1.get(index)); }\n else { tile.setImg(upSprites2.get(index)); }\n break;\n case 1:\n if (flip) { tile.setImg(downSprites2.get(index)); }\n else { tile.setImg(downSprites2.get(index)); }\n break;\n case 2:\n tile.setImg(leftSprites.get(index));\n break;\n case 3:\n tile.setImg(rightSprites.get(index));\n break;\n }\n }", "public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }", "@Override\r\n public void move(ImageView image, Double xInitial) {\n\r\n }", "protected void nextDirection()\n {\n if (this.lastKeyDirection == Canvas.LEFT)\n {\n this.lastKeyDirection = keyDirection = Canvas.RIGHT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n else if (this.lastKeyDirection == Canvas.RIGHT)\n {\n this.lastKeyDirection = keyDirection = Canvas.LEFT;\n xTotalDistance = 0;\n //yTotalDistance = 0;\n }\n }", "public void changeImage() {\r\n this.image = ColourDoor.image2;\r\n }", "void update(){\n if(!data.up.isEmpty() && data.isMoving==false){\r\n if(data.floor<data.up.get(0))\r\n data.state = 1;\r\n else if(data.floor>data.up.get(0))\r\n data.state = -1;\r\n }\r\n else if(!data.down.isEmpty() && data.isMoving==false){\r\n if(data.floor<data.down.get(0))\r\n data.state = 1;\r\n else if(data.floor>data.down.get(0))\r\n data.state = -1;\r\n\r\n } \r\n else if(data.isMoving == false)\r\n data.state = 0;\r\n }", "@Override\n public void preUpdate(){\n super.preUpdate();\n if(this.isMoving){\n ArrayList<Rect> spriteSequence = ImageManager.inst().getImg(getImgId()).getDirSequence(curDirection);\n curSpriteIndex = (curSpriteIndex + 1) % spriteSequence.size();\n\n Vector2D newPos = this.getSpritePos().applyDir(this.getCurDirection(), this.getMoveSpeed());\n this.setSpritePos(newPos);\n CollideDetector.setDirtyFlag(true);\n }\n }", "private void setDirection() {\n directionX = corePos.getX() - projectile.getX();\n directionY = corePos.getY() - projectile.getY();\n\n double length = Math.sqrt(directionX*directionX + directionY*directionY);\n\n if (length != 0) {\n directionX = directionX/length;\n directionY = directionY/length;\n }\n }", "@Override\n public void updateImages()\n {\n image = ThemeManager.getInstance().getObstacleImage();\n blackedOutImage = ThemeManager.getInstance().getDisabledImage(\"obstacle\");\n }", "public void update() {\n\t\tgetLocation().offsetX(getDirection().getXOffset());\n\t\tgetLocation().offsetY(getDirection().getYOffset());\n\t\t\n\t\tChunk center = World.getMap().getCenterChunk();\n\t\t\n\t\tint localX = (int) (getLocation().getX() - center.getData().getRealX());\n\t\tint localY = (int) (getLocation().getY() - center.getData().getRealY());\n\t\t\n\t\tif(localX < 0 ||localY< 0\n\t\t\t|| localX > 256 || localY > 256) {\n\t\t\t\tWorld.getMap().load(getLocation());\n\t\t}\n\t}", "@Override\n public void draw(Graphics2D graphics, int layer) {\n if (this.layer == layer && direction != null) {\n curImage = ImageHelper.rescale(image, (int) fullDirection.magnitude(), GameSettings.ROPE_HEIGHT);\n if (alive && curImage != null)\n graphics.drawImage(curImage, transform.getFullAffine(), null);\n }\n }", "private void updateSprite(){\n //facing front\n getImage().clear();\n getImage().drawImage(SHEET,-(frame%SHEET_W)*SPRITE_W,0);\n if(!goLeft) getImage().mirrorHorizontally();\n if (iframes>0&&iframes%10<5) setImage(SpriteHelper.makeWhite( getImage()));\n else frame = frame + 1 % (SHEET_H* SHEET_W);\n }", "void changeDirection();", "@Override\n\tpublic void update() {\n\t\tif(!canSwoop)\n\t\tif(System.currentTimeMillis() - lastAnim >= 200){\t\n\t\t\tif(currentAnim < 2){\n\t\t\t\tcurrentAnim++;\n\t\t\t} else {\n\t\t\t\tcurrentAnim = 0;\n\t\t\t}\n\t\t\t\n\t\t\tSystem.out.println(\"ANIMATING image: \" + currentAnim);\n\t\t\tlastAnim = System.currentTimeMillis();\t\t\n\t\t\t}\n\t\t\n\t\tthis.texture = Assets.shadowAnim[currentAnim];\n\t}", "@Override\n\tpublic void move() {\n\t\tx += ((direction) * xSpeed);\n\t\t//If any sprite has collided with the left or right edge of the screen set collided to true\n\t\tif (x >= 800 - spriteImage.getWidth(null) || x <= 0) collided = true;\n\t}", "public void updateImage(final Image image) { //The Reason that we have Set the Image to final over here is because once we fetch the Image from the AbsolutePath then after scaling this should be the Final Image in which we detect the Faces \n\t\timagelabel.setIcon(new ImageIcon(scaleImage(image))); \n\t}", "public void update() {\n\t\tfirstMove = false;\n\t\tif (color == 1) xrange = -1;\n\t\tif (color == 0) xrange = 1;\n\t}", "public void reverseFrame() {\r\n if (reversedImage) {\r\n reversedImage = false;\r\n } else {\r\n reversedImage = true;\r\n }\r\n }", "private void updateBit() {\r\n float frameTime = 10f;\r\n xVel += (xAccel * frameTime);\r\n yVel += (yAccel * frameTime);\r\n\r\n float xS = (xVel / 20) * frameTime; //PROVIDE THE ANGULE OF THE POSITION\r\n float yS = (yVel / 20) * frameTime; // WITH LESS DENOMINADOR THE BALL MOVE IS MORE DIFFICULT\r\n\r\n xPos -= xS;\r\n yPos -= yS;\r\n\r\n if (xPos > xMax) {\r\n xPos = xMax;\r\n } else if (xPos < 0) {\r\n xPos = 0;\r\n }\r\n\r\n if (yPos > yMax) {\r\n yPos = yMax;\r\n } else if (yPos < 0) {\r\n yPos = 0;\r\n }\r\n\r\n\r\n }", "public void act() \n {\n move(-2);\n if(isAtEdge())\n {\n turn(180);\n getImage().mirrorVertically();\n }\n }", "public void updateFaceDir() {\n\t\tif (faceDirection != null)\n\t\t\tface(location.transform(faceDirection.getDiffX(),\n\t\t\t\t\tfaceDirection.getDiffY(), 0));\n\t}", "@SuppressWarnings(\"unchecked\")\n\t\t@Override\n\t\tprotected void onProgressUpdate(Object... values) {\n\t\t\tsuper.onProgressUpdate(values);\n\n\t\t\tfloat halfWidth = imswitcher.getWidth() / 2.0f;\n\t\t\tfloat halfHeight = imswitcher.getHeight() / 2.0f;\n\t\t\tint duration = 500;\n\t\t\tint depthz = 0;// viewFlipper.getWidth()/2;\n\n\t\t\tRotate3D rdin = new Rotate3D(75, 0, 0, halfWidth, halfHeight);\n\t\t\trdin.setDuration(duration);\n\t\t\trdin.setFillAfter(true);\n\t\t\timswitcher.setInAnimation(rdin);\n\t\t\tRotate3D rdout = new Rotate3D(-15, -90, 0, halfWidth, halfHeight);\n\n\t\t\trdout.setDuration(duration);\n\t\t\trdout.setFillAfter(true);\n\t\t\timswitcher.setOutAnimation(rdout);\n\n\t\t\ti = (i + 1);\n\t\t\tint p = i % 4;\n\n\t\t\tif (p >= 0) {\n\t\t\t\tsetpic(p);\n\t\t\t\timswitcher.setImageResource(imageIds[p]);\n\t\t\t} else {\n\n\t\t\t\tint k = 4 + p;\n\t\t\t\tsetpic(k);\n\t\t\t\timswitcher.setImageResource(imageIds[k]);\n\t\t\t}\n\n\t\t}", "void loopy() {\n if (position.y < -50) {\n position.y = Constants.height + 50;\n } else\n if (position.y > Constants.height + 50) {\n position.y = -50;\n }\n if (position.x< -50) {\n position.x = Constants.width +50;\n } else if (position.x > Constants.width + 50) {\n position.x = -50;\n }\n }", "public void mirrorImageAction() {\n\t\tif (selectedAnimalModel == null || isImageChangedFlag) {\n\t\t\tshowDialog(ERROR_MESSAGE, \"Save animal before mirroring image.\");\n\t\t\treturn;\n\t\t}\n\n\t\tAsyncTask asyncTask = new AsyncTask() {\n\t\t\t@Override\n\t\t\tprotected void onDone(boolean success) {\n\t\t\t\tif (!success) {\n\t\t\t\t\tshowDialog(ERROR_MESSAGE, \"Cannot mirror image.\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tprotected Boolean doInBackground() throws Exception {\n\t\t\t\ttry {\n\t\t\t\t\tDataManager.getInstance().mirrorImage(selectedAnimalModel);\n\n//\t\t\t\t\tsaveAnimal(AnimalDetailPanel.EDIT_ANIMAL);\n\t\t\t\t\tisImageChangedFlag = false;\n\t\t\t\t\tmultimediaPanel.setImage(selectedAnimalModel);\n\t\t\t\t} catch (DataManagerException e) {\n\t\t\t\t\tLogger.createLog(Logger.ERROR_LOG, e.getMessage());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tasyncTask.start();\n\n\t}", "public void changeIcon(){\r\n\t\tif (pacman.direction.equals(\"up\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/UpOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"down\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/DownOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"left\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/LeftOpened.png\"));\r\n\t\t}\r\n\t\tif (pacman.direction.equals(\"right\")){\r\n\t\t\tif (mouthOpen)\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightClosed.png\"));\r\n\t\t\telse\r\n\t\t\t\tpacmansprite.setIcon(new ImageIcon(\"src/pacman_img/RightOpened.png\"));\r\n\t\t}\r\n\t\t\r\n\t\tmouthOpen = !mouthOpen;\r\n\t}", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "protected void update(){\n\t\t_offx = _x.valueToPosition(0);\n\t\t_offy = _y.valueToPosition(0);\n\t}", "@Override\n public void update(){\n super.update();\n if(getPositionY() < -2.f){\n setAngleXYDeltaTheta(0.0f);\n setAngleXY(0.0f);\n setPositionY(1.0f);\n setDy(0.0f);\n setDx(0.0f);\n setInPlay(true);\n }\n }", "@Override\n\tpublic void draw(Canvas game) {\n\t\tGraphicsContext gc = game.getGraphicsContext2D();\n\t\tgc.drawImage(image, posX, Y_LAND - image.getHeight());\n\t\t\n\t}", "public void update(GameModel model) {\n assert model.getRowCount() == this.rowCount && model.getColumnCount() == this.columnCount;\n //\n for (int row = 0; row < this.rowCount; row++){\n for (int column = 0; column < this.columnCount; column++){\n CellValue value = model.getCellValue(row, column);\n if (value == CellValue.WALL) {\n this.cellViews[row][column].setImage(this.wallImage);\n }\n else if (value == CellValue.PISTOLA) {\n this.cellViews[row][column].setImage(this.pistolaImage);\n }\n else if (value == CellValue.ALIENEGG) {\n this.cellViews[row][column].setImage(this.alienEggImage);\n }\n else {\n this.cellViews[row][column].setImage(null);\n }\n //verifique en qué dirección va astronauta y muestre la imagen correspondiente\n if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && (GameModel.getLastDirection() == GameModel.Direction.RIGHT || GameModel.getLastDirection() == GameModel.Direction.NONE)) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.LEFT) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.UP) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n else if (row == model.getAstronautaLocation().getX() && column == model.getAstronautaLocation().getY() && GameModel.getLastDirection() == GameModel.Direction.DOWN) {\n this.cellViews[row][column].setImage(this.astronautaImage);\n }\n //hacer que los OVNIS \"parpadeen\" hacia el final de ovniEatingMode (mostrar imágenes OVNI regulares en actualizaciones alternas del contador)\n if (GameModel.isOvniEatingMode() && (Controller.getovniEatingModeCounter() == 6 ||Controller.getovniEatingModeCounter() == 4 || Controller.getovniEatingModeCounter() == 2)) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n //mostrar OVNIS azules en ovniEatingMode\n else if (GameModel.isOvniEatingMode()) {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovnidestructibleImage);\n }\n }\n //display imágenes OVNIS regulares de lo contrario\n else {\n if (row == model.getOvniLocation().getX() && column == model.getOvniLocation().getY()) {\n this.cellViews[row][column].setImage(this.ovniImage);\n }\n if (row == model.getOvni2Location().getX() && column == model.getOvni2Location().getY()) {\n this.cellViews[row][column].setImage(this.ovni2Image);\n }\n }\n }\n }\n }", "public void moveRight() {\r\n speedX = 6;\r\n Texture r1 = changeImg (\"./graphics/characters/player/rightWalk1.png\");\r\n img = new Sprite (r1);\r\n if (centerX > startScrolling)\r\n bg.setBackX (bg.getBackX () + 6);\r\n bg.update ();\r\n }", "public void update(int pos,ImageView id , int count){\r\n\t\tif(count == 2 || count == 4 || count == 6 || count == 8)\r\n\t\t{\r\n\t\t\t// player 2 turn\r\n\t\t\tmyBitmap = BitmapFactory.decodeResource(getResources(),R.drawable.o);\r\n\t\t\t//Toast.makeText(getApplicationContext(), id + \" even \"+ count ,Toast.LENGTH_SHORT).show();\r\n\t\t\tsetvalue = 0;\r\n\t\t\tp1.setBackgroundColor(getResources().getColor(android.R.color.holo_green_light));\r\n\t\t\tp2.setBackgroundColor(getResources().getColor(android.R.color.white));\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse if(count == 1 || count == 3 || count ==5 || count ==7 || count == 9)\r\n\t\t{\r\n\t\t\t// player 1 turn \r\n\t\t\tmyBitmap = BitmapFactory.decodeResource(getResources(),R.drawable.x);\r\n\t\t\tsetvalue = 1;\r\n\t\t\tp2.setBackgroundColor(getResources().getColor(android.R.color.holo_green_light));\r\n\t\t\tp1.setBackgroundColor(getResources().getColor(android.R.color.white));\r\n\t\t}\r\n\t\t/* Check if \"x\" or \"o\" */\r\n\t\t/*set Image image in position and turn it deaf*/\r\n\t\tImageView resource = id;\r\n \tresource.setImageBitmap(myBitmap);\r\n \tresource.setClickable(false);\r\n\t\t/*set Image image in position and turn it deaf*/\r\n\t\t\r\n \t/*split to set values in array */\r\n \tint target = pos;\r\n \t\r\n \t/* Update array */\r\n \t\r\n \tdata[target] = setvalue;\r\n \tLog.i(\"Array\", \"arr = \" + Arrays.toString(data));\r\n \t/* Update array */\r\n \tCheckstatus();\r\n\t}", "public void movement(){\n\t\t\n\t\tdelayCounter++;\n\t\t\n\t\tif(direction == Direction.RIGHT){\n\t\t\txCoor += 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[0] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[1];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[1] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[2];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[2] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\tif(direction == Direction.LEFT){\n\t\t\txCoor -= 1;\n\t\t\tbound.x = xCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[3] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[4];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[4] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[5];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[5] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.UPWARD){\n\t\t\tyCoor += 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\t\t\tif ( image == Assets.enemySprite[10] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[11];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[11] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\telse if(direction == Direction.DOWNWARD){\n\t\t\tyCoor -= 1;\n\t\t\tbound.y = yCoor+30;\n\t\t\t\n\n\t\t\tif ( image == Assets.enemySprite[6] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[7];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[7] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[8];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t\telse if ( image == Assets.enemySprite[8] && delayCounter >= delay ){\n\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\tdelayCounter = 0;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\tenemyWalk += 1;\n\t\t\n\t\t//This parts checks to see if the enemy has to turn or not.\n\t\tif(enemyWalk == screen.maps[screen.currentMap].path.getTileWidth()){\n\t\t\tint x = xCoor;\n\t\t\tint y = yCoor;\n\t\t\t\n\t\t\tif(direction == Direction.RIGHT){\n\t\t\t\tx = xCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.LEFT){\n\t\t\t\tx = xCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.UPWARD){\n\t\t\t\ty = yCoor + 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\tif(direction == Direction.DOWNWARD){\n\t\t\t\ty = yCoor - 1;\n\t\t\t\tprevious = direction;\n\t\t\t}\n\t\t\t\n\t\t\tint tileBlockX = (int) (x/screen.maps[screen.currentMap].path.getTileWidth());\n\t\t\tint tileBlockY = (int) (y/screen.maps[screen.currentMap].path.getTileHeight());\n\t\t\t\n\t\t\t//As long as the enemy has not gone the opposite direction, the enemy will continue to move in the direction is was going originally.\n\t\t\tif(tileBlockX < screen.maps[screen.currentMap].path.getWidth()-1 && tileBlockX > 0){\n\t\t\t\tif(tileBlockY < screen.maps[screen.currentMap].path.getHeight()-1 && tileBlockY > 0){\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY + 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.DOWNWARD){\n\t\t\t\t\t\tdirection = Direction.UPWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[10];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY - 1).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.UPWARD){\n\t\t\t\t\t\tdirection = Direction.DOWNWARD;\n\t\t\t\t\t\timage = Assets.enemySprite[6];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX + 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.LEFT){\n\t\t\t\t\t\tdirection = Direction.RIGHT;\n\t\t\t\t\t\timage = Assets.enemySprite[0];\n\t\t\t\t\t}\n\t\t\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX - 1, tileBlockY).getTile().getProperties().containsKey(\"ground\") == true && previous != Direction.RIGHT){\n\t\t\t\t\t\tdirection = Direction.LEFT;\n\t\t\t\t\t\timage = Assets.enemySprite[3];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//If the enemy makes it to the end, it is no longer in game.\n\t\t\tif(screen.maps[screen.currentMap].path.getCell(tileBlockX, tileBlockY).getTile().getProperties().containsKey(\"finish\") == true){\n\t\t\t\tinGame = false;\n\t\t\t\tscreen.playerHealth--;\n\t\t\t}\n\t\t\t\n\t\t\tenemyWalk = 0;\n\t\t}\n\t}", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n if (game.hasPlayer(row, column)){\n setImage2(\"images/player.png\");\n } else {\n player = null;\n }\n \n //ImageIcon image = null;//new ImageIcon(\"images/blank.png\");\n JLabel lblImage = new JLabel(); // create a new label to put an image on\n \n // call the method to set a new Buffered image to this panel\n \n if (squareVisible && image == null){\n switch ( terrain )\n {\n case SAND : setImage(\"images/sand.png\"); break;// = new ImageIcon(\"images/sand.png\"); break;\n case FOREST : setImage(\"images/forest.png\"); break;\n case WETLAND : setImage(\"images/wetland.png\"); break;\n case SCRUB : setImage(\"images/scrub.png\"); break;\n case WATER : setImage(\"images/water.png\"); break;\n default : image = null; break;\n }\n }\n \n// this is old code that use to change the graphics, trying BufferedImage instead of IconImage\n// switch ( terrain )\n// {\n// case SAND : setImage(\"images/forest.png\");// = new ImageIcon(\"images/sand.png\"); break;\n// case FOREST : image = new ImageIcon(\"images/forest.png\"); break;\n// case WETLAND : image = new ImageIcon(\"images/wetland.png\"); break;\n// case SCRUB : image = new ImageIcon(\"images/scrub.png\"); break;\n// case WATER : image = new ImageIcon(\"images/water.png\"); break;\n// default : image = null; break;\n// }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column)); \n }\n else {\n lblText.setText(\"\");\n image = null;\n }\n \n // if the game is not being played, remove the activeBorder (this fixes the multiple borders glitch)\n// if (game.getState() != GameState.PLAYING) {\n// setBorder(normalBorder);\n// } \n \n // set the redsquare border to active if the player is here\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n \n\n // add the imageIcon to the gridsquare panel\n //lblImage.setIcon((Icon) image); // add the image to the label\n this.add(lblImage); // add the jlabel image to the current gridsquare\n \n JLabel lblImage2 = new JLabel(); \n this.add(lblImage2);\n \n }", "public void update() {\r\n if(selectedImage == null) {\r\n xStartProperty.setText(\"\");\r\n yStartProperty.setText(\"\");\r\n xEndProperty.setText(\"\");\r\n yEndProperty.setText(\"\");\r\n rotationProperty.setText(\"\");\r\n } else {\r\n xStartProperty.setText(String.valueOf(selectedImage.getXStart()));\r\n yStartProperty.setText(String.valueOf(selectedImage.getYStart()));\r\n xEndProperty.setText(String.valueOf(selectedImage.getXEnd()));\r\n yEndProperty.setText(String.valueOf(selectedImage.getYEnd()));\r\n rotationProperty.setText(String.valueOf(selectedImage.getRotation()));\r\n }\r\n }", "public void update()\n {\n // always roatating time by 7 for fixed point calculation\n x = (velocity*cos(theta) *time) >> 21;\n int yFirstPart = (int)(velocity*sin(theta)*time) >> 21;\n int ySecondPart = (int)((g*time*time) >> 15);\n y = yFirstPart - ySecondPart;\n y =initialY - y;\n x= x + initialX;\n time+= updateSpeed;\n if(lastY == -1)\n {\n lastY = y;\n }else{\n int direction = lastY - y;\n if(lastDirection == -1)\n {\n lastDirection = direction;\n }else{\n if(lastDirection != 0 && direction != 0)\n {\n \n int signOfDirection = lastDirection / Math.abs(lastDirection);\n int signOfLastDirection = direction / Math.abs(direction);\n if(signOfDirection != signOfLastDirection)\n {\n if(!reachedTop)\n {\n onTop();\n reachedTop = true;\n }\n \n setIsOnHalf(true);\n }\n }\n lastY = y;\n }\n \n }\n }", "public void direction()\n {\n if(!goLeft){\n horzVelocity = 1;\n }else{\n horzVelocity = -1;\n }\n }", "public void flip() {\n\t\t\tif (showing.getImage() == faceUp) {\n\t\t\t\tshowing.setImage(FACE_DOWN);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tshowing.setImage(faceUp);\n\t\t\t}\n\t\t}", "private void change_im_check(boolean boo){\r\n if(boo){ //IMAGEN SI EL MEASURE ES CORRECTO\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img06.png\")));\r\n }else{ //IMAGEN PARA LA BUSQUEDA DE UN MEASURE\r\n im_check.setImage(new Image(getClass().getResourceAsStream(\"/Images/img34.png\")));\r\n }\r\n }", "@Override\n public void update() {\n super.update();\n\n //check if ball is out\n checkBallOutTopBottom();\n checkBallOutLeftRight();\n }", "void onDirectionChanged(Direction direction);", "public void updateLocation()\r\n {\r\n\t\timg.setUserCoordinator(latitude, longitude);\r\n\t\timg.invalidate();\r\n\t}", "public void move(TrackerState state) {\n\t\t\n\t\tcurrentPosition[0] = state.devicePos[0];\n\t\tcurrentPosition[1] = state.devicePos[1];\n\t\tcurrentPosition[2] = state.devicePos[2];\n\t\t\n\t\tboolean processMove = false;\n\t\t\n\t\tboolean isWheel = (state.actionType == TrackerState.TYPE_WHEEL);\n\t\tboolean isZoom = (isWheel || state.ctrlModifier);\n\t\t\n\t\tif (isZoom) {\n\t\t\t\n\t\t\tdirection[0] = 0;\n\t\t\tdirection[1] = 0;\n\t\t\t\n\t\t\tif (isWheel) {\n\t\t\t\tdirection[2] = state.wheelClicks * 0.1f;\n\t\t\t\t\n\t\t\t} else if (state.ctrlModifier) {\n\t\t\t\tdirection[2] = (currentPosition[1] - startPosition[1]);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tdirection[2] = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif (direction[2] != 0) {\n\t\t\t\t\n\t\t\t\tdirection[2] *= 16;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tinVector.x = startViewMatrix.m02;\n\t\t\t\tinVector.y = startViewMatrix.m12;\n\t\t\t\tinVector.z = startViewMatrix.m22;\n\t\t\t\tinVector.normalize();\n\t\t\t\tinVector.scale(direction[2]);\n\t\t\t\t\n\t\t\t\tpositionVector.add(inVector);\n\t\t\t\t\n\t\t\t\t// stay above the floor\n\t\t\t\tif (positionVector.y > 0) {\n\t\t\t\t\tdestViewMatrix.set(startViewMatrix);\n\t\t\t\t\tdestViewMatrix.setTranslation(positionVector);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t\n\t\t\tdirection[0] = -(startPosition[0] - currentPosition[0]);\n\t\t\tdirection[1] = -(currentPosition[1] - startPosition[1]);\n\t\t\tdirection[2] = 0;\n\t\t\t\n\t\t\tfloat Y_Rotation = direction[0];\n\t\t\tfloat X_Rotation = direction[1];\n\t\t\t\n\t\t\tif( ( Y_Rotation != 0 ) || ( X_Rotation != 0 ) ) {\n\t\t\t\t\n\t\t\t\tdouble theta_Y = -Y_Rotation * Math.PI;\n\t\t\t\tdouble theta_X = -X_Rotation * Math.PI;\n\t\t\t\t\n\t\t\t\tdata.viewpointTransform.getTransform(startViewMatrix);\n\t\t\t\tstartViewMatrix.get(positionVector);\n\t\t\t\t\n\t\t\t\tpositionVector.x -= centerOfRotation.x;\n\t\t\t\tpositionVector.y -= centerOfRotation.y;\n\t\t\t\tpositionVector.z -= centerOfRotation.z;\n\t\t\t\t\n\t\t\t\tif (theta_Y != 0) {\n\n\t\t\t\t\trot.set(0, 1, 0, (float)theta_Y);\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (theta_X != 0) {\n\t\t\t\t\t\n\t\t\t\t\tvec.set(positionVector);\n\t\t\t\t\tvec.normalize();\n\t\t\t\t\tfloat angle = vec.angle(Y_AXIS);\n\t\t\t\t\t\n\t\t\t\t\tif (angle == 0) {\n\t\t\t\t\t\tif (theta_X > 0) {\n\t\t\t\t\t\t\trightVector.x = startViewMatrix.m00;\n\t\t\t\t\t\t\trightVector.y = startViewMatrix.m10;\n\t\t\t\t\t\t\trightVector.z = startViewMatrix.m20;\n\t\t\t\t\t\t\trightVector.normalize();\n\t\t\t\t\t\t\trot.set(rightVector.x, 0, rightVector.z, (float)theta_X);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trot.set(0, 0, 1, 0);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((theta_X + angle) < 0) {\n\t\t\t\t\t\t\ttheta_X = -(angle - 0.0001f);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tvec.y = 0;\n\t\t\t\t\t\tvec.normalize();\n\t\t\t\t\t\trot.set(vec.z, 0, -vec.x, (float)theta_X);\n\t\t\t\t\t}\n\t\t\t\t\tmtx.set(rot);\n\t\t\t\t\tmtx.transform(positionVector);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tpositionPoint.x = positionVector.x + centerOfRotation.x;\n\t\t\t\tpositionPoint.y = positionVector.y + centerOfRotation.y;\n\t\t\t\tpositionPoint.z = positionVector.z + centerOfRotation.z;\n\t\t\t\t\n\t\t\t\t// don't go below the floor\n\t\t\t\tif (positionPoint.y > 0) {\n\t\t\t\t\t\n\t\t\t\t\tmatrixUtils.lookAt(positionPoint, centerOfRotation, Y_AXIS, destViewMatrix);\n\t\t\t\t\tmatrixUtils.inverse(destViewMatrix, destViewMatrix);\n\t\t\t\t\t\n\t\t\t\t\tprocessMove = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (processMove) {\n\t\t\t\n\t\t\tboolean collisionDetected = \n\t\t\t\tcollisionManager.checkCollision(startViewMatrix, destViewMatrix);\n\t\t\t\n\t\t\tif (!collisionDetected) {\n\t\t\t\tAV3DUtils.toArray(destViewMatrix, array);\n\t\t\t\tChangePropertyTransientCommand cptc = new ChangePropertyTransientCommand(\n\t\t\t\t\tve, \n\t\t\t\t\tEntity.DEFAULT_ENTITY_PROPERTIES, \n\t\t\t\t\tViewpointEntity.VIEW_MATRIX_PROP,\n\t\t\t\t\tarray,\n\t\t\t\t\tnull);\n\t\t\t\tcmdCntl.execute(cptc);\n\t\t\t\tif (statusManager != null) {\n\t\t\t\t\tstatusManager.fireViewMatrixChanged(destViewMatrix);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tstartPosition[0] = currentPosition[0];\n\t\tstartPosition[1] = currentPosition[1];\n\t\tstartPosition[2] = currentPosition[2];\n\t}", "public void changeRow(int row, int state,boolean direction) {\n\t\tint aux=-1;\n\t\tif(state==1) aux=1;\n\t\tif(direction==true) {\n\t\t\taperture[row][0]=aperture[row][0]+aux;\n\t\t}\n\t\telse {\n\t\t\taperture[row][1]=aperture[row][1]+aux;\n\t\t}\n\t}", "public void move()\r\n {\r\n if(goRight)\r\n {\r\n setLocation(getX()+10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }else\r\n {\r\n setLocation(getX()-10,getY()+3);\r\n if(contFall<8)\r\n contFall++;\r\n else contFall=0;\r\n switch(contFall)\r\n {\r\n case 0:setImage(im1);\r\n break;\r\n case 2:setImage(im2);\r\n break;\r\n case 4:setImage(im3);\r\n break;\r\n case 6:setImage(im4);\r\n break;\r\n }\r\n }\r\n if(getY()>getWorld().getHeight())\r\n ((CaveWorld)(getWorld())).deleteAxe(this);\r\n }", "public void updateImageForIndex(int index) {\n\t\t//Nothing to do\n\t}", "private void animateRight(){\n if(frame == 1){\n setImage(run1);\n }\n else if(frame == 2){\n setImage(run2);\n }\n else if(frame == 3){\n setImage(run3);\n }\n else if(frame == 4){\n setImage(run4);\n }\n else if(frame == 5){\n setImage(run5);\n }\n else if(frame == 6){\n setImage(run6);\n }\n else if(frame == 7){\n setImage(run7);\n }\n else if(frame == 8){\n setImage(run8);\n frame =1;\n return;\n }\n frame ++;\n }", "public void hreflect() {\n int rows= currentIm.getRows();\n int cols= currentIm.getCols();\n int h= 0;\n int k= rows-1;\n //invariant: rows 0..h-1 and k+1.. have been inverted\n while (h < k) {\n // Swap row h with row k\n // invariant: pixels 0..c-1 of rows h and k have been swapped\n for (int c= 0; c != cols; c= c+1) {\n currentIm.swapPixels(h, c, k, c);\n }\n \n h= h+1; k= k-1;\n }\n }", "private void updateDirection()\n {\n if (Math.abs(InputSystem.LT_Button_Control_Stick) > 0.1)\n {\n // if lt button is pressed, reverse direction of elevator\n setReverseDirection(true);\n }\n else\n {\n setReverseDirection(false);\n }\n }", "public void update() {\n\t\t//Start updting the image\n\t\timg.loadPixels();\n\t\t\n\t\t//for every cell apply a color\n\t\tGridCell[] cells = grid.getCells();\n\t\tfor(int i = 0 ; i < cells.length; i++) {\n\t\t\timg.pixels[i] = cells[i].getMiniMapColor(ignoreDiscovered);\n\t\t}\n\t\t\n\t\t//Now update the image\n\t\timg.updatePixels();\n\t}", "public void update(double elapsedTime){\n ViewPort viewport = AsteroidsGame.SINGLETON.get_gameViewPort();\n\n if(_position.x + get_imageWidth() < viewport.get_position().x ||\n _position.x - get_imageWidth() > ( viewport.get_position().x + viewport.get_width() ) ||\n _position.y + get_imageHeight() < viewport.get_position().y ||\n _position.y - get_imageHeight() > ( viewport.get_position().y + viewport.get_height() )\n ){\n set_visible(false);\n }\n else{\n set_visible(true);\n }\n }", "@Override\n\tpublic void update() {\n\n\t\t// Update camera coordinates based off of the width and height.\n\t\tif (cameraStalk != null) {\n\t\t\tint width = dc.getWidth();\n\t\t\tint height = dc.getHeight();\n\n\t\t\tcamera[0] = cameraStalk.coor_x - (width - m.cellWidth) / 2;\n\t\t\tcamera[1] = cameraStalk.coor_y - (height - m.cellHeight) / 2;\n\t\t\tif (camera[0] < 0) {\n\t\t\t\tcamera[0] = 0;\n\t\t\t} else {\n\t\t\t\tint x;\n\t\t\t\tif (camera[0] > (x = m.mapWmax - width + m.cellWidth)) {\n\t\t\t\t\tcamera[0] = x;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (camera[1] < 0) {\n\t\t\t\tcamera[1] = 0;\n\t\t\t} else {\n\t\t\t\tint y;\n\t\t\t\tif (camera[1] > (y = m.mapHmax - height + m.cellHeight)) {\n\t\t\t\t\tcamera[1] = y;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Draw in the background.\n\t\tif (background != NullImg.getInstance()) {\n\t\t\tint bg_width = background.getWidth();\n\t\t\tint bg_height = background.getHeight();\n\t\t\t// The offset of the image must decrease as the camera's position\n\t\t\t// increases.\n\t\t\tfor (int x = (-camera[0] % -bg_width); x < dc.getWidth(); x += bg_width) {\n\t\t\t\tfor (int y = (-camera[1] % -bg_height); y < dc\n\t\t\t\t\t\t.getHeight(); y += bg_height) {\n\t\t\t\t\tbackground.drawSlide(x, y, dc);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Update all objects.\n\t\tif (update) {\n\t\t\tfor (SimpleObject s = m.getDrawBegin(); s != null; s = s.updateNext) {\n\t\t\t\ts.newUpdate();\n\t\t\t}\n\t\t}\n\n\t\t// Paint all objects.\n\t\tfor (SimpleObject s = m.getDrawBegin(); s != null; s = s.drawNext) {\n\t\t\ts.updateNext = s.drawNext;\n\t\t\ts.i.drawSlide(s.coor_x + s.off[0] - camera[0], s.coor_y + s.off[1]\n\t\t\t\t\t- camera[1], dc);\n\t\t}\n\n\t\t// Update the world object last.\n\t\tswo.update();\n\t\tdc.paint();\n\t}", "public void changeDirection()\n {\n if(goLeft){\n goLeft = false;\n }else{\n goLeft = true;\n }\n }", "@Override\r\n\tprotected void updateImage(final IScope scope) {\n\t}", "public void setInvertedImage(double position, double height) {\n // set the X coordinate of the image center\n // X imageCenter = X of lensCenter + the distance between the lens and the image\n imageCenterX = lensCenterX + position;\n\n // remove the image from the pane if it's already existed\n removeFromPane(image);\n \n // create new image rectangle\n // x coordinate = Xcenter - half of the rectangle's width (since the width of the object is equal to the image)\n // y coordinate = Y coordinate of the ground line\n image = new Rectangle(objectWidth, height);\n image.setLayoutX(imageCenterX - objectWidth / 2);\n image.setLayoutY(groundLineY);\n\n // Check the comboBox to set the corresponding inverted image\n if (pickPicture.getValue().equals(\"Candle\")) {\n image.setFill(AssetManager.getInvertedCandleImage());\n } else if (pickPicture.getValue().equals(\"Can\")) {\n image.setFill(AssetManager.getInvertedCanImage());\n }\n else\n image.setFill(AssetManager.getInvertedPencilImage());\n \n // add the image rectangle to the pane\n addToPane(image);\n }", "@Override\n\t\tpublic void update(Graphics g) {\n\t\t\t\n\t\t\tImage pieceImg = null;\n\t\t\tif (board.square(row,column).isOccupied()) {\n\t\t\t\tint index = board.square(row,column).piece().imageIndex();\n\t\t\t\tpieceImg = pieceImages[index];\n\t\t\t}\n\t\t\tif (lightSquare)\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, lightSquareImg))); }\n\t\t\telse\n\t\t\t\t{ setIcon(new ImageIcon(combine(pieceImg, darkSquareImg))); }\n\t\t}", "public static void lukisImej(BufferedImage image_dest) {\n int w = image_dest.getWidth();\n int h = image_dest.getHeight();\n\n//\t\tfor(int y=0; y<h;y++)\n//\t\t{\n//\t\t\tfor(int x =0 ; x<w; x++)\n//\t\t\t{\n//\t\t\t\tif(image_dest.getRGB(x, y)==-1)\n//\t\t\t\t\tSystem.out.print(\"1\");\n//\t\t\t\telse\n//\t\t\t\t{\n//\t\t\t\t\t//System.err.print(\"X\"+x+\" Y : \"+y);\n//\t\t\t\t\t//return;\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\n }", "private void changer() {\n\n\t\ttry {\n\t\t\twhile (true) {\n\n\n\t\t\t\tThread.sleep(1000);\n\t\t\t\tvfeu1.lock();\n\t\t\t\tvfeu2.lock();\n\t\t\t\tif(r.feu==1)\n\t\t\t\t{\n\t\t\t\t\t//if(r.x>=100 && r.x<400)\n\t\t\t\t\tif(r.x>=100 && r.x<200)\n\t\t\t\t\t{\n\t\t\t\t\t\tcf1.await();\n\n\t\t\t\t\t}\n\n\n\t\t\t\t\tr.img= ImageIO.read(new File(\"C:/Users/Anonyme/Tutorials/DAC_Controle_Carrefour/src/Carrefour/route.png\"));\n\n\t\t\t\t\tr.img1=ImageIO.read(new File(\"C:/Users/Anonyme/Tutorials/DAC_Controle_Carrefour/src/Carrefour/pietonvert.png\"));\n\t\t\t\t\tr.img2= ImageIO.read(new File(\"C:/Users/Anonyme/Tutorials/DAC_Controle_Carrefour/src/Carrefour/pietonrouge.png\"));\n\t\t\t\t\tr.feu=2;\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t//if(r.y>=120 && r.y<300)\n\t\t\t\t\tif(r.y>=200 && r.y<300)\n\t\t\t\t\t{ \n\t\t\t\t\t\tcf2.await();\n\t\t\t\t\t}\n\n\t\t\t\t\tr.img= ImageIO.read(new File(\"C:/Users/Anonyme/Tutorials/DAC_Controle_Carrefour/src/Carrefour/route.png\"));\n\n\t\t\t\t\tr.img1=ImageIO.read(new File(\"C:/Users/Anonyme/Tutorials/DAC_Controle_Carrefour/src/Carrefour/pietonrouge.png\"));\n\t\t\t\t\tr.img2= ImageIO.read(new File(\"C:/Users/Anonyme/Tutorials/DAC_Controle_Carrefour/src/Carrefour/pietonvert.png\"));\n\n\n\t\t\t\t\tr.feu=1;\n\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tr.repaint();\n\t\t\t\tvfeu1.unlock();\n\t\t\t\tvfeu2.unlock();\n\t\t\t}\n\t\t} catch (InterruptedException | IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}finally {\n\n\t\t}\n\n\t}", "public int move () {\n intMoveState = 0;\r\n int pixel1;\r\n int pixel2;\r\n \r\n if (blnUp) {\r\n pixel1 = getPixelRGB (X - 25, Y + 10, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 10, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y -= intSpeed;\r\n intMoveState -= 1;\r\n }\r\n }\r\n if (blnDown) {\r\n pixel1 = getPixelRGB (X - 25, Y + 46, \"r\");\r\n pixel2 = getPixelRGB (X + 25, Y + 46, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n Y += intSpeed;\r\n intMoveState += 1;\r\n }\r\n }\r\n if (blnLeft) {\r\n pixel1 = getPixelRGB (X - 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X - 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X -= intSpeed;\r\n intMoveState -= 2;\r\n }\r\n }\r\n if (blnRight) {\r\n pixel1 = getPixelRGB (X + 30, Y + 15, \"r\");\r\n pixel2 = getPixelRGB (X + 30, Y + 30, \"r\");\r\n \r\n if (pixel1 != 0 && pixel2 != 0) { \r\n X += intSpeed;\r\n intMoveState += 2;\r\n }\r\n }\r\n \r\n try {\r\n dblAngle = Math.atan2((MouseY - Y),(MouseX - X));\r\n if (dblAngle < - Math.PI/4) {\r\n dblAngle = 2 * Math.PI + dblAngle;\r\n }\r\n }catch (ArithmeticException e) {\r\n if (MouseY < Y) {\r\n dblAngle = 3 * Math.PI/2;\r\n }else {\r\n dblAngle = Math.PI/2;\r\n }\r\n }\r\n degreesAngle = (int) (Math.toDegrees(dblAngle)); \r\n \r\n if(intHealth < 0 && !UserInterface.deathScreenVisible){\r\n UserInterface.deathScreenVisible = true;\r\n deathTime = System.nanoTime();\r\n ClientMain.ssm.sendText(\"player,\" + ClientMain.intPlayerNumber + \",iamdeadlol\");\r\n }\r\n \r\n return getPixelRGB (X, Y + 46, \"g\");\r\n }", "public void move(){\n super.move();\n if(getX() >= Main.WIDTH - getWidth() * 1.5) {\n setDirection(-1);\n } else if(getX() <= 50) {\n setDirection(1);\n }\n }", "public void actionPerformed(ActionEvent e)\n {\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }", "public void move() {\n\t\tx+= -1;\n\t\tif (x < 0) {\n\t\t\tx = (processing.width - 1);\n\t\t}\n\t\ty+= 1;\n\t\tif (y > processing.height-1)\n\t\t\ty=0;\n\t}", "public void secondDraw(Graphics2D g2d, BufferedImage image1) {\n// try {\n// image = ImageIO.read(new File(\"Enemy2Bullet.png\"));\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n AffineTransform tx20 = g2d.getTransform();\n AffineTransform tx22 = g2d.getTransform();\n tx20.rotate(theta, location.locX + image1.getWidth() / 2, location.locY + 18 + image1.getHeight() / 2);\n g2d.setTransform(tx20);\n g2d.drawImage(image, location.locX + 112, location.locY + 80, null);\n g2d.setTransform(tx22);\n setLocation(new Location(location.locX + speedX, location.locY + speedY));\n }", "public void move(Direction dir) {\n if (dir == Direction.Up) {\n //be first sprite, update view, be moving sprite update view, be final sprite\n } else if (dir == Direction.Down) {\n\n } else if (dir == Direction.Left) {\n\n } else if (dir == Direction.Right) {\n\n } else {\n throw new Error(\"Direction not valid\");\n }\n }", "@Override\n public void onUp() {\n\n if(player.getDirection().y == 1){\n player.setDirection(new Vector2(0, 1.5f));\n }\n else{\n player.setDirection(new Vector2(0, 1));\n\n }\n }", "@Override\n public void onUpdate(FaceDetector.Detections<Face> detectionResults, Face face) {\n mOverlay.add(mEyesGraphic);\n\n updatePreviousProportions(face);\n\n float leftOpenScore = face.getIsLeftEyeOpenProbability();\n if (leftOpenScore == Face.UNCOMPUTED_PROBABILITY) {\n //cannot be computed nothing is done\n } else {\n isLeftOpen = (leftOpenScore > EYE_CLOSED_THRESHOLD);\n }\n\n float rightOpenScore = face.getIsRightEyeOpenProbability();\n if (rightOpenScore == Face.UNCOMPUTED_PROBABILITY) {\n //false nothing done\n } else {\n isRightOpen = (rightOpenScore > EYE_CLOSED_THRESHOLD);\n }\n\n\n if(face.getEulerZ()>20){\n isRotateRight = true;\n if (rotated==0){\n }\n rotated++;\n //security measure only true after you've passed the prev one\n if (winked>0){\n rotated++;\n }\n\n }\n\n winkLeft = !isLeftOpen && isRightOpen;\n if (winkLeft && rotated>0){\n winked++;\n }\n\n if (face.getIsSmilingProbability()>SMILE_THRESHOLD){\n isSmile = true;\n if (winked>0 && rotated>0){\n smile++;\n }\n\n }\n /*\n Log.i(\"test\",\"Y rotation is\" +face.getEulerY());\n Log.i(\"test\",\"Z rotation is\" +face.getEulerZ());\n Log.i(\"test\",\"smilin prob is\" +face.getIsSmilingProbability());\n*/\n mEyesGraphic.updateItem(face, rotated, winked, smile);\n }", "void setImageProperty() {\n\t\t imgView.setImageResource(R.drawable.weathericon);\n\t\tMatrix matrix = new Matrix();\n\t\trotate += 30;\n\t\tif (rotate == 360) {\n\t\t\trotate = 0;\n\t\t}\n\t\tfloat centerX = imgView.getWidth() / 2;\n\t\tfloat centerY = imgView.getHeight() / 2;\n\t\tmatrix.setRotate(rotate, centerX, centerY);\n\t\t//matrix.setTranslate(10, 20);\n\t\timgView.setImageMatrix(matrix); \n\t\t//ScaleType type = ScaleType.\n\t\t\n\t\t//imgView.setScaleType(scaleType);\n\t \n\t}", "public void animateMovementRight()\n {\n if(animationCount%frameRate == 0)\n {\n imageNumber = (imageNumber + 1)% (rightMvt.length);\n setImage(rightMvt[imageNumber]);\n }\n }", "private void rebuildImageIfNeeded() {\n Rectangle origRect = this.getBounds(); //g.getClipBounds();\n// System.out.println(\"origRect \" + origRect.x + \" \" + origRect.y + \" \" + origRect.width + \" \" + origRect.height);\n\n backBuffer = createImage(origRect.width, origRect.height);\n// System.out.println(\"Image w \" + backBuffer.getWidth(null) + \", h\" + backBuffer.getHeight(null));\n Graphics backGC = backBuffer.getGraphics();\n backGC.setColor(Color.BLACK);\n backGC.fillRect(0, 0, origRect.width, origRect.height);\n// updateCSysEntList(combinedRotatingMatrix);\n paintWorld(backGC);\n }", "public void move()\n {\n xPosition = xPosition + xSpeed;\n yPosition = yPosition + ySpeed;\n draw();\n if (xPosition >= rightBound - diameter)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n {\n }\n if (xPosition <= leftBound)\n {\n xSpeed = -(xSpeed);\n\n }\n else\n {\n }\n if (yPosition <= upBound)\n {\n ySpeed = -(ySpeed);\n\n }\n else\n {\n }\n if (yPosition >= lowBound - diameter)\n {\n ySpeed = -(ySpeed);\n\n }\n else \n {\n }\n\n }", "public void move_down() {\n\t\tlocation.setY(location.getY()+y_velocity);\n\t\timage.setTranslateY(location.getY());\n\t}", "@SuppressWarnings(\"incomplete-switch\")\n\t@Override\n\tprotected void updatePixels(ACTION action) {\n\t\tswitch (action) {\n\t\t\tcase LEFT:\n\t\t\t\tcharX -= speed;\n\t\t\t\tbreak;\n\t\t\tcase RIGHT:\n\t\t\t\tcharX += speed;\n\t\t\t\tbreak;\n\t\t\tcase UP:\n\t\t\t\tcharY -= speed;\n\t\t\t\tbreak;\n\t\t\tcase DOWN:\n\t\t\t\tcharY += speed;\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static void updateFlag() throws GameActionException {\n \tint prevFlag = rc.getFlag(rc.getID());\n \tint newFlag = ((prevFlag >> 5) << 5) | currentRadius;\n \tif (prevFlag != newFlag) {\n \t\trc.setFlag(newFlag);\n \t}\n }" ]
[ "0.7084562", "0.70698607", "0.68811727", "0.68811727", "0.68366206", "0.6483604", "0.64402825", "0.6436292", "0.63806605", "0.63216037", "0.62872404", "0.62705517", "0.6223255", "0.6137136", "0.610111", "0.6099393", "0.60792565", "0.607494", "0.60056764", "0.59610516", "0.59451866", "0.59232247", "0.5915324", "0.5913119", "0.5913119", "0.5891176", "0.58775085", "0.5853363", "0.5852486", "0.5826477", "0.5813813", "0.5786066", "0.57766205", "0.5772612", "0.57152796", "0.57096773", "0.5684057", "0.5675617", "0.56718266", "0.5648062", "0.56462836", "0.5631579", "0.5629145", "0.56085587", "0.55773175", "0.555693", "0.55453074", "0.5528485", "0.55246985", "0.5523354", "0.5518596", "0.55117095", "0.5511707", "0.5500265", "0.5487839", "0.5484897", "0.5478716", "0.5471774", "0.5466211", "0.5449857", "0.5446771", "0.54435784", "0.5433569", "0.54276615", "0.5426166", "0.5421252", "0.542068", "0.5419542", "0.54181683", "0.54136896", "0.5412541", "0.54103535", "0.5408596", "0.5406943", "0.5405531", "0.5395601", "0.5388283", "0.5386037", "0.5385888", "0.5381738", "0.5374499", "0.5370594", "0.53698367", "0.5369211", "0.53532743", "0.5351164", "0.53508484", "0.53441113", "0.53411305", "0.53408736", "0.5338799", "0.5331726", "0.5331425", "0.5331411", "0.5328042", "0.5321233", "0.5318784", "0.5318378", "0.5315269", "0.53120863" ]
0.76131123
0
Private functions / Helper functions
private void setVars(String orgName, String commName, String serialNum, String reason, String insertedBy) { organizationName = orgName; commonName = commName; serialNumber = serialNum; this.reason = reason; this.insertedBy = insertedBy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "private Util() { }", "protected boolean func_70814_o() { return true; }", "private void strin() {\n\n\t}", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "private FormatUtilities() {}", "@Override\n public void func_104112_b() {\n \n }", "private void kk12() {\n\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void method_4270() {}", "private void poetries() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void initUtils() {\n\n\t}", "private ProcessorUtils() { }", "private ArraySetHelper() {\n\t\t// nothing\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "protected boolean func_70041_e_() { return false; }", "private AsciiUtils() {\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private EncryptionUtility(){\r\n\t\treturn;\t\t\r\n\t}", "private void getStatus() {\n\t\t\n\t}", "private BuilderUtils() {}", "public abstract void mo56925d();", "private void m50366E() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected OpinionFinding() {/* intentionally empty block */}", "private FlyWithWings(){\n\t\t\n\t}", "public void smell() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private OMUtil() { }", "public abstract void mo70713b();", "private JacobUtils() {}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private StringUtilities() {\n // nothing to do\n }", "private ReportGenerationUtil() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "private Rekenhulp()\n\t{\n\t}", "private CreateDateUtils()\r\n\t{\r\n\t}", "private XhtmlUtils()\n\t{\n\t}", "String processing();", "public abstract String mo41079d();", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "protected MetadataUGWD() {/* intentionally empty block */}", "private CollectionUtils() {\n\n\t}", "public abstract String mo9239aw();", "public static void listing5_14() {\n }", "protected abstract Set method_1559();", "private RdfFormatUtils() {\n }", "private C3P0Helper() { }", "public interface CommonUtils {\n\tpublic static String getPrintStackTrace(Exception e){\n\t\t//StringWriter writes upon the string\n\t\tStringWriter sw = new StringWriter();\n\t\t//PrintWriter integrates with StringWriter\n\t\tPrintWriter pw = new PrintWriter(sw);\n\t\t//This line used to write in catch block then it will writes in the console prints upon the console\n\t\t//Basically prints the data upon the console\n\t\te.printStackTrace(pw);\n\t\t//it will converts to tostring method into some meaningful data\n\t\treturn sw.toString();\n\t}\n}", "public final void mo51373a() {\n }", "private IOUtilities() {\n }", "private Util() {\n }", "public abstract String mo118046b();", "public void mo38117a() {\n }", "private WAPIHelper() { }", "private static void iterator() {\n\t\t\r\n\t}", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "protected java.util.List x (java.lang.String r19){\n /*\n r18 = this;\n r0 = r18;\n r2 = r0.K;\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\n r2 = (java.util.List) r2;\n if (r2 == 0) goto L_0x000f;\n L_0x000e:\n return r2;\n L_0x000f:\n r12 = java.util.Collections.emptyList();\n r2 = r18.bp();\n r3 = r18.TaskHandler(r19);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r4 = r2.setDrawable(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n if (r4 != 0) goto L_0x0026;\n L_0x0021:\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0026:\n r13 = r2.getScaledMaximumFlingVelocity(r3);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r14 = new java.io.ByteArrayOutputStream;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r2 = 2048; // 0x800 float:2.87E-42 double:1.0118E-320;\n r14.<creatCallTask>(r2);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13, r14);\t Catch:{ all -> 0x00f2 }\n r2 = r14.toByteArray();\t Catch:{ all -> 0x00f2 }\n r2 = com.duokan.kernel.DkUtils.decodeSimpleDrm(r2);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r4 = \"UTF-8\";\n r3.<creatCallTask>(r2, r4);\t Catch:{ all -> 0x00f2 }\n r2 = new org.json.JSONObject;\t Catch:{ all -> 0x00f2 }\n r2.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n if (r2 != 0) goto L_0x0055;\n L_0x004a:\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n r18.bq();\n r2 = r12;\n goto L_0x000e;\n L_0x0055:\n r3 = \"pictures\";\n r15 = com.duokan.reader.common.getPhysicalYPixels.setDrawable(r2, r3);\t Catch:{ all -> 0x00f2 }\n r16 = new java.util.ArrayList;\t Catch:{ all -> 0x00f2 }\n r2 = r15.length();\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.<creatCallTask>(r2);\t Catch:{ all -> 0x00f2 }\n r2 = 0;\n L_0x0067:\n r3 = r15.length();\t Catch:{ all -> 0x00f2 }\n if (r2 >= r3) goto L_0x00d0;\n L_0x006d:\n r3 = r15.getJSONObject(r2);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_md5\";\n r7 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_url\";\n r6 = r3.getString(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"sm_size\";\n r8 = r3.getLong(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"width\";\n r10 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r4 = \"height\";\n r11 = r3.getInt(r4);\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r4 = \".\";\n r3 = r3.append(r4);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r2);\t Catch:{ all -> 0x00f2 }\n r4 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5 = new java.lang.String;\t Catch:{ all -> 0x00f2 }\n r3 = new java.lang.StringBuilder;\t Catch:{ all -> 0x00f2 }\n r3.<creatCallTask>();\t Catch:{ all -> 0x00f2 }\n r17 = \"file:///stuffs/\";\n r0 = r17;\n r3 = r3.append(r0);\t Catch:{ all -> 0x00f2 }\n r3 = r3.append(r7);\t Catch:{ all -> 0x00f2 }\n r3 = r3.toString();\t Catch:{ all -> 0x00f2 }\n r5.<creatCallTask>(r3);\t Catch:{ all -> 0x00f2 }\n r3 = r18;\n r3 = r3.setDrawable(r4, r5, r6, r7, r8, r10, r11);\t Catch:{ all -> 0x00f2 }\n r0 = r16;\n r0.add(r3);\t Catch:{ all -> 0x00f2 }\n r2 = r2 + 1;\n goto L_0x0067;\n L_0x00d0:\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r1 = r16;\n r2.putIfAbsent(r0, r1);\t Catch:{ all -> 0x00f2 }\n r0 = r18;\n r2 = r0.K;\t Catch:{ all -> 0x00f2 }\n r0 = r19;\n r2 = r2.getAllSortStackTraces(r0);\t Catch:{ all -> 0x00f2 }\n r2 = (java.util.List) r2;\t Catch:{ all -> 0x00f2 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x0106, all -> 0x0101 }\n r18.bq();\n goto L_0x000e;\n L_0x00f2:\n r2 = move-exception;\n com.duokan.core.io.getTriangleEdge.setDrawable(r13);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n com.duokan.core.io.getTriangleEdge.setDrawable(r14);\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n throw r2;\t Catch:{ Throwable -> 0x00fa, all -> 0x0101 }\n L_0x00fa:\n r2 = move-exception;\n r2 = r12;\n L_0x00fc:\n r18.bq();\n goto L_0x000e;\n L_0x0101:\n r2 = move-exception;\n r18.bq();\n throw r2;\n L_0x0106:\n r3 = move-exception;\n goto L_0x00fc;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.duokan.reader.domain.bookshelf.jv.MyContextWrapper(java.lang.String):java.util.List\");\n }", "public abstract String mo13682d();", "private CheckUtil(){ }", "private FaceConversionUtil() {\n\n\t}", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "public abstract void mo27385c();", "@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}", "@Override\n\tprotected void prepare() {\n\t\t\n\t}", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "private SnapshotUtils() {\r\n\t}", "abstract String mo1748c();", "private void parseData() {\n\t\t\r\n\t}", "private static byte[] m2539e(Context context) {\n Throwable th;\n int i = 0;\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[0];\n String a = Log.m2547a(context, Log.f1857e);\n DiskLruCache diskLruCache = null;\n try {\n diskLruCache = DiskLruCache.m2767a(new File(a), 1, 1, 10240);\n File file = new File(a);\n if (file != null && file.exists()) {\n String[] list = file.list();\n int length = list.length;\n while (i < length) {\n String str = list[i];\n if (str.contains(\".0\")) {\n byteArrayOutputStream.write(StatisticsManager.m2535a(diskLruCache, str.split(\"\\\\.\")[0]));\n }\n i++;\n }\n }\n bArr = byteArrayOutputStream.toByteArray();\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n try {\n diskLruCache.close();\n } catch (Throwable th2) {\n th = th2;\n }\n }\n } catch (IOException th3) {\n BasicLogHandler.m2542a(th3, \"StatisticsManager\", \"getContent\");\n if (byteArrayOutputStream != null) {\n try {\n byteArrayOutputStream.close();\n } catch (IOException e2) {\n e2.printStackTrace();\n }\n }\n if (diskLruCache != null) {\n diskLruCache.close();\n }\n } catch (Throwable th4) {\n th3 = th4;\n }\n return bArr;\n th3.printStackTrace();\n return bArr;\n }", "abstract int pregnancy();", "public void mo4359a() {\n }", "public abstract void mo27386d();", "public abstract String use();", "void unableToListContents();", "void mo57277b();", "protected CombinatoricsUtils() {\n super();\n }", "private void searchFunction() {\n\t\t\r\n\t}", "public abstract String mo8770a();", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "Compatibility compatibility();", "private Helper() {\r\n // empty\r\n }", "private void level7() {\n }", "private Singletion3() {}", "public abstract void mo6549b();", "protected void additionalProcessing() {\n\t}" ]
[ "0.56725615", "0.5577605", "0.5577605", "0.55237895", "0.54895395", "0.5473689", "0.53815055", "0.53312886", "0.52986914", "0.5274863", "0.5251747", "0.52488923", "0.5238991", "0.5228378", "0.5228378", "0.5228378", "0.5228378", "0.52197963", "0.52168083", "0.511096", "0.51054597", "0.5095673", "0.5073832", "0.50726587", "0.507014", "0.5021312", "0.501304", "0.50101316", "0.5009243", "0.5002106", "0.49959213", "0.49908862", "0.4981816", "0.49606362", "0.49606362", "0.49493015", "0.49447113", "0.49385548", "0.49352393", "0.49238876", "0.49192238", "0.4912988", "0.49079713", "0.49079713", "0.49073175", "0.4906899", "0.49036384", "0.48985103", "0.4894147", "0.48902106", "0.48855084", "0.48852926", "0.4876632", "0.48725095", "0.48715553", "0.48594362", "0.48561752", "0.48541054", "0.48496318", "0.48477733", "0.48466256", "0.48449844", "0.48340318", "0.48286474", "0.48272938", "0.48263648", "0.48243347", "0.48240435", "0.48168007", "0.48055038", "0.4799248", "0.47961962", "0.47916728", "0.47871867", "0.4785854", "0.47848925", "0.47775215", "0.47733748", "0.47729862", "0.47678763", "0.47658026", "0.47657782", "0.47635144", "0.4754865", "0.47538587", "0.47490168", "0.47462055", "0.4745081", "0.47441703", "0.47438148", "0.4742837", "0.47426972", "0.47388062", "0.4738572", "0.47382945", "0.47348648", "0.4733275", "0.4732538", "0.47284824", "0.47189012", "0.47171587" ]
0.0
-1
finds the visible lights for each point
public ArrayList<RTLight> getVisibleLights(Point p){ ArrayList<RTLight> visibleLights=new ArrayList<RTLight>(); for(RTLight temp: lights){ Intersection lightInt = trace(p,temp.getCenter()); if(lightInt.getThing() == temp){ visibleLights.add((RTLight)lightInt.getThing()); } } return visibleLights; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DetectLED findLEDs(Mat image, Rect roiRect) {\n\t\tlights = new ArrayList<Point2>();\n\n\t\tMat grey = new Mat();\n\t\tMat bw = new Mat();\n\n\t\t// Convert ROI of the original frame to a gray image\n\t\tImgproc.cvtColor(new Mat(image, roiRect), grey, Imgproc.COLOR_BGR2GRAY);\n\t\t// Then highlight the bright pixels\n\t\tImgproc.threshold(grey, bw, thresh , 255, 0);\n\n\t\t// Find blobs of bright pixels keeping in mind the ROI offset\n\t\t// Pay attention to EXTERNAL contours only, ignore nested contours.\n\t\tList<MatOfPoint> contours = new ArrayList<MatOfPoint>();\n\t\tImgproc.findContours(bw, contours, new Mat(), Imgproc.RETR_EXTERNAL, Imgproc.CHAIN_APPROX_SIMPLE, roiRect.tl());\n\n\t\tfor (MatOfPoint cont: contours) {\n\t\t\tdouble area = Imgproc.contourArea(cont);\n\t\t\tif(minArea < area && area < maxArea) {\n\t\t\t\t// Moments is some magic with contours that I found on StackOverflow\n\t\t\t\t// TL;DR These two lines find the contour's center of mass\n\t\t\t\tMoments m = Imgproc.moments(cont);\n\t\t\t\tlights.add(new Point2(m.m10/m.m00, m.m01/m.m00));\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "public static void setLightInfo()\n {\n for(int i = 0; i <= 19; i++)\n {\n lights.add(new Light());\n }\n\n //-----set position for all 15 lights-----\\\n //light1 -- middle light\n lights.get(0).setX(475);\n lights.get(0).setY(585);\n\n //--- left side --- \\\\\n\n //light2 - -\n lights.get(1).setX(350);\n lights.get(1).setY(570);\n\n //light3 - -\n lights.get(2).setX(230);\n lights.get(2).setY(530);\n\n //light4 - -\n lights.get(3).setX(130);\n lights.get(3).setY(470);\n\n //light5 - -\n lights.get(4).setX(110);\n lights.get(4).setY(410);\n\n //light6 - -\n lights.get(5).setX(165);\n lights.get(5).setY(370);\n\n //light7 - -\n lights.get(6).setX(230);\n lights.get(6).setY(350);\n\n //light8 - -\n lights.get(7).setX(290);\n lights.get(7).setY(340);\n\n //light9 - -\n lights.get(8).setX(355);\n lights.get(8).setY(337);\n\n //light10 - -\n lights.get(9).setX(420);\n lights.get(9).setY(336);\n\n\n //---- middle ----\\\\\n\n //light11 -\n lights.get(10).setX(485);\n lights.get(10).setY(335);\n\n //---- Right side of circle ----\\\\\n\n //light12 -\n lights.get(11).setX(540);\n lights.get(11).setY(336);\n\n //light13 -\n lights.get(12).setX(595);\n lights.get(12).setY(337);\n\n //light14 -\n lights.get(13).setX(655);\n lights.get(13).setY(340);\n\n //light15 -\n lights.get(14).setX(720);\n lights.get(14).setY(350);\n\n //light16 -\n lights.get(15).setX(785);\n lights.get(15).setY(370);\n\n //light17 -\n lights.get(16).setX(840);\n lights.get(16).setY(410);\n\n //light18 -\n lights.get(17).setX(820);\n lights.get(17).setY(470);\n\n //light19 -\n lights.get(18).setX(720);\n lights.get(18).setY(530);\n\n //light20 -\n lights.get(19).setX(600);\n lights.get(19).setY(570);\n\n }", "private void lightOn(Map<Light, Matrix4f> lights) {\n numLight = 0;\n GL3 gl = glContext.getGL().getGL3();\n FloatBuffer fb4 = Buffers.newDirectFloatBuffer(4);\n LightLocation lightLoc = new LightLocation();\n for (Entry<Light, Matrix4f> entry : lights.entrySet()) {\n Light light = entry.getKey();\n Matrix4f lightTransForm = entry.getValue();\n Vector4f lightPosition = lightTransForm.transform(new Vector4f(light.getPosition()));\n Vector4f lightDirection = lightTransForm.transform(new Vector4f(light.getSpotDirection()));\n String lightName = \"light[\" + numLight + \"]\";\n lightLoc.position = shaderLocations.getLocation(lightName + \".position\");\n lightLoc.ambient = shaderLocations.getLocation(lightName + \".ambient\");\n lightLoc.diffuse = shaderLocations.getLocation(lightName + \".diffuse\");\n lightLoc.specular = shaderLocations.getLocation(lightName + \".specular\");\n lightLoc.direction = shaderLocations.getLocation(lightName + \".direction\");\n lightLoc.cutOff = shaderLocations.getLocation(lightName + \".cutOff\");\n\n gl.glUniform4fv(lightLoc.position, 1, lightPosition.get(fb4));\n gl.glUniform3fv(lightLoc.ambient, 1, light.getAmbient().get(fb4));\n gl.glUniform3fv(lightLoc.diffuse, 1, light.getDiffuse().get(fb4));\n gl.glUniform3fv(lightLoc.specular, 1, light.getSpecular().get(fb4));\n gl.glUniform4fv(lightLoc.direction, 1, lightDirection.get(fb4));\n gl.glUniform1f(lightLoc.cutOff, light.getSpotCutoff());\n numLight++;\n }\n gl.glUniform1i(shaderLocations.getLocation(\"numLights\"), numLight);\n }", "public void searchLights() {\n\t\n\t\t// try to limit searching\n\t\tif(ports.contains(motors)) ports.remove(motors);\n\t\tif(state.get(State.values.serialport) != null) \n\t\t\tports.remove(state.get(State.values.serialport));\n\t\t\t\n\t\tUtil.debug(\"discovery for lights starting on ports: \" + ports.size(), this);\n\t\t\n\t\tfor (int i = ports.size() - 1; i >= 0; i--) {\n\t\t\tif (state.get(State.values.lightport)!=null) { break; } // stop if find it\n\t\t\t//if (connect(ports.get(i), BAUD_RATES[0])) {\t\n\t\t\tif (connect(ports.get(i), 57600)) {\n\t\t\t\tUtil.delay(TIMEOUT*2);\n\t\t\t\tif (serialPort != null) { close(); }\n\t\t\t}\n\t\t}\n\t}", "private ArrayList<ColorMixerModel.ColorItem> pathIntersection(){\n ArrayList<ColorMixerModel.ColorItem> toDel = new ArrayList<>();\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n Ellipse2D.Float cobj = new Ellipse2D.Float(c.getPos().x,c.getPos().y, c.getR(),c.getR());\n if(mouseTrace.intersects(cobj.getBounds2D())){\n toDel.add(c);\n }\n }\n return toDel;\n }", "@Override\r\n\tpublic List<Light> getLights() {\n\t\treturn null;\r\n\t}", "static void visible() {\n int x, y;\n int[][] res = deepClone( pgmInf.img );\n\n System.out.print(\"Enter reference point: \");\n y = scan.nextInt();\n x = scan.nextInt();\n scan.nextLine(); // flush\n \n System.out.printf(\"Marking all pixels visible from %d,%d as white.\\n\", x, y);\n // mark visible points\n for (int i=0 ; i < pgmInf.width ; i++) {\n for (int j=0 ; j < pgmInf.height ; j++) {\n if ( lineBetween(x, y, i, j) ) res[j][i] = 9;\n }\n }\n pgmInf.img = res;\n System.out.println(\"Done.\");\n }", "private void renderLights() {\n\t\t\n\t}", "@Override\n public void discardRemainingLights() {\n while (nextLightIndex < MAX_POINT_LIGHTS) {\n setPointLight(new Vector3f(), Color4f.INVISIBLE, 0);\n }\n }", "List<IShape> getVisibleShapes();", "void setupLights() {\n\n lightGroup = new Group();\n\n // Set up the ambient light\n lightAmbient = new AmbientLight(darkGrey);\n lightAmbient.setInfluencingBounds(infiniteBounds);\n lightAmbient.setCapability(Light.ALLOW_STATE_WRITE);\n lightAmbient.setEnable(true);\n lightGroup.addChild(lightAmbient);\n\n // Set up the directional light\n Vector3f lightDirection = new Vector3f(0.65f, -0.65f, -0.40f);\n lightDirectional = new DirectionalLight(white, lightDirection);\n lightDirectional.setInfluencingBounds(infiniteBounds);\n lightDirectional.setEnable(true);\n lightDirectional.setCapability(Light.ALLOW_STATE_WRITE);\n lightGroup.addChild(lightDirectional);\n\n // Set up the point light\n Point3f lightPosition = new Point3f(-1.0f, 1.0f, 0.6f);\n lightPoint = new PointLight(white, lightPosition, attenuation);\n lightPoint.setInfluencingBounds(infiniteBounds);\n lightPoint.setEnable(false);\n lightPoint.setCapability(Light.ALLOW_STATE_WRITE);\n lightPoint.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightGroup.addChild(lightPoint);\n\n // Set up the spot light\n // Point the light back at the origin\n lightSpot = new SpotLight(white, lightPosition, attenuation,\n lightDirection, (float) Math.toRadians(spotSpreadAngle),\n spotConcentration);\n lightSpot.setInfluencingBounds(infiniteBounds);\n lightSpot.setEnable(false);\n lightSpot.setCapability(Light.ALLOW_STATE_WRITE);\n lightSpot.setCapability(PointLight.ALLOW_ATTENUATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_CONCENTRATION_WRITE);\n lightSpot.setCapability(SpotLight.ALLOW_SPREAD_ANGLE_WRITE);\n lightGroup.addChild(lightSpot);\n }", "public DetectLED findSegments() {\n\t\tchains = new ArrayList<Chain>();\n\t\t// Every single line segment is a candidate to build a chain upon it\n\t\t// So let's seed the starting points for all potential chains\n\t\tfor (int i=0; i < lights.size(); i++) {\n\t\t\tfor (int j=0; j < lights.size(); j++) {\n\t\t\t\tif(i != j && lights.get(i).minus(lights.get(j)).norm() < maxSeg) {\n\t\t\t\t\t// Also seed chains for different number of nodes\n\t\t\t\t\t// maxNodes/2 is an arbitrary pick but should be good enough\n\t\t\t\t\tfor(int n = maxNodes; n > maxNodes/2; n--) {\n\t\t\t\t\t\tchains.add(new Chain(i, j, n));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn this;\n\t}", "private void createLights(TiledMap map)\r\n\t{\r\n\t\tlightLayer = map.getLayers().get(\"Lights\").getObjects();\r\n\r\n\t\tfor (int count = 0; count < lightLayer.getCount(); count++)\r\n\t\t{\r\n\t\t\tRectangleMapObject obj = (RectangleMapObject) lightLayer.get(count);\r\n\r\n\t\t\tnew PointLight(lightHandler, 10, Color.WHITE, 30,\r\n\t\t\t\t\tobj.getRectangle().x / Constants.BOX_SCALE,\r\n\t\t\t\t\tobj.getRectangle().y / Constants.BOX_SCALE);\r\n\t\t}\r\n\t}", "public void resolveLights(){trafficList.forEach(TrafficLight::resolve);}", "private ArrayList<Pixel> getNeightbors(Pixel pixel)\n {\n ArrayList<Pixel> neighbors = new ArrayList<Pixel>();\n\n for(int i=-1;i<=1;i++)\n {\n int n_w=pixel.p+i;\n if(n_w<0 || n_w==this.image.getWidth()) continue;\n for(int j=-1;j<=1;j++)\n {\n int n_h=pixel.q+j;\n if(n_h<0 || n_h==this.image.getHeight()) continue;\n if(i==0 && j==0) continue;\n neighbors.add( new Pixel(n_w, n_h) );\n }//end for j\n }//end for i\n\n return neighbors;\n }", "public int getLight();", "private List<Point> neighboursFiltering(List<Point> points) {\n Point nearest = points.get(0);\n HeartDistance calculator = new HeartDistance();\n return points.stream().filter(p -> calculator.calculate(p,nearest) < NEIGHBOURS_THRESHOLD).collect(Collectors.toList());\n }", "public static ElgatoKeyLight[] getKeyLights() {\n var appData = System.getenv(\"APPDATA\");\r\n if ( appData == null )\r\n return _noLights;\r\n\r\n // check to see if the ControlCenter settings exists\r\n var controlCenterSettingsFile = Paths.get(appData, \"Elgato\", \"ControlCenter\", \"settings.xml\").toFile();\r\n if ( !controlCenterSettingsFile.exists() )\r\n return _noLights;\r\n\r\n try {\r\n // open the settings XML file\r\n var factory = DocumentBuilderFactory.newInstance();\r\n factory.setNamespaceAware(true);\r\n var builder = factory.newDocumentBuilder();\r\n var settingsDocument = builder.parse(controlCenterSettingsFile);\r\n\r\n // setup xpath\r\n var xPathFactory = XPathFactory.newInstance();\r\n var xpath = xPathFactory.newXPath();\r\n\r\n // find all lights using an XPath query\r\n var accessoryQuery = xpath.compile(\"/AppSettings/Application/Accessories/Accessory\");\r\n var results = (NodeList)accessoryQuery.evaluate(settingsDocument, XPathConstants.NODESET);\r\n\r\n // we might have invalid entries, so use a dynamic list to generate the return results\r\n var returnBuilder = new ArrayList<ElgatoKeyLight>();\r\n for (var accessoryIndex = 0; accessoryIndex < results.getLength(); ++accessoryIndex) {\r\n var node = (Node)results.item(accessoryIndex);\r\n\r\n String foundName = null;\r\n String foundServerAddress = null;\r\n\r\n // scan the child for the lights\r\n var children = node.getChildNodes();\r\n for ( var childIndex = 0; childIndex < children.getLength(); ++childIndex ) {\r\n var testChild = (Node)children.item(childIndex);\r\n\r\n // Prefer using <UserDefinedName>\r\n if ( testChild.getNodeName() ==\"UserDefinedName\" )\r\n foundName = testChild.getTextContent();\r\n // Fallback to using <Name> if <UserDefinedName> is not defined\r\n else if ( testChild.getNodeName() == \"Name\" && foundName == null )\r\n foundName = testChild.getTextContent();\r\n // The server is stored in <IpAddress>\r\n else if ( testChild.getNodeName() == \"IpAddress\" )\r\n foundServerAddress = testChild.getTextContent();\r\n }\r\n\r\n // if we got both a name & a server, then add it\r\n if ( foundName != null && foundServerAddress != null )\r\n returnBuilder.add( new ElgatoKeyLight(foundName, foundServerAddress));\r\n }\r\n\r\n // convert it to an array and return it\r\n var ret = new ElgatoKeyLight[returnBuilder.size()];\r\n returnBuilder.toArray(ret);\r\n return ret;\r\n } catch (IOException e) {\r\n // This happens if the XML file cannot be read\r\n return _noLights;\r\n } catch (ParserConfigurationException e) {\r\n // This happens if the XML file is corrupt\r\n return _noLights;\r\n } catch (SAXException e) {\r\n // This happens if the XML file is corrupt\r\n return _noLights;\r\n } catch (XPathExpressionException e) {\r\n // this is an internal programming error that is raised if the XPath expression is bad\r\n e.printStackTrace();\r\n return _noLights;\r\n }\r\n }", "@Override\n public void lightOn(INode root, Stack<Matrix4f> modelView) {\n Stack<Matrix4f> mvCopy = new Stack<>();\n for (Matrix4f mv : modelView) {\n mvCopy.push(new Matrix4f(mv));\n }\n Map<Light, Matrix4f> lights = root.getLights(mvCopy);\n this.lightOn(lights);\n }", "public void afficherPoints(){\n for(Point point : pointArrayList){\n getMapPane().getChildren().add(point.getImageView());\n visualObjects.add(point);\n }\n }", "public void directCompute() {\r\n\t\t\tshort[] rgb = new short[3];\r\n\t\t\tint offset = yMin * width;\r\n\t\t\tfor (int y = yMin; y < yMax; y++) {\r\n\t\t\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\t\t\tPoint3D screenPoint = screenCorner.add(xAxis.scalarMultiply(x * 1.0 / (width - 1) * horizontal))\r\n\t\t\t\t\t\t\t.sub(yAxis.scalarMultiply(y * 1.0 / (height - 1) * vertical));\r\n\r\n\t\t\t\t\tRay ray = Ray.fromPoints(eye, screenPoint);\r\n\t\t\t\t\ttracer(scene, ray, rgb);\r\n\t\t\t\t\t// applying color to pixel\r\n\t\t\t\t\tred[offset] = rgb[0] > 255 ? 255 : rgb[0];\r\n\t\t\t\t\tgreen[offset] = rgb[1] > 255 ? 255 : rgb[1];\r\n\t\t\t\t\tblue[offset] = rgb[2] > 255 ? 255 : rgb[2];\r\n\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "void diplayNeighborPoints() {\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tif (point[i].position.dist(P) < 10) {\n\t\t\t\tmyParent.pushStyle();\n\t\t\t\tmyParent.fill(255, 255, 0);\n\t\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5); // draw\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// selected\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// point\n\t\t\t\tmyParent.text(\"left neighbor\", point[neighbor(i)[0]].x, point[neighbor(i)[0]].y);\n\t\t\t\tmyParent.text(\"right neighbor\", point[neighbor(i)[1]].x, point[neighbor(i)[1]].y);\n\t\t\t\tmyParent.text(\"opposite\", point[neighbor(i)[2]].x, point[neighbor(i)[2]].y);\n\t\t\t\t// neighbor(int sourcePointId)\n\t\t\t\tmyParent.noFill();\n\t\t\t\tmyParent.popStyle();\n\t\t\t}\n\t\t}\n\n\t\tif (state == State.SCALE_PORPORTIONALLY_POINT || state == State.SCALE_FREE_POINT)\n\t\t\tdisplayLineBetweenCurrentAndOppositePoints();\n\t}", "private void addLights() {\n \t\tLight light = new DirectionalLight(\n \t\t\t\tnew Color3f(1f, 1f, 1f), new Vector3f(-1f, -1f, -1f));\n \t\t\n \t\tlight.setInfluencingBounds(\n \t\t\t\tnew BoundingSphere(new Point3d(0, 0, 0), 10));\n \t\t\n \t\tmyScene.addChild(light);\n \t\t\n \t\tlight = new DirectionalLight(\n \t\t\t\tnew Color3f(0.3f, 0.1f, 0.1f), new Vector3f(1f, 0f, 0f));\n \t\t\n \t\tlight.setInfluencingBounds(\n \t\t\t\tnew BoundingSphere(new Point3d(0, 0, 0), 10));\n \t\t\n \t\tmyScene.addChild(light);\n \t}", "public void updateLighting() {\n\t\tint k;\n\t\tint i;\n\n\t\tfor (k=0; k<num_vobjects;k++) {\t\t\t// Loop through all the objects to be illuminated \n\t\t\t\n\t\t\tif ((vobject[k].potentially_visible) && (vobject[k].needs_lighting) ) {\n\t\t\t\tvobject[k].resetLighting();\n\t\t\t\tfor (i=0; i<num_vobjects;i++) {\t// Loop through all the light sources that can illuminate this object\n\t\t\t\t\tif (vobject[i].light_source) {\n\t\t\t\t\t\tvobject[k].addLightSource(vobject[i].abs_x_pos, vobject[i].abs_y_pos, vobject[i].abs_z_pos, vobject[i].light_red, vobject[i].light_green, vobject[i].light_blue);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tvobject[k].calculateAverageLighting();\n\t\t\t\tvobject[k].needs_lighting=false;\n\t\t\t}\n\t\t}\n\t}", "public List<Neighbor> getNearNeighborsInSample(double[] point) {\n return getNearNeighborsInSample(point, Double.POSITIVE_INFINITY);\n }", "private Color calcColor(GeoPoint geoPoint, Ray inRay, int level, double k) {\n if (level == 0 || k < MIN_CALC_COLOR_K) {\n return Color.BLACK;\n }\n Color result = geoPoint.getGeometry().getEmmission();\n Point3D pointGeo = geoPoint.getPoint();\n\n /**v=is the vector from camera strait ahead.\n * n=the vector normal to the point on that shape/object*/\n Vector v = pointGeo.subtract(scene.getCamera().getSpo()).normalize();\n Vector n = geoPoint.getGeometry().getNormal(pointGeo);\n\n Material material = geoPoint.getGeometry().getMaterial();\n int nShininess = material.getnShininess();\n double kd = material.getkD();\n double ks = material.getkS();\n double kr = geoPoint.getGeometry().getMaterial().getkR();//each time gets the amount of mirror in the object.\n double kt = geoPoint.getGeometry().getMaterial().getkT();//each time gets the amount of transparent in the object.\n double kkr = k * kr;//if kr/kt was small so it will smaller the kkr/kkt before we send to the function again.\n double kkt = k * kt;\n\n List<LightSource> lightSources = scene.getLightSources();\n if (lightSources != null) {\n for (LightSource light : lightSources) {//for each light will check\n Vector l = light.getL(pointGeo);//L=the vector from light to point\n double nl = alignZero(n.dotProduct(l));\n double nv = alignZero(n.dotProduct(v));\n if (nl * nv > 0) {\n /**how much shakof are all the objects between the light in the point. it can reduce the impact ot the light\n * if there is no objects it will return 1. ktr*1=the same. no change.\n * even if one is (atum) so it will block the light.\n * and then will add the color with a (mekadem)that can make smaller the\n * impact of the light because there are objects that are not so shakoof and disturb the color*/\n double t = transparency(light, l, n, geoPoint);\n if (t * k > MIN_CALC_COLOR_K) {\n Color ip = light.getIntensity(pointGeo).scale(t);\n result = result.add(calcDiffusive(kd, nl, ip), calcSpecular(ks, l, n, nl, v, nShininess, ip));\n }\n }\n }\n }\n\n if (level == 1) {//Stop condition .we went a enough far away from the point\n return Color.BLACK;\n }\n\n /**A nother Stop condition.\n * if we in ecounterend a object with very little mirror so it smallered the kkr.\n * will check if the (mekadem), is still higher then the min number*/\n if (kkr > MIN_CALC_COLOR_K) {\n Ray reflectedRay = constructReflectedRay(pointGeo, inRay, n);\n GeoPoint reflectedPoint = findClosestIntersection(reflectedRay);\n if (reflectedPoint != null) {\n result = result.add(calcColor(reflectedPoint, reflectedRay, level - 1, kkr).scale(kr));\n }\n }\n if (kkt > MIN_CALC_COLOR_K) {//if the shkefut of the number is still high\n Ray refractedRay = constructRefractedRay(pointGeo, inRay, n);//so will send a ray from the knew object.\n GeoPoint refractedPoint = findClosestIntersection(refractedRay);//ho is the point you got\n if (refractedPoint != null) {//if you got a point lets send that point again to see if he also is impacted.\n result = result.add(calcColor(refractedPoint, refractedRay, level - 1, kkt).scale(kt));\n }\n }\n return result;//returns the color that will be added to the point.\n }", "public ArrayList<Point> inVision(Camera camera) {\n\t\tArrayList<Point> arrayPoint = new ArrayList<>();\n\t\tif (camera.couldSee(A2))\n\t\t\tarrayPoint.add(A2);\n\t\tif (camera.couldSee(B2))\n\t\t\tarrayPoint.add(B2);\n\t\tif (camera.couldSee(C2))\n\t\t\tarrayPoint.add(C2);\n\t\tif (camera.couldSee(D2))\n\t\t\tarrayPoint.add(D2);\n\n\t\treturn arrayPoint;\n\t}", "public Color colorByNeighbors() {\n float mod = maxVoltage /10f;\n float color = Math.max(0,Math.min(voltageAccumulator,mod))/mod;\n float colorNeighbors = (float)Math.max(0,Math.min(this.neighbors.size()/maxNeighbors,1.0));\n\n if(colorNeighbors<0.5f)return new Color(0.0f,0f,0f);\n\n return new Color(colorNeighbors/2f,color,color);//, 0.25f);\n }", "Light getEWlight();", "private ArrayList<Point> getNeighbors(Point p) {\n\t\tArrayList<Point> arr = new ArrayList<Point>();\n\t\tfor (int y = -1; y <= 1; y++) {\n\t\t\tfor (int x = -1; x <= 1; x++) {\n\t\t\t\tPoint npoint = new Point( p.x + x, p.y + y);\n\t\t\t\tint sind = spacesContains(npoint);\n\t\t\t\tif ( p.compareTo(npoint) != 0 && sind >= 0 ) { \n\t\t\t\t\tarr.add( spaces.get(sind) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn arr;\n\t}", "private static void determineColor(Scene scene, RayIntersection ri, short[] rgb, Point3D eye) {\r\n\t\tfinal double PRECISION = 1e-3;\r\n\r\n\t\t// ambient component\r\n\t\tfor (int i = 0; i < 3; i++) {\r\n\t\t\trgb[i] = AMBIENT_COMPONENT;\r\n\t\t}\r\n\r\n\t\t// we add to final result contribution from all lights, if light\r\n\t\t// actually lights the object\r\n\t\tfor (LightSource ls : scene.getLights()) {\r\n\t\t\tRay ray = Ray.fromPoints(ls.getPoint(), ri.getPoint());\r\n\t\t\tRayIntersection closest = findClosestIntersection(scene, ray);\r\n\t\t\tdouble dist = ls.getPoint().sub(ri.getPoint()).norm();\r\n\r\n\t\t\t// if closest exists, skip this light (it's ray is intercepted by\r\n\t\t\t// other intersection)\r\n\t\t\tif (closest != null && closest.getDistance() + PRECISION < dist) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\t\r\n\t\t\t\t// diffusion component\r\n\t\t\t\tdouble scalarProduct = Math.max(0,\r\n\t\t\t\t\t\tri.getNormal().scalarProduct(ls.getPoint().sub(ri.getPoint()).normalize()));\r\n\t\t\t\trgb[0] += ls.getR() * ri.getKdr() * scalarProduct;\r\n\t\t\t\trgb[1] += ls.getG() * ri.getKdg() * scalarProduct;\r\n\t\t\t\trgb[2] += ls.getB() * ri.getKdb() * scalarProduct;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// reflection component\r\n\t\t\t\tPoint3D n = ri.getNormal();\r\n\t\t\t\tPoint3D v = eye.sub(ri.getPoint()).normalize();\r\n\t\t\t\tPoint3D l = ri.getPoint().sub(ls.getPoint());\r\n\t\t\t\tPoint3D r = l.sub(n.scalarMultiply(2 * n.scalarProduct(l))).normalize();\r\n\t\t\t\tscalarProduct = Math.max(0, v.scalarProduct(r));\r\n\r\n\t\t\t\trgb[0] += ls.getR() * ri.getKrr() * Math.pow(scalarProduct, ri.getKrn());\r\n\t\t\t\trgb[1] += ls.getG() * ri.getKrg() * Math.pow(scalarProduct, ri.getKrn());\r\n\t\t\t\trgb[2] += ls.getB() * ri.getKrb() * Math.pow(scalarProduct, ri.getKrn());\r\n\t\t\t\t \r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private LinkedList<int[]> neighborFinder(){\n LinkedList<int[]> neighborhood= new LinkedList<>();\n int[] curr_loc = blankFinder();\n int x = curr_loc[0];\n int y = curr_loc[1];\n if(x >0){\n neighborhood.add(new int[]{x-1, y});\n }\n if(x < n-1){\n neighborhood.add(new int[]{x+1, y});\n }\n if(y > 0){\n neighborhood.add(new int[]{x, y-1});\n }\n if(y < n-1) {\n neighborhood.add(new int[]{x, y+1});\n }\n\n\n return neighborhood;\n }", "public static List<int[]> getContainedPixels(MeshImageStack stack, DeformableMesh3D mesh){\n Box3D box = mesh.getBoundingBox();\n double[] lowI = stack.getImageCoordinates(box.low);\n double[] highI = stack.getImageCoordinates(box.high);\n\n InterceptingMesh3D picker = new InterceptingMesh3D(mesh);\n double[] xdirection = {1,0,0};\n\n int slices = stack.getNSlices();\n int w = stack.getWidthPx();\n int h = stack.getHeightPx();\n double center[] = new double[3];\n\n int sliceLow = (int)lowI[2];\n int sliceHigh = (int)highI[2];\n //verify\n sliceLow = sliceLow < 0 ? 0 : sliceLow;\n sliceHigh = sliceHigh <= slices ? sliceHigh : slices;\n\n int jlo = (int)lowI[1];\n int jhi = (int)highI[1];\n jlo = jlo < 0 ? 0 : jlo;\n jhi = jhi <= h ? jhi : h;\n\n int xlo = (int)lowI[0];\n int xhi = (int)highI[0];\n xlo = xlo < 0 ? 0: xlo;\n xhi = xhi > w ? w : xhi;\n List<int[]> contained = new ArrayList<>();\n for(int slice = sliceLow; slice<sliceHigh; slice++){\n\n center[2] = slice;\n\n\n for(int j = jlo; j<jhi; j++){\n\n int offset = j*w;\n center[1] = j;\n\n List<Intersection> sections = picker.getIntersections(stack.getNormalizedCoordinate(center), xdirection);\n if(sections.size()==0){\n //No intersections. No points inside.\n continue;\n }\n scanDirty(sections);\n sections.sort((a,b)->Double.compare(a.location[0], b.location[0]));\n\n boolean startInside = false;\n double count = 0;\n double[] boundaries = new double[sections.size()+1];\n\n //the number of boundaries that switch the state from inside to outside.\n int valid = 0;\n double lowestEntry = Double.MAX_VALUE;\n double highestExit = -Double.MAX_VALUE;\n\n for(int k = 0; k<sections.size(); k++){\n\n double bound = stack.getImageCoordinates(sections.get(k).location)[0];\n\n boolean facingLeft = sections.get(k).surfaceNormal[0]<0;\n boolean facingRight = !facingLeft;\n //going through all interfaces, and either going further in\n //or back out.\n if(facingLeft){\n count++;\n if(bound < lowestEntry){\n lowestEntry = bound;\n }\n } else{\n count--;\n if(bound > highestExit){\n highestExit = bound;\n }\n }\n if(bound>0) {\n //check if it is actually a boundary\n if ( count==1 && facingLeft ) {\n //boundary entering region.\n if( valid == 0){\n startInside = false;\n }\n boundaries[valid] = bound;\n valid++;\n } else if (count==0 && facingRight) {\n //stepped out.\n if( valid == 0){\n startInside = true;\n }\n boundaries[valid] = bound;\n valid++;\n }\n\n }\n }\n\n boolean inside = startInside;\n\n\n if(lowestEntry < lowI[0]){\n System.out.println(\"Topo Error: lowest entry is less than bounding box!\");\n }\n if( (int)highestExit > highI[0] ){\n System.out.println(\"Topo Error: highest exit is outside of bounding box!\");\n }\n\n if(startInside && lowestEntry>0){\n System.out.println(\"Topo Error: Lower bound above zero but mesh starts inside.\");\n }\n\n boundaries[valid] = w;\n\n //This isn't necessarily true.\n //lowestIntersection >= lowI[0] and highestIntersection <= highI[0]\n boolean finishesOutsideImage = lowestEntry <= (w-1) && highestExit >= (w - 1) ;\n\n int current = 0;\n\n\n for(int p = 0; p<w; p++){\n if(p>boundaries[current]){\n //switch.\n current++;\n inside = !inside;\n }\n if(inside){\n contained.add(new int[]{p, j, slice});\n }\n }\n if(finishesOutsideImage && !inside){\n System.out.println(\"topography warning: bounds outside image, but not inside the shape at end\");\n }\n\n if(!finishesOutsideImage && inside){\n System.out.println(\"Inconsistent bounding box: End of image is out of bounds, but state is inside the shape\");\n System.out.println(Arrays.toString(lowI) + \" [~] \" + Arrays.toString(highI));\n }\n\n }\n\n }\n return contained;\n }", "@Override\n public Color getIntensity(Point3D point) {\n\n Color pointLight = super.getIntensity(point); // the point light intensity\n // multiply the dot product between the direction and the L vector\n // (if it's far from direction - it's more weak. if it's close, it's stronger.\n double k = getL(point).dotProduct(getDirection().normalize());\n k = Math.abs(k);\n\n if (k > 1) k = 1;\n\n return new Color((int) (pointLight.getRed() * k), (int) (pointLight.getGreen() * k), (int) (pointLight.getBlue() * k)); // scale and return\n }", "@Override public ArrayList<Location> neighbors(final Location id) {\n ArrayList<Location> neighbours = new ArrayList<>();\n for (Location direction : directions){\n\n Location position = new Location(direction.x + id.x, direction.y + id.y);\n\n if (inBounds(position) && isPassable(position))\n neighbours.add(position);\n }\n return neighbours;\n }", "public List<Location> neighbors (Location pos);", "public BufferedImage getThresh(BufferedImage img, int left, int right, int top, int bottom) { // Method to get thresholded image \n\t\t//Vision.logger.debug(\"Starting thresholding\");\n\n\t\t//stops it fucking up the locations before we've given it the thresholds\n\t\tif (worldState.isClickingDone()){\n\n\t\t\tnewBluePixels = new ArrayList<Point>();\n\t\t\tnewYellowPixels = new ArrayList<Point>();\n\t\t\tArrayList<Point> bluePixels = new ArrayList<Point>();\n\t\t\tArrayList<Point> yellowPixels = new ArrayList<Point>();\n\t\t\t/*pitch = worldState.getRoom();\n\t\t\twidth = right-left;\n\t\t\theight = top-bottom;*/\n\n\t\t\t/*\n Initialising to one to stop java dividing by 0 when it shouldn't\n\t\t\t */\n\t\t\tredCountA = 0;\n\t\t\tredCountB = 0;\n\t\t\tredCountC = 0;\n\t\t\tredCountD = 0;\n\t\t\tredCountE = 0;\n\t\t\tredCentroidA.setLocation(0,0);\n\t\t\tredCentroidB.setLocation(0,0);\n\t\t\tredCentroidC.setLocation(0,0);\n\t\t\tredCentroidD.setLocation(0,0);\n\t\t\tredCentroidE.setLocation(0,0);\n\n\t\t\tblueCountA = 0;\n\t\t\tblueCountB = 0;\n\t\t\tblueCountC = 0;\n\t\t\tblueCountD = 0;\n\t\t\tblueCountE = 0;\n\t\t\tblueCentroidA.setLocation(0,0);\n\t\t\tblueCentroidB.setLocation(0,0);\n\t\t\tblueCentroidC.setLocation(0,0);\n\t\t\tblueCentroidD.setLocation(0,0);\n\t\t\tblueCentroidE.setLocation(0,0);\n\n\t\t\tyellowCountA = 0;\n\t\t\tyellowCountB = 0;\n\t\t\tyellowCountC = 0;\n\t\t\tyellowCountD = 0;\n\t\t\tyellowCountE = 0;\n\t\t\tyellowCentroidA.setLocation(0,0);\n\t\t\tyellowCentroidB.setLocation(0,0);\n\t\t\tyellowCentroidC.setLocation(0,0);\n\t\t\tyellowCentroidD.setLocation(0,0);\n\t\t\tyellowCentroidE.setLocation(0,0);\n\n\t\t\t//Vision.logger.debug(\"Iterating image\");\n\t\t\tfor (int i = left; i < right; i++) {\n\t\t\t\tfor (int j = top; j < bottom; j++) {\n\t\t\t\t\t//Vision.logger.debug(\"Oh dear (i,j) = \" + Integer.toString(i) + \",\" + Integer.toString(j) + \")\");\n\t\t\t\t\tc = new Color(img.getRGB(i,j));\n\n\t\t\t\t\tGB = Math.abs((c.getBlue() - c.getGreen()));\n\t\t\t\t\tRG = Math.abs((c.getRed() - c.getGreen()));\n\t\t\t\t\t//RB = Math.abs((c.getRed() - c.getBlue()));\n\n\t\t\t\t\tif(isRed(c, GB)){ // was inside RB > 50 && RG > 50\n\t\t\t\t\t\timg.setRGB(i, j, Color.red.getRGB()); //Red Ball\n\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\tredCountA++;\n\t\t\t\t\t\t\tredCentroidA.setLocation(redCentroidA.getX() + i, redCentroidA.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\tredCountB++;\n\t\t\t\t\t\t\tredCentroidB.setLocation(redCentroidB.getX() + i, redCentroidB.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\tredCountC++;\n\t\t\t\t\t\t\tredCentroidC.setLocation(redCentroidC.getX() + i, redCentroidC.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\tredCountD++;\n\t\t\t\t\t\t\tredCentroidD.setLocation(redCentroidD.getX() + i, redCentroidD.getY() + j);\n\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\tredCountE++;\n\t\t\t\t\t\t\tredCentroidE.setLocation(redCentroidE.getX() + i, redCentroidE.getY() + j);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if (isYellow(c)) {\n\t\t\t\t\t\tsetCs(i,j,right,left,top,bottom, img);\n\t\t\t\t\t\tif (isYellow(cS) && isYellow(cE) && isYellow(cEE) && isYellow(cEN) && isYellow(cSS) && isYellow(cSW) ){\n\t\t\t\t\t\t\timg.setRGB(i, j, Color.yellow.getRGB()); // Yellow robot\n\t\t\t\t\t\t\tyellowRobotX.add(i);\n\t\t\t\t\t\t\tyellowRobotY.add(j);\n\t\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tyellowCountA++;\n\t\t\t\t\t\t\t\tyellowCentroidA.setLocation(yellowCentroidA.getX() + i, yellowCentroidA.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\t\tyellowCountB++;\n\t\t\t\t\t\t\t\tyellowCentroidB.setLocation(yellowCentroidB.getX() + i, yellowCentroidB.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\t\tyellowCountC++;\n\t\t\t\t\t\t\t\tyellowCentroidC.setLocation(yellowCentroidC.getX() + i, yellowCentroidC.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\t\tyellowCountD++;\n\t\t\t\t\t\t\t\tyellowCentroidD.setLocation(yellowCentroidD.getX() + i, yellowCentroidD.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\t\tyellowCountE++;\n\t\t\t\t\t\t\t\tyellowCentroidE.setLocation(yellowCentroidE.getX() + i, yellowCentroidE.getY() + j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tyellowPixels.add(new Point(i,j));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if (isBlue(c)){\n\t\t\t\t\t\tsetCs(i,j,right,left,top,bottom, img);\n\t\t\t\t\t\tif (isBlue(cS) && isBlue(cE) && isBlue(cEE) && isBlue(cEN) && isBlue(cSS) && isBlue(cSW) ){\n\t\t\t\t\t\t\timg.setRGB(i, j, Color.blue.getRGB()); // Blue robot \n\t\t\t\t\t\t\tblueRobotX.add(i);\n\t\t\t\t\t\t\tblueRobotY.add(j);\n\t\t\t\t\t\t\trandy = Math.random();\n\t\t\t\t\t\t\tif (randy > 0 && randy <= 0.2){\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tblueCountA++;\n\t\t\t\t\t\t\t\tblueCentroidA.setLocation(blueCentroidA.getX() + i, blueCentroidA.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.2 && randy <= 0.4){\n\t\t\t\t\t\t\t\tblueCountB++;\n\t\t\t\t\t\t\t\tblueCentroidB.setLocation(blueCentroidB.getX() + i, blueCentroidB.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.4 && randy <= 0.6){\n\t\t\t\t\t\t\t\tblueCountC++;\n\t\t\t\t\t\t\t\tblueCentroidC.setLocation(blueCentroidC.getX() + i, blueCentroidC.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.6 && randy <= 0.8){\n\t\t\t\t\t\t\t\tblueCountD++;\n\t\t\t\t\t\t\t\tblueCentroidD.setLocation(blueCentroidD.getX() + i, blueCentroidD.getY() + j);\n\t\t\t\t\t\t\t}else if (randy > 0.8 && randy <= 1){\n\t\t\t\t\t\t\t\tblueCountE++;\n\t\t\t\t\t\t\t\tblueCentroidE.setLocation(blueCentroidE.getX() + i, blueCentroidE.getY() + j);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbluePixels.add(new Point(i,j));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//make blue thresholds for the different pitches in that [pitch][x] style\n\t\t\t\t\t}\n\t\t\t\t\telse if (isGreen(c,GB,RG)) {\n\t\t\t\t\t\timg.setRGB(i,j, Color.green.getRGB()); // GreenPlates \n\t\t\t\t\t\tif (Point.distance(\tworldState.getBlueRobot().getPosition().getCentre().x,\n\t\t\t\t\t\t\t\tworldState.getBlueRobot().getPosition().getCentre().y,\n\t\t\t\t\t\t\t\ti,j) < 34) {\n\t\t\t\t\t\t\tblueGreenPlate.add(new Point(i,j));\n\t\t\t\t\t\t} \n\t\t\t\t\t\tif (Point.distance(\tworldState.getYellowRobot().getPosition().getCentre().x,\n\t\t\t\t\t\t\t\tworldState.getYellowRobot().getPosition().getCentre().y,\n\t\t\t\t\t\t\t\ti,j) < 34){\n\t\t\t\t\t\t\tyellowGreenPlate.add(new Point(i,j));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (redCountA == 0) redCountA++;\n\t\t\tif (redCountB == 0) redCountB++;\n\t\t\tif (redCountC == 0) redCountC++;\n\t\t\tif (redCountD == 0) redCountD++;\n\t\t\tif (redCountE == 0) redCountE++;\n\t\t\tif (blueCountA == 0) blueCountA++;\n\t\t\tif (blueCountB == 0) blueCountB++;\n\t\t\tif (blueCountC == 0) blueCountC++;\n\t\t\tif (blueCountD == 0) blueCountD++;\n\t\t\tif (blueCountE == 0) blueCountE++;\n\t\t\tif (yellowCountA == 0) yellowCountA++;\n\t\t\tif (yellowCountB == 0) yellowCountB++;\n\t\t\tif (yellowCountC == 0) yellowCountC++;\n\t\t\tif (yellowCountD == 0) yellowCountD++;\n\t\t\tif (yellowCountE == 0) yellowCountE++;\n\n\n\t\t\t//TODO: Run these points through the parralax fix\n\t\t\ttotalRedX = 0;\n\t\t\ttotalRedY = 0;\n\t\t\tnumRedCentroids = 0;\n\n\n\t\t\tredCentroidA.setLocation(redCentroidA.getX()/redCountA, redCentroidA.getY()/redCountA);\n\t\t\tredCentroidB.setLocation(redCentroidB.getX()/redCountB, redCentroidB.getY()/redCountB);\n\t\t\tredCentroidC.setLocation(redCentroidC.getX()/redCountC, redCentroidC.getY()/redCountC);\n\t\t\tredCentroidD.setLocation(redCentroidD.getX()/redCountD, redCentroidD.getY()/redCountD);\n\t\t\tredCentroidE.setLocation(redCentroidE.getX()/redCountE, redCentroidE.getY()/redCountE);\n\n\t\t\ttotalYellowX = 0;\n\t\t\ttotalYellowY = 0;\n\t\t\tnumYellowCentroids = 0;\n\n\n\t\t\tyellowCentroidA.setLocation(yellowCentroidA.getX()/yellowCountA, yellowCentroidA.getY()/yellowCountA);\n\t\t\tyellowCentroidB.setLocation(yellowCentroidB.getX()/yellowCountB, yellowCentroidB.getY()/yellowCountB);\n\t\t\tyellowCentroidC.setLocation(yellowCentroidC.getX()/yellowCountC, yellowCentroidC.getY()/yellowCountC);\n\t\t\tyellowCentroidD.setLocation(yellowCentroidD.getX()/yellowCountD, yellowCentroidD.getY()/yellowCountD);\n\t\t\tyellowCentroidE.setLocation(yellowCentroidE.getX()/yellowCountE, yellowCentroidE.getY()/yellowCountE);\n\n\t\t\ttotalBlueX = 0;\n\t\t\ttotalBlueY = 0;\n\t\t\tnumBlueCentroids = 0;\n\n\n\t\t\tblueCentroidA.setLocation(blueCentroidA.getX()/blueCountA, blueCentroidA.getY()/blueCountA);\n\t\t\tblueCentroidB.setLocation(blueCentroidB.getX()/blueCountB, blueCentroidB.getY()/blueCountB);\n\t\t\tblueCentroidC.setLocation(blueCentroidC.getX()/blueCountC, blueCentroidC.getY()/blueCountC);\n\t\t\tblueCentroidD.setLocation(blueCentroidD.getX()/blueCountD, blueCentroidD.getY()/blueCountD);\n\t\t\tblueCentroidE.setLocation(blueCentroidE.getX()/blueCountE, blueCentroidE.getY()/blueCountE);\n\n\t\t\tc = new Color(img.getRGB((int)redCentroidA.getX(), (int)redCentroidA.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidA.getX();\n\t\t\t\ttotalRedY += redCentroidA.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidB.getX(), (int)redCentroidB.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidB.getX();\n\t\t\t\ttotalRedY += redCentroidB.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidC.getX(), (int)redCentroidC.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidC.getX();\n\t\t\t\ttotalRedY += redCentroidC.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidD.getX(), (int)redCentroidD.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidD.getX();\n\t\t\t\ttotalRedY += redCentroidD.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)redCentroidE.getX(), (int)redCentroidE.getY()));\n\t\t\tif (isRed(c, GB)) {\n\t\t\t\ttotalRedX += redCentroidE.getX();\n\t\t\t\ttotalRedY += redCentroidE.getY();\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\n\t\t\tif (numRedCentroids == 0){\n\t\t\t\tnumRedCentroids++;\n\t\t\t}\n\n\t\t\tredX = (int)(totalRedX/numRedCentroids);\n\t\t\tredY = (int)(totalRedY/numRedCentroids);\n\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidA.getX(), (int)yellowCentroidA.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidA.getX();\n\t\t\t\ttotalYellowY += yellowCentroidA.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidB.getX(), (int)yellowCentroidB.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidB.getX();\n\t\t\t\ttotalYellowY += yellowCentroidB.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidC.getX(), (int)yellowCentroidC.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidC.getX();\n\t\t\t\ttotalYellowY += yellowCentroidC.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidD.getX(), (int)yellowCentroidD.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidD.getX();\n\t\t\t\ttotalYellowY += yellowCentroidD.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)yellowCentroidE.getX(), (int)yellowCentroidE.getY()));\n\t\t\tif (isYellow(c)) {\n\t\t\t\ttotalYellowX += yellowCentroidE.getX();\n\t\t\t\ttotalYellowY += yellowCentroidE.getY();\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\n\t\t\tif (numYellowCentroids == 0){\n\t\t\t\tnumYellowCentroids++;\n\t\t\t}\n\n\t\t\tyellowX = (int)(totalYellowX/numYellowCentroids);\n\t\t\tyellowY = (int)(totalYellowY/numYellowCentroids);\n\n\t\t\tc = new Color(img.getRGB((int)blueCentroidA.getX(), (int)blueCentroidA.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidA.getX();\n\t\t\t\ttotalBlueY += blueCentroidA.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidB.getX(), (int)blueCentroidB.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidB.getX();\n\t\t\t\ttotalBlueY += blueCentroidB.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidC.getX(), (int)blueCentroidC.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidC.getX();\n\t\t\t\ttotalBlueY += blueCentroidC.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidD.getX(), (int)blueCentroidD.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidD.getX();\n\t\t\t\ttotalBlueY += blueCentroidD.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\t\t\tc = new Color(img.getRGB((int)blueCentroidE.getX(), (int)blueCentroidE.getY()));\n\t\t\tif (isBlue(c)) {\n\t\t\t\ttotalBlueX += blueCentroidE.getX();\n\t\t\t\ttotalBlueY += blueCentroidE.getY();\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\n\t\t\tif (numBlueCentroids == 0){\n\t\t\t\tnumBlueCentroids++;\n\t\t\t}\n\n\t\t\tblueX = (int)(totalBlueX/numBlueCentroids);\n\t\t\tblueY = (int)(totalBlueY/numBlueCentroids);\n\n\t\t\tblueGreenPlate4Points = plate.getCorners(blueGreenPlate);\n\t\t\tyellowGreenPlate4Points = plate.getCorners(yellowGreenPlate);\n\n\t\t\tworldState.getBlueRobot().getPosition().setCorners(blueGreenPlate4Points);\n\t\t\tworldState.getYellowRobot().getPosition().setCorners(yellowGreenPlate4Points);\n\n\t\t\tPoint fixBall = new Point(redX,redY);\n\t\t\tif ((redX != 0) && (redY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setBallPosition(fixBall);\n\t\t\t\t}else{ \n\t\t\t\t\tworldState.setBallPosition(DistortionFix.barrelCorrected(fixBall));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPoint fixBlue = new Point(blueX,blueY);\n\t\t\tif ((blueX != 0) && (blueY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setBlueRobotPosition(fixParallax(fixBlue,worldState.getBlueRobot()));\n\t\t\t\t}else{\n\t\t\t\t\tworldState.setBlueRobotPosition(fixParallax(DistortionFix.barrelCorrected(fixBlue),worldState.getBlueRobot()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tPoint fixYell = new Point(yellowX,yellowY);\n\t\t\tif ((yellowX != 0) && (yellowY != 0)) {\n\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\tworldState.setYellowRobotPosition(fixParallax(fixYell,worldState.getYellowRobot()));\n\t\t\t\t}else{\n\t\t\t\t\tworldState.setYellowRobotPosition(fixParallax(DistortionFix.barrelCorrected(fixYell),worldState.getYellowRobot()));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor(Point p : bluePixels){\n\n\t\t\t\tif( plate.isInRectangle(p,blueGreenPlate4Points) ){\n\t\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\t\tnewBluePixels.add(fixParallax(p,worldState.getBlueRobot()));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewBluePixels.add(fixParallax(DistortionFix.barrelCorrected(p),worldState.getBlueRobot()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(Point p : yellowPixels){\n\n\t\t\t\tif( plate.isInRectangle(p,yellowGreenPlate4Points) ){\n\t\t\t\t\tif (worldState.getBarrelFix()){\n\t\t\t\t\t\tnewYellowPixels.add(fixParallax(p,worldState.getYellowRobot()));\n\t\t\t\t\t}else{\n\t\t\t\t\t\tnewYellowPixels.add(fixParallax(DistortionFix.barrelCorrected(p),worldState.getYellowRobot()));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tworldState.setBluePixels(newBluePixels);\n\t\t\tworldState.setYellowPixels(newYellowPixels);\n\n\t\t\t//The above is supposed to filter the pixels and pick up only the T pixels, but the orientation then is always with the (0,0) point \n\n\n\t\t\tblueGreenPlate.clear();\n\t\t\tyellowGreenPlate.clear();\n\n\t\t}\n\n\t\treturn img;\n\n\t}", "public int colorVertices();", "private void updateTempVisiblePoints() {\n for (int[] point : tempVisiblePoints) {\n point[3] -= 1;\n if (point[3] <= 0) {\n map.setPointHidden(point[0], point[1]);\n }\n }\n }", "public List<Integer> getVisibleLayers ()\n {\n List<Integer> visible = Lists.newArrayList();\n List<Boolean> visibility = getLayerVisibility();\n for (int layer = 0, nn = visibility.size(); layer < nn; layer++) {\n if (visibility.get(layer)) {\n visible.add(layer);\n }\n }\n return visible;\n }", "private void resetLights() {\n\n List<Integer> colors = DataHolder.getInstance().getColors();\n int iter = 0;\n for (int color: colors) {\n if (color == 2) {\n colors.set(iter, 0);\n }\n iter++;\n }\n DataHolder.getInstance().setColors(colors);\n }", "public void turnLightsOn() {\n if (isFlashing()) {\n return;\n }\n \n for (int i = 0; i < topBorder.size(); i++) {\n topBorder.get(i).turnOn();\n }\n for (int i = 0; i < bottomBorder.size(); i++) {\n bottomBorder.get(i).turnOn();\n }\n for (int i = 0; i < leftBorder.size(); i++) {\n leftBorder.get(i).turnOn();\n }\n for (int i = 0; i < rightBorder.size(); i++) {\n rightBorder.get(i).turnOn();\n }\n topLeft.turnOn();\n topRight.turnOn();\n bottomLeft.turnOn();\n bottomRight.turnOn();\n }", "private static LightSource[] getAllLightSources(MyLighting server) {\r\n\tint[] lamps = server.getLampIDs();\r\n\tLightSource[] result = new LightSource[lamps.length];\r\n\tfor (int i = 0; i < lamps.length; i++)\r\n\t result[i] = new LightSource(\r\n\t // first param: instance URI\r\n\t\t constructLampURIfromLocalID(lamps[i]),\r\n\t\t // second param: light type\r\n\t\t ElectricLight.lightBulb,\r\n\t\t // thrid param: light location\r\n\t\t new Room(constructLocationURIfromLocalID(server\r\n\t\t\t .getLampLocation(lamps[i]))));\r\n\treturn result;\r\n }", "private double transparency(LightSource light, Vector l, Vector n, GeoPoint geopoint) {\n Vector lightDirection = l.scale(-1); // switch to the opposite side from point to light source\n Ray lightRay = new Ray(geopoint.getPoint(), lightDirection, n);//build the Ray raised from the point.\n Point3D pointGeo = geopoint.getPoint();//the point.\n\n /**if the ray from point did not find eny objects so it will bring back 1=no change. do not reduse the impact of the light*/\n List<GeoPoint> intersections = null;\n intersections = scene.getGeometries().findGeoIntersections(lightRay);\n if (intersections == null) {\n return 1d;//all lights impact and go throw. there is no change.\n }\n double lightDistance = light.getDistance(pointGeo);\n double ktr = 1d;\n for (GeoPoint gp : intersections) {//adds all the objects that are in the middle in terms of their transparency.\n if (alignZero(gp.getPoint().distance(pointGeo) - lightDistance) <= 0) {\n ktr *= gp.getGeometry().getMaterial().getkT();\n if (ktr < MIN_CALC_COLOR_K) {//if that specific object is atum so it will return 0.\n return 0.0;\n }\n }\n }\n return ktr;//how much shakoof are all the different objects between the light to the point.\n }", "private void generateLights(Universe universe) throws SAXException {\n ArrayList<SceneLight> lights = universe.getScene().getLightArray();\n for (int i = 0; i < lights.size(); i++) {\n saver.addAttribute(\"type\", XmlSaver.CDATA, lights.get(i).getLightType().name());\n saver.startTag(\"light\");\n Color3f color = new Color3f(lights.get(i).getColor());\n saver.startTag(\"color\", Converter.tuple3fToString(color));\n switch(lights.get(i).getLightType()){\n// case ambient:\n case point:\n Point3f position = lights.get(i).getPosition();\n saver.startTag(\"position\", Converter.tuple3fToString(position));\n Point3f attenuation = lights.get(i).getAttenuation();\n saver.startTag(\"attenuation\", Converter.tuple3fToString(attenuation));\n break;\n case directional:\n Vector3f direction = lights.get(i).getDirection();\n saver.startTag(\"direction\", Converter.tuple3fToString(direction));\n break;\n }\n saver.closeTag(\"light\");\n }\n }", "Light getNSlight();", "Set<Point2D> getWallSet();", "public Boolean checkCapture(ArrayList<Point> points){\n int length = points.size();\n\n for (int i = 1; i < length; i++) {\n Point lineA = points.get(i);\n\n for (int j = i + 1; j < length; j++) {\n Point lineB = points.get(j);\n\n //Check if one of the lines goes through the monster by using its size\n boolean left = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX,mY,mX,mY+monsterHeight);\n boolean right = lineline(lineA.x,lineA.y,lineB.x,lineB.y,mX + monsterWidth,mY, mX+monsterWidth,mY+monsterHeight);\n boolean top = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY, mX+monsterWidth,mY);\n boolean bottom = lineline(lineA.x,lineA.y,lineB.x,lineB.y, mX,mY+monsterHeight, mX+monsterWidth,mY+monsterHeight);\n\n //If any are true then its captured\n if(left || right || top || bottom){\n return true;\n }\n }\n }\n return false;\n }", "public void changingLights(int[][] lightsOnOff) {\n if(this.command.equals(\"turn on\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1;\n }\n }\n }\n /* if the command is \"turn off\", the range of\n * lights are made to have value of 0 */\n if(this.command.equals(\"turn off\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 0;\n }\n }\n }\n /* if the command is \"toggle all\", the range of\n * lights are made to have value of 1 if they\n * were 0 before and 0 if they were 1 before */\n if(this.command.equals(\"toggle all\")) {\n for(int i = this.startCoord[0]; i <= this.endCoord[0]; i++) {\n for(int j = this.startCoord[1]; j <= this.endCoord[1]; j++) {\n lightsOnOff[i][j] = 1 - lightsOnOff[i][j];\n }\n }\n }\n }", "public static ArrayList<XYCoord> findVisibleLocations(GameMap map, Unit viewer, int x, int y, boolean piercing)\n {\n ArrayList<XYCoord> viewables = new ArrayList<XYCoord>();\n\n if( map.isLocationValid(x, y) )\n {\n int range = (piercing)? viewer.model.visionRangePiercing : viewer.model.visionRange;\n // if it's a surface unit, give it the boost the terrain would provide\n if( viewer.model.isSurfaceUnit() )\n range += map.getEnvironment(x, y).terrainType.getVisionBoost();\n viewables.addAll(findVisibleLocations(map, new XYCoord(x, y), range, piercing));\n }\n \n return viewables;\n }", "private void updatePointLight() {\n\t\tfloat light1_position[] = { player.getPosition().x, 0.0f, player.getPosition().z, 1.0f }; // x,y,z,1\n\t\tfloat light1_diff_spec[] = { 1f, 1f, 1f, 1.0f };\n\t\t\n\t\t// Eine weitere Lichtquellen definieren\n\t\tpointLight.setPosition(light1_position);\n\t\tpointLight.setDiffAndSpek(light1_diff_spec);\n\t\t\n\t\tglEnable(GL_LIGHTING);\n\t}", "public boolean isStaticLight();", "List<Coord> allActiveCells();", "private void findLaneLines(int[] pixels, int row, int leftStartingX, int rightStartingX) {\n if (row > getCameraHeight() * LOOK_DIST) {\n Point lastLeftPoint = leftLine.getLeftPoint(pixels, row, getScreenWidth(), leftStartingX);\n Point lastRightPoint = rightLine.getRightPoint(pixels, row, getScreenWidth(), rightStartingX, getCameraWidth());\n leftLine.getLanePoints().add(lastLeftPoint);\n rightLine.getLanePoints().add(lastRightPoint);\n\n // If no lane was found, search from the last startingX\n if (lastLeftPoint.isEmpty() && lastRightPoint.isEmpty()) {\n findLaneLines(pixels, row - 1, leftStartingX, rightStartingX);\n\n // If Only the right lane was found, right starts from last starting X. Left starts from last startingX\n } else if (lastLeftPoint.isEmpty()) {\n int startSearchX = lastRightPoint.getX() - SEARCH_OFFSET;\n findLaneLines(pixels, row - 1, startSearchX, startSearchX);\n\n // If Only the left lane was found, left starts from last starting X. Right starts from last startingX\n } else if (lastRightPoint.isEmpty()) {\n int startSearchX = lastLeftPoint.getX() + SEARCH_OFFSET;\n findLaneLines(pixels, row - 1, startSearchX, startSearchX);\n\n // If Both lanes are found start search from last X + or - 100.\n } else {\n findLaneLines(pixels, row - 1, lastLeftPoint.getX() + SEARCH_OFFSET,\n lastRightPoint.getX() - SEARCH_OFFSET);\n }\n }\n }", "private primitives.Color calcColor(GeoPoint p, Ray inRay, int level, double k) {\r\n\r\n\t\tColor _color = p.geometry.get_emmission(); // remove Ambient Light\r\n\t\tVector v = p.point.subtract(_scene.get_camera().get_p0()).normalize();// vector camera-> geometry\r\n\t\tVector n = p.geometry.getNormal(p.point); // normal of geometry\r\n\t\tMaterial material = p.geometry.get_material();\r\n\r\n\t\tint nShininess = material.get_nShiness();\r\n\t\tdouble kd = material.get_kD();\r\n\t\tdouble ks = material.get_kS();\r\n\r\n\t\tfor (LightSource lightSource : _scene.get_lights()) {\r\n\r\n\t\t\tVector l = lightSource.getL(p.point);// vector light->geometry\r\n\t\t\t// sign of l*n = sign of v*n\r\n\t\t\tif (Math.signum(n.dotProduct(l)) == Math.signum(n.dotProduct(v))) {\r\n\t\t\t\tdouble ktr = transparency(lightSource, l, n, p);\r\n\t\t\t\tif (ktr * k > MIN_CALC_COLOR_K) {\r\n\t\t\t\t\tColor lightIntensity = lightSource.getIntensity(p.point).scale(ktr);\r\n\t\t\t\t\t_color = _color.add(calcDiffusive(kd, l, n, lightIntensity),\r\n\t\t\t\t\t\t\tcalcSpecular(ks, l, n, v, nShininess, lightIntensity));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (level == 1)\r\n\t\t\treturn Color.BLACK;\r\n\t\tdouble kr = p.geometry.get_material().get_kR(), kkr = k * kr;\r\n\t\tif (kkr > MIN_CALC_COLOR_K) {\r\n\t\t\tRay reflectedRay = constructReflectedRay(n, p.point, inRay);\r\n\t\t\tGeoPoint reflectedPoint = findClosestIntersection(reflectedRay);\r\n\t\t\tif (reflectedPoint != null)\r\n\t\t\t\t_color = _color.add(calcColor(reflectedPoint, reflectedRay, level - 1, kkr).scale(kr));\r\n\t\t}\r\n\r\n\t\tdouble kt = p.geometry.get_material().get_kT(), kkt = k * kt;\r\n\t\tif (kkt > MIN_CALC_COLOR_K) {\r\n\t\t\tRay refractedRay = constructRefractedRay(n, p.point, inRay);\r\n\t\t\tGeoPoint refractedPoint = findClosestIntersection(refractedRay);\r\n\t\t\tif (refractedPoint != null)\r\n\t\t\t\t_color = _color.add(calcColor(refractedPoint, refractedRay, level - 1, kkt).scale(kt));\r\n\r\n\t\t}\r\n\r\n\t\treturn _color;\r\n\t}", "private ServiceResponse getControlledLamps() {\r\n\t// We assume that the Service-Call always succeeds because we only\r\n\t// simulate the lights\r\n\tServiceResponse sr = new ServiceResponse(CallStatus.succeeded);\r\n\t// create a list including the available lights\r\n\tint[] lamps = theServer.getLampIDs();\r\n\tArrayList al = new ArrayList(lamps.length);\r\n\tfor (int i = 0; i < lamps.length; i++) {\r\n\t LightSource ls = new LightSource(\r\n\t\t constructLampURIfromLocalID(lamps[i]));\r\n\t ls.setLightType(ElectricLight.lightBulb);\r\n\t al.add(ls);\r\n\t}\r\n\t// create and add a ProcessOutput-Event that binds the output URI to the\r\n\t// created list of lamps\r\n\tsr.addOutput(new ProcessOutput(\r\n\t\tLightingService1.OUTPUT_CONTROLLED_LAMPS, al));\r\n\treturn sr;\r\n }", "public visibleObject[][] getVisibility() {\n\n\t\tvisibleObject visiblility[][] = new GridCell.visibleObject[2 * visionRange + 1][2 * visionRange + 1];\n\t\tGridCell[][] cellArray = MazeGame.worldGraph.cellArray;\n\n\t\tfor (int i = (-visionRange); i < visionRange + 1; i++) {\n\t\t\tfor (int j = (-visionRange); j < visionRange + 1; j++) {\n\n\t\t\t\tGridCell cell = MazeGame.worldGraph.cellArray[currentCell.rowIndex + i][currentCell.columnIndex + j];\n\n\t\t\t\tfor (int k = currentCell.rowIndex - visionRange; k < currentCell.rowIndex + visionRange + 1; k++) {\n\t\t\t\t\tfor (int l = (currentCell.columnIndex - visionRange); l < currentCell.columnIndex + visionRange\n\t\t\t\t\t\t\t+ 1; l++) {\n\n\t\t\t\t\t\tif (!cellArray[k][l].hasEastEdge) {\n\n\t\t\t\t\t\t\tBoolean isIntersected = isIntersected(\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + j + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.rowIndex + i + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + 0.5, \n\t\t\t\t\t\t\t\t\tcurrentCell.rowIndex + 0.5, \n\t\t\t\t\t\t\t\t\tcellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex, \n\t\t\t\t\t\t\t\t\tcellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex + 1);\n\n\t\t\t\t\t\t\tif (isIntersected != null) {\n\t\t\t\t\t\t\t\tif (isIntersected.booleanValue()) {\n\t\t\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.NULL;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (!cellArray[k][l].hasSouthEdge) {\n\n\t\t\t\t\t\t\tBoolean isIntersected = isIntersected(currentCell.columnIndex + j + 0.5, currentCell.rowIndex + i + 0.5,\n\t\t\t\t\t\t\t\t\tcurrentCell.columnIndex + 0.5, currentCell.rowIndex + 0.5, cellArray[k][l].columnIndex,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex +1 , cellArray[k][l].columnIndex + 1,\n\t\t\t\t\t\t\t\t\tcellArray[k][l].rowIndex + 1);\n\n\t\t\t\t\t\t\tif (isIntersected != null) {\n\t\t\t\t\t\t\t\tif (isIntersected.booleanValue()) {\n\t\t\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.NULL;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n//\t\t\t\tif(visiblility[i + visionRange][j + visionRange] != visibleObject.NULL){\n//\n//\t\t\t\t\tif (cell.cheese != null) {\n//\t\t\t\t\t\tif (cell.jerry != null) {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.JERRY_AND_CHEESE;\n//\t\t\t\t\t\t} else if (cell.tom != null) {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.TOM_AND_CHEESE;\n//\t\t\t\t\t\t} else {\n//\t\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.CHEESE;\n//\t\t\t\t\t\t}\n//\t\t\t\t\t} else if (cell.jerry != null) {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.JERRY;\n//\t\t\t\t\t} else if (cell.tom != null) {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.TOM;\n//\t\t\t\t\t} else {\n//\t\t\t\t\t\tvisiblility[i + visionRange][j + visionRange] = visibleObject.EMPTY_SPACE;\n//\t\t\t\t\t}\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.visiblility = visiblility;\n\t\treturn visiblility;\n\t}", "public ArrayList<ObjectInMap> getVisibleObjects() {\n //To ensure Obstacles will be drawn at last\n objectsInMap.sort((o1, o2) -> {\n if (o1 instanceof Bush)\n return 1;\n else if (o2 instanceof Bush)\n return -1;\n else if (o1 instanceof Obstacle)\n return -1;\n else if (o2 instanceof Obstacle)\n return 1;\n else\n return 0;\n });\n\n Polygon visible = new Polygon(new int[]{viewPoint.x, ((int) (viewPoint.x + zoom * GAME_WIDTH)), ((int) (viewPoint.x + zoom * GAME_WIDTH)), viewPoint.x}\n , new int[]{viewPoint.y, viewPoint.y, ((int) (viewPoint.y + zoom * GAME_HEIGHT)), ((int) (viewPoint.y + zoom * GAME_HEIGHT))}, 4);\n\n return objectsInMap.stream().filter(o -> o.intersects(visible)).collect(Collectors.toCollection(ArrayList::new));\n }", "private void drawLight() {\n final int pointMVPMatrixHandle = GLES20.glGetUniformLocation(mPointProgramHandle, \"u_MVPMatrix\");\n final int pointPositionHandle = GLES20.glGetAttribLocation(mPointProgramHandle, \"a_Position\");\n\n // Pass in the position.\n GLES20.glVertexAttrib3f(pointPositionHandle, mLightPosInModelSpace[0], mLightPosInModelSpace[1], mLightPosInModelSpace[2]);\n\n // Since we are not using a buffer object, disable vertex arrays for this attribute.\n GLES20.glDisableVertexAttribArray(pointPositionHandle);\n\n // Pass in the transformation matrix.\n Matrix.multiplyMM(mMVPMatrix, 0, mViewMatrix, 0, mLightModelMatrix, 0);\n Matrix.multiplyMM(mTemporaryMatrix, 0, mProjectionMatrix, 0, mMVPMatrix, 0);\n System.arraycopy(mTemporaryMatrix, 0, mMVPMatrix, 0, 16);\n GLES20.glUniformMatrix4fv(pointMVPMatrixHandle, 1, false, mMVPMatrix, 0);\n\n // Draw the point.\n GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 1);\n }", "void trackFilteredObject(com.ilos.wiser.ILOSDataCollection.Object theObject, Mat threshold, Mat HSV, Mat cameraFeed, String colour, int counter) {\n ArrayList<com.ilos.wiser.ILOSDataCollection.Object> Objects = new ArrayList<>();\n Mat temp = new Mat();\n threshold.copyTo(temp);\n //Contours track the edges of the binary image\n List<MatOfPoint> contours = new ArrayList<>();\n Mat hierarchy = new Mat();\n boolean redFound = false;\n boolean blueFound = false;\n //Copies contours to the list contours\n Imgproc.findContours(temp,contours,hierarchy,Imgproc.RETR_EXTERNAL,Imgproc.CHAIN_APPROX_SIMPLE);\n boolean objectFound = false;\n if (!hierarchy.empty()) {\n for (int i = 0; i >=0; i = (int)hierarchy.get(i, 0)[1]) {\n MatOfPoint contour = contours.get(i);\n Moments moment = Imgproc.moments(contour);\n double area = moment.m00;\n if(area > MIN_AREA) {\n com.ilos.wiser.ILOSDataCollection.Object object = new com.ilos.wiser.ILOSDataCollection.Object(counter);\n //sets fields for the object based on the moment class\n object.setXPos(moment.m10/area);\n object.setYPos(moment.m01/area);\n object.type = theObject.type;\n object.colour = theObject.colour;\n //Tags if each object has been found to track how long it has been off screen for\n if(object.colour == new Scalar(255,0,0)){\n redFound = true;\n }\n if(object.colour == new Scalar(0,255,0)){\n blueFound = true;\n }\n //Appends a list of the object that are seen on the current frame\n Objects.add(object);\n\n objectFound = true;\n\n }else {objectFound = false;}\n }\n if(!redFound){\n if(redStart==1) {\n redStart = System.currentTimeMillis();\n }\n else{\n redEnd = System.currentTimeMillis();\n }\n if(redStart!=1 && redEnd!=0) {\n redGone = redEnd - redStart;\n if(redGone > 300) {\n System.out.println(\"RED OFF SCREEN: \" + redGone);\n }\n redStart = 1;\n redEnd = 0;\n }\n\n }\n if(!blueFound){\n if(blueStart==1) {\n blueStart = System.currentTimeMillis();\n }\n else{\n blueEnd = System.currentTimeMillis();\n }\n if(blueStart!=1 && blueEnd!=0) {\n blueGone = blueEnd - blueStart;\n if(blueGone > 300) {\n System.out.println(\"BLUE OFF SCREEN\" + blueGone);\n }\n blueStart = 1;\n blueEnd = 0;\n }\n }\n if(objectFound == true && collectData) {\n //This does all of the highlighting of the circles on the scren\n drawObject(Objects, mRgba, temp, contours, hierarchy);\n }\n //If collection is finished\n if(!collectData && redList.size()>0 && blueList.size()>0){\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n coordText.setText(\"Press back to select a new path!\");\n }\n });\n }\n }\n }", "private void findStaffLinePositions()\n {\n Log.i(TAG, \"findStaffLinePositions\");\n final int sliceStart = (int)(0.45*mWidth);\n final int sliceEnd = (int)(0.65*mWidth);\n \n boolean connected;\n int lineNum;\n for(int x = sliceStart; x<sliceEnd; ++x) //only consider a slice of x values\n {\n connected=false;\n lineNum=0;\n for(int y=0; y<mHeight; ++y)\n {\n if(mHorizontalProjHist[y] >= x) //the histogram for this y value is within the slice we're looking at\n {\n if(mStaffLineMap.indexOfKey(y) < 0) //we haven't seen this y value, so add it\n {\n \tmStaffLineMap.put(y, lineNum);\n }\n connected = true;\n }\n else if(connected) //encountered whitespace after a line\n {\n lineNum++;\n connected = false;\n }\n }\n }\n\n }", "default List<Point3D> findIntersections(Ray ray) {\n\tList<GeoPoint> geoList = findGeoIntersections(ray);\n\treturn geoList == null ? null\n\t: geoList .stream()\n\t.map(gp -> gp.point)\n\t.collect(Collectors.toList());\n\t}", "java.util.List getSurfaceRefs();", "public List<Point2D> getControlPoints();", "public void getLandmarksToBeDrawn(){\n ((Pane) mapImage.getParent()).getChildren().removeIf(x->x instanceof Circle || x instanceof Text || x instanceof Line);\n int landmark1 = l1.getSelectionModel().getSelectedIndex();\n int landmark2 = l2.getSelectionModel().getSelectedIndex();\n GraphNodeAL<MapPoint> lm1 = landmarkList.get(landmark1);\n GraphNodeAL<MapPoint> lm2 = landmarkList.get(landmark2);\n CostedPath path=shortestRouteDij(lm1,lm2); \n GraphNodeAL<MapPoint> prev=null;\n for(GraphNodeAL<?> n : path.pathList) { \n drawLandmarks((GraphNodeAL<MapPoint>) n);\n if(prev!=null) lineDraw(prev, (GraphNodeAL<MapPoint>) n);\n prev= (GraphNodeAL<MapPoint>) n;\n }\n }", "protected String getLights() {\n final JSONArray lights = new JSONArray();\n for (final Map.Entry<ProviderName, Provider<?, ?>> entry : providers.entrySet()) {\n try {\n for (final Light light : entry.getValue().getLights()) {\n lights.put(light.getJson());\n }\n } catch (final Exception e) {\n final String message = String.format(\"Failed to fetch information for %s\",\n entry.getValue().getClass().getSimpleName());\n LOGGER.error(message, e);\n throw new RuntimeException(message, e);\n }\n }\n return lights.toString();\n }", "private void getNeighbors() {\n\t\tRowIterator iterator = currentGen.iterateRows();\n\t\twhile (iterator.hasNext()) {\n\t\t\tElemIterator elem = iterator.next();\n\t\t\twhile (elem.hasNext()) {\n\t\t\t\tMatrixElem mElem = elem.next();\n\t\t\t\tint row = mElem.rowIndex();\n\t\t\t\tint col = mElem.columnIndex();\n\t\t\t\tint numNeighbors = 0;\n\t\t\t\tfor (int i = -1; i < 2; i++) { // loops through row above,\n\t\t\t\t\t\t\t\t\t\t\t\t// actual row, and row below\n\t\t\t\t\tfor (int j = -1; j < 2; j++) { // loops through column left,\n\t\t\t\t\t\t\t\t\t\t\t\t\t// actual column, coloumn\n\t\t\t\t\t\t\t\t\t\t\t\t\t// right\n\t\t\t\t\t\tif (!currentGen.elementAt(row + i, col + j).equals(\n\t\t\t\t\t\t\t\tfalse)) // element is alive, add 1 to neighbor\n\t\t\t\t\t\t\t\t\t\t// total\n\t\t\t\t\t\t\tnumNeighbors += 1;\n\t\t\t\t\t\telse { // element is not alive, add 1 to its total\n\t\t\t\t\t\t\t\t// number of neighbors\n\t\t\t\t\t\t\tInteger currentNeighbors = (Integer) neighbors\n\t\t\t\t\t\t\t\t\t.elementAt(row + i, col + j);\n\t\t\t\t\t\t\tneighbors.setValue(row + i, col + j,\n\t\t\t\t\t\t\t\t\tcurrentNeighbors + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tneighbors.setValue(row, col, numNeighbors - 1); // -1 to account\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// for counting\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// itself as a\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// neighbor\n\t\t\t}\n\t\t}\n\t}", "private void updateLight() {\r\n\t}", "public abstract Color3f traceLight(Vector3f pos, Vector3f normal,\n\t Material m, List<Shape> objects);", "void renderHotspots() {\n boolean afterCurrent = false;\n boolean hasLastPos = false;\n float lastX = 0.0f;\n float lastY = 0.0f;\n float lastZ = 0.0f;\n \n final float halfWidth = 0.1f / 2;\n final float halfLength = 0.1f / 2;\n final float halfHeight = 0.1f / 2;\n final float eyeHeight = 0.91712f;//1.1f;\n \n // Find pan position offset vector\n if (selectedTimeInterval.getLocationMetadataEntry() == null) {\n return;\n }\n \n if (!dstLocationVectorExists)\n return;\n \n GL11.glLoadIdentity();\n // set up for tracking hotspot screen x,y\n\t\tfloat projectedXYZ[] = new float[3]; \t\t\n\t\tprojectionMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_PROJECTION_MATRIX, projectionMatrix);\n\t\tgetMatrixAsArray(projectionMatrix, projectionArray);\n\t\tviewportMatrix.clear();\n\t\tGL11.glGetInteger(GL11.GL_VIEWPORT, viewportMatrix);\n\t\tviewportArray[0] = viewportMatrix.get(0);\n\t\tviewportArray[1] = viewportMatrix.get(1);\n\t\tviewportArray[2] = viewportMatrix.get(2);\n\t\tviewportArray[3] = viewportMatrix.get(3);\n //System.out.println(\"\"+viewportArray[0] + \" \"+ viewportArray[1]+\" \"+viewportArray[2]+\" \"+viewportArray[3] ); \n\t\tmodelMatrix.clear();\n\t\tGL11.glGetFloat(GL11.GL_MODELVIEW_MATRIX, modelMatrix);\n\t\tgetMatrixAsArray(modelMatrix, modelArray);\n \n GL11.glBindTexture(GL11.GL_TEXTURE_2D, 0); // no texture\n \n for (int i=0; i<roverTrackingList.size()-1; i++) {\n \tRoverTrackingListEntry listEntry = (RoverTrackingListEntry) roverTrackingList.get(i);\n\t\t\tlistEntry.screenX = 0.0f;\n\t\t\tlistEntry.screenY = 0.0f;\n \t\n double da = listEntry.locationMetadataEntry.rover_origin_offset_vector_a + listEntry.siteMetadataEntry.offset_vector_a - currentLocationVectorA;\n double db = listEntry.locationMetadataEntry.rover_origin_offset_vector_b + listEntry.siteMetadataEntry.offset_vector_b - currentLocationVectorB;\n double dc = listEntry.locationMetadataEntry.rover_origin_offset_vector_c + listEntry.siteMetadataEntry.offset_vector_c - currentLocationVectorC;\n \n float x = (float) db;\n float y = (-(float)dc) - eyeHeight;\n float z = - (float) da;\n\n // calculate brightness of point based on number of images visible for location\n float brightness = 0.0f;\n \n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getNumEnabledImages() > 2) {\n \t// track screen x, y of hotspot\n \t\t\tGLU.gluProject(x, y, z, modelArray, projectionArray, viewportArray, projectedXYZ);\n \t\t\tif (projectedXYZ[2] < 1.0f) {\n\t \t\t\tlistEntry.screenX = projectedXYZ[0];\n\t \t\t\t// transform y from opengl screen coords to regular screen coords\n\t \t\t\tlistEntry.screenY = viewportArray[3] - projectedXYZ[1];\n \t\t\t}\n \t\n \t// render hotspot\n GL11.glLoadIdentity();\n GL11.glTranslatef(x, y, z);\n //System.out.println(\"\"+listEntry.screenX+\" \"+listEntry.screenY);\n \n brightness = 0.5f + 0.1f * listEntry.locationListEntry.getNumEnabledImages();\n if (brightness > 1.0f) {\n brightness = 1.0f;\n }\n \n GL11.glBegin(GL11.GL_QUADS); // D draw A Quad\n \n if (listEntry.locationListEntry.getStartLocation().equals(selectedTimeInterval.getStartLocation())) {\n GL11.glColor3f(brightness, 0.0f, brightness); \n }\n else if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n }\n \n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Top)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Bottom Left Of The Quad (Top)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Bottom Right Of The Quad (Top)\n\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Top Right Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Top Left Of The Quad (Bottom)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Bottom)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Bottom)\n\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Front)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Front)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Front)\n\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Back)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Back)\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Back)\n\n GL11.glVertex3f(-halfWidth, halfHeight, halfLength); // Top Right Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, halfHeight, -halfLength); // Top Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, -halfLength); // Bottom Left Of The Quad (Left)\n GL11.glVertex3f(-halfWidth, -halfHeight, halfLength); // Bottom Right Of The Quad (Left)\n\n GL11.glVertex3f(halfWidth, halfHeight, -halfLength); // Top Right Of The Quad (Right)\n GL11.glVertex3f(halfWidth, halfHeight, halfLength); // Top Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, halfLength); // Bottom Left Of The Quad (Right)\n GL11.glVertex3f(halfWidth, -halfHeight, -halfLength); // Bottom Right Of The Quad (Right)\n \n GL11.glEnd(); // Done Drawing The Quads\n\t }\n \n if (hasLastPos && !listEntry.segmentStart) {\n brightness = 0.5f;\n if (afterCurrent) {\n GL11.glColor3f(0.0f, 0.0f, brightness);\n }\n else {\n GL11.glColor3f(brightness, 0.0f, 0.0f);\n } \n GL11.glLoadIdentity();\n GL11.glBegin(GL11.GL_LINES); \n// GL11.glColor3f(1.0f, 0.0f, 0.0f); \n GL11.glVertex3f(lastX, lastY, lastZ);\n GL11.glVertex3f(x, y, z);\n GL11.glEnd();\n }\n \n lastX = x;\n lastY = y;\n lastZ = z;\n hasLastPos = true;\n if (listEntry.locationListEntry != null && listEntry.locationListEntry.getStartLocation().equals(this.selectedTimeInterval.getStartLocation())) {\n afterCurrent = true;\n }\n }\n }", "public Point[] neighbors (Point p) {\n Point[] pointsAround = this.pointsAround(p);\n ArrayList<Point> neighbors = new ArrayList<Point>();\n for (Point p2 : pointsAround)\n if (this.adjacence(p, p2))\n neighbors.add(p2);\n return neighbors.toArray(new Point[neighbors.size()]);\n }", "protected ArrayList<int[]> findAdjacentUnknown(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY && coveredMap[i][j] == SIGN_UNKNOWN) {\n\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "protected ArrayList<int[]> findAdjacentRisk(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY ) {\n\t\t\t\t\tif (coveredMap[i][j] == SIGN_UNKNOWN || coveredMap[i][j] == SIGN_MARK) {\n\t\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "void animate( LightCondition lights );", "protected static void tracer(Scene scene, Ray ray, short[] rgb) {\n\t\trgb[0] = 0;\n\t\trgb[1] = 0;\n\t\trgb[2] = 0;\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\n\t\tif (closest == null) {\n\t\t\treturn;\n\t\t}\n\t\tList<LightSource> lights = scene.getLights();\n\t\t\n\t\trgb[0] = 15;\n\t\trgb[1] = 15;\n\t\trgb[2] = 15;\n\t\tPoint3D normal = closest.getNormal();\n\t\tfor (LightSource light : lights) {\n\t\t\tRay lightRay = Ray.fromPoints(light.getPoint(), closest.getPoint());\n\t\t\tRayIntersection lightClosest = findClosestIntersection(scene, lightRay);\n\n\t\t\tif(lightClosest == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( lightClosest.getPoint().sub(light.getPoint()).norm() + 0.001 < \n\t\t\t\t\tclosest.getPoint().sub(light.getPoint()).norm()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tPoint3D r = lightRay.direction.sub(normal.scalarMultiply(2*(lightRay.direction.scalarProduct(normal))));\n\t\t\t\n\t\t\trgb[0] += light.getR()*(closest.getKdr()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrr() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[1] += light.getG()*(closest.getKdg()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrg() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[2] += light.getB()*(closest.getKdb()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrb() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t}\n\t}", "public void findEdgesAndThreshold() {\n\t\tActiveImageConverter.convertToGray16();\n\t\tContrastEnhancer enhancer = new ContrastEnhancer();\n\t\tenhancer.equalize(ActiveImage);\n\t\tActiveImageProcessor = ActiveImage.getProcessor();\n\t\tActiveImageProcessor.findEdges();\n\t\tActiveImageProcessor.sqr(); // turns the gradient into gradient squared\n\t\tActiveImageProcessor.sqr(); // further enhances the good edges\n\t\tenhancer.equalize(ActiveImage);\n\t\tdouble mean = ActiveImage.getStatistics().mean;\n\t\tdouble max = ActiveImage.getStatistics().max;\n\t\tActiveImageProcessor.setThreshold(mean*8,max,ActiveImageProcessor.OVER_UNDER_LUT);\n\t\tif(userInput)\n\t\t{\n\t\t\tIJ.run(ActiveImage,\"Threshold...\",\"\");\n\t\t\tnew WaitForUserDialog(\"OK\").show();\n\t\t\tif (WindowManager.getWindow(\"Threshold\")!= null){\n\t\t\t\tIJ.selectWindow(\"Threshold\");\n\t\t\t\tIJ.run(\"Close\"); \n\t\t\t}\n\t\t}\n\t\tIJ.run(ActiveImage,\"Convert to Mask\",\"\");\n\t\tIJ.run(ActiveImage,\"Skeletonize\",\"\");\n\t\treturn;\n\t}", "static int findIslands(ArrayList<ArrayList<Integer>> a, int N, int M)\n {\n \n // Your code here\n int island_count = 0;\n for(int i=0;i<N;i++){\n for(int j=0;j<M;j++){\n if(a.get(i).get(j) == 1){\n island_count++;\n explore_island(a, i, j);\n }\n }\n }\n \n return island_count;\n \n }", "private Color calcLocalEffects(GeoPoint intersection, Ray ray,double k) \r\n\t{\r\n\t\tVector v = ray.getDir();// ray direction\r\n\t\tVector n = intersection.geometry.get_Normal(intersection.point);\r\n\t\tdouble nv = Util.alignZero(n.dotProduct(v));\r\n\t\tif (Util.isZero(nv))// there is no diffusive and Specular\r\n\t\t\treturn Color.BLACK;\r\n\t\tint nShininess = intersection.geometry.getMaterial().nShininess;\r\n\t\tdouble kd = intersection.geometry.getMaterial().kD;\r\n\t\tdouble ks = intersection.geometry.getMaterial().kS;\r\n\t\tColor color = Color.BLACK;\r\n\t\tfor (LightSource lightSource : scene.lights) {\r\n\t\t\tVector l = lightSource.getL(intersection.point);\r\n\t\t\tdouble nl = Util.alignZero(n.dotProduct(l));\r\n\t\t\tif (nl * nv > 0) { // sign(nl) == sing(nv)\r\n\t\t\t\tdouble ktr = transparency( l, n, intersection,lightSource);\r\n\t\t\t\tif (ktr * k > MIN_CALC_COLOR_K) {\r\n\t\t\t\t\tColor lightIntensity = lightSource.getIntensity(intersection.point).scale(ktr);\r\n\t\t\t\t\tcolor = color.add(calcDiffusive(kd, nl, lightIntensity),\r\n\t\t\t\t\t\t\tcalcSpecular(ks, l, n, nl, v, nShininess, lightIntensity));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}", "public List<Boolean> getLayerVisibility ()\n {\n return Collections.unmodifiableList(_vis);\n }", "public static ArrayList<XYCoord> findVisibleLocations(GameMap map, XYCoord origin, int range, boolean piercing)\n {\n ArrayList<XYCoord> locations = new ArrayList<XYCoord>();\n\n // Loop through all the valid x and y offsets, as dictated by the max range, and add valid spaces to our collection.\n for( int yOff = -range; yOff <= range; ++yOff )\n {\n for( int xOff = -range; xOff <= range; ++xOff )\n {\n int currentRange = Math.abs(xOff) + Math.abs(yOff);\n XYCoord coord = new XYCoord(origin.xCoord + xOff, origin.yCoord + yOff);\n if( currentRange <= range && map.isLocationValid(coord) )\n {\n // If we're adjacent, or we can see through cover, or it's *not* cover, we can see into it.\n if( piercing || !map.getEnvironment(coord).terrainType.isCover() )\n {\n // Add this location to the set.\n locations.add(coord);\n }\n }\n }\n }\n\n return locations;\n }", "public Vector3f getLightPosition();", "public void setLights(boolean lights) {\n \tthis.lightsAreOn = lights;\n }", "public static ArrayList<XYCoord> findVisibleLocations(GameMap map, XYCoord origin, int range)\n {\n return findVisibleLocations(map, origin, range, false);\n }", "public int getNumberOfLightsToTurnOn() {\n return numberOfLightsToTurnOn;\n }", "protected ArrayList<int[]> findAdjacentSafe(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY && coveredMap[i][j] != SIGN_UNKNOWN && coveredMap[i][j] != SIGN_MARK) {\n\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "public ArrayList<Object> getHighLights() {\r\n\t\treturn _highLights;\r\n\t}", "@Override\n \t\t\t\tpublic void doCreatePointLight() {\n \n \t\t\t\t}", "public static int find_land (int a [][], int x, int y){\r\n int count_land = 0;\r\n for (int i = 0; i < x; i++){\r\n for (int j = 0; j < y; j++){\r\n if (a[i][j] > 0){\r\n count_land ++;\r\n //x[i][j] = 0;\r\n check_island(i, j);\r\n }\r\n }\r\n }\r\n return count_land;\r\n }", "public LinkedList<NaturaLight> listSensorNaturaLight(){\r\n LinkedList<NaturaLight> aux=new LinkedList<>();\r\n for (Sensor s:sensors){\r\n if(s instanceof NaturaLight)\r\n aux.add((NaturaLight)s);\r\n }\r\n return aux;\r\n }", "public List<Point> getPieces(Color pColor){\r\n List<Point> result = new LinkedList<>();\r\n Point pos = new Point();\r\n for (int i = 0; i < 8; i++){\r\n pos.setFirst(i);\r\n for (int j = 0; j < 8; j++){\r\n pos.setSecond(j);\r\n if((isBlack(pColor) && isBlack(pos)) || (isRed(pColor) && isRed(pos))){\r\n result.add(pos.clone());\r\n }\r\n }\r\n } \r\n return result;\r\n }", "protected ArrayList<int[]> findAdjacentMark(int[] pair) {\n\t\tint x = pair[0];\n\t\tint y = pair[1];\n\t\tArrayList<int[]> neighbors = new ArrayList<int[]>();\n\t\tfor (int i = x - 1; i <= x + 1; i++) {\n\t\t\tfor (int j = y - 1; j <= y + 1; j++) {\n\t\t\t\tif (i >= 0 && i < maxX && j >= 0 && j < maxY && coveredMap[i][j] == SIGN_MARK) {\n\t\t\t\t\tneighbors.add(new int[]{i, j});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn neighbors;\n\t}", "private int light(int x, int y, int currentX, int currentY, double r)\n\t{\n\t\tif(currentX < 0 || currentX >= this.width || currentY < 0 || currentY >= this.height)\n\t\t\treturn 0;\n\t\t\n\t\tif(tiles[currentX][currentY].getLit())\n\t\t\treturn 0;\n\t\t\n\t\tif(tiles[currentX][currentY].isOpaque()) {\n\t\t\ttiles[currentX][currentY].setLit(true);\n\t\t\ttiles[currentX][currentY].setSeen(true);\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\tdouble distance = Math.sqrt( Math.pow(currentX - x, 2) + Math.pow(currentY - y, 2) );\n\t\t\n\t\tif(distance > r)\n\t\t\treturn 0;\n\t\t\n\t\t//Done with all base cases\n\t\t\n\t\ttiles[currentX][currentY].setLit(true);\n\t\ttiles[currentX][currentY].setSeen(true);\n\t\treturn 1 + light(x,y, currentX + 1, currentY, r) + light(x,y, currentX - 1, currentY, r) + light(x,y, currentX, currentY + 1, r) + light(x,y, currentX + 1, currentY - 1, r);\n\t\t\n\t\t\n//\t\tint result = 0;\n\n\t\t// ***** <YOUR CODE GOES HERE> *****\n//\t\treturn result;\n\t}", "List<Integer> getNeighbors(int x);", "private ArrayList<Float> FindRasterCellOnLine(int x1, int y1, int x2, int y2) {\n // delta of exact value and rounded value of the dependant variable\n ArrayList<Float> zvalue = new ArrayList<Float>();\n int d = 0;\n\n int dy = Math.abs(y2 - y1);\n int dx = Math.abs(x2 - x1);\n\n int dy2 = (dy << 1); // slope scaling factors to avoid floating\n int dx2 = (dx << 1); // point\n int ix = x1 < x2 ? 1 : -1; // increment direction\n int iy = y1 < y2 ? 1 : -1;\n\n if (dy <= dx) {\n for (;;) {\n //get a new pair of x1, y1\n float zvaluenow = nctest.GetAttribute(x1, y1);\n if (zvaluenow==-100000000)\n break;\n zvalue.add(zvaluenow);\n \n \n if (x1 >= x2) {\n break;\n }\n x1 += ix;\n d += dy2;\n if (d > dx) {\n y1 += iy;\n d -= dx2;\n }\n }\n } else {\n for (;;) {\n //get a new pair of x1, y1\n float zvaluenow = nctest.GetAttribute(x1, y1);\n if (zvaluenow==-100000000)\n break;\n zvalue.add(zvaluenow);\n if (y1 >= y2) {\n break;\n }\n y1 += iy;\n d += dx2;\n if (d > dy) {\n x1 += ix;\n d -= dy2;\n }\n }\n }\n\n return zvalue;\n }", "public static int[] gridIllumination1(int n, int[][] lamps, int[][] queries) {\n\t\tSet<Long> lights = new HashSet<>();\n\t\t// columns/vertical lines\n\t\tMap<Integer, Integer> cols = new HashMap<>();\n\n\t\t// rows/horizontal lines\n\t\tMap<Integer, Integer> rows = new HashMap<>();\n\n\t\t// k-diagonals: from up left to lower right\n\t\tMap<Integer, Integer> kDiagonals = new HashMap<>();\n\n\t\t// skew-diagonals: from up right to lower left\n\t\tMap<Integer, Integer> skewDiagonals = new HashMap<>();\n\n\t\t// populate the hashmaps based on the lights that are turned on\n\t\tfor (int[] lamp : lamps) {\n\t\t\tint r = lamp[0], c = lamp[1];\n\t\t\tlong light = (long) (n * r + c);\n\t\t\tif (lights.contains(light))\n\t\t\t\tcontinue;\n\n\t\t\tlights.add(light);\n\t\t\tcols.put(c, cols.getOrDefault(c, 0) + 1);\n\t\t\trows.put(r, rows.getOrDefault(r, 0) + 1);\n\t\t\tkDiagonals.put(r - c, kDiagonals.getOrDefault(r - c, 0) + 1);\n\t\t\tskewDiagonals.put(r + c, skewDiagonals.getOrDefault(r + c, 0) + 1);\n\t\t}\n\n\t\tint[] result = new int[queries.length];\n\t\tint index = 0;\n\t\tint[][] vectors = { { 0, 0 }, { 0, 1 }, { 0, -1 }, { 1, 0 }, { -1, 0 }, { -1, -1 }, { 1, 1 }, { 1, -1 },\n\t\t\t\t{ -1, 1 } };\n\n\t\t// evaluate the queries\n\t\tfor (int i = 0; i < queries.length; i++) {\n\n\t\t\tint r = queries[i][0], c = queries[i][1];\n\t\t\tboolean turnedOn = cols.getOrDefault(c, 0) > 0 || rows.getOrDefault(r, 0) > 0\n\t\t\t\t\t|| kDiagonals.getOrDefault(r - c, 0) > 0 || skewDiagonals.getOrDefault(r + c, 0) > 0;\n\t\t\tresult[i] = turnedOn ? 1 : 0;\n\n\t\t\t// turn off the light and its neighbours if turned on\n\t\t\tfor (int[] v : vectors) {\n\t\t\t\tint rr = r + v[0], cc = c + v[1];\n\t\t\t\tlong light = (long) (n * rr + cc);\n\n\t\t\t\tif (rr < 0 || rr >= n || cc < 0 || cc >= n)\n\t\t\t\t\tcontinue;\n\t\t\t\tif (!lights.contains(light))\n\t\t\t\t\tcontinue;\n\n\t\t\t\tlights.remove(light);\n\t\t\t\treduce(cols, cc);\n\t\t\t\treduce(rows, rr);\n\t\t\t\treduce(kDiagonals, rr - cc);\n\t\t\t\treduce(skewDiagonals, rr + cc);\n\t\t\t}\n\n\t\t}\n\n\t\treturn result;\n\t}", "private void selectNovelColors(IMapColor mapColor, Histogram hist, int interestingColors,\n \t\t\tint usedColors, int[] paletteSelections) {\n \t\t\n \t\tInteger[] indices = (Integer[]) hist.getColorIndices().toArray(new Integer[hist.getColorIndices().size()]);\n \t\tSet<Integer> visited = new HashSet<Integer>();\n \t\t\n \t\tbyte[] rgb = { 0, 0, 0 };\n \t\tfloat[] hsv = { 0, 0, 0 };\n \t\t\n \t\tfloat[] lastHSV = { 0, 0, 0 };\n \t\tint[] lastRGB = { 0, 0, 0 };\n \t\tint lastPixel = Integer.MIN_VALUE;\n \t\t\n \t\tint directMap = usedColors / 3;\n \t\tint distance = interestingColors / 3;\n \t\t\n \t\tfor (int i = 0; i < usedColors; i++) {\n \t\t\tfloat maxDiff = -Float.MAX_VALUE;\n \t\t\tint farthestIndex = 0;\n \t\t\tint farthestPixel = 0;\n \t\t\t\n \t\t\tint searchDist = Math.max(1, Math.min(indices.length, (distance * (i + 1) / usedColors)));\n \t\t\tfor (int j = 0; j < searchDist && j < indices.length; j++) {\n \t\t\t\tif (visited.contains(j)) {\n \t\t\t\t\tsearchDist++;\n \t\t\t\t\tcontinue;\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\tint idx = indices[j];\n \t\t\t\tint pixel = mapColor.getPalettePixel(idx);\n \t\t\t\tpixelToRGB(pixel, rgb);\n \t\t\t\trgbToHsv(rgb[0] & 0xff, rgb[1] & 0xff, rgb[2] & 0xff, hsv);\n \t\t\t\t\n \t\t\t\t\n \t\t\t\tfloat diff = //(hsv[0] - lastHSV[0]) * (hsv[0] - lastHSV[0])\n \t\t\t\t\t//+ ((hsv[1] - lastHSV[1]) * (hsv[1] - lastHSV[1])) * 100000\n \t\t\t\t\t+ (hsv[2] - lastHSV[2]) * (hsv[2] - lastHSV[2])\n \t\t\t\t;\n \t\t\t\t\n \t\t\t\t//float diff = getRGBDistance(rgb, lastRGB);\n \t\t\t\tif (diff >= maxDiff) {\n \t\t\t\t\tmaxDiff = diff;\n \t\t\t\t\tfarthestPixel = pixel;\n \t\t\t\t\tfarthestIndex = j;\n \t\t\t\t\tif (i < directMap) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t} \n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// winner!\n \t\t\tpaletteSelections[i] = farthestIndex;\n \t\t\tvisited.add(farthestIndex);\n \t\t\t\n \t\t\tlastPixel = farthestPixel;\n \t\t\tpixelToRGB(lastPixel, lastRGB);\n \t\t\trgbToHsv(lastRGB[0] & 0xff, lastRGB[1] & 0xff, lastRGB[2] & 0xff, lastHSV);\n \t\t}\n \t}", "public void findBoundary(boolean useDestinations)\r\n\t{\n\tdouble maxSpacing = res/5.0;\r\n\tif(maxSpacing<1) maxSpacing = 1;\r\n\t\r\n\t//First make sure point sampling is dense enough:\t\r\n\tVector<Int2d> surfaceT = new Vector<Int2d>();\t\r\n\tfor(int it=0; it<sl; it++)\r\n\t\t{\r\n\t\tInt2d p = surface.get(it);\r\n\t\tsurfaceT.add(p);\r\n\t\tInt2d p2 = surface.get((it+1)%sl);\r\n\t\tdouble pdist = p2.distance(p);\r\n\t\tif(pdist > maxSpacing)\r\n\t\t\t{\r\n\t\t\t// populate this line segment with points\r\n\t\t\tint extraPoints = (int)(pdist/maxSpacing); // - 2 cause we already have 2 points\r\n\t\t\t\r\n\t\t\tfor(int i=0; i<extraPoints; i++)\r\n\t\t\t\t{\r\n\t\t\t\tInt2d pN = new Int2d(p);\r\n\t\t\t\tInt2d diff = new Int2d();\r\n\t\t\t\tdiff.sub(p2,p);\r\n\t\t\t\tpN.scaleAdd((double)(i+1.)/(extraPoints+1.),diff,pN);\r\n\t\t\t\tsurfaceT.add(pN);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t//System.out.println(\"got here2.1\");\r\n\tsurface = surfaceT;\r\n\tcanvas1.surface = surface;\r\n\tsl = surfaceT.size();\r\n\t\t\r\n\t//System.out.println(sl);\r\n\t\r\n\t\t\t\t\r\n\tfor(int it=0; it<sl; it++)\r\n\t\t{\r\n\t\tInt2d p = surface.get(it);\r\n\t\tint i = (int)(p.x/res);\r\n\t\tint j = (int)(p.y/res);\r\n\t\tboolean extraWide = false;\r\n\t\tboolean extraHigh = false;\t\t\r\n\t\t\r\n\t\tif((p.y % res) == 0)\r\n\t\t\t{\r\n\t\t\t//System.out.println(\"Extra high at i,j = \" + i + \", \" + j);\r\n\t\t\textraHigh = true;\r\n\t\t\t}\r\n\t\tif((p.x % res) == 0)\r\n\t\t\t{\r\n\t\t\textraWide = true;\r\n\t\t\t}\r\n\t\t\t\r\n\t\tint len = 4;\r\n\t\tif(extraWide && extraHigh) len = 9;\r\n\t\telse if(extraWide || extraHigh) len = 6;\r\n\t\t\r\n\t\tInt2d[] pi = new Int2d[len];\r\n\t\tint[] ic = new int[len];\r\n\t\tint[] jc = new int[len];\r\n\t\t\r\n\t\tgenerateStencil(i,j,extraWide,extraHigh,ic,jc,pi,len);\r\n\t\t\r\n\t\tfor(int c=0; c<len; c++)\r\n\t\t\t{\r\n\t\t\tif(withinBounds(ic[c],jc[c]))\r\n\t\t\t\t{\r\n\t\t\t\tif(!useDestinations)\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif(!boundary.contains(pi[c])) boundary.add(pi[c]);\r\n\t\t\t\t\tInt2d piX = new Int2d(res*pi[c].x,res*pi[c].y);\r\n\t\t\t\t\tdouble dCur = piX.distance(p);\r\n\t\t\t\t\tint sign = 1;\r\n\t\t\t\t\tif(poly.contains(res*pi[c].x,res*pi[c].y)) sign = -1;\r\n\t\t\t\t\t//if(ic[c] == 10 && jc[c] == 10) System.out.println(\"sign = \" + sign);\r\n\t\t\t\t\tif(dCur<Math.abs(phi[ic[c]][jc[c]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tphi[ic[c]][jc[c]] = sign*dCur;\r\n\t\t\t\t\t\t//System.out.println(sign*dCur);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t//else phi[ic[c]][jc[c]] = -phiStart;\r\n\t\t\t\t// Way suggested in paper, but this looks bad with interpolation\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//System.out.println(\"got here2.2\");\r\n\t\t\r\n\tif(useDestinations) //Use destinations\r\n\t\t{\t\t\r\n\t\t// Sets destination point distances accordingly\r\n\t\t\r\n\t\tint dl = destinations.size();\r\n\t\tfor(int it=0; it<dl; it++)\r\n\t\t\t{\r\n\t\t\tInt2d p = destinations.get(it);\r\n\t\t\tint i = (int)(p.x/res);\r\n\t\t\tint j = (int)(p.y/res);\r\n\t\t\tboolean extraWide = false;\r\n\t\t\tboolean extraHigh = false;\t\t\r\n\t\t\t\r\n\t\t\tif((p.y % res) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t//System.out.println(\"Extra high at i,j = \" + i + \", \" + j);\r\n\t\t\t\textraHigh = true;\r\n\t\t\t\t}\r\n\t\t\tif((p.x % res) == 0)\r\n\t\t\t\t{\r\n\t\t\t\textraWide = true;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\tint len = 4;\r\n\t\t\tif(extraWide && extraHigh) len = 9;\r\n\t\t\telse if(extraWide || extraHigh) len = 6;\r\n\t\t\t\r\n\t\t\tInt2d[] pi = new Int2d[len];\r\n\t\t\tint[] ic = new int[len];\r\n\t\t\tint[] jc = new int[len];\r\n\t\t\t\r\n\t\t\tgenerateStencil(i,j,extraWide,extraHigh,ic,jc,pi,len);\r\n\t\t\t\r\n\t\t\tfor(int c=0; c<len; c++)\r\n\t\t\t\t{\r\n\t\t\t\tif(withinBounds(ic[c],jc[c]))\r\n\t\t\t\t\t{\r\n\t\t\t\t\tif(!boundary.contains(pi[c])) boundary.add(pi[c]);\r\n\t\t\t\t\tInt2d piX = new Int2d(res*pi[c].x,res*pi[c].y);\r\n\t\t\t\t\tdouble dCur = piX.distance(p);\r\n\t\t\t\t\tint sign = 1;\r\n\t\t\t\t\tif(poly.contains(res*pi[c].x,res*pi[c].y)) sign = -1;\r\n\t\t\t\t\t//if(ic[c] == 10 && jc[c] == 10) System.out.println(\"sign = \" + sign);\r\n\t\t\t\t\tif(dCur<Math.abs(phi[ic[c]][jc[c]]))\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\tphi[ic[c]][jc[c]] = sign*dCur;\r\n\t\t\t\t\t\t//System.out.println(sign*dCur);\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\r\n\t\t}\r\n\t\t\r\n\t\t\t\t\r\n\tint bl = boundary.size();\r\n\t/*\r\n\tfor(int k=0; k<bl; k++)\r\n\t\t{\r\n\t\tSystem.out.println(boundary.get(k).x + \", \" + boundary.get(k).y + \": element \" + k);\r\n\t\t}\r\n\t\t*/\r\n\t\t\t\r\n\tfor(int i=0; i<bl; i++)\r\n\t\t{\r\n\t\tInt2d pi = boundary.get(i);\r\n\t\tpi.phi = phi[pi.x][pi.y];\r\n\t\t}\r\n\t}", "public static ArrayList<XYCoord> findVisibleLocations(GameMap map, Unit viewer, boolean piercing)\n {\n return findVisibleLocations(map, viewer, viewer.x, viewer.y, piercing);\n }", "public void renderLights()\r\n\t{\r\n\t\tlightHandler.render();\r\n\t}", "private void detectMaze(int[] pixels)\n {\n BufferedImage screenshot = robot.createScreenCapture(new Rectangle(screenWidth, screenHeight));\n int[] screenPixels = screenshot.getRGB(0, 0, screenWidth, screenHeight, null, 0, screenWidth);\n\n for (int i = 0; i < pixels.length; i++)\n {\n for (Maze maze : mazes)\n {\n if (maze.BORDER_COLOR.getRGB() == screenPixels[i])\n {\n if (gameState.getMazeState() == null) {\n MazeState mazeState = new MazeState();\n mazeState.setMaze(maze);\n gameState.setMazeState(mazeState);\n }\n\n int gameX = i % screenWidth - 4;\n int gameY = i / screenWidth + 3;\n rect = new Rectangle(gameX, gameY, GAME_COLUMNS * NODE_SIZE, GAME_ROWS * NODE_SIZE);\n gameDetected = true;\n\n return;\n }\n }\n }\n }" ]
[ "0.61957526", "0.614144", "0.58577836", "0.5823406", "0.58019584", "0.5706486", "0.57029253", "0.5690134", "0.5663971", "0.5578998", "0.5509583", "0.5471935", "0.5440786", "0.5427764", "0.5425363", "0.54206145", "0.53996456", "0.53995615", "0.5399135", "0.53869647", "0.5369465", "0.5361421", "0.5361276", "0.5359234", "0.5327994", "0.5320411", "0.5317564", "0.53141373", "0.52700716", "0.527002", "0.5268104", "0.52499706", "0.52437824", "0.5225294", "0.52165043", "0.51950914", "0.5188949", "0.5183516", "0.51754105", "0.51695585", "0.5155842", "0.514365", "0.5121106", "0.5119893", "0.51150167", "0.51125777", "0.5085471", "0.50768197", "0.50617486", "0.5061382", "0.50608814", "0.50562364", "0.5046302", "0.5045999", "0.50404173", "0.50397795", "0.50319195", "0.50197023", "0.50139993", "0.50113106", "0.50009453", "0.50000125", "0.4997625", "0.49949688", "0.49888366", "0.49865887", "0.4984024", "0.49831852", "0.4978086", "0.49730736", "0.49481034", "0.49381125", "0.49330112", "0.49318278", "0.49197623", "0.49157062", "0.49153423", "0.49100435", "0.49079266", "0.4907513", "0.49074453", "0.4905045", "0.49042204", "0.4902866", "0.49017486", "0.48988792", "0.48896486", "0.4889397", "0.48845017", "0.48735887", "0.48631066", "0.48627457", "0.48400283", "0.483968", "0.48365852", "0.48321375", "0.4830546", "0.48253676", "0.48236033", "0.48156947" ]
0.7901049
0
finds the nearest intersection with the light rays
public Intersection trace(Point start, Point end) { double curDist, closeDist; Intersection closestIntersection= new Intersection(60+1, null, null); for(Thing thing:thing){ Intersection thingIntersection = thing.getIntersection(start, end); curDist = thingIntersection.getDistance(); closeDist = closestIntersection.getDistance(); if (curDist < closeDist) { closestIntersection = thingIntersection; } } for(Thing light:lights){ Intersection thingIntersection = light.getIntersection(start, end); curDist = thingIntersection.getDistance(); closeDist = closestIntersection.getDistance(); if (curDist < closeDist) { closestIntersection = thingIntersection; } } return closestIntersection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private LightSource.Intersection castRayOnLights(Ray ray) {\n double closestPointDistanceSquared = Double.POSITIVE_INFINITY;\n LightSource.Intersection closestIntersection = null;\n for (LightSource light : lightSources) {\n LightSource.Intersection intersection = light.castRay(ray);\n if (intersection != null) {\n double distanceToIntersectionSquared =\n GeometryHelpers.vectorLengthSquared(intersection.info.pointOfIntersection.subtract(ray.origin));\n\n // To avoid hitting the shape from which the ray was shot, the ray has to have a minimum length\n if (distanceToIntersectionSquared > MINIMUM_RAY_LENGTH*MINIMUM_RAY_LENGTH) {\n if (distanceToIntersectionSquared < closestPointDistanceSquared) {\n closestPointDistanceSquared = distanceToIntersectionSquared;\n closestIntersection = intersection;\n }\n }\n }\n }\n return closestIntersection;\n }", "@Override\r\n\tpublic List<GeoPoint> findIntersections(Ray ray) {\r\n\t\tList<GeoPoint> list = new ArrayList<GeoPoint>();\r\n\t\tVector rayDirection = ray.getDirection();\r\n\t\tPoint3D rayPoint = ray.getPOO();\r\n\r\n\t\t// case centerPoint same as the RayPoint\r\n\t\tif (centerPoint.equals(rayPoint)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(radius))));\r\n\t\t\treturn list;\r\n\t\t}\r\n\r\n\t\t// u = centerPoint - rayPoint\r\n\t\tVector u = centerPoint.subtract(rayPoint);\r\n\t\t// tm = u * rayDirection\r\n\t\tdouble tm = rayDirection.dotProduct(u);\r\n\t\t// distance = sqrt(|u|^2 - tm^2)\r\n\t\tdouble d = Math.sqrt(u.dotProduct(u) - tm * tm);\r\n\t\t// case the distance is bigger than radius no intersections\r\n\t\tif (d > radius)\r\n\t\t\treturn list;\r\n\r\n\t\t// th = sqrt(R^2 - d^2)\r\n\t\tdouble th = Math.sqrt(radius * radius - d * d);\r\n\r\n\t\tdouble t1 = tm - th;\r\n\t\tdouble t2 = tm + th;\r\n\r\n\t\tif (Util.isZero(t1) || Util.isZero(t2)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint));\r\n\t\t}\r\n\t\tif (Util.isZero(th)) {\r\n\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(tm))));\r\n\t\t} else {\r\n\t\t\tif (t1 > 0 && !Util.isZero(t1))// one\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t1))));\r\n\t\t\tif (t2 > 0 && !Util.isZero(t2)) {// two\r\n\t\t\t\tlist.add(new GeoPoint(this, rayPoint.addVector(rayDirection.scale(t2))));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn list;\r\n\r\n\t}", "@Override\n\tpublic RaySceneObjectIntersection getClosestRayIntersection(Ray ray)\n\t{\n\t\tVector3D v=Vector3D.difference(ray.getP(), pointOnAxis);\n\t\tVector3D vP = v.getDifferenceWith(v.getProjectionOnto(normalisedAxisDirection));\t// part of v that's perpendicular to a\n\t\tVector3D dP = ray.getD().getDifferenceWith(ray.getD().getProjectionOnto(normalisedAxisDirection));\t// part of ray.d that's perpendicular to a\n\t\t\n\t\t// coefficients in the quadratic equation for t\n\t\tdouble a = dP.getModSquared();\n\t\t\n\t\tif(a==0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\t// would give division by zero later\n\n\t\tdouble\n\t\t\tb2 = Vector3D.scalarProduct(vP, dP),\t// b/2\n\t\t\tc = vP.getModSquared() - radius*radius,\n\t\t\tdiscriminant4 = b2*b2 - a*c;\t// discriminant/4\n\n\t\t// first check if the discriminant is >0; if it isn't, then there is no intersection at all\n\t\tif(discriminant4 < 0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t\n\t\t// okay, the discriminant is positive; take its square root, which is what we actually need\n\t\tdouble sqrtDiscriminant2 = Math.sqrt(discriminant4);\t// sqrt(discriminant)/2\n\t\t\t\n\t\t// calculate the factor t corresponding to the\n\t\t// intersection with the greater t factor;\n\t\t// the further-away intersection is then ray.p + tBigger*ray.d\n\t\tdouble tBigger=((a>0)?(-b2+sqrtDiscriminant2)/a:(-b2-sqrtDiscriminant2)/a);\n\t\t\n\t\t//if tBigger<0, then the intersection with the lesser t factor will have to be even more negative;\n\t\t// therefore, both intersections will be \"behind\" the starting point\n\t\tif(tBigger < 0.0) return RaySceneObjectIntersection.NO_INTERSECTION;\n\n\t\t// calculate the factor tSmaller corresponding to the\n\t\t// intersection with the lesser t factor\n\t\tdouble tSmaller=((a>0)?(-b2-sqrtDiscriminant2)/a:(-b2+sqrtDiscriminant2)/a);\n\n\t\tRay rayAtIntersectionPoint;\n\t\t\n\t\t// first check if the intersection point with the lesser t factor is an option\n\t\tif(tSmaller > 0.0)\n\t\t{\n\t\t\t// the intersection with the lesser t factor lies in front of the starting point, so it might correspond to the intersection point\n\t\t\t\n\t\t\t// calculate the ray advanced to the intersection point\n\t\t\trayAtIntersectionPoint = ray.getAdvancedRay(tSmaller);\n\t\t\t\n\t\t\treturn new RaySceneObjectIntersection(rayAtIntersectionPoint.getP(), this, rayAtIntersectionPoint.getT());\n\t\t}\n\t\t\n\t\t// If the program reaches this point, the intersection with the lesser t factor was not the right intersection.\n\t\t// Now try the intersection point with the greater t factor.\n\t\t\n\t\t// calculate the ray advanced to the intersection point\n\t\trayAtIntersectionPoint = ray.getAdvancedRay(tBigger);\n\n\t\treturn new RaySceneObjectIntersection(rayAtIntersectionPoint.getP(), this, rayAtIntersectionPoint.getT());\n\t}", "private Point3 _getIntersection(Point3 eye, Point3 direction) {\n int size = NORMALS.length;\n float tresult;\n Point4 norm; // normal of face hit\n Plane plane; // plane equation\n float tnear, tfar, t, vn, vd;\n int front = 0, back = 0; // front/back face # hit\n\n tnear = -1.0e+20f; // -HUGE_VAL\n tfar = +1.0e+20f; // tmax\n for (int i = 0; i < size; i++) {\n\n plane = _planes[i];\n\n vd = plane.dot(direction);\n vn = plane.distance(eye);\n if (vd == 0.0f) {\n // ray is parallel to plane -\n // check if ray origin is inside plane's\n // half-space\n if (vn < 0.0f) {\n return null;\n }\n\n } else {\n // ray not parallel - get distance to plane\n t = -vn / vd;\n if (vd > 0.0f) {\n\n if (t > tfar) {\n return null;\n }\n if (t > tnear) {\n // hit near face, update normal\n front = i;\n tnear = t;\n }\n } else {\n // back face - T is a far point\n\n if (t < tnear) {\n return null;\n }\n if (t < tfar) {\n // hit far face, update normal\n\n back = i;\n tfar = t;\n }\n }\n }\n }\n // survived all tests\n // Note: if ray originates on polyhedron,\n // may want to change 0.0 to some\n // epsilon to avoid intersecting the originating face.\n //\n if (tnear >= 0.0f) {\n // outside, hitting front face\n norm = _planes[front]._normal;\n tresult = tnear;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n if (tfar < 1.0e+20f) {\n // inside, hitting back face\n norm = _planes[back]._normal;\n tresult = tfar;\n return Point3.addition(eye, direction.scaled(tresult));\n } else {\n // inside, but back face beyond tmax//\n return null;\n }\n }\n }", "@Override\n\tpublic RaySceneObjectIntersection getClosestRayIntersection(Ray ray)\n\t{\t\t//this is calculating the \"term under the square root\"\n\t\tVector3D v=Vector3D.difference(ray.getP(), centre);\t\t\t\t\t\t//which must be greater than 0 for intersection\n\n\t\t// coefficients in the quadratic equation for t\n\t\tdouble \n\t\tquadraticA = ray.getD().getModSquared(),\n\t\tquadraticB2 = Vector3D.scalarProduct(v, ray.getD()),\t// b/2\n\t\tquadraticC = v.getModSquared() - MyMath.square(radius);\n\n\t\t// discriminant/2\n\t\tdouble discriminant2 = quadraticB2*quadraticB2-quadraticA*quadraticC;\n\n\n\t\tif(discriminant2<0.0) {\n\t\t\t//returns NaN if there is no intersection\n\t\t\treturn RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t}\n\n\t\tdouble t1=(-quadraticB2+Math.sqrt(discriminant2))/quadraticA;\n\n\t\tif(t1<0.0) {\n\t\t\t//if t1<0 then t2 must be less than zero\n\t\t\treturn RaySceneObjectIntersection.NO_INTERSECTION;\n\t\t}\n\n\t\tdouble t2=(-quadraticB2-Math.sqrt(discriminant2))/quadraticA;\n\t\t\n\t\tRay rayAtIntersectionPoint = ray.getAdvancedRay((t2<0.0)?t1:t2);\n\n\t\treturn new RaySceneObjectIntersection(\n\t\t\t\trayAtIntersectionPoint.getP(),\n\t\t\t\tthis,\n\t\t\t\trayAtIntersectionPoint.getT()\n\t\t\t);\n\t}", "public double findRayIntersection(Vec3 origin, Vec3 direction, Vec3 normal)\n {\n double scale = width/obj.getScale();\n double ox = origin.x*scale+0.5*width;\n double oy = origin.y*scale+0.5*width;\n double oz = origin.z*scale+0.5*width;\n double dx = direction.x;\n double dy = direction.y;\n double dz = direction.z;\n\n // Find the intersection of the ray with the bounding box.\n\n double mint = -Double.MAX_VALUE;\n double maxt = Double.MAX_VALUE;\n if (dx == 0.0)\n {\n if (ox < minx || ox > maxx)\n return 0.0;\n }\n else\n {\n double t1 = (minx-ox)/dx;\n double t2 = (maxx-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dy == 0.0)\n {\n if (oy < miny || oy > maxy)\n return 0.0;\n }\n else\n {\n double t1 = (miny-oy)/dy;\n double t2 = (maxy-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (dz == 0.0)\n {\n if (oz < minz || oz > maxz)\n return 0.0;\n }\n else\n {\n double t1 = (minz-oz)/dz;\n double t2 = (maxz-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > mint)\n mint = t1;\n if (t2 < maxt)\n maxt = t2;\n }\n else\n {\n if (t2 > mint)\n mint = t2;\n if (t1 < maxt)\n maxt = t1;\n }\n if (mint > maxt || maxt < 0.0)\n return 0.0;\n }\n if (mint < 0.0)\n mint = 0.0;\n\n // Find the first voxel and initialize variables.\n\n double xpos = ox+mint*dx;\n double ypos = oy+mint*dy;\n double zpos = oz+mint*dz;\n int x = Math.max(Math.min((int) xpos, maxx), minx);\n int y = Math.max(Math.min((int) ypos, maxy), miny);\n int z = Math.max(Math.min((int) zpos, maxz), minz);\n int stepx, stepy, stepz;\n int finalx, finaly, finalz;\n double tdeltax, tdeltay, tdeltaz;\n double tmaxx, tmaxy, tmaxz;\n if (dx < 0.0)\n {\n stepx = -1;\n finalx = minx-1;\n tdeltax = -1.0/dx;\n tmaxx = (x-ox)/dx;\n }\n else if (dx > 0.0)\n {\n stepx = 1;\n finalx = maxx+1;\n tdeltax = 1.0/dx;\n tmaxx = (x+1-ox)/dx;\n }\n else\n {\n stepx = 0;\n finalx = 0;\n tdeltax = 0.0;\n tmaxx = Double.MAX_VALUE;\n }\n if (dy < 0.0)\n {\n stepy = -1;\n finaly = miny-1;\n tdeltay = -1.0/dy;\n tmaxy = (y-oy)/dy;\n }\n else if (dy > 0.0)\n {\n stepy = 1;\n finaly = maxy+1;\n tdeltay = 1.0/dy;\n tmaxy = (y+1-oy)/dy;\n }\n else\n {\n stepy = 0;\n finaly = 0;\n tdeltay = 0.0;\n tmaxy = Double.MAX_VALUE;\n }\n if (dz < 0.0)\n {\n stepz = -1;\n finalz = minz-1;\n tdeltaz = -1.0/dz;\n tmaxz = (z-oz)/dz;\n }\n else if (dz > 0.0)\n {\n stepz = 1;\n finalz = maxz+1;\n tdeltaz = 1.0/dz;\n tmaxz = (z+1-oz)/dz;\n }\n else\n {\n stepz = 0;\n finalz = 0;\n tdeltaz = 0.0;\n tmaxz = Double.MAX_VALUE;\n }\n\n // Step through the voxels, looking for intersections.\n\n VoxelOctree voxels = obj.getVoxels();\n byte values[] = new byte[8];\n while (true)\n {\n int index = x*width*width+y*width+z;\n if ((flags[index/32]&(1<<(index%32))) != 0)\n {\n // There is a piece of the surface in this voxel, so see if the ray intersects it.\n // First find the values of t at which the ray enters and exits it.\n \n double tenter = -Double.MAX_VALUE;\n double texit = Double.MAX_VALUE;\n if (dx != 0.0)\n {\n double t1 = (x-ox)/dx;\n double t2 = (x+1-ox)/dx;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dy != 0.0)\n {\n double t1 = (y-oy)/dy;\n double t2 = (y+1-oy)/dy;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (dz != 0.0)\n {\n double t1 = (z-oz)/dz;\n double t2 = (z+1-oz)/dz;\n if (t1 < t2)\n {\n if (t1 > tenter)\n tenter = t1;\n if (t2 < texit)\n texit = t2;\n }\n else\n {\n if (t2 > tenter)\n tenter = t2;\n if (t1 < texit)\n texit = t1;\n }\n }\n if (tenter < 0.0)\n continue; // Ignore intersections in the voxel containing the origin.\n\n // Look up the values at the eight corners of the voxel.\n\n values[0] = voxels.getValue(x, y, z);\n values[1] = voxels.getValue(x, y, z+1);\n values[2] = voxels.getValue(x, y+1, z);\n values[3] = voxels.getValue(x, y+1, z+1);\n values[4] = voxels.getValue(x+1, y, z);\n values[5] = voxels.getValue(x+1, y, z+1);\n values[6] = voxels.getValue(x+1, y+1, z);\n values[7] = voxels.getValue(x+1, y+1, z+1);\n\n // Find the positions within the voxel where the ray enters and exits.\n\n double xenter = ox+dx*tenter-x;\n double yenter = oy+dy*tenter-y;\n double zenter = oz+dz*tenter-z;\n double xexit = ox+dx*texit-x;\n double yexit = oy+dy*texit-y;\n double zexit = oz+dz*texit-z;\n\n // Interpolate the find the values at those points.\n\n double enterValue = values[0]*(1.0-xenter)*(1.0-yenter)*(1.0-zenter)\n +values[1]*(1.0-xenter)*(1.0-yenter)*zenter\n +values[2]*(1.0-xenter)*yenter*(1.0-zenter)\n +values[3]*(1.0-xenter)*yenter*zenter\n +values[4]*xenter*(1.0-yenter)*(1.0-zenter)\n +values[5]*xenter*(1.0-yenter)*zenter\n +values[6]*xenter*yenter*(1.0-zenter)\n +values[7]*xenter*yenter*zenter;\n double exitValue = values[0]*(1.0-xexit)*(1.0-yexit)*(1.0-zexit)\n +values[1]*(1.0-xexit)*(1.0-yexit)*zexit\n +values[2]*(1.0-xexit)*yexit*(1.0-zexit)\n +values[3]*(1.0-xexit)*yexit*zexit\n +values[4]*xexit*(1.0-yexit)*(1.0-zexit)\n +values[5]*xexit*(1.0-yexit)*zexit\n +values[6]*xexit*yexit*(1.0-zexit)\n +values[7]*xexit*yexit*zexit;\n if ((enterValue > 0 && exitValue <= 0) || (enterValue <= 0 && exitValue > 0))\n {\n // Find the intersection point.\n\n double weight1 = Math.abs(exitValue);\n double weight2 = Math.abs(enterValue);\n double d = 1.0/(weight1+weight2);\n weight1 *= d;\n weight2 *= d;\n double tintersect = (tenter*weight1 + texit*weight2)/scale;\n if (normal != null)\n {\n normal.set(values[0]+values[1]+values[2]+values[3]-values[4]-values[5]-values[6]-values[7],\n values[0]+values[1]-values[2]-values[3]+values[4]+values[5]-values[6]-values[7],\n values[0]-values[1]+values[2]-values[3]+values[4]-values[5]+values[6]-values[7]);\n normal.normalize();\n }\n return tintersect;\n }\n }\n\n // Advance to the next voxel.\n\n if (tmaxx < tmaxy)\n {\n if (tmaxx < tmaxz)\n {\n x += stepx;\n if (x == finalx)\n return 0.0;\n tmaxx += tdeltax;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n else\n {\n if (tmaxy < tmaxz)\n {\n y += stepy;\n if (y == finaly)\n return 0.0;\n tmaxy += tdeltay;\n }\n else\n {\n z += stepz;\n if (z == finalz)\n return 0.0;\n tmaxz += tdeltaz;\n }\n }\n }\n }", "private Solid.Intersection castRayOnSolids(Ray ray) {\n // We need to shift the ray to avoid shadow acne\n ray = ray.getShifted(MINIMUM_RAY_LENGTH);\n\n double closestPointDistanceSquared = Double.POSITIVE_INFINITY;\n Solid.Intersection closestIntersection = null;\n for (Solid solid : solids) {\n Solid.Intersection intersection = solid.castRay(ray);\n if (intersection != null) {\n double distanceToIntersectionSquared =\n GeometryHelpers.vectorLengthSquared(intersection.info.pointOfIntersection.subtract(ray.origin));\n\n // To avoid hitting the shape from which the ray was shot, the ray has to have a minimum length\n if (distanceToIntersectionSquared > MINIMUM_RAY_LENGTH*MINIMUM_RAY_LENGTH) {\n if (distanceToIntersectionSquared < closestPointDistanceSquared) {\n closestPointDistanceSquared = distanceToIntersectionSquared;\n closestIntersection = intersection;\n }\n }\n }\n }\n return closestIntersection;\n }", "private GeoPoint findClosestIntersection(Ray ray)\r\n\t{\r\n\r\n\t\tif (ray == null) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tList<GeoPoint> intersections = scene.geometries.findGeoIntersections(ray);\r\n\t\treturn ray.findClosestGeoPoint(intersections);\r\n\t}", "List<GeoPoint> findGeoIntersections(Ray ray);", "default List<Point3D> findIntersections(Ray ray) {\n\tList<GeoPoint> geoList = findGeoIntersections(ray);\n\treturn geoList == null ? null\n\t: geoList .stream()\n\t.map(gp -> gp.point)\n\t.collect(Collectors.toList());\n\t}", "@Override\n\tpublic Intersection intersect(Ray ray) {\n\t\tdouble maxDistance = 10;\n\t\tdouble stepSize = 0.001; \n\t\tdouble t = 0;\n\t\t\n\t\twhile(t<maxDistance) {\t\t\t\n\t\t\tVector point = ray.m_Origin.add(ray.m_Direction.mul(t));\t\t\t\n\t\t\tdouble eval = torus(point);\t\t\t\n\t\t\tif(Math.abs(eval)<0.001) {\n\t\t\t\tVector normal = estimateNormal(point);\n\t\t return new Intersection(this, ray, t, normal, point);\n\t\t\t}\t\t\t\n\t\t\tt += stepSize;\n\t\t}\t\t\n\t\treturn null;\n\t}", "private static RayIntersection findClosestIntersection(Scene scene, Ray ray) {\r\n\t\tRayIntersection closest = null;\r\n\t\tfor (GraphicalObject g : scene.getObjects()) {\r\n\t\t\tRayIntersection current = g.findClosestRayIntersection(ray);\r\n\t\t\tif (current == null) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else {\r\n\t\t\t\tif (closest == null) {\r\n\t\t\t\t\tclosest = current;\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (current.getDistance() < closest.getDistance()) {\r\n\t\t\t\t\t\tclosest = current;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn closest;\r\n\t}", "private GeoPoint findClosestIntersection(Ray ray) {\r\n\t\tList<GeoPoint> temp = _scene.get_geometries().findIntersections(ray);\r\n\t\tif (temp == null)\r\n\t\t\treturn null;\r\n\t\treturn getClosestPoint(temp, ray);\r\n\t}", "private GeoPoint findClosestIntersection(Ray ray) {\n if (ray == null) {\n return null;\n }\n GeoPoint closestPoint = null;\n double closestDistance = Double.MAX_VALUE;\n Point3D ray_p0 = ray.getPo();\n\n List<GeoPoint> intersections = scene.getGeometries().findGeoIntersections(ray);\n if (intersections == null)\n return null;\n\n for (GeoPoint geoPoint : intersections) {\n double distance = ray_p0.distance(geoPoint.getPoint());\n if (distance < closestDistance) {\n closestPoint = geoPoint;\n closestDistance = distance;\n }\n }\n return closestPoint;\n }", "@Override\n public List<GeoPoint> findGeoIntersections(Ray ray , double maxDistance) {\n Point3D P0 = ray.getP0();\n Vector v = ray.getDir();\n\n if (P0.equals(_center)) {\n return List.of(new GeoPoint(this,_center.add(v.scale(_radius))));\n }\n\n Vector U = _center.subtract(P0);\n\n double tm = alignZero(v.dotProduct(U));\n double d = alignZero(Math.sqrt(U.lengthSquared() - tm * tm));\n\n // no intersections : the ray direction is above the sphere\n if (d >= _radius) {\n return null;\n }\n\n double th = alignZero(Math.sqrt(_radius * _radius - d * d));\n double t1 = alignZero(tm - th);\n double t2 = alignZero(tm + th);\n boolean validT1=alignZero(t1 - maxDistance ) <=0;\n boolean validT2=alignZero( t2 - maxDistance )<=0;\n if (t1>0 && t2>0 && validT1 && validT2) {\n Point3D P1 =ray.getPoint(t1);\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P1),new GeoPoint(this, P2));\n }\n if (t1>0 && validT1){\n Point3D P1 =ray.getPoint(t1);\n return List.of(new GeoPoint(this,P1));\n }\n if (t2>0 && validT2) {\n Point3D P2 =ray.getPoint(t2);\n return List.of(new GeoPoint(this,P2));\n }\n return null;\n }", "public double intersect(Ray3D r) {\n\t\tdouble dn = (r.d).dot(n);\n\t\tif (dn==0.0) return Double.POSITIVE_INFINITY;\n\t\tdouble t = (p.subtract(r.p)).dot(n)/dn;\n\t\tif (t > 0) return t;\n\t\telse return Double.POSITIVE_INFINITY;\n\t}", "private Point3D findHitPoint(Ray3D ray) {\n // We plug paramaterization of x, y, z for ray into our general quartic equation\n // to get standard form: At^2 + Bt + C = 0, then use the quadratic equation to solve for t.\n // The coefficients A, B, and C are quite ugly, and the derivation is described in the linked\n // resource\n Point3D P = ray.getPoint(); // Ray starting point\n Point3D D = ray.getDirection(); // Ray direction\n // First coefficient of quadratic equation of t\n double A = a * sq(D.getX()) + b * sq(D.getY()) + c * sq(D.getZ())\n + d * D.getY() * D.getZ() + e * D.getX() * D.getZ() + f * D.getX() * D.getY();\n // Second coefficient of quadratic equation of t\n double B = 2 * (a * P.getX() * D.getX() + b * P.getY() * D.getY() + c * P.getZ() * D.getZ())\n + d * (P.getY() * D.getZ() + P.getZ() * D.getY())\n + e * (P.getX() * D.getZ() + P.getZ() * D.getX())\n + f * (P.getX() * D.getY() + P.getY() * D.getX())\n + g * D.getX() + h * D.getY() + i * D.getZ();\n // Third coefficient of quadratic equation of t\n double C = a * sq(P.getX()) + b * sq(P.getY()) + c * sq(P.getZ()) + d * P.getY() * P.getZ()\n + e * P.getX() * P.getZ() + f * P.getX() * P.getY() + g * P.getX() + h * P.getY() + i * P.getZ() + j;\n\n double discriminant = sq(B) - 4 * A * C;\n\n // Find intersection Point\n Point3D intersection = null;\n if (discriminant >= 0) {\n double t1 = (-B - Math.sqrt(discriminant)) / (2 * A);\n double t2 = (-B + Math.sqrt(discriminant)) / (2 * A);\n Point3D p1 = ray.atTime(t1);\n Point3D p2 = ray.atTime(t2);\n if (t1 > 0 && t2 > 0 && isWithinBounds(p1) && isWithinBounds(p2)) {\n intersection = t1 <= t2 ? p1 : p2;\n } else if (t1 > 0 && isWithinBounds(p1)) {\n intersection = p1;\n } else if (t2 > 0 && isWithinBounds(p2)) {\n intersection = p2;\n }\n }\n return intersection;\n }", "@Override\n public void intersect( Ray ray, IntersectResult result ) {\n \t\tVector3d e = new Vector3d(ray.eyePoint);\n \t\te.sub(this.center);\n \t\tdouble a = ray.viewDirection.dot(ray.viewDirection);\n \t\tdouble b = 2 * ray.viewDirection.dot(e);\n \t\tdouble c = e.dot(e) - this.radius * this.radius;\n \t\tdouble discriminant = b*b - 4*a*c;\n \t\t\n \t\tif (discriminant == 0.0) {\n \t\t\t\n \t\t\tdouble t_pos = -0.5 * b / a;\n \t\t\t// scale ray viewDirection to be t_pos length\n\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n\t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n\t\t\tpoint_of_intersection.scale(t_pos);\n\t\t\tpoint_of_intersection.add(ray.eyePoint);\n\t\t\t\n\t\t\t// normal is point_of_intersection - sphere.center\n\t\t\tVector3d normal = new Vector3d();\n\t\t\tnormal.add(point_of_intersection);\n\t\t\tnormal.sub(this.center);\n\t\t\tnormal.normalize();\n\t\t\t\n\t\t\tresult.p.set(point_of_intersection);\n\t\t\tresult.material = this.material;\n\t\t\tresult.t = t_pos;\n\t\t\tresult.n.set(normal);\n \t\t\t\n \t\t}\n \t\telse if (discriminant > 0.0) {\n \t\t\t\n \t\t\t// solve quadratic formula\n \t\t\tdouble q = (b > 0) ? -0.5 * (b + Math.sqrt(discriminant)) : -0.5 * (b - Math.sqrt(discriminant));\n \t\t\tdouble t_pos = q / a;\n \t\t\tdouble t_neg = c / q;\n \t\t\t\n \t\t\tif (t_pos < t_neg) {\n \t\t\t\tdouble temp = t_pos;\n \t\t\t\tt_pos = t_neg;\n \t\t\t\tt_neg = temp;\n \t\t\t}\n \t\t\t\t\n \t\t\tif (t_neg > 0) {\n \t\t\t\t// scale ray viewDirection to be t_neg length\n \t\t\t\t// point of intersection is at ray.eyePoint + scaled viewDirection vector\n \t\t\tPoint3d point_of_intersection = new Point3d(ray.viewDirection);\n \t\t\tpoint_of_intersection.scale(t_neg);\n \t\t\tpoint_of_intersection.add(ray.eyePoint);\n \t\t\t\n \t\t\t// normal is point_of_intersection - sphere.center\n \t\t\tVector3d normal = new Vector3d();\n \t\t\tnormal.add(point_of_intersection);\n \t\t\tnormal.sub(this.center);\n \t\t\tnormal.normalize();\n \t\t\t\n \t\t\tresult.p.set(point_of_intersection);\n \t\t\tresult.material = this.material;\n \t\t\tresult.t = t_neg;\n \t\t\tresult.n.set(normal);\n \t\t\t}\n\t\n \t\t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n\n }", "public MovingObjectPosition rayTraceEntities(World world, Vector3 target)\n {\n MovingObjectPosition pickedEntity = null;\n Vec3 startingPosition = this.toVec3();\n Vec3 look = target.toVec3();\n double reachDistance = this.distance(target);\n Vec3 reachPoint = Vec3.createVectorHelper(startingPosition.xCoord + look.xCoord * reachDistance, startingPosition.yCoord + look.yCoord * reachDistance, startingPosition.zCoord + look.zCoord * reachDistance);\n\n double checkBorder = 1.1 * reachDistance;\n AxisAlignedBB boxToScan = AxisAlignedBB.getAABBPool().getAABB(-checkBorder, -checkBorder, -checkBorder, checkBorder, checkBorder, checkBorder).offset(this.x, this.y, this.z);\n\n @SuppressWarnings(\"unchecked\")\n List<Entity> entitiesHit = world.getEntitiesWithinAABBExcludingEntity(null, boxToScan);\n double closestEntity = reachDistance;\n\n if (entitiesHit == null || entitiesHit.isEmpty())\n {\n return null;\n }\n for (Entity entityHit : entitiesHit)\n {\n if (entityHit != null && entityHit.canBeCollidedWith() && entityHit.boundingBox != null)\n {\n float border = entityHit.getCollisionBorderSize();\n AxisAlignedBB aabb = entityHit.boundingBox.expand(border, border, border);\n MovingObjectPosition hitMOP = aabb.calculateIntercept(startingPosition, reachPoint);\n\n if (hitMOP != null)\n {\n if (aabb.isVecInside(startingPosition))\n {\n if (0.0D < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n if (pickedEntity != null)\n {\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = 0.0D;\n }\n }\n }\n else\n {\n double distance = startingPosition.distanceTo(hitMOP.hitVec);\n\n if (distance < closestEntity || closestEntity == 0.0D)\n {\n pickedEntity = new MovingObjectPosition(entityHit);\n pickedEntity.hitVec = hitMOP.hitVec;\n closestEntity = distance;\n }\n }\n }\n }\n }\n return pickedEntity;\n }", "private Map<Geometry, List<Point3D>> getSceneRayIntersections(Ray ray){\n //Map key - geometric\n //value - a list of cut points\n Map<Geometry, List<Point3D>> sceneRayIntersectPions = new HashMap<Geometry, List<Point3D>>();\n //Iterator we can go through all the geometric shapes\n Iterator<Geometry> geometries = _scene.getGeometriesIterator();\n //for each geometry finde intersection points\n while (geometries.hasNext()){\n Geometry geometry = geometries.next();\n List<Point3D> geometryIntersectionPoints = geometry.FindIntersections(ray);\n if(!geometryIntersectionPoints.isEmpty())\n //add geometryIntersectionPoints(list) to key geometry\n sceneRayIntersectPions.put(geometry, geometryIntersectionPoints);\n }\n return sceneRayIntersectPions;\n }", "@Override\r\n\tpublic List<GeoPoint> findIntersections(Ray ray,double maxDistance) {\n\t List<GeoPoint> intersections = null;\r\n\r\n\t for (Intersectable geo : _geometriesList) {\r\n\t List<GeoPoint> tempIntersections = geo.findIntersections(ray,maxDistance);\r\n\t if (tempIntersections != null) {\r\n\t if (intersections == null)\r\n\t intersections = new ArrayList<GeoPoint>();\r\n\t intersections.addAll(tempIntersections);\r\n\t }\r\n\t }\r\n\t \r\n\r\n\t return intersections;\r\n\r\n\t}", "@Override\n\tpublic Point3D findFirstIntersect(Ray3D ray) {\n\t\tPoint3D p = plane.findFirstIntersect(ray);\n\t\tif(isOnSurface(p))\n\t\t\treturn p;\n\t\telse\n\t\t\treturn Point3D.nullVal;\n\t}", "@Override\n public RayHit rayIntersectObj(Ray3D ray) {\n // Next check if ray hits this quadric\n Point3D hitPoint = findHitPoint(ray);\n if (hitPoint == null || !isWithinBounds(hitPoint)) {\n return RayHit.NO_HIT;\n }\n double distance = hitPoint.subtract(ray.getPoint()).length();\n Point3D normal = findNormalAtPoint(hitPoint);\n return new RayHit(hitPoint, distance, normal, this, new TextureCoordinate(0, 0));\n }", "private static int[] intersection(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4){\n\n\t\tdouble b1 = (y2 - y1)/(x2 - x1);\n\t\tdouble a1 = y1 - (b1*x1);\n\t\tdouble b2 = (y4 - y3)/(x4 - x3);\n\t\tdouble a2 = y3 - (b2*x3);\n\t\tif(x2-x1 == 0) //vertical\n\t\t\treturn new int[]{(int)x1,(int)(a2+(b2*x1))};\n\t\tif(x3-x4 == 0) //vertical\n\t\t\treturn new int[]{(int)x3,(int)(a1+(b1*x3))};\n\t/*\tif(Math.abs(b1-b2) < 0.001)\n\t\t\treturn null;\n\t\tdouble intX = -(a1-a2)/(b1-b2);\n\t\tdouble intY = a1+(b1*intX);*/\n\t\tdouble d = ((y4-y3)*(x2-x1) - (x4-x3)*(y2-y1));\n\t\tif(d == 0)\n\t\t\treturn null; //parallel roads\n\t\tdouble a = ((x4-x3)*(y1-y3) - (y4-y3)*(x1-x3))*1.0/d;\n\t\tint intX = (int)x1+(int)(a*(x2-x1));\n\t\tint intY = (int)y1+(int)(a*(y2-y1));\n\t\treturn new int[]{(int)intX,(int)intY};\n\t}", "@Override\n\tpublic void intersect(Ray ray, IntersectResult result) {\n\t\t\t\tdouble tmin,tmax;\n\t\t\t\tdouble xmin, xmax, ymin, ymax, zmin, zmax;\n\t\t\t\t//find which face to cross\n\n\t\t\t\tif(ray.viewDirection.x>0){\n\t\t\t\t\txmin=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}else{\n\t\t\t\t\txmin=(max.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t\txmax=(min.x-ray.eyePoint.x)/ray.viewDirection.x;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.y>0){\n\t\t\t\t\tymin=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}else{\n\t\t\t\t\tymin=(max.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t\tymax=(min.y-ray.eyePoint.y)/ray.viewDirection.y;\n\t\t\t\t}\n\t\t\t\tif(ray.viewDirection.z>0){\n\t\t\t\t\tzmin=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}else{\n\t\t\t\t\tzmin=(max.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t\tzmax=(min.z-ray.eyePoint.z)/ray.viewDirection.z;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmin=Double.max(xmin, ymin);\n\t\t\t\ttmin=Double.max(tmin, zmin);\n\t\t\t\ttmax=Double.min(xmax, ymax);\n\t\t\t\ttmax=Double.min(tmax, zmax);\n\t\t\t\t\n\t\t\t\t \n\t\t\t\tif(tmin<tmax && tmin>0){\n\t\t\t\t\t\n\t\t\t\t\tresult.material=material;\n\t\t\t\t\tresult.t=tmin;\n\t\t\t\t\tPoint3d p=new Point3d(ray.viewDirection);\n\t\t\t\t\tp.scale(tmin);\n\t\t\t\t\tp.add(ray.eyePoint);\n\t\t\t\t\tresult.p=p;\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tfinal double epsilon=1e-9;\n\t\t\t\t\t// find face and set the normal\n\t\t\t\t\tif(Math.abs(p.x-min.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(-1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.x-max.x)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(1,0,0);\n\t\t\t\t\t}else if(Math.abs(p.y-min.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,-1,0);\n\t\t\t\t\t}else if(Math.abs(p.y-max.y)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,1,0);\n\t\t\t\t\t}else if(Math.abs(p.z-min.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,-1);\n\t\t\t\t\t}else if(Math.abs(p.z-max.z)<epsilon){\n\t\t\t\t\t\tresult.n=new Vector3d(0,0,1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t}", "public ObjectHit getHit(Ray ray) {\n\t\t\n\t\tObjectHit nearestHit = new ObjectHit(Hit.MISS, null);\n\t\t\n\t\tfor(int i = 0; i < scene.objects.size(); i++) {\n\t\t\tWorldObject object = scene.objects.get(i);\n\t\t\t\n\t\t\tObjectHit hit = new ObjectHit(object.intersect(ray), object.material);\n\t\t\t\n\t\t\tif(hit.hit && hit.distance < nearestHit.distance) {\n\t\t\t\tnearestHit = hit;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn nearestHit;\n\t\t\n\t}", "List<Long> getBestSolIntersection();", "public boolean\n doIntersection(Ray inOutRay) {\n double t, min_t = Double.MAX_VALUE;\n double x2 = size.x/2; // OJO: Esto deberia venir precalculado\n double y2 = size.y/2; // OJO: Esto deberia venir precalculado\n double z2 = size.z/2; // OJO: Esto deberia venir precalculado\n Vector3D p = new Vector3D();\n GeometryIntersectionInformation info = \n new GeometryIntersectionInformation();\n\n inOutRay.direction.normalize();\n\n // (1) Plano superior: Z = size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=size.z/2\n t = (z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = new Vector3D(p);\n min_t = t;\n lastPlane = 1;\n }\n }\n }\n\n // (2) Plano inferior: Z = -size.z/2\n if ( Math.abs(inOutRay.direction.z) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Z=-size.z/2\n t = (-z2-inOutRay.origin.z)/inOutRay.direction.z;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.y >= -y2 && p.y <= y2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 2;\n }\n }\n }\n\n // (3) Plano frontal: Y = size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=size.y/2\n t = (y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 3;\n }\n }\n }\n\n // (4) Plano posterior: Y = -size.y/2\n if ( Math.abs(inOutRay.direction.y) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano Y=-size.y/2\n t = (-y2-inOutRay.origin.y)/inOutRay.direction.y;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.x >= -x2 && p.x <= x2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 4;\n }\n }\n }\n\n // (5) Plano X = size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=size.x/2\n t = (x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 5;\n }\n }\n }\n\n // (6) Plano X = -size.x/2\n if ( Math.abs(inOutRay.direction.x) > VSDK.EPSILON ) {\n // El rayo no es paralelo al plano X=-size.x/2\n t = (-x2-inOutRay.origin.x)/inOutRay.direction.x;\n if ( t > -VSDK.EPSILON && t < min_t ) {\n p = inOutRay.origin.add(inOutRay.direction.multiply(t));\n if ( p.y >= -y2 && p.y <= y2 && \n p.z >= -z2 && p.z <= z2 ) {\n info.p = p;\n min_t = t;\n lastPlane = 6;\n }\n }\n }\n\n if ( min_t < Double.MAX_VALUE ) {\n inOutRay.t = min_t;\n lastInfo.clone(info);\n return true;\n }\n return false;\n }", "private ArrayList<ColorMixerModel.ColorItem> pathIntersection(){\n ArrayList<ColorMixerModel.ColorItem> toDel = new ArrayList<>();\n for(ColorMixerModel.ColorItem c: cmModel.colorSet){\n Ellipse2D.Float cobj = new Ellipse2D.Float(c.getPos().x,c.getPos().y, c.getR(),c.getR());\n if(mouseTrace.intersects(cobj.getBounds2D())){\n toDel.add(c);\n }\n }\n return toDel;\n }", "public List<Point3D> FindIntersections(Ray ray) throws Exception\n {\n List<Point3D> ListInter = new LinkedList<Point3D>();\n\n //find P0\n Point3D P0 = new Point3D(ray.getPOO());\n\n //find the triangle's Normal\n Vector N = this.getNormal(this.getP1());\n\n //find Plane\n Plane plane = new Plane(N, this.getP3());\n\n //if the intersection between the ray and plane\n List<Point3D> ListIntersectionPlane = plane.FindIntersections(ray);\n\n if(ListIntersectionPlane.isEmpty())\n return ListInter;\n\n Point3D intersectionPlane = ListIntersectionPlane.get(0);\n\n //defin Vector P_P0\n Vector P_P0 = new Vector(P0, intersectionPlane);\n\n //checking side 1-2\n Vector V1_1 = new Vector(P0, this._p1);\n Vector V2_1 = new Vector(P0, this._p2);\n Vector N1 = new Vector(V1_1.crossProduct(V2_1));\n N1.normalize();\n double S1 = -P_P0.dotProduct(N1);\n\n //checking side 2-3\n Vector V1_2 = new Vector(P0, this._p2);\n Vector V2_2 = new Vector(P0, this._p3);\n Vector N2 = new Vector(V1_2.crossProduct(V2_2));\n N2.normalize();\n double S2 = -P_P0.dotProduct(N2);\n\n //checking side 3-1\n Vector V1_3 = new Vector(P0, this._p3);\n Vector V2_3 = new Vector(P0, this._p1);\n Vector N3 = new Vector(V1_3.crossProduct(V2_3));\n N3.normalize();\n double S3 = -P_P0.dotProduct(N3);\n\n if (((S1 > 0) && (S2 > 0) && (S3 > 0)) || ((S1 < 0) && (S2 < 0) && (S3 < 0)))\n ListInter.add(intersectionPlane);\n return ListInter;\n\n }", "public Intersection[] intersectWith(Point3d S, Ray3d c) {\n Intersection[] result = null;\n\n double A = c.getX() * c.getX() + c.getY() * c.getY() + c.getZ() * c.getZ();\n\n double bx = (this.x - S.getX()); //Account for the Sphere's position\n double by = (this.y - S.getY());\n double bz = (this.z - S.getZ());\n\n double B = -(c.getX() * bx + c.getY() * by + c.getZ() * bz);\n\n double r = this.radius * this.radius;\n\n double C = bx * bx + by * by + bz * bz - r;\n\n double D = (B * B - A * C);\n if (D < 0) //no intersection\n {\n return null;\n }\n\n if (D == 0) //'graze' the sphere\n {\n result = new Intersection[1];\n Point3d P = S.plus(c.times(-B / A));\n result[0] = new Intersection(-B / A, this, true, 0, P, new Ray3d(P));\n /****/return null;\n }\n\n result = new Intersection[2];\n int hit = 0;\n\n double t1 = (-B - Math.sqrt(D)) / A;\n if (t1 > 0.00001) //The first hit\n {\n Point3d P = S.plus(c.times(t1));\n Ray3d N = P.minus(new Point3d(this.x, this.y, this.z));\n result[0] = new Intersection(t1, this, true, 0, P, N);\n hit++;\n }\n\n double t2 = (-B / A) + Math.sqrt(D) / A;\n if (t2 > 0.00000001) {\n Point3d P = S.plus(c.times(t2));\n Ray3d N = P.minus(new Point3d(this.x, this.y, this.z));\n result[hit] = new Intersection(t2, this, false, 0, P, N.reverse());\n }\n\n return result;\n }", "private Vec3 trace(Ray ray) {\n\t\tSphere sphere = null;\n\n\t\tfor (int i = 0; i < spheres.size(); i++) {\n\t\t\tif (spheres.get(i).intersect(ray)) {\n\t\t\t\tsphere = spheres.get(i);\n\t\t\t}\n\t\t}\n\n\t\tif (sphere == null) {\n\t\t\treturn new Vec3(0.0f); // Background color.\n\t\t}\n\n\t\tVec3 p = ray.getIntersection(); // Intersection point.\n\t\tVec3 n = sphere.normal(p); // Normal at intersection.\n\n\t\treturn light.phong(sphere, p, n);\n\t}", "public Hit intersectsRay(Ray ray) {\n\t\tVector3D dst = Vector3D.sub(ray.b, pos);\n\t\tfloat B = dst.dot(ray.d);\n\t\tfloat C = dst.dot(dst) - radius2;\n\t\tfloat D = B*B - C;\n\t\tfloat t = (float) (-B - Math.sqrt(D));\n\t\tif (!(t > 0)) return null; // escape case: no collision or outside fov\n\t\tVector3D hitPos = Vector3D.add(ray.b, Vector3D.mult(ray.d, t));\n\t\tVector3D n = getNormal(hitPos);\n\t\treturn new Hit(this, t, hitPos, n);\n\t}", "public Color4f getColor(Ray ray, IntersectResult result) {\n \tColor4f c = new Color4f();\n \tif(result.t == Double.POSITIVE_INFINITY) {\n \t\tc.x = render.bgcolor.x;\n \t\tc.y = render.bgcolor.y;\n \t\tc.z = render.bgcolor.z;\n \t\treturn c;\n \t}\n \t\n \t//Ambient color\n \tc.x = ambient.x * result.material.diffuse.x;\n \tc.y = ambient.y * result.material.diffuse.y;\n \tc.z = ambient.z * result.material.diffuse.z;\n \t\n \t//multi light resources contribute to result point\n \tfor(Light light: lights.values()) {\n \t\tRay shadowRay = new Ray();\n \t\tIntersectResult shadowResult = new IntersectResult();\n \t\t\n \t\tint rowNum = 5;\n \t\tint columnNum = 5; //the light plane is separated to rowNum*columnNum sub plane.\n \t\tColor4f lightAccumColor = new Color4f();\n \t\tfor(int i = 0; i < rowNum; i++) {\n \t\tfor(int j = 0; j < columnNum; j++) {\n \t\t\tLight jitterLight = new Light();\n \t\tjitterLight.color.set(light.color);\n \t\tjitterLight.from.set(light.from);\n \t\tjitterLight.power = light.power;\n \t\tVector3d a = new Vector3d(2, 2, 0);\n \t\tVector3d b = new Vector3d(0, 2, 2);\n \t\ta.scale((double)i/(double)rowNum); //delta\n \t\tb.scale((double)j/(double)columnNum);\n \t\t//jitterLight.from = light.from + epsilon1*a + epsilon2*b\n \t\tjitterLight.from.x = jitterLight.from.x+a.x+b.x;\n \t\tjitterLight.from.y = jitterLight.from.y+a.y+b.y;\n \t\tjitterLight.from.z = jitterLight.from.z+a.z+b.z;\n \t\t\n \t\t\n \t\tif(!inShadow(result, surfaceList, jitterLight, shadowResult, shadowRay)) {\n \t \t\t//Lambertian shader\n \t \t\tColor3f ld = new Color3f();\n \t \t\tVector3d l = new Vector3d();\n \t \t\t\n \t \t\t//Area light according to FCG p340\n \t \t\tl.sub(jitterLight.from, result.p);\n \t \t\tl.normalize();\n \t \t\tdouble max = Math.max(0.0, l.dot(result.n));\n \t \t\tld.x = (float)(light.color.x * light.power * result.material.diffuse.x * max);\n \t \t\tld.y = (float)(light.color.y * light.power * result.material.diffuse.y * max);\n \t \t\tld.z = (float)(light.color.z * light.power * result.material.diffuse.z * max);\n \t \t\t\n \t \t\t//Blinn-Phone shader\n \t \t\tColor3f ls = new Color3f();\n \t \t\tVector3d h = new Vector3d();\n \t \t\tVector3d v = new Vector3d();\n \t \t\tv.sub(ray.eyePoint, result.p);\n \t \t\tv.normalize();\n \t \t\th.add(l, v);\n \t \t\th.normalize();\n \t \t\tmax = Math.max(0.0, h.dot(result.n));\n \t \t\tls.x = (float)( light.color.x * light.power * result.material.specular.x * Math.pow(max, result.material.shinyness));\n \t \t\tls.y = (float)( light.color.y * light.power * result.material.specular.y * Math.pow(max, result.material.shinyness));\n \t \t\tls.z = (float)( light.color.z * light.power * result.material.specular.z * Math.pow(max, result.material.shinyness));\n \t \t\t\n \t \t\t//update c\n \t \t\tlightAccumColor.x += ld.x+ls.x;\n \t \t\tlightAccumColor.y += ld.y+ls.y;\n \t \t\tlightAccumColor.z += ld.z+ls.z;\n \t\t}\n \t\t\n \t\tif(result.material.mirror != null) {\n \t\t\t//Firstly calculate reflection ray\n \t\t\tRay mirrorRay = new Ray();\n \t\t\tIntersectResult mirrorResult = new IntersectResult();\n \t\t\tmirrorRay.eyePoint.set(result.p); //Firstly origin is intersection point\n \t\t\tmirrorRay.viewDirection.set(ray.viewDirection); //initialize to d temply, finally to r = d-2(dn)n textbook 103\n \t\t\t\n \t\t\tVector3d d = new Vector3d();\n \t\t\tVector3d n = new Vector3d();\n \t\t\td.set(ray.viewDirection);\n \t\t\tn.set(result.n);\n \t\t\tn.scale(-2.0*d.dot(n)); // n = -2(dn)n\n \t\t\tmirrorRay.viewDirection.add(n); //finally\n \t\t\t\n \t\t\tVector3d epsilon = new Vector3d();\n \t\t\tepsilon.set(mirrorRay.viewDirection);\n \t\t\tepsilon.scale(1e-8);\n \t\t\tmirrorRay.eyePoint.add(epsilon); //add a very small offset in the mirror ray direction to avoid t = 0 \n \t\t\t\n \t\t\tfor(Intersectable surface: surfaceList) {\n \t\t\t\tsurface.intersect(mirrorRay, mirrorResult); //see the intersection of mirror ray with the scene\n \t\t\t}\n \t\t\tColor4f mirrorColor = getColor(mirrorRay, mirrorResult);\n \t\t\tlightAccumColor.x += result.material.mirror.x*mirrorColor.x;\n \t\t\tlightAccumColor.y += result.material.mirror.y*mirrorColor.y;\n \t\t\tlightAccumColor.z += result.material.mirror.z*mirrorColor.z;\n \t\t}\n \t\t}\n \t\t}\n \t\tlightAccumColor.scale(1/(float)(rowNum*columnNum));\n \t\tc.add(lightAccumColor);\n\n \t\t\n \t\t\n \t}\n \t\n \treturn c;\n }", "@Override\r\n\tpublic List<GeoPoint> findGeoIntersections(Ray ray, double maxDistance) {\n\t\treturn null;\r\n\t}", "private LightIntensity computeDirectDiffuse(Solid.Intersection intersection) {\n Point3D target = intersection.info.pointOfIntersection;\n LightIntensity result = LightIntensity.makeZero();\n\n LightIntensity diffuseReflectivity = intersection.intersectedSolid.getDiffuseReflectivityAtPoint(intersection.info.pointOfIntersection);\n for (LightSource light : lightSources) {\n LightIntensity intensityFromThisLight = LightIntensity.makeZero();\n\n // Run multiple random rays towards the light source, and see which ones hit the light source, and which\n // don't. The result will be averaged to achieve smooth shadows\n for (int i = 0; i < LIGHT_SAMPLES_PER_LIGHT; ++i) {\n Point3D lightSamplePos = light.getRandomPoint();\n Point3D vectorToLight = lightSamplePos.subtract(target);\n\n Ray rayToLight = new Ray(target, vectorToLight.normalize());\n Solid.Intersection solidIntersection = castRayOnSolids(rayToLight);\n if (solidIntersection == null ||\n solidIntersection.info.pointOfIntersection.distance(target) > lightSamplePos.distance(target)) {\n double normalDotLightRay = intersection.info.getNormal().dotProduct((rayToLight.unitDirection));\n if (normalDotLightRay < 0) {\n normalDotLightRay *= -1;\n }\n LightIntensity illumination = diffuseReflectivity.multiply(light.intensity);\n illumination = illumination.multiply(normalDotLightRay);\n\n intensityFromThisLight = intensityFromThisLight.add(illumination);\n }\n }\n\n intensityFromThisLight = intensityFromThisLight.multiply(1.0 / LIGHT_SAMPLES_PER_LIGHT);\n result = result.add(intensityFromThisLight);\n }\n\n result = result.add(ambientLight.multiply(diffuseReflectivity));\n return result;\n }", "private int threshFind(int[] ray){\n int min = 0;\n int max = 0;\n for(int i = 0; i < ray.length; i++){\n if(min > ray[i]) min = ray[i];\n else if(max < ray[i]) max = ray[i];\n }\n\n return (min + max) / 2;\n }", "public static Result\n traceRecursion(PointF vLaserSource, PointF vLaserDir, float fRefractionMultiplier, PointF[] geometry, float[] afRefractiveIndices, float fIntensity, int iRecursionDepth, float fFlightLength){\n\n Result res = new Result();\n //init return lists\n res.lineSegments = new ArrayList<>();\n res.intensities = new ArrayList<>();\n res.lightLengths = new ArrayList<>();\n res.hitIntensities = new ArrayList<>();\n res.hitSegments = new ArrayList<>();\n\n //important for angle calculation\n Vec2D.normalize(vLaserDir);\n\n //recursion limiter\n if(fIntensity < 0.05f || iRecursionDepth > 20)\n return res;\n\n //populate output structure\n res.lineSegments.add(vLaserSource);\n res.intensities.add(fIntensity);\n res.lightLengths.add(fFlightLength);\n\n //initialize to infinity\n float fNearestHit = Float.MAX_VALUE;\n int iHitIndex = -1;\n\n //check each geometry line against this ray\n for (int iLine = 0; iLine < geometry.length/2; iLine++) {\n //check if source on right side\n PointF line0 = geometry[iLine*2];\n PointF line1 = geometry[iLine*2 + 1];\n\n //calculate intersection with geometry line\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n\n if(fIntersection > 0.0f && fIntersection < 1.0f){\n //stuff intersects\n //calculate intersection PointF\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n //calculate distance to source\n float fHitDistance = Vec2D.subtract(vLaserSource, vIntersection).length();\n if(Vec2D.subtract(vLaserSource, vIntersection).length() < fNearestHit && fHitDistance > 0.001f) {\n //new minimum distance\n fNearestHit = fHitDistance;\n iHitIndex = iLine;\n }\n }\n }\n //check if we hit\n if(iHitIndex == -1)\n {\n //bigger than screen\n final float fInfLength = 3.0f;\n res.lineSegments.add(Vec2D.add(vLaserSource, Vec2D.mul(fInfLength, vLaserDir)) );\n res.lightLengths.add(fFlightLength + fInfLength);\n }\n else\n {\n //there was a hit somewhere\n //first re-evaluate\n PointF line0 = geometry[iHitIndex*2];\n PointF line1 = geometry[iHitIndex*2 + 1];\n\n res.hitSegments.add(iHitIndex);\n res.hitIntensities.add(fIntensity);\n //calculate point of impact\n float fIntersection = intersectRayLine(vLaserSource, vLaserDir, line0, line1);\n PointF vIntersection = Vec2D.add(line0, Vec2D.mul(fIntersection, Vec2D.subtract(line1, line0)) );\n\n //spam line end\n res.lineSegments.add(vIntersection);\n float fNextLength = fFlightLength + fNearestHit;\n res.lightLengths.add(fNextLength);\n\n if(afRefractiveIndices[iHitIndex] < 0.0f)\n return res;\n\n //calculate normalized surface normal\n PointF vLine = Vec2D.subtract(line1, line0);\n PointF vSurfaceNormal = Vec2D.flip(Vec2D.perpendicular(vLine));\n Vec2D.normalize(vSurfaceNormal);\n\n //calculate direction of reflection\n PointF vReflected = Vec2D.add(Vec2D.mul(-2.0f, Vec2D.mul(Vec2D.dot(vSurfaceNormal, vLaserDir), vSurfaceNormal)), vLaserDir);\n\n double fImpactAngle = Math.acos(Vec2D.dot(vSurfaceNormal, Vec2D.flip(vLaserDir)));\n\n double fRefractionAngle = 0.0f;\n float fRefracted = 0.0f;\n boolean bTotalReflection = false;\n\n if(afRefractiveIndices[iHitIndex] < 5.0f) {\n //calculate which side of the object we're on\n if (Vec2D.dot(vSurfaceNormal, Vec2D.subtract(vLaserSource, line0)) < 0) {\n //from medium to air\n //angle will become bigger\n double fSinAngle = Math.sin(fImpactAngle) * (afRefractiveIndices[iHitIndex] * fRefractionMultiplier);\n\n if (fSinAngle > 1.0f || fSinAngle < -1.0f)\n //refraction would be back into object\n bTotalReflection = true;\n else {\n //calculate refraction\n fRefractionAngle = Math.asin(fSinAngle);\n float fFlippedImpactAngle = (float) Math.asin(Math.sin(fImpactAngle));\n fRefracted = (float) (2.0f * Math.sin(fFlippedImpactAngle) * Math.cos(fRefractionAngle) / Math.sin(fFlippedImpactAngle + fRefractionAngle));\n\n //set refraction angle for direction calculation\n fRefractionAngle = Math.PI - fRefractionAngle;\n }\n } else {\n //from air to medium\n //angle will become smaller\n fRefractionAngle = Math.asin(Math.sin(fImpactAngle) / (afRefractiveIndices[iHitIndex] * fRefractionMultiplier));\n fRefracted = (float) (2.0f * Math.sin(fRefractionAngle) * Math.cos(fImpactAngle) / Math.sin(fImpactAngle + fRefractionAngle));\n }\n }\n else\n bTotalReflection = true;\n\n //give the refraction angle a sign\n if(Vec2D.dot(vLine, vLaserDir) < 0)\n fRefractionAngle = -fRefractionAngle;\n\n //calculate direction of refraction\n double fInvertedSurfaceAngle = Math.atan2(-vSurfaceNormal.y, -vSurfaceNormal.x);\n PointF vRefracted = new PointF((float)Math.cos(fInvertedSurfaceAngle - fRefractionAngle), (float)Math.sin(fInvertedSurfaceAngle - fRefractionAngle));\n\n //calculate amount of light reflected\n float fReflected = 1.0f - fRefracted;\n\n //continue with recursion, reflection\n Result resReflection = traceRecursion(vIntersection, vReflected, fRefractionMultiplier, geometry, afRefractiveIndices, fReflected * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resReflection.lineSegments);\n res.intensities.addAll(resReflection.intensities);\n res.lightLengths.addAll(resReflection.lightLengths);\n res.hitSegments.addAll(resReflection.hitSegments);\n res.hitIntensities.addAll(resReflection.hitIntensities);\n\n //continue with recursion, refraction\n if(!bTotalReflection) {\n Result resRefraction = traceRecursion(vIntersection, vRefracted, fRefractionMultiplier, geometry, afRefractiveIndices, fRefracted * fIntensity, iRecursionDepth+1, fNextLength);\n //merge results\n res.lineSegments.addAll(resRefraction.lineSegments);\n res.intensities.addAll(resRefraction.intensities);\n res.lightLengths.addAll(resRefraction.lightLengths);\n res.hitSegments.addAll(resRefraction.hitSegments);\n res.hitIntensities.addAll(resRefraction.hitIntensities);\n }\n }\n return res;\n }", "@Override\n // public Map<Geometry, List<Point3D>> findIntersections(Ray myRay) {\n public List<Point3D> FindIntersections(Ray myRay) {\n\n List<Point3D> geometryListMap = new ArrayList<>();\n List<Point3D> listOfIntersections = new ArrayList<Point3D>();\n\n // the bottom base of the cylinder\n Plane plane1 = new Plane(orientation.getPOO(), orientation.getDirection());\n\n // the top base of the cylinder\n Plane plane2 = new Plane(top, orientation.getDirection());\n\n List<Point3D> temp1 = plane1.FindIntersections(myRay);\n\n List<Point3D> temp2 = plane2.FindIntersections(myRay);\n\n // removing all points that beyond the radius\n if (temp1 != null)\n for (Point3D p1 : temp1) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p1)).length() <= _radius && p1 != null)\n listOfIntersections.add(p1);\n\n }\n\n if (temp2 != null)\n for (Point3D p2 : temp2) {\n if (new Vector(Point3D.substract(orientation.getPOO(), p2)).length() <= _radius && p2 != null)\n listOfIntersections.add(p2);\n\n }\n\n // using the infinity cylinder to find all the intersections in the body of the limited cylinder\n geometryListMap = super.FindIntersections(myRay);\n\n for (Point3D p : geometryListMap) {\n if (isOnCylinder(p))\n listOfIntersections.add(p);\n\n }\n if (listOfIntersections.isEmpty())\n return null;\n //geometryListMap.put(this, listOfIntersections);\n return geometryListMap;\n }", "private GeoPoint getClosestPoint(List<GeoPoint> intersectionPoints) {\n Point3D p0 = scene.getCamera().getSpo();//the point location of the camera.\n double minDist = Double.MAX_VALUE;//(meatchelim ldistance hamaximily)\n double currentDistance = 0;\n GeoPoint pt = null;\n for (GeoPoint geoPoint : intersectionPoints) {\n currentDistance = p0.distance(geoPoint.getPoint());//checks the distance from camera to point\n if (currentDistance < minDist) {\n minDist = currentDistance;\n pt = geoPoint;\n }\n }\n return pt;\n }", "private LightIntensity computeIndirectDiffuse(Solid.Intersection intersection, int currentTraceDepth) {\n if (MONTE_CARLO_SAMPLES == 0) {\n return LightIntensity.makeZero();\n }\n\n LightIntensity averageResult = LightIntensity.makeZero();\n double totalWeight = 0;\n\n //Utilizes Monte Carlo approach\n for(int MCSample = 0; MCSample < MONTE_CARLO_SAMPLES; ++MCSample) {\n //generate a random vector\n Point3D randomVector = GeometryHelpers.randVector().normalize();\n //Make a new ray given the intersection point\n Ray ray = new Ray(intersection.info.pointOfIntersection, randomVector);\n //Obtain the dot product from the new indirect vector\n double rayDotNormal = randomVector.dotProduct(intersection.info.getNormal());\n if (rayDotNormal <= 0) {\n // Retry if it did not hit anything, avoiding null pointer exception.\n MCSample -= 1;\n continue;\n }\n //Weight the ray down or up depending on its perpendicular proximity to light source\n totalWeight += rayDotNormal;\n LightIntensity intensity = traceRay(ray, currentTraceDepth);\n intensity = intensity.multiply(rayDotNormal).multiply(intersection.intersectedSolid.getDiffuseReflectivityAtPoint(intersection.info.pointOfIntersection));\n //Average the results of each indirect light source\n averageResult = averageResult.add(intensity);\n }\n //Integrate/take the average of the results with consideration to its weight.\n return averageResult.multiply(1.0/totalWeight);\n }", "public void intersectRoads() {\r\n\t\tfor (Road road : this.roads) {\r\n\t\t\tfor (Integer id : road.getIntersectionIDs()) {\r\n\t\t\t\tfor (Road link : this.roads) {\r\n\t\t\t\t\tif (id == link.getID()) {\r\n\t\t\t\t\t\troad.intersectRoad(link);\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}", "protected static void tracer(Scene scene, Ray ray, short[] rgb) {\n\t\trgb[0] = 0;\n\t\trgb[1] = 0;\n\t\trgb[2] = 0;\n\t\tRayIntersection closest = findClosestIntersection(scene, ray);\n\t\tif (closest == null) {\n\t\t\treturn;\n\t\t}\n\t\tList<LightSource> lights = scene.getLights();\n\t\t\n\t\trgb[0] = 15;\n\t\trgb[1] = 15;\n\t\trgb[2] = 15;\n\t\tPoint3D normal = closest.getNormal();\n\t\tfor (LightSource light : lights) {\n\t\t\tRay lightRay = Ray.fromPoints(light.getPoint(), closest.getPoint());\n\t\t\tRayIntersection lightClosest = findClosestIntersection(scene, lightRay);\n\n\t\t\tif(lightClosest == null) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif ( lightClosest.getPoint().sub(light.getPoint()).norm() + 0.001 < \n\t\t\t\t\tclosest.getPoint().sub(light.getPoint()).norm()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tPoint3D r = lightRay.direction.sub(normal.scalarMultiply(2*(lightRay.direction.scalarProduct(normal))));\n\t\t\t\n\t\t\trgb[0] += light.getR()*(closest.getKdr()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrr() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[1] += light.getG()*(closest.getKdg()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrg() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t\trgb[2] += light.getB()*(closest.getKdb()*(Math.max(lightRay.direction.scalarProduct(normal),0)) + closest.getKrb() *\n\t\t\t\t\tMath.pow(ray.direction.scalarProduct(r),closest.getKrn()));\n\t\t}\n\t}", "private boolean occluded(LightSource light, Point3D point, Geometry geometry){\n Vector lightDirection = light.getL(point);\n // we want to check the vector from the ray of the camera to the light ray\n // this is the revers direction\n lightDirection.scale(-1);\n\n Point3D geometryPoint = new Point3D(point);\n Vector epsVector = new Vector(geometry.getNormal(point));\n epsVector.scale(2);\n geometryPoint.add(epsVector);\n // create new ray\n Ray lightRay = new Ray(geometryPoint, lightDirection);\n // check for intersection points\n Map<Geometry, List<Point3D>> intersectionPoints = getSceneRayIntersections(lightRay);\n\n // Flat geometry cannot self intersect\n if (geometry instanceof FlatGeometry){\n intersectionPoints.remove(geometry);\n }\n for(Entry<Geometry, List<Point3D>> entry: intersectionPoints.entrySet()){\n if(entry.getKey().getMaterial().getKt() == 0)\n if (!(light instanceof PointLight) ||\n (light instanceof PointLight && point.distance(entry.getValue().get(0)) < point.distance(((PointLight)light).getPosition())))\n return true;\n }\n return false;\n }", "@Override\r\n public void intersect( Ray ray, IntersectResult result ) {\n\t\r\n }", "public static boolean\nraysIntersectInPlane(Point2D tail0Pt, Point2D head0Pt, Point2D tail1Pt, Point2D head1Pt,\n\tPoint2D intersect, double[] uArray)\n{\n\tdouble tmp = ((head1Pt.getY() - tail1Pt.getY())*(head0Pt.getX() - tail0Pt.getX()) - (head1Pt.getX() - tail1Pt.getX())*(head0Pt.getY() - tail0Pt.getY()));\n\tif(tmp == 0.0)\n\t\treturn(false);\n\tdouble tmpv = ((tail1Pt.getX() - tail0Pt.getX())*(head0Pt.getY() - tail0Pt.getY()) - (tail1Pt.getY() - tail0Pt.getY())*(head0Pt.getX() - tail0Pt.getX())) / tmp;\n\ttmp = (head0Pt.getX() - tail0Pt.getX())*(head1Pt.getY() - tail1Pt.getY()) - (head1Pt.getX() - tail1Pt.getX())*(head0Pt.getY() - tail0Pt.getY());\n\tif(tmp == 0.0)\n\t\treturn(false);\n\tdouble tmpu = ((tail1Pt.getX() - tail0Pt.getX())*(head1Pt.getY() - tail1Pt.getY()) + (head1Pt.getX() - tail1Pt.getX())*(tail0Pt.getY() - tail1Pt.getY()))/tmp;\n\n\tintersect.setLocation(\n\t\ttail1Pt.getX() + tmpv*(head1Pt.getX() - tail1Pt.getX()),\n\t\ttail1Pt.getY() + tmpv*(head1Pt.getY() - tail1Pt.getY()));\n\n\t// intersect[ZCoor] = tail1Pt[ZCoor] + tmpv*(head1Pt[ZCoor] - tail1Pt[ZCoor]);\n\n\tuArray[0] = tmpu; // u of first ray\n\tuArray[1] = tmpv; // u of second ray\n\n\treturn (true);\n}", "@Test\n public void testGetIntersect() throws Exception {\n Vector farIntersect = sphere.getIntersect(new Vector(0,0,0),new Vector(0,-6,10));\n assertTrue(farIntersect.equals(new Vector(0,-6,10)));\n }", "private double calculateT(Position lineStart, Position lineEnd, double lookaheadDistance) {\n Position d = Functions.Positions.subtract(lineEnd, lineStart);\n Position f = Functions.Positions.subtract(lineStart, currentCoord);\n double r = lookaheadDistance;\n\n double a = Functions.Positions.dot(d, d);\n double b = 2 * Functions.Positions.dot(f, d);\n double c = Functions.Positions.dot(f, f) - r * r;\n\n double discriminant = b * b - 4 * a * c;\n if (discriminant < 0) {\n // no intersection\n } else {\n // ray didn't totally miss sphere, so there is a solution to the equation.\n discriminant = Math.sqrt(discriminant);\n\n // either solution may be on or off the ray so need to test both\n // t1 is always the smaller value, because BOTH discriminant and a are nonnegative.\n double t1 = (-b - discriminant) / (2 * a);\n double t2 = (-b + discriminant) / (2 * a);\n\n // 3x HIT cases:\n // -o-> --|--> | | --|->\n // Impale(t1 hit,t2 hit), Poke(t1 hit,t2>1), ExitWound(t1<0, t2 hit),\n\n // 3x MISS cases:\n // -> o o -> | -> |\n // FallShort (t1>1,t2>1), Past (t1<0,t2<0), CompletelyInside(t1<0, t2>1)\n\n if (t1 >= 0 && t1 <= 1) {\n // t1 is the intersection, and it's closer than t2 (since t1 uses -b - discriminant)\n // Impale, Poke\n return t1;\n }\n\n if (t2 >= 0 && t2 <= 1) {\n return t2;\n }\n }\n return Double.NaN;\n }", "public Color ray_trace(Ray ray) {\r\n int index = -1;\r\n float t = Float.MAX_VALUE;\r\n \r\n for(int i = 0; i < spheres.size(); i++) {\r\n float xd, yd, zd, xo, yo, zo, xc, yc, zc, rc, A, B, C, disc, t0, t1;\r\n \r\n xd = ray.getDirection().getX();\r\n yd = ray.getDirection().getY();\r\n zd = ray.getDirection().getZ();\r\n xo = ray.getOrigin().getX();\r\n yo = ray.getOrigin().getY();\r\n zo = ray.getOrigin().getZ();\r\n xc = spheres.get(i).getCenter().getX();\r\n yc = spheres.get(i).getCenter().getY();\r\n zc = spheres.get(i).getCenter().getZ();\r\n rc = spheres.get(i).getRadius();\r\n \r\n A = xd*xd + yd*yd + zd*zd;\r\n B = 2*(xd*(xo-xc) + yd*(yo-yc) + zd*(zo-zc));\r\n C = (xo-xc)*(xo-xc) + (yo-yc)*(yo-yc) + (zo-zc)*(zo-zc) - rc*rc;\r\n \r\n disc = B*B - (4*A*C);\r\n \r\n if(disc < 0) {\r\n continue;\r\n }\r\n\r\n if(disc == 0) {\r\n t0 = -B/(2*A);\r\n if(t0 < t && t0 > 0) {\r\n t=t0;\r\n index = i;\r\n }\r\n } else {\r\n t0 = (-B + (float) Math.sqrt(disc))/(2*A);\r\n t1 = (-B - (float) Math.sqrt(disc))/(2*A);\r\n\r\n if( t0 > t1) {\r\n float flip = t0;\r\n t0 = t1;\r\n t1 = flip;\r\n }\r\n\r\n if(t1 < 0) {\r\n continue;\r\n }\r\n\r\n if(t0 < 0 && t1 < t) {\r\n t = t1;\r\n index = i;\r\n } else if(t0 > 0 && t0 < t) {\r\n t = t0;\r\n index = i;\r\n }\r\n }\r\n }// end of for loop\r\n if(index < 0) {\r\n return background;\r\n } else {\r\n Point intersect = (ray.getDirection().const_mult(t)).point_add(window.getEye());\r\n return shade_ray(index, intersect);\r\n } \r\n }", "@Override\n public Intersection getIntersectionNorth(){\n if(!mapLoaded){\n return null;\n }\n return extremIntersection[0];\n }", "@Test\n public void findClosestGeoPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n Geometry geo = new Sphere(new Point3D(1,1,1),2);\n\n List<Intersectable.GeoPoint> list = new LinkedList<Intersectable.GeoPoint>();\n list.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n\n\n assertEquals(list.get(2), ray.findClosestGeoPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<GeoPoint> list2 = null;\n assertNull(\"try again\",ray.findClosestGeoPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<GeoPoint> list3 = new LinkedList<GeoPoint>();\n list3.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n list3.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list3.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list3.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n\n assertEquals(list3.get(0), ray.findClosestGeoPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<GeoPoint> list4 = new LinkedList<GeoPoint>();\n list4.add(new GeoPoint(geo,new Point3D(1, 1, -100)));\n list4.add(new GeoPoint(geo,new Point3D(0.5, 0, -100)));\n list4.add(new GeoPoint(geo,new Point3D(-1, 1, -99)));\n list4.add(new GeoPoint(geo,new Point3D(0, 2, -10)));\n\n assertEquals(list4.get(3), ray.findClosestGeoPoint(list4));\n }", "public int getMouseSeismicLine2dIntersect(double[][] mouseLine, double[] intersectionXYZF)\n {\n double mouseLineLenSq;\n double[] lineVector;\n double[] pointVector0, pointVector1;\n double x0, y0, x1, y1;\n\n if(nCols < 1)\n {\n intersectionXYZF[3] = StsParameters.largeDouble;\n return -1;\n }\n try\n {\n mouseLineLenSq = StsMath.distanceSq(mouseLine[0], mouseLine[1], 2);\n lineVector = StsMath.subtract(mouseLine[1], mouseLine[0]);\n pointVector1 = StsMath.vector2(mouseLine[0][0], mouseLine[0][1], cdpX[0], cdpY[0]);\n y1 = computePointCoordinatesY(pointVector1, lineVector, mouseLineLenSq);\n int nPointNearest = 0;\n double fLineNearest = StsParameters.largeDouble;\n for(int n = 1; n < nCols; n++)\n {\n pointVector0 = pointVector1;\n pointVector1 = StsMath.vector2(mouseLine[0][0], mouseLine[0][1], cdpX[n], cdpY[n]);\n y0 = y1;\n y1 = computePointCoordinatesY(pointVector1, lineVector, mouseLineLenSq);\n\n if(y1 * y0 < 0.0)\n {\n x0 = computePointCoordinatesX(pointVector0, lineVector, mouseLineLenSq);\n x1 = computePointCoordinatesX(pointVector1, lineVector, mouseLineLenSq);\n\n double fPoint = -y0 / (y1 - y0);\n double fLine = x0 + fPoint * (x1 - x0);\n double z = mouseLine[0][2] + fLine * (mouseLine[1][2] - mouseLine[0][2]);\n if(fLine < fLineNearest && StsMath.betweenInclusive(z, zMin, zMax))\n {\n fLineNearest = fLine;\n\n if(fPoint <= 0.5)\n nPointNearest = n - 1;\n else\n nPointNearest = n;\n }\n }\n }\n if(!StsMath.interpolate(mouseLine[0], mouseLine[1], fLineNearest, 3, intersectionXYZF))\n return -1;\n intersectionXYZF[3] = fLineNearest;\n return nPointNearest;\n }\n catch(Exception e)\n {\n return -1;\n }\n }", "public static void main(String[] args){\n Mesh3D box = Mesh3D.box(10, 20, 60);\n \n Line3D lineX = box.getLineX();\n Line3D lineY = box.getLineY();\n Line3D lineZ = box.getLineZ();\n lineX.show();\n lineY.show();\n lineZ.show();\n box.translateXYZ(100, 0.0, 0.0); \n box.show();\n Line3D line = new Line3D(); \n List<Point3D> intersects = new ArrayList<Point3D>();\n \n for(int p = 0; p < 100; p++){\n double r = 600;\n double theta = Math.toRadians(90.0);//Math.toRadians(Math.random()*180.0);\n double phi = Math.toRadians(Math.random()*360.0-180.0);\n line.set(0.0,0.0,0.0, \n Math.sin(theta)*Math.cos(phi)*r,\n Math.sin(theta)*Math.sin(phi)*r,\n Math.cos(theta)*r\n );\n intersects.clear();\n box.intersectionRay(line, intersects);\n System.out.println(\"theta/phi = \" + Math.toDegrees(theta) + \" \"\n + Math.toDegrees(phi) + \" intersects = \" + intersects.size());\n \n }\n }", "public Vector3d computeLineIntersection(\r\n\t\tCSGRay\t\t\tpOtherLine\r\n\t,\tVector3d\t\tpResult\r\n\t,\tdouble\t\t\tpTolerance\r\n\t,\tCSGTempVars\t\tpTempVars\r\n\t,\tCSGEnvironment\tpEnvironment\r\n\t) {\r\n\t\t//x = x1 + a1*t = x2 + b1*s\r\n\t\t//y = y1 + a2*t = y2 + b2*s\r\n\t\t//z = z1 + a3*t = z2 + b3*s\r\n\t\tVector3d lineOrigin = pOtherLine.getOrigin(); \r\n\t\tVector3d lineDirection = pOtherLine.getDirection();\r\n\t\t\t\t\r\n\t\tdouble t;\r\n\t\tif ( Math.abs( mDirection.y*lineDirection.x - mDirection.x*lineDirection.y ) > pTolerance ) {\r\n\t\t\tt = (-mOrigin.y*lineDirection.x\r\n\t\t\t\t\t+ lineOrigin.y*lineDirection.x\r\n\t\t\t\t\t+ lineDirection.y*mOrigin.x\r\n\t\t\t\t\t- lineDirection.y*lineOrigin.x) \r\n\t\t\t\t/ (mDirection.y*lineDirection.x - mDirection.x*lineDirection.y);\r\n\t\t\t\r\n\t\t} else if ( Math.abs( -mDirection.x*lineDirection.z + mDirection.z*lineDirection.x) > pTolerance ) {\r\n\t\t\tt = -(-lineDirection.z*mOrigin.x\r\n\t\t\t\t\t+ lineDirection.z*lineOrigin.x\r\n\t\t\t\t\t+ lineDirection.x*mOrigin.z\r\n\t\t\t\t\t- lineDirection.x*lineOrigin.z)\r\n\t\t\t\t/ (-mDirection.x*lineDirection.z + mDirection.z*lineDirection.x);\r\n\t\t\t\r\n\t\t} else if ( Math.abs( -mDirection.z*lineDirection.y + mDirection.y*lineDirection.z) > pTolerance ) {\r\n\t\t\tt = (mOrigin.z*lineDirection.y\r\n\t\t\t\t\t- lineOrigin.z*lineDirection.y\r\n\t\t\t\t\t- lineDirection.z*mOrigin.y\r\n\t\t\t\t\t+ lineDirection.z*lineOrigin.y)\r\n\t\t\t\t/ (-mDirection.z*lineDirection.y + mDirection.y*lineDirection.z);\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t// Nothing we can figure out\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\t// Construct a new position based on what we know \r\n\t\tpResult = mDirection.mult( t, pResult );\r\n\t\tpResult.addLocal( mOrigin );\r\n\t\t\r\n\t\tif ( pEnvironment.mRationalizeValues ) {\r\n\t\t\t// Confirm that the magnitudes of the resultant point are rational\r\n\t\t\tCSGEnvironment.rationalizeVector( pResult, pEnvironment.mEpsilonMagnitudeRange );\r\n\t\t}\r\n\t\treturn( pResult );\r\n\t}", "private Color calcLocalEffects(GeoPoint intersection, Ray ray,double k) \r\n\t{\r\n\t\tVector v = ray.getDir();// ray direction\r\n\t\tVector n = intersection.geometry.get_Normal(intersection.point);\r\n\t\tdouble nv = Util.alignZero(n.dotProduct(v));\r\n\t\tif (Util.isZero(nv))// there is no diffusive and Specular\r\n\t\t\treturn Color.BLACK;\r\n\t\tint nShininess = intersection.geometry.getMaterial().nShininess;\r\n\t\tdouble kd = intersection.geometry.getMaterial().kD;\r\n\t\tdouble ks = intersection.geometry.getMaterial().kS;\r\n\t\tColor color = Color.BLACK;\r\n\t\tfor (LightSource lightSource : scene.lights) {\r\n\t\t\tVector l = lightSource.getL(intersection.point);\r\n\t\t\tdouble nl = Util.alignZero(n.dotProduct(l));\r\n\t\t\tif (nl * nv > 0) { // sign(nl) == sing(nv)\r\n\t\t\t\tdouble ktr = transparency( l, n, intersection,lightSource);\r\n\t\t\t\tif (ktr * k > MIN_CALC_COLOR_K) {\r\n\t\t\t\t\tColor lightIntensity = lightSource.getIntensity(intersection.point).scale(ktr);\r\n\t\t\t\t\tcolor = color.add(calcDiffusive(kd, nl, lightIntensity),\r\n\t\t\t\t\t\t\tcalcSpecular(ks, l, n, nl, v, nShininess, lightIntensity));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn color;\r\n\t}", "public Vector end(double sweepline)\n\t{\n\t\tVector[] intersections = Utils.parabolaIntersection(siteA, siteB, sweepline);\n\n\t\tif (intersections.length == 0)\n\t\t\treturn ray.origin;\n\n\t\tif (intersections.length == 1)\n\t\t\treturn intersections[0];\n\n\t\tdouble do0 = Vector.distance(ray.origin, intersections[0]);\n\t\tdouble do1 = Vector.distance(ray.origin, intersections[1]);\n\n\t\tVector closest = do0 < do1 ? intersections[0] : intersections[1];\n\n\t\t// Determine which intersection the boundary ray intersects\n\t\tdouble dd0 = Vector.distance(ray.direction, intersections[0].sub(ray.origin).normalize());\n\t\tdouble dd1 = Vector.distance(ray.direction, intersections[1].sub(ray.origin).normalize());\n\n\t\tif (dd0 < dd1)\n\t\t{\n\t\t\tif (dd0 < Math.min(do0, do1))\n\t\t\t\tclosest = intersections[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif (dd1 < Math.min(do0, do1))\n\t\t\t\tclosest = intersections[1];\n\t\t}\n\n\t\treturn closest;\n\t}", "public static Point4d intersecta(Rayo rayo, Figura figura) {\n\t\tPoint4d interseccion = null;\n\t\t//si la figura es una esfera\n\t\tif (figura instanceof Esfera) {\n\t\t\tEsfera esfera = (Esfera) figura;\n\t\t\t/*\n\t\t\t * ecuacion de la esfera:\n\t\t\t * (p-centroEsfera)^2=radioEsfera^2 y sacar los terminos a,b,c de\n\t\t\t * la ecuacion cuadrática.\n\t\t\t */\n\t\t\t// A = d . d\n\t\t\tdouble A = rayo.getDireccion().dot(rayo.getDireccion());\n\t\t\tPoint4d p = rayo.getPunto();\n\t\t\tVector4d a = new Vector4d();\n\t\t\t// ( a - c )\n\t\t\ta.sub(p, esfera.getCentro());\n\t\t\t// B = d . ( a - c )\n\t\t\tdouble B = rayo.getDireccion().dot(a);\n\t\t\t// ( a - c ) . ( a - c ) \n\t\t\tdouble C = a.dot(a);\n\t\t\t// ( a - c ) . ( a - c ) - r ^2\n\t\t\tC -= esfera.getRadio() * esfera.getRadio();\n\t\t\t// d = B ^ 2 - A * C\n\t\t\tdouble D = Math.pow(B, 2) - A * C;\n\t\t\tif (D < 0) {\n\t\t\t\t// no hay interseccion\n\t\t\t}\n\t\t\telse if (D == 0) {\n\t\t\t\t// hay una interseccion\n\t\t\t\t// lambda = -2B / 2A\n\t\t\t\tdouble lambda = -2 * B / (double) (2 * A);\n\t\t\t\tinterseccion = new Point4d();\n\t\t\t\tinterseccion.x += rayo.getPunto().x + lambda\n\t\t\t\t\t\t* rayo.getDireccion().x;\n\t\t\t\tinterseccion.y += rayo.getPunto().y + lambda\n\t\t\t\t\t\t* rayo.getDireccion().y;\n\t\t\t\tinterseccion.z += rayo.getPunto().z + lambda\n\t\t\t\t\t\t* rayo.getDireccion().z;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// hay dos intersecciones\n\t\t\t\t// -2B\t+- (( 4B^2-4AC)^1/2)/2A\n\t\t\t\tdouble lambda1 = (-2 * B + Math.sqrt(4 * Math.pow(B, 2) - 4 * A\n\t\t\t\t\t\t* C))\n\t\t\t\t\t\t/ (double) (2 * A);\n\t\t\t\tdouble lambda2 = (-2 * B - Math.sqrt(4 * Math.pow(B, 2) - 4 * A\n\t\t\t\t\t\t* C))\n\t\t\t\t\t\t/ (double) (2 * A);\n\t\t\t\tif (lambda1 < 0 && lambda2 < 0) {\n\t\t\t\t\t//intersecciones entre pantalla y ojo\n\t\t\t\t}\n\t\t\t\telse if (lambda1 > 0 && lambda2 < 0) {\n\t\t\t\t\t//rayo(lambda1) visible, pero rayo(lambda2) no\n\t\t\t\t\tinterseccion = new Point4d();\n\t\t\t\t\tinterseccion.x += rayo.getPunto().x + lambda1\n\t\t\t\t\t\t\t* rayo.getDireccion().x;\n\t\t\t\t\tinterseccion.y += rayo.getPunto().y + lambda1\n\t\t\t\t\t\t\t* rayo.getDireccion().y;\n\t\t\t\t\tinterseccion.z += rayo.getPunto().z + lambda1\n\t\t\t\t\t\t\t* rayo.getDireccion().z;\n\t\t\t\t\tinterseccion=rayo.evaluar(lambda1);\n\n\t\t\t\t}\n\t\t\t\telse if (lambda1 > lambda2 && lambda2 > 0) {\n\t\t\t\t\t//se ven las dos intersecciones, y lambda 2 esta mas cerca\n\t\t\t\t\tinterseccion = new Point4d();\n\t\t\t\t\tinterseccion.x += rayo.getPunto().x + lambda2\n\t\t\t\t\t\t\t* rayo.getDireccion().x;\n\t\t\t\t\tinterseccion.y += rayo.getPunto().y + lambda2\n\t\t\t\t\t\t\t* rayo.getDireccion().y;\n\t\t\t\t\tinterseccion.z += rayo.getPunto().z + lambda2\n\t\t\t\t\t\t\t* rayo.getDireccion().z;\n\t\t\t\t}\n\t\t\t\telse if (lambda1 < 0 && lambda2 > 0) {\n\t\t\t\t\t//rayo(lambda2) visible, pero rayo(lambda1) no\n\t\t\t\t\tinterseccion = new Point4d();\n\t\t\t\t\tinterseccion.x += rayo.getPunto().x + lambda2\n\t\t\t\t\t\t\t* rayo.getDireccion().x;\n\t\t\t\t\tinterseccion.y += rayo.getPunto().y + lambda2\n\t\t\t\t\t\t\t* rayo.getDireccion().y;\n\t\t\t\t\tinterseccion.z += rayo.getPunto().z + lambda2\n\t\t\t\t\t\t\t* rayo.getDireccion().z;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//se ven las dos intersecciones, y lambda 1 esta mas cerca\n\t\t\t\t\tinterseccion = new Point4d();\n\t\t\t\t\tinterseccion.x += rayo.getPunto().x + lambda1\n\t\t\t\t\t\t\t* rayo.getDireccion().x;\n\t\t\t\t\tinterseccion.y += rayo.getPunto().y + lambda1\n\t\t\t\t\t\t\t* rayo.getDireccion().y;\n\t\t\t\t\tinterseccion.z += rayo.getPunto().z + lambda1\n\t\t\t\t\t\t\t* rayo.getDireccion().z;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse if (figura instanceof Plano) {\n\t\t\tPlano plano = (Plano) figura;\n\n\t\t\t// intersecta con el plano\n\t\t\t// calculamos el punto de la interseccion\n\t\t\t// numerador(n * a + D)\n\t\t\t// (p1 -a)n\n\t\t\tdouble numerador = Operaciones.sub(plano.getPunto(),\n\t\t\t\t\trayo.getPunto()).dot(plano.getNormal(null));\n\t\t\tdouble landa = 0.0;\n\t\t\tif (numerador != 0.0) {\n\t\t\t\t// denominador (d * n)\n\t\t\t\t// d*n\n\t\t\t\tdouble denominador = rayo.getDireccion().dot(\n\t\t\t\t\t\tplano.getNormal(null));\n\t\t\t\tlanda = numerador / denominador;\n\t\t\t}\n\t\t\t// evaluamos t en la ecuacion del rayo\n\t\t\tdouble casos = rayo.getDireccion().dot(plano.getNormal(null));\n\t\t\tif (casos < 0.0) {\n\t\t\t\tif (landa >= 0.0) {\n\t\t\t\t\tinterseccion = rayo.evaluar(landa);\n\t\t\t\t}\n\t\t\t\t// else no se ve\n\t\t\t}\n\t\t\t// else no intersecta\n\t\t}\n\t\telse if (figura instanceof Triangulo) {\n\t\t\tTriangulo triangulo = (Triangulo) figura;\n\t\t\tVector4d N = triangulo.getNormal(null);\n\t\t\t// intersecta con el plano en el que esta el triangulo\n\t\t\t// calculamos el punto de interseccion de ese plano\n\t\t\t// numerador=(p1-a)* n\n\t\t\tVector4d vectorTriangulo = Operaciones.sub(triangulo.getPunto1(),\n\t\t\t\t\trayo.getPunto());\n\t\t\tdouble numerador = vectorTriangulo.dot(N);\n\t\t\tdouble landa = 0.0;\n\t\t\tif (numerador != 0.0) {\n\t\t\t\t// denominador=(d * n)\n\t\t\t\tdouble denominador = rayo.getDireccion().dot(N);\n\t\t\t\tlanda = numerador / denominador;\n\t\t\t}\n\t\t\t// comprobar si rayo(landa) se encuentra dentro\n\t\t\t// de los parametros del triangulo\n\t\t\tPoint4d p = rayo.evaluar(landa);\n\t\t\t// comprobamos que tienen el mismo signo\n\t\t\t// S1=((p2-p1)x(p-p1)) * n\n\t\t\tdouble S1 = Operaciones.crossProduct(\n\t\t\t\t\tOperaciones.sub(triangulo.getPunto2(),\n\t\t\t\t\t\t\ttriangulo.getPunto1()),\n\t\t\t\t\t\t\tOperaciones.sub(p, triangulo.getPunto1())).dot(N);\n\n\t\t\t// S2=((p3-p2)x(p-p2))* n\n\t\t\tdouble S2 = Operaciones.crossProduct(\n\t\t\t\t\tOperaciones.sub(triangulo.getPunto3(),\n\t\t\t\t\t\t\ttriangulo.getPunto2()),\n\t\t\t\t\t\t\tOperaciones.sub(p, triangulo.getPunto2())).dot(N);\n\t\t\t// S1=((p1-p3)x(p-p3)) * n\n\t\t\tdouble S3 = Operaciones.crossProduct(\n\t\t\t\t\tOperaciones.sub(triangulo.getPunto1(),\n\t\t\t\t\t\t\ttriangulo.getPunto3()),\n\t\t\t\t\t\t\tOperaciones.sub(p, triangulo.getPunto3())).dot(N);\n\n\t\t\t// else no intersecta con el triangulo\n\t\t\tdouble casos = rayo.getDireccion().dot(N);\n\t\t\tif (casos < 0.0) {\n\t\t\t\tif (landa >= 0.0) {\n\t\t\t\t\tif ((S1 >= 0 && S2 >= 0 && S3 >= 0)\n\t\t\t\t\t\t\t|| (S1 <= 0 && S2 <= 0 && S3 <= 0)) {\n\t\t\t\t\t\t// esta dentro del triangulo\n\t\t\t\t\t\t// System.out.println(landa);\n\t\t\t\t\t\tinterseccion = rayo.evaluar(landa);\n\t\t\t\t\t}\n\t\t\t\t\t// else no da en el triangulo\n\t\t\t\t}\n\t\t\t\t// else no se ve\n\t\t\t}\n\t\t\t// else no intersecta\n\t\t}\n\n\t\treturn interseccion;\n\t}", "protected Coordinates intersectionFromClosestPoints() {\n if (closestPointA != null && closestPointB != null\n && geometry.almostEqual(closestPointA, closestPointB)) {\n return closestPointA;\n } else {\n return null;\n }\n }", "public Position3D getIntersect(Line3D other) {\r\n\t\tif (this.isParallel(other)) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\r\n\t\tdouble t = (this.d - this.norm.dot(other.getPos())) / this.norm.dot(other.getDir());\r\n\t\treturn other.getLinePoint(t);\r\n\t}", "private double rayMarch(Vec3 ro, Vec3 rd){\n double dO = 0.0;\n for (int i = 0;i< MAX_STEPS;i++){\n Vec3 p = Vec3.add(ro,Vec3.multiply(rd,dO));\n double ds = getDist(p);\n dO += ds;\n if(dO > MAX_DIST || ds < SURF_DIST){\n break;\n }\n }\n return dO;\n }", "private static Point2D getIntersectionFromParallel(LineSegment A, LineSegment B)\r\n\t{\r\n\t\t// Assume two lines are parallel at this point, return the highest end point (relative) of the two lines\r\n\t\tPoint2D Alow = Utilities.isBelow(A.startPoint, A.endPoint) ? A.startPoint : A.endPoint;\r\n\t\tPoint2D Blow = Utilities.isBelow(B.startPoint, B.endPoint) ? B.startPoint : B.endPoint;\r\n\t\treturn Utilities.isBelow(Alow, Blow) ? Blow : Alow;\r\n\t\t\r\n\t}", "static List<PT> CircleLineIntersection(PT a, PT b, PT c, double r) {\r\n\t\tList<PT> ret = new ArrayList<PT>();\r\n\t\tb = b.subtract(a);\r\n\t\ta = a.subtract(c);\r\n\r\n\t\tdouble A = dot(b, b);\r\n\t\tdouble B = dot(a, b);\r\n\t\tdouble C = dot(a, a) - r * r;\r\n\t\tdouble D = B * B - A * C;\r\n\r\n\t\tif (D < -EPS)\r\n\t\t\treturn ret;\r\n\t\tret.add(c.add(a).add(b.multiply((-B + Math.sqrt(D + EPS))).divide(A)));\r\n\t\tif (D > EPS)\r\n\t\t\tret.add(c.add(a.add(b.multiply((-B - Math.sqrt(D))).divide(A))));\r\n\t\treturn ret;\r\n\t}", "private Map<Geometry, Point3D> getClosestPoint(Map<Geometry, List<Point3D>> intersectionPoints) {\n\n double distance = Double.MAX_VALUE;\n Map<Geometry, Point3D> closestPoint = new HashMap<Geometry, Point3D>();\n Point3D P0 = _scene.getCamera().getP0();\n Map.Entry<Geometry, List<Point3D>> entry;\n Iterator<Entry<Geometry, List<Point3D>>> it = intersectionPoints.entrySet().iterator();\n while (it.hasNext())\n {\n entry = it.next();\n for (Point3D point: intersectionPoints.get(entry.getKey())) {\n if (P0.distance(point) < distance) {\n closestPoint = new HashMap<Geometry, Point3D>();\n closestPoint.put(entry.getKey(), point);\n distance = P0.distance(point);\n }\n }\n }\n return closestPoint;\n }", "boolean intersects( Geometry gmo );", "public ArrayList<Point> intersection(Camera camera) {\n\t\tArrayList<Point> arrayPoint = new ArrayList<>();\n\n\t\tarrayPoint.add(A2);\n\t\tarrayPoint.addAll(camera.intersection(A2, B2));\n\n\t\tarrayPoint.add(B2);\n\t\tarrayPoint.addAll(camera.intersection(B2, C2));\n\n\t\tarrayPoint.add(C2);\n\t\tarrayPoint.addAll(camera.intersection(C2, D2));\n\n\t\tarrayPoint.add(D2);\n\t\tarrayPoint.addAll(camera.intersection(D2, A2));\n\n\t\tarrayPoint.add(A2);\n\n\t\treturn arrayPoint;\n\t}", "public Point closestIntersectionToStartOfLine(Rectangle rect) {\r\n List<Point> list = rect.intersectionPoints(this);\r\n if (list.isEmpty()) {\r\n return null;\r\n // there is only one point in list\r\n } else if (list.size() == 1) {\r\n return list.get(0);\r\n // first point in list closer than the second one\r\n } else if (this.start.distance(list.get(0)) < this.start.distance(list.get(1))) {\r\n return list.get(0);\r\n // second point in list closer than the first one\r\n } else {\r\n return list.get(1);\r\n }\r\n }", "private Color calcColor(GeoPoint geoPoint, Ray inRay, int level, double k) {\n if (level == 0 || k < MIN_CALC_COLOR_K) {\n return Color.BLACK;\n }\n Color result = geoPoint.getGeometry().getEmmission();\n Point3D pointGeo = geoPoint.getPoint();\n\n /**v=is the vector from camera strait ahead.\n * n=the vector normal to the point on that shape/object*/\n Vector v = pointGeo.subtract(scene.getCamera().getSpo()).normalize();\n Vector n = geoPoint.getGeometry().getNormal(pointGeo);\n\n Material material = geoPoint.getGeometry().getMaterial();\n int nShininess = material.getnShininess();\n double kd = material.getkD();\n double ks = material.getkS();\n double kr = geoPoint.getGeometry().getMaterial().getkR();//each time gets the amount of mirror in the object.\n double kt = geoPoint.getGeometry().getMaterial().getkT();//each time gets the amount of transparent in the object.\n double kkr = k * kr;//if kr/kt was small so it will smaller the kkr/kkt before we send to the function again.\n double kkt = k * kt;\n\n List<LightSource> lightSources = scene.getLightSources();\n if (lightSources != null) {\n for (LightSource light : lightSources) {//for each light will check\n Vector l = light.getL(pointGeo);//L=the vector from light to point\n double nl = alignZero(n.dotProduct(l));\n double nv = alignZero(n.dotProduct(v));\n if (nl * nv > 0) {\n /**how much shakof are all the objects between the light in the point. it can reduce the impact ot the light\n * if there is no objects it will return 1. ktr*1=the same. no change.\n * even if one is (atum) so it will block the light.\n * and then will add the color with a (mekadem)that can make smaller the\n * impact of the light because there are objects that are not so shakoof and disturb the color*/\n double t = transparency(light, l, n, geoPoint);\n if (t * k > MIN_CALC_COLOR_K) {\n Color ip = light.getIntensity(pointGeo).scale(t);\n result = result.add(calcDiffusive(kd, nl, ip), calcSpecular(ks, l, n, nl, v, nShininess, ip));\n }\n }\n }\n }\n\n if (level == 1) {//Stop condition .we went a enough far away from the point\n return Color.BLACK;\n }\n\n /**A nother Stop condition.\n * if we in ecounterend a object with very little mirror so it smallered the kkr.\n * will check if the (mekadem), is still higher then the min number*/\n if (kkr > MIN_CALC_COLOR_K) {\n Ray reflectedRay = constructReflectedRay(pointGeo, inRay, n);\n GeoPoint reflectedPoint = findClosestIntersection(reflectedRay);\n if (reflectedPoint != null) {\n result = result.add(calcColor(reflectedPoint, reflectedRay, level - 1, kkr).scale(kr));\n }\n }\n if (kkt > MIN_CALC_COLOR_K) {//if the shkefut of the number is still high\n Ray refractedRay = constructRefractedRay(pointGeo, inRay, n);//so will send a ray from the knew object.\n GeoPoint refractedPoint = findClosestIntersection(refractedRay);//ho is the point you got\n if (refractedPoint != null) {//if you got a point lets send that point again to see if he also is impacted.\n result = result.add(calcColor(refractedPoint, refractedRay, level - 1, kkt).scale(kt));\n }\n }\n return result;//returns the color that will be added to the point.\n }", "public boolean hasIntersectionRay(Line3D line) {\n List<Point3D> list = new ArrayList();\n /*for (Face3D face : faces)\n if (face.intersectionRay(line, list) > 0)\n return true;*/\n return false;\n }", "private double transparency(LightSource light, Vector l, Vector n, GeoPoint geopoint) {\n Vector lightDirection = l.scale(-1); // switch to the opposite side from point to light source\n Ray lightRay = new Ray(geopoint.getPoint(), lightDirection, n);//build the Ray raised from the point.\n Point3D pointGeo = geopoint.getPoint();//the point.\n\n /**if the ray from point did not find eny objects so it will bring back 1=no change. do not reduse the impact of the light*/\n List<GeoPoint> intersections = null;\n intersections = scene.getGeometries().findGeoIntersections(lightRay);\n if (intersections == null) {\n return 1d;//all lights impact and go throw. there is no change.\n }\n double lightDistance = light.getDistance(pointGeo);\n double ktr = 1d;\n for (GeoPoint gp : intersections) {//adds all the objects that are in the middle in terms of their transparency.\n if (alignZero(gp.getPoint().distance(pointGeo) - lightDistance) <= 0) {\n ktr *= gp.getGeometry().getMaterial().getkT();\n if (ktr < MIN_CALC_COLOR_K) {//if that specific object is atum so it will return 0.\n return 0.0;\n }\n }\n }\n return ktr;//how much shakoof are all the different objects between the light to the point.\n }", "@Override\n ArrayList<Hit> object_hit_detec(Point S_t, Vector c_t, Intersection intersection) {\n ArrayList<Hit> hit_times = new ArrayList<>();\n double A = Math.pow(c_t.get_X(), 2) + Math.pow(c_t.get_Y(), 2) + Math.pow(c_t.get_Z(), 2);\n double B = c_t.get_X() * S_t.get_X() + c_t.get_Y() * S_t.get_Y() + c_t.get_Z() * S_t.get_Z();\n double C = Math.pow(S_t.get_X(), 2) + Math.pow(S_t.get_Y(), 2) + Math.pow(S_t.get_Z(), 2) - 1;\n double Discriminant = Math.pow(B, 2) - A * C;\n// System.out.println(A);\n// System.out.println(B);\n// System.out.println(C);\n //double t_hit = 0;\n if (Discriminant < 0) {\n //System.out.println(\"Geen hitpunten\");\n } else if (Discriminant == 0) {\n double t_hit = (-B) / A;\n Hit hit = new Hit(t_hit, false);\n //System.out.println(\"hit\");\n } else {\n double t_hit1 = (-B) / A + Math.sqrt(Discriminant) / A;\n double t_hit2 = (-B) / A - Math.sqrt(Discriminant) / A;\n //Find lowest hit time (for entering hit time)\n double t_in = Math.min(t_hit1, t_hit2);\n double t_out = Math.max(t_hit1, t_hit2);\n Hit hit_in = new Hit(t_in, true);\n hit_times.add(hit_in);\n Hit hit_out = new Hit(t_out, false);\n hit_times.add(hit_out);\n //t_hit = Math.min(t_hit1, t_hit2);\n //System.out.println(\"hit\");\n }\n return hit_times;\n }", "public boolean intersect(IntersectionRecord outRecord, Ray rayIn) {\n\t// TODO: Process rayIn so that it is in the same coordinates as the object.\n // This should be a single line.\n\trayIn = untransformRay(rayIn);\n Ray ray = rayIn;\n\n // Rename the common vectors so I don't have to type so much\n Vector3 d = ray.direction;\n Point3 c = center;\n Point3 o = ray.origin;\n\n double tMin = ray.start, tMax = ray.end;\n // Compute some factors used in computation\n double qx = o.x - c.x;\n double qy = o.y - c.y;\n //double qz = o.z - c.z;\n double rr = radius * radius;\n\n double dd = d.x * d.x + d.y *d.y;\n double qd = d.x * qx + d.y * qy;\n double qq = qx * qx + qy * qy;\n\n double t = 0, td1=0, td2=0;\n double zMin = c.z - height/2;\n double zMax = c.z + height/2;\n\n // z-plane cap calculations\n if (d.z >= 0) {\n td1 = (zMin- o.z) / d.z;\n td2 = (zMax - o.z) / d.z;\n }\n else {\n td1 = (zMax - o.z) / d.z;\n td2 = (zMin - o.z) / d.z;\n }\n if (tMin > td2 || td1 > tMax)\n return false;\n if (td1 > tMin)\n tMin = td1;\n if (td2 < tMax)\n tMax = td2;\n\n // solving the quadratic equation for t at the pts of intersection\n // dd*t^2 + (2*qd)*t + (qq-r^2) = 0\n double discriminantsqr = (qd * qd - dd * (qq - rr));\n\n // If the discriminant is less than zero, there is no intersection\n if (discriminantsqr < 0) {\n return false;\n }\n\n // Otherwise check and make sure that the intersections occur on the ray (t\n // > 0) and return the closer one\n double discriminant = Math.sqrt(discriminantsqr);\n double t1 = (-qd - discriminant) / dd;\n double t2 = (-qd + discriminant) / dd;\n\n if (t1 > ray.start && t1 < ray.end) {\n t = t1;\n }\n else if (t2 > ray.start && t2 < ray.end) {\n t = t2;\n }\n\n Point3 thit1 = new Point3(0,0,0); \n ray.evaluate(thit1, tMin);\n Point3 thit2 = new Point3(0,0,0); \n ray.evaluate(thit2, tMax);\n\n double dx1 = thit1.x-c.x; \n double dy1 = thit1.y-c.y; \n double dx2 = thit2.x-c.x; \n double dy2 = thit2.y-c.y; \n\n if ((t < tMin || t > tMax) && dx1 * dx1 + dy1 * dy1 > rr && dx2 * dx2 + dy2 * dy2 > rr) {\n return false;\n }\n\n // There was an intersection, fill out the intersection record\n if (outRecord != null) {\n double tside =Math.min( td1, td2);\n\n if (t <tside) {\n outRecord.t = tside;\n ray.evaluate(outRecord.location, tside);\n outRecord.normal.set(0, 0, 1);\n }\n else {\n outRecord.t = t;\n ray.evaluate(outRecord.location, t);\n outRecord.normal.sub(new Point3(outRecord.location.x,outRecord.location.y,0), new Point3(c.x,c.y,0));\n }\n\n if (outRecord.normal.dot(ray.direction) > 0)\n outRecord.normal.scale(-1);\n\n outRecord.surface = this;\n // TODO: Transform the location and normal back into world coordinates.\n // Transform the location by tMat\n tMat.rightMultiply(outRecord.location);\n // Transform the normal by tMatTInv\n tMatTInv.rightMultiply(outRecord.normal);\n \n outRecord.normal.normalize();\n }\n\n return true;\n }", "public HitRecord hit(Ray ray, float tmin, float tmax) {\n Vector3f origin = ray.getOrigin();\n Vector3f direction = ray.getDirection();\n\t\tVector3f temp = new Vector3f(origin.x - center.x, origin.y - center.y, origin.z - center.z);\n //Calculate quadratic variables (a*t^2 + b*t + t = r^2)\n float a = direction.dot(direction);\n float b = 2.0f * temp.dot(direction);\n float c = temp.dot(temp) - radius * radius;\n float discriminant = (float) (b * b - 4 * a * c);\n\t\tif (discriminant <= 0.f) {\n return null;\n }\n\t\tdouble t = ((b * -1) - Math.sqrt(discriminant)) / (2 * a);\n\t\tif (t < tmin)\n t = ((b * -1) + Math.sqrt(discriminant)) / (2 * a);\n /* if t out of range, return null */\n if (t < tmin || t > tmax)\t\n return null;\n\t\t/* construct hit record */\n\t\tHitRecord rec = new HitRecord();\n\t\trec.pos = ray.pointAt((float) t);\t\t// position of hit point\n\t\trec.t = (float) t;\t\t\t\t\t\t// parameter t (distance along the ray)\n\t\trec.material = material;\t\t// material\n\t\trec.normal = new Vector3f(origin.x + (float) (t * direction.x) - center.x, origin.y + (float) (t * direction.y) - center.y, origin.z + (float) (t * direction.z) - center.z);\n rec.normal.normalize();\t\t\t// normal should be normalized\n\t\treturn rec;\n\t}", "@Test\n public void nearestObjectHighlighted() {\n radar.loop();\n assertTrue(world.getPasslist().get(0).isHighlightedWhenRadarIsOn());\n }", "public double rayIntersect(Vector3D rayOrigin, Vector3D rayDirection, boolean goingOut, int[] faceIndex, LinkedTransferQueue simVis) {\n double tmin = -1;\n int x = 0;\n int y = 1;\n int z = 2;\n int face = -1;\n if (java.lang.Math.abs(rayDirection.getNorm() - 1) > 1e-8) {\n System.out.println(\"direction not normalized in rayIntersect\");\n }\n\n double ox = rayOrigin.getX();\n double oy = rayOrigin.getY();\n double oz = rayOrigin.getZ();\n\n double dx = rayDirection.getX();\n double dy = rayDirection.getY();\n double dz = rayDirection.getZ();\n\n cacheVerticesAndFaces();\n// System.out.println(\"Checking part\" + this.part.name);\n int vis = this.mesh.getVertexFormat().getVertexIndexSize();\n\n for (int i = 0; i < faces.length; i += 6) {\n double t = Util.Math.rayTriangleIntersect(ox, oy, oz, dx, dy, dz,\n vertices[3 * faces[i] + x], vertices[3 * faces[i] + y], vertices[3 * faces[i] + z],\n goingOut ? vertices[3 * faces[i + 2 * vis] + x] : vertices[3 * faces[i + vis] + x],\n goingOut ? vertices[3 * faces[i + 2 * vis] + y] : vertices[3 * faces[i + vis] + y],\n goingOut ? vertices[3 * faces[i + 2 * vis] + z] : vertices[3 * faces[i + vis] + z],\n goingOut ? vertices[3 * faces[i + vis] + x] : vertices[3 * faces[i + 2 * vis] + x],\n goingOut ? vertices[3 * faces[i + vis] + y] : vertices[3 * faces[i + 2 * vis] + y],\n goingOut ? vertices[3 * faces[i + vis] + z] : vertices[3 * faces[i + 2 * vis] + z]\n );\n if (t != -1) {\n if (tmin != -1) {\n if (t < tmin) {\n tmin = t;\n face = i;\n }\n } else {\n tmin = t;\n face = i;\n }\n }\n }\n // report back the face index if asked for\n if (faceIndex != null) {\n faceIndex[0] = face;\n }\n\n return tmin;\n }", "public Hit hit (final Ray r) {\n\n final double a;\n final double b;\n final double cNor;\n final double t1;\n final double t2;\n final double d;\n final Point3 p;\n\n b = r.d.dot((r.o.sub(c)).mul(2));\n a = r.d.dot(r.d);\n cNor = r.o.sub(c).dot(r.o.sub(c))-(this.r*this.r);\n d = (b * b) - (4 * a * cNor);\n\n if(d > 0) {\n\n t1 = (-b + Math.sqrt(d)) / (2 * a);\n t2 = (-b - Math.sqrt(d)) / (2 * a);\n\n if (t1 >= 0 & t2 >= 0) {\n\n p = r.at(Math.min(t1, t2));\n\n return new Hit(Math.min(t1, t2), r, this,p.sub(c).normalized().asNormal(),texFor(p) );\n\n }else if (t1 >= 0){\n\n return new Hit(t1,r,this, r.at(t1).sub(c).normalized().asNormal(),texFor(r.at(t1)));\n\n }else if(t2 >= 0) {\n\n return new Hit(t2, r, this, r.at(t2).sub(c).normalized().asNormal(),texFor(r.at(t2)));\n }\n }else if (d == 0){\n\n final double t3;\n t3 = -b / (2 * a);\n\n if (t3 >= 0){\n\n return new Hit(t3, r, this, r.at(t3).sub(c).normalized().asNormal(), texFor(r.at(t3)));\n\n }\n }\n\n return null;\n }", "private void solveIntersectionPoints() {\n\t\tRadialGauge gauge = getMetricsPath().getBody().getGauge();\n\n\t\t// define first circle which is gauge outline circle\n\t\tx0 = gauge.getCenterDevice().getX();\n\t\ty0 = gauge.getCenterDevice().getY();\n\t\tr0 = gauge.getRadius();\n\t\tarc0 = new Arc2D.Double(x0 - r0, y0 - r0, 2 * r0, 2 * r0, 0, 360, Arc2D.OPEN);\n\n\t\t// define the second circle with given parameters\n\t\tx1 = x0 + polarRadius * Math.cos(Math.toRadians(polarDegree));\n\t\ty1 = y0 - polarRadius * Math.sin(Math.toRadians(polarDegree));\n\t\tr1 = radius;\n\n\t\tarc1 = new Arc2D.Double(x1 - r1, y1 - r1, 2 * r1, 2 * r1, 0, 360, Arc2D.OPEN);\n\n\t\tif (polarDegree != 0 && polarDegree != 180) {\n\t\t\t// Ax²+Bx+B = 0\n\t\t\tdouble N = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0 - y1 * y1 + y0 * y0) / (2 * (y0 - y1));\n\t\t\tdouble A = Math.pow((x0 - x1) / (y0 - y1), 2) + 1;\n\t\t\tdouble B = 2 * y0 * (x0 - x1) / (y0 - y1) - 2 * N * (x0 - x1) / (y0 - y1) - 2 * x0;\n\t\t\tdouble C = x0 * x0 + y0 * y0 + N * N - r0 * r0 - 2 * y0 * N;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = (-B - delta) / (2 * A);\n\t\t\t\tdouble p1y = N - p1x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = (-B + delta) / (2 * A);\n\t\t\t\tdouble p2y = N - p2x * (x0 - x1) / (y0 - y1);\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t} else if (polarDegree == 0 || polarDegree == 180) {\n\t\t\t// polar degree = 0|180 -> y0=y1\n\t\t\t// Ay²+By + C = 0;\n\t\t\tdouble x = (r1 * r1 - r0 * r0 - x1 * x1 + x0 * x0) / (2 * (x0 - x1));\n\t\t\tdouble A = 1;\n\t\t\tdouble B = -2 * y1;\n\t\t\tdouble C = x1 * x1 + x * x - 2 * x1 * x + y1 * y1 - r1 * r1;\n\t\t\tdouble delta = Math.sqrt(B * B - 4 * A * C);\n\n\t\t\tif (delta < 0) {\n\t\t\t\t//System.out.println(\"no solution\");\n\t\t\t} else if (delta >= 0) {\n\n\t\t\t\t// p1\n\t\t\t\tdouble p1x = x;\n\t\t\t\tdouble p1y = (-B - delta) / 2 * A;\n\t\t\t\tintersectionPointStart = new Point2D.Double(p1x, p1y);\n\n\t\t\t\t// p2\n\t\t\t\tdouble p2x = x;\n\t\t\t\tdouble p2y = (-B + delta) / 2 * A;\n\t\t\t\tintersectionPointEnd = new Point2D.Double(p2x, p2y);\n\n\t\t\t\ttheta1Radian1 = getPolarAngle(x1, y1, p1x, p1y);\n\t\t\t\ttheta1Radian2 = getPolarAngle(x1, y1, p2x, p2y);\n\n\t\t\t}\n\t\t}\n\t}", "@Test\n public void findClosestPointTest() {\n Ray ray = new Ray(new Point3D(0, 0, 10), new Vector(1, 10, -100));\n\n List<Point3D> list = new LinkedList<Point3D>();\n list.add(new Point3D(1, 1, -100));\n list.add(new Point3D(-1, 1, -99));\n list.add(new Point3D(0, 2, -10));\n list.add(new Point3D(0.5, 0, -100));\n\n assertEquals(list.get(2), ray.findClosestPoint(list));\n\n // =============== Boundary Values Tests ==================\n //TC01: the list is empty\n List<Point3D> list2 = null;\n assertNull(\"try again\",ray.findClosestPoint(list2));\n\n //TC11: the closest point is the first in the list\n List<Point3D> list3 = new LinkedList<Point3D>();\n list3.add(new Point3D(0, 2, -10));\n list3.add(new Point3D(-1, 1, -99));\n list3.add(new Point3D(1, 1, -100));\n list3.add(new Point3D(0.5, 0, -100));\n assertEquals(list3.get(0), ray.findClosestPoint(list3));\n\n //TC12: the closest point is the last in the list\n List<Point3D> list4 = new LinkedList<Point3D>();\n list4.add(new Point3D(1, 1, -100));\n list4.add(new Point3D(0.5, 0, -100));\n list4.add(new Point3D(-1, 1, -99));\n list4.add(new Point3D(0, 2, -10));\n assertEquals(list4.get(3), ray.findClosestPoint(list4));\n\n }", "@InterestingAlgorithm\r\n public Object lineIntersect (Line2D l1, Line2D l2) {\r\n if (l1 == null || l2 == null)\r\n return (null);\r\n\r\n double slope1 = l1.getA();\r\n double slope2 = l2.getA();\r\n\r\n double offset1 = l1.getB();\r\n double offset2 = l2.getB();\r\n\r\n if (MathUtils.closeEnough(slope1, slope2)) {\r\n if (MathUtils.closeEnough(offset1, offset2))\r\n return (l1); // same\r\n else\r\n return (null); // parallel\r\n }\r\n\r\n Point2D point = new Point2D.Double((offset2 - offset1) / (slope1 - slope2), (slope1 * offset2 - slope2 * offset1) / (slope1 - slope2));\r\n\r\n return (point);\r\n }", "public native void raycast(Raycaster raycaster, Object[] intersects);", "@Override\n public boolean\n doIntersection(Ray inOut_Ray) {\n // TODO!\n return false;\n }", "public void addNode()\r\n\t{\r\n\t\tArrayList<PolygonD> objectsInScene = new ArrayList<PolygonD>();\r\n\t\tobjectsInScene.addAll(objects);\r\n\t\tobjectsInScene.add(currentShape);\r\n\t\t\r\n\t\tPointD mousePoint = new PointD(lastPointOnScreen); \r\n\t\tmousePoint.setX(mousePoint.getX() - worldCenter.getX());\r\n\t\tmousePoint.setY(mousePoint.getY() - worldCenter.getY());\r\n\t\t\r\n\t\tPolygonD nearestObject = null;\r\n\t\tDouble minDistance = 100.;//threshold for adding points\r\n\t\tint pointIndex = 0;\r\n\t\tfor(PolygonD obj : objectsInScene)\r\n\t\t\tif(obj.getVerts().size()>0){\r\n\t\t\t\tPointD p = obj.getVert(0);\r\n\t\t\t\tfor(int i = 1; i < obj.getVerts().size(); i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(\"i = \"+i);\r\n\t\t\t\t\tDouble d = distanceToLine(new Vector(p, obj.getVert(i)), mousePoint);\r\n\t\t\t\t\tSystem.out.println(\"d = \"+d);\r\n\t\t\t\t\tif(d != null && d < minDistance)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(d + \"<\"+ minDistance);\r\n\t\t\t\t\t\tnearestObject = obj;\r\n\t\t\t\t\t\tminDistance = d;\r\n\t\t\t\t\t\tpointIndex = i;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tSystem.out.println(d + \">=\"+ minDistance);\r\n\t\t\t\t\tp = obj.getVert(i);\r\n\t\t\t\t}\r\n\t\t\t\t//handle last side\r\n\t\t\t\tDouble d = distanceToLine(new Vector(obj.getVert(0), obj.getVert(obj.getVerts().size()-1)), mousePoint);\r\n\t\t\t\tif(d != null && d < minDistance)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.println(d + \"<\"+ minDistance);\r\n\t\t\t\t\tnearestObject = obj;\r\n\t\t\t\t\tminDistance = d;\r\n\t\t\t\t\tpointIndex = obj.getVerts().size();\r\n\t\t\t\t\tSystem.out.println(\"i = \"+pointIndex);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.println(d + \">=\"+ minDistance);\r\n\t\t\t}\r\n\t\tSystem.out.println(\"minDistance \"+minDistance +\" pointIndex = \"+pointIndex);\r\n\r\n\t\tif(nearestObject != null)\r\n\t\t{\r\n\t\t\tnearestObject.getVerts().add(pointIndex, mousePoint);\r\n\t\t\tSystem.out.println(nearestObject);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tcurrentShape.add(mousePoint);\r\n\t\t}\r\n\t}", "public static float intersectRayOnLine(PointF rayPos, PointF rayDir,\n PointF line0, PointF line1){\n PointF v1 = Vec2D.subtract(rayPos, line0);\n PointF v2 = Vec2D.subtract(line1, line0);\n PointF v3 = Vec2D.perpendicular(rayDir);\n\n return Vec2D.dot(v1, v3) / Vec2D.dot(v2, v3);\n }", "public Point3 intersects(Plane3 p) {\n // All the constants will be the position vector, i.e., some point on the line\n if (intersect.DEBUG) System.out.println(\"Constant Terms: <\" + this.pt + \">\");\n\n // λ coefficients will be all those in the direction vector of the line\n if (intersect.DEBUG) System.out.println(\"λ coefficients: \" + this);\n\n // Plane equation is each component multiplied by the respective normal\n // vector of the plane\n if (intersect.DEBUG) System.out.printf(\"Plane equation: %.1f(%.1f + %.1fλ) + %.1f(%.1f + %.1fλ) + %.1f(%.1f + %.1fλ) = %.3f\\n\", p.v.x, pt.x, this.x, p.v.y, pt.y, this.y, p.v.z, pt.z, this.z, p.d);\n\n // Gather all constant terms from the plane equation\n double constantTerm = (p.v.x * pt.x) + (p.v.y * pt.y) + (p.v.z * pt.z);\n if (intersect.DEBUG) System.out.printf(\"K: %.2f\\t\", constantTerm);\n\n // Gather all λ terms\n double lambdaCoefficient = (p.v.x * this.x) + (p.v.y * this.y) + (p.v.z * this.z);\n if (intersect.DEBUG) System.out.printf(\"K_λ: %.1f\\n\", lambdaCoefficient);\n\n // If the coefficient for lambda is zero, we have a degenerate case\n if (lambdaCoefficient == 0) {\n // If the constant is the same as the actual magnitude of the plane's\n // normal vector, the line lies on the plane\n // Within a margin of error because rounding is a pain in the ass\n if (Math.abs(constantTerm - p.d) < 1e-6)\n intersect.overlapFlag = true;\n\n return null;\n }\n\n // Solve for the unknown, λ.\n double lambda = (p.d - constantTerm) / lambdaCoefficient;\n if (intersect.DEBUG) System.out.printf(\"λ: %.2f\\n\", lambda);\n\n // Plug in λ into the parametric equations for the line to find\n // point of intersection\n double newX = lambda * this.x + pt.x;\n double newY = lambda * this.y + pt.y;\n double newZ = lambda * this.z + pt.z;\n return new Point3(newX, newY, newZ);\n }", "Light getEWlight();", "public List<Vec3> getIntersectionPoints(Vec3 org, Vec3 ray)\n {\n Mat4 mInv = m.getInverseSimple();\n ray = mInv.multiply(ray.toDirection()).getXYZ();\n org = mInv.multiply(org.toPoint()).getXYZ();\n\n Vec3 mext = extents.getNegated();\n ArrayList<Vec3> ps = new ArrayList<Vec3>();\n for (int i = 0; i < 3; i++)\n {\n if (org.get(i) >= extents.get(i))\n {\n if (ray.get(i) >= 0)\n {\n return new ArrayList<Vec3>(); // ray points away from box\n }\n ps.addAll(lineIntersection(i, org, ray, extents));\n } else if (org.get(i) <= mext.get(i))\n {\n if (ray.get(i) <= 0)\n {\n return new ArrayList<Vec3>(); // ray points away from box\n }\n ps.addAll(lineIntersection(i, org, ray, mext));\n }\n }\n return ps;\n }", "private primitives.Color AdaptiveDiffusedAndGlossyRec(Point3D centerP, double WidthAndHeight, double minCubeSize, Point3D pIntersection,Vector Vright,Vector Vup , Vector normal, int direction, int level , double k, double ktr, List<Point3D> prePoints) throws Exception {\r\n List<Point3D> nextCenterPList = new LinkedList<Point3D>();\r\n List<Point3D> cornersList = new LinkedList<Point3D>();\r\n List<primitives.Color> colorList = new LinkedList<primitives.Color>();\r\n Point3D tempCorner;\r\n GeoPoint gp;\r\n Ray tempRay;\r\n for (int i = -1; i <= 1; i += 2)\r\n for (int j = -1; j <= 1; j += 2) {\r\n tempCorner = centerP.add(Vright.scale(i * WidthAndHeight / 2)).add(Vup.scale(j * WidthAndHeight / 2));\r\n cornersList.add(tempCorner);\r\n if (prePoints == null || !isInList(prePoints, tempCorner)) {\r\n tempRay = new Ray(pIntersection, tempCorner.subtract(pIntersection), normal);\r\n if ((normal.dotProduct(tempRay.getDir()) < 0 && direction == 1) || (normal.dotProduct(tempRay.getDir()) > 0 && direction == -1)) {\r\n nextCenterPList.add(centerP.add(Vright.scale(i * WidthAndHeight / 4)).add(Vup.scale(j * WidthAndHeight / 4)));\r\n gp = findClosestIntersection(tempRay);\r\n if (gp == null)\r\n colorList.add(scene.background);\r\n else {\r\n colorList.add(calcColor(gp, tempRay, level - 1, k));\r\n } \r\n }\r\n \r\n }\r\n }\r\n\r\n if (nextCenterPList == null || nextCenterPList.size() == 0) {\r\n return primitives.Color.BLACK;\r\n }\r\n\r\n\r\n if (WidthAndHeight < minCubeSize * 2) {\r\n primitives.Color sumColor = primitives.Color.BLACK;\r\n for (primitives.Color color : colorList) {\r\n sumColor = sumColor.add(color);\r\n }\r\n return sumColor.reduce(colorList.size());\r\n }\r\n\r\n\r\n boolean isAllEquals = true;\r\n primitives.Color tempColor = colorList.get(0);\r\n for (primitives.Color color : colorList) {\r\n if (!tempColor.isAlmostEquals(color))\r\n isAllEquals = false;\r\n }\r\n if (isAllEquals && colorList.size() > 1)\r\n return tempColor;\r\n\r\n\r\n tempColor = primitives.Color.BLACK;\r\n for (Point3D center : nextCenterPList) {\r\n tempColor = tempColor.add(AdaptiveDiffusedAndGlossyRec(center, WidthAndHeight / 2, minCubeSize, pIntersection, Vright, Vup, normal, direction, level, k, ktr, cornersList));\r\n }\r\n return tempColor.reduce(nextCenterPList.size());\r\n }", "public Vector traceRay(Ray ray, int bounces) {\n\t\t\n\t\t/* Terminate after too many bounces. */\n\t\tif(bounces > this.numBounces)\n\t\t\treturn new Vector(0.0, 0.0, 0.0);\n\t\t\n\t\t/* Trace ray. */\n\t\tObjectHit hit = getHit(ray);\n\n\t\tif(hit.hit) {\n\t\t\t\n\t\t\t/* Light emitted by the hit location. */\n\t\t\tVector color = hit.material.getEmission(hit.textureCoordinates.x, hit.textureCoordinates.y);\n\t\t\t\n\t\t\t/* Light going into the hit location. */\n\t\t\tVector incoming = new Vector(0.0, 0.0, 0.0);\n\t\t\t\n\t\t\t/* Do secondary rays. */\n\t\t\tVector selfColor = hit.material.getColor(hit.textureCoordinates.x, hit.textureCoordinates.y);\n\t\t\tdouble diffuseness = hit.material.getDiffuseness();\n\t\t\t\n\t\t\tfor(int i = 0; i < this.numSecondaryRays; i++) {\n\n\t\t\t\tRay newRay = new Ray(hit.hitPoint, new Vector(0.0, 0.0, 0.0));\n\t\t\t\t\t\t\n\t\t\t\tVector diffuseSample = new Vector(0.0, 0.0, 0.0);\n\t\t\t\tVector specularSample = new Vector(0.0, 0.0, 0.0);\n\t\t\t\t\n\t\t\t\tif(diffuseness > 0.0) {\n\t\t\t\t\tVector diffuseVector = Material.getDiffuseVector(hit.normal);\n\t\t\t\t\tnewRay.direction = diffuseVector;\n\t\t\t\t\tdiffuseSample = traceRay(newRay, bounces + 1);\n\t\t\t\t\tdiffuseSample = diffuseSample.times(diffuseVector.dot(hit.normal)).times(selfColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(diffuseness < 1.0) {\n\t\t\t\t\tVector specularVector = Material.getReflectionVector(hit.normal, ray.direction, hit.material.getGlossiness());\n\t\t\t\t\tnewRay.direction = specularVector;\n\t\t\t\t\tspecularSample = traceRay(newRay, bounces + 1);\n\t\t\t\t\t\n\t\t\t\t\tif(!hit.material.isPlastic())\n\t\t\t\t\t\tspecularSample = specularSample.times(selfColor);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tVector total = diffuseSample.times(hit.material.getDiffuseness()).plus(specularSample.times(1 - hit.material.getDiffuseness()));\n\t\t\t\tincoming = incoming.plus(total);\n\t\t\t}\n\t\t\t\n\t\t\tincoming = incoming.divBy(this.numSecondaryRays);\n\t\t\treturn color.plus(incoming);\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t/* If the ray missed return the ambient color. */\n\t\t\tVector d = new Vector(0.0, 0.0, 0.0).minus(ray.direction);\n\t\t\tdouble u = 0.5 + Math.atan2(d.z, d.x) / (2 * Math.PI);\n\t\t\tdouble v = 0.5 - Math.asin(d.y) / Math.PI;\n\t\t\t\n\t\t\treturn skyMaterial.getColor(u, v).times(255).plus(skyMaterial.getEmission(u, v));\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n public int octree_function(Object... obj) //public static int\n //o_sphere(\t\t\t/* compute intersection with sphere */\n //\tOBJECT.OBJREC so,\n //\tRAY r\n //)\n {\n OBJECT.OBJREC so = (OBJECT.OBJREC) obj[0];\n RAY r = (RAY) obj[1];\n double a, b, c;\t/* coefficients for quadratic equation */\n double[] root = new double[2];\t/* quadratic roots */\n int nroots;\n double t = 0;\n double[] ap;\n int i;\n\n if (so.oargs.nfargs != 4) {\n//\t\tobjerror(so, USER, \"bad # arguments\");\n }\n ap = so.oargs.farg;\n if (ap[3] < -FVECT.FTINY) {\n//\t\tobjerror(so, WARNING, \"negative radius\");\n so.otype = (short) (so.otype == OTYPES.OBJ_SPHERE\n ? OTYPES.OBJ_BUBBLE : OTYPES.OBJ_SPHERE);\n ap[3] = -ap[3];\n } else if (ap[3] <= FVECT.FTINY) {\n//\t\tobjerror(so, USER, \"zero radius\");\n }\n /*\n *\tWe compute the intersection by substituting into\n * the surface equation for the sphere. The resulting\n * quadratic equation in t is then solved for the\n * smallest positive root, which is our point of\n * intersection.\n *\tSince the ray is normalized, a should always be\n * one. We compute it here to prevent instability in the\n * intersection calculation.\n */\n /* compute quadratic coefficients */\n a = b = c = 0.0;\n for (i = 0; i < 3; i++) {\n a += r.rdir.data[i] * r.rdir.data[i];\n t = r.rorg.data[i] - ap[i];\n b += 2.0 * r.rdir.data[i] * t;\n c += t * t;\n }\n c -= ap[3] * ap[3];\n\n nroots = ZEROES.quadratic(root, a, b, c);\t/* solve quadratic */\n\n for (i = 0; i < nroots; i++) /* get smallest positive */ {\n if ((t = root[i]) > FVECT.FTINY) {\n break;\n }\n }\n if (i >= nroots) {\n return (0);\t\t\t/* no positive root */\n }\n\n if (t >= r.rot) {\n return (0);\t\t\t/* other is closer */\n }\n\n r.ro = so;\n r.rot = t;\n /* compute normal */\n a = ap[3];\n if (so.otype == OTYPES.OBJ_BUBBLE) {\n a = -a;\t\t\t/* reverse */\n }\n for (i = 0; i < 3; i++) {\n r.rop.data[i] = r.rorg.data[i] + r.rdir.data[i] * t;\n r.ron.data[i] = (r.rop.data[i] - ap[i]) / a;\n }\n r.rod = -FVECT.DOT(r.rdir, r.ron);\n r.rox = null;\n r.pert.data[0] = r.pert.data[1] = r.pert.data[2] = 0.0;\n r.uv[0] = r.uv[1] = 0.0;\n\n return (1);\t\t\t/* hit */\n }", "static boolean findBridge(Triangulator triRef, int ind, int i, int start,\n\t\t\t int[] ind1, int[] i1) {\n\tint i0, i2, j, numDist = 0;\n\tint ind0, ind2;\n\tBBox bb;\n\tDistance old[] = null;\n\tboolean convex, coneOk;\n\n\t// sort the points according to their distance from start.\n\tind1[0] = ind;\n\ti1[0] = i;\n\tif (i1[0] == start) return true;\n\tif (numDist >= triRef.maxNumDist) {\n\t // System.out.println(\"(1) Expanding distances array ...\");\n\t triRef.maxNumDist += triRef.INC_DIST_BK;\n\t old = triRef.distances;\n\t triRef.distances = new Distance[triRef.maxNumDist];\n\t System.arraycopy(old, 0, triRef.distances, 0, old.length);\n\t for (int k = old.length; k < triRef.maxNumDist; k++)\n\t\ttriRef.distances[k] = new Distance();\n\t}\n\n\ttriRef.distances[numDist].dist = Numerics.baseLength(triRef.points[start],\n\t\t\t\t\t\t\t triRef.points[i1[0]]);\n\ttriRef.distances[numDist].ind = ind1[0];\n\t++numDist;\n\n\n\tind1[0] = triRef.fetchNextData(ind1[0]);\n\ti1[0] = triRef.fetchData(ind1[0]);\n\twhile (ind1[0] != ind) {\n\t if (i1[0] == start) return true;\n\t if (numDist >= triRef.maxNumDist) {\n\t\t// System.out.println(\"(2) Expanding distances array ...\");\n\t\ttriRef.maxNumDist += triRef.INC_DIST_BK;\n\t\told = triRef.distances;\n\t\ttriRef.distances = new Distance[triRef.maxNumDist];\n\t\tSystem.arraycopy(old, 0, triRef.distances, 0, old.length);\n\t\tfor (int k = old.length; k < triRef.maxNumDist; k++)\n\t\t triRef.distances[k] = new Distance();\n\t }\n\n\t triRef.distances[numDist].dist = Numerics.baseLength(triRef.points[start],\n\t\t\t\t\t\t\t\t triRef.points[i1[0]]);\n\t triRef.distances[numDist].ind = ind1[0];\n\t ++numDist;\n\t ind1[0] = triRef.fetchNextData(ind1[0]);\n\t i1[0] = triRef.fetchData(ind1[0]);\n\t}\n\n\t// qsort(distances, num_dist, sizeof(distance), &d_comp);\n\tsortDistance(triRef.distances, numDist);\n\n\t// find a valid diagonal. note that no node with index i1 > start can\n\t// be feasible!\n\tfor (j = 0; j < numDist; ++j) {\n\t ind1[0] = triRef.distances[j].ind;\n\t i1[0] = triRef.fetchData(ind1[0]);\n\t if (i1[0] <= start) {\n\t\tind0 = triRef.fetchPrevData(ind1[0]);\n\t\ti0 = triRef.fetchData(ind0);\n\t\tind2 = triRef.fetchNextData(ind1[0]);\n\t\ti2 = triRef.fetchData(ind2);\n\t\tconvex = triRef.getAngle(ind1[0]) > 0;\n\n\t\tconeOk = Numerics.isInCone(triRef, i0, i1[0], i2, start, convex);\n\t\tif (coneOk) {\n\t\t bb = new BBox(triRef, i1[0], start);\n\t\t if (!NoHash.noHashEdgeIntersectionExists(triRef, bb, -1, -1, ind1[0], -1))\n\t\t\treturn true;\n\t\t}\n\t }\n\t}\n\n\t// the left-most point of the hole does not lie within the outer\n\t// boundary! what is the best bridge in this case??? I make a\n\t// brute-force decision... perhaps this should be refined during a\n\t// revision of the code...\n\tfor (j = 0; j < numDist; ++j) {\n\t ind1[0] = triRef.distances[j].ind;\n\t i1[0] = triRef.fetchData(ind1[0]);\n\t ind0 = triRef.fetchPrevData(ind1[0]);\n\t i0 = triRef.fetchData(ind0);\n\t ind2 = triRef.fetchNextData(ind1[0]);\n\t i2 = triRef.fetchData(ind2);\n\t bb = new BBox(triRef, i1[0], start);\n\t if (!NoHash.noHashEdgeIntersectionExists(triRef, bb, -1, -1, ind1[0], -1))\n\t\treturn true;\n\t}\n\n\t// still no diagonal??? yikes! oh well, this polygon is messed up badly!\n\tind1[0] = ind;\n\ti1[0] = i;\n\n\treturn false;\n }", "private Type establishIntersectionType() {\n\r\n\t\tdouble Pq0 = AngleUtil.getTurn(p0, p1, q0);\r\n\t\tdouble Pq1 = AngleUtil.getTurn(p0, p1, q1);\r\n\r\n\t\tdouble Qp0 = AngleUtil.getTurn(q0, q1, p0);\r\n\t\tdouble Qp1 = AngleUtil.getTurn(q0, q1, p1);\r\n\r\n\t\t// check if all turn have none angle. In this case, lines are collinear.\r\n\t\tif (Pq0 == AngleUtil.NONE && Pq1 == AngleUtil.NONE || Qp0 == AngleUtil.NONE && Qp1 == AngleUtil.NONE) {\r\n\t\t\t// at this point, we know that lines are collinear.\r\n\t\t\t// we must check if they overlap for segments intersection\r\n\t\t\tif (q0.getDistance(p0) <= p0.getDistance(p1) && q0.getDistance(p1) <= p0.getDistance(p1)) {\r\n\t\t\t\t// then q0 is in P limits and p0 or p1 is in Q limits\r\n\t\t\t\t// TODO this check is no sufficient\r\n\t\t\t\tinPLimits = true;\r\n\t\t\t\tinQLimits = true;\r\n\t\t\t}\r\n\t\t\treturn Type.COLLINEAR;\r\n\t\t}\r\n\t\t// check if q0 and q1 lie around P AND p0 and p1 lie around Q.\r\n\t\t// in this case, the two segments intersect\r\n\t\telse if (Pq0 * Pq1 <= 0 && Qp0 * Qp1 <= 0) {\r\n\t\t\t// else if(Pq0 <= 0 && Pq1 >= 0 && Qp0 <= 0 && Qp1 >= 0 ||\r\n\t\t\t// Pq0 >= 0 && Pq1 <= 0 && Qp0 >= 0 && Qp1 <= 0){\r\n\r\n\t\t\tinPLimits = true;\r\n\t\t\tinQLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t}\r\n\r\n\t\t// At this point, we know that segments are not crossing\r\n\t\t// check if q0 and q1 lie around P or p0 and p1 lie around Q.\r\n\t\t// in this case, a segment cross a line\r\n\t\telse if (Pq0 * Pq1 <= 0) {\r\n\t\t\tinQLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t} else if (Qp0 * Qp1 <= 0) {\r\n\t\t\tinPLimits = true;\r\n\t\t\treturn Type.INTERSECT;\r\n\t\t}\r\n\r\n\t\t// At this point, we know that each segment lie on one side of the other\r\n\t\t// We now check the slope to know if lines are Type.PARALLEL\r\n\t\tdouble pSlope = p0.getSlope(p1);\r\n\t\tdouble qSlope = q0.getSlope(q1);\r\n\t\tif (PrecisionUtil.areEquals(pSlope, qSlope))\r\n\t\t\t// TODO check the infinity case\r\n\t\t\t// this test works even if the slopes are \"Double.infinity\" due to the verticality of the lines and division\r\n\t\t\t// by 0\r\n\t\t\treturn Type.PARALLEL;\r\n\t\telse\r\n\t\t\treturn Type.INTERSECT;\r\n\t}", "public Coordinates intersection() {\n return intersection;\n }", "private double intersect(double start0, double end0, double start1, double end1)\n {\n double length = Double.min(end0, end1) - Double.max(start0, start1);\n return Double.min(Double.max(0, length), 1.0);\n }", "@Test\n\tpublic void testConstructRayThroughPixel() {\n\n\t\tCamera camera1 = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, 1));\n\n\t\t// 3X3\n\t\tRay ray11 = camera1.constructRayThroughPixel(3, 3, 1, 1, 100, 150, 150);\n\t\tRay expectedRay11 = new Ray(Point3D.ZERO, new Vector(50, 50, 100).normalize());\n\t\tassertEquals(\"positive up to vectors testing at 3X3 in pixel (1,1)\", ray11, expectedRay11);\n\n\t\tRay ray33 = camera1.constructRayThroughPixel(3, 3, 3, 3, 100, 150, 150);\n\t\tRay expectedRay33 = new Ray(Point3D.ZERO, new Vector(-50, -50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (3,3)\", ray33, expectedRay33);\n\n\t\tRay ray21 = camera1.constructRayThroughPixel(3, 3, 2, 1, 100, 150, 150);\n\t\tRay expectedRay21 = new Ray(Point3D.ZERO, new Vector(0, 50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (2,1)\", ray21, expectedRay21);\n\n\t\tRay ray23 = camera1.constructRayThroughPixel(3, 3, 2, 3, 100, 150, 150);\n\t\tRay expectedRay23 = new Ray(Point3D.ZERO, new Vector(0, -50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (2,3)\", ray23, expectedRay23);\n\n\t\tRay ray12 = camera1.constructRayThroughPixel(3, 3, 1, 2, 100, 150, 150);\n\t\tRay expectedRay12 = new Ray(Point3D.ZERO, new Vector(50, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (1,2)\", ray12, expectedRay12);\n\n\t\tRay ray32 = camera1.constructRayThroughPixel(3, 3, 3, 2, 100, 150, 150);\n\t\tRay expectedRay32 = new Ray(Point3D.ZERO, new Vector(-50, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (3,2)\", ray32, expectedRay32);\n\n\t\tRay ray22 = camera1.constructRayThroughPixel(3, 3, 2, 2, 100, 150, 150);\n\t\tRay expectedRay22 = new Ray(Point3D.ZERO, new Vector(0, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X3 in pixel (2,2) - A case test that Pij is equal to Pc\", ray22,\n\t\t\t\texpectedRay22);\n\n\t\t// 3X4 Py={1,2,3} Px={1,2,3,4}\n\n\t\tRay rayS22 = camera1.constructRayThroughPixel(4, 3, 2, 2, 100, 200, 150);\n\t\tRay expectedRayS22 = new Ray(Point3D.ZERO, new Vector(25, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (2,2)\", rayS22, expectedRayS22);\n\n\t\tRay rayS32 = camera1.constructRayThroughPixel(4, 3, 3, 2, 100, 200, 150);\n\t\tRay expectedRayS32 = new Ray(Point3D.ZERO, new Vector(-25, 0, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (3,2)\", rayS32, expectedRayS32);\n\n\t\tRay rayS11 = camera1.constructRayThroughPixel(4, 3, 1, 1, 100, 200, 150);\n\t\tRay expectedRayS11 = new Ray(Point3D.ZERO, new Vector(75, 50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (1,1)\", rayS11, expectedRayS11);\n\n\t\tRay rayS43 = camera1.constructRayThroughPixel(4, 3, 4, 3, 100, 200, 150);\n\t\tRay expectedRayS43 = new Ray(Point3D.ZERO, new Vector(-75, -50, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 3X4 in pixel (4,3)\", rayS43, expectedRayS43);\n\n\t\t// 4X3 Py={1,2,3,4} Px={1,2,3}\n\n\t\tRay ray_c22 = camera1.constructRayThroughPixel(3, 4, 2, 2, 100, 150, 200);\n\t\tRay expectedRay_c22 = new Ray(Point3D.ZERO, new Vector(0, 25, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (2,2)\", ray_c22, expectedRay_c22);\n\n\t\tRay ray_c32 = camera1.constructRayThroughPixel(3, 4, 3, 2, 100, 150, 200);\n\t\tRay expectedRay_c32 = new Ray(Point3D.ZERO, new Vector(-50, 25, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (3,2)\", ray_c32, expectedRay_c32);\n\n\t\tRay ray_c11 = camera1.constructRayThroughPixel(3, 4, 1, 1, 100, 150, 200);\n\t\tRay expectedRay_c11 = new Ray(Point3D.ZERO, new Vector(50, 75, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (1,1)\", ray_c11, expectedRay_c11);\n\n\t\tRay ray_c43 = camera1.constructRayThroughPixel(3, 4, 3, 4, 100, 150, 200);\n\t\tRay expectedRay_c43 = new Ray(Point3D.ZERO, new Vector(-50, -75, 100).normalize());\n\t\tassertEquals(\"pozitiv up to vectors testing at 4X3 in pixel (4,3)\", ray_c43, expectedRay_c43);\n\n\t\t// ======\n\t\t// Negative vectors.\n\t\tCamera camera2 = new Camera(Point3D.ZERO, new Vector(0, -1, 0), new Vector(0, 0, -1));\n\n\t\t// 3X3\n\t\tRay ray1 = camera2.constructRayThroughPixel(3, 3, 3, 3, 100, 150, 150);\n\t\tRay resultRay = new Ray(Point3D.ZERO,\n\t\t\t\tnew Vector(-1 / Math.sqrt(6), 1 / Math.sqrt(6), -(Math.sqrt((double) 2 / 3))));\n\t\tassertEquals(\"Negative vectors testing at 3X3 in pixel (3,3)\", ray1, resultRay);\n\n\t\t// 3X3\n\t\tRay ray_d11 = camera2.constructRayThroughPixel(3, 3, 1, 1, 100, 150, 150);\n\t\tRay expectedRay_d11 = new Ray(Point3D.ZERO, new Vector(50, -50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (1,1)\", ray_d11, expectedRay_d11);\n\n\t\tRay ray_d33 = camera2.constructRayThroughPixel(3, 3, 3, 3, 100, 150, 150);\n\t\tRay expectedRay_d33 = new Ray(Point3D.ZERO, new Vector(-50, 50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (3,3)\", ray_d33, expectedRay_d33);\n\n\t\tRay ray_d21 = camera2.constructRayThroughPixel(3, 3, 2, 1, 100, 150, 150);\n\t\tRay expectedRay_d21 = new Ray(Point3D.ZERO, new Vector(0, -50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (2,1)\", ray_d21, expectedRay_d21);\n\n\t\tRay ray_d23 = camera2.constructRayThroughPixel(3, 3, 2, 3, 100, 150, 150);\n\t\tRay expectedRay_d23 = new Ray(Point3D.ZERO, new Vector(0, 50, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (2,3)\", ray_d23, expectedRay_d23);\n\n\t\tRay ray_d12 = camera2.constructRayThroughPixel(3, 3, 1, 2, 100, 150, 150);\n\t\tRay expectedRay_d12 = new Ray(Point3D.ZERO, new Vector(50, 0, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (1,2)\", ray_d12, expectedRay_d12);\n\n\t\tRay ray_d32 = camera2.constructRayThroughPixel(3, 3, 3, 2, 100, 150, 150);\n\t\tRay expectedRay_d32 = new Ray(Point3D.ZERO, new Vector(-50, 0, -100).normalize());\n\t\tassertEquals(\"negative up to vectors testing at 3X3 in pixel (3,2)\", ray_d32, expectedRay_d32);\n\n\t\t// vTo negative vUp positive\n\t\tCamera camera3 = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, -1));\n\n\t\t// 3X4\n\n\t\tRay ray_e22 = camera3.constructRayThroughPixel(4, 3, 2, 2, 100, 200, 150);\n\t\tRay expectedRay_e22 = new Ray(Point3D.ZERO, new Vector(-25, 0, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (2,2)\", ray_e22, expectedRay_e22);\n\n\t\tRay ray_e32 = camera3.constructRayThroughPixel(4, 3, 3, 2, 100, 200, 150);\n\t\tRay expectedRay_e32 = new Ray(Point3D.ZERO, new Vector(25, 0, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (3,2)\", ray_e32, expectedRay_e32);\n\n\t\tRay ray_e11 = camera3.constructRayThroughPixel(4, 3, 1, 1, 100, 200, 150);\n\t\tRay expectedRay_e11 = new Ray(Point3D.ZERO, new Vector(-75, 50, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (1,1)\", ray_e11, expectedRay_e11);\n\n\t\tRay ray_e43 = camera3.constructRayThroughPixel(4, 3, 4, 3, 100, 200, 150);\n\t\tRay expectedRay_e43 = new Ray(Point3D.ZERO, new Vector(75, -50, -100).normalize());\n\t\tassertEquals(\"vTo negative vUp positive vectors testing at 3X4 in pixel (4,3)\", ray_e43, expectedRay_e43);\n\n\t\t// ======\n\t\tCamera littlCam = new Camera(Point3D.ZERO, new Vector(0, 1, 0), new Vector(0, 0, 1));\n\t\tRay littl33 = littlCam.constructRayThroughPixel(3, 3, 3, 3, 10, 6, 6);\n\t\tRay checklittl33 = new Ray(Point3D.ZERO, new Vector(-2, -2, 10).normalize());\n\t\tRay littl11 = littlCam.constructRayThroughPixel(3, 3, 1, 1, 10, 6, 6);\n\t\tRay checklittl11 = new Ray(Point3D.ZERO, new Vector(2, 2, 10).normalize());\n\n\t\tassertEquals(\"3,3\", littl33, checklittl33);\n\t\tassertEquals(\"1,1\", littl11, checklittl11);\n\t}", "public ArrayList<RTLight> getVisibleLights(Point p){\n\r\n\t\tArrayList<RTLight> visibleLights=new ArrayList<RTLight>();\r\n\t\tfor(RTLight temp: lights){\r\n\t\t\t\r\n\t\t\r\n\t\t\tIntersection lightInt = trace(p,temp.getCenter());\r\n\t\t\t\r\n\t\t\tif(lightInt.getThing() == temp){\r\n\t\t\t\tvisibleLights.add((RTLight)lightInt.getThing());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn visibleLights;\r\n\t}", "boolean isThereNeighborIntersection(int nEntry, int nExit, int W, int H){\n\n int[] entryNeighbors = new int[4];\n\n for(int i = 0; i < H; i++){\n if(nEntry == i*W)\n entryNeighbors[0] = -1;\n if(nEntry == i*W + W-1)\n entryNeighbors[1] = -1;\n }\n\n if(entryNeighbors[0] != -1)\n entryNeighbors[0] = nEntry - 1;\n\n if(entryNeighbors[1] != -1)\n entryNeighbors[1] = nEntry + 1;\n\n entryNeighbors[2] = nEntry - W;\n entryNeighbors[3] = nEntry + W;\n \n\n int[] exitNeighbors = new int[4];\n\n for(int i = 0; i < H; i++){\n if(exit == i*W)\n exitNeighbors[0] = -1;\n if(exit == i*(W+1) -1)\n exitNeighbors[1] = -1;\n }\n\n if(nExitNeighbors[0] != -1)\n exitNeighbors[0] = nExit - 1;\n\n if(nExitNeighbors[1] != -1)\n exitNeighbors[1] = nExit + 1;\n\n exitNeighbors[2] = nExit - W;\n exitNeighbors[3] = nExit + W;\n\n\n for(int i = 0; i < 4; i++)\n for(int j = 0; j < 4; j++)\n if( entryNeighbors[i] == exitNeighbors[j] && entryNeighbors[i] > 0 )\n return true;\n }", "@Test\n public void intersectsWithAutoCarPolygon() {\n // creating the needed movement vector\n radar.loop();\n radar.loop();\n List<WorldObject> list = radar.getRelevantObjectsForAEB();\n assertTrue(list.stream().anyMatch(t -> t.getId().equals(\"roadsign_speed_40_1\")));\n radar.loop();\n list = radar.getRelevantObjectsForAEB();\n assertEquals(0, list.size());\n }", "public int intersectionRay(final Line3D line, List<Point3D> intersections) {\n int count = 0;\n int nFaces = meshFaces.length/3;\n Triangle3D face = new Triangle3D();\n for (int f = 0; f < nFaces; f++){\n this.getFace(f, face);\n count += face.intersectionRay(line, intersections);\n }\n return count;\n }", "public Vector3d getModelIntersection(Vector2i screenLoc)\n {\n ScreenPosition ul = getViewOffset();\n int viewportHeight = getViewportHeight();\n int correctedX = (int)(screenLoc.getX() - ul.getX());\n int correctedY = (int)(viewportHeight - screenLoc.getY() - ul.getY());\n Vector2i correctedScreenLoc = new Vector2i(correctedX, correctedY);\n return windowToModelCoords(correctedScreenLoc);\n }", "public static Point searchNearestEgde(Rectangle bounds, Point first, Point next) {\n\n // One offset needed to avoid intersection with the wrong line.\n if (bounds.x + bounds.width <= first.x)\n first.x = bounds.x + bounds.width - 1;\n else if (bounds.x >= first.x) first.x = bounds.x + 1;\n\n if (bounds.y + bounds.height <= first.y)\n first.y = bounds.height + bounds.y - 1;\n else if (bounds.y >= first.y) first.y = bounds.y + 1;\n\n Line2D relationLine = new Line2D.Float(first.x, first.y, next.x, next.y);\n Line2D lineTop = new Line2D.Float(bounds.x, bounds.y, bounds.x\n + bounds.width, bounds.y);\n Line2D lineRight = new Line2D.Float(bounds.x + bounds.width, bounds.y,\n bounds.x + bounds.width, bounds.y + bounds.height);\n Line2D lineBottom = new Line2D.Float(bounds.x + bounds.width, bounds.y\n + bounds.height, bounds.x, bounds.y + bounds.height);\n Line2D lineLeft = new Line2D.Float(bounds.x, bounds.y + bounds.height,\n bounds.x, bounds.y);\n\n Point2D ptIntersectTop = ptIntersectsLines(relationLine, lineTop);\n Point2D ptIntersectRight = ptIntersectsLines(relationLine, lineRight);\n Point2D ptIntersectBottom = ptIntersectsLines(relationLine, lineBottom);\n Point2D ptIntersectLeft = ptIntersectsLines(relationLine, lineLeft);\n\n // line is to infinite, we must verify that the point find interst the\n // correct edge and the relation.\n int distTop = (int) lineTop.ptSegDist(ptIntersectTop)\n + (int) relationLine.ptSegDist(ptIntersectTop);\n int distRight = (int) lineRight.ptSegDist(ptIntersectRight)\n + (int) relationLine.ptSegDist(ptIntersectRight);\n int distBottom = (int) lineBottom.ptSegDist(ptIntersectBottom)\n + (int) relationLine.ptSegDist(ptIntersectBottom);\n int distLeft = (int) lineLeft.ptSegDist(ptIntersectLeft)\n + (int) relationLine.ptSegDist(ptIntersectLeft);\n\n if (ptIntersectTop != null && distTop == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectTop.getX()),\n (int) ptIntersectTop.getY());\n\n } else if (ptIntersectRight != null && distRight == 0) {\n return new Point((int) ptIntersectRight.getX(),\n RelationGrip.adjust((int) ptIntersectRight.getY()));\n\n } else if (ptIntersectBottom != null && distBottom == 0) {\n return new Point(RelationGrip.adjust((int) ptIntersectBottom.getX()),\n (int) ptIntersectBottom.getY());\n\n } else if (ptIntersectLeft != null && distLeft == 0) {\n return new Point((int) ptIntersectLeft.getX(),\n RelationGrip.adjust((int) ptIntersectLeft.getY()));\n\n } else {\n return null; // no point found!\n }\n }", "private Ray constructRefractedRay(Geometry geometry, Point3D point, Ray inRay){\n Vector N = geometry.getNormal(point);\n Vector direct = inRay.get_direction();\n double cosOi = N.dotProduct(direct);\n if (cosOi < 0) {\n N.scale(-2);\n }\n else{\n N.scale(2);\n }\n Point3D pointEps = new Point3D(point);\n pointEps.add(N);\n return new Ray(pointEps, direct);\n }" ]
[ "0.723888", "0.69945556", "0.6825743", "0.6727801", "0.6697794", "0.6695977", "0.66808105", "0.65860873", "0.6545194", "0.65383196", "0.6516478", "0.6487794", "0.6465192", "0.6452243", "0.63944554", "0.6318803", "0.62951285", "0.6261725", "0.62255836", "0.6185379", "0.61258024", "0.6026765", "0.5995151", "0.5979937", "0.5964242", "0.59558606", "0.5949301", "0.5932069", "0.5897666", "0.58951336", "0.58892417", "0.5823813", "0.57836807", "0.57803446", "0.57685125", "0.5761088", "0.5750924", "0.5741368", "0.5732733", "0.56841785", "0.5668857", "0.56658816", "0.5620804", "0.5602529", "0.5595323", "0.55535483", "0.55471027", "0.55437165", "0.554287", "0.5529934", "0.54888", "0.54771435", "0.5467565", "0.5464929", "0.5462023", "0.54529667", "0.5450038", "0.5449976", "0.5403884", "0.5401437", "0.53841645", "0.5367848", "0.5362324", "0.5358444", "0.5349292", "0.53249246", "0.53121245", "0.53066117", "0.5304211", "0.5295743", "0.52814716", "0.527138", "0.5266553", "0.5252624", "0.5243928", "0.523565", "0.52196807", "0.5213606", "0.5206657", "0.5206303", "0.5204555", "0.51997864", "0.51974666", "0.5195769", "0.5184659", "0.51798743", "0.51544374", "0.5150694", "0.514906", "0.5142511", "0.51410544", "0.5132905", "0.51162726", "0.51008177", "0.510005", "0.5095193", "0.5093464", "0.5089886", "0.5089215", "0.5087219" ]
0.6148704
20
maps pixels to coordinates
public Point get3DCoordinate(int row, int col, int width, int height) { double x, y; x = scene_width * (col / ((double) (width - 1))) - scene_width / 2.0; y = scene_height / 2.0 - scene_height * row / ((double) (height - 1)); return new Point(x, y, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ImageData createPixelMap(double x, double y, int[] data) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, x, y, data);\n }", "@Override\n public ImageData createPixelMap(double x, double y) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, x, y);\n }", "private void calculateMaps() {\n\tsrcrows = new int[destHeight + 1];\n\tfor (int y = 0; y <= destHeight; y++) {\n\t srcrows[y] = (2 * y * srcHeight + srcHeight) / (2 * destHeight);\n\t}\n\tsrccols = new int[destWidth + 1];\n\tfor (int x = 0; x <= destWidth; x++) {\n\t srccols[x] = (2 * x * srcWidth + srcWidth) / (2 * destWidth);\n\t}\n\n float xscale = ( ( float ) srcWidth - 1 ) / ( ( float ) destWidth );\n float yscale = ( ( float ) srcHeight - 1 ) / ( ( float ) destHeight ) ;\n\n srcxlarr = new int[destWidth+1];\n srcxuarr = new int[destWidth+1];\n srcxarr = new int[destWidth+1];\n\n for (int x = 0 ; x <= destWidth;x++) {\n float tmp = x * xscale ;\n srcxlarr[x] = (int) Math.floor( tmp ) ;\n srcxuarr[x] = (int) Math.ceil( tmp ) ;\n srcxarr[x] = (int) ( ( tmp - srcxlarr[x] ) * 255f );\n }\n\n srcylarr = new int[destHeight+1];\n srcyuarr = new int[destHeight+1];\n srcyarr = new int[destHeight+1];\n\n for (int y = 0 ; y <= destHeight;y++) {\n float tmp = y * yscale ;\n srcylarr[y] = (int) Math.floor( tmp ) ;\n srcyuarr[y] = (int) Math.ceil( tmp ) ;\n srcyarr[y] = (int) ( ( tmp - srcylarr[y] ) * 255f );\n }\n\n /*\n System.out.println( \"srcrows\" );\n for (int i=0;i<srcrows.length;i++) {\n System.out.print( srcrows[i] + \" \" );\n }\n\n System.out.println( \"\\nsrccols\" );\n for (int i=0;i<srccols.length;i++) {\n System.out.print( srccols[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcxlarr\" );\n for (int i=0;i<srcxlarr.length;i++) {\n System.out.print( srcxlarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcxuarr\" );\n for (int i=0;i<srcxuarr.length;i++) {\n System.out.print( srcxuarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcylarr\" );\n for (int i=0;i<srcxlarr.length;i++) {\n System.out.print( srcylarr[i] + \" \" );\n }\n\n System.out.println( \"\\nsrcyuarr\" );\n for (int i=0;i<srcxuarr.length;i++) {\n System.out.print( srcyuarr[i] + \" \" );\n }\n */\n }", "@Test\n\tvoid testToPixel() {\n\t\t\n\t\t// read the image map of ariel \n\t\tBufferedImage map = null;\n\t\ttry {\n\t\t\tmap = ImageIO.read(new File(\"Ariel1.png\"));\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\tMap m= new Map(map,Width,Height,start,end);\n\n\n\t\tPoint3D ans1 =m.toPixel(start);\n\t\tassertTrue(ans1.equals(pixelStart));\n\n\t\tPoint3D ans2 =m.toPixel(end);\n\t\tassertTrue(ans2.equals(pixelEnd));\n\n\n\t\tPoint3D ans3 = m.toPixel(p);\n\t\tassertTrue(ans3.equals(p1));\n\n\t}", "private Point getPixel(Point source) {\n float stepWidth = /*canvasWidth*/ canvasHeight / mapWidth;\n float stepHeight = canvasHeight / mapHeight;\n\n float centerX = canvasWidth / 2;\n float centerY = canvasHeight / 2;\n\n return new Point((int) (centerX + source.X * stepWidth), (int) (centerY + source.Y * stepHeight));\n }", "public void setPixels2(int x, int y, int w, int h,\n\t\t\t ColorModel model, int pixels[], int off,\n\t\t\t int scansize)\n {\n\tif (srcrows == null || srccols == null) {\n\t calculateMaps();\n\t}\n\tint sx, sy;\n\tint dx1 = (2 * x * destWidth + srcWidth - 1) / (2 * srcWidth);\n\tint dy1 = (2 * y * destHeight + srcHeight - 1) / (2 * srcHeight);\n\n //System.out.print( \"dx1 \" + dx1 + \", dy1 \" + dy1 ) ;\n\n // Obsolete. Used only for debugging purposes.\n float xscale = ( ( float ) srcWidth ) / ( ( float ) destWidth );\n float yscale = ( ( float ) srcHeight ) / ( ( float ) destHeight ) ;\n\n //System.out.println( \", xscale \" + xscale + \" yscale \" + yscale ) ;\n\n\tint outpix[];\n\tif (outpixbuf != null && outpixbuf instanceof int[]) {\n\t outpix = (int[]) outpixbuf;\n\t} else {\n\t outpix = new int[destWidth];\n\t outpixbuf = outpix;\n\t}\n\n // Main rendering loop\n\tfor (int dy = dy1; (sy = srcrows[dy]) < y + h; dy++) {\n int srcyl = srcylarr[dy];\n int srcyu = srcyuarr[dy];\n int srcoffl = off + scansize * (srcyl - y) ;\n int srcoffu = off + scansize * (srcyu - y) ;\n\n\t int srcoff = off + scansize * (sy - y);\n\t int dx ;\n for ( dx = dx1; (sx = srccols[dx]) < x + w; dx++) {\n int srcxl = srcxlarr[dx];\n int srcxu = srcxuarr[dx];\n\n //System.out.println( \"dx \" + dx + \", dy \" + dy ) ;\n //System.out.println( \"srcyl\" + srcyl + \", srcyu : \" + srcyu ) ;\n //System.out.println( \"srcoffl \" + srcoffl + \" srcoffu \" + srcoffu ) ;\n\n if ( srcxl == srcxu && srcyl == srcyu )\n \t\t outpix[dx] = pixels[srcoff + sx];\n else {\n //System.out.println( \"srcxl \" + srcxl + \" srcxu \" + srcxu ) ;\n //System.out.print( \" srcoffl + srcxl =\" + ( srcoffl + srcxl ) ) ;\n //System.out.print( \", srcoffl + srcxu =\" + ( srcoffl + srcxu ) ) ;\n //System.out.print( \", srcoffu + srcxl =\" + ( srcoffu + srcxl ) ) ;\n //System.out.println( \", srcoffu + srcxu =\" + ( srcoffu + srcxu ) ) ;\n int pelvalue = average( model, pixels[srcoffl + srcxl], pixels[srcoffl + srcxu],\n pixels[srcoffu + srcxl], pixels[srcoffu + srcxu],\n srcxarr[dx], srcyarr[dy] ) ;\n outpix[dx] = pelvalue ;\n }\n\t }\n\t if (dx > dx1) {\n\t\tconsumer.setPixels(dx1, dy, dx - dx1, 1,\n\t\t\t\t model, outpix, dx1, destWidth);\n\t }\n\t}\n }", "public Coordinate pixelToWorld(int x, int y, Envelope map) {\n if (graphics == null) {\n LOGGER.info(\"no graphics yet deffined\");\n \n return null;\n }\n \n //set up the affine transform and calculate scale values\n AffineTransform at = setUpTransform(map, screenSize);\n \n /* If we are rendering to a component which has already set up some form\n * of transformation then we can concatenate our transformation to it.\n * An example of this is the ZoomPane component of the swinggui module.*/\n if (concatTransforms) {\n graphics.getTransform().concatenate(at);\n } else {\n graphics.setTransform(at);\n }\n \n try {\n Point2D result = at.inverseTransform(new java.awt.geom.Point2D.Double(x, y),\n new java.awt.geom.Point2D.Double());\n Coordinate c = new Coordinate(result.getX(), result.getY());\n \n return c;\n } catch (Exception e) {\n LOGGER.warning(e.toString());\n }\n \n return null;\n }", "public void worldToImageCoords(Point2D.Double p, boolean isDistance);", "public native void constituteImage(int width, int height, String map,\n\t\t\tint[] pixels) throws MagickException;", "public int GetPixelFromDips(float pixels) {\n final float scale = getResources().getDisplayMetrics().density;\n // Convert the dps to pixels, based on density scale\n return (int) (pixels * scale + 0.5f);\n }", "public int GetPixelFromDips(float pixels) {\n final float scale = getResources().getDisplayMetrics().density;\n // Convert the dps to pixels, based on density scale\n return (int) (pixels * scale + 0.5f);\n }", "private void setPixels() {\n\t\t\tfinal byte[] dest = new byte[(int) (getMetadata().get(0).getAxisLength(\n\t\t\t\tAxes.X) * getMetadata().get(0).getAxisLength(Axes.Y))];\n\t\t\tlong lastImage = -1;\n\n\t\t\t// fill in starting image contents based on last image's dispose\n\t\t\t// code\n\t\t\tif (getMetadata().getLastDispose() > 0) {\n\t\t\t\tif (getMetadata().getLastDispose() == 3) { // use image before last\n\t\t\t\t\tfinal long n = getMetadata().get(0).getPlaneCount() - 2;\n\t\t\t\t\tif (n > 0) lastImage = n - 1;\n\t\t\t\t}\n\n\t\t\t\tif (lastImage != -1) {\n\t\t\t\t\tfinal byte[] prev = getMetadata().getImages().get((int) lastImage);\n\t\t\t\t\tSystem.arraycopy(prev, 0, dest, 0, (int) (getMetadata().get(0)\n\t\t\t\t\t\t.getAxisLength(Axes.X) * getMetadata().get(0).getAxisLength(\n\t\t\t\t\t\t\tAxes.Y)));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// copy each source line to the appropriate place in the destination\n\n\t\t\tint pass = 1;\n\t\t\tint inc = 8;\n\t\t\tint iline = 0;\n\t\t\tfor (int i = 0; i < getMetadata().getIh(); i++) {\n\t\t\t\tint line = i;\n\t\t\t\tif (getMetadata().isInterlace()) {\n\t\t\t\t\tif (iline >= getMetadata().getIh()) {\n\t\t\t\t\t\tpass++;\n\t\t\t\t\t\tswitch (pass) {\n\t\t\t\t\t\t\tcase 2:\n\t\t\t\t\t\t\t\tiline = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 3:\n\t\t\t\t\t\t\t\tiline = 2;\n\t\t\t\t\t\t\t\tinc = 4;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 4:\n\t\t\t\t\t\t\t\tiline = 1;\n\t\t\t\t\t\t\t\tinc = 2;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tline = iline;\n\t\t\t\t\tiline += inc;\n\t\t\t\t}\n\t\t\t\tline += getMetadata().getIy();\n\t\t\t\tif (line < getMetadata().get(0).getAxisLength(Axes.Y)) {\n\t\t\t\t\tfinal int k = line * (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint dx = k + getMetadata().getIx(); // start of line in dest\n\t\t\t\t\tint dlim = dx + getMetadata().getIw(); // end of dest line\n\t\t\t\t\tif ((k + getMetadata().get(0).getAxisLength(Axes.X)) < dlim) dlim =\n\t\t\t\t\t\tk + (int) getMetadata().get(0).getAxisLength(Axes.X);\n\t\t\t\t\tint sx = i * getMetadata().getIw(); // start of line in\n\t\t\t\t\t// source\n\t\t\t\t\twhile (dx < dlim) {\n\t\t\t\t\t\t// map color and insert in destination\n\t\t\t\t\t\tfinal int index = getMetadata().getPixels()[sx++] & 0xff;\n\t\t\t\t\t\tdest[dx++] = (byte) index;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tgetMetadata().getColorTables().add(getMetadata().getAct());\n\t\t\tgetMetadata().getImages().add(dest);\n\t\t}", "void handlePixelStart(int x, int y, int color);", "public ArrayList<Integer> getpixel(int x, int y){\n \tArrayList<Integer> pixel = new ArrayList<Integer>();\n \tpixel.add(x * GRID_WIDTH + GRID_WIDTH/2);\n \tpixel.add(y * GRID_HEIGHT + GRID_HEIGHT/2);\n \treturn pixel;\n }", "public void imageToWorldCoords(Point2D.Double p, boolean isDistance);", "protected double xPixelToPosition(double pixel) {\r\n// double axisV = xPositionToPixel(originX);\r\n// return (pixel - axisV) * (maxX - minX) / (double) getWidth();\r\n return minX + pixel * (maxX - minX) / getWidth();\r\n }", "public int GetDipsFromPixel(float pixels) {\n final float scale = getResources().getDisplayMetrics().density;\n // Convert the dps to pixels, based on density scale\n return (int) (pixels * scale + 0.5f);\n }", "public void convertPixelToLatLng(ArrayList<PointInFloat> pathInPixels){\n for(int i=0; i<pathInPixels.size(); i++){\n LatLng latLng = googleMap.getProjection().\n fromScreenLocation(new Point((int) pathInPixels.get(i).getX(), (int) pathInPixels.get(i).getY()));\n mMapInterface.getPathFrame().add(latLng);\n }\n }", "public abstract RGBPixel getPixelRgb(int x, int y);", "public abstract void getPixelRgb(int x, int y, RGBPixel p);", "public int GetDipsFromPixel(float pixels) {\n // Get the screen's density scale\n final float scale = getResources().getDisplayMetrics().density;\n // Convert the dps to pixels, based on density scale\n return (int) (pixels * scale + 0.5f);\n }", "public void updatePixel(int[] location, double[] parameters);", "public int getDipsFromPixel(float pixels) {\n // Get the screen's density scale\n final float scale = getResources().getDisplayMetrics().density;\n // Convert the dps to pixels, based on density scale\n return (int) (pixels * scale + 0.5f);\n }", "private void changePixelValues(ImageProcessor ip) {\n\t\t\tint[] pixels = (int[])ip.getPixels();\r\n\t\t\t\r\n\t\t\tfor (int y=0; y<height; y++) {\r\n\t\t\t\tfor (int x=0; x<width; x++) {\r\n\t\t\t\t\tint pos = y*width + x;\r\n\t\t\t\t\tint argb = origPixels[pos]; // Lesen der Originalwerte \r\n\t\t\t\t\t\r\n\t\t\t\t\tint r = (argb >> 16) & 0xff;\r\n\t\t\t\t\tint g = (argb >> 8) & 0xff;\r\n\t\t\t\t\tint b = argb & 0xff;\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t// anstelle dieser drei Zeilen später hier die Farbtransformation durchführen,\r\n\t\t\t\t\t// die Y Cb Cr -Werte verändern und dann wieder zurücktransformieren\r\n\t\t\t\t\t\r\n\t\t\t\t\tYUV c = new YUV(r, g, b);\r\n\t\t\t\t\t\r\n\t\t\t\t\tc.changeBrightness(brightness).changeContrast(contrast).changeSaturation(saturation).changeHue(hue);\r\n\t\t\t\t\t\r\n\t\t\t\t\tint[] rgbNew = c.toRGB();\r\n\r\n\t\t\t\t\t// Hier muessen die neuen RGB-Werte wieder auf den Bereich von 0 bis 255 begrenzt werden\r\n\t\t\t\t\t\r\n\t\t\t\t\tpixels[pos] = (0xFF<<24) | (rgbNew[0]<<16) | (rgbNew[1]<<8) | rgbNew[2];\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "@Test\n public void testConvertPixelToCoord() throws Exception {\n System.out.println(\"convertPixelToCoord\");\n double x = 800;\n double y = 500;\n double lat = -71.320920;\n double lon = 46.759400;\n Utils instance = new Utils();\n Coordonnee result = instance.convertPixelToCoord(x, y);\n assertEquals(\"test latitude\",lat,result.getLat(),0);\n assertEquals(\"test longitude\",lon,result.getLon(),0);\n }", "private int convert2d(int x, int y) {\n return x + y * width;\n }", "public Position getPositionFromPixelCoords(int y, int x){\n if (disp.rotated){\n return new Position(y / 64 + 1, (x - 640) / -64);\n } else {\n return new Position((y - 576) / -64, x / 64);\n }\n }", "public int getDipsFromPixel(float pixels) {\n\t\t// Get the screen's density scale\n\t\tfinal float scale = getResources().getDisplayMetrics().density;\n\t\t// Convert the dps to pixels, based on density scale\n\t\treturn (int) (pixels * scale + 0.5f);\n\t}", "public native void constituteImage(int width, int height, String map,\n\t\t\tfloat[] pixels) throws MagickException;", "private ArrayList<Point> extractCC(Point r, Image img)\r\n/* 55: */ {\r\n/* 56: 58 */ this.s.clear();\r\n/* 57: 59 */ this.s.add(r);\r\n/* 58: 60 */ this.temp.setXYBoolean(r.x, r.y, true);\r\n/* 59: 61 */ this.list2.add(r);\r\n/* 60: */ \r\n/* 61: 63 */ Point[] N = { new Point(1, 0), new Point(0, 1), new Point(-1, 0), new Point(0, -1), \r\n/* 62: 64 */ new Point(1, 1), new Point(-1, -1), new Point(-1, 1), new Point(1, -1) };\r\n/* 63: */ \r\n/* 64: 66 */ ArrayList<Point> pixels = new ArrayList();\r\n/* 65: */ int x;\r\n/* 66: */ int i;\r\n/* 67: 68 */ for (; !this.s.isEmpty(); i < N.length)\r\n/* 68: */ {\r\n/* 69: 70 */ Point tmp = (Point)this.s.pop();\r\n/* 70: */ \r\n/* 71: 72 */ x = tmp.x;\r\n/* 72: 73 */ int y = tmp.y;\r\n/* 73: 74 */ pixels.add(tmp);\r\n/* 74: */ \r\n/* 75: 76 */ this.temp2.setXYBoolean(x, y, true);\r\n/* 76: */ \r\n/* 77: 78 */ i = 0; continue;\r\n/* 78: 79 */ int _x = x + N[i].x;\r\n/* 79: 80 */ int _y = y + N[i].y;\r\n/* 80: 82 */ if ((_x >= 0) && (_x < this.xdim) && (_y >= 0) && (_y < this.ydim)) {\r\n/* 81: 84 */ if (!this.temp.getXYBoolean(_x, _y))\r\n/* 82: */ {\r\n/* 83: 86 */ boolean q = img.getXYBoolean(_x, _y);\r\n/* 84: 88 */ if (q)\r\n/* 85: */ {\r\n/* 86: 90 */ Point t = new Point(_x, _y);\r\n/* 87: 91 */ this.s.add(t);\r\n/* 88: */ \r\n/* 89: 93 */ this.temp.setXYBoolean(t.x, t.y, true);\r\n/* 90: 94 */ this.list2.add(t);\r\n/* 91: */ }\r\n/* 92: */ }\r\n/* 93: */ }\r\n/* 94: 78 */ i++;\r\n/* 95: */ }\r\n/* 96: 99 */ for (Point t : this.list2) {\r\n/* 97:100 */ this.temp.setXYBoolean(t.x, t.y, false);\r\n/* 98: */ }\r\n/* 99:101 */ this.list2.clear();\r\n/* 100: */ \r\n/* 101:103 */ return pixels;\r\n/* 102: */ }", "public native boolean dispatchImage(int x, int y, int width, int height,\n\t\t\tString map, int[] pixels) throws MagickException;", "int getBitsPerPixel();", "public abstract int[] getCoords();", "public native void constituteImage(int width, int height, String map,\n\t\t\tbyte[] pixels) throws MagickException;", "@Override\r\n public int[] grabPixels(Object canvas, int width, int height, \r\n int[] pixels, int startRow, int nRows) {\r\n\t {}\r\n int[] buf = Image.grabPixels(Image.getGraphics(canvas), width, height); \r\n /**\r\n * @j2sNative\r\n * \r\n * canvas.buf32 = buf;\r\n * \r\n */\r\n {}\r\n return buf;\r\n\t}", "@Override\n public ImageData createPixelMap(ImageData pixelMap) {\n return graphicsEnvironmentImpl.createPixelMap(canvas, pixelMap);\n }", "public double[][] getPixelCoordinates(){\n return m_pdX;\n }", "public static void putGraphicsPixel(int[] inputPixels, int inputWidth, int pixelRowStart, int pixelRowEnd,\n int pixelColStart, int pixelColEnd, int[] outputPixels) {\n int i = 0;\n for (int y = pixelRowStart; y < pixelRowEnd; y++) {\n for (int x = pixelColStart; x < pixelColEnd; x++) {\n int val = getXYCoord(inputPixels, x, y, inputWidth);\n if (val != -1) {\n outputPixels[i] = val;\n }\n i++;\n }\n }\n }", "private int getRowPixelCoords(int row) {\r\n\t\treturn row * (HEX_HEIGHT - HEX_ANGLE_HEIGHT);\r\n\t}", "private int getColPixelCoords(int col, int row) {\r\n\t\t\tint pixelCol;\r\n\t\t\t//If it's an odd numbered row it needs to be shifted along\r\n\t\t\tif (row % 2 == 0) {\r\n\t\t\t\tpixelCol = (col * HEX_WIDTH);// - hexWidth / 2;\r\n\t\t\t} else {\r\n\t\t\t\tpixelCol = ((col * HEX_WIDTH) - HEX_WIDTH / 2) + HEX_WIDTH;\r\n\t\t\t}\r\n\t\t\treturn pixelCol;\r\n\t\t}", "public int[] convertRowcolsToPixels(int row, int col) {\n\t\tint[] px_position = new int[2];\n\t\tpx_position[0] = col * config.getLevelBoxSize();\n\t\tpx_position[1] = row * config.getLevelBoxSize();\n\t\treturn px_position;\n\t}", "Point2D getDrawCoordinates(int counter) {\n int x = counter % drawWidth;\n int y = (counter / drawWidth) % drawHeight;\n\n x += drawOffsetX;\n y += drawOffsetY;\n\n return new Point2D.Double(x, y);\n }", "@Override\n public ImageData getSnapshot(double x, double y, double width, double height) {\n return graphicsEnvironmentImpl.getPixelMap(canvas, x, y, width, height);\n }", "public native PixelPacket getOnePixel(int x, int y) throws MagickException;", "public static BufferedImage[] cutMapaImage(String name, int X, int Y) {\n BufferedImage[] sprites = null;\n try {\n BufferedImage imagen = ImageIO.read(new File(CanvasMap.class.getClassLoader().getResource(name).getFile()));\n final int filas = imagen.getHeight() / X;\n final int columnas = imagen.getWidth() / Y;\n sprites = new BufferedImage[filas * columnas];\n\n for (int i = 0; i < filas; i++) {\n for (int j = 0; j < columnas; j++) {\n sprites[(i * columnas) + j] = imagen.getSubimage(j * X, i * Y, X, Y);\n Image img = sprites[(i * columnas) + j].getScaledInstance(tamX, tamY, BufferedImage.SCALE_DEFAULT);\n sprites[(i * columnas) + j] = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n Graphics2D g = (Graphics2D) sprites[(i * columnas) + j].getGraphics();\n g.drawImage(img, 0, 0, null);\n }\n }\n } catch (IOException ex) {\n Logger.getLogger(CanvasMap.class.getName()).log(Level.SEVERE, null, ex);\n }\n return sprites;\n }", "public int[] getScreenCoordinateWGS84(double worldLat, double worldLon);", "public long[] getWorldCoordinate(int screenX, int screenY);", "public int[] getScreenCoordinate(long worldLat, long worldLon);", "@Test\n public void testConvertCoordToPixel() throws Exception {\n System.out.println(\"convertCoordToPixel\");\n double x = 800;\n double y = 500;\n double lat = -71.320920;\n double lon = 46.759400;\n Utils instance = new Utils();\n Coordonnee coord = new Coordonnee(-71.320920,46.759400);\n assertEquals(\"test latitude\",x,instance.convertCoordToPixel(coord).getLat(),0);\n assertEquals(\"test longitude\",y,instance.convertCoordToPixel(coord).getLon(),0);\n }", "public int[] getPixels() {\n\t\treturn pixels;\n\t}", "static int getPixValue(int x, int y) {\n return pgmInf.img[y][x];\n }", "public static void putGraphicsTile(int[] inputPixels, int tileRowStart, int tileCol, int[] outputPixels) {\n int j = 0;\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n int pixelIndex = (tileRowStart * 8 * 512) + (row * 512) + (tileCol * 8) + col;\n outputPixels[pixelIndex] = inputPixels[j];\n j++;\n }\n }\n }", "interface WorldmapBuffer2 {\n final static byte[] image2 = {\n -125, 47, -3, 77, 51, 29, -45, -103, -120, 119, 76, -122, -82, -22, -106, 61, 113, 4, -59, 124, -116, 59, 115, -26, -44,\n 56, -115, 34, 106, -124, 98, 83, -115, 70, 9, -67, -116, 99, 92, -127, 89, -23, -68, -11, -41, 72, -15, -68, -48, 4,\n 29, 85, -30, 4, -79, -56, -20, 126, 69, 119, -119, -115, -116, 60, -37, -53, -107, 68, 90, -45, 79, -99, 108, 109, 45,\n 84, -65, -93, -44, -79, -23, -40, 23, -40, -48, 98, -92, -50, 125, -104, -52, -58, 50, -97, -119, 13, -78, -81, 82, -86,\n 15, -71, -92, 77, -115, -48, 48, 77, -88, 6, 61, 104, -117, -51, 103, -90, 5, -71, -52, 42, 76, -68, 113, 79, -7,\n 43, -42, -84, 38, -56, -100, 93, -44, 34, 71, -113, 100, -116, 64, 42, 88, -40, 94, 93, -83, -118, -115, 99, -32, -27,\n 72, -26, 43, -104, 35, 7, 37, 101, 12, -66, 107, -104, -128, -106, -116, 54, -93, -83, -119, -50, 23, -47, -117, 39, 89,\n 6, -9, 41, 47, 10, -37, -124, -2, 115, -40, -55, -67, -37, -118, -118, 92, 108, 24, -41, 35, -43, -61, 45, 44, 118,\n 87, 92, 70, -14, 108, -37, -22, -106, -41, -127, 124, -92, -70, -99, -42, 22, -38, 106, 43, -8, -84, -97, -99, -39, -48,\n -6, -62, 78, -10, -98, -38, 109, -98, -23, -87, -45, 112, -67, 73, 42, 21, 99, -25, 109, -40, -21, 10, 120, -88, -110,\n -99, 105, -37, -97, 68, -70, -112, 15, 54, -99, 111, 77, 37, 108, 52, -33, 113, 93, 59, -33, 56, -78, 124, -85, 42,\n 107, -3, -54, -94, 29, -37, 97, -53, -54, -24, 8, -113, -18, 45, 108, 61, 122, -124, 19, 102, 118, -65, -14, -31, 32,\n 30, -30, -8, 35, -40, 102, -106, -109, -33, -115, -58, -27, 38, -37, 43, 88, 106, -11, -104, -51, -16, 11, -39, 116, 24,\n -123, -48, -6, 107, 73, -39, -31, -107, 109, -98, 85, -36, 39, 115, 61, -37, -33, 53, -61, -49, 103, -119, -73, 84, -35,\n -64, -6, 97, -72, -85, -98, -94, 58, -33, 127, 77, -34, 96, 90, -127, 58, -22, -118, -61, -83, 58, 96, 59, 95, 27,\n 11, -29, -123, 76, 79, -108, 11, -48, -35, -100, -40, 82, 4, 97, 57, -18, -36, -63, -94, -28, -105, -87, -76, -57, -84,\n 122, -13, -40, -60, -37, -6, -28, -105, -42, -34, -105, 76, 61, 59, -2, -27, -103, -125, -76, 111, 39, -39, 118, -88, -119,\n 56, 43, 116, 50, 22, -87, 44, 43, -91, 63, -21, -51, -2, -14, -26, -38, -76, 36, -26, -52, -122, -26, 100, -61, -75,\n -108, 7, 24, -24, 92, -37, -28, -116, -51, 52, 126, -33, -103, -102, 114, -27, 77, -24, -124, 87, 68, -13, -119, -28, 99,\n -71, -33, 25, 88, -49, 120, 41, -24, -125, -82, -62, 102, -25, -49, -119, 25, -82, 111, 38, 63, -52, 76, 26, 81, 71,\n 118, -115, 39, 125, -58, -94, -26, 29, -109, -25, -4, -92, -80, 43, -42, -83, -108, -66, -86, -65, 43, -25, 19, 70, -23,\n -80, -68, -54, -72, -3, -43, 32, -117, -93, 102, -93, 27, -29, -77, 56, -70, -38, -34, 27, -67, -94, 52, -75, -119, -73,\n -5, -45, 58, 120, -48, 107, 125, -112, 109, -84, -25, 40, 78, -21, -8, 69, -27, -117, -36, 108, 57, 93, -114, 52, 120,\n -32, 100, 68, -48, -51, 65, -35, -42, 78, 82, 58, -88, 96, -121, 126, -39, 104, 34, -123, -6, 9, 66, -35, 40, 107,\n 66, -120, -65, 127, -125, -19, -75, 6, 122, -30, -21, -74, 42, 126, -121, 2, 3, -19, 22, 20, 53, 85, 89, 61, -21,\n -25, -95, 94, 18, -18, -35, 70, -101, 33, 10, -80, 18, 35, 94, 99, -98, -18, 40, -66, 87, 54, -18, -23, -36, 107,\n -24, 8, 47, -28, -113, -61, -87, -20, -98, -19, -71, 45, -35, -128, -82, -80, -23, -121, -38, 99, -117, -70, 7, 104, -20,\n 52, 122, -18, 76, -115, -40, 36, -6, -16, 88, -59, -72, 127, -58, -111, 59, 126, -2, 82, -17, -68, -49, -18, -63, -118,\n 111, -109, -33, 120, -118, -50, -52, 52, -29, -121, -2, -62, 126, 26, -124, -46, -18, -112, -115, 92, -65, 117, 125, -16, -74,\n 74, 90, -9, 27, -61, 0, 111, 110, 2, -72, -125, -102, 30, 22, 42, -33, 115, 23, -6, -24, 124, -102, -57, -16, 78,\n -62, 76, -119, 91, -48, -87, -65, -71, 126, -118, -123, -89, -18, -31, -92, -13, -95, -68, -35, -63, -100, 55, 88, -68, -47,\n -69, 55, -12, 99, 33, -16, -34, -22, -63, 66, 78, -11, -93, 78, 66, 17, 12, -75, -115, 6, -109, 34, 9, 114, -108,\n -72, -103, 8, -76, 112, 58, 126, -16, -74, -34, 102, 29, -56, -64, 88, 103, 123, -91, 100, 55, 61, -55, -50, 59, -33,\n -22, 90, 55, -90, -106, -3, -20, -79, -35, 53, -112, -2, -47, 49, -114, -23, 30, 95, -16, 25, 70, -17, 75, 53, -9,\n -38, 73, 109, 53, 38, -10, 106, -102, 55, -17, -31, 76, -26, -6, -128, -110, -1, -44, 25, 7, -56, 86, -56, -9, -6,\n 9, -10, -57, -66, -20, 5, 125, -8, 106, -83, -8, -1, -89, -13, -114, 31, -97, -88, -120, 75, -21, 42, -22, -19, -111,\n 101, -117, 107, -30, -71, 121, -11, -99, 23, 88, -68, -8, -88, -85, 25, -128, 72, 47, -95, -122, -125, -87, 50, -82, 50,\n -14, -34, -92, 112, 102, -29, -87, -113, -106, -64, -18, 108, 26, 107, 32, 69, -37, 120, 10, -113, 118, -20, -2, 38, -46,\n 93, -116, -63, 23, 126, -19, 25, -55, -113, -95, -99, 121, -55, 106, -122, 29, 72, -32, 117, 103, -106, 86, -52, 104, -37,\n 15, -14, -122, -27, -33, 77, 79, 96, 4, 27, 34, -87, -6, 69, -69, -69, -93, 113, 3, -49, 69, -75, 56, 101, 106,\n 78, 57, 62, -15, -16, 92, -8, -63, -114, -48, -59, -82, 95, 52, 116, 108, 104, 11, -69, 78, 6, 16, 1, 4, 14,\n 36, 88, -48, -32, 65, -124, 9, 21, 46, 100, 56, 80, 0, 0, 1, 7, 35, 10, -96, 8, 49, 98, -61, -126, 15,\n 1, 108, -28, -40, -47, -29, 71, -112, 33, 69, -114, 36, 89, -46, -28, 73, -108, 41, 47, 98, 76, -88, 113, 100, -59,\n -115, 43, 9, -62, -20, 72, 49, -128, 77, -121, 11, 93, -106, -92, 72, 83, -92, -52, -101, 61, 29, -6, -12, -120, 51,\n -88, -48, -116, 10, -127, 74, 100, 57, 115, 105, 83, -88, 45, -97, 10, -20, 57, 53, 42, 84, -93, 59, 85, 62, 20,\n -86, 53, -27, 87, -80, 97, -59, -114, 37, 91, -42, 108, 88, -85, 87, -43, -82, 101, -120, 52, -93, 70, -93, 87, -67,\n -98, -91, 91, -41, -82, -39, -86, 108, -25, 22, -35, 25, 119, -24, -57, -117, 50, -105, 86, 37, 10, 56, 110, -31, -102,\n 84, -111, 30, -2, -23, 23, -95, 85, -57, 65, 115, 98, -115, -52, 118, 109, 86, -73, -106, -43, 10, 30, -37, -109, 35,\n -30, -69, -2, -95, 69, -113, 38, 93, 58, 100, 90, -51, -87, 85, 27, -52, -85, 23, -76, 105, -40, -79, -47, 14, 69,\n -51, 122, 47, 95, -61, -84, 1, 83, 117, 74, -8, -90, 83, -117, 46, 43, 7, -83, 73, 24, -13, -17, -103, -89, 99,\n 54, -100, -24, -72, -7, 98, -29, -61, 21, -41, 94, -51, 50, 115, 117, -21, -103, 111, -13, -12, 44, -37, -5, 119, -16,\n -31, 65, 82, -57, 94, -34, -68, -50, -18, -30, -43, -81, 79, 60, 25, -29, -21, -94, 55, 79, -21, 110, -1, -5, -16,\n 68, -38, -48, -87, -73, 126, 59, 84, -30, 120, -72, -104, -29, -115, 53, -34, -116, -21, -17, 49, -14, -50, 83, -80, 41,\n -56, -2, -21, 108, 34, -10, 34, -108, 112, 66, -80, 18, 92, -16, -62, -43, -46, -93, 112, 67, -39, 4, -77, 78, 37,\n -86, 78, 3, -118, -90, -107, 112, 10, 44, -90, -86, -118, -77, -112, -71, 18, 31, -37, 77, -70, -57, -108, -102, 46, 58,\n 4, 49, -76, -47, -75, -89, 42, -37, -114, 39, -30, 56, -12, -15, 71, 9, 87, -68, 113, 72, -84, -128, 52, 114, 52,\n 15, -33, -5, -22, -60, -58, 104, 91, 14, 57, -59, -28, -5, -52, 64, 5, 3, 67, 48, -66, -53, 90, -126, 18, 61,\n 24, -119, -12, 50, -71, 39, -35, 123, -85, -84, 18, -113, 52, -13, 76, -46, -124, -4, 114, 77, 7, -47, 116, -77, -77,\n -103, 62, 4, 81, -54, -105, 66, -2, -124, 9, 63, -121, 32, -30, 107, -56, -25, -24, -29, 75, -51, 40, 9, -108, -18,\n 58, 54, 11, 5, 46, -52, -93, 108, -61, 11, -52, 55, 27, 117, 116, 73, 67, 35, 109, -53, -90, 29, 31, -75, 52,\n -52, 4, 43, 125, -47, 36, 38, -21, -53, 19, 75, 27, -97, -93, -76, 83, 80, 47, 27, 49, 63, 26, 37, 85, -107,\n -50, 39, 73, 100, -108, -52, 87, 47, -107, 117, 86, 64, 87, 93, -112, 43, -8, 102, -75, -76, 69, 37, -105, -52, -75,\n -43, -15, 14, 45, -11, -42, 1, 41, 101, 117, 79, -53, -4, 66, -83, 86, 91, 85, 35, -86, -71, 97, 53, -27, 49,\n 68, 93, -85, -107, -107, -39, 102, -85, -85, 8, 66, 107, -83, 53, -111, 65, -76, 78, -30, 118, -73, -93, -126, -67, 49,\n 48, -63, -74, -61, -42, 63, 49, 109, 91, 55, -37, -88, -26, 42, 108, -80, -77, -54, -20, -10, -34, 55, -33, -123, 87,\n -77, -82, -16, -11, 118, 75, -99, 68, 51, -18, 37, 19, -5, -22, -46, -39, -106, -22, -20, 109, -77, 1, -37, 117, 120,\n -33, 42, 81, 26, 76, -38, -97, 62, -11, -9, -30, 35, -7, -125, -40, 75, 13, 49, -34, 21, -32, -124, -21, -30, -17,\n -41, -32, -114, -123, -24, 92, -91, 42, 30, 89, -56, -26, -100, -118, 113, -29, 80, -59, 45, -40, 100, 72, -87, -11, -8,\n 102, 31, -11, -123, -103, 50, -118, 113, -34, -48, 74, -26, -2, 66, 51, -111, 83, 81, -55, 13, 85, 42, 17, -91, 34,\n 15, -49, -55, -46, -43, 121, -25, -128, -125, 123, -115, -79, 37, 17, -19, -39, 103, -84, -45, -124, -102, -29, -85, -77, -114,\n -80, -27, -74, -46, 36, -103, -44, -8, 8, -115, 55, 58, -115, 37, -14, -86, 54, -77, 103, 76, 21, 74, -96, -73, -66,\n 80, -39, -67, 56, -37, 74, 89, -81, -13, 86, -17, 105, -71, 83, -42, -37, -51, 59, -89, -22, -72, 49, -76, 83, 28,\n 79, 102, -102, -91, 62, 85, 109, -76, -109, 114, 92, 41, -31, 14, -114, 44, -45, -103, -5, 38, 114, -22, -116, 36, 6,\n 57, -15, -65, 59, 23, -38, 114, 12, -69, -10, -4, 107, 116, 65, 43, -4, 101, -50, 125, 37, -102, -72, -126, -17, -44,\n -119, 41, 22, 87, 84, -106, 103, 116, 65, -97, 123, -57, 17, 53, 119, 113, 116, -34, -111, -76, -3, -68, -63, 123, -49,\n -8, -74, -74, -75, -76, -7, 59, -83, -26, 125, 29, 118, -32, -29, -52, -82, 70, -105, 127, -41, 107, -38, -52, -87, -9,\n 83, 120, -20, -21, -107, 30, -8, -20, -49, 36, 12, 89, -84, 98, 37, 51, 120, -18, -124, 91, -98, -7, -14, -66, 101,\n 16, 61, -55, 54, -33, 62, 108, -21, -113, 87, 88, -47, -18, -21, 39, -117, 111, -23, 73, -74, 95, -68, 17, -45, 94,\n 95, -4, 7, 125, -81, 124, -84, 74, 75, 1, -101, -41, -66, -1, 65, -18, 113, -2, -17, -21, 21, 73, 114, 7, 32,\n -33, 108, -55, 112, -5, -93, -96, -18, 24, -104, -84, 10, 2, 73, 112, 122, 1, 96, 120, -58, -123, 40, 2, 25, 47,\n 125, 28, -20, -115, -1, -16, -73, 49, 105, -107, 14, 64, 74, -109, -110, -24, 50, 88, -65, -30, 93, 48, 106, 47, -4,\n -103, 8, -49, 102, -79, 32, -127, -49, 54, 54, -44, 22, 9, -99, -57, 67, 25, -50, -112, 96, 117, 43, -99, 91, -32,\n 66, 67, 36, 110, 37, -120, -17, 113, 97, 18, 5, 38, -93, 120, 9, 43, 103, 13, 99, 23, 16, 17, 38, 23, -25,\n 64, 113, -119, 65, -69, -33, 4, -115, -24, 68, 48, 90, 112, -117, 109, 10, -29, 122, 96, 4, -88, -2, -3, -120, 105,\n -127, 58, 31, 118, -48, -120, 58, -12, -115, -47, 111, 104, 73, 79, 119, -56, 87, 70, 60, 126, 70, -114, -41, -53, 35,\n 120, -10, -109, -91, -73, 52, -15, 46, -38, -79, -48, -63, -62, 119, -74, 28, 105, 113, -113, 33, -85, -48, -119, -122, -90,\n -89, 62, 70, -46, 92, 123, -44, -97, 36, 69, -74, 52, 64, -70, 103, -126, 14, 20, 100, -46, 2, 37, 59, 55, -54,\n 69, -127, 112, 92, 36, 25, 37, 118, 50, -55, 84, -46, -110, 97, 124, -37, -5, 58, -71, -54, -102, 89, 39, -109, -101,\n -53, -107, 10, -75, -89, 49, -106, -123, -14, -112, -118, -100, 78, 41, -123, 40, 46, 84, 114, 5, -106, -61, -2, 4, 85,\n -23, -74, -9, 74, 98, -118, 107, 82, -2, -5, 95, 1, 43, 22, -56, -15, 49, -82, -112, -70, 124, 30, 47, -87, -24,\n -53, 64, -118, -114, 108, -55, 36, -90, 49, -39, -120, -86, 19, -14, -117, -101, -90, 97, 91, 15, -35, 39, 63, 79, 101,\n 115, -120, 125, -111, -32, 125, 100, -103, -95, -3, 116, 105, -125, -40, 68, -112, 42, -127, 53, 78, 110, 50, -55, 105, -124,\n 10, -25, 101, -16, 89, -102, 114, 102, -24, -100, 127, 25, 86, 8, 55, -103, 21, 20, -127, -19, -102, -67, 108, -29, 21,\n -95, 39, 32, 82, -46, -77, -125, -100, -76, -25, 63, -111, -88, -49, 4, -50, -115, -117, 22, -3, 28, -5, -32, -55, 68,\n -72, 24, -48, 93, -3, 3, 90, -110, 30, 26, 71, 126, 89, -77, 45, -11, -108, 40, -3, 56, -6, -46, 105, 5, 40,\n -93, -38, 58, -35, -18, 96, 42, -78, 81, -102, -109, 65, 1, -35, -52, 96, 60, -54, 56, -121, -94, -76, -95, -46, -108,\n 104, 69, 111, -118, -49, 113, -127, -110, 123, -122, -71, 14, 50, -113, 42, 56, 67, 70, -47, 60, -52, -102, -35, 74, -43,\n 6, 66, 44, 102, 83, -87, -25, 99, -90, 12, 7, 118, 84, -80, 98, -55, 124, 9, -116, 33, 56, 35, 88, 41, -124,\n -122, -11, 126, 59, 36, -42, 84, 119, -7, -55, -91, -111, 52, -99, 88, -20, 42, 68, -83, 122, 32, -41, 64, -52, -87,\n 106, -59, -2, 99, 29, 17, -7, -80, -22, -119, 40, -123, 56, -28, 43, -30, -94, -89, 81, -73, -18, 114, 84, -120, -52,\n 11, 59, 125, -8, 88, -107, 2, -106, 69, 3, 53, -44, 94, 11, 91, 70, 87, 37, 11, 114, 56, 69, -25, 101, -97,\n -7, -61, -48, 29, 112, -89, 11, -107, -86, 98, -26, 90, 90, -122, 49, -47, -118, 92, 2, -19, -86, 44, -21, 89, 86,\n -114, 21, -78, -90, -75, -117, -35, 96, -21, -55, 5, -74, 53, -79, -76, -101, -22, 105, -33, -6, -37, -55, 10, -107, -95,\n 8, 92, -104, -83, 94, 123, 91, 26, 62, 18, -107, -77, -20, -47, 32, 39, 10, -37, 8, -110, 86, -76, 35, -116, -105,\n 69, 122, -21, -37, -103, 114, -87, 86, -109, 107, -36, 112, 89, 42, -87, -29, 34, 55, -125, -117, -63, -18, 123, -98, -69,\n -42, -13, -14, -107, -92, 101, 21, -24, 116, -63, -75, 92, 109, -23, 16, -75, 67, 53, 85, -125, 22, 39, -62, 126, 54,\n 80, -68, 96, -91, 84, 121, -19, 26, 94, -85, -19, 87, -113, 44, 68, -20, 110, -85, 11, -33, 12, -27, 102, 70, -26,\n -67, 43, 77, 103, 87, -94, -74, 25, 49, 82, 0, 22, -16, 11, 63, -120, 45, -27, 58, -105, -80, -73, 21, 41, 101,\n 83, -22, -34, -9, 34, 56, 53, 68, 116, 108, 100, 67, 88, -91, -82, -12, 73, 42, 39, 94, 19, -123, 43, 108, 97,\n 2, -14, -53, -88, -54, 76, 93, -2, 97, 33, 76, 37, -23, 6, -107, -102, 114, 25, 112, 124, -43, 37, 98, 22, -45,\n 119, -86, 107, -116, 104, -114, 67, -9, -30, -53, -6, 68, 95, 20, -34, 38, 116, 91, -85, -74, 42, 69, -39, -97, 64,\n -106, 113, 99, 18, 90, -28, -43, 38, 118, 89, -62, 61, 23, -110, 109, 76, -89, 119, -71, 56, 56, 21, 54, -87, -112,\n 71, 12, -30, 16, -29, -49, 116, -57, -117, -18, -115, 35, -52, 39, -17, 2, 54, -65, -65, -12, -14, 83, 109, -74, 46,\n 49, 35, -7, -66, -11, -116, 42, 112, 117, 124, 96, 42, -69, 6, -126, -60, -5, -22, 105, -25, -20, 48, -19, 112, 57,\n 102, 9, -83, 51, 76, -19, 21, -24, -115, 54, 90, -61, 79, 94, 96, -97, -33, -71, 99, 30, -9, -40, 89, 107, 67,\n -50, -116, -105, 27, -35, 2, -117, 105, -98, 45, 30, 112, -98, 37, -35, 59, 82, 89, 122, -61, -89, 94, 84, 110, -125,\n -20, 97, 81, 98, 58, -45, 88, 77, 22, -114, 33, 44, 22, 34, -93, -84, -75, -119, 84, 117, -83, 19, 99, 106, 86,\n -13, -82, -65, -2, -75, 105, -80, 91, 125, -40, 34, -97, 16, -44, -20, 125, 53, -96, 105, -51, 92, 68, -29, -102, 77,\n -89, -118, 91, 127, 14, 77, -48, 82, 27, -5, -91, -54, 115, -10, 32, 55, -23, -39, 61, -81, -74, -41, 39, 61, 10,\n -124, -77, -37, 109, -66, -31, -46, -108, -70, 27, 119, -84, -2, -93, -73, -27, -97, -10, -44, 92, -64, -42, -10, -24, -28,\n -43, -19, 122, -47, -51, -55, -82, 86, 116, -104, 121, 105, 72, -86, 126, 16, -46, 56, 18, 92, 0, 57, -106, 31, 88,\n 67, -75, 118, -17, -124, -113, -64, -21, 109, -25, 16, -25, -69, -36, 99, -6, 50, -65, -5, -67, 93, 120, -29, 53, -53,\n 13, 46, 49, -102, 59, -53, 41, -74, 74, 57, 64, -110, 115, -77, -94, -109, -13, 43, 79, 63, 92, -110, -78, -69, 100,\n -32, 8, -87, -42, 68, -38, 117, -29, 51, -49, -15, -96, 10, 119, 115, -25, 104, -38, -29, 77, -28, 76, 63, 83, -68,\n -100, 66, -30, 9, -86, 124, -82, -102, -54, -43, 91, 36, -94, 21, -70, 124, -24, -30, 47, -86, 24, 28, -17, 6, -101,\n -8, -101, -108, -34, -116, -50, 13, -68, -22, 57, 109, 107, -87, -49, -54, -22, 64, -47, 102, -12, 122, -77, 28, -28, -127,\n 85, 98, 115, 45, 10, -22, 75, 71, -99, -36, 102, -82, -94, 100, -99, 61, 103, 122, -31, 69, -74, -15, -3, 108, -38,\n -35, 103, 48, -80, -121, 125, -42, 117, -1, 56, -115, -51, -114, -44, -39, 74, 29, -42, -51, 14, -7, -32, 35, -99, -33,\n -72, 79, -102, -18, 124, -49, 41, -78, 77, 70, -17, -68, 3, 6, -77, 123, -97, 15, -39, 99, 41, -64, 127, 110, -105,\n 50, 80, 118, -9, 50, -37, 77, -58, -49, -1, -37, 119, 110, 28, -5, 40, 71, -2, 45, -81, -56, -17, 45, -27, 127,\n 83, -109, -70, -42, 45, -79, -114, 21, 14, -106, -102, 71, -19, -25, -73, -102, -32, -126, 18, -36, -14, -100, -59, 125, -4,\n 52, 14, -78, 71, -85, 8, -14, -87, 63, -39, -22, -11, 102, 105, -41, -13, -111, 46, -58, -62, 118, 31, 105, -49, -40,\n 15, -37, 125, -60, 70, -21, 105, -15, 0, -84, 51, 85, 54, 40, -73, -63, -49, 54, -15, -3, -24, -4, -96, 79, 50,\n -67, -72, 110, -22, -16, -15, -11, -4, -50, -89, -10, -36, 24, -92, 62, 72, 115, 45, -59, -114, -78, 63, -106, -108, -10,\n -23, -29, 29, -82, 58, -17, -13, 55, -24, 56, -98, -114, -73, -65, 117, -48, 111, -125, 49, -11, 75, 63, 2, 84, -69,\n -23, -53, -67, 21, -77, -72, 60, -61, 48, -98, 107, 54, 115, 75, -91, -61, -127, 21, -29, -53, 63, 48, 10, -67, 68,\n -103, 64, -63, 34, -94, -66, -126, -74, -11, -21, 64, -102, -85, 58, 4, 36, -68, 28, -119, 13, -86, -126, -107, 87, 3,\n -101, -1, -117, 63, -13, -93, 64, 97, 107, -67, 20, 124, 56, -86, -30, 64, 63, 99, -69, -22, 107, 63, 44, 3, 24,\n 12, -12, 61, 57, 65, -81, -100, -104, 24, -125, -86, -79, 10, 25, 63, 22, -20, -90, 92, -94, 45, -67, 11, -68, -89,\n -109, 65, -63, 43, 45, 78, 91, 48, -73, -77, -113, 28, 44, -67, -99, -46, 30, 118, -7, 35, 35, 92, -2, 62, 33,\n 28, 66, 34, -52, -88, 21, -76, 36, 111, -14, 64, 26, 52, 64, 49, -52, 36, 78, 115, 39, -54, -118, 66, 49, -46,\n 47, 19, 108, -95, -63, -77, -110, -67, -78, 45, 45, 12, -85, -5, -96, -101, -32, -61, 60, 61, -53, -118, 25, -108, -71,\n -7, -110, 62, -51, -38, 48, 94, -93, 51, -17, 8, -65, 75, 2, 51, 35, -45, 36, 32, -12, -69, 46, -116, 67, -20,\n 57, -88, -121, 73, -101, 68, 20, -64, -57, 57, -93, 1, -36, 67, -43, 106, 47, 63, -28, -68, 57, -30, 31, 53, 20,\n -103, -10, -64, -92, 78, -93, -62, 67, 84, 68, 57, 92, 40, 103, 122, -79, 13, 42, -94, -18, 114, -65, 62, -52, 67,\n 104, 75, 30, -109, 67, -61, -39, -128, 31, 114, 50, 60, 94, 65, -90, -5, 19, 69, 14, -117, -71, -111, 34, -77, 37,\n 116, -65, 37, 43, -64, -24, -117, -107, 112, -21, 13, 10, -39, -113, 14, -15, 68, -14, 90, -108, 71, -60, -59, 10, -86,\n 42, -68, 90, -58, -3, -47, -66, -68, 122, -102, 94, 83, -74, 98, 27, -58, -65, -101, 16, -74, 57, 70, -91, 57, -85,\n -66, -125, -108, 59, 98, 70, 27, 51, -106, -61, -40, 61, 14, -21, -59, -121, -62, 62, 92, 1, -61, 73, -92, -72, -2,\n 113, 18, 13, -110, -59, 89, -44, 69, -40, 113, -86, -42, -127, 70, 113, -20, 30, 3, -55, 57, 83, -76, -75, -82, -93,\n 58, -10, -2, 74, -58, 76, -71, -70, -1, 48, -73, 0, -100, 34, 64, 124, -94, 106, 19, 41, 91, -60, -107, 97, -53,\n 71, 61, 43, 54, -15, -22, -86, -96, 75, 64, 77, -62, 37, -68, 25, 72, -126, 44, 72, 59, -12, -98, -124, 124, 34,\n 40, -84, -74, 19, 107, -56, -104, -80, 8, -120, -84, -77, 17, -108, -69, 97, -62, 57, -24, -24, 69, -95, -29, 51, -117,\n 28, 67, 36, 100, -100, 107, -55, 68, -40, -128, -106, 86, -63, -81, 124, 43, -118, -109, 68, 73, -27, -13, -107, 22, 90,\n -91, -38, -15, -63, 14, 123, 29, -37, -101, 38, -99, 90, 38, -40, -29, -112, 82, -20, 16, 54, -45, -111, 44, -28, -92,\n -98, 100, -75, -60, 107, -92, 79, -127, 69, -42, -29, 21, 44, -117, -89, 39, 52, 74, 62, 84, -62, -85, -94, -88, 91,\n 52, 35, 70, 34, 65, 116, -14, -63, -88, -92, -88, -87, -108, -76, 7, 2, -54, -65, 120, -56, 72, 82, -88, -83, 28,\n 41, 34, -93, 61, -92, 60, 51, -43, 34, 49, 115, 100, 15, -56, 64, -98, 108, -124, -81, 52, -70, -97, 78, 92, -53,\n 70, 83, 58, -65, -93, 13, 0, -6, 58, 124, 100, -54, -89, -61, -56, 22, -87, 63, 38, 100, -57, 36, 52, 47, -105,\n 43, 56, -124, -4, 73, -128, -86, 27, 81, 123, -91, 103, 17, 38, -62, -116, -56, -88, -100, 24, -47, -60, 72, 20, 105,\n 70, 1, -63, 67, 68, -61, -58, -2, 36, -116, 43, -68, 84, -84, 109, -68, -52, -67, 20, 27, -62, 73, 75, 17, -111,\n 60, -84, -4, 76, 47, 76, -85, -61, -76, -113, -127, -109, -90, -15, -6, 61, -32, 83, -97, 30, -92, 58, -114, 99, 27,\n -111, 4, 70, -103, -116, -51, -81, 113, -87, 99, 116, -96, 43, -124, 19, 121, 73, 30, -36, 20, -80, -126, -103, 18, 110,\n -117, 19, -82, -112, -73, -33, 108, 31, -43, 76, 20, -20, 36, -50, -27, -111, 28, -16, -100, -52, -81, 124, 61, 109, 4,\n -114, -37, -100, 15, -41, -13, -52, -15, -87, -51, 41, -103, 78, 50, -13, 38, 47, 26, -55, -23, -79, -80, 50, 59, -61,\n -92, -72, -49, -43, -20, 70, -62, 43, -49, 101, -6, -56, -13, 36, 68, 96, 107, -78, -30, 88, 62, 7, -22, 62, -8,\n -100, 72, -6, 72, 17, 122, -84, -81, -59, 100, -52, 3, -111, 68, -115, 107, 61, -128, -124, 58, -55, -44, -82, -86, 84,\n -93, 24, 27, 80, -84, 43, -55, 122, -31, -114, 79, 75, 80, -22, -84, 67, -30, 26, -49, -25, 121, -48, 26, 26, 78,\n 15, -13, 41, -83, -108, 62, -76, 12, 67, -109, -93, -85, 111, 44, 70, -79, 50, -53, 25, 117, 74, 9, 18, -47, -8,\n 60, -106, -116, -101, 37, 20, 13, -48, 78, 43, 81, -108, 122, -55, 61, 44, -94, 11, 109, 59, 75, -4, 81, 101, 26,\n 80, 2, -11, -53, -74, -44, -47, -3, -46, 16, -29, -116, -2, -63, 14, 109, -63, 78, 123, 63, -6, 11, -46, 25, 108,\n 55, -106, -95, -58, 42, 53, -109, 38, -3, -100, -12, 76, -70, 79, 83, 82, 40, -75, 31, -54, -23, 41, -38, -52, 26,\n -56, -100, 75, 44, -91, -53, 27, 36, 79, 61, 36, 67, 90, -71, -47, -38, 58, 72, 3, -3, -119, 30, 27, -45, 51,\n 21, 74, -38, -111, -89, -108, -116, -58, -18, -68, -69, 84, -20, -49, -82, 76, -50, 56, 77, 59, 51, -107, -103, -31, -61,\n 15, -84, -84, 36, 8, 89, -44, 62, 93, -60, -103, 4, -56, 112, -12, -100, 114, -116, 40, -52, 49, -44, 67, 69, -44,\n 24, 109, 35, 73, -27, 20, -43, 11, 83, -85, -4, 75, 0, -103, -44, 83, 67, 63, 43, -38, 39, 24, 58, -50, -51,\n 116, 78, 78, 53, 60, 79, -75, -72, -55, 12, 85, 51, -38, 84, 59, -35, 77, 83, -27, 73, 84, 45, 76, -80, 68,\n 76, 57, -29, -45, 70, 33, 36, -33, -48, -97, 116, -103, 83, -57, -29, -77, -37, -85, -90, 47, 21, -98, -25, 104, 63,\n -50, -124, -86, 94, -115, -68, 55, -126, 28, -83, -100, 39, 97, -51, -105, -125, -20, 25, -90, -77, 46, 33, 91, 56, -73,\n -95, 67, -49, 83, 69, -52, -124, -95, 75, 108, 86, 78, 10, -53, 105, -51, -69, 106, 37, 48, -72, 121, -103, 108, 5,\n -100, 109, -51, -70, -112, 18, 67, 112, 45, -73, -14, -101, -46, -72, -102, -100, -117, -2, 58, -41, 92, 109, 18, -26, 92,\n 87, -107, 107, 87, -89, 115, 28, 105, 12, -59, 60, -70, -50, -71, 68, -72, 74, 44, 88, 39, 116, 88, -13, -116, 70,\n -62, -126, -61, 32, 68, 69, -127, -91, -42, 86, -76, 33, 122, 28, 75, -64, 11, -49, -70, -6, 83, -55, -14, 70, -101,\n 76, -82, -26, -93, 88, 49, -30, -66, -117, -123, -63, -116, 37, 37, -56, 36, -43, 124, 90, 41, -3, -28, 64, -115, -108,\n -56, 36, -78, 45, -109, -27, -114, 74, 75, 89, -93, -93, 82, 5, 116, -75, 107, 109, -70, -88, -13, 82, 90, 29, 90,\n 91, -115, 71, -117, -55, 48, -100, -35, 62, -99, 29, -40, -22, 19, -51, 56, 114, 51, -68, -71, -87, -101, 3, -83, 116,\n -5, -44, -66, -116, 75, 97, -31, 88, 27, 4, -66, -50, 88, 90, -104, -5, 43, 82, 60, 61, -76, 43, -41, -105, -107,\n -96, 11, 52, -47, 115, -13, 68, -78, 117, -94, -64, -68, 84, -83, 19, 65, 81, -27, 85, -81, -107, 90, 10, 125, -73,\n 101, 81, -75, -94, -83, -106, -123, 124, -64, 66, -12, 51, -75, 93, 83, 10, -102, 24, 15, 37, -100, 23, 13, 44, 59,\n -20, -52, -68, -99, -37, 107, 113, 85, -6, -78, -64, -78, -28, 40, 19, 74, -44, -76, 117, -47, 110, -94, 89, 114, 41,\n 84, 104, 90, -81, 50, 84, -36, -77, 27, 90, 119, -71, -100, -89, 58, 88, -76, -83, -43, -88, 122, -46, -2, -39, 115,\n 23, 88, -115, 56, -100, 99, 42, -50, -51, 60, 56, 69, -57, -34, 115, 52, -47, -19, -37, 75, -13, 43, -103, 75, -36,\n 124, -79, 92, 98, -13, 19, -83, 45, -48, -42, 29, -89, -69, -123, -35, 3, -108, -38, -58, 77, 82, -7, 66, 29, -36,\n 29, -42, -120, -75, -70, 76, -20, 93, -21, -124, -96, -33, 77, 88, 40, 42, -54, 35, -5, -109, -28, 5, -45, -30, 61,\n 51, 70, 100, -80, -21, 85, 94, -27, 124, 54, 83, -46, -89, 112, 76, -98, 91, -117, -34, 10, -44, -94, -39, -67, -107,\n 82, -119, 87, -84, -95, 94, 89, 101, -97, -92, 18, 82, -90, -24, 94, -17, -3, -34, 76, 17, 43, 60, 5, 88, -84,\n 99, 95, -13, 69, -109, -94, 28, -75, 80, 25, -37, 93, 101, 37, 40, 27, 84, -87, -30, -106, -104, 93, -37, -107, 92,\n -34, -91, 89, 95, -98, -93, -40, -22, -20, -33, 69, -52, -111, -47, 28, -35, 17, 19, 78, 5, 102, 91, -125, 77, 96,\n -122, -7, -71, 119, 124, 92, -56, 101, -32, 72, 3, 76, -71, -109, -46, -128, -107, 96, 76, 77, -42, -111, -46, -85, -114,\n 36, -32, -102, -93, -87, 2, -71, 59, -35, 117, -35, -120, 21, -32, -57, -117, 18, -118, -23, -52, -109, -125, -116, 25, -93,\n 95, 20, -74, -102, -47, -38, 26, -61, 36, 89, 25, -42, 37, -82, 4, -36, -107, -101, 97, 61, -46, -114, -53, 117, 94,\n -91, 43, -2, 41, -104, -67, 84, -61, -8, -31, -113, -95, 93, 96, -75, 29, 31, -10, -93, 115, 82, 51, 89, -67, -39,\n 109, 83, -30, -46, 68, -111, -65, 68, -63, -69, 89, -30, -103, 125, 78, 16, -91, 98, 121, -19, 84, 36, -75, 28, -2,\n -83, -55, 15, -36, -68, -51, -53, -30, 58, -51, 96, -55, 83, -49, -30, 35, 19, 49, 54, -64, 28, 54, 73, 53, -58,\n 94, -26, 107, 88, 87, -46, -32, -62, -77, 68, 124, 27, -59, -17, -83, -40, -30, 123, -61, 65, 1, -29, -46, 124, -29,\n 63, -66, 60, -42, 92, 34, 41, 118, 86, -2, -109, -75, 29, 76, 50, 47, -122, -50, -63, -11, -74, 27, 36, -76, -2,\n -94, 99, -50, 93, -42, 45, -126, 100, 109, -43, -75, 67, -82, 56, -124, 101, 84, 18, 108, 83, -44, -107, 26, 36, -114,\n 100, -65, 60, -46, -33, 17, 101, -128, -126, -40, 77, -93, 60, -24, 26, 98, -63, -60, -47, 67, 117, -71, 127, -107, -27,\n -27, -108, -45, 82, 78, -82, -90, 114, -93, -42, 51, -59, 18, -86, -28, 32, -119, 85, 30, -75, -27, -2, -75, 66, 108,\n -126, 102, -112, 124, 90, 102, -61, -60, 76, 86, 80, 107, 13, 85, 3, 94, 101, 97, 54, 90, 24, -67, 32, 106, -82,\n -26, 74, -77, 96, 21, -106, -57, -119, 52, 70, -28, 73, -61, -41, -4, -26, 58, -114, 99, 113, 38, -30, 122, -20, 102,\n 108, -34, -60, 116, -74, 62, 102, -2, -18, 34, 70, 125, -78, 47, 114, 103, 93, 113, 95, 74, -22, -41, -104, 100, -29,\n 115, 6, -48, 123, 94, -74, 20, 93, -116, -84, -19, 86, 127, -66, 20, -128, 30, -93, 113, 38, 103, -1, -28, 60, -28,\n -37, 89, 0, -52, 95, -42, -19, -94, -56, 65, -39, 16, 109, -24, 42, -42, 84, -120, -82, 89, 74, 4, 42, -32, 28,\n 89, 106, 77, -95, 22, 94, 62, -14, -39, 100, -113, -50, 24, -45, 107, 100, 55, 38, -28, 11, 29, 14, 102, -117, 104,\n -74, 101, -24, -67, -127, -65, -106, -58, 94, -113, 82, -72, -104, -106, -23, -119, 110, 99, 21, 69, 103, 113, -60, -55, 32,\n 73, -58, -99, -10, 95, 23, 101, -36, 125, -79, -23, 91, -98, -23, 2, 2, -44, -75, 92, 84, -116, 78, -22, 98, -52,\n -114, -59, 50, -25, 66, 113, -22, -89, 102, -72, 8, -117, -22, -88, -10, -26, 81, -74, -22, -117, -23, -46, 79, 5, -81,\n 13, -36, 41, 55, 44, 92, 69, -39, 39, -114, -18, -45, 124, -58, 13, -78, -10, 23, 82, -98, 58, 120, -31, 106, -83,\n -15, 33, 35, -126, 74, -121, -44, -111, -117, -75, 88, -112, -61, -21, -99, 46, -62, 122, 54, 46, -23, -99, -83, 76, -51,\n -49, -34, -20, 26, -63, 14, 92, -25, 104, 56, 116, -99, -21, -36, 101, 69, -7, -83, 44, -25, 91, -59, 64, -94, 37,\n -7, 104, 103, -103, -55, -57, -78, 74, 62, -79, -106, 108, -2, -105, 14, 106, -69, -98, -74, -53, 102, -84, 51, -86, -65,\n -20, 52, -23, 58, 105, -20, -20, 81, -25, -49, 114, -19, -122, -66, -53, -32, -78, -20, -61, -90, -20, -1, 90, -106, 57,\n 9, -19, 35, 52, -24, -73, 22, 109, -121, 38, 109, -83, -66, -82, -55, 67, 78, -84, -10, 78, 71, -82, 15, -39, 102,\n 83, -82, 27, 97, -22, 91, 110, 119, 62, 99, 98, -26, -109, -37, -58, 109, -104, 116, 27, 16, -98, 31, -24, -58, -103,\n -14, -19, -51, 26, 11, 76, -32, -42, 91, -98, -94, 101, -30, 118, -31, -111, 110, -68, 31, -78, -52, -92, 13, 102, -97,\n -36, 97, -40, -82, 60, -118, 11, -17, 127, 14, 107, -21, -114, -104, -76, 54, -18, 79, -106, 51, 41, 68, -29, -34, 118,\n 30, -110, 99, 60, -10, -106, 111, 35, -111, 86, -62, -2, -110, -19, -58, -62, 118, -60, -48, 31, 92, -34, -110, 57, -31,\n -2, 38, -24, -3, -51, 110, 1, 127, 20, -88, 68, 109, -114, -87, -18, -6, -50, -41, -90, 97, -32, -85, 29, -40, 6,\n -33, -76, -83, 13, -16, 9, 7, -25, -31, -10, -36, -12, -71, 111, -4, 22, -22, 118, 114, -16, -14, 58, -16, 110, 105,\n 25, 53, 11, 65, 23, -9, -25, -60, -2, -43, 19, -57, 44, -52, 69, -17, -110, -90, -38, 68, -42, 109, -90, 117, 92,\n -101, -14, -15, 17, -9, 22, -71, -76, -15, -59, 59, 95, 105, 26, 91, 37, 71, -2, 86, 59, 21, -14, 35, 68, -68,\n -43, -106, -16, 33, 15, 110, 127, -93, 110, 20, -9, -68, -77, -78, 97, -72, -35, -17, 68, 110, -17, -93, 49, -24, 41,\n -9, 94, 60, -77, -14, 43, 23, 100, 12, 70, -42, 28, 102, -19, 84, -67, -21, 48, -1, -105, -9, 61, -21, -31, 45,\n -13, 49, -92, 109, -2, -98, 31, 59, -26, 69, 54, 111, -13, 127, -122, -16, -58, 34, 115, 12, 103, 114, 43, -58, -63,\n 88, -68, 115, 60, -65, -21, 25, -113, -18, 78, 37, 36, 63, -1, 115, 26, -4, 91, 23, 82, -17, 96, -69, -26, -83,\n 62, 116, 97, 102, 106, 126, -69, 54, 17, 55, 87, 118, -108, -26, 71, -105, -14, 40, -3, -40, 60, -41, 115, 71, -79,\n 116, 57, -21, 50, 63, 13, -22, -15, -18, -12, -28, 30, 71, 76, 47, 111, 81, 7, 28, -38, 5, 96, -11, 61, -11,\n -23, 30, 79, -106, 6, -16, 76, 119, 52, -81, 122, -11, -6, 109, 81, -30, 60, 52, 74, 87, -68, 112, -114, -36, 46,\n -105, -15, 59, 12, -94, 96, 87, -29, 90, -28, -50, 55, 69, 110, 87, 79, -30, -1, -28, -103, 104, -37, 109, 6, -105,\n 67, -17, -2, 105, 94, -9, -56, 98, -87, -62, 35, 38, -67, 100, 26, -17, 102, -30, 87, 106, 47, -10, -48, -107, -93,\n -72, -50, 118, 45, -66, 98, 42, -110, -89, 11, -82, 106, 70, 55, -15, 66, 14, -44, 52, -116, 108, -120, -2, 11, 104,\n 116, 39, -15, -66, 5, 119, -54, -48, -11, 112, 110, -60, 85, 103, 94, -34, -18, -40, 82, 74, 118, -13, 117, -27, -75,\n 43, 104, 48, 95, -32, 126, -81, 112, 66, -89, 50, -126, -65, 106, 95, 122, -8, -33, -3, -32, -38, -122, -13, 58, 23,\n -8, 56, 126, 104, -58, 110, -8, 47, -98, -26, 123, -65, -52, 106, -124, -25, -128, -57, 90, -105, 12, 90, 109, -30, -8,\n 16, -90, 39, -119, 87, 92, 95, 15, 98, 120, 31, -32, -50, -43, 113, 120, -65, -11, -44, 53, 101, 72, -12, -8, -113,\n 111, 102, 8, 63, 65, -25, 6, -38, -127, -66, 100, -29, 49, 62, -25, 85, 101, -100, -49, 121, -78, -36, 121, -97, 61,\n 35, 112, -13, -54, 64, 87, -20, 60, 61, -10, -94, 50, 122, -66, 44, 113, 68, 43, -60, -107, 79, 119, 45, 105, -7,\n -55, -70, 122, -113, 105, 118, 74, -106, -6, -93, 111, 122, -98, 63, -61, 125, -117, 17, 80, 55, 123, -101, -105, -61, 86,\n -97, 48, -80, -49, 105, -79, 95, -31, 119, -11, 116, -30, 21, -7, -96, -9, -20, -106, 26, -7, -74, -105, -74, -73, 39,\n 48, 39, 39, 122, 103, -74, -25, 56, 92, 123, -74, -49, -5, 64, 68, 122, 64, -89, -9, -104, -73, -8, -124, -49, 63,\n -63, -33, 106, -62, 47, -4, -67, -9, 84, -82, -41, 68, -125, -97, 50, -69, -113, -6, -57, -73, -47, 55, -105, 124, -22,\n 52, -37, -2, 27, 34, 119, -17, 107, 124, -45, -50, -4, -101, -116, 124, -105, -60, -13, -77, -81, 71, -48, 15, 125, -52,\n 39, -3, -89, -82, -38, -98, 47, 123, -11, -93, 121, 45, 20, 125, 3, 119, -3, 89, -36, -4, -116, 7, -51, 1, 68,\n 90, -120, -76, -3, 11, -57, -3, -68, -58, -66, -54, 70, 124, 68, 22, -91, 126, 38, 76, -32, 95, 116, -31, -81, 45,\n -35, 71, 94, -71, -105, -3, 34, -59, -51, -27, 55, -11, -26, 23, -45, -92, -124, 116, -34, 23, -89, -23, -84, -2, -22,\n -67, 126, -25, 34, -2, -33, -101, 124, 8, -27, -2, -18, 31, 50, 73, 127, 118, -16, -65, 37, 67, 78, -17, 72, 55,\n -1, -13, -105, -79, 111, 75, -3, 35, 95, 127, -100, 18, 127, -125, 122, 127, 65, 19, -47, -128, -53, -31, -54, 7, -120,\n 0, 2, 7, 18, 44, 104, 112, -96, 0, 0, 10, 23, 50, 108, -24, -16, 33, -60, -120, 18, 39, 82, -84, 104, -15,\n 34, -58, -116, 26, 55, 114, -20, -24, -15, 35, -56, -123, 2, 4, -114, 60, 104, -14, 100, -128, -110, 7, 71, 38, 12,\n -23, -14, 37, -52, -104, 27, 85, -94, 60, -39, 82, 38, -50, -100, 58, 119, -30, -92, 89, -45, -96, -128, -101, 24, 125,\n 6, -3, 105, 20, 40, -49, -92, 74, -105, 50, 109, -22, 84, 105, 73, -97, 71, -127, -94, 12, -6, -12, 42, -42, -105,\n 82, -89, 10, -51, -22, -11, 43, -2, 88, -122, 91, 127, 90, -19, 72, -77, -24, -44, -93, 93, -61, -78, 109, -21, -10,\n -19, 85, -107, 99, -45, -90, -84, 10, -9, 46, -40, -71, 85, -41, -30, -19, -21, 87, -93, -34, -96, -126, 7, -125, -108,\n 11, 64, 47, 93, -110, 127, 23, 51, 110, -36, 88, 110, -30, -107, 104, 11, -14, 117, 108, 57, 36, 98, -54, -107, 47,\n 115, -10, 59, -103, -14, -50, -88, -103, 19, 111, -18, 108, -6, 52, 106, -114, 103, 35, 35, 61, 44, 88, 113, -22, -40,\n 67, 7, -45, -82, 93, 90, 54, 110, -84, -97, -53, -22, 20, 124, -72, 46, -21, -107, 95, 121, -25, 46, 110, -4, 35,\n -28, -32, -96, -59, -34, 62, -18, -4, 57, 116, -73, 69, -101, 107, 117, 61, 90, 109, 88, -33, -47, -73, 115, -1, -115,\n 80, -7, -14, -18, -30, -57, -109, 127, 74, 61, -26, -21, -49, -84, -49, -13, -116, 90, -2, 125, -22, -43, -32, 9, -78,\n -121, 111, -1, 62, -2, -20, 9, -81, -37, -51, -98, 50, 63, -128, -98, 81, 54, 31, 125, 1, 26, 120, 32, -126, -70,\n -127, 87, 95, 123, 12, 38, -8, 32, 122, -12, 17, 24, 30, -124, 21, 90, 120, -31, 80, 11, 74, -73, 31, -122, 29,\n -54, 68, -44, -124, 5, 122, 56, 34, -119, 24, -14, -41, 90, 91, -124, -107, -72, -30, 76, 3, -122, -8, 31, -117, 49,\n -54, 120, -33, -119, 20, -78, 53, -35, -116, 57, 70, 4, -2, 98, -120, 14, -22, -8, 35, -112, -114, -115, 53, -105, 118,\n -46, -111, 68, 91, -112, 51, -14, 56, -95, -113, 73, 58, -7, 100, -118, 72, -99, 85, 36, 92, 91, 53, 9, 37, -115,\n 18, 46, -88, 34, -106, 93, 122, -23, 25, 90, 55, -79, 116, 37, 83, 86, 126, 57, -94, 124, 116, 33, 121, 38, -101,\n 109, -34, 69, -100, 107, -116, -103, -23, -90, -123, 105, -90, 69, 38, -99, 121, -22, 25, -38, 98, 86, -30, -71, -25, 113,\n 75, -34, 9, 40, -95, -123, -42, -87, -103, -95, 7, 10, -54, 85, -94, -115, 58, -118, -33, 89, -113, 2, -72, 40, 118,\n -110, 90, 122, 41, 116, -122, 97, 106, 31, -91, -110, -123, -71, 41, -88, -95, 50, 39, -26, -97, -24, 53, -28, -98, -88,\n -28, 117, -118, 34, -107, -87, -70, -22, -88, 104, 44, 25, -39, 82, 122, -81, -114, 87, 91, -91, -74, -22, 42, -23, -100,\n -2, -91, 52, 38, -100, -69, 58, 71, 106, -91, -91, 10, 123, -84, -116, 82, 25, 91, 24, -118, -56, 102, -86, 16, 75,\n -40, 5, -21, 44, -75, 94, 42, 123, 35, 125, -53, 86, 91, 37, -83, -64, -111, -43, -22, -74, -31, 62, 25, -87, -81,\n -80, -119, 27, 104, -73, -4, 77, 123, 46, -69, 57, 106, 58, 28, -71, -19, 26, -105, 110, -82, -14, -38, -85, 35, -72,\n 113, 53, 123, 47, 110, -55, -43, -92, 45, -65, 1, -17, -87, -34, -111, 2, -9, -2, -5, 29, 89, 6, 43, -84, -85,\n -97, 11, -53, -26, -81, 77, 14, 75, 28, -22, -112, 19, -57, 22, 109, -62, 22, 107, 12, -85, 73, 0, 111, -36, 84,\n 84, -33, 126, 60, 50, -95, 21, -109, 124, 89, -56, 54, 121, 124, 50, -53, -121, 10, -41, -14, 95, 86, 65, 108, 35,\n -52, 53, -113, -37, -80, -51, 111, 30, -119, 112, -57, 57, -5, 124, -77, 104, 63, -65, -7, 26, -49, 61, 11, 125, -12,\n -113, -21, 34, -99, -105, -117, -3, 45, -3, 52, -44, -37, -38, -23, 116, -44, 85, 91, -3, 106, -104, 70, -83, 124, 53,\n -41, 93, 39, 61, -104, -42, 94, -117, 61, -74, -95, -109, -115, -74, 53, -39, 105, -85, -99, -96, -39, 25, -81, -3, 54,\n -36, 73, -18, -25, 109, -60, 113, -37, 125, 119, -78, -45, -3, -117, 55, -33, 125, -93, 73, 55, 85, 104, -5, 61, 56,\n -31, -90, 17, -35, -79, -32, -123, 43, -66, -72, -100, -121, 35, -60, 56, -28, -111, -33, 90, -76, -71, -110, 91, 126, 121,\n 110, -47, 18, 53, -45, -102, -104, 123, -2, -71, 110, 41, 87, 126, -111, -52, -7, -126, 126, 58, -22, -24, 77, 71, 52,\n -125, -76, 38, -98, 58, -20, -96, 59, -2, -85, -46, -79, -37, 126, 59, 84, -23, 117, -114, 59, -17, -67, -73, 71, -69,\n 92, -81, -5, 62, 124, -22, -91, 3, -1, 43, -15, -55, 43, 111, 86, -23, -34, -115, -71, 60, -12, -47, 59, 83, -124,\n -85, -73, -75, 75, 127, 61, -15, -70, 3, 110, 61, -10, -35, -13, -98, 30, 66, 92, 122, 63, -66, -14, -69, -109, 127,\n 126, -10, -74, -95, -65, 126, -7, -36, -77, -1, 62, -4, -15, -53, 63, 63, -3, -11, -37, 127, 63, -2, -7, -21, -65,\n 63, -1, -3, -81, 24, 16, 0, 0, 59\n };\n}", "@Override\n public native Color getPixelColor(int x, int y);", "public void drawPixel(int x, int y, int color);", "public Location convToImageCoords(Location loc) {\n return new Location((int)convUnits(loc.getxCoord(), canvas.getWidth(), getMaxX()),\n (int)convUnits(loc.getyCoord(), canvas.getHeight(), getMaxY()),\n loc.getLevel(), loc.getBuilding());\n }", "public double[] getWorldCoordinateWGS84(int screenX, int screenY);", "private static PixImage array2PixImage(int[][] pixels) {\n int width = pixels.length;\n int height = pixels[0].length;\n PixImage image = new PixImage(width, height);\n\n for (int x = 0; x < width; x++) {\n for (int y = 0; y < height;y++) {\n image.setPixel(x, y, (short) pixels[x][y], (short) pixels[x][y],\n (short) pixels[x][y]);\n }\n }\n\n return image;\n }", "public double[] getHitGeoCoord();", "public Pixel getPixelLocation() {\n\t\treturn _PixelLocation;\n\t}", "public native boolean dispatchImage(int x, int y, int width, int height,\n\t\t\tString map, byte[] pixels) throws MagickException;", "public native boolean dispatchImage(int x, int y, int width, int height,\n\t\t\tString map, float[] pixels) throws MagickException;", "public void setPixels(int[] pix) {\n\t\t\tMemoryImageSource source = new MemoryImageSource(_width, _height, pix, 0, _width);\n\t\t\t_image = createImage(source);\n\t\t}", "public double getXPixel()\n {\n return xPixel;\n }", "public Point2D.Double getImageCenter();", "List<GridCoordinate> getCoordinates(int cellWidth, int cellHeight);", "int getHeatCode(int x, int y);", "@Override\n public void drawPixelMap(ImageData pixelMap, double x, double y) {\n graphicsEnvironmentImpl.putPixelMap(canvas, pixelMap, x, y);\n }", "public void constructArray(){\n\t\tfor (int col = 0; col < cols; col++){\n\t\t\tfor (int row = 0; row < rows; row++){\n\t\t\t\tmap[col][row] = new Pixel();\n\t\t\t}\n\t\t}\n\t}", "protected double yPixelToPosition(double pixel) {\r\n// double axisH = yPositionToPixel(originY);\r\n// return (getHeight() - pixel - axisH) * (maxY - minY) / (double) getHeight();\r\n return minY + (getHeight() - pixel) * (maxY - minY) / getHeight();\r\n }", "Image createImage(List<List<Pixel>> pixelArray);", "public native PixelPacket[] getColormap() throws MagickException;", "private Point getTileCoordinates(int x, int y)\n {\n int tileWidth = this.tileset.getTileWidth() + 1;\n int tileHeight = this.tileset.getTileHeight() + 1;\n int tileCount = this.tileset.getTileCount();\n int rows = tileCount / TILES_PER_ROW + \n (tileCount % TILES_PER_ROW > 0 ? 1 : 0);\n \n int tileX = Math.max(0, Math.min(x / tileWidth, TILES_PER_ROW - 1));\n int tileY = Math.max(0, Math.min(y / tileHeight, rows - 1));\n \n return new Point(tileX, tileY);\n }", "public abstract interface WorldCoordinateConverter {\n\n /**\n * Return true if world coordinates conversion is available. This method\n * should be called to check before calling any of the world coordinates\n * conversion methods.\n */\n public boolean isWCS();\n\n /** Return the equinox used for coordinates (usually the equionx of the image) */\n public double getEquinox();\n\n /**\n * Convert the given image coordinates to world coordinates degrees in the equinox\n * of the current image.\n *\n * @param p The point to convert.\n * @param isDistance True if p should be interpreted as a distance instead\n * of a point.\n */\n public void imageToWorldCoords(Point2D.Double p, boolean isDistance);\n\n /**\n * Convert the given world coordinates (degrees, in the equinox of the current image)\n * to image coordinates.\n *\n * @param p The point to convert.\n * @param isDistance True if p should be interpreted as a distance instead\n * of a point.\n */\n public void worldToImageCoords(Point2D.Double p, boolean isDistance);\n\n /** Return the center RA,Dec coordinates in degrees. */\n public Point2D.Double getWCSCenter();\n\n /** Set the center RA,Dec coordinates in degrees. */\n //public void setWCSCenter(Point2D.Double p);\n\n /** return the width in deg */\n public double getWidthInDeg();\n\n /** return the height in deg */\n public double getHeightInDeg();\n\n /** Return the image center coordinates in pixels (image coordinates). */\n public Point2D.Double getImageCenter();\n\n /** Return the image width in pixels. */\n public double getWidth();\n\n /** Return the image height in pixels. */\n public double getHeight();\n}", "public void setPixel(int var1, int var2, int var3) {\n if(var1 >= this.field_745 && var2 >= this.field_743 && var1 < this.field_746 && var2 < this.field_744) {\n this.pixels[var1 + var2 * this.field_723] = var3;\n }\n }", "private int mediePixeli(int pixel1, int pixel2) {\n\t return (int) (((((pixel1) ^ (pixel2)) & 0xfffefefeL) >> 1) + ((pixel1) & (pixel2)));\n\t }", "int getNumberOfTextureCoordinates();", "public native PixelPacket getColormap(int index) throws MagickException;", "public int getXY(int x, int y);", "Vec3 pixelColor(int x, int y) {\n\n double zposition = height / d;\n z = x / squarePart + y / squarePart;\n // This is a conditional statement that checks if the pixel is in the middle of the image. If it is, it\n // returns a color.\n if ((x > width / c - zposition) && (x < width / c + zposition) && (y > height / c - zposition) && (y < height / c + zposition)) {\n return new Vec3(1, 0, 0.9);\n } else if (z % c == b) {\n return new Vec3(0, 0, 0);\n } else {\n\n return color;\n }\n \n\n }", "private void pix2img() {\r\n int g;\r\n img = new BufferedImage(pixels[0].length, pixels.length, BufferedImage.TYPE_INT_ARGB);\r\n // copy the pixels values\r\n for (int row = 0; row < pixels.length; ++row) {\r\n for (int col = 0; col < pixels[row].length; ++col) {\r\n g = pixels[row][col];\r\n img.setRGB(col, row, ((255 << 24) | (g << 16) | (g << 8) | g));\r\n }\r\n }\r\n }", "@Override\r\n\tpublic Pixel withPixel(int x, int y, Pixel[][] matrix) {\n\t\tint m = matrix.length;\r\n\t\tint n = matrix[0].length;\r\n\t\tPixel pix = new Pixel(0, 0, 0);\r\n\t\tfloat[][] kernel = { { 1 / 16f, 1 / 8f, 1 / 16f },\r\n\t\t\t\t{ 1 / 8f, 1 / 4f, 1 / 8f }, { 1 / 16f, 1 / 8f, 1 / 16f } };\r\n\t\tint sumR = 0;\r\n\t\tint sumG = 0;\r\n\t\tint sumB = 0;\r\n\t\tint kernCenterX = (int) Math.floor(kernel.length / 2);\r\n\t\tint kernCenterY = (int) Math.floor(kernel[0].length / 2);\r\n\t\tint coordX = x + (m - kernCenterX);\r\n\t\tint coordY = y + (n - kernCenterX);\r\n\t\tfor (int i = 0; i < kernel.length; i++) {\r\n\t\t\tint mm = kernel.length - 1 - i;\r\n\t\t\tfor (int j = 0; j < kernel[0].length; j++) {\r\n\t\t\t\tint nn = kernel[0].length - 1 - n;\r\n\t\t\t\tsumR += matrix[coordX][coordY].getR() * kernel[mm][nn];\r\n\t\t\t\tsumG += matrix[coordX][coordY].getG() * kernel[mm][nn];\r\n\t\t\t\tsumB += matrix[coordX][coordY].getB() * kernel[mm][nn];\r\n\t\t\t}\r\n\t\t}\r\n\t\tpix = new Pixel(sumR, sumG, sumB);\r\n\t\treturn pix;\r\n\t}", "List<List<Pixel>> transform(Image img, String operation);", "public void setPixels( int x, int y, int w, int h,\n ColorModel model, int pixels[], int off,\n\t\t\t int scansize )\n {\n if ( h == srcHeight ) {\n setPixels2( x, y, w, h, model, pixels, off, scansize ) ;\n }\n\n if ( intImgBuf == null ) {\n intImgBuf = new int[ srcHeight * srcWidth ] ;\n }\n\n //System.out.println( \"setPixels: x: \" + x + \" y: \" + y + \", w: \" + w + \", h: \" + h\n // + \", offset: \" + off + \", scansize \" + scansize ) ;\n\n int tindex = x + scansize * y ;\n for (int i=0;i<h;i++) {\n System.arraycopy( pixels, 0, intImgBuf, tindex, w ) ;\n tindex += scansize ;\n }\n\n if ( y + h >= srcHeight ) {\n setPixels2( 0, 0, srcWidth, srcHeight, model, intImgBuf, 0, scansize ) ;\n }\n }", "private static int[][][] getImagePixels(Image img) {\n\n // Get the raw pixel data \n iObserver observer = new iObserver();\n int width1 = img.getWidth(observer);\n int height1 = img.getHeight(observer);\n int[] rawPixels = utils.getPixels(img,width1,height1);\n\n // Each pixel is represented by 32 bits. Separate the tH32 bits into\n // four 8-bit values (red, green, blue, offset).\n int[][] rgbPixels = new int[rawPixels.length][4];\n for(int j=0; j<rawPixels.length; j++) {\n rgbPixels[j][0] = ((rawPixels[j]>>16)&0xff);\n rgbPixels[j][1] = ((rawPixels[j]>>8)&0xff);\n rgbPixels[j][2] = (rawPixels[j]&0xff);\n rgbPixels[j][3] =((rawPixels[j]>>24)&0xff);\n } // for j\n\n // Arrange the data by rows and columns\n int[][][] imagePixels = new int[height1][width1][4];\n int index=0;\n for(int row=0; row<imagePixels.length; row++) {\n for(int col=0; col<imagePixels[0].length; col++) {\n for(int rgbo=0; rgbo<4; rgbo++) {\n imagePixels[row][col][rgbo]=rgbPixels[index][rgbo];\n } // for rgbo\n index++;\n } // for col\n } // for row\n return imagePixels;\n }", "public static int convertPixsToDips(Context context, int pixels) {\n final float scale = context.getResources().getDisplayMetrics().density;\n // Convert the dps to pixels, based on density scale\n return (int) (pixels * scale + 0.5f);\n }", "private float distancePixels(int nX1, int nY1, int nX2, int nY2)\n {\n\t return FloatMath.sqrt((nX2-nX1)^2 + (nY2-nY1)^2);\n }", "public void renderImage(BufferedImage image, int xPosition, int yPosition)\n {\n int[] imagePixels = ((DataBufferInt) image.getRaster().getDataBuffer()).getData();\n\n for(int y = 0; y < image.getHeight(); y++ ) \n {\n for(int x = 0; x < image.getWidth(); x++ ) \n {\n pixels[(x + xPosition) + (y + yPosition) * view.getWidth() ] = imagePixels[x + y * image.getWidth()];\n }\n }\n }", "void setPixels (int x, int y, int w, int h,\n \t\t ColorModel model, byte[] pixels,\n \t\t int off, int scansize) {\n\t\n \tint dst = HEADER_SIZE + lineLength * y;\n \n \t// ignore x, model, off, scansize;\n \tint i = 0;\n \n \tif (depth == 1) {\n \t int val;\n \t while (i < w) {\n \t\tval = 0;\n \t\tfor (int j = 15; j >= 0; j--)\n \t\t val |= pixels [i++] << j;\n \t\tdata [dst++] = (short) val;\n \t }\n \t}\n \telse if (depth == 4) {\n \t while (i < w) {\n \t\tdata [dst++] = (short)\n \t\t ((pixels [i] << 12)\n \t\t + (pixels [i+1] << 8)\n \t\t + (pixels [i+2] << 4)\n \t\t + (pixels [i+3]));\n \n \t\ti += 4;\n \t }\n \t}\n \telse if (depth == 8) {\n \t while(i < w) {\n \t\tdata [dst++] = (short)\n \t\t (((((int) pixels [i]) & 255) << 8)\n \t\t + ((((int) pixels [i+1]) & 255)));\n \n \t\ti += 2;\n \t }\n \t}\n \telse throw new RuntimeException (\"depth currently unsupported!\");\n }", "public Pixel(int x, int y, int z) {\r\n this.x = (short) x;\r\n this.y = (short) y;\r\n this.z = (short) z;\r\n }", "public void directCompute() {\r\n\t\t\tshort[] rgb = new short[3];\r\n\t\t\tint offset = yMin * width;\r\n\t\t\tfor (int y = yMin; y < yMax; y++) {\r\n\t\t\t\tfor (int x = 0; x < width; x++) {\r\n\t\t\t\t\tPoint3D screenPoint = screenCorner.add(xAxis.scalarMultiply(x * 1.0 / (width - 1) * horizontal))\r\n\t\t\t\t\t\t\t.sub(yAxis.scalarMultiply(y * 1.0 / (height - 1) * vertical));\r\n\r\n\t\t\t\t\tRay ray = Ray.fromPoints(eye, screenPoint);\r\n\t\t\t\t\ttracer(scene, ray, rgb);\r\n\t\t\t\t\t// applying color to pixel\r\n\t\t\t\t\tred[offset] = rgb[0] > 255 ? 255 : rgb[0];\r\n\t\t\t\t\tgreen[offset] = rgb[1] > 255 ? 255 : rgb[1];\r\n\t\t\t\t\tblue[offset] = rgb[2] > 255 ? 255 : rgb[2];\r\n\r\n\t\t\t\t\toffset++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}", "public int nodeToPixelIndex(Node node) {\n Point p = nodeToPixelPoint(node);\n return ((p.y * WIDTH) + p.x);\n }", "public abstract void putPixelRgb(int x, int y, RGBPixel p);", "private static BufferedImage getMap(int art, GameModel gameModel, Color mapC, Color skyC){\n\n BufferedImage image = new BufferedImage(2800,1800,BufferedImage.TYPE_4BYTE_ABGR);\n\n int genauigkeit = 400;\n\n int[] mapX = new int[genauigkeit + 2];\n int[] mapY = new int[genauigkeit + 2];\n\n mapX[genauigkeit + 1] = 0;\n mapX[genauigkeit] = GameLoop.imgW;\n\n mapY[genauigkeit + 1] = GameLoop.imgH;\n mapY[genauigkeit] = GameLoop.imgH;\n\n double[] rnd = new double[8];\n\n for(int i = 0;i < 4;i++){\n rnd[i] = Math.random() * 0.1;\n rnd[i+4] = Math.random();\n }\n\n for(int i = 0;i < genauigkeit;i++){\n mapX[i] = (int) (GameLoop.imgW/(double)genauigkeit * (i));\n\n switch(art){\n case 1:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/8);\n break;\n case 2:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.01) * gameModel.getHeight()/8);\n break;\n case 3:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.sin(i * 0.1) * gameModel.getHeight()/12 + i);\n break;\n case 4:\n mapY[i] = (int) (gameModel.getHeight()*0.8 - 1/(2000 + Math.pow(i - (genauigkeit - 2)/2.0,2)) * 1500000);\n break;\n case 5:\n mapY[i] = (int) (gameModel.getHeight()/(double)2 + Math.pow(Math.sin(i * 0.03),3) * gameModel.getHeight()/4);\n break;\n case 6:\n mapY[i] = (int) (gameModel.getHeight()/2.0);\n mapY[i] += Math.sin(i * (rnd[0])) * rnd[4] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[1])) * rnd[5] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[2])) * rnd[6] * gameModel.getHeight()*0.1;\n mapY[i] += Math.sin(i * (rnd[3])) * rnd[7] * gameModel.getHeight()*0.1;\n\n\n\n\n\n }\n\n }\n\n Polygon map = new Polygon(mapX,mapY,genauigkeit+2);\n\n Graphics2D g2d = image.createGraphics();\n\n g2d.setColor(skyC);\n\n g2d.fillRect(0,0,2800,1800);\n\n g2d.setColor(mapC);\n\n g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION,RenderingHints.VALUE_INTERPOLATION_BILINEAR);\n\n g2d.fillPolygon(map);\n\n return image;\n }", "public static int getXYCoord(int[] pixelArray, int x, int y, int width) {\n return pixelArray[y * width + x];\n }", "public static interface ColorMap {\n\t\tpublic Color map(Color a, double x, double y);\n\t}", "public int[] getPixelValueArray(int x, int y) {\n int pixel = getPixelValue(x, y);\n int a = 0;\n int r = 0;\n int g = 0;\n int b = 0;\n\n //Each pixel is 32 bits, from bits 0-31\n //alpha 31-24\n //r 16-23\n //g 8-15\n //b 0-7\n\n a = (pixel >> 24) & 0xFF;\n r = (pixel >> 16) & 0xFF;\n g = (pixel >> 8) & 0xFF;\n b = (pixel >> 0) & 0xFF;\n\n return new int[] {a, r, g, b};\n }", "private Point getPreviewIconCoordinates() {\n final Rectangle r = getDrawingRect();\n return new Point(r.x + r.width - JBUI.scale(20), r.y + (r.height - JBUI.scale(16)) / 2);\n }", "public static int[] pixelDistance(GeoPoint a, GeoPoint b, Projection p) {\r\n\t\tint[] ret = new int[2];\r\n\t\tPoint apx = new Point();\r\n\t\tPoint bpx = new Point();\r\n\t\tp.toPixels(a, apx);\r\n\t\tp.toPixels(b, bpx);\r\n\t\tret[X] = apx.x - bpx.x;\r\n\t\tret[Y] = apx.y - bpx.y;\r\n\t\treturn ret;\r\n\t}", "public int[] convertTouchCoordinates(float[] coors) {\n\n newCoords[0] = (int) (coors[0] * ((float) mCanvas.getWidth() / mIndoorMap.getRight()));\n newCoords[1] = (int) (coors[1] * ((float) mCanvas.getHeight() / mIndoorMap.getBottom()));\n\n Log.i(\"test\", ((float) mCanvas.getWidth() / mIndoorMap.getRight()) + \" \" + ((float) mCanvas.getHeight() / mIndoorMap.getBottom()));\n return newCoords;\n }", "public static int[] getPixelColor(final BufferedImage img, final int x, final int y){\n int rgb = img.getRGB(x, y);\n int r = (rgb >> 16) & 0xFF;\n int g = (rgb >> 8) & 0xFF;\n int b = (rgb & 0xFF);\n\t\n return new int[]{r,g,b};\n }" ]
[ "0.6833095", "0.6807515", "0.6614959", "0.6451754", "0.64067906", "0.63670284", "0.6198777", "0.616797", "0.6156466", "0.61505735", "0.61505735", "0.6116255", "0.6106055", "0.609945", "0.60952204", "0.60373527", "0.59641373", "0.5960851", "0.593861", "0.5928422", "0.592448", "0.5914794", "0.58994055", "0.5898632", "0.5858724", "0.585767", "0.5841826", "0.58217245", "0.57921064", "0.5788711", "0.5768865", "0.57686347", "0.5750427", "0.57471794", "0.572563", "0.57026374", "0.56903493", "0.56857324", "0.56856644", "0.5684236", "0.5678075", "0.56669575", "0.5660497", "0.56600666", "0.56474984", "0.5630234", "0.56234866", "0.5614912", "0.56059724", "0.56020373", "0.55971134", "0.5596021", "0.5595711", "0.55900246", "0.55630255", "0.5560184", "0.5542489", "0.5530198", "0.55236405", "0.55130523", "0.551247", "0.5512049", "0.5509368", "0.5504911", "0.5494246", "0.5482955", "0.5482461", "0.54803824", "0.5473364", "0.5468769", "0.5460802", "0.5452108", "0.5432035", "0.54278386", "0.54244196", "0.54094476", "0.54041976", "0.5399729", "0.539815", "0.53938645", "0.5390729", "0.53806174", "0.53684133", "0.53636557", "0.5359246", "0.5355525", "0.5355106", "0.5351909", "0.53497785", "0.53455746", "0.5344258", "0.53396684", "0.5338394", "0.5333692", "0.53331566", "0.5327036", "0.53259313", "0.5323997", "0.5314235", "0.5311786", "0.5309432" ]
0.0
-1
Initialize all the pages you are handling
public void init() throws Throwable { memberLookup_BenefitsEligibility_DualCoverageSelector = new MemberLookup_BenefitsEligibility_DualCoverageSelector(SharedResource,utils); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initPages() {\n\t\tloginPage = new LoginPage(driver);\n\t\tflipkart = new FlipkartPage(driver);\n\t\t\n\t}", "public void init() {\n\t\tfor(int i = 0; i < 5; i++) {\n\t\t\tpageLists.add(new Page(i));\n\t\t}\n\t}", "protected void doAdditionalPageInitialization(IPage page) {\n }", "public ProcessPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t \n\n\t}", "private void init() {\n CycleViewPage page = (CycleViewPage) findViewById(R.id.main_view_page);\n page.setAdapter(new InfiniteImageAdapter(createImages()));\n page.setCurrentItem(Integer.MAX_VALUE / 2);\n page.setCycleSwitch(true);\n }", "protected void init() {\n PageFactory.initElements(webDriver, this);\n }", "public HomePage() { \n\t\t\tPageFactory.initElements(driver, this);\n\t\t}", "protected void createPages() {\n\t\tcreateIntroEditor();\n\t\tcreatePageMainEditor();\n\t\tcreatePageController();\n\t\tcreateCssEditor();\n\t\tcreatePageTextEditor();\n\t\trefreshPageMainEditor();\n\t\trefreshPageControllerEditor();\n\t\trefreshCssEditor();\n\t\tsetDirty(false);\n\t}", "public HomePage(){\n\t\t\tPageFactory.initElements(driver, this); \n\t\t}", "public HomePageActions() {\n\t\tPageFactory.initElements(driver,HomePageObjects.class);\n\t}", "public HomePage() \r\n\t{\r\n\t\tPageFactory.initElements(driver, this);\r\n\t\t\r\n\t}", "public HomePage(){\r\n\t\tPageFactory.initElements(driver, this);\r\n\r\n\r\n\t}", "protected static void initializePageActions() throws Exception {\n\t\tloginPageAction = new LoginPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tcomplianceReportsPageAction = new ComplianceReportsPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tmanageLocationPageActions = new ManageLocationPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tsetReportsPage((ComplianceReportsPage)complianceReportsPageAction.getPageObject());\n\t}", "public HomePage(){\n\t\tPageFactory.initElements(driver, this);\n\t}", "public HomePage(){\n PageFactory.initElements(driver, this);\n }", "public HomePage() {\n \t\tPageFactory.initElements(driver, this);\n \t}", "public MainPage() {\n initComponents();\n \n initPage();\n }", "protected static void initializePageActions() throws Exception {\n\t\tloginPageAction = new LoginPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\tmanageLocationPageAction = ActionBuilder.createManageLocationPageAction();\n\t\teqReportsPageAction = new EQReportsPageActions(getDriver(), getBaseURL(), getTestSetup());\n\t\teqReportsPage = (EQReportsPage)eqReportsPageAction.getPageObject();\n\t\tsetReportsPage(eqReportsPage);\n\t}", "public HomePage(){\r\n\tPageFactory.initElements(driver, this);\t\r\n\t}", "public HomePage() {\n\t\t\tPageFactory.initElements(driver, this);\n\t\t}", "public HomePage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "public HomePage() {\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "private void init() {\n setPageTransformer(true, new VerticalPageTransformer());\n setOverScrollMode(OVER_SCROLL_NEVER);\n }", "private void init() {\n\t\tinitData();\n\t\tmViewPager = (ViewPagerCompat) findViewById(R.id.id_viewpager);\n\t\tnaviBar = findViewById(R.id.navi_bar);\n\t\tNavigationBarUtils.initNavigationBar(this, naviBar, true, ScreenContents.class, false, ScreenViewPager.class,\n\t\t\t\tfalse, ScreenContents.class);\n\t\tmViewPager.setPageTransformer(true, new DepthPageTransformer());\n\t\t// mViewPager.setPageTransformer(true, new RotateDownPageTransformer());\n\t\tmViewPager.setAdapter(new PagerAdapter() {\n\t\t\t@Override\n\t\t\tpublic Object instantiateItem(ViewGroup container, int position) {\n\n\t\t\t\tcontainer.addView(mImageViews.get(position));\n\t\t\t\treturn mImageViews.get(position);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void destroyItem(ViewGroup container, int position, Object object) {\n\n\t\t\t\tcontainer.removeView(mImageViews.get(position));\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic boolean isViewFromObject(View view, Object object) {\n\t\t\t\treturn view == object;\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic int getCount() {\n\t\t\t\treturn mImgIds.length;\n\t\t\t}\n\t\t});\n\t}", "public HomePage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public HomePage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public HomePage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public HomePage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "@Override\n protected void init() {\n REQUEST_PERMISSION_FOR_ACTIVITY = false;\n viewModel.setNavigator(this);\n viewModel.onStart(this);\n binding.welcomePager.setAdapter(adapter);\n\n addDots(0);\n binding.welcomePager.addOnPageChangeListener(viewListener);\n\n// handlingBackground();\n }", "public StartPage() {\n initComponents();\n \n }", "private void initData() {\n\t\tpages = new ArrayList<WallpaperPage>();\n\n\t}", "public void startPage() {\n\t\tthis.dataComposer.startPage();\n\t}", "private void init()\n {\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<Void, RuntimeException>()\n {\n @Override\n public Void call() throws RuntimeException\n {\n GWikiElement page = wikiContext.getWikiWeb().getElement(pageId);\n WorkflowPopupActionBean.this.page = page;\n\n // check if dependent objects exists\n List<GWikiElementInfo> childs = wikiContext.getElementFinder().getAllDirectChilds(page.getElementInfo());\n for (final GWikiElementInfo child : childs) {\n getDepObjects().add(wikiContext.getWikiWeb().getElement(child));\n getSubpagesRec(child, 2);\n }\n return null;\n }\n\n /**\n * Recursive fetch of child elements\n */\n private void getSubpagesRec(GWikiElementInfo parent, int curDepth)\n {\n List<GWikiElementInfo> childs = wikiContext.getElementFinder().getAllDirectChilds(parent);\n for (final GWikiElementInfo child : childs) {\n getDepObjects().add(wikiContext.getWikiWeb().getElement(child));\n getSubpagesRec(child, ++curDepth);\n }\n }\n });\n }", "private void init() {\n\t\tinitDesign();\n\t\tinitHandlers();\n\t}", "@Override\n protected void init(PageDto page, HttpServletRequest request, HttpServletResponse response, Model model) {\n\n }", "private void initializePaging() {\r\n\t\t\r\n\t\tList<Fragment> fragments = new Vector<Fragment>();\r\n\t\tfragments.add(Fragment.instantiate(this, ContactBookFragment.class.getName()));\r\n\t\tfragments.add(Fragment.instantiate(this, MainDashBoardFragment.class.getName()));\r\n\t\tfragments.add(Fragment.instantiate(this, GroupDashBoardFragment.class.getName()));\r\n\t\tthis.mPagerAdapter = new PagerAdapter(super.getSupportFragmentManager(), fragments);\r\n\t\t//\r\n\t\tViewPager pager = (ViewPager)super.findViewById(R.id.viewpager);\r\n\t\tpager.setAdapter(this.mPagerAdapter);\r\n\t\tpager.setCurrentItem(1);\t// Set the default page to Main Dash Board\r\n\t}", "@Override\n\tprotected void initOwnPageComponents() {\n\t\tLOG.debug(\"###BtpnBasePage:initPageComponents()====> Start\");\n\t\tsuper.initOwnPageComponents();\n\t\taddSelfCarePageComponents();\n\t\tLOG.debug(\"###BtpnBasePage:initPageComponents()====> End\");\n\t}", "private void Init(){\n /*button_continue = (Button)findViewById(R.id.button_continue);\n textView_welcome = (TextView)findViewById(R.id.textView_welcome);*/\n viewPager_slide = (ViewPager)findViewById(R.id.viewPager_slide);\n dots_layout = (LinearLayout) findViewById(R.id.dots_layout);\n button_retour = (Button)findViewById(R.id.button_retour);\n button_suivant = (Button)findViewById(R.id.button_suivant);\n }", "private void initViewPager() {\n }", "@BeforeAll\n public void beforeAll() {\n driver = browserGetter.getChromeDriver();\n //initialize page object class\n page = PageFactory.initElements(driver, WebElementInteractionPage.class);\n }", "public void init(PageContext context) {\n request = (HttpServletRequest) context.getRequest();\n response = (HttpServletResponse) context.getResponse();\n session = context.getSession();\n application = context.getServletContext();\n out = context.getOut();\n }", "@Override\n\tprotected void init() throws Exception {\n\t\toid = getParameter(\"oid\");\n\t\tif (AppUtil.isEmpty(oid)) {\n\t\t\toid = getArgument(\"oid\");\n\t\t}\n\t\tif (AppUtil.isEmpty(oid)) {\n\t\t\tsetupNewPage();\n\t\t} else {\n\t\t\tsetupEditPage();\n\t\t}\n\t}", "private final void createAppPages() {\r\n\t\t//Instantiate Page objects that have no associated test properties\r\n\t\t//Note that if a test DOES need to specify test properties for one of these pages\r\n\t\t// (e.g., search terms), it can create its own local version of the page, and pass\r\n\t\t// the pagePropertiesFilenameKey argument, OR create it here, by calling createPage\r\n\t\t// instead of createStaticPage\r\n\r\n\t\t//Can also instantiate regular (i.e., with associated test properties) DD-specific\r\n\t\t// Page objects here, but typically it is best for the test or utility methods to do that;\r\n\t\t// if we do it here we may end up creating Page objects that never get used.\r\n }", "public PersonalPage() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "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}", "public void addPages() {\n\t\tpage = new NewTotoriWizardPage(selection);\n\t\taddPage(page);\n\t}", "@Override\r\n\tprotected void initPage() {\n\t\t\r\n\t\t\r\n\t\tJPanel paneLabel = new JPanel();\r\n\t\t//JPanel panelTabs = new JPanel();\r\n\t\t\r\n\t\t\r\n\t\t//pack.setVisible(false);\r\n\r\n\t\t//setlay out\r\n\t\t//panelTabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add label to label panel\r\n\t\tpaneLabel.add(new JLabel(\"Please select Objects To export\"));\r\n\t\t//tabs.setLayout(new GridLayout(1, 1));\r\n\t\t\r\n\t\t//add tabs\r\n\t\ttabs.addTab(\"Packages\", null, pack, \"Packages\");\r\n\t\ttabs.addTab(\"Functions\", null, fun, \"Functions\");\r\n\t\ttabs.addTab(\"Procedures\", null, proc, \"Procedures\");\r\n\t\ttabs.addTab(\"Schemas\", null, sch, \"Schemas\");\r\n\t\t\r\n\t\t\r\n\t\ttabs.setTabPlacement(JTabbedPane.TOP);\r\n\t\t\r\n\t\t//add tabs to tabpanel panel\r\n\t\t//panelTabs.add(tabs);\r\n\t\t\r\n\t\t//add data tables to panels\r\n\t\tpackTbl = new JObjectTable(pack);\r\n\t\tfunTbl = new JObjectTable(fun);\r\n\t\tschTbl = new JObjectTable(sch);\r\n\t\tprocTbl = new JObjectTable(proc);\r\n\t\t\r\n\t\t//set layout\r\n\t\tsetLayout(new GridLayout(1,1));\r\n\t\t\r\n\t\t//add label & tabs to page panel\r\n\t\t//add(paneLabel, BorderLayout.NORTH);\r\n\t\t//add(panelTabs,BorderLayout.CENTER);\r\n\t\tadd(tabs);\r\n\t\t\r\n\t\t//init select all check boxes\r\n\t\tinitChecks();\r\n\t\t\r\n\t\t//add checks to panel\r\n\t\tpack.add(ckPack);\r\n\t\tfun.add(ckFun);\r\n\t\tsch.add(ckSchema);\r\n\t\tproc.add(ckProc);\r\n\t\t\r\n\t}", "@Override\n protected void init(VaadinRequest request) {\n\n // html <title> attribute\n getPage().setTitle(\"Patient Management System\");\n\n // instantiate a full screen layout and add it\n VerticalLayout layout = new VerticalLayout();\n layout.setSizeFull();\n setContent(layout);\n\n // header row\n layout.addComponent(getHeader());\n\n // main container\n HorizontalLayout main = getMainContainer();\n layout.addComponent(main);\n layout.setExpandRatio(main, 1.0f); // make main container use all available space\n main.addComponent(getNavigation());\n VerticalLayout canvas = getCanvas();\n main.addComponent(canvas);\n\n // tell the navigation to use\n navigator = new Navigator(this, canvas);\n\n // Assembles all presenters/views and adds them to the navigator\n initializeClasses();\n\n // Navigates to the startpage\n navigator.navigateTo(JournalView.NAME);\n\n }", "public HeaderSettingsPage()\n {\n initialize();\n }", "private void initialization() {\n\t\tprogressbar = (ProgressBar) findViewById(R.id.progressBar1);\n\t\tprogressbar.getIndeterminateDrawable().setColorFilter(0xFFFFC107,\n\t\t\t\tandroid.graphics.PorterDuff.Mode.MULTIPLY);\n\t\ttheBrow = (WebView) findViewById(R.id.clickBrower);\n\t\trel = (RelativeLayout) findViewById(R.id.reL);\n\t\tbringBack = (Button) findViewById(R.id.bBack);\n\t\tbringForward = (Button) findViewById(R.id.bForward);\n\t\tbRefresh = (Button) findViewById(R.id.brefresh);\n\t\tinputText = (EditText) findViewById(R.id.editUrl);\n\t\tbingo = (Button) findViewById(R.id.bGo);\n\t}", "private void initialize() {\r\n this.setSize(new Dimension(800,600));\r\n this.setContentPane(getJPanel());\r\n\r\n List<String> title = new ArrayList<String>();\r\n title.add(\"Select\");\r\n title.add(\"Field Id\");\r\n title.add(\"Field Name\");\r\n title.add(\"Field Type\");\r\n title.add(\"Image\");\r\n\r\n List<JComponent> componentList = new ArrayList<JComponent>();\r\n componentList.add(checkInit);\r\n componentList.add(fieldIdInit);\r\n componentList.add(filedNameInit);\r\n componentList.add(fieldTypeInit);\r\n componentList.add(imageButton);\r\n\r\n String []arrColumn = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n String []arrTitle = {\"SELECT\", \"FIELD_ID\", \"FIELD_NAME\", \"FIELD_TYPE\", \"FIELD_VALUE\"};\r\n // init grid\r\n grid = new GridUtils(pageSheet, title, componentList, arrColumn, preButton, afterButton, 5, arrTitle);\r\n // set title\r\n grid.setPageInfo(pageInfoLbl);\r\n \r\n searchDetailList();\r\n \r\n initComboBox();\r\n \r\n setTitle(\"Page Select page\");\r\n\t}", "public SettingPage() {\n\t\tPageFactory.initElements(driver, this);\t\t\n\t}", "private void initViews() {\n setActionBarTitle(R.string.my_energy_metabolism);\n mViewPager = (CustomViewPager) findViewById(R.id.viewPager);\n }", "public void initialize() {\n easyButton.setOnMouseClicked(e -> {\n if (e.getButton().equals(MouseButton.PRIMARY)) {\n Generator generator = new NumberGenerator(Difficulty.EASY);\n Main.pushPage(new PronunciationPage(\"Practice - Easy\", generator));\n }\n });\n\n hardButton.setOnMouseClicked(e -> {\n if (e.getButton().equals(MouseButton.PRIMARY)) {\n Generator generator = new NumberGenerator(Difficulty.HARD);\n Main.pushPage(new PronunciationPage(\"Practice - Hard\", generator));\n }\n });\n\n // Disables hard mode if it is not unlocked yet\n hardButton.setDisable(!StatsManager.manager().practiceUnlocked());\n hardLabel.setDisable(!StatsManager.manager().practiceUnlocked());\n }", "public void loadStartPage()\n\t{\n\t}", "void initialise(){\n tabLayout = findViewById(R.id.tabLayout);\n viewPager = findViewById(R.id.view_pager);\n PageAdapter pagerAdapter = new PageAdapter(getSupportFragmentManager(), 3);\n viewPager.setAdapter(pagerAdapter);\n sharedPreferences = getSharedPreferences(SHARED_PREF, MODE_PRIVATE);\n }", "public UserPage()\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "private void inicialize() {\n\t\t\n\t\t/**\n\t\t * Labels e textField of the page:\n\t\t * Nome\n\t\t * Descrição\n\t\t */\n\n\t\tJLabel lblNome = new JLabel(\"Nome\");\n\t\tlblNome.setBounds(5, 48, 86, 28);\n\t\tlblNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblNome);\n\t\t\n\t\tJLabel lblDescricao = new JLabel(\"Descrição\");\n\t\tlblDescricao.setBounds(5, 117, 86, 51);\n\t\tlblDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\tcontentPanel.add(lblDescricao);\n\t\t\n\t\ttextFieldNome = new JTextField();\n\t\ttextFieldNome.setBounds(103, 45, 290, 35);\n\t\ttextFieldNome.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldNome.setColumns(10);\n\t\tcontentPanel.add(textFieldNome);\n\t\t\n\t\ttextFieldDescricao = new JTextArea();\n\t\ttextFieldDescricao.setBackground(Color.WHITE);\n\t\ttextFieldDescricao.setLineWrap(true);\n\t\ttextFieldDescricao.setBounds(101, 118, 290, 193);\n\t\ttextFieldDescricao.setFont(new Font(\"Dubai Light\", Font.PLAIN, 13));\n\t\ttextFieldDescricao.setColumns(10);\n\t\tcontentPanel.add(textFieldDescricao);\n\n\t\t/**\n\t\t * Confirmation panel\n\t\t * Confirmation button\n\t\t * Cancellation button\n\t\t */\n\n\t\tpainelConfirmacaoSetup();\n\t}", "public BasePageObject() {\n this.driver = BrowserManager.getInstance().getDriver();\n this.wait = BrowserManager.getInstance().getWait();\n PageFactory.initElements(driver, this);\n }", "protected void doInit(String titlepageid) {\n if (titlepageid != null) {\n title = titlepageid;\n pageid = titlepageid;\n stringaPageIds = titlepageid;\n domain = this.getDomain();\n super.doInit();\n }// fine del blocco if\n }", "private void initializePager() {\n\t\tmViewPager = (ViewPager) root.findViewById(R.id.pager);\r\n\t\t// Create the adapter that will return a fragment for each of the three\r\n\t\t// primary sections of the app.\r\n\t\tthis.mSectionAdapter = new SectionAdapter(getSupportFragmentManager(),\r\n\t\t\t\tthis, mViewPager);\r\n\t\tmViewPager.setAdapter(mSectionAdapter);\r\n\t\tmViewPager.setOnPageChangeListener(new OnPageChangeListener() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageScrolled(int arg0, float arg1, int arg2) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onPageSelected(int arg0) {\r\n\t\t\t\t// Configurations.getConfigs().setAdapterSection(arg0);\r\n\t\t\t}\r\n\r\n\t\t});\r\n\t\tmViewPager.setOffscreenPageLimit(6);\r\n\t}", "public HomePageAustria() {\n\t\tPageFactory.initElements(driver, this);\n\t}", "public HomePage() {\n initComponents();\n }", "public HomePage() {\n initComponents();\n }", "public LoginPage(){\n PageFactory.initElements(driver, this); //all vars in this class will be init with this driver\n }", "@Override\n\tprotected void initializeUIMap()\n\t{\n\t\tlibManhattanCommonFunctions = new ManhattanCommonFunctions(scriptHelper);\n\t\tif (getCurrentPage(\"WavesPage\"))\n\t\t\treport.updateTestLog(\"Waves Page verification\", \"Waves loaded as expected.\", Status.DONE);\n\t\telse\n\t\t\treport.updateTestLog(\"Waves Page verification\", \"Waves page loaded not loaded!!!!\", Status.FAIL);\n\t}", "@Override\n\tpublic void addPages() {\n\t\tthis.mainPage = new SNLFilePage(this.workbench, this.selection);\n\t\tthis.addPage(this.mainPage);\n\t}", "private void initialize() {\n\t\tdisenioVentana();\n\n\t\tdisenioMenu();\n\n\t\tdisenio_Cuerpo();\n\n\t}", "protected void initialize() {\n\t\tthis.initializeFileMenu();\n\t\tthis.initializeEditMenu();\n\t\tthis.initializeNavigationMenu();\n\t\tthis.initializeHelpMenu();\n\t}", "public Loginpage()\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "public ifrmHomePage() {\n initComponents();\n }", "protected void construct()\n\t{\n\t\tassert(driver != null);\n\t\t// V�rification que l'on est bien sur la bonne page\n\t String sTitle = driver.getTitle();\n\t\tif(!sTitle.equals(TITLE)) {\n throw new IllegalStateException(\"This is not Login Page, current page is: \" +driver.getCurrentUrl());\n\t\t}\t\t\n\t\ttbUserName = driver.findElement(ByUserName);\n\t\ttbPassword = driver.findElement(ByPassword);\n\t\tbtnConnect = driver.findElement(ByConnect);\n\t}", "@BeforeAll\n public static void classSetup() {\n\n loginPage = new LoginPage();\n }", "public LoginPage()\r\n\t{\r\n\t\tPageFactory.initElements(driver,this);\r\n\t}", "@Override\n\tprotected void initializeUIMap()\n\t{\n\t\tlibManhattanCommonFunctions = new ManhattanCommonFunctions(scriptHelper);\n\t\tif (getCurrentPage(\"PackWavePage\"))\n\t\t\treport.updateTestLog(\"Pack Waves Page verification\", \"Pack Waves loaded as expected.\", Status.DONE);\n\t\telse\n\t\t\treport.updateTestLog(\"Pack Waves Page verification\", \"Pack Waves page loaded not loaded!!!!\", Status.FAIL);\n\t}", "public LandRYSettingPage() {\n initComponents();\n }", "@BeforeMethod\n\tpublic void setup() {\n\t\tinitialization();\n\t\tloginpage = new LoginPage();\n\t\tcontactpage=new ContactPage();\n\t\ttestutil = new TestUtil();\n\t\thomepage=loginpage.login(prop.getProperty(\"username\"), prop.getProperty(\"password\"));\n\t}", "@Override\n public void addPages() {\n super.addPages();\n page1 = new NewReviewWizardPage();\n addPage(page1);\n }", "@Override\n\tpublic void addPages() {\n\t\t_fileWizard = new NewPlotFilenameWizardPage(selection);\n\t\t_scaleWizard = new ScaleWizardPage(selection);\n\t\t_coastWizard = new CoastWizardPage(selection);\n\t\t_gridWizard = new GridWizardPage(selection);\n\n\t\t// check there's ETOPO data before we add the page\n\t\t_etopoWizard = new ETOPOWizardPage(selection);\n\n\t\taddPage(_fileWizard);\n\t\taddPage(_scaleWizard);\n\t\taddPage(_coastWizard);\n\t\taddPage(_gridWizard);\n\t\tif (_etopoWizard.isAvailable())\n\t\t\taddPage(_etopoWizard);\n\t}", "public DocsAppHomePO ()\n\t{\n\t\tPageFactory.initElements(driver, this);\n\t}", "@Override\n public void establish() {\n logger.info(\"Opening page {}...\", pageObject);\n initializePage();\n pageObject.open();\n }", "private void initialize() {\n this.setSize(394, 201);\n\n this.addTab(\"看病人基本資料\", null, getSeePatientFoundamentalDataPanel(), null);\n this.addTab(\"看病歷\", null, getSeeCaseHistoryPanel(), null);\n this.addTab(\"查藥品庫存\", null, getSeeMedicinesPanel(), null);\n this.addTab(\"看檢查報告\", null, getSeeInspectionReportPanel(), null);\n this.addTab(\"看掛號病人\", null, getSeeRegisteredPatientFoundamentalDataPanel(), null);\n this.addTab(\"開藥單\", null, getWritePrescriptionPanel(), null);\n this.addTab(\"寫病歷\", null, getWriteCaseHistoryPanel(), null);\n this.addTab(\"決定病人住院\", null, getDecideHospitalizePanel(), null);\n this.addTab(\"急診\", null, getEmergencyTreatmentPanel(), null);\n }", "public void onModuleLoad() {\n \t\tMainPage.currentPage = this;\n \t\t\n \t\tif(Window.Location.getHash().length() == 0){\n \t\t\tloggedIn = false;\n \t\t}else{\n \t\t\tloggedIn = true;\n \t\t}\n \t\t\n \t\tinitUI();\n \t\t\n \t\tif(loggedIn){\n \t\t\tsetStatus(\"fetching JSON...\", false);\n \t\t\tfbFetcher.fetchNeededJSON();\n \t\t}\n \t\t\n \t}", "private void initViews() {\n\t\tmViewPager = (ViewPager) findViewById(R.id.view_pager); \n mIndicator = (IconTabPageIndicator) findViewById(R.id.indicator); \n fragments = initFragments(); \n FragmentAdapter adapter = new FragmentAdapter(fragments, getSupportFragmentManager()); \n mViewPager.setAdapter(adapter); \n mIndicator.setViewPager(mViewPager); \n mViewPager.setCurrentItem(whichPage);\n \n \n \n\t}", "public void addPages() {\t\t\n\t\tpage1 = new Opera2ActionsTransformationWizardPage1(selection, operaModel);\n\t\taddPage(page1);\t\n\t}", "public void loadPage() {\n\t\tLog.i(TAG, \"MyGardenListActivity::LoadPage ! Nothing to do anymore here :)\");\n\t}", "public Homepage() {\n initComponents();\n }", "public SearchPage() {\n\t\tPageFactory.initElements(driver, this);\n\t\t\n\t}", "public void addPages() {\n\t\t\n\t\tProjectUtils projectUtils = new ProjectUtils();\n\t\tIProject proj = projectUtils.getProject(selection);\n\t\t\n\t\t\n\t\t\n\t\tDb db = loadDBParams();\n\t\tDBConnection dbConn = new DBConnection();\n\t\tConnection connection = null;\n\t\t\n\t\t\n\t\ttry {\n\t\t\tconnection = dbConn.loadDriver(proj.getLocation()+\"/\"+db.getDriverClassPath(), db.getDriverClass(), db.getDatabaseURL(), db.getUserName(), db.getPassWord());\n\t\t} catch (MalformedURLException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (InstantiationException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IllegalAccessException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t\tpage = new SmartNewWizardPage(selection, connection, proj.getLocation().toString());\n\t\taddPage(page);\n\n\t}", "public final void init() {\n connectDB();\n\n initMainPanel();\n\n initOthers();\n }", "@Override\n public void PageFistLoad() {\n }", "@Override\n protected void init() {\n viewModel.setNavigator(this);\n setUp();\n subscribeToLiveData();\n\n setUpNotificationUi();\n setUpNotification();\n\n setUpAds();\n\n viewModel.start(getCurrentVersionOfApp());\n }", "@BeforeMethod\n\tpublic void setUp() {\n\t\tdriver = new FirefoxDriver();\n\t\t\n\t\t// Launch the wikia.com web site\n\t\tdriver.get(WEBSITE_ADDRESS);\n\t\tHomePage = PageFactory.initElements(driver, HomePagePO.class);\n\t\tLoginContainer = PageFactory.initElements(driver, LoginContainerPO.class);\n\t}", "public void initScreen() {\n mScrollview = (ScrollView) findViewById(R.id.ScrollView01);\n \t\n \t// Handle on Header getting from Quote Server\n mHeader = (TextView) findViewById(R.id.header);\n \n // Handle on Quote TextView\n mQuoteTxt = (TextView) findViewById(R.id.quote);\n \n // Set Header to default\n if (mHeaderStr == null)\n \tmHeaderStr = getResources().getString(R.string.default_header_text);\n \n // Handle on ImageSwitcher\n mQuoteImage = (ImageSwitcher) findViewById(R.id.ImageSwitcher01);\n mQuoteImage.setFactory(new MyImageSwitcherFactory());\n \n // Handles on buttons\n\t\tView writeButton = findViewById(R.id.write_button);\n writeButton.setOnClickListener(this); \n View lessonsButton = findViewById(R.id.lessons_button);\n lessonsButton.setOnClickListener(this);\n View websiteButton = findViewById(R.id.website_button);\n websiteButton.setOnClickListener(this);\n View exitButton = findViewById(R.id.exit_button);\n exitButton.setOnClickListener(this);\n \n }", "private void initializeLayout(){\n String title = mStrInfo;\n String subtitle = mClientItem.clientName;\n mHomeToolbar.setGymRatToolbarTitle(title, subtitle);\n\n //initialize maids\n initializeMaid();\n\n //initialize bottom navigation\n initializeBottomNavigation();\n }", "private void initControlsPage()\r\n {\n \tString keyTitleString = \"KEYBOARD\";\r\n \tkeyTitleText = new OText(25, 200, 300, keyTitleString);\r\n \tkeyTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the keyboard movement text\r\n \tString keyMoveString = \"Move Optimus with the WASD keys \"\r\n \t\t\t + \" <br> \"\r\n \t\t\t + \"as if they were the arrow keys.\";\r\n \tkeyMoveText = new OText(25, 225, 300, keyMoveString);\r\n \tkeyMoveText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t\r\n \t//Initialize the mouse title text\r\n \tString mouseTitleString = \"MOUSE\";\r\n \tmouseTitleText = new OText(375, 200, 300, mouseTitleString);\r\n \tmouseTitleText.setFont(\"Courier New\", 20, 1.0, 'C', Settings.themes.textColor);\r\n \t\r\n \t//Initialize the mouse text\r\n \tString mouseMoveString = \"Aim by moving the mouse and shoot bullets from Optimus in the direction of the cursor using both clicks. \";\r\n \tmouseText = new OText(375, 225, 300, mouseMoveString);\r\n \tmouseText.setFont(\"Courier New\", 14, 1.0, 'C', Settings.themes.textColor);\r\n }", "public ContactPage() {\n\t\t\t\n\t\t\t\tPageFactory.initElements(driver, this);\n\t\t\t}", "public page1() {\n initComponents();\n }", "public RegistrationPage() {\t\t\r\n\t\tdriver = DriverManager.getThreadSafeDriver();\r\n\t\tPageFactory.initElements(driver, this);\r\n\t}", "private void initViews() {\n vpSplashPager = findViewById(R.id.vp_splash);\n pageIndicatorView = findViewById(R.id.pageIndicatorView);\n tvSplashDesc = findViewById(R.id.tv_splash_desc);\n tvSplashSkip = findViewById(R.id.tv_splash_skip);\n tvSplashTitle = findViewById(R.id.tv_splash_title);\n }", "private void initUi() {\n mToolbsr = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(mToolbsr);\n\n fab = (FloatingActionButton) findViewById(R.id.fab);\n mDrawerLayout = (DrawerLayout) findViewById(R.id.drawerLayout);\n mNavigationView = (NavigationView) findViewById(R.id.nav_view);\n\n tabLayout = (TabLayout) findViewById(R.id.tabs);\n viewPager = (ViewPager) findViewById(R.id.viewpager);\n }" ]
[ "0.8409635", "0.7713505", "0.7346123", "0.7329833", "0.7286035", "0.72343135", "0.7076804", "0.7069756", "0.70530564", "0.6988811", "0.69671357", "0.69471353", "0.6940762", "0.6913186", "0.6908999", "0.69035834", "0.68730754", "0.6870011", "0.68684095", "0.68393576", "0.6835982", "0.68007326", "0.6771363", "0.6766361", "0.67595714", "0.67595714", "0.67595714", "0.67595714", "0.6754739", "0.67505497", "0.67501086", "0.6747314", "0.6736007", "0.6728159", "0.6672552", "0.6662556", "0.6643489", "0.6613529", "0.66016215", "0.65988445", "0.65986246", "0.6579372", "0.6561844", "0.65530723", "0.65420836", "0.6535357", "0.6533534", "0.6492217", "0.6452908", "0.64517254", "0.6449726", "0.64371973", "0.6433347", "0.64300513", "0.64291817", "0.64252543", "0.6423987", "0.642149", "0.6403793", "0.63939935", "0.63908905", "0.6388501", "0.6387894", "0.6387894", "0.63863814", "0.63791466", "0.63592714", "0.63564587", "0.6351674", "0.6351048", "0.63504356", "0.63497806", "0.6349026", "0.6344319", "0.63426167", "0.6339559", "0.6337073", "0.63261604", "0.6319397", "0.63162977", "0.63033164", "0.6299429", "0.6298043", "0.62908953", "0.62841654", "0.62720203", "0.62613046", "0.62603855", "0.62479085", "0.62361896", "0.62324375", "0.6230542", "0.6224118", "0.62237424", "0.62205553", "0.622008", "0.6218503", "0.6211947", "0.6207349", "0.6207234", "0.62057674" ]
0.0
-1
close existing dialog fragments
public void onClick(View view) { FragmentManager manager = getFragmentManager(); Fragment frag = manager.findFragmentByTag("fragment_edit_name"); if (frag != null) { manager.beginTransaction().remove(frag).commit(); } switch (view.getId()) { case R.id.showcustom: Lab6MyDialogFragment editNameDialog = new Lab6MyDialogFragment(); editNameDialog.show(manager, "fragment_edit_name"); break; case R.id.showalert: Lab6MyAlertDialogFragment alertDialogFragment = new Lab6MyAlertDialogFragment(); alertDialogFragment.show(manager, "fragment_edit_name"); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(DialogInterface dialog, int which) {\n getActivity().finish();\n }", "@Override\n\t\t\t\tpublic void onDismiss(DialogInterface dialog) {\n\t\t\t\t\tfinish();\n\t\t\t\t\t\n\t\t\t\t}", "public void endGame(){\n\n WinnerDialog dialog = new WinnerDialog();\n dialog.show(getSupportFragmentManager(), \"winner\");\n\n\n\n\n }", "private void closeFragment() {\n dateET.setText(\"\");\n timeET.setText(\"\");\n descET.setText(\"\");\n locET.setText(\"\");\n\n emotionRadioGroup.clearCheck();\n for (int i = 0; i < emotionRadioGroup.getChildCount(); i++) {\n RadioButton currentButton = (RadioButton) emotionRadioGroup.getChildAt(i);\n currentButton.getBackground().setColorFilter(Color.WHITE, PorterDuff.Mode.MULTIPLY);\n }\n\n if (navController != null)\n navController.navigate(R.id.navigation_own_list);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int buttonId) {\n getActivity().getFragmentManager().beginTransaction().remove(OpenCompositionFragment.this).commit();\n\n\n if (listener != null) {\n // Tell the listener about the deletion...\n listener.compositionMarkedForDeletionFromFragment(OpenCompositionFragment.this, selectedComposition);\n }\n\n }", "void showDialog2(int i) {\n FragmentTransaction ft = getSupportFragmentManager().beginTransaction();\n Fragment prev = getSupportFragmentManager().findFragmentByTag(\"dialog\");\n if (prev != null) {\n Log.d(TAG, \"dialog is already showing!!!\");\n// DialogFragment df = (DialogFragment) prev;\n// df.dismiss();\n ft.remove(prev);\n }\n\n // Create and show the dialog.\n DialogFragment newFragment = MyDialogFragment.newInstance(i);\n newFragment.show(ft, \"dialog\");\n }", "@Override\n public void onClick(View v) {\n\n\n finish();\n\n dialog.dismiss();\n }", "protected void closeOnBack(){\n PosNegDialog dialog = new PosNegDialog(\"אזהרה\", \"אם תלחץ על המשך, המשחק יגמר.\\nלהמשיך?\",\n \"המשך\",\"ביטול\", ()-> {\n Intent exit = new Intent(getApplicationContext(), MainActivity.class);\n initGame();\n startActivity(exit);\n }\n ,()->{});\n dialog.show(getSupportFragmentManager(),\"closeOnBack\");\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.dismiss();\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int i) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int id) {\n finish();\n }", "public void onClick(DialogInterface dialog, int id) {\n finish();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int id) {\n\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog,int id) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int id) {\n \t finish();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }", "public void closeDialog()\r\n\t{\r\n\t\tharmonyModel.getDialogManager().unlockFrame();\r\n\t}", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n\n\n\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View view) {\n dialog.dismiss();\n\n }", "@Override\n public void onCancel(DialogInterface dialog) {\n finish();\n }", "public void onClick(DialogInterface dialog,int id) {\n\t\t\t\tPartidaActivity.this.finish();\r\n\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }", "public void newGame_close(View view) {\n dialog_newGame.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t}", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\r\n }", "public void onClick(DialogInterface dialog,int id) {\n DialogActivity.this.finish();\n }", "public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n \t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n \t\t\t\t\t\tdialog.dismiss();\n \t\t\t\t\t\tdialog = null;\n \t\t\t\t\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n dialog.dismiss();\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "@Override\n public void onClick(View v) {\n\n dialog.dismiss();\n\n }", "public void onClick(DialogInterface dialog, int id) {\n getDialog().dismiss();\n }", "@Override\r\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\r\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }", "public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which)\n {\n finish();\n }", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "@Override\r\n\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\tdialog.dismiss();\r\n\t\t\t\t}", "public void onClick(DialogInterface dialog, int which) {\n Toast.makeText(getActivity().getApplicationContext(), \"You clicked on CLOSE\", Toast.LENGTH_SHORT).show();\r\n }", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}", "@Override\n public void onBtnClick() {\n dialog.dismiss();\n }", "@Override\r\n\t public void onClick(DialogInterface dialog, int id) {\n\t \tdialog.dismiss();\r\n\t }", "@Override\r\n\t public void onClick(DialogInterface dialog, int id) {\n\t \tdialog.dismiss();\r\n\t }" ]
[ "0.73849463", "0.7332378", "0.7204914", "0.71837026", "0.7144843", "0.7131134", "0.7118254", "0.70496076", "0.7037805", "0.7002173", "0.70018256", "0.6997868", "0.6984559", "0.69788927", "0.69788927", "0.6969674", "0.69500315", "0.6943065", "0.6940871", "0.6940871", "0.6939406", "0.6936916", "0.6920148", "0.6920148", "0.6920148", "0.6920148", "0.6920148", "0.6920148", "0.6920148", "0.6920148", "0.69190747", "0.69190747", "0.6918068", "0.6904521", "0.6904521", "0.6901899", "0.6898952", "0.6895862", "0.68940336", "0.68940336", "0.68940336", "0.68874156", "0.68874156", "0.68874156", "0.68874156", "0.68874156", "0.68874156", "0.68863344", "0.6883448", "0.68773776", "0.6876794", "0.68738925", "0.6868731", "0.6868111", "0.6863863", "0.6862517", "0.68611217", "0.6850316", "0.6840486", "0.6840486", "0.6840486", "0.6840486", "0.6840486", "0.6840486", "0.6837605", "0.6837605", "0.6837605", "0.6837605", "0.6834511", "0.68296736", "0.68296736", "0.68296736", "0.6827189", "0.6823721", "0.6823126", "0.68221974", "0.68182087", "0.68154466", "0.68149227", "0.6813469", "0.6813469", "0.6811997", "0.6811997", "0.6811997", "0.6811997", "0.6811997", "0.68099564", "0.6799159", "0.67939276", "0.67939276", "0.6792964", "0.6788219", "0.6788219", "0.67832655", "0.6783129", "0.6783129", "0.6783129", "0.6783129", "0.67788005", "0.6771813", "0.6771813" ]
0.0
-1
TODO Autogenerated method stub Range
@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if (isChecked){ calendar.init(new Date(), nextYear.getTime()) // .inMode(SelectionMode.RANGE) // .withSelectedDates(dates); switchMode.setText(R.string.Range); } //Multiple else{ calendar.init(new Date(), nextYear.getTime()) // .inMode(SelectionMode.MULTIPLE) // .withSelectedDates(dates); switchMode.setText(R.string.Multiple); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getRange() {\n\t\treturn range;\n\t}", "int getRange();", "private Range() {}", "public int getRange()\n\t{\n\t\treturn Range;\n\t}", "@Override\n public boolean isRange() {\n return false;\n }", "Range createRange();", "abstract public Range createRange();", "public double getRange(){\n\t\treturn range;\n\t}", "void calculateRange() {\n //TODO: See Rules\n }", "public int getRange() {\n return mRange;\n }", "Range() {}", "public String getRange() {\n return this.range;\n }", "RangeValue createRangeValue();", "public void setRange(Range range) { setRange(range, true, true); }", "VocNoun getRange();", "Range controlLimits();", "public AddressInfo getRange() {\r\n return range;\r\n }", "@JSProperty(\"range\")\n double getRange();", "CollectionRange createCollectionRange();", "public boolean isRange() {\r\n return range;\r\n }", "public DateRange getDateRange();", "@Override\r\n public String toString() {\r\n return \"Range [\" + \"min=\" + min + \", max=\" + max + \"]\";\r\n }", "public double[] getRange() \n{\n\treturn range;\n}", "public void getRange()\n\t{\n\t\tint start = randInt(0, 9);\n\t\tint end = randInt(0, 9);\t\t\n\t\tint startNode = start<=end?start:end;\n\t\tint endNode = start>end?start:end;\n\t\tSystem.out.println(\"Start : \"+startNode+\" End : \"+endNode);\n\t}", "ValueRangeConstraint createValueRangeConstraint();", "public java.lang.String getRange() {\n\t\treturn _range;\n\t}", "public double[] getRange(){\n\treturn RANGE;\n }", "void assignRange() {\n rangeIndex = (int) Math.floor(value / step);\n }", "public Uri getRange()\n {\n return range;\n }", "public HttpRange getRange() {\n return range;\n }", "boolean HasRange() {\r\n\t\treturn hasRange;\r\n\t}", "public abstract Self byteRange(byte min, byte max);", "@Override\r\n public void addRangeClass(AgeClass rgCls)\r\n {\n \r\n range.add(rgCls);\r\n }", "private void add_range(Question q)\n\t{\n\t\tlog.debug(\"Question \" + q.getQid() + \" is getting checked for ranges\");\n\t\tString min = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='min_num_value_n']/value\").getText();\n\t\tString max = doc.selectSingleNode(\"//document/question_attributes/rows/row[qid=\" + q.getQid() + \" and attribute='max_num_value_n']/value\").getText();\n\n\t\tif (min != \"\") {\n\t\t\tq.setFloat_range_min(min);\n\t\t}\n\t\tif (max != \"\") {\n\t\t\tq.setFloat_range_max(max);\n\t\t}\n\t\tlog.debug(\"range check finished\");\n\t}", "protected abstract R toRange(D lower, D upper);", "@Override\n public int between(int min, int max) {\n return super.between(min, max);\n }", "@JSProperty(\"range\")\n void setRange(double value);", "public void setRange(boolean range) {\r\n this.range = range;\r\n }", "public long getRangeStart() {\n return mRangeStart;\n }", "public LongRange(long number) {\n/* 73 */ this.min = number;\n/* 74 */ this.max = number;\n/* */ }", "public int getEffectiveRange() {\n return effectiveRange;\n }", "@Override\r\n\tpublic String getActivity_range() {\n\t\treturn super.getActivity_range();\r\n\t}", "protected abstract R getRange(E entry);", "@Override\n\tpublic List<IRange> getRangeList() {\n\t\treturn null;\n\t}", "public void setRangeStart(@IntRange(from = MIN_NUMBER) long start) {\n setRange(start, mRange, mIsPositive);\n }", "int range() {\n\t\treturn mpg * fuelcap;\n\t}", "private int RangeCount()\n\t{\n\t\treturn _rangelist.size();\n\t}", "RangeInfo(int type, float min, float max, float current) {\n/* 3044 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "public Range(Double val) {\n\t\tminSum = maxSum = val;\n\t\tupdated = false;\n\t}", "public double getRange(){\n\n double range = fuelRemaining * fuelEconomy;\n return range;\n }", "public int getRangeActive(){\n\t\treturn rangeActive;\n\t}", "public AdornmentTypeRange(final int min, final int max) {\n\t\tthis.maxInteger = max;\n\t\tthis.minInteger = min;\n\t}", "String getEndRange();", "public abstract ucar.array.RangeIterator getRangeIterator();", "public void addRange(int range) {\n this.range += range;\n if(this.range <= 0)\n this.range = 1;\n }", "public double[] getRange();", "int range(){\n return fuelcap*mpg;\n }", "private Range() {\n this.length = 0;\n this.first = 0;\n this.last = -1;\n this.stride = 1;\n this.name = \"EMPTY\";\n }", "RangeOfValuesType createRangeOfValuesType();", "public void setRange(@IntRange(from = MIN_RANGE) int range) {\n setRange(mRangeStart, range, mIsPositive);\n }", "private SingleRange GetRangeAt(int i)\n\t{\n\t\treturn _rangelist.get(i);\n\t}", "public abstract double getRangeSize();", "String getBeginRange();", "@Override\r\n\tpublic String getApp_activity_range() {\n\t\treturn super.getApp_activity_range();\r\n\t}", "public Range getRangeX(double lowerPercent, double upperPercent, \n PlotRenderingInfo info, Point2D source) {\n \t\t\n \t double start = super.getDomainAxis().getRange().getLowerBound();\n double length = super.getDomainAxis().getRange().getLength();\n Range adjusted = null;\n if (super.getDomainAxis().isInverted()) {\n adjusted = new Range(start + (length * (1 - upperPercent)), \n start + (length * (1 - lowerPercent))); \n }\n else {\n adjusted = new Range(start + length * lowerPercent, \n start + length * upperPercent);\n }\n return adjusted;\n }", "Range alarmLimits();", "public final CQLParser.rangeFunction_return rangeFunction() throws RecognitionException {\n CQLParser.rangeFunction_return retval = new CQLParser.rangeFunction_return();\n retval.start = input.LT(1);\n\n Object root_0 = null;\n\n Token openType=null;\n Token closeType=null;\n Token RANGE148=null;\n Token char_literal149=null;\n CQLParser.expression_return e = null;\n\n CQLParser.expression_return rangeStart = null;\n\n CQLParser.expression_return rangeEnd = null;\n\n\n Object openType_tree=null;\n Object closeType_tree=null;\n Object RANGE148_tree=null;\n Object char_literal149_tree=null;\n RewriteRuleTokenStream stream_116=new RewriteRuleTokenStream(adaptor,\"token 116\");\n RewriteRuleTokenStream stream_117=new RewriteRuleTokenStream(adaptor,\"token 117\");\n RewriteRuleTokenStream stream_114=new RewriteRuleTokenStream(adaptor,\"token 114\");\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\n RewriteRuleTokenStream stream_115=new RewriteRuleTokenStream(adaptor,\"token 115\");\n RewriteRuleTokenStream stream_118=new RewriteRuleTokenStream(adaptor,\"token 118\");\n RewriteRuleSubtreeStream stream_expression=new RewriteRuleSubtreeStream(adaptor,\"rule expression\");\n errorMessageStack.push(\"RANGE definition\"); \n try {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:2: ( RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' ) -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd) )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:4: RANGE e= expression ( (openType= '[' ) | (openType= '(' ) ) rangeStart= expression ',' rangeEnd= expression (closeType= ')' | closeType= ']' )\n {\n RANGE148=(Token)match(input,RANGE,FOLLOW_RANGE_in_rangeFunction2480); \n stream_RANGE.add(RANGE148);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2484);\n e=expression();\n\n state._fsp--;\n\n stream_expression.add(e.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:23: ( (openType= '[' ) | (openType= '(' ) )\n int alt41=2;\n int LA41_0 = input.LA(1);\n\n if ( (LA41_0==117) ) {\n alt41=1;\n }\n else if ( (LA41_0==114) ) {\n alt41=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 41, 0, input);\n\n throw nvae;\n }\n switch (alt41) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:24: (openType= '[' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:25: openType= '['\n {\n openType=(Token)match(input,117,FOLLOW_117_in_rangeFunction2490); \n stream_117.add(openType);\n\n\n }\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:41: (openType= '(' )\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:42: openType= '('\n {\n openType=(Token)match(input,114,FOLLOW_114_in_rangeFunction2498); \n stream_114.add(openType);\n\n\n }\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_expression_in_rangeFunction2504);\n rangeStart=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeStart.getTree());\n char_literal149=(Token)match(input,115,FOLLOW_115_in_rangeFunction2506); \n stream_115.add(char_literal149);\n\n pushFollow(FOLLOW_expression_in_rangeFunction2510);\n rangeEnd=expression();\n\n state._fsp--;\n\n stream_expression.add(rangeEnd.getTree());\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:103: (closeType= ')' | closeType= ']' )\n int alt42=2;\n int LA42_0 = input.LA(1);\n\n if ( (LA42_0==116) ) {\n alt42=1;\n }\n else if ( (LA42_0==118) ) {\n alt42=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 42, 0, input);\n\n throw nvae;\n }\n switch (alt42) {\n case 1 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:104: closeType= ')'\n {\n closeType=(Token)match(input,116,FOLLOW_116_in_rangeFunction2515); \n stream_116.add(closeType);\n\n\n }\n break;\n case 2 :\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:504:119: closeType= ']'\n {\n closeType=(Token)match(input,118,FOLLOW_118_in_rangeFunction2520); \n stream_118.add(closeType);\n\n\n }\n break;\n\n }\n\n\n\n // AST REWRITE\n // elements: openType, e, rangeEnd, rangeStart, closeType, RANGE\n // token labels: closeType, openType\n // rule labels: retval, e, rangeStart, rangeEnd\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleTokenStream stream_closeType=new RewriteRuleTokenStream(adaptor,\"token closeType\",closeType);\n RewriteRuleTokenStream stream_openType=new RewriteRuleTokenStream(adaptor,\"token openType\",openType);\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n RewriteRuleSubtreeStream stream_e=new RewriteRuleSubtreeStream(adaptor,\"rule e\",e!=null?e.tree:null);\n RewriteRuleSubtreeStream stream_rangeStart=new RewriteRuleSubtreeStream(adaptor,\"rule rangeStart\",rangeStart!=null?rangeStart.tree:null);\n RewriteRuleSubtreeStream stream_rangeEnd=new RewriteRuleSubtreeStream(adaptor,\"rule rangeEnd\",rangeEnd!=null?rangeEnd.tree:null);\n\n root_0 = (Object)adaptor.nil();\n // 505:3: -> ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n // /home/chinaski/programming/agile_workspace/ExplorerCat/src/main/antlr3/net/explorercat/cql/parser/CQL.g:505:6: ^( RANGE $e $openType $closeType $rangeStart $rangeEnd)\n {\n Object root_1 = (Object)adaptor.nil();\n root_1 = (Object)adaptor.becomeRoot(stream_RANGE.nextNode(), root_1);\n\n adaptor.addChild(root_1, stream_e.nextTree());\n adaptor.addChild(root_1, stream_openType.nextNode());\n adaptor.addChild(root_1, stream_closeType.nextNode());\n adaptor.addChild(root_1, stream_rangeStart.nextTree());\n adaptor.addChild(root_1, stream_rangeEnd.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n\n retval.stop = input.LT(-1);\n\n retval.tree = (Object)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n errorMessageStack.pop(); \n }\n \t\n \tcatch(RecognitionException re)\n \t{\t\n \t\treportError(re);\n \t\tthrow re;\n \t}\n finally {\n }\n return retval;\n }", "public void setRange(String new_range) {\n\t\t_range = new_range;\n\t}", "public Range ageRange() {\n return getObject(Range.class, FhirPropertyNames.PROPERTY_AGE_RANGE);\n }", "public Range onsetRange() {\n return getObject(Range.class, FhirPropertyNames.PROPERTY_ONSET_RANGE);\n }", "@Test(timeout = 4000)\n public void test10() throws Throwable {\n Range range0 = Range.of(0L);\n range0.toString();\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem0);\n range0.getEnd();\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.ZERO_BASED;\n range0.getEnd(range_CoordinateSystem1);\n range0.iterator();\n Range.of((-1233L), 0L);\n // Undeclared exception!\n try { \n Range.of(range_CoordinateSystem1, 0L, (-1233L));\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public void setEffectiveRange(int value) {\n this.effectiveRange = value;\n }", "<C> CollectionRange<C> createCollectionRange();", "public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }", "@Override\n\tpublic void visit(OWLObjectPropertyRangeAxiom axiom) {\n\t\taddFact(RewritingVocabulary.RANGE, //\n\t\t\t\taxiom.getProperty().asOWLObjectProperty().getIRI(),//\n\t\t\t\taxiom.getRange().asOWLClass().getIRI());\n\n\t}", "public LongRange(long number1, long number2) {\n/* 110 */ if (number2 < number1) {\n/* 111 */ this.min = number2;\n/* 112 */ this.max = number1;\n/* */ } else {\n/* 114 */ this.min = number1;\n/* 115 */ this.max = number2;\n/* */ } \n/* */ }", "public abstract void setRange(double value, int start, int count);", "public int getRangeWidth();", "@Override\r\n\tpublic float getRange() {\r\n\t\tsp.fetchSample(sample, 0);\r\n\r\n\t\treturn sample[0];\r\n\t}", "public ReferenceRange() {\n\t\tsuper();\n\t\tmRr = CDAFactory.eINSTANCE.createReferenceRange();\n\t\tmRr.setObservationRange(getObsR());\n\t\tmRr.setTypeCode(ActRelationshipType.REFV);\n\t\tthis.setInterpretationCode(ObservationInterpretation.NORMAL);\n\t}", "@Override\n public double between(double min, double max) {\n return super.between(min, max);\n }", "public void setRange(Uri range)\n {\n this.range = range;\n }", "public int getMinRange() {\r\n return fMinRange;\r\n }", "public void setRange(double lower, double upper) {\n/* 625 */ if (lower >= upper) {\n/* 626 */ throw new IllegalArgumentException(\"Requires 'lower' < 'upper'.\");\n/* */ }\n/* 628 */ setRange(new DateRange(lower, upper));\n/* */ }", "private void addRangeIntegers() {\r\n ent_2_i.put(\"< 0\", -1); ent_2_i.put(\"== 0\", 0); ent_2_i.put(\"== 1\", 1); ent_2_i.put(\"< 10\", 10);\r\n ent_2_i.put(\"< 100\", 100); ent_2_i.put(\"< 1K\", 1000); ent_2_i.put(\"< 10K\", 10000); ent_2_i.put(\"< 100K\", 100000);\r\n ent_2_i.put(\"> 100K\", 1000000);\r\n }", "@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }", "public final ANTLRv3Parser.range_return range() throws RecognitionException {\r\n ANTLRv3Parser.range_return retval = new ANTLRv3Parser.range_return();\r\n retval.start = input.LT(1);\r\n\r\n\r\n CommonTree root_0 = null;\r\n\r\n Token c1=null;\r\n Token c2=null;\r\n Token RANGE133=null;\r\n ANTLRv3Parser.elementOptions_return elementOptions134 =null;\r\n\r\n\r\n CommonTree c1_tree=null;\r\n CommonTree c2_tree=null;\r\n CommonTree RANGE133_tree=null;\r\n RewriteRuleTokenStream stream_RANGE=new RewriteRuleTokenStream(adaptor,\"token RANGE\");\r\n RewriteRuleTokenStream stream_CHAR_LITERAL=new RewriteRuleTokenStream(adaptor,\"token CHAR_LITERAL\");\r\n RewriteRuleSubtreeStream stream_elementOptions=new RewriteRuleSubtreeStream(adaptor,\"rule elementOptions\");\r\n try {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:2: (c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )? -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? ) )\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:4: c1= CHAR_LITERAL RANGE c2= CHAR_LITERAL ( elementOptions )?\r\n {\r\n c1=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2159); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c1);\r\n\r\n\r\n RANGE133=(Token)match(input,RANGE,FOLLOW_RANGE_in_range2161); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_RANGE.add(RANGE133);\r\n\r\n\r\n c2=(Token)match(input,CHAR_LITERAL,FOLLOW_CHAR_LITERAL_in_range2165); if (state.failed) return retval; \r\n if ( state.backtracking==0 ) stream_CHAR_LITERAL.add(c2);\r\n\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: ( elementOptions )?\r\n int alt61=2;\r\n int LA61_0 = input.LA(1);\r\n\r\n if ( (LA61_0==77) ) {\r\n alt61=1;\r\n }\r\n switch (alt61) {\r\n case 1 :\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:297:42: elementOptions\r\n {\r\n pushFollow(FOLLOW_elementOptions_in_range2167);\r\n elementOptions134=elementOptions();\r\n\r\n state._fsp--;\r\n if (state.failed) return retval;\r\n if ( state.backtracking==0 ) stream_elementOptions.add(elementOptions134.getTree());\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // AST REWRITE\r\n // elements: c2, c1, elementOptions\r\n // token labels: c1, c2\r\n // rule labels: retval\r\n // token list labels: \r\n // rule list labels: \r\n // wildcard labels: \r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = root_0;\r\n RewriteRuleTokenStream stream_c1=new RewriteRuleTokenStream(adaptor,\"token c1\",c1);\r\n RewriteRuleTokenStream stream_c2=new RewriteRuleTokenStream(adaptor,\"token c2\",c2);\r\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\r\n\r\n root_0 = (CommonTree)adaptor.nil();\r\n // 298:3: -> ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:6: ^( CHAR_RANGE[$c1,\\\"..\\\"] $c1 $c2 ( elementOptions )? )\r\n {\r\n CommonTree root_1 = (CommonTree)adaptor.nil();\r\n root_1 = (CommonTree)adaptor.becomeRoot(\r\n (CommonTree)adaptor.create(CHAR_RANGE, c1, \"..\")\r\n , root_1);\r\n\r\n adaptor.addChild(root_1, stream_c1.nextNode());\r\n\r\n adaptor.addChild(root_1, stream_c2.nextNode());\r\n\r\n // C:/dev/antlr.github/antlr/tool/src/main/antlr3/org/antlr/grammar/v3/ANTLRv3.g:298:37: ( elementOptions )?\r\n if ( stream_elementOptions.hasNext() ) {\r\n adaptor.addChild(root_1, stream_elementOptions.nextTree());\r\n\r\n }\r\n stream_elementOptions.reset();\r\n\r\n adaptor.addChild(root_0, root_1);\r\n }\r\n\r\n }\r\n\r\n\r\n retval.tree = root_0;\r\n }\r\n\r\n }\r\n\r\n retval.stop = input.LT(-1);\r\n\r\n\r\n if ( state.backtracking==0 ) {\r\n\r\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\r\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\r\n }\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\r\n\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return retval;\r\n }", "public boolean overlapsRange(Range range) {\n/* 334 */ if (range == null) {\n/* 335 */ return false;\n/* */ }\n/* 337 */ return (range.containsLong(this.min) || range.containsLong(this.max) || containsLong(range.getMinimumLong()));\n/* */ }", "public AdornmentTypeRange(final float min, final float max) {\n\t\tthis.maxFloat = max;\n\t\tthis.minFloat = min;\n\t}", "public int getRangeHeight();", "RangeCoveredRegister(int low, int high, int step) {\n mMode = MODE.LINEAR;\n mStep = step;\n mLow = low;\n mHigh = high;\n init();\n }", "public interface IntervalRange<V extends Comparable<V>> extends Range<V> {\n\n\t/**\n\t * This method returns the lower bound of the interval.\n\t * \n\t * @return the lower bound. <code>null</code> means there is no lower bound,\n\t * i.e., this is an open interval.\n\t */\n\tpublic V getLowerBound();\n\n\t/**\n\t * This method returns the upper bound of the interval.\n\t * \n\t * @return the upper bound. <code>null</code> means there is no upper bound,\n\t * i.e., this is an open interval.\n\t */\n\tpublic V getUpperBound();\n\n}", "@Override\n\tprotected void setLowerBound() {\n\t\t\n\t}", "public SetOfRanges() {\n RangeSet = new Vector();\n }", "public RealRange getReferenceRange(RealRange referenceRange);", "public RangeDate<Vente> getDateRange() {\n return dateRange;\n }", "public void add_Range(Range range_to_add){\n this.range_vector.add(range_to_add);\n }", "private boolean isRangeValid() {\n\n\t\tboolean valid = true;\n\n\t\tif (getRange() == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tLong.parseLong(getRange());\n\t\t} catch (NumberFormatException nfe) {\n\t\t\tvalid = false;\n\t\t}\n\n\t\tvalid = valid || getRange().compareToIgnoreCase(CCLConstants.INDIRECT_RANGE_ALL) == 0;\n\n\t\treturn valid;\n\t}", "public void testFindRangeBounds() {\n XYBlockRenderer renderer = new XYBlockRenderer();\n XYSeriesCollection dataset = new XYSeriesCollection();\n XYSeries series = new XYSeries(\"S1\");\n series.add(1.0, null);\n dataset.addSeries(series);\n Range r = renderer.findRangeBounds(dataset);\n }", "@Test(timeout = 4000)\n public void test046() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32740L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.RESIDUE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32740 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.startsBefore(range0);\n range1.equals(range0);\n range0.equals(\"[ 32740 .. 2147483646 ]/0B\");\n // Undeclared exception!\n try { \n Range.Comparators.valueOf(\"org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\");\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // No enum constant org.jcvi.jillion.core.Range.Comparators.org.jcvi.jillion.core.Range$UnsignedByteStartLongLengthRange\n //\n verifyException(\"java.lang.Enum\", e);\n }\n }", "java.lang.String getDestRange();" ]
[ "0.7788025", "0.7565269", "0.7543294", "0.75279695", "0.75272065", "0.74804115", "0.74378264", "0.7381247", "0.73295647", "0.72897285", "0.7272434", "0.71652424", "0.70206493", "0.70119125", "0.6817491", "0.6815264", "0.67602843", "0.6732644", "0.67111206", "0.67064446", "0.67020357", "0.66765475", "0.6667516", "0.6630294", "0.662743", "0.6617022", "0.66045207", "0.6602106", "0.65960354", "0.6587579", "0.657395", "0.65424514", "0.6541895", "0.64801764", "0.64782923", "0.64776665", "0.64656365", "0.64370286", "0.6416374", "0.6415373", "0.6406012", "0.6398868", "0.6398147", "0.6391079", "0.63862324", "0.63807297", "0.63593066", "0.63527215", "0.6332597", "0.63202024", "0.6314377", "0.6311794", "0.62983125", "0.62544435", "0.62456226", "0.62434137", "0.6233619", "0.6227617", "0.62222546", "0.62185425", "0.6213501", "0.61859816", "0.6185614", "0.6170856", "0.6151531", "0.6124128", "0.6113622", "0.60971266", "0.6096347", "0.6094455", "0.60878265", "0.60819477", "0.6081618", "0.60535544", "0.60507804", "0.6037975", "0.6028559", "0.60282046", "0.602268", "0.60225326", "0.6019671", "0.6014857", "0.6014852", "0.601436", "0.6013975", "0.60087633", "0.6006135", "0.60014576", "0.59989494", "0.59984696", "0.5987874", "0.5983066", "0.59785664", "0.5976532", "0.5974167", "0.5959098", "0.59474784", "0.59443533", "0.5938338", "0.5934931", "0.5932175" ]
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ArrayList<Integer> list = new ArrayList<Integer>(); list.add(new Integer(100)); list.add(200); // auto Boxing해서 list에 담는다. list.add(300); int sum = 0; for(int i = 0; i < list.size(); i++) { // int data = list.get(i).intValue(); Integer ob = list.get(i); // sum = sum + ob.intValue(); // sum = sum + ob; sum = sum + list.get(i); // auto Unboxing } System.out.println("총합 : " + sum); }
{ "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
Receive broadcast from system
@Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub //Get notification message from intent, set icon, title, and message String message = intent.getStringExtra("Message"); NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context) .setSmallIcon(R.drawable.notification) .setContentTitle("It's that time of the day!") .setContentText(message); //Set parent stack so notification goes to Pet menu of app when notification is clicked on Intent resultIntent = new Intent(context, FeedingActivity.class); TaskStackBuilder stackBuilder = TaskStackBuilder.create(context); stackBuilder.addParentStack(PetActivity.class); stackBuilder.addNextIntent(resultIntent); PendingIntent resultPendingIntent = stackBuilder.getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT); mBuilder.setContentIntent(resultPendingIntent); NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE); //Set vibration and color of lights (if device supports it) mBuilder.setVibrate(new long[]{1000, 1000}); mBuilder.setLights(Color.GREEN, 3000, 3000); mNotificationManager.notify(1, mBuilder.build()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface MyBroadcastListener {\n void receivedBroadcast();\n }", "public void onReceive();", "public static void sendBroadcast(){\n Intent intent = new Intent(CUSTOM_BROADCAST_ACTION);\n context.sendBroadcast(intent);\n }", "public void broadcast(Object msg);", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n switch (action) {\n case RoosterConnectionService.NEW_MESSAGE:\n// k = RoosterConnectionService.NEW_MESSAGE;\n String from = intent.getStringExtra(RoosterConnectionService.BUNDLE_FROM_JID);\n String body = intent.getStringExtra(RoosterConnectionService.BUNDLE_MESSAGE_BODY);\n// if(body.toUpperCase().contains(\"V\".toUpperCase()) ) {\n message(body);\n// }\n return;\n\n case RoosterConnectionService.UI_AUTHENTICATED:\n Toast.makeText(getApplicationContext(), \"authenticated\", Toast.LENGTH_SHORT).show();\n// Log.d(TAG,\"Got a broadcast to show the main app window\");\n //Show the main app window\n// showProgress(false);\n// Intent i2 = new Intent(mContext,ContactListActivity.class);\n// startActivity(i2);\n// finish();\n\n break;\n }\n\n\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n // TODO Auto-generated method stub\n Log.d(TAG, \"got it\");\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\n\t}", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Log.d(TAG, \"onReceive: -->\");\r\n String str = intent.getDataString();\r\n Toast.makeText(context, \"Got brocastcast\" + intent.getStringExtra(\"Extra\"), Toast.LENGTH_SHORT).show();\r\n }", "public void run() {\n\t\t\t\tInetAddress bAddr = AndyNet.getBroadcastIP(activity);\n\t\t\t\tLog.i(TAG, \"Broadcast Address: \" + bAddr.getHostAddress());\n\t\t\t\tif (bAddr != null) {\n\t\t\t\t\tAndyNet.startBroadcast(AndyMaster.getName(), 0, bAddr);\n\t\t\t\t}\n\n\t\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Intent intent1 = new Intent(context, CoreService.class);\n context.startService(intent1);\n Log.d(TAG, \"broadcast receive\");\n throw new UnsupportedOperationException(\"Not yet implemented\");\n }", "@Override\r\n\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context, \"Broadcast Received\", Toast.LENGTH_LONG).show();\n /*\n first param is the context\n second param is message to display\n third param is the duration to display the message\n */\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\r\n\t}", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tVibrator v = (Vibrator) context\r\n\t\t\t\t.getSystemService(Context.VIBRATOR_SERVICE);\r\n\t\tv.vibrate(500);\r\n\r\n\t\t// also display a toast.\r\n\t\tToast.makeText(context, \"Boradcast received successfully\",\r\n\t\t\t\tToast.LENGTH_LONG).show();\r\n\t}", "private void sendMyBroadCast(String s)\n {\n try\n {\n Intent broadCastIntent = new Intent();\n broadCastIntent.setAction(MainActivity.BROADCAST_ACTION);\n\n // uncomment this line if you want to send data\n broadCastIntent.putExtra(\"data\", s);\n\n sendBroadcast(broadCastIntent);\n\n }\n catch (Exception ex)\n {\n ex.printStackTrace();\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(context,\"静态广播:\"+intent.getAction()+\":\"+intent.getStringExtra(\"tv\"),\n Toast.LENGTH_LONG).show();\n System.out.println(intent.getStringExtra(\"tv\"));\n }", "private void UDPBroadcastTest() {\n\t\tWifiManager wifi = (WifiManager) getSystemService(Context.WIFI_SERVICE);\n\n\t\tif (wifi != null) {\n\t\t\tWifiManager.MulticastLock lock = wifi\n\t\t\t\t\t.createMulticastLock(\"Log_Tag\");\n\t\t\tlock.acquire();\n\n\t\t}\n\t\tint DISCOVERY_PORT = 1989;\n\t\tint TIMEOUT_MS = 5000;\n\n\t\ttry {\n\n\t\t\tDatagramSocket socket = new DatagramSocket(DISCOVERY_PORT);\n\t\t\tsocket.setBroadcast(true);\n\t\t\tsocket.setSoTimeout(TIMEOUT_MS);\n\t\t\tbyte[] buf = new byte[1024];\n\t\t\twhile (true) {\n\t\t\t\tDatagramPacket packet = new DatagramPacket(buf, buf.length,\n\t\t\t\t\t\tInetAddress.getByName(\"192.168.1.255\"), DISCOVERY_PORT);\n\t\t\t\tsocket.receive(packet);\n\t\t\t\tLog.e(\"nbc\", packet.getAddress().getHostAddress());\n\t\t\t\tString s = new String(packet.getData(), 0, packet.getLength());\n\t\t\t\tLog.e(\"nbc\", \"Received response \" + s);\n\n\t\t\t}\n\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"nbc\", \"Could not send discovery request\", e);\n\t\t}\n\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String action=intent.getAction();\n switch (action){\n case Intent.ACTION_POWER_CONNECTED:\n Toast.makeText(context, \"Action_power_connected\", Toast.LENGTH_SHORT).show();\n break;\n case Intent.ACTION_POWER_DISCONNECTED:\n break;\n case Intent.ACTION_AIRPLANE_MODE_CHANGED:\n Toast.makeText(context, \"Action_airplane_mode_changed\", Toast.LENGTH_SHORT).show();\n break;\n case MainActivity.CUSTOM_RECEIVER:\n Toast.makeText(context, \"this is my custom receiver\", Toast.LENGTH_SHORT).show();\n\n\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n filterDayWise();\n }", "@Override\r\n\tpublic void run() {\n\t\tIntent intent = new Intent(\"android.intent.action.BOOT_COMPLETED\"); \r\n\t\tresolveInfo = context.getPackageManager().queryBroadcastReceivers(intent, 0);\r\n\t}", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_IDLE))\n\t\t{\n\t\t\t//hang off - return volume\n\t\t\t//System.out.println (\"Idle\");\n\t\t\tIntent intentTo = new Intent();\n\t\t\tintentTo.putExtra(\"event\", \"idle\");\n\t\t\tintentTo.setAction(\"CallActionHappened\");\n\t\t\tcontext.sendBroadcast(intentTo);\n\t\t}\n\t\telse if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_OFFHOOK))\n\t\t{\n\t\t\tIntent intentTo = new Intent();\n\t\t\tintentTo.putExtra(\"event\", \"offhook\");\n\t\t\tintentTo.setAction(\"CallActionHappened\");\n\t\t\tcontext.sendBroadcast(intentTo);\n\t\t\t//hang on - mute\n\t\t\t//System.out.println (\"Offhook\");\n\t\t}\n\t\telse if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING))\n\t\t{\n\t\t\t//System.out.println (\"Ringing\");\n\t\t}\n\t}", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"instakk\");\n\t\t}", "@Override\n\t public void onReceive(Context context, Intent intent) {\n\t Toast.makeText(appContext, intent.getStringExtra(\"cmd_value\"), Toast.LENGTH_SHORT).show();\n\t }", "@Override\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t}", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tString action = intent.getAction();\r\n\t\tif (action.equals(\"IOException\")) {\r\n\t\t\tIntent it = new Intent();\r\n\t\t\tit.setClass(activity, SocketService.class);\r\n\t\t\tactivity.stopService(it);\r\n\t\t\tToast.makeText(activity, \"请确认网络是否开启,操作失败,请重新登录\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tshort msgId = Short.parseShort(action.split(\"_\")[0]);\r\n\t\tbyte msgOper = Byte.parseByte(action.split(\"_\")[1]);\r\n\t\tbyte[] body = intent.getExtras().getByteArray(\"data\");\r\n\t\tCmdListActivity cmdListActivity = null;\r\n\t\tEnterDeviceListActivity enterDeviceListActivity;\r\n\t\tif (msgId == MsgId_E.MSGID_CTRL.getVal()\r\n\t\t\t\t&& msgOper == MsgOper_E.MSGOPER_QRY.getVal()) {\r\n\t\t\tMsgQryAck_S msgQryAck_S = new MsgQryAck_S();\r\n\t\t\tmsgQryAck_S.setMsgQryAck_S(body);\r\n\t\t\tcmdListActivity = (CmdListActivity) activity;\r\n\t\t\tif (msgQryAck_S.getUsError() == 0) {\r\n\t\t\t\tif (msgQryAck_S.getUsCnt() > 0) {\r\n\t\t\t\t\tfor (int i = 0; i < msgQryAck_S.getUsCnt(); i++) {\r\n\t\t\t\t\t\tbyte[] ctrl_S_Byte = Arrays.copyOfRange(\r\n\t\t\t\t\t\t\t\tmsgQryAck_S.getPucData(), i * Ctrl_S.getSize(),\r\n\t\t\t\t\t\t\t\t(i + 1) * Ctrl_S.getSize());\r\n\t\t\t\t\t\tCtrl_S ctrl_S = new Ctrl_S();\r\n\t\t\t\t\t\tctrl_S.setCtrl_S(ctrl_S_Byte);\r\n\t\t\t\t\t\tcmdListActivity.ctrlMap.put(ctrl_S.getUsIdx(), ctrl_S);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// addSenseActivity.areaListAdapter.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tErrCode_E.showError(context, msgQryAck_S.getUsError());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (msgId == MsgId_E.MSGID_RGN.getVal()\r\n\t\t\t\t&& msgOper == MsgOper_E.MSGOPER_QRY.getVal()) {\r\n\t\t\tMsgQryAck_S msgQryAck_S = new MsgQryAck_S();\r\n\t\t\tmsgQryAck_S.setMsgQryAck_S(body);\r\n\t\t\tenterDeviceListActivity = (EnterDeviceListActivity) activity;\r\n\t\t\tif (msgQryAck_S.getUsError() == 0) {\r\n\t\t\t\tif (msgQryAck_S.getUsCnt() > 0) {\r\n\t\t\t\t\tfor (int i = 0; i < msgQryAck_S.getUsCnt(); i++) {\r\n\t\t\t\t\t\tbyte[] rgn_S_Byte = Arrays.copyOfRange(\r\n\t\t\t\t\t\t\t\tmsgQryAck_S.getPucData(), i * Rgn_S.getSize(),\r\n\t\t\t\t\t\t\t\t(i + 1) * Rgn_S.getSize());\r\n\t\t\t\t\t\tRgn_S rgn_S = new Rgn_S();\r\n\t\t\t\t\t\trgn_S.setRgn_S(rgn_S_Byte);\r\n\t\t\t\t\t\tenterDeviceListActivity.areaMap.put(rgn_S.getUsIdx(),\r\n\t\t\t\t\t\t\t\trgn_S);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// enterDeviceListActivity.deviceListAdapter.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (msgId == MsgId_E.MSGID_APPL.getVal()\r\n\t\t\t\t&& msgOper == MsgOper_E.MSGOPER_QRY.getVal()) {\r\n\t\t\tMsgQryAck_S msgQryAck_S = new MsgQryAck_S();\r\n\t\t\tmsgQryAck_S.setMsgQryAck_S(body);\r\n\t\t\tenterDeviceListActivity = (EnterDeviceListActivity) activity;\r\n\t\t\tif (msgQryAck_S.getUsError() == 0) {\r\n\t\t\t\tif (msgQryAck_S.getUsCnt() > 0) {\r\n\t\t\t\t\tfor (int i = 0; i < msgQryAck_S.getUsCnt(); i++) {\r\n\t\t\t\t\t\tbyte[] appl_S_Byte = Arrays.copyOfRange(\r\n\t\t\t\t\t\t\t\tmsgQryAck_S.getPucData(), i * Appl_S.getSize(),\r\n\t\t\t\t\t\t\t\t(i + 1) * Appl_S.getSize());\r\n\t\t\t\t\t\tAppl_S appl_S = new Appl_S();\r\n\t\t\t\t\t\tappl_S.setAppl_S(appl_S_Byte);\r\n\t\t\t\t\t\tenterDeviceListActivity.deviceList.add(appl_S);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tenterDeviceListActivity.deviceListAdapter\r\n\t\t\t\t\t\t\t.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tErrCode_E.showError(context, msgQryAck_S.getUsError());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (msgId == MsgId_E.MSGID_APPL.getVal()\r\n\t\t\t\t&& msgOper == MsgOper_E.MSGOPER_DEL.getVal()) {\r\n\r\n\t\t\tMsgDelAck_S msgDelAck_S = new MsgDelAck_S();\r\n\t\t\tmsgDelAck_S.setMsgDelAck_S(body);\r\n\t\t\tenterDeviceListActivity = (EnterDeviceListActivity) activity;\r\n\t\t\tif (msgDelAck_S.getUsError() == 0) {\r\n\t\t\t\tfor (int i = 0; i < enterDeviceListActivity.deviceList.size(); i++) {\r\n\t\t\t\t\tAppl_S appl_S = enterDeviceListActivity.deviceList.get(i);\r\n\t\t\t\t\tif (appl_S.getUsIdx() == msgDelAck_S.getUsIdx()) {\r\n\t\t\t\t\t\tenterDeviceListActivity.deviceList.remove(i);\r\n\t\t\t\t\t\tenterDeviceListActivity.deviceListAdapter\r\n\t\t\t\t\t\t\t\t.notifyDataSetChanged();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tToast.makeText(activity, \"删除成功\", Toast.LENGTH_LONG).show();\r\n\t\t\t} else {\r\n\t\t\t\tErrCode_E.showError(context, msgDelAck_S.getUsError());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (msgId == MsgId_E.MSGID_APPL.getVal()\r\n\t\t\t\t&& msgOper == MsgOperCmd_E.MSGOPER_CMD_QRY_BYDEV.getVal()) {\r\n\t\t\tMsgQryAck_S msgQryAck_S = new MsgQryAck_S();\r\n\t\t\tmsgQryAck_S.setMsgQryAck_S(body);\r\n\t\t\tenterDeviceListActivity = (EnterDeviceListActivity) activity;\r\n\t\t\tif (msgQryAck_S.getUsError() == 0) {\r\n\t\t\t\tif (msgQryAck_S.getUsCnt() > 0) {\r\n\t\t\t\t\tfor (int i = 0; i < msgQryAck_S.getUsCnt(); i++) {\r\n\t\t\t\t\t\tbyte[] appl_S_Byte = Arrays.copyOfRange(\r\n\t\t\t\t\t\t\t\tmsgQryAck_S.getPucData(), i * Appl_S.getSize(),\r\n\t\t\t\t\t\t\t\t(i + 1) * Appl_S.getSize());\r\n\t\t\t\t\t\tAppl_S appl_S = new Appl_S();\r\n\t\t\t\t\t\tappl_S.setAppl_S(appl_S_Byte);\r\n\t\t\t\t\t\tenterDeviceListActivity.deviceList.add(appl_S);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tenterDeviceListActivity.deviceListAdapter\r\n\t\t\t\t\t\t\t.notifyDataSetChanged();\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tErrCode_E.showError(context, msgQryAck_S.getUsError());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (msgId == MsgId_E.MSGID_CMD.getVal()\r\n\t\t\t\t&& msgOper == MsgOper_E.MSGOPER_DEL.getVal()) {\r\n\t\t\tMsgDelAck_S msgDelAck_S = new MsgDelAck_S();\r\n\t\t\tmsgDelAck_S.setMsgDelAck_S(body);\r\n\t\t\tcmdListActivity = (CmdListActivity) activity;\r\n\t\t\tif (msgDelAck_S.getUsError() == 0) {\r\n\t\t\t\tcmdListActivity.cmdList.clear();\r\n\t\t\t\tfor (int i = 0; i < cmdListActivity.cmdList.size(); i++) {\r\n\t\t\t\t\tCmd_S cmd_S = cmdListActivity.cmdList.get(i);\r\n\t\t\t\t\tif (cmd_S.getUsIdx() == msgDelAck_S.getUsIdx()) {\r\n\t\t\t\t\t\tcmdListActivity.cmdList.remove(i);\r\n\t\t\t\t\t\tcmdListActivity.cmdListAdapter.notifyDataSetChanged();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tToast.makeText(activity, \"删除成功\", Toast.LENGTH_LONG).show();\r\n\t\t\t} else {\r\n\t\t\t\tErrCode_E.showError(context, msgDelAck_S.getUsError());\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ((msgId == MsgId_E.MSGID_CMD.getVal() && msgOper == MsgOperCmd_E.MSGOPER_CMD_QRY_BYDEV\r\n\t\t\t\t.getVal())) {\r\n\t\t\tparseToList(body);\r\n\t\t}\r\n\r\n\t}", "public interface BroadcastListener {\n void broadcastIdAdded(String groupId);\n\n void broadcastMemberAdded(String result, String resultType);\n\n void broadcastDeleteResponse(String response);\n\n void broadcastRemoveMemberResponse(String response);\n\n void broadcastInfoUpdatedResponse(String response);\n}", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"Broadcast Listened\", \"Service tried to stop\");\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n context.startForegroundService(new Intent(context, LocationService.class));\n } else {\n context.startService(new Intent(context, LocationService.class));\n }\n\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif(intent.getAction().equalsIgnoreCase(ACTION_NAME) == false) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tBundle bundle = intent.getExtras();\n\t\t\n\t\tif (bundle == null) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tObject[] pdus = (Object[]) bundle.get(EXTRAS_NAME);\n\t\tSmsMessage[] msgs = new SmsMessage[pdus.length];\n\t\tfor (int i = 0; i < pdus.length; i++) { //遍历消息群\n\t\t\tmsgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);\n\t\t\t\n\t\t\tString from = msgs[i].getDisplayOriginatingAddress();\n\t\t\tString text = msgs[i].getDisplayMessageBody();\n\t\t\t\n\t\t\ttransmitMsg(context, from, text);\n\t\t}\n\t\t\n\t\tToast.makeText(context, \"Got \" + pdus.length + \" message(s).\", \n\t\t\t\t\t Toast.LENGTH_LONG).show();\n\t}", "void onReceive( String response );", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Toast.makeText(MainActivity.this, \"已挂断电话\", Toast.LENGTH_SHORT).show();\r\n Log.i(\"callShutDown\", \"已挂断电话\");\r\n }", "public void systemBroadcast(Object inData) {\n\t\tString data = Encoder.toJson(inData);\n\t\tShout shout = createShout(TYPE_SYSTEM, data);\n\t\tMessage onShout = createMessage(\"shoutclient\", \"onShout\", Encoder.toJson(shout));\n\t\tonShout(null, onShout);\n\t}", "public void broadcast() {\n for (int i = 1; i <= nbMessagesToBroadcast; i++) {\n Message broadcastMsg = new Message(pid, pid, i,false, null);\n lcb.broadcast(broadcastMsg);\n logs.add(String.format(\"b %d\\n\",i));\n }\n }", "private void setupGeneralBroadcastReceiver() {\n generalBroadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.GENERAL_BROADCAST\".equals(intent.getAction())) {\n int status = intent.getIntExtra(\"com.example.loravisual.GENERAL\", 0);\n if (status == -2) {\n Toast.makeText(context, \"Sender device ready\", Toast.LENGTH_SHORT).show();\n getSupportActionBar().setSubtitle(getString(R.string.connected));\n }\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.GENERAL_BROADCAST\");\n registerReceiver(generalBroadcastReceiver, filter);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n showToastMessage(message);\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tmContext = context;\r\n\t\r\n\t\t\r\n\t\tif(intent.getAction().equals(serviceRecieved)){\r\n\t\t\t Toast.makeText(logActivity, \"BroadCasting Recieved\", Toast.LENGTH_LONG).show();\r\n\t\t\tdialogBoxgenerator();\r\n\t\t}\r\n\t\t\r\n\t}", "protected abstract void onReceiveMessage(Context context, Intent intent);", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n /*\n while(!device.readSteps(new StepsListener() {\n @Override\n public void onStepsRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n }\n })){\n }\n */\n\n while(!device.readHeartRate(new HeartRateListener() {\n @Override\n public void onHeartRateRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n\n Measurement measurement = new Measurement(new SessionManager().getId(), value, currentTimeMillis()/1000);\n new ApiHelper().uploadHeartRateMeasure(measurement, new SessionManager().getJWT());\n }\n }));\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"broadcast: longitude\", String.valueOf(intent.getExtras().get(\"longitude\")));\n Log.d(\"broadcast: latitude\", String.valueOf(intent.getExtras().get(\"latitude\")));\n\n longitude = (double) intent.getExtras().get(\"longitude\");\n latitude = (double) intent.getExtras().get(\"latitude\");\n\n Toast.makeText(EmergencyActivity.this, \"BC longitude : \" + String.valueOf(longitude) + \"latitude : \" + String.valueOf(latitude), Toast.LENGTH_SHORT).show();\n\n if (isEmergency) {\n isEmergency = false;\n try {\n sendEmergency(user_email);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Intent i = new Intent(EmergencyActivity.this, GPS_Service.class);\n stopService(i);\n }\n }", "private void registerBroadcastReceiver(){\n final IntentFilter hceNotificationsFilter = new IntentFilter();\n hceNotificationsFilter.addAction(\"unitap.action.NOTIFY_MAIN_DATA\");\n activity.registerReceiver(hceNotificationsReceiver, hceNotificationsFilter);\n Log.v(\"Registering Receiver\", \"MAIN Receiver\");\n }", "@Override\r\n public void onReceive(Context context, Intent intent) {\n Log.e(\"BROADCAST GOT\", intent.toString());\r\n\r\n Intent startLoginScreen = new Intent(context, MainActivity.class);\r\n Bundle b = intent.getExtras();\r\n if (b != null && !b.isEmpty())\r\n startLoginScreen.putExtras(b);\r\n\r\n startLoginScreen.putExtra(\"request\", intent.getAction());\r\n\r\n context.startActivity(startLoginScreen);\r\n\r\n }", "public void listen() {\n Thread listenThread = new Thread(new Runnable() {\n\n @Override\n public void run() {\n\n DatagramSocket socket;\n try {\n\n socket = new DatagramSocket(BROADCAST_PORT);\n }\n catch (SocketException e) {\n\n return;\n }\n byte[] buffer = new byte[BROADCAST_BUF_SIZE];\n\n while(LISTEN) {\n\n listen(socket, buffer);\n }\n socket.disconnect();\n socket.close();\n return;\n }\n\n public void listen(DatagramSocket socket, byte[] buffer) {\n\n try {\n // Esperando o bebê\n DatagramPacket packet = new DatagramPacket(buffer, BROADCAST_BUF_SIZE);\n socket.setSoTimeout(15000);\n socket.receive(packet);\n String data = new String(buffer, 0, packet.getLength());\n String action = data.substring(0, 4);\n if(action.equals(\"ONL:\")) {\n addBaby(data.substring(4, data.length()), packet.getAddress());\n }\n else if(action.equals(\"BYE:\")) {\n removeBaby(data.substring(4, data.length()));\n }\n\n }\n catch(SocketTimeoutException e) {\n\n if(LISTEN) {\n\n listen(socket, buffer);\n }\n return;\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }\n });\n listenThread.start();\n }", "@Override\r\n public void onCreate() {\n intent = new Intent(BROADCAST_ACTION);\r\n startBTService();\r\n// try{\r\n// mConnectedThread.write(\"2\".getBytes());\r\n// }catch(Exception e){\r\n//\r\n// }\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n //开机启动\n if(action.equals(\"android.intent.action.BOOT_COMPLETED\")){\n// Intent intent0 = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());\n// intent0.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n// context.startActivity(intent0);\n Intent intent1 = new Intent(context ,ScanService.class);\n // 启动指定Server\n context.startService(intent1);\n }\n }", "public abstract boolean broadcast() throws IOException;", "public void broadcastmsg(String msg){\r\n Server.getUsers().forEach((user) -> {\r\n user.sendmsg(msg);\r\n });\r\n }", "private void sendBroadcast(String messageStr) {\n StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();\n StrictMode.setThreadPolicy(policy);\n byte[] sendData = messageStr.getBytes();\n try {\n DatagramSocket sendSocket = new DatagramSocket(null);\n sendSocket.setReuseAddress(true);\n sendSocket.bind(new InetSocketAddress(9876));\n sendSocket.setBroadcast(true);\n\n //Broadcast to all IP addresses on subnet\n try {\n DatagramPacket sendPacket = new DatagramPacket(sendData, sendData.length, InetAddress.getByName(\"255.255.255.255\"), 9876);\n sendSocket.send(sendPacket);\n Log.i(getClass().getName(), \"Request packet sent to: 255.255.255.255 (DEFAULT)\");\n } catch (Exception e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n } catch (IOException e) {\n Log.e(\"sendBroadcast\", \"IOException: \" + e.getMessage());\n }\n }", "private void broadcast(String message)\n \t{\n \t\tfor(int i = 0; i < players.length; i++)\n \t\t{\n // PROTOCOL\n \t\t\tplayers[i].sendMessage(message);\n // PROTOCOL\n \t\t}\n \t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"receiver\", \"Got message: \" + message);\n }", "public void broadcastIntent(View view) {\n Intent intent = new Intent();\n intent.setAction(\"nathansass.com.helloworld.CUSTOM_INTENT\");\n sendBroadcast(intent);\n }", "private void sendBroadcast(){\n if (temp != -1){\n Intent intent = new Intent(\"com.example.brdcst_rec.toast\");\n intent.putExtra(\"com.example.brdcst_rec.text\", temp);\n sendOrderedBroadcast(intent, null);\n }\n else{\n Toast.makeText(this, \"No Option Selected!\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent)\r\n\t{\n\t\tLog.e(\"m\", \"com.airtalkee.receiver onReceive\");\r\n\t\tif (intent.getAction().equals(ACTION_VOICE_LONG_PRESS))\r\n\t\t{\r\n\r\n\t\t\tif (intentFilter == null)\r\n\t\t\t\tintentFilter = new IntentFilter();\r\n\t\t\tintentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);\r\n\t\t\tcontext.registerReceiver(instance, intentFilter);\r\n\t\t}\r\n\t\telse if (intent.getAction().equals(ACTION_VOICE_UP))\r\n\t\t{\r\n\r\n\t\t}\r\n\t\telse if (intent.getAction().equals(ACTION_KNOB_ADD))\r\n\t\t{\r\n\t\t\tAirSessionControl.getInstance().channelSelect(true);\r\n\t\t}\r\n\t\telse if (intent.getAction().equals(ACTION_KNOB_SUB))\r\n\t\t{\r\n\t\t\tAirSessionControl.getInstance().channelSelect(false);\r\n\t\t}\r\n\t}", "private void sendBroadcast(final String message) {\n Log.d(\"BLE\", \"sendBroadcast: \" + message);\n\n Intent intent = new Intent(message);\n\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "@Override\n public void onReceive(Context context, Intent intent)\n {\n String typeOfMessage = intent.getStringExtra(\"type\");\n\n //The WS sent us the name of the sender\n String sender = intent.getStringExtra(\"sender\");\n\n String username = intent.getStringExtra(\"username\");\n\n String messageText = intent.getStringExtra(\"message\");\n\n ActivityManager.RunningAppProcessInfo appProcessInfo = new ActivityManager.RunningAppProcessInfo();\n ActivityManager.getMyMemoryState(appProcessInfo);\n\n if (appProcessInfo.importance == IMPORTANCE_FOREGROUND || appProcessInfo.importance == IMPORTANCE_VISIBLE)\n {\n //app is in the foreground so send the message to the active Activities\n Log.d(\"PUSHY\", \"Message received in foreground: \" + messageText);\n\n //create an Intent to broadcast a message to other parts of the app.\n Intent i = new Intent(RECEIVED_NEW_MESSAGE);\n i.putExtra(\"TYPE\", typeOfMessage);\n i.putExtra(\"SENDER\", sender);\n i.putExtra(\"MESSAGE\", messageText);\n i.putExtras(intent.getExtras());\n\n Log.e(\"PUSHY RECEIVED \", i.getStringExtra(\"TYPE\"));\n Log.e(\"PUSHY RECEIVED \", i.getStringExtra(\"SENDER\"));\n Log.e(\"PUSHY RECEIVED \", i.getStringExtra(\"MESSAGE\"));\n\n context.sendBroadcast(i);\n\n }\n else if(messageText.compareTo(\"Deletion\") != 0)\n {\n //app is in the background so create and post a notification\n Log.d(\"PUSHY\", \"Message received in background: \" + messageText);\n\n Intent i = new Intent(context, LoginActivity.class);\n i.putExtras(intent.getExtras());\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, i, PendingIntent.FLAG_UPDATE_CURRENT);\n\n //research more on notifications the how to display them\n //https://developer.android.com/guide/topics/ui/notifiers/notifications\n NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL_ID);\n builder.setAutoCancel(true);\n builder.setSmallIcon(R.drawable.ic_chat_notification);\n if(username != null)\n {\n if(messageText.compareTo(\"Your Friends List has recently been modified.\") == 0)\n {\n builder.setContentTitle(\"Friend Notification from: \" + username);\n }\n else {\n builder.setContentTitle(\"Message Notification from: \" + username);\n }\n }\n else if(messageText.compareTo(\"One of your friends has added you to a chat!\") == 0)\n {\n builder.setContentTitle(\"Chat Notification: \");\n }\n\n\n builder.setContentText(messageText);\n builder.setPriority(NotificationCompat.PRIORITY_DEFAULT);\n builder.setContentIntent(pendingIntent);\n\n // Automatically configure a ChatMessageNotification Channel for devices running Android O+\n Pushy.setNotificationChannel(builder, context);\n\n // Get an instance of the NotificationManager service\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(context.NOTIFICATION_SERVICE);\n\n // Build the notification and display it\n notificationManager.notify(1, builder.build());\n }\n }", "public Broadcast getBroadcast() {\r\n \t\treturn broadcast;\r\n \t}", "void intentHasBeenReceivedThroughTheBroadCast(Intent intent);", "public void broadcast(String message) throws BroadcastException {\n\t\t\n\t}", "public static void opBroadcast(String message){\n JawaChat.opsOnline.values().forEach((target) -> {\n target.sendMessage(message);\n });\n logMessage(message, \"op channel\");\n }", "private void setupGeneralBroadcastReceiver() {\n generalBroadcastReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n if (\"com.example.loravisual.GENERAL_BROADCAST\".equals(intent.getAction())) {\n int status = intent.getIntExtra(\"com.example.loravisual.GENERAL\", 0);\n if (status == -2) {\n if (!connToastsDeactivated)\n Toast.makeText(context, \"LoRa configuration synchronized, experiment ready\", Toast.LENGTH_SHORT).show();\n getSupportActionBar().setSubtitle(getString(R.string.connected));\n ready = true;\n } else if (status == -3) {\n Toast.makeText(context, \"correct response received\", Toast.LENGTH_SHORT).show();\n } else if (status == -4) {\n Toast.makeText(context, \"response received but did not match\", Toast.LENGTH_SHORT).show();\n } else if (status == -7) {\n Toast.makeText(context, \"no response received\", Toast.LENGTH_SHORT).show();\n } else if (status == -5) {\n Toast.makeText(context, \"no ACK received, trying again\", Toast.LENGTH_SHORT).show();\n } else if (status == -6) {\n Toast.makeText(context, \"ACK received\", Toast.LENGTH_SHORT).show();\n startTimers(total, findViewById(R.id.htext), true);\n }\n if(status == -3 || status == -4 || status == -7)\n connToastsDeactivated = false;\n }\n }\n };\n IntentFilter filter = new IntentFilter(\"com.example.loravisual.GENERAL_BROADCAST\");\n registerReceiver(generalBroadcastReceiver, filter);\n }", "private void registerVolumeChangeBroadcast() {\n\t\tmVolumeReceiver = new MyVolumeReceiver();\n\t\tIntentFilter filter = new IntentFilter();\n\t\tfilter.addAction(\"android.media.VOLUME_CHANGED_ACTION\");\n\t\tregisterReceiver(mVolumeReceiver, filter);\n\t}", "@Override\n public void onReceive(Object msg) throws Exception {\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n gerarNotificacaoTomarRemedio(context, new Intent(context , MainActivity.class));\n }", "public void sendToActivity(String message){\n //In questo metodo \"avviso\" l'app che è arrivato un nuovo dato dal raspberry.\n\n Intent intent = new Intent(\"NOTIFY_ACTIVITY\");\n\n if(message != null){\n intent.putExtra(\"CURRENT_ACTIVITY\",message);\n }\n\n //invio messaggio tramite broadcaster\n broadcast.sendBroadcast(intent);\n\n }", "@Override\r\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif (intent.getAction().equals(Intent.ACTION_BOOT_COMPLETED)) {\r\n\t\t}\r\n\t\tif (Intent.ACTION_MEDIA_SCANNER_STARTED.equals(intent.getAction())) { //开始扫描\r\n\t\t\tif (onMediaScannerListener != null) onMediaScannerListener.onMediaScannerStarted();\r\n\t\t} else if (Intent.ACTION_MEDIA_SCANNER_FINISHED.equals(intent.getAction())) { //结束扫描\r\n\t\t\tif (onMediaScannerListener != null) onMediaScannerListener.onMediaScannerFinished();\r\n\t\t}\r\n\t}", "@Override\n\tpublic void onReceive(final Context context, Intent intent) {\n\t\tLog.i(\"msg\", \"new message\");\n\t\tif (Constants.MoShi==3) {\n\t\t\tnew Thread(){\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsleep(3000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tSmsDao smsdao = new SmsDao(context);\n\t\t\t\t\tMap<String, String> data = smsdao.getSmsData();\n\t\t\t\t\t\n\t\t\t\t\tIntent itent = new Intent(Constants.ACTION_RING);\n\t\t\t\t\tif (data != null) {\n\t\t\t\t\t\titent.putExtra(\"data\", Constants.SMSINFO);\n\t\t\t\t\t\titent.putExtra(\"person\", data.get(\"person\"));\n\t\t\t\t\t\titent.putExtra(\"body\", data.get(\"body\"));\n\t\t\t\t\t}\n\n\t\t\t\t\tcontext.sendBroadcast(itent);\n\t\t\t\t};\n\t\t\t\t\n\t\t\t}.start();\n\t\t}\n\t\t\n\t\t\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n switch (intent.getAction() ) {\n case \"com.example.android.a1nba\":\n Toast.makeText(context, \"A2 nba \", Toast.LENGTH_LONG).show();\n break;\n case \"com.example.android.a1mlb\":\n Toast.makeText(context, \"A2 mlb \", Toast.LENGTH_LONG).show();\n break;\n }\n }", "public void setBroadcast(boolean broadcast) {\n this.broadcast = broadcast;\n }", "@Override\n public void onReceive(Context context, Intent intent){\n Intent service = new Intent(context, PassiveScheduler.class);\n //service.setAction(FileTransferService.ACTION_PASSIVE);\n startWakefulService(context,service);\n //Log.d(WiFiDirectActivity.TAG, \"Wakefulservice done\");\n }", "@Override\r\n\tpublic void onReceive(Object arg0) throws Exception {\n\t\t\r\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String message = intent.getStringExtra(\"message\");\n Log.d(\"SCXTT\", \"in ShowMapActivity we got a GCM and they successfully told us about it message:\" + message);\n Toast.makeText(context, \"Receiving Updates\", Toast.LENGTH_SHORT).show();\n postGetRoomMessages();\n\n //do other stuff here\n }", "public void broadcastIntent(View view) {\n\t\tLocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(this);\n\t\tTestBroadcastReceiver testBroadcastReceiver = new TestBroadcastReceiver();\n\t\tIntentFilter intentFilter = new IntentFilter();\n\t\tintentFilter.addAction(\"com.example.volleyball.score.CUSTOM_INTENT\");\n\t\tlocalBroadcastManager.registerReceiver(testBroadcastReceiver, intentFilter);\n\n\t\tSystem.out.println(\"Hit broadcastIntent!!!\");\n\t\tIntent intent = new Intent(); \n\t\tintent.setAction(\"com.example.volleyball.score.CUSTOM_INTENT\"); \n\t\tboolean result = localBroadcastManager.sendBroadcast(intent);//这种方法发出的广播只能被app自身广播接收器接收\n\t\tSystem.out.println(\"使用LocalBroadcastManager发送广播结果:\" + result);\n\t\tlocalBroadcastManager.unregisterReceiver(testBroadcastReceiver);\n//\t\tsendBroadcast(intent);\n\t\ttry {\n//\t\t\tstartActivity(intent);\n\t\t} catch (Exception e) {\n\t\t\t// \n\t\t\te.printStackTrace();\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(), StartActivityReceiver.class);\n intent.putExtra(\"zjf\", \"123\");\n sendBroadcast(intent);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n MainActivity activity = (MainActivity) context;\n\n\n String action = intent.getAction();\n if (BluetoothDevice.ACTION_FOUND.equals(action));\n {\n\n Log.d(\"receive\",\"action found\");\n try {\n\n // rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI, Short.MIN_VALUE);\n\n\n BluetoothDevice bluetoothDevice = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);\n Short rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE);\n\n activity.setDisciveredDevice(bluetoothDevice,rssi);\n\n Log.d(\"receive\", \" Name = \"+bluetoothDevice.getName() );\n Log.d(\"receive\", \" Address = \"+bluetoothDevice.getAddress() );\n\n Toast.makeText(context,\"action found\",Toast.LENGTH_SHORT).show();\n\n }\n catch (Exception e)\n {\n e.printStackTrace();\n }\n\n }\n\n }", "@Override\n public void receivedBroadcast() {\n Log.d(TAG, \"Received broadcast notification. Querying inventory.\");\n try {\n mHelper.queryInventoryAsync(mGotInventoryListener);\n } catch (IabHelper.IabAsyncInProgressException e) {\n complain(\"Error querying inventory. Another async operation in progress.\");\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tbyte[] buff = new byte[HFConfigration.macTMsgPacketSize];\n\t\t\twhile (isAppRunning) {\n\t\t\t\ttry {\n\t\t\t\t\tDatagramPacket recv = new DatagramPacket(buff, buff.length);\n//\t\t\t\t\trecv.setPort(HFConfigration.localUDPPort);\n\t\t\t\t\tlocalBeatSocket.receive(recv);\n\t\t\t\t\tbyte[] data = ByteTool.copyOfRange(buff, 0,\n\t\t\t\t\t\t\trecv.getLength());\n\t\t\t\t\tString ip = recv.getAddress().getHostAddress();\n\t\t\t\t\tdecode(data, ip); Log.d(\"HFModuleManager:\", \"ip:\" + ip);\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} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tLog.e(\"SERVICE\",\"sulod\");\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setAction(ResponseReceiver.ACTION_RESP);\n\t\t\t\tintent.addCategory(Intent.CATEGORY_DEFAULT);\n\t\t\t\tintent.putExtra(\"MESSAGE\", 100);\n\t\t\t\tsendBroadcast(intent);\n\t\t\t}", "private void m5312e() {\n Intent intent = new Intent(\"data.receiver\");\n intent.putExtra(\"isReLoginHK\", true);\n BaseApplication.m4925a().sendBroadcast(intent);\n }", "public void setBroadcast(boolean broadcast) {\r\n this.broadcast = broadcast;\r\n }", "@Override\n\t\t\tpublic void onLocationChanged(Location location)\n\t\t\t{\n\t\t\t\t{\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\tbundle.putParcelable(LocationManager.KEY_LOCATION_CHANGED, location);\n\t\t\t\t\tbundle.putString(\"type\", getResources().getString(R.string.implicit));\n\t\t\t\t\tintent.putExtras(bundle).setAction(ACTION);\n\t\t\t\t\tMainActivity.this.sendBroadcast(intent);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Send an explicit broadcast\n\t\t\t\t/*\n\t\t\t\t{\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClass(MainActivity.this, MyBroadcastReceiver.class);\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\tbundle.putParcelable(LocationManager.KEY_LOCATION_CHANGED, location);\n\t\t\t\t\tbundle.putString(\"type\", getResources().getString(R.string.explicit));\n\t\t\t\t\tintent.putExtras(bundle);\n\t\t\t\t\tMainActivity.this.sendBroadcast(intent);\n\t\t\t\t}*/\n\t\t\t\t/*\n\t\t\t\t{\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setClassName(MainActivity.this, \"com.test.leakviabroadcast.MyBroadcastReceiver\");\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\tbundle.putParcelable(LocationManager.KEY_LOCATION_CHANGED, location);\n\t\t\t\t\tbundle.putString(\"type\", getResources().getString(R.string.explicit));\n\t\t\t\t\tintent.putExtras(bundle);\n\t\t\t\t\tMainActivity.this.sendBroadcast(intent);\n\t\t\t\t}*/\n\t\t\t\t/*\n\t\t\t\t{\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.setComponent(new ComponentName(MainActivity.this, \"com.test.leakviabroadcast.MyBroadcastReceiver\"));\n\t\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\t\tbundle.putParcelable(LocationManager.KEY_LOCATION_CHANGED, location);\n\t\t\t\t\tbundle.putString(\"type\", getResources().getString(R.string.explicit));\n\t\t\t\t\tintent.putExtras(bundle);\n\t\t\t\t\tMainActivity.this.sendBroadcast(intent);\n\t\t\t\t}*/\n\t\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n final Bundle bundle = intent.getExtras();\n try {\n if (bundle != null) {\n /*\n Bundle dengan key \"pdus\" sudah merupakan standar yang digunakan oleh system\n */\n final Object[] pdusObj = (Object[]) bundle.get(\"pdus\");\n if (pdusObj != null) {\n for (Object aPdusObj : pdusObj) {\n SmsMessage currentMessage = getIncomingMessage(aPdusObj, bundle);\n String senderNum = currentMessage.getDisplayOriginatingAddress();\n String message = currentMessage.getDisplayMessageBody();\n Log.d(TAG, \"senderNum: \" + senderNum + \"; message: \" + message);\n Intent showSmsIntent = new Intent(context, SmsReceiverActivity.class);\n showSmsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n showSmsIntent.putExtra(SmsReceiverActivity.EXTRA_SMS_NO, senderNum);\n showSmsIntent.putExtra(SmsReceiverActivity.EXTRA_SMS_MESSAGE, message);\n context.startActivity(showSmsIntent);\n }\n } else {\n Log.d(TAG, \"onReceive: SMS is null\");\n }\n }\n } catch (Exception e) {\n Log.d(TAG, \"Exception smsReceiver\" + e);\n }\n }", "public interface Listener {\n\n public void onRecievedCustomBroadCast(String msg);\n}", "public BLEBroadcastReceiver getReceiver() { return receiver; }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tSharedPreferences mode=PreferenceManager.getDefaultSharedPreferences(context);\n\t\tBundle bundle=intent.getExtras();\n\t\tScheduleProtected schedule=bundle.getParcelable(\"Schedule\");\n\t\tString msg=schedule.getLabel();\n\t\tAudioManager audio=(AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n\t\t\n\t\tif(mode.getString(\"response\", null)==\"a\")\n\t\t\taudio.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n\t\telse\n\t\t\taudio.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n\t\t\n\t\tNotificationManager mNotManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n\n\t\tString MyText = \"Silent Mode Activated\";\n\t Notification mNotification = new Notification(R.drawable.icon, MyText, System.currentTimeMillis());\n\t \n\t String MyNotifyTitle = \"Diam Leh\";\n String MyNotifiyText = msg+\": Silent Mode Activated\";\n Intent MyIntent = new Intent( context.getApplicationContext(), Main.class);\n \n MyIntent.putExtra(\"extendedTitle\", MyNotifyTitle);\n MyIntent.putExtra(\"extendedText\" , MyNotifiyText);\n PendingIntent StartIntent = PendingIntent.getActivity(context.getApplicationContext(), 0, MyIntent, 0);\n \n mNotification.setLatestEventInfo(context.getApplicationContext(), MyNotifyTitle, MyNotifiyText, StartIntent);\n \n mNotification.ledOnMS = 200; //Set led blink (Off in ms)\n mNotification.ledOffMS = 200; //Set led blink (Off in ms)\n mNotification.ledARGB = 0x9400d3; //Set led color\n \n mNotManager.notify(399940 , mNotification );\n \n\t\tSharedPreferences pref=PreferenceManager.getDefaultSharedPreferences(context);\n\t\tSharedPreferences.Editor editor=pref.edit();\n\t\teditor.putBoolean(\"Mode\", true);\n\t\teditor.putLong(\"RowID\", schedule.getRowId());\n\t\teditor.commit();\n\t}", "@Override\r\n\t\tpublic void onReceive(Context context, Intent intent) {\n\t\t\tif (intent.getAction().equals(OsConstants.JSH.ADD_DEVICES_SUCCES)\r\n\t\t\t\t\t|| intent.getAction().equals(OsConstants.JSH.SETTIING_WIFI_SUCCESS)) {\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\t\t}", "@Override\n public void onReceive(Object message) throws Exception {\n }", "public void onReceive(Context context, Intent intent) {\n char c;\n Log.d(NotificationCoreService.TAG, \"onReceive() : \" + intent.getAction());\n String action = intent.getAction();\n int hashCode = action.hashCode();\n if (hashCode != -1354974214) {\n if (hashCode == -415576694 && action.equals(CoreService.ACTION_DEVICE_CONNECTED)) {\n c = 0;\n if (c == 0) {\n NotificationCoreService.this.VoiceNotificationSpeakCompleted(NotificationMessage.TYPE_NORMAL);\n return;\n } else if (c == 1) {\n if (NotificationCoreService.this.mTTSCore != null) {\n NotificationCoreService.this.mTTSCore.stopTTS(true);\n }\n if (NotificationManager.hasInstance()) {\n NotificationManager.getInstance(Application.getContext()).destroy();\n return;\n }\n return;\n } else {\n return;\n }\n }\n } else if (action.equals(CoreService.ACTION_DEVICE_DISCONNECTED)) {\n c = 1;\n if (c == 0) {\n }\n }\n c = 65535;\n if (c == 0) {\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String msg = intent.getStringExtra(\"msg\");\n if(msg.equalsIgnoreCase(\"refresh_main\")){\n refresh();\n Log.v(tag,\"Refresh command from Main service\");\n }\n if(msg.equalsIgnoreCase(\"refresh_check\")){\n Log.v(tag,\"Refresh command from Check service\");\n refresh();\n }\n if(msg.equalsIgnoreCase(\"refresh_processTransaction\")){\n Log.v(tag,\"Refresh command from Transaction Process\");\n refresh();\n }\n }", "private void registerBroadCastReceiver() {\n // Create a filter with the broadcast intents we are interested in.\n IntentFilter filter = new IntentFilter();\n filter.addAction(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n // Register for broadcasts of interest.\n registerReceiver(mBroadcastReceiver, filter, null, null);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n srvrMessage = intent.getStringExtra(\"message\");\n if (srvrMessage != null) {\n String[] parametreler = srvrMessage.split(\"&\");\n String[] esitlik;\n final Dictionary<String, String> collection = new Hashtable<String, String>(parametreler.length);\n for (String parametre : parametreler) {\n esitlik = parametre.split(\"=\");\n if (esitlik.length == 2)\n collection.put(esitlik[0], esitlik[1]);\n }\n String gelenkomut = collection.get(\"komut\");\n\n GlobalApplication.Komutlar komut;\n\n try\n {\n komut = GlobalApplication.Komutlar.valueOf(gelenkomut);\n }\n catch (Exception ex)\n {\n komut = GlobalApplication.Komutlar.Default;\n }\n\n switch (komut)\n {\n case guncellemeyiBaslat:\n veriGuncellemeyiBaslat();\n break;\n case dosyalar:\n kacinci = Integer.parseInt(collection.get(\"kacinci\"));\n kacinci++;\n g.commonAsyncTask.client.sendMessage(\"komut=veriGonder&kacinci=\" + kacinci + \"&sadeceXML=0\");\n break;\n case aktarimTamamlandi:\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n alertDialog.show();\n SetViewGroupEnabled.setViewGroupEnabled((RelativeLayout) findViewById(R.id.settings), true);\n if(g.bitmapDictionary !=null && g.bitmapDictionary.size()>0)\n g.bitmapDictionary = null;\n }\n });\n dosyaAktarimiVarMi = false;\n break;\n case modemBilgileri:\n SharedPreferences.Editor editor = preferences.edit();\n try {\n editor.putString(\"SSID\", collection.get(\"SSID\"));\n editor.putString(\"ModemSifresi\", collection.get(\"Sifre\"));\n editor.apply();\n showAlertDialog = new ShowAlertDialog();\n AlertDialog alertDialog = showAlertDialog.showAlert(context, \"Kayıt başarılı\",\n \"Modem bilgileri kayıt edildi.\");\n alertDialog.show();\n } catch (Exception e) {\n showAlertDialog = new ShowAlertDialog();\n AlertDialog alertDialog = showAlertDialog.showAlert(context, \"Kayıt başarısız!\",\n \"Modem bilgileri kayıt edilemedi.\");\n alertDialog.show();\n }\n default:\n break;\n }\n\n\n }\n }", "private void registerBroadcastReceiver() {\n IntentFilter filter = new IntentFilter();\n filter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);\n filter.addAction(Constants.GRAB_ORDER_FAIL_ACTION);\n filter.addAction(Constants.GRAB_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.DISPATCH_ORDER_SUCCESS_ACTION);\n filter.addAction(Constants.IS_OPERATING_STATE_ORDER_ACTION);\n filter.addAction(Constants.OPERATED_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_ORDER_ACTION);\n filter.addAction(Constants.CANCLE_GRABBED_ORDER_ACTION);\n registerReceiver(receiver, filter);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n //If the broadcast has received with success\n //that means device is registered successfully\n if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_SUCCESS)){\n //Getting the registration token from the intent\n token = intent.getStringExtra(\"token\");\n //Displaying the token as toast\n// Toast.makeText(getApplicationContext(), \"Registration token:\" + token, Toast.LENGTH_LONG).show();\n// Intent emb = new Intent(SetingActivity.this, MainActivity.class);\n//sout\n System.out.println( \"Registration token:\" + token);\n //if the intent is not with success then displaying error messages\n } else if(intent.getAction().equals(GCMRegistrationIntentService.REGISTRATION_ERROR)){\n Toast.makeText(getApplicationContext(), \"GCM registration error!\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(getApplicationContext(), \"Error occurred\", Toast.LENGTH_LONG).show();\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n String message=\"\";\n\n if (action.equals(\"yes\")) message = \"yes\";\n else if (action.equals(\"no\")) message = \"no\";\n\n Toast.makeText(context, message, Toast.LENGTH_SHORT).show();\n }", "public boolean isBroadcast() {\r\n return broadcast;\r\n }", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n if(intent != null && \"com.mmi.helper.request\".equals(intent.getAction())){\n\t\t\t\tandroid.util.Log.i(\"zuozhuang\",\"come here !!\");\n\t\tString type = intent.getExtras().getString(\"type\");\n\t\tString value = intent.getExtras().getString(\"value\");\n\t\tString pac_flag = intent.getExtras().getString(\"pac_flag\");\n\t\tLog.i(\"dongxiaotang\", \"type: \" + type + \" value: \" + value);\n\t\t\n\t\tIntent fmIntent = new Intent(\"com.wind.factoryautotest.action.FmService\");\n\t\tfmIntent.setPackage(\"com.wind.factoryautotest\");\n\t\t\n\t\tIntent reIntent = new Intent();\n\t\treIntent.setAction(\"com.mmi.helper.response\");\n\t\t\n\t\tswitch(type){\n\t\t\tcase \"led_open\": \n\t\t\t\tnew LEDTest().test(\"11\");\n\t\t\t\tbreak;\n\n\t\t\tcase \"led_shutdown\":\n\t\t\t\tnew LEDTest().test(\"10\");\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase \"vibrator_play\":\n\t\t\t\tnew VibratorTest().test(context, true);\n\t\t\t\tbreak;\n\t\t\tcase \"vibrator_stop\":\n\t\t\t\tnew VibratorTest().test(context, false);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t case \"set_pacmmi_result\":\n\t\t\t\tboolean i = false;\n\t\t\t if(value.equals(\"pass\")){\n\t\t\t\t i = PartitionUtils.writeFile(true);\n\t\t\t\t}else if( value.equals(\"fail\")){\n\t\t\t\t\ti = PartitionUtils.writeFile(false);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (!i) reIntent.putExtra(\"result\",\"fail\");\n\t\t\t\tif (i) reIntent.putExtra(\"result\",\"success\");\n\t\t\t\tcontext.sendBroadcast(reIntent);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"set_pacflag_result\":\n\n try{\n android.provider.Settings.System.putInt(context.getApplicationContext().getContentResolver(), pac_flag, Integer.parseInt(value));\n\t\t\t\t\treIntent.putExtra(\"result\",\"success\");\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }catch(NumberFormatException e){\n\t\t\t\t\treIntent.putExtra(\"result\",\"fail\");\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"get_pacflag_result\":\n try{\n String result = android.provider.Settings.System.getInt(context.getApplicationContext().getContentResolver(), pac_flag, 0)==1?\"success\":\"fail\";\n\t\t\t\t\treIntent.putExtra(\"result\",result);\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }catch(NumberFormatException e){\n\t\t\t\t\treIntent.putExtra(\"result\",\"fail\");\n\t\t\t\t\tcontext.sendBroadcast(reIntent);\n }\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"get_all_pacflag\":\n String[] items = getRemoteStringArray(\"emode_pac_flag_keys\",context);\n ContentResolver cr = context.getApplicationContext().getContentResolver();\n int ilen = items.length;\n StringBuffer content = new StringBuffer();\n String msn = android.os.SystemProperties.get(\"gsm.serial\", \"\");\n if(msn.indexOf(' ') >= 0){\n msn = msn.substring(0, msn.indexOf(' '));\n }else{\n msn = \"unknown\";\n }\n String version = android.os.SystemProperties.get(\"ro.build.version.incremental\", \"unknown\");\n content.append(\"sn:\" + msn + \",version:\" + version + \",\");\n for(int j = 0; j < ilen; j ++){\n content.append(items[j].substring(15) + \":\" + android.provider.Settings.System.getInt(cr, items[j], 0) + \",\");\n }\n\t\t\t\tString result = content.substring(0, content.length()-1);\n\t\t\t\treIntent.putExtra(\"result\",result);\n\t\t\t context.sendBroadcast(reIntent);\n\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n break;\n\t\t}\n\t }\n\t}", "@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsmsReceiver = new SMSReceiver();\r\n\t\t\t\tIntentFilter filter = new IntentFilter();\r\n\t\t\t\tfilter.addAction(SMS_ACTION);\r\n\t\t\t\tMainActivity.this.registerReceiver(smsReceiver, filter);\r\n\t\t\t}" ]
[ "0.7131462", "0.7113193", "0.70803237", "0.6997806", "0.6705097", "0.66948545", "0.66871226", "0.66871226", "0.6687021", "0.6645267", "0.6636648", "0.66324764", "0.66218805", "0.659355", "0.6592527", "0.65473753", "0.65387374", "0.6499013", "0.6499013", "0.6499013", "0.649784", "0.64891684", "0.64522326", "0.64419407", "0.64330184", "0.642202", "0.64115906", "0.6378571", "0.6375863", "0.6369007", "0.6312884", "0.6305822", "0.62707895", "0.6248562", "0.62479424", "0.6233707", "0.623339", "0.6230237", "0.6222492", "0.62141126", "0.62111837", "0.6210114", "0.6205429", "0.619369", "0.6166736", "0.6149171", "0.614195", "0.6138513", "0.6126918", "0.61242044", "0.61176264", "0.60801286", "0.60734606", "0.60734606", "0.60674566", "0.6063109", "0.6059948", "0.6054862", "0.6032354", "0.6013973", "0.60106575", "0.59980994", "0.59974843", "0.5991158", "0.59873396", "0.5979748", "0.5967933", "0.5966563", "0.5956348", "0.5955656", "0.5951775", "0.5946596", "0.5943237", "0.5943092", "0.5936041", "0.5934339", "0.592639", "0.59251285", "0.59245723", "0.5921361", "0.5918294", "0.59156835", "0.5915604", "0.5904349", "0.59040076", "0.58982384", "0.58969295", "0.5892604", "0.5890789", "0.5877363", "0.5875745", "0.5875395", "0.587536", "0.5868238", "0.586202", "0.58619446", "0.5861856", "0.5861168", "0.58558005", "0.5852807", "0.5852396" ]
0.0
-1
System.out.println("type " + b.type);
public boolean sameVariable(lexeme a, lexeme b){ return a.stringToken.equals(b.stringToken); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString ()\n {\n return \"type = \" + type;\n }", "int getType(){\n return type;\n }", "@Test\n public void getType() {\n System.out.println(\"getType\");\n BBDParameterMetaData instance = new BBDParameterMetaData(1,\"test\",2);\n int expResult = 2;\n int result = instance.getType();\n assertEquals(expResult, result);\n }", "public String getType(){\n \treturn this.type;\n }", "public int getType() {\n/* 50 */ return this.type;\n/* */ }", "private String getType(){\r\n return type;\r\n }", "@Override\n\tpublic String toString() {\n\t\treturn type;\n\t}", "public int getType() { \n return type; \n }", "public int getType(){\n return type;\n }", "@Override\n\t\tpublic String toString()\n\t\t{\n\t\t\treturn type;\n\t\t}", "public String getType(){\n return this.type;\n }", "public String getType(){\n\treturn type;\n }", "public int getType() { return type; }", "public int getType() { return type; }", "public int Gettype(){\n\t\treturn type;\n\t}", "public void printType() {\n System.out.println(\"Type: \" + objRef.getClass().getName());\n }", "public int getType() {\n return type_;\n }", "public String toString() {\n return type;\n }", "public int getType() {\n return type;\n }", "public TYPE getType(){\n return this.type;\n }", "public String getType() {return type;}", "public String type(){\n\t\treturn type;\n\t}", "public String getType(){\r\n return type;\r\n }", "public String getType()\n {\n\treturn type;\n }", "public String getType() \n {\n return this.type;\n }", "public String getType() {\n\treturn type;\n }", "public int getType () {\r\n return type;\r\n }", "public Object getType()\r\n {\r\n\treturn type;\r\n }", "public int getType() {\n\t\treturn 1;\r\n\t}", "public void printType(){\n\t\tSystem.out.println(\"X Type : \"+objXReff.getClass().getName());\n\t\tSystem.out.println(\"Y Type : \"+objYReff.getClass().getName());\n\t}", "public String getType() { return type; }", "public int getType(){\r\n\t\treturn type;\r\n\t}", "public int getType(){\n\t\treturn type;\n\t}", "public int type() {\n return this.type;\n }", "public String getType() \n {\n return type;\n }", "public int getType(){\n\t\treturn this.type;\n\t}", "public int getType(){\n\t\treturn this.type;\n\t}", "public String getType(){\r\n\t\treturn this.type;\r\n\t}", "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "public String type() {\n return this.type;\n }", "@Override\n public String getType(){\n return Type;\n }", "@Override\n\tpublic int getType() {\n\t\treturn 1;\n\t}", "public int getType()\r\n {\r\n return type;\r\n }", "public String get_type()\r\n\t{\r\n\t\treturn this.type;\r\n\t}", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "int getType();", "public int type() {\n return type;\n }", "public int getType()\n {\n return type;\n }", "public int getType()\n {\n return type;\n }", "String getType() {\r\n return this.type;\r\n }", "public String getType()\n \t{\n \t\treturn this.type;\n \t}", "public String toString() {\n return type.toString();\n }", "public int getType()\n {\n return this.type;\n }", "public String getType() {\n return type;\n }", "type getType();", "public short getObjtype() {\n\treturn objtype;\n}", "public String getType() {\r\n return this.type;\r\n }", "@Override\r\n\tpublic byte getType() {\n\t\treturn type;\r\n\t}", "public String getType(){\n\t\treturn type;\n\t}", "public String getType(){\n\t\treturn type;\n\t}", "public String toString() {\n\t\treturn b.toString();\n\t}", "public String getType() {\n return this.type;\n }", "public String getType() {\n return this.type;\n }", "public int getType()\r\n\t{\r\n\t\treturn type;\r\n\t}", "public int getType () {\n return type;\n }", "public int getType () {\n return type;\n }", "public static $type () {\n }", "public String getType() {\n return type; \n }", "public Type getType(){\n\t\treturn this.type;\n\t}", "String getType() {\n return type;\n }", "public Type getType()\n {\n return type;\n }", "@Override\n\tpublic void type() {\n\t\t\n\t}", "public String getType()\r\n {\r\n return type;\r\n }", "public byte getType() {\n return this.type;\n }", "public int getType() {\n return _type;\n }", "public int getType() {\n return _type;\n }", "public int getType() {\n return type;\n }", "public Type getType() {\n return _type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public String getType()\n {\n return type;\n }", "public int getType()\n\t{\n\t\treturn type;\n\t}", "public String getType()\n {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }", "public Byte getType() {\n return type;\n }" ]
[ "0.6963269", "0.6889248", "0.6768395", "0.67606395", "0.6724127", "0.67071736", "0.6642285", "0.6633376", "0.6593657", "0.65702903", "0.65673214", "0.6556878", "0.65265805", "0.65265805", "0.65237004", "0.65191877", "0.6518624", "0.6456833", "0.6444572", "0.64349276", "0.6423262", "0.63988125", "0.63620275", "0.63544613", "0.6326928", "0.6314089", "0.63106906", "0.6303346", "0.6280008", "0.6271113", "0.62705183", "0.6254221", "0.62463504", "0.6239454", "0.62372094", "0.62206006", "0.62206006", "0.6216266", "0.6186157", "0.6167429", "0.6167429", "0.6167429", "0.6167429", "0.6167429", "0.6167429", "0.61645705", "0.61596155", "0.6148486", "0.6147894", "0.614736", "0.614736", "0.614736", "0.614736", "0.614736", "0.614736", "0.614736", "0.614736", "0.6144851", "0.61428493", "0.61428493", "0.6139562", "0.6136514", "0.61360544", "0.61314356", "0.61177", "0.6116643", "0.6076712", "0.60705334", "0.6062903", "0.60575783", "0.60575783", "0.6052895", "0.6044744", "0.6044744", "0.6030613", "0.6019572", "0.6019572", "0.6017965", "0.60125583", "0.6011432", "0.6005364", "0.6004522", "0.59890497", "0.5982059", "0.5981364", "0.59780514", "0.59780514", "0.59662116", "0.59524804", "0.5945754", "0.5945754", "0.5945754", "0.5945754", "0.5945754", "0.5945754", "0.59454393", "0.59399664", "0.5939757", "0.5939757", "0.5939757", "0.5939757" ]
0.0
-1
System.out.println("env types " + env);
public lexeme insert(lexeme variable, lexeme value, lexeme env){ setCar(env, new lexeme("GLUE", variable, car(env))); setCar(cdr(env), new lexeme("GLUE", value, cadr(env))); return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EnvironmentType getEnvTypes() {\n return envTypes;\n }", "public String getEnv() {\n\n return env;\n }", "String getEnvironment();", "Properties getEnvironment();", "Properties getEnvironment();", "private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }", "public Map<String, String> getEnvironment();", "public Map<String, String> getEnv()\n {\n return env;\n }", "EnvVarType createEnvVarType();", "@Override\n\tpublic String getEnvironmentVars() {\n\t\treturn model.getEnvironmentVars();\n\t}", "int getEnvCount();", "public static void printSystemVariables() {\n\t\tMap<String, String> env = System.getenv();\n\t\tfor (Map.Entry<String, String> entry : env.entrySet()) {\n\t\t\tSystem.out.println(entry.getKey() + \" : \" + entry.getValue());\n\t\t}\n\t}", "public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }", "public int getEnvCount() {\n return env_.size();\n }", "public String getSystemEnv() {\n return \"\";\n }", "java.lang.String getEnv(int index);", "public String getEnvironment() {\n return environment;\n }", "private static String mode() {\n return System.getProperty(SYSTEM_PROPERTY_NAME, System.getenv(ENV_VARIABLE_NAME));\n }", "public String getEnvironment(){\n\n String env = null;\n try {\n env = System.getProperty(\"env\");\n if(env !=null)\n return env;\n else\n return prop.getProperty(ENVIRONMENT_KEY);\n\n }catch(Exception e)\n {\n return prop.getProperty(ENVIRONMENT_KEY);\n }\n }", "public int getEnvCount() {\n return env_.size();\n }", "public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_;\n }", "EnvVariablesType createEnvVariablesType();", "private void cmdInfoVars() throws NoSystemException {\n MSystem system = system();\n \n System.out.print(system.getVariableEnvironment());\n }", "private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }", "java.util.List<java.lang.String>\n getEnvList();", "public Env getEnv() {\n\t\treturn _env;\n\t}", "private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }", "TipoEnvio getTipoEnvio();", "public String[] getEnvironmentParams()\r\n\t{\r\n\t\treturn environmentParams;\r\n\t}", "boolean check (Env env) {\n return true;\n }", "boolean k2h_load_debug_env();", "public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_.getUnmodifiableView();\n }", "public org.eclipse.stardust.engine.api.runtime.RuntimeEnvironmentInfo\n getRuntimeEnvironmentInfo()\n throws org.eclipse.stardust.common.error.WorkflowException;", "public TreeMap<String,String> \n getEnvironment()\n {\n return pEnvironment;\n }", "public String getEnvironment(String env) {\n\t\treturn environment.get(env);\n\t}", "public Environment environment()\n {\n return theEnv;\n }", "private Map<String, String> getTestProcessEnvironment() {\n Map<String, String> env = new HashMap<>();\n env.put(\"TESTSERVICE_AUTH_TYPE\", \"noAuth\");\n return env;\n }", "public java.lang.String getEnv(int index) {\n return env_.get(index);\n }", "public synchronized Map<String, String> getEnvironment() throws Fault {\n if (env == null) {\n // reconstitute environment\n // this may result in a Fault, which is okay\n reload();\n }\n return PropertyArray.getProperties(env);\n }", "public static void main(String[] args) {\n if(args.length == 0) {\n System.out.println(\"Unable to access specific env var, retrieving all env vars\");\n Map<String, String> envValues = getenv();\n for(String s : envValues.keySet()) {\n System.out.println(s + \"=\" + envValues.get(s));\n }\n\n } else {\n\n String envValue = System.getenv(args[0]);\n System.out.println(args[0] + \"=\" + envValue);\n }\n }", "public java.lang.String getEnv(int index) {\n return env_.get(index);\n }", "public String getContainerEnv() {\n return containerEnv;\n }", "@Override\n\tpublic Environment<String, V> getEnvironment() {\n\t\treturn null;\n\t}", "public int[][] getEnvironment() {\n return this.environment;\n }", "public synchronized Map<String, String> getenv() {\n return System.getenv();\n }", "public String[] getEnvArray()\n {\n return (String[])envMap.values().toArray(new String[envMap.size()]);\n }", "Environment createEnvironment();", "Environment createEnvironment();", "private static Map<String, Environment> getEnvironments() {\n Map<String, Environment> environmentMap = new HashMap<String, Environment>();\n Environment prodEnv = new Environment();\n prodEnv.setName(PROD_1);\n prodEnv.setPassword(PROD_1_PASSWORD);\n\n Environment sandBoxEnv = new Environment();\n sandBoxEnv.setName(SND_1);\n sandBoxEnv.setPassword(SND_1_PASSWORD);\n\n environmentMap.put(PROD_1, prodEnv);\n environmentMap.put(SND_1, sandBoxEnv);\n return environmentMap;\n }", "public Map<String, String> getEnv(IProject project) throws CoreException;", "public Map<String, String> getEnv(URI uri) throws CoreException;", "public void intServerEnv() {\n\t\tServerUtils serverUtils = new ServerUtils();\n\t\tTouchstoneParsers parsers = new TouchstoneParsers();\n\n\t\tString CONFIGFILE = psoResourcePkg + \"/configs/server.properties\";\n\t\tString testConfigFile = ServerUtils.class.getResource(CONFIGFILE).getFile();\n\n\t\tHashMap<String, HashMap<String, String>> configPropsMap = parsers.readPropsFile(new File(testConfigFile));\n\t\thostIP = (configPropsMap.get(\"URL_PARAMS\").get(\"LOCAL_ENV\").equalsIgnoreCase(\"yes\") ? \"localhost\" : serverUtils.getHostIp());\n\n\t\t// JDBC driver name and database URL\n\t\tJDBC_DRIVER=\"com.mysql.jdbc.Driver\";\n\t\tDB_URL=\"jdbc:mysql://\" + hostIP + \"/psotest\";\n\n\t\t// Database credentials\n\t\tUSERID = configPropsMap.get(\"SERVER_ENV\").get(\"USERID\");\n\t\tPASSWORD = configPropsMap.get(\"SERVER_ENV\").get(\"PASSWORD\");\n\n\t\t// Database tables:\n\t\tCLICKS_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"CLICKS_TABLE\");\n\t\tBEACON_TABLE = configPropsMap.get(\"SERVER_ENV\").get(\"BEACON_TABLE\");\n\n\t}", "public abstract Map<String, String> getEnvironment(NIOWorker nw);", "static boolean env_var_value(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"env_var_value\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, \"env\");\n r = r && consumeTokens(b, 0, L_PAREN, STRING, R_PAREN);\n exit_section_(b, m, null, r);\n return r;\n }", "public static boolean isDevEnv() {\n return (Boolean) Launch.blackboard.get(\"fml.deobfuscatedEnvironment\");\n }", "public Environment getEnvironment() {\n \n \t\treturn this.environment;\n \t}", "public static void systemPropertyTest() {\n\n Properties properties = System.getProperties();\n properties.list(System.out);\n }", "public IEnvVarBuildPath[] getEnvVarBuildPaths();", "public Environment getEnvironment()\n\t{\n\t\treturn environment;\n\t}", "Environment getEnvironment() {\n return recordingEnv;\n }", "public envio() {\r\n }", "public static LinkedHashMap<String, String> getServerEnvi() {\n return _m_server_envi;\n }", "protected String getenv(String varname) {\n\t\t//return System.getProperty(varname);\n\t\treturn \"\"; //TODO allow virtual system variables for each computer, that are remembered on restart\n\t}", "public Verif() {\n\t\tenv = new Environ();\n\t}", "com.google.protobuf.ByteString\n getEnvBytes(int index);", "public native void getenv(java.lang.String key);", "public PythonInterpreter getEnvironment(String name) {return environments.get(name);}", "public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }", "public com.google.protobuf.ByteString\n getEnvBytes(int index) {\n return env_.getByteString(index);\n }", "public interface Environment {\n\tpublic Object resolveVariable(String name);\n\tpublic List<String> getRegisteredVariableNames();\n}", "private void getEnvironment(Environment env, FileProcess file) {\n\t\tint t = 0;\n\t\tboolean setReg = false, setFlag = false, setMem = false;\n\t\twhile (true) {\n\t\t\tString temp = file.getLineAt(t);\n\n\t\t\tif (temp == null || temp == \"\") {\n\t\t\t\treturn;\n\t\t\t} else if (temp.contains(\"Register\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tenv.getRegister().setRegisterValue(r[0], new LongValue(Long.parseLong(r[1], 16)));\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tsetReg = true;\n\t\t\t} else if (temp.contains(\"Flag\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\n\t\t\t\t\tif (r[1].toLowerCase().contains(\"true\")) {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(true));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tenv.getFlag().setFlagValue(r[0], new BooleanValue(false));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetFlag = true;\n\t\t\t} else if (temp.contains(\"Memory\")) {\n\t\t\t\ttemp = temp.substring(temp.indexOf(\":\") + 1, temp.length());\n\t\t\t\tString[] reg = temp.split(\",\");\n\t\t\t\tfor (int i = 0; i < reg.length; i++) {\n\t\t\t\t\treg[i] = reg[i].replace(\" \", \"\");\n\t\t\t\t\tString r[] = reg[i].split(\"=\");\n\t\t\t\t\tString addr = r[0].replace(\"0x\", \"\");\n\t\t\t\t\tlong x = Long.parseLong(addr, 16);\n\t\t\t\t\tbyte y = (byte) Long.parseLong(reduce(r[1], 8), 16);\n\t\t\t\t\tenv.getMemory().setByteMemoryValue(x, new LongValue(y));\n\t\t\t\t}\n\t\t\t\tsetMem = true;\n\t\t\t} \n\t\t\tt++;\n\t\t\t\n\t\t\tif (setReg && setFlag && setMem) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public String toString () {\n String r = \"[ \";\n for (Env env = this; env != null; env = env.next) { \n r += env.key + \" \";\n }\n r += \"]\";\n return r;\n }", "public EnvironmentFrame getEnvironmentFrame() {\n\t\treturn myEnvFrame;\n\t}", "private void setupEnvironment(Execute exe) {\r\n String[] environment = env.getVariables();\r\n if (environment != null) {\r\n for (int i = 0; i < environment.length; i++) {\r\n log(\"Setting environment variable: \" + environment[i], Project.MSG_VERBOSE);\r\n }\r\n }\r\n exe.setNewenvironment(newEnvironment);\r\n exe.setEnvironment(environment);\r\n }", "public static void main(String[] args) {\n\tSystem.out.println(System.getenv(\"JAVA_HOME\"));\n}", "public String getEnvironmentName() {\n return this.environmentName;\n }", "EnvEntry createEnvEntry();", "public static Properties getEnvVars() throws Throwable {\n Process p = null;\n Properties envVars = new Properties();\n Runtime r = Runtime.getRuntime();\n String OS = System.getProperty(\"os.name\").toLowerCase();\n if (OS.indexOf(\"windows 9\") > -1) {\n p = r.exec(\"command.com /c set\");\n } else if ((OS.indexOf(\"nt\") > -1) || (OS.indexOf(\"windows 2000\") > -1)\n || (OS.indexOf(\"windows xp\") > -1)) {\n p = r.exec(\"cmd.exe /c set\");\n } else {\n // our last hope, we assume Unix\n p = r.exec(\"env\");\n }\n try (BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()))) {\n String line;\n while ((line = br.readLine()) != null) {\n int idx = line.indexOf('=');\n if (idx < 0)\n continue;\n String key = line.substring(0, idx);\n String value = (idx < line.length() - 1) ? line.substring(idx + 1) : \"\";\n envVars.setProperty(key, value);\n }\n }\n // do nothing\n return envVars;\n }", "@Override\n public String toString() {\n StringBuilder sb = new StringBuilder();\n sb.append(\"Environment size: \");\n sb.append(environmentSize);\n sb.append(\"\\n\");\n sb.append(\"Maximum number of iterations: \");\n sb.append(maxIterations);\n sb.append(\"\\n\");\n sb.append(\"Number of environment simulations: \");\n sb.append(numEnvironmentRuns);\n\n if (environment instanceof EnvironmentAI) {\n sb.append(\"\\n\");\n sb.append(\"Number of inputs: \").append(numInputs);\n sb.append(\"\\n\");\n sb.append(\"Number of hidden units: \").append(numHiddenUnits);\n sb.append(\"\\n\");\n sb.append(\"Number of outputs: \").append(numOutputs);\n sb.append(\"\\n\");\n sb.append(\"Activation function(s): \").append(activationFunctions);\n }\n\n return sb.toString();\n }", "@ApiModelProperty(example = \"node main.js\", required = true, value = \"Process for watchdog to fork\")\n public String getEnvProcess() {\n return envProcess;\n }", "String vmExtensionType();", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "public static String _process_globals() throws Exception{\nreturn \"\";\n}", "@Override\n\tpublic void assertEnvironment(TargetEnvironment environment) {\n\t\tassertEquals(\"i386:x86-64\", environment.getArchitecture());\n\t\tassertEquals(\"GNU/Linux\", environment.getOperatingSystem());\n\t\tassertEquals(\"little\", environment.getEndian());\n\t\tassertTrue(environment.getDebugger().toLowerCase().contains(\"gdb\"));\n\t}", "private void ausgebenSystem() {\n\t\ttry {\n\t\t\tSystem.out.println(\"Rechner: \" + InetAddress.getLocalHost().getHostName());\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println();\n\t\tString txt = System.getProperties().toString();\n\t\twhile (txt.indexOf(\",\") > 0) {\n\t\t\tSystem.out.println(txt.substring(0, txt.indexOf(\",\") + 1));\n\t\t\ttxt = txt.substring(txt.indexOf(\",\") + 2);\n\n\t\t}\n\t\tSystem.out.println(txt);\n\t}", "public static void main(String[] args){\n\n System.setProperty(\"myKey\",\"myValue\");\n\n String value = System.getProperty(\"os.name\");\n sop(value);\n// for(Object obj : prop.keySet()){\n// String value = (String)prop.get(obj);\n// sop(value);\n// }\n\n }", "public void addEnvEntry (String name, Object value)\n {\n if (_envMap == null)\n _envMap = new HashMap();\n\n if (name == null)\n log.warn (\"Name for java:comp/env is null. Ignoring.\");\n if (value == null)\n log.warn (\"Value for java:comp/env is null. Ignoring.\");\n\n _envMap.put (name, value);\n }", "protected void printHelp(PrintStream ps) {\n ps.println();\n ps.println(\"Sets the test environment to point to.\");\n ps.println(\"Usage : setenv <environment>\");\n ps.println(\"Options: oracle - sample oracle env\");\n ps.println(\" p6spy - sample p6spy env\"); \n ps.println(\" hdsq1 - sample hsql env\");\n ps.println();\n }", "public interface RealEnvironment extends Environment {\n\n}", "public Map<String, String> environmentVariables() {\n return this.environmentVariables;\n }", "File prepareEnvironment();", "public ObjectType getJVMType();", "public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\t\t\t// get the property value and print it out\n\t\t Map<String, Object> map = new HashMap<>();\n\t\t\tfor (Entry<Object, Object> entry : prop.entrySet()) {\n\t\t\t\tmap.put((String) entry.getKey(), entry.getValue());\n\t\t\t}\n\t\t\tEnvironmentVariablesForWeb.setEnvironmentPropertyMap(map);\n\t\t\t/*EnvironmentVariables.PLATFORM_NAME = prop.getProperty(\"PLATFORM_NAME\");\n\t\t\tEnvironmentVariables.VERSION_NAME = prop.getProperty(\"VERSION_NAME\");\n\t\t\tEnvironmentVariables.DEVICE_NAME = prop.getProperty(\"DEVICE_NAME\");\n\t\t\tSystem.out.println(EnvironmentVariables.PLATFORM_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.VERSION_NAME);\n\t\t\tSystem.out.println(EnvironmentVariables.DEVICE_NAME);*/\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tif (input != null) {\n\t\t\t\ttry {\n\t\t\t\t\tinput.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t }", "final static String[] getEnvVarArray(@SuppressWarnings(\"rawtypes\") Map map)\n {\n if (map == null)\n {\n return null;\n }\n\n String[] arr = new String[map.size()];\n\n int x = 0;\n for (Object k : map.keySet())\n {\n Object v = map.get(k);\n arr[x] = String.format(\"%s=%s\", k, v);\n ++x;\n }\n\n return arr;\n }", "private void setEnv(final String value) {\n\n env = StringUtils.trim(value);\n }", "String getEnvironmentProperty(String key);", "public\n SubProcessExecDetails\n ( \n String cmd, \n Map<String,String> env\n )\n {\n pCommand = cmd; \n pEnvironment = new TreeMap<String,String>(env);\n }", "private String getType( )\n\t{\n\t\treturn this.getModuleName( ) + \"$\" + this.getSimpleName( ) + \"$\" + this.getSystem( );\n\t}", "String getOs();" ]
[ "0.7141621", "0.6707863", "0.6701517", "0.6541707", "0.6541707", "0.64912915", "0.63532", "0.63399535", "0.6242958", "0.62404585", "0.6230303", "0.61965334", "0.6151968", "0.6128062", "0.61246926", "0.60689723", "0.6057086", "0.6053886", "0.6053151", "0.6018694", "0.60147405", "0.6000731", "0.59852546", "0.5960742", "0.5939731", "0.5922683", "0.58250374", "0.57667905", "0.57169336", "0.5701429", "0.56882834", "0.566228", "0.5660005", "0.56584585", "0.5637534", "0.56194127", "0.5602949", "0.55744976", "0.55704343", "0.55561", "0.55462223", "0.5500615", "0.5480874", "0.54791033", "0.5475484", "0.54427147", "0.54371643", "0.54371643", "0.5436377", "0.5422118", "0.54204434", "0.5416024", "0.537054", "0.5318665", "0.53178144", "0.5307966", "0.526942", "0.52641404", "0.52515143", "0.524524", "0.52224916", "0.51854384", "0.51828873", "0.51761067", "0.51709616", "0.516942", "0.5169039", "0.51513577", "0.5149722", "0.5148108", "0.5099953", "0.5084125", "0.507965", "0.50594187", "0.50578564", "0.50577897", "0.5040093", "0.5018039", "0.5018037", "0.501645", "0.5016004", "0.5014839", "0.5014839", "0.5014839", "0.5014839", "0.5012269", "0.5010361", "0.50079423", "0.49864942", "0.49810326", "0.497972", "0.49796614", "0.49680436", "0.49673682", "0.49623019", "0.49431312", "0.4938626", "0.49303538", "0.4910942", "0.4909317", "0.49021706" ]
0.0
-1
System.out.println("var is " + variable);
public lexeme update(lexeme variable, lexeme value, lexeme env){ lexeme oldE = env; while (env != null){ lexeme vars = car(env); lexeme vals = cadr(env); while(vars != null && vars.type != "EMPTY"){ //System.out.println("variable is " + variable.type + " vars " + car(vars).type); if (sameVariable(variable, car(vars))){ return setCar(vals, value); } vars = cdr(vars); vals = cdr(vals); } env = cdr(cdr(env)); } //System.out.printf("Variable %s is undefined\n", variable.stringToken); return insert(variable, value, oldE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getVariable() {\n return variable;\n }", "public String getVariable();", "public String variable()\n\t{\n\t\treturn _var;\n\t}", "String getVariable();", "public String getVar()\n {\n return var;\n }", "public String getVariable()\n {\n return this.strVariable;\n }", "public String getVar () {\n\t\treturn var;\n\t}", "public Name getVariable() {\n return variable;\n }", "public String toString() {\r\n return this.variable;\r\n }", "public String getVar() {\n\t\treturn _var;\n\t}", "Variable(String _var) {\n this._var = _var;\n }", "public Var(String var) {\r\n this.variable = var;\r\n }", "@Override\n \tpublic void logVarUsed(String var) {\n \t\tSystem.out.println(\"\\tVariable used: \" + var);\n \t}", "java.lang.String getVarValue();", "public String toString () {\n return nameOfVar;\n }", "Node getVariable();", "public void methodOne() {\n \n System.out.println(\"Method ONE Prints variable as: \" + var);\n \n }", "public void setVar(String var)\n {\n this.var = var;\n }", "Var getVar();", "public java.lang.String getVariableValue() {\r\n return variableValue;\r\n }", "static void PrintVarValues(String s){\n System.out.println(s);\n }", "protected String getVar(String variable) {\n\t\treturn myVarMap.get(variable);\n\t}", "public String differentiate(Parser.Variable var){\n String expVar = var.toString();\n String output;\n if (expVar.equals(variable)){\n output = \"1\";\n return output;\n }\n else{\n output = \"0\";\n return output;\n }\n }", "public static void main(String args[]) {\n int variableEntera = 10;\n System.out.println(variableEntera);\n //Cambio de valor de una Variable\n variableEntera = 5;\n System.out.println(variableEntera);\n \n String variableCadena = \"Saludos\";\n System.out.println(variableCadena);\n \n variableCadena = \"Adios\";\n System.out.println(variableCadena);\n \n //var hace inferencias de tipos en Java\n \n var variableEntera2 = 15;\n System.out.println(variableEntera2);\n \n var variableCadena2 = \"Nueva Cadena\";\n System.out.println(\"miVariableCadena2 = \" + variableCadena2);\n \n }", "public void setVar(String var) {\n\t\tthis.var = var;\n\t}", "public void setVariable(Variable variable) {\n this.variable = variable;\n }", "String getVarDeclare();", "public ElementVariable getVariable() {\n\t\treturn variable;\n\t}", "void displayMyStaticVariable() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// displayMyStaticVariable Method created with no parameters\r\n System.out.println(\"Static Variable Initialized in class called StaticVariables and equals to \" + myStaticVariable);\t// This will print out the argument in the next line\r\n }", "@Override String opStr() { return \"var\"; }", "public void methodThree(int var) {\n \n System.out.println(\"Method THREE Prints variable as: \" + this.var);\n }", "public static void someFunction() {\n\n System.out.println(\"Class variable: \" + classVariable);\n }", "public String getVar() {\n\t\treturn state.get(PropertyKeys.var);\n\t}", "public void setVar(String var) {\n\t\tthis._var = var;\n\t}", "@Override\r\n public void status(String strVar)\r\n {\r\n System.out.println(strVar);\r\n }", "private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }", "String getVariableInput() {\n return (variableInput.getText());\n }", "@Override\n \tpublic void logVarCreated(String name, String type) {\n \t\tSystem.out.println(\"\\tVariable created: [\" + type + \"] \" + name );\n \t}", "@Override\n\tprotected String getVariableClassName() {\n\t\treturn \"variable\";\n\t}", "@TableElement(index = 0, name = \"Variable\")\n public @NonNull String getVariable() {\n return variable;\n }", "public String getVariableName() {\n return _vname;\n }", "@JsonProperty(\"variable\")\n @ApiModelProperty(value = \"The location in the dialog context where output is stored.\")\n public String getVariable() {\n return variable;\n }", "Variable createVariable();", "Variable createVariable();", "@Override\n \tpublic void logVarChanged(String var, String value) {\n\t\tSystem.out.println(\"\\tNew Variable Value: \" + var + \" = \" + value);\n \t}", "public void setVariable(Name variable) {\n this.variable = variable;\n }", "String getVariableDefinition();", "public static void main(String[] args) {\n System.out.println(variable);\n System.out.println(\"passed\");\n }", "public String toString(){return \"(X\" + variable + \" (\"+ zero + \")\" + \" (\" + one +\"))\";}", "public static void main(String[] args) {\n\tString variable=\"Hello\";\n\t\n\tString mySentence= \"Today is Sunday!\";\n\t\n System.out.println(mySentence);\n \n //int number=\"99\"; - anything that is put in \"\" becomes a string, must change int to String\n \n String number=\"99\"; //we will get 99 as a string\n System.out.println(number);\n \n \n \n\t}", "@Override\n \tpublic void logVarDeath(String var) {\n \t\tSystem.out.println(\"\\tVariable death: \" + var);\n \t}", "public int getVariable(String variable) {\n switch(variable) {\n case \"_HP\" : return (getAiOwner().getGameStats().getHp().getIntValue() * 100) / getAiOwner().getGameStats().getHp().getIntMaxValue();\n case \"_MyBodyHeight\": return getAiOwner().getTemplate().getBodyHeight();\n case \"CharIDValue\" : return getAiOwner().getTemplate().getCreatureId();\n }\n return _variables.get(variable);\n }", "public Variable getVariable(String name);", "public void describeVariable(Object object, String variableName) {\n\t\ttry {\n\t\t\tField field = object.getClass().getDeclaredField(variableName);\n\t\t\tSystem.out.println(\"field \" + variableName + \" = \"\n\t\t\t\t\t+ field.get(object));\n\t\t} catch (Exception exception) {\n\t\t\texception.printStackTrace();\n\t\t}\n\t}", "@Override\n\tprotected String getValue(final String variableName)\n\t{\n\t\treturn Strings.toString(variables.get(variableName));\n\t}", "public void methodTwo(int var) {\n \n System.out.println(\"Method TWO Prints variable as: \" + var);\n }", "public Variable(String name){\n this.name = name;\n }", "public IString getVariableIdentifier() {\n\treturn VARIABLE_IDENTIFIER.get(getNd(), this.address);\n }", "public String toString()\n\t{\n\t\treturn \"\" + storedVar1 + storedVar2;\n\t}", "public Code visitVariableNode(ExpNode.VariableNode node) {\n beginGen(\"Variable\");\n SymEntry.VarEntry var = node.getVariable();\n Code code = new Code();\n code.genMemRef(staticLevel - var.getLevel(), var.getOffset());\n endGen(\"Variable\");\n return code;\n }", "public String evaluate(String expression, String variable) {\n Lexer lex = new Lexer(expression);\n Parser parser = new Parser(lex);\n Expression exp;\n exp = parser.parse();\n String output = differentiate(exp, variable);\n return output;\n \n }", "public String getVariableName() {\n\t\treturn variableName;\n\t}", "public String getVariableName() {\n\t\treturn variableName;\n\t}", "public boolean isVariable() {\n return false;\n }", "public void setVariable(String strVariable)\n {\n this.strVariable = strVariable;\n }", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "public static void main(String[] args) \r\n\t{\r\n\t\tVariable_Types obj=new Variable_Types();\r\n\t\tString tname=obj.toolname;\r\n\t\tSystem.out.println(\"Instant Variable name is => \"+tname);\r\n\r\n\t\t\r\n\t\t/*\r\n\t\t * Calling Class variables [Variable with static specifier]\r\n\t\t * \t\t\r\n\t\t */\r\n\t\tString mail=email;\r\n\t\tSystem.out.println(\"static variable value is => \"+mail);\r\n\t}", "public Variable(String name) {\r\n\tthis.name = name;\r\n }", "protected IDecisionVariable getVariable() {\n return variable;\n }", "private String getVariable(IInstallableUnit iu) {\n \t\tString v = (String) variables.get(iu);\n \t\tif (v == null) {\n \t\t\t//\t\t\tv = new String(\"x\" + (variables.size() + shift) + iu.toString()); //$NON-NLS-1$\n \t\t\tv = new String(\"x\" + (variables.size() + shift)); //$NON-NLS-1$\n \t\t\tvariables.put(iu, v);\n \t\t}\n \t\treturn v;\n \t}", "String getVarName();", "String getVarName();", "String getVarName();", "public java.lang.String getVarValue() {\n java.lang.Object ref = varValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n varValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public static void main(String[] args) {\n var number = 12345;\n var text = \"The number is...\";\n //\n System.out.println(text + number + \"!!!\");\n }", "public java.lang.CharSequence getVar234() {\n return var234;\n }", "public java.lang.String getVarValue() {\n java.lang.Object ref = varValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n varValue_ = s;\n }\n return s;\n }\n }", "public void storeTitle(final String variableName);", "public java.lang.Short getVariableType() {\r\n return variableType;\r\n }", "public java.lang.CharSequence getVar233() {\n return var233;\n }", "public void leerVariable(String nombre, Dato variable);", "public java.lang.CharSequence getVar17() {\n return var17;\n }", "public StructuredQName getVariableQName() {\n return variableQName;\n }", "public VariableView getVarView() {\n \t\treturn this.varView;\n \t}", "public java.lang.CharSequence getVar233() {\n return var233;\n }", "public String getString (String variable){ // Strongly inspired in JMatLink\r\n if (matlabEng==null) return \"\";\r\n matlabEng.engEvalString(id,\"EjsengGetCharArrayD=double(\" + variable +\")\" );\r\n double[][] arrayD = matlabEng.engGetArray(id,\"EjsengGetCharArrayD\");\r\n if (arrayD==null) return null;\r\n matlabEng.engEvalString(id,\"clear EjsengGetCharArrayD\");\r\n String value[] = double2String(arrayD);\r\n if (value.length<=0) return null;\r\n return value[0];\r\n }", "@Override\n\tpublic Object visit(ASTVar node, Object data) {\n\t\tint indent = (Integer) data;\n\t\tprintIndent(indent);\n\t\tSystem.out.print(node.varName);\n\t\treturn null;\n\t}", "public java.lang.CharSequence getVar17() {\n return var17;\n }", "public static String getVariable(){\n Scanner kb = new Scanner(System.in);\n String variable = null;\n\n System.out.println(\"Enter the variable you would like to solve for: \");\n variable = kb.nextLine().toLowerCase();\n\n // check to make sure it is a valid variable name\n if( !variable.equals(\"height\") && !variable.equals(\"volume\") && !variable.equals(\"radius\")){\n System.out.println(\"Please enter in a valid variable (i.e. height, volume, or radius)...\");\n getVariable();\n }\n\n return variable;\n }", "public String getVariableAttribute() {\n\t\treturn variableAttribute;\n\t}", "public java.lang.Integer getVar42() {\n return var42;\n }", "private String matchVariable(String key) {\n\t\treturn variables.get(key);\n\t}", "Variable getTargetVariable();", "public void store(final String text, final String variableName);", "int getVar() {\n\n return super.var; //Line n3. refer to its immediate parents variable of var\n }", "private String convertVariable(final String variable) {\n\t\tchar ch;\n\t\tfinal StringBuilder buffer = new StringBuilder();\n\t\tfor (int i = 0, len = variable.length(); i < len; i++) {\n\t\t\tch = variable.charAt(i);\n\t\t\tif (Character.isUpperCase(ch)) {\n\t\t\t\tbuffer.append('_');\n\t\t\t\tbuffer.append(Character.toLowerCase(ch));\n\t\t\t} else {\n\t\t\t\tbuffer.append(ch);\n\t\t\t}\n\t\t}\n\t\treturn buffer.toString();\n\t}", "String getSourceVariablePart();", "protected Element myVar(){\n\t\treturn el(\"bpws:variable\", new Node[]{\n\t\t\t\tattr(\"messageType\", \"nswomo:receiveMessage\"),\n\t\t\t\tattr(\"name\", VARNAME)\n\t\t});\n\t}", "@Override\r\n\tpublic void visit(VariableExpression variableExpression) {\n\r\n\t}", "public java.lang.Integer getVar42() {\n return var42;\n }", "public Integer getCurValue(Integer variable) {\n return variables.get(variable).getValue();\n }" ]
[ "0.79064864", "0.7797968", "0.7797174", "0.77360636", "0.7637687", "0.75677514", "0.73789597", "0.73726684", "0.7342738", "0.72067356", "0.69631463", "0.69626975", "0.689528", "0.68948567", "0.6817054", "0.6720611", "0.6666844", "0.6657765", "0.6636141", "0.6603601", "0.6601268", "0.65927505", "0.6573042", "0.6566555", "0.6539161", "0.6523018", "0.6519267", "0.651343", "0.6512659", "0.65117", "0.6506999", "0.6505743", "0.64658546", "0.6451929", "0.63979745", "0.6332187", "0.6308167", "0.6303478", "0.6268522", "0.62660736", "0.62131816", "0.6196065", "0.6185815", "0.6185815", "0.6165042", "0.61429316", "0.6130583", "0.611734", "0.6084442", "0.60481775", "0.60110617", "0.599944", "0.5985428", "0.5972686", "0.592215", "0.59189004", "0.59176046", "0.5916057", "0.5904912", "0.58882236", "0.5879124", "0.5844166", "0.5844166", "0.58367085", "0.58226967", "0.58182496", "0.58004177", "0.57964754", "0.57943153", "0.579231", "0.57775736", "0.57775736", "0.57775736", "0.5771416", "0.5767838", "0.5766709", "0.57610834", "0.57552797", "0.5752536", "0.5743315", "0.57347906", "0.5727369", "0.5714554", "0.571419", "0.57068896", "0.57034636", "0.56943077", "0.56812215", "0.56597203", "0.56547624", "0.56478006", "0.564327", "0.5633874", "0.56190264", "0.5618597", "0.56118155", "0.5605895", "0.55894357", "0.55815554", "0.55783325", "0.5576347" ]
0.0
-1
prevent instantiation of this class
private ServiceMonitoringStatusInterpreter() { /* do nothing */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "@Override\n public boolean isInstantiable() {\n return false;\n }", "private TetrisMain() {\r\n //prevents instantiation\r\n }", "private InterpreterDependencyChecks() {\r\n\t\t// Hides default constructor\r\n\t}", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private Rekenhulp()\n\t{\n\t}", "public Preventivo() {\n\n }", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "private SystemInfo() {\r\n // forbid object construction \r\n }", "private Instantiation(){}", "private CheckingTools() {\r\n super();\r\n }", "private Validations() {\n\t\tthrow new IllegalAccessError(\"Shouldn't be instantiated.\");\n\t}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "protected YamlParser() {\n\t\t// Exists only to defeat instantiation.\n\t}", "private ObjectMacroFront() {\n\n throw new InternalException(\"this class may not have instances\");\n }", "protected ValidationException() {\r\n\t\t// hidden\r\n\t}", "private Topography()\n\t{\n\t\tthrow new IllegalStateException(\"This is an utility class, it can not be instantiated\");\n\t}", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "private ClassificationSettings() {\n throw new AssertionError();\n }", "private SerializerFactory() {\n // do nothing\n }", "Reproducible newInstance();", "private RequestManager() {\n\t // no instances\n\t}", "private Consts(){\n //this prevents even the native class from \n //calling this ctor as well :\n throw new AssertionError();\n }", "protected Warning() {\n\n }", "protected Approche() {\n }", "private XmlFactory() {\r\n /* no-op */\r\n }", "private InstanceUtil() {\n }", "private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}", "private Helper() {\r\n // do nothing\r\n }", "private MApi() {}", "private ContentUtil() {\n // do nothing\n }", "private TemplateFactory(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private PluginUtils() {\n\t\t//\t\tthrow new IllegalAccessError(\"Don't instantiate me. I'm a utility class!\");\n\t}", "private EagerlySinleton()\n\t{\n\t}", "private Log()\n {\n //Hides implicit constructor.\n }", "private RejectEmailSearchBuilder() {\r\n // nothing\r\n }", "private ScriptInstanceManager() {\n\t\tsuper();\n\t}", "private SerializationUtils() {\n\t\tthrow new AssertionError();\n\t}", "private Ex() {\n }", "private PermissionUtil() {\n throw new IllegalStateException(\"you can't instantiate PermissionUtil!\");\n }", "private DPSingletonLazyLoading(){\r\n\t\tthrow new RuntimeException();//You can still access private constructor by reflection and calling setAccessible(true)\r\n\t}", "private Utility() {\n throw new IllegalAccessError();\n }", "protected Doodler() {\n\t}", "private QcTestRunner()\n\t{\n\t\t// To prevent external instantiation of this class\n\t}", "private Security() { }", "private UtilsCache() {\n\t\tsuper();\n\t}", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "private TMCourse() {\n\t}", "private Unescaper() {\n\n\t}", "private TagCacheManager(){\n //AssertionError不是必须的. 但它可以避免不小心在类的内部调用构造器. 保证该类在任何情况下都不会被实例化.\n //see 《Effective Java》 2nd\n throw new AssertionError(\"No \" + getClass().getName() + \" instances for you!\");\n }", "private TetrisMain() {\r\n //ensure uninstantiability\r\n }", "protected Problem() {/* intentionally empty block */}", "@Override\n public boolean isFrozen() {\n return true;\n }", "private ClassifierUtils() {\n throw new AssertionError();\n }", "private SingleTon() {\n\t}", "private Source() {\n throw new AssertionError(\"This class should not be instantiated.\");\n }", "private ClassProxy() {\n }", "private GuiUtils()\r\n {\r\n // Private constructor to prevent instantiation\r\n }", "private NettyHttpUtil() {\n\t\t// do nothing.\n\t}", "public Pleasure() {\r\n\t\t}", "private RobotsGenerator() {\n throw new AssertionError();\n }", "private Quantify()\n {\n throw new UnsupportedOperationException(\"Instantiation of utility classes is not supported.\");\n }", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "static void ignore() {\n }", "private Mth()\n\t{\n\t\tthrow new AssertionError();\n\t}", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "private PluginAPI() {\r\n\t\tsuper();\r\n\t}", "private Main() {\r\n throw new IllegalStateException();\r\n }", "@SuppressWarnings(\"unused\")\n\tprivate Filter() {\n\n\t}", "private Supervisor() {\r\n\t}", "@Override\r\n public boolean isSafe() {\n return false;\r\n }", "private DarthSidious(){\n }", "private AppUtils() {\n throw new UnsupportedOperationException(\"cannot be instantiated\");\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "private WolUtil() {\n }", "public void disable();", "private ExampleVersion() {\n throw new UnsupportedOperationException(\"Illegal constructor call.\");\n }", "private AccessorModels() {\n // Private constructor to prevent instantiation\n }", "private Infer() {\n\n }", "protected VboUtil() {\n }", "private SingleObject(){}", "private ContactFactory() {\n throw new AssertionError();\n }", "@Test( expected = IllegalStateException.class )\n\tpublic void constructorShouldNotBeInstantiable() {\n\t\tnew ReflectionUtil() {\n\t\t\t// constructor is protected\n\t\t};\n\t}", "private SingletonSigar(){}", "@Override\n public void disabledInit() {}", "@SuppressWarnings(\"unused\")\r\n\tprivate TransporterException(){\r\n\t\t\r\n\t}", "private SingletonDoubleCheck() {}", "private Utils() {\n\t}", "private Utils() {\n\t}", "private Template() {\r\n\r\n }", "private NullSafe()\n {\n super();\n }", "protected AbstractService() {\n this(false);\n }", "private XmlStreamFactory()\n {\n /*\n * nothing to do\n */\n }", "private DiscretePotentialOperations() {\r\n\t}", "protected Animal() {\t\r\n\t}", "private XLogger() {\n throw new UnsupportedOperationException(\"Do not need instantiate!\");\n }", "private TechniqueStatesModels() {\n // Private constructor to prevent instantiation\n }", "private UtilityKlasse() {\n\n }", "private PropertiesLoader() {\r\n\t\t// not instantiable\r\n\t}", "@Override\n public boolean ignoreAbsorbedDamage() {\n return false;\n }" ]
[ "0.71743464", "0.6829801", "0.67074764", "0.66411585", "0.6541888", "0.64543694", "0.6436433", "0.6433347", "0.6430653", "0.6386888", "0.6333072", "0.63087195", "0.6230815", "0.6212258", "0.62069464", "0.6201657", "0.6184485", "0.61718076", "0.61597776", "0.6154811", "0.61502016", "0.6147801", "0.6147755", "0.614705", "0.6143446", "0.6129414", "0.61183", "0.6115566", "0.6102759", "0.6101929", "0.6074141", "0.6071006", "0.6070537", "0.60688406", "0.6055826", "0.6052581", "0.60471594", "0.6042425", "0.60325277", "0.60291576", "0.60125977", "0.60079235", "0.6006735", "0.6004853", "0.60013276", "0.5996893", "0.59965104", "0.599283", "0.59912163", "0.5984832", "0.5984378", "0.59713286", "0.59670204", "0.5961727", "0.59539163", "0.59304327", "0.59259367", "0.5924072", "0.5897199", "0.58828837", "0.5881599", "0.5876134", "0.5829612", "0.5822213", "0.5821378", "0.5817503", "0.5811603", "0.5810587", "0.58072674", "0.58044136", "0.5803934", "0.5799755", "0.5795653", "0.5793008", "0.5792142", "0.5788155", "0.57846975", "0.5784153", "0.57808846", "0.5772957", "0.5772422", "0.57692695", "0.57662237", "0.576396", "0.57628155", "0.57603765", "0.57580155", "0.57560134", "0.5754552", "0.5754552", "0.57538426", "0.57533956", "0.5752154", "0.57512057", "0.5748213", "0.5745056", "0.57391745", "0.57384056", "0.5733141", "0.5731287", "0.57238525" ]
0.0
-1
If Unexpected event happen we notify the listener to refresh the whole list/recycler view.
void notifyUnexpected();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void notifyDataSetChanged() {\n viewState.setShouldRefreshEvents(true);\n invalidate();\n }", "@Override\r\n public void onItemsChanged(RecyclerView recyclerView){\r\n isNotifyDataSetChanged = true;\r\n }", "public void refreshListView() {\n if (recyclerViewAdapter != null) {\n recyclerViewAdapter.notifyDataSetChanged();\n }\n }", "@Override\n public void refreshRecipeList() {\n favouritePageRecyclerViewAdapter.notifyDataSetChanged();\n\n }", "@Override\n public void onRefresh() {\n refreshData();\n }", "public void refreshList()\n {\n final ArrayAdapter adapter = (ArrayAdapter)this.foodListAdapter;\n this.getActivity().runOnUiThread(new Runnable() {\n public void run() {\n adapter.notifyDataSetChanged();\n }\n });\n }", "@Override\n public void onRefresh() {\n synchronizeContent();\n }", "@Override\n public void sure() {\n orderListAdpater.notifyDataSetChanged();\n onOrderUpdate();\n }", "@Override\n public void sure() {\n orderListAdpater.notifyDataSetChanged();\n onOrderUpdate();\n }", "@Override\n public void sure() {\n orderListAdpater.notifyDataSetChanged();\n onOrderUpdate();\n }", "public void refreshAdapter() {\n\t\tadapter.notifyDataSetChanged();\n\t\tthis.listView.onRefreshComplete();\n\t}", "public void notifyDataChanged() {\n notifyDataSetChanged();\n isLoading = false;\n }", "private void refreshRecyclerView() {\n adapter = new AppWrapperAdapter(appList,\n new AppWrapperAdapter.FeedInteractionListener() {\n @Override\n public void onAppClicked(AppWrapper app, int index) {\n // TODO\n }\n });\n recyclerView.setAdapter(adapter);\n }", "@Override\n public void onRefresh() {\n }", "@Override\n public void onRefresh() {\n }", "private void updateList() {\n Model.instace.getAllArticles(new ArticleFirebase.GetAllArticlesAndObserveCallback() {\n @Override\n public void onComplete(List<Article> list) {\n data.clear();\n data = list;\n adapter.notifyDataSetChanged();\n }\n\n @Override\n public void onCancel() {\n\n }\n });\n }", "@Override\n public void run() {\n notifyDataSetChanged();\n }", "private void notifyEventListListeners() {\n this.eventListListeners.forEach(listener -> listener.onEventListChange(this.getEventList()));\n }", "public void notifyListeners() {\n Logger logger = LogX;\n logger.d(\"notifyListeners: \" + this.mListeners.size(), false);\n List<IWalletCardBaseInfo> tmpCardInfo = getCardInfo();\n Iterator<OnDataReadyListener> it = this.mListeners.iterator();\n while (it.hasNext()) {\n it.next().refreshData(tmpCardInfo);\n }\n }", "@Override\n public void onRefresh() {\n swipeRefreshLayout.setRefreshing(false);\n heroList.clear();\n loadRecyclerViewData();\n }", "@Override\n\tpublic void onRefresh() {\n\t\trequestTime = 1;\n\t\trefreshFromServer(ListViewCompat.REFRESH);\n\t}", "@Override\n public void sure() {\n onOrderUpdate();\n orderListAdpater.notifyDataSetChanged();\n }", "@Override\n public void sure() {\n onOrderUpdate();\n orderListAdpater.notifyDataSetChanged();\n }", "@Override\n public void onRefresh() {\n reloadList();\n swipeContainer.setRefreshing(true);\n\n }", "@Override\n public void onRefresh() {\n getData();\n }", "@Override\n public void onRefresh() {\n updateListings();\n new GetDataTask().execute();\n }", "@Override\n public void onRefresh() {\n loadData();\n }", "@Override\n\t\t\tpublic void onRefresh() {\n\t\t\t\tmWeixinRecyclerView.setAdapter(mAdapter);\n\t\t\t\tmSwipeRefreshLayout.setRefreshing(false);\n\n\t\t\t}", "public void onRefresh() {\n }", "public void notifyChanged() {\n notifyDataSetChanged();\n }", "@Override\n\tpublic void onRefresh() {\n\t\tpage = 1;\n\t\tSystem.out.println(\"onRefresh1\");\n\t\tmyList.clear();\n\t\tSystem.out.println(\"onRefresh2\");\n\t\tgetData();\n\t}", "void onItemsLoadComplete() {\n adapter.notifyDataSetChanged();\n\n // Stop refresh animation\n srl.setRefreshing(false);\n }", "@Override\n public void refreshList() {\n }", "@Override\r\n\t\t\t\t\tpublic void onResponse(String arg0) {\n\t\t\t\t\t\tlistonResponse(arg0);\r\n\t\t\t\t\t\trefreshView.onRefreshComplete();\r\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onRefresh() {\n\t\t\t\t\t\tisRefreshing = true;\n\t\t\t\t\t\tsyncArticle();\n\t\t\t\t\t}", "private void refresh(boolean isItemValueChanged, boolean updateAll) {\n CTSCLog.d(TAG, \"refresh()\" + \" isItemValueChanged = \" + isItemValueChanged\n + \" updateAll = \" + updateAll);\n if (isItemValueChanged) {\n updateListViewData(updateAll);\n }\n refreshUI(updateAll);\n CTSCLog.d(TAG, \"refresh() mIsNeedPopReboot = \" + mIsNeedPopReboot);\n if (mIsNeedPopReboot && mIsPoped == false) {\n /*new AlertDialog.Builder(CheckResultActivity.this)\n .setTitle(R.string.activity_title_check_report)\n .setMessage(R.string.notify_reboot)\n .setPositiveButton(\"OK\", null).create();*/\n Toast.makeText(CheckResultActivity.this,\n getString(R.string.notify_reboot), Toast.LENGTH_LONG)\n .show();\n mIsNeedPopReboot = false;\n mIsPoped = true;\n }\n }", "private void refreshData(){\n filempty.setVisibility(View.GONE);\n adapter = new FoundRecyclerviewAdapter(FoundActivity.this, data);\n v.setAdapter(adapter);\n emptyView();\n }", "@Override\r\n\t\t\tpublic void onRefresh() {\n\r\n\t\t\t}", "@Override\n\tpublic void onMyRefresh() {\n\t\t\n\t}", "@Override\n\tpublic void onMyRefresh() {\n\t\t\n\t}", "@Override\n public void onRefresh() {\n if (CUtil.isNetworkConnected(mViewList.getContext())) {\n reloadData();\n } else {\n// Toast.makeText(mTitleView.getContext(), R.string.network_not_connection, Toast.LENGTH_SHORT).show();\n showToast(getResources().getString(R.string.network_not_connection));\n mSwipeRefreshLayout.setRefreshing(false);\n }\n }", "@Override\n\tpublic void onRefresh() {\n\n\t}", "protected void notifyItemsChanged() {\n notifyItemsChanged(0, mAdapter.getItemCount());\n }", "private <T> void forceListRefreshOn(ListView<T> lsv) {\n\t\t//System.out.println(\"refreshing\");\n\t\tObservableList<T> items = lsv.<T>getItems();\n\t\tlsv.<T>setItems(null);\n\t\tlsv.<T>setItems(items);\n\t}", "@Override\n public void onRefresh() {\n if (CheckNetwork.isInternetAvailable(getApplicationContext()))\n {\n data.clear();\n mAdapter.notifyDataSetChanged();\n apiCall();\n }\n else\n {\n Toast.makeText(RideShareHome.this, \"Internet is not available\", Toast.LENGTH_SHORT).show();\n }\n swipeContainer.setRefreshing(false);\n }", "public void onDataChanged(){}", "@Subscribe(threadMode = ThreadMode.MAIN)\n public void onAppRefreshFinished(final AppRefreshFinishedEvent event) {\n EventBus.getDefault().removeStickyEvent(AppRefreshFinishedEvent.class);\n\n new AsyncTask<ContentResolver, Void, Void>() {\n @Override\n protected Void doInBackground(ContentResolver... params) {\n if (event.isSuccessful()) {\n mListManipulator.setShownListCursor(null);\n // Give list to ListManipulator\n mListManipulator.setLoadList(getLoadListFromDb(params[0]));\n\n for (StockChange stock : event.getStockList()) {\n mListManipulator.addItemToBottom(stock);\n }\n }\n MyApplication.getInstance().setRefreshing(false);\n return null;\n }\n\n @Override\n protected void onPostExecute(Void aVoid) {\n if (mEventListener != null) {\n mEventListener.onRefreshFinished(event);\n }\n }\n }.execute(getActivity().getContentResolver());\n }", "@Override\r\n\tpublic void notifyDataSetChanged() {\n\t\tsuper.notifyDataSetChanged();\r\n\t\tLog.v(\"DEBUG\", \"CHANGE\");\r\n\t}", "@Override\n public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n mListener.onHisRefresh();\n\n }", "public void refreshListAdapter() {\n adapter.setListContent(requests);\n //We in turn set the adapter to the RecyclerView\n recyclerView.setAdapter(adapter);\n }", "public void refreshDatas(GsonNews requestNews){\n if (newsItems != null){\n Log.e(\"xx\", \"suaxinshuju\");\n// newsItems.setAdapter(newsAdapter);\n newsAdapter.setItems(requestNews.getData());\n// newsAdapter.notifyDataSetChanged();\n }\n }", "@Override\r\n\tpublic void onRefresh() {\n\r\n\t}", "private void refreshData(){\n Log.d(LOG_TAG, \"refreshData()\");\n mRVAdapter.setData(null);\n loadData();\n }", "public void reload() {\n waiterNotifications.clear();\n waiterNotifications.addAll(Local.getInstance().getWaiterNotificationList());\n notifyDataSetChanged();\n\n }", "@Override\n protected void onDataChanged() {\n }", "@Override\n\tprotected void onFailure(String result, int where) {\n\t\tlistView.onRefreshComplete();\n\t}", "@Override\r\n\t\t\tpublic void onRefresh() {\n\t\t\t\tm_nListStatus = LISTVIEW_STATUS_ONREFRESH;\r\n\t\t\t\t// 刷新广告栏\r\n\t\t\t\tif(adzoneView != null){\r\n\t\t\t\t\tadzoneView.refreshView();\r\n\t\t\t\t}\r\n\t\t\t\t// 获取悬赏任务数据\r\n\t\t\t\tstartGetData(HeadhunterPublic.REWARD_DIRECTIONTYPE_NEW, \"\", m_nRequestType);\r\n\t\t\t}", "void onRefresh() {\n\t}", "@Override\n public void onAdapterAboutToEmpty(int itemsInAdapter) {\n arrayAdapter.notifyDataSetChanged();\n Log.d(\"LIST\", \"notified\");\n i++;\n }", "@Override\n public void onPullUpToRefresh(PullToRefreshBase<ListView> refreshView) {\n mListener.onHisRefresh();\n }", "@Override\n public void onRefresh() {\n\n GetFirstData();\n }", "private void notifyListeners() {\n\t\tfor(ModelListener l:listeners) {\n\t\t\tl.update();\t// Tell the listener that something changed\n\t\t}\n\t}", "@Override\n public void onRefresh() {\n mLayout.scrollToPosition(0);\n switch (mCommentListType) {\n case ALL_COMMENT:\n mCommentPresenter.requestCommentToMe(CommentsAPI.AUTHOR_FILTER_ALL);\n break;\n case FOLLOWING_COMMENT:\n mCommentPresenter.requestCommentToMe(CommentsAPI.AUTHOR_FILTER_ATTENTIONS);\n break;\n case MINE:\n mCommentPresenter.requestCommentByMe();\n break;\n }\n }", "@Override\n public void onDataChanged() {\n\n }", "@Override\n public void refresh() {\n refresher.enqueueRefresh();\n }", "private void reafficher() {\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t}", "@Override\n\t\t\tpublic void notify(Notification n) {\n\t\t\t\tif (isActive()) handleModelChanged();\n\t\t\t\trefreshAdapters();\n\t\t\t}", "@FXML\n private void handleRefresh(ActionEvent event) {\n observableListBook.clear();\n localData();\n }", "public void notifyDataSetChanged() {\n if (noxItemCatalog != null) {\n noxItemCatalog.recreate();\n createShape();\n initializeScroller();\n refreshView();\n }\n }", "public void notifyDataSetChanged() {\n\t\tthis.mModelRssItems = mBusinessRss.getModelRssItem(mRssName,\n\t\t\t\tmOnlyViewUnRead);\n\t\tsuper.notifyDataSetChanged();\n\t}", "@Override\n public void updateRecycleView(List<K> list, String msg,\n @InitDataType.InitDataTypeChecker int type, boolean mustIsNull) {\n updateDealView();\n isFirstRefresh = false;\n adapter.onShowInitView(false);\n adapter.onShowEmptyView(false, msg);\n switch (type) {\n case InitDataType.TYPE_REFRESH_SUCCESS://刷新成功\n if (mustIsNull && (list == null || list.isEmpty())) {//请求到的数据为空\n //加载空布局 清空数据 更新\n adapter.updateNull();\n //显示空布局 提示语\n adapter.onShowEmptyView(true, msg);\n } else {\n //否则加载请求到的数据 清空原有的数据 更新新数据\n adapter.update(list);\n }\n break;\n case InitDataType.TYPE_LOAD_MORE_SUCCESS://加载更多成功\n// adapter.setShowFooter(false);\n //清除item\n adapter.onLoadMoreSuccess();\n //添加data\n adapter.addTail(list);\n break;\n case InitDataType.TYPE_REFRESH_FAIL://刷新失败\n// if (adapter.getItemCount() == 0) {\n// //显示空布局\n// adapter.onShowEmptyView(true, msg);\n// }\n if (adapter.getAdapterData() == null || adapter.getAdapterData().isEmpty()) {\n //数据为空时 加载空布局\n adapter.onShowEmptyView(true, msg);\n// adapter.notifyItemChanged();\n adapter.notifyDataSetChanged();\n }\n break;\n case InitDataType.TYPE_LOAD_MORE_FAIL://加载更多失败\n //itemCount-1 底部放置失败重试提示语\n adapter.onLoadMoreFail(msg);\n break;\n }\n }", "private void updateUI() {\n swipeRefreshLayout.setRefreshing(false);\n adapter.clearItems();\n itemList.addAll(DatabaseController.getInstance(getApplicationContext()).getItems());\n if (itemList.size() > 0){\n emptyTextView.setVisibility(View.GONE);\n adapter.notifyDataSetChanged();\n } else {\n emptyTextView.setVisibility(View.VISIBLE);\n }\n }", "public void run() {\n updateBtn.reset();\n notifyDataSetChanged();\n }", "public void onRefresh() {\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\r\n\t\t\t\t\t\tlist.clear();\r\n\t\t\t\t\t\tnew Getliuyan().start();\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tprotected void onPostExecute(Void result) {\r\n\t\t\t\t\t\thandler.sendEmptyMessage(2);\r\n\t\t\t\t\t};\r\n\r\n\t\t\t\t}.execute();\r\n\t\t\t}", "private void ObserveAnyChange(){\n movieListViewModel.getMovies().observe(getViewLifecycleOwner(), new Observer<List<MovieModel>>() {\n @Override\n public void onChanged(List<MovieModel> movieModels) {\n\n if (movieModels != null){\n for (MovieModel movieModel: movieModels){\n // get data in Log\n Log.v(TAG, \" onChanged: \"+ movieModel.getTitle());\n movieRecyclerAdapter.setmMovieModels(movieModels);\n }\n }\n\n }\n });\n }", "@Override\n public void run() {\n refreshData();\n }", "@Override\n public void notifyDataSetChanged() {\n super.notifyDataSetChanged();\n }", "public void onRefresh() {\n\t\t\t\tnew AsyncTask<Void, Void, Void>() {\r\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\r\n\t\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\tThread.sleep(1000);\r\n\t\t\t\t\t\t\tMusicDBAdapter.RefreshData(MusicListActivity.this);\r\n\t\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t\te.printStackTrace();\r\n\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\treturn null;\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tprotected void onPostExecute(Void result) {\r\n\t\t\t\t\t\tadapter = new MusicBaseAdapter(MusicListActivity.this, MusicDBAdapter.musicList);\r\n\t\t\t\t\t\tlist.setAdapter(adapter);\r\n\t\t\t\t\t\tTVcount.setText(String.valueOf(MusicDBAdapter.musicList.size()));\r\n\t\t\t\t\t\tlist.onRefreshComplete();\r\n\r\n\t\t\t\t\t}\r\n\t\t\t\t}.execute(null, null, null);\r\n\t\t\t}", "@Override\n\tpublic void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\tupdateData1();\n\t}", "@Override\n public void onDataChanged() {\n }", "@Override\n public void onDataChanged() {\n }", "public void refreshList() {\n mCursor.requery();\n mCount = mCursor.getCount() + mExtraOffset;\n notifyDataSetChanged();\n }", "@Override\n public void run() {\n loadItems();\n notifyDataSetChanged();\n }", "@Override\r\n\t\t\tpublic void onRefresh() {\n\t\t\t\tgetLichHoc();\r\n\t\t\t}", "@Override\r\n public void onDataSetChanged() {\n }", "@Override\r\n public void onRefresh() {\n\r\n refreshContent();\r\n\r\n }", "@Override\n\tpublic void onRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\tloadData();\n\t}", "@Override\n\t\t\tpublic void onRefresh(PullToRefreshBase<ListView> refreshView) {\n\t\t\t\tnew ExpertListTask(true,true).execute();\n\t\t\t}", "private void updateUI() {\n mLatestFeedsAdapter.notifyDataSetChanged();\n }", "protected void onDataChanged(V item) {\n\n }", "@Override\n public void onRefresh() {\n if(!swipeRefreshLayout.isRefreshing()){\n swipeRefreshLayout.setRefreshing(true);\n }\n progressBar.setVisibility(View.GONE);\n listView.setVisibility(View.GONE);\n loadNotifications();\n }", "public void dataChanged() {\n\t\tif (wijzigInfo)\n\t\t\twijzigInfo();\n\n\t\tsetChanged();\n\t\tnotifyObservers(\"dataChanged\");\n\t}", "private void notifyUpdated() {\n if (mChanged) {\n mChanged = false;\n mObserver.onChanged(this);\n }\n }", "@Override\n public void onRefresh() {\n viewModel.fetchAllPostsASync();\n }", "private void refreshEvent() {\n DatabaseReference databaseEventsRef = firebaseDatabase.getReference(\"Events\");\n databaseEventsRef.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n EventsItem selected = snapshot.getValue(EventsItem.class);\n if (occaID.equals(selected.getEventID())) {\n titleView.setText(selected.getTitle());\n dateView.setText(DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.UK)\n .format(selected.getDateInfo()));\n updatedDate = selected.getDateInfo();\n timeView.setText(selected.getTimeInfo());\n locationView.setText(selected.getLocationInfo());\n descView.setText(selected.getDescription());\n break;\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "protected void callbackPostReceived(){\n swipeRefreshLayout.setRefreshing(false);\n swipeRefreshLayout.setEnabled(true);\n }", "@Override\n public void onItemsReceived(int type, List<DiscoverItem> items) {\n if (refreshView != null && refreshView.isRefreshing()) {\n refreshView.setRefreshing(false);\n }\n\n if (adapter != null) adapter.update(type, items);\n }", "public void notifyDataSetChanged() {\n generateDataList();\n mSectionedExpandableGridAdapter.notifyDataSetChanged();\n }", "private void timerFired() {\n\t\t\n\t\tArrayList<CedView> tempList = _pendingRefresh;\n\t\t_pendingRefresh = new ArrayList<>();\n\t\t\n\t\tfor (CedView view : tempList) {\n\t\t\tview.refresh();\n\t\t}\n\t\ttempList = null;\n\t}", "protected void fireContentsChanged() {\r\n\t// Guaranteed to return a non-null array\r\n\tObject[] listeners = listenerList.getListenerList();\r\n\tListDataEvent e = null;\r\n\t// Process the listeners last to first, notifying\r\n\t// those that are interested in this event\r\n\tfor (int i = listeners.length-2; i>=0; i-=2) {\r\n\t if (listeners[i]==ListDataListener.class) {\r\n\t\t// Lazily create the event:\r\n\t\tif (e == null) {\r\n\t\t e = new ListDataEvent(this, ListDataEvent.CONTENTS_CHANGED,\r\n\t\t\t\t\t 0, getSize()-1);\r\n\t\t}\r\n\t\t((ListDataListener)listeners[i+1]).contentsChanged(e);\r\n\t }\r\n\t}\r\n }", "@Override\n public void run() {\n if (filteredList.size() == 0) {\n //Utils.toast(\"No data found\");\n }\n notifyDataSetChanged();\n }" ]
[ "0.70607084", "0.6866978", "0.669801", "0.66471225", "0.66446507", "0.66179246", "0.6584048", "0.65189743", "0.6489866", "0.6486859", "0.64751184", "0.6471243", "0.64679724", "0.6460797", "0.6412027", "0.6392324", "0.6391046", "0.63870704", "0.6369746", "0.63673145", "0.6363134", "0.63597876", "0.63597876", "0.6359453", "0.6358307", "0.6353495", "0.634631", "0.63421893", "0.63317585", "0.63305736", "0.63246804", "0.6295273", "0.6291678", "0.62831664", "0.6281758", "0.6268046", "0.62401277", "0.62279016", "0.6220187", "0.6220187", "0.6219496", "0.6217525", "0.62148297", "0.62005556", "0.62003046", "0.6199322", "0.6175682", "0.6174859", "0.616512", "0.61590636", "0.61396444", "0.61379004", "0.61243224", "0.6120489", "0.6099285", "0.609668", "0.60729855", "0.60676765", "0.60660225", "0.60638416", "0.6059879", "0.6049972", "0.6046575", "0.60461277", "0.6043401", "0.6041112", "0.60378826", "0.601886", "0.60130745", "0.6006049", "0.60015184", "0.5998448", "0.59617674", "0.5959979", "0.5953501", "0.59506553", "0.59492934", "0.5949213", "0.5934177", "0.5930559", "0.5930559", "0.5930367", "0.59299326", "0.5922696", "0.59177196", "0.59140193", "0.5912796", "0.5907139", "0.59046465", "0.5900829", "0.58966666", "0.5893266", "0.5892873", "0.5888317", "0.5885237", "0.58846927", "0.5882399", "0.58741266", "0.58683854", "0.5862434", "0.5860213" ]
0.0
-1
Check if photo with photoId is in the downloading progress right now.
public static boolean isDownloadingNow(final String photoId) { return inDownloadingProgress.contains(photoId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasProgress();", "boolean hasProgress();", "public boolean hasProgress();", "public void checkProgress() {\n\t\tupdateBitfield();\n\t\tlog(\"Checking progress...\");\n\t\tFileInfo[] fileinfo = files.getFiles();\n\t\tfor (int i = 0; i < fileinfo.length; i++) {\n\t\t\tFileInfo info = fileinfo[i];\n\t\t\tRandomAccessFile file = info.getFileAcces();\n\t\t\ttry {\n\t\t\t\tif (file.length() > 0L) {\n\t\t\t\t\tint pieceIndex = (int) (info.getFirstByteOffset() / files.getPieceSize());\n\t\t\t\t\tint lastPieceIndex = pieceIndex + info.getPieceCount();\n\t\t\t\t\tfor (; pieceIndex < lastPieceIndex; pieceIndex++) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tif (files.getPiece(pieceIndex).checkHash()) {\n\t\t\t\t\t\t\t\t// log(\"Progress Check: Have \" + pieceIndex);\n\t\t\t\t\t\t\t\tif (torrentStatus == STATE_DOWNLOAD_DATA) {\n\t\t\t\t\t\t\t\t\tbroadcastHave(pieceIndex);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tfiles.havePiece(pieceIndex);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t}\n\t\t}\n\t\tlog(\"Checking progress done\");\n\t}", "private void notifyAfterDownloadingProgress() {\n if (inDownloadingProgress.contains(photoId)) {\n inDownloadingProgress.remove(photoId);\n onFinishDownloadingListener.notifyItemDownloaded(photoId, position);\n }\n else {\n onFinishDownloadingListener.notifyUnexpected();\n }\n }", "private static boolean cancelPotentialDownload(int resourceId, ImageView imageView) {\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n\n if (bitmapDownloaderTask != null) {\n int bitmapId = bitmapDownloaderTask.resourceId;\n if (resourceId != bitmapId) {\n bitmapDownloaderTask.cancel(true);\n } else {\n // The same URL is already being downloaded.\n return false;\n }\n }\n return true;\n }", "public boolean isDownloading()\r\n {\r\n return statusObj.value == STATUS_CANDIDATE_DOWNLOADING;\r\n }", "public synchronized boolean checkFileCompletion()\n/* */ {\n/* 49 */ int totalsize = 0;\n/* */ \n/* 51 */ for (FileSubContent subContent : this.downloadManager.getSUB_CONTENTS())\n/* */ {\n/* 53 */ if ((subContent != null) && (subContent.isIsDownloaded()) && (subContent.getContent().length == this.downloadManager.getSUB_SIZE()))\n/* */ {\n/* 55 */ totalsize++;\n/* */ }\n/* */ }\n/* */ \n/* 59 */ if (totalsize == this.downloadManager.getSUB_CONTENTS().size())\n/* */ {\n/* 61 */ System.out.println(\"FileDownloadChecker: got all of the subParts.\");\n/* 62 */ return true;\n/* */ }\n/* */ \n/* */ \n/* 66 */ return false;\n/* */ }", "@java.lang.Override\n public boolean hasProgress() {\n return progress_ != null;\n }", "public void startInlineDownloading() {\n inDownloadingProgress.add(photoId);\n if (fullPhotosCaching.containsKey(photoId)) {\n final PhotoCache photoCache = fullPhotosCaching.get(photoId);\n saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this);\n }\n else {\n getPhotoCache(photoId, DEFAULT_PATH, context, this);\n }\n }", "public boolean hasProgress() {\n return progressBuilder_ != null || progress_ != null;\n }", "public boolean hasPhoto(Photo obj)\n {\n int s = this.photo.size();\n if(this.photo == null || s == 0)\n {\n return false;\n }\n for(int i=0;i<s;i++)\n {\n if(obj.compareTo(this.photo.get(i))==0)\n {\n return true;\n }\n }\n return false;\n }", "public boolean isPictPTFound(){\n \tif (!isPictFetche) {\t// Si l'image n'a jamais �t� fetch�e, le faire now !\r\n \t\tisPictFound = fetchPict();\r\n \t\tisPictFetche = true;\r\n \t}\r\n \treturn isPictFound;\r\n }", "public boolean inProgress(){return (this.currentTicket != null);}", "public Long getProgressDone();", "private boolean taskForUrlAlreadyRunning(String url) {\n return imageDownloadTaskMap.get(url) != null;\n }", "public FileUpload verifyFileUploadExistenceById(Long id);", "boolean isInDownloadedArea();", "private void checking() {\n checkProgress = new ProgressDialog(DownloadActivity.this);\n checkProgress.setCancelable(false);\n checkProgress.setMessage(getResources().getString(R.string.checking_message));\n checkProgress.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n checkProgress.setIndeterminate(true);\n checkProgress.show();\n new Thread(new Runnable() {\n public void run() {\n while (check == 0) {}\n checkProgress.dismiss();\n }\n }).start();\n }", "private static Boolean isPhotoLiked(String postId, String accessToken) throws URISyntaxException, IOException, JSONException {\n\n\t\tString JsonResponse = null;\n String urlPost = \"https://api.instagram.com/v1/media/\"+postId+ \"?access_token=\" + accessToken;\n\t\tInputStream inputStream = null;\n\t\tHttpURLConnection urlConnection = null;\n\t\tInteger result = 0;\n\t\ttry {\n /* forming th java.net.URL object */\n\n\t\t\tURL url = new URL(urlPost);\n\t\t\turlConnection = (HttpURLConnection) url.openConnection();\n\n /* optional request header */\n\t\t\turlConnection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n /* optional request header */\n\t\t\turlConnection.setRequestProperty(\"Accept\", \"application/json\");\n\n /* for Get request */\n\t\t\turlConnection.setRequestMethod(\"GET\");\n\t\t\tint statusCode = urlConnection.getResponseCode();\n\n\n /* 200 represents HTTP OK */\n\t\t\tif (statusCode == 200) {\n\t\t\t\tinputStream = new BufferedInputStream(urlConnection.getInputStream());\n\t\t\t\tString response = Utils.convertInputStreamToString(inputStream);\n\t\t\t\tJsonResponse = response;\n\t\t\t}else{\n\t\t\t\tJsonResponse = null; //\"Failed to fetch data!\";\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLog.d(\"Error\", e.getLocalizedMessage());\n\t\t}\n JSONObject respObject = new JSONObject(JsonResponse);\n\nJSONObject id = respObject.getJSONObject(\"data\");\n\n boolean userhasliked = id.getBoolean(\"user_has_liked\");\n\n if(userhasliked)\n {\n return true;\n }\n else\n {\n return false;\n }\n\n\n }", "boolean hasImageByHandler();", "private static boolean cancelPotentialDownload(String url, ImageView imageView) {\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n\n if (bitmapDownloaderTask != null) {\n String bitmapUrl = bitmapDownloaderTask.url;\n if ((bitmapUrl == null) || (!bitmapUrl.equals(url))) {\n bitmapDownloaderTask.cancel(true);\n } else {\n // The same URL is already being downloaded.\n return false;\n }\n }\n return true;\n }", "public Boolean getArePhotosDownloadable() {\n return arePhotosDownloadable;\n }", "boolean hasDownloadRequest();", "boolean hasPicture();", "public boolean isInProgress()\r\n\t{\r\n\t\treturn this.inProgress;\r\n\t}", "boolean hasHaveAttachment();", "boolean canTakeNewPhoto();", "public boolean is_completed();", "public DownloadItemStatus doInBackground(Void... voidArr) {\n return com.miui.gallery.sdk.download.ImageDownloader.getInstance().getStatusSync(uri, downloadType);\n }", "public boolean isPhotoPresent(Album album) throws Exception\n {\n return false;\n }", "boolean isPreviewInBackground();", "private void checkPlayProgress() {\n\n if (playState == PLAY_STATE_PLAYING) {\n sendPosition();\n\n Runnable notification = new Runnable() {\n public void run() {\n checkPlayProgress();\n }\n };\n\n // keep updating while playing\n handler.postDelayed(notification, UPDATE_DELAY);\n }\n }", "public boolean loadProgress() {\n return false;\n }", "private void checkCompletedPieces() {\n\t\tif ((mainloop_loop_count %MAINLOOP_ONE_SECOND_INTERVAL) !=0)\n\t\t\treturn;\n\n\t\t//for every piece\n\t\tfor (int i = 0; i <_nbPieces; i++) {\n\t\t\tfinal DiskManagerPiece dmPiece =dm_pieces[i];\n\t\t\t//if piece is completly written, not already checking, and not Done\n\t\t\tif (dmPiece.isNeedsCheck())\n\t\t\t{\n\t\t\t\t//check the piece from the disk\n\t\t\t\tdmPiece.setChecking();\n\n\t\t\t\tDiskManagerCheckRequest req = \n\t\t\t\t\tdisk_mgr.createCheckRequest(\n\t\t\t\t\t\t\ti, new Integer(CHECK_REASON_DOWNLOADED));\n\n\t\t\t\treq.setAdHoc( false );\n\n\t\t\t\tdisk_mgr.enqueueCheckRequest( req, this );\n\t\t\t}\n\t\t}\n\t}", "boolean isDone(long number) throws NoSuchJobException;", "public boolean isUploading(double clock);", "void downloadCompleted(String blobId);", "boolean hasAttachment();", "boolean isCompleted();", "boolean hasCompleteFile();", "public boolean isStillProcessing() {\r\n\tif(logger.isDebugEnabled())\r\n\t\tlogger.debug(\"BytesnotReadChangedCount is: \" + bytesReadNotChangedCount);\r\n\tif (bytesReadNotChangedCount > 3) {\r\n\t //Abort processing\r\n\t return false;\r\n\t} else {\r\n\t return true;\r\n\t}\r\n }", "boolean hasIsComplete();", "boolean hasIsComplete();", "boolean hasPictureUri();", "public boolean isExamPaperDownloaded(String examId) {\r\n\treturn ApplicationData.isFileExists(appData.getExamFileName(examId));\r\n }", "boolean requestProgress(double progress, ObjectIdentifier oid, PropertyIdentifier pid, UnsignedInteger pin,\n Encodable value);", "boolean hasRetrieveFile();", "protected void checkForThumbnail(PM_Picture picture, int ind) {\n\t\tif (picture.hasImageThumbnail() == false) {\n\t\t\tthumbsToRead.add(picture);\n\t\t}\n\t}", "protected boolean messageAlreadyReceived(String id) {\n {\n final Query qry = SessionHandler.getInstance().getSession()\n .createQuery(\"select count(*) from \" + ImportEntry.ENTITY_NAME + \" where id=:id\");\n qry.setParameter(\"id\", id);\n if (((Number) qry.uniqueResult()).intValue() > 0) {\n return true;\n }\n }\n {\n final Query qry = SessionHandler.getInstance().getSession()\n .createQuery(\"select count(*) from \" + ImportEntryArchive.ENTITY_NAME + \" where id=:id\");\n qry.setParameter(\"id\", id);\n if (((Number) qry.uniqueResult()).intValue() > 0) {\n return true;\n }\n }\n return false;\n }", "boolean hasDownloadResponse();", "protected boolean isFinished() {\n return Math.abs(pid.getError()) < 0.25;\n }", "private static boolean _pma_checkUploadedFile(String sessionID, String uploadID, String relativePath) {\n\t\ttry {\n\t\t\tString url = (pmaUrl(sessionID).endsWith(\"/\") ? pmaUrl(sessionID) : pmaUrl(sessionID) + \"/\") + \"transfer/Upload/\" + uploadID + \"?sessionID=\" + sessionID;\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tcon.setRequestProperty(\"Accept\", \"application/json\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tJSONArray jsonArray = jsonResponse.optJSONArray(\"Files\");\n\t\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\n\t\t\t\t\tif (jsonArray.getJSONObject(i).optString(\"Path\").equals(relativePath)) {\n\t\t\t\t\t\treturn jsonArray.getJSONObject(i).optBoolean(\"Complete\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} else {\n\t\t\t\treturn false;\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}", "boolean checkShouldDownloadFile(String target, String name) {\n return Boolean.TRUE.equals(DOWNLOAD_FILES.retrieve(target, name));\n }", "private static boolean assetIsInPersistentCache(MD5Key id) {\n \n \t\treturn getAssetCacheFile(id).exists() && getAssetCacheFile(id).length() > 0;\n \t}", "boolean isAllInDownloadedArea();", "@Override\n protected Boolean doInBackground(Void... params) {\n\n fileSize = entry.bytes;\n\n // Download file\n\n String filePath = context.getFilesDir().getPath() + \"/\" + entry.fileName();\n File file = new File(filePath);\n FileOutputStream outputStream = null;\n\n try {\n outputStream = new FileOutputStream(file);\n dropboxAPI.getFile(entry.path, null, outputStream, new ProgressListener() {\n @Override\n public long progressInterval() {\n // Update the progress bar every half-second or so\n return 500;\n }\n\n @Override\n public void onProgress(long current, long total) {\n publishProgress(current);\n }\n });\n outputStream.close();\n return true;\n\n } catch (DropboxException | IOException e) {\n e.printStackTrace();\n }\n return false;\n }", "public int pictureExists(Picture pic) {\n\t\tfor (int i=0;i<pictures.size();i++) {\n\t\t\tif (this.pictures.get(i).equals(pic)) return i;\n\t\t}\n\t\treturn -1;\n\t}", "protected boolean isFinished()\n {\n return timer.get() > driveDuration;\n }", "private boolean putInExifLoadingQueue(final Photo photo) {\r\n\r\n\t\tfinal PhotoImageMetadata photoImageMetadata = ExifCache.get(photo.imageFilePathName);\r\n\r\n\t\tif (photoImageMetadata != null) {\r\n\r\n\t\t\tphoto.updateImageMetadata(photoImageMetadata);\r\n\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tPhotoLoadManager.putImageInLoadingQueueExif(photo, new LoadCallbackExif(photo, _currentExifRunId));\r\n\r\n\t\treturn false;\r\n\t}", "public boolean isPendingFile(String file_name) {\n\n\t\tif (m_db == null)\n\t\t\treturn false;\n\n\t\tCursor cursor = m_db.query(PENDING_FILE_TABLE_NAME,\n\t\t\t\tnew String[] { PENDING_FIELD_ID }, PENDING_FIELD_PATH + \"=?\",\n\t\t\t\tnew String[] { file_name }, null, null, null);\n\n\t\t//\n\t\t// get first entry of result set\n\t\t//\n\t\tString result = getFirstEntryOfResultSet(cursor);\n\n\t\t//\n\t\t// close cursor\n\t\t//\n\t\tcursor.close();\n\n\t\tif (result == null)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public boolean hasFinished(int neighbour){\n\t//System.out.println(\"ATTENTION\");\n\treturn false;\n }", "public boolean uploadingProgressBarIsShow() {\n return uploadingProgressBar.getVisibility() == VISIBLE;\n }", "@Override\n\t\t\tpublic void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n\t\t\t\tif (progressbar != null)\n\t\t\t\t\tprogressbar.setVisibility(View.GONE);\n\t\t\t}", "public boolean isVideoCoverPresent(){\r\n\t\t return isElementPresent(videoCover(), MEDIUMWAIT);\r\n\t}", "@Override\n protected void onPostExecute(Integer downloadStatue) {\n if(downloadStatue == DOWNLOAD_SUCCESS)\n {\n this.setDownloadCanceled(false);\n this.setDownloadPaused(false);\n downloadListener.onSuccess();\n //scanFile();\n }else if(downloadStatue == DOWNLOAD_FAILED)\n {\n this.setDownloadCanceled(false);\n this.setDownloadPaused(false);\n downloadListener.onFailed();\n }else if(downloadStatue == DOWNLOAD_PAUSED)\n {\n downloadListener.onPaused();\n }else if(downloadStatue == DOWNLOAD_CANCELED)\n {\n downloadListener.onCanceled();\n }\n }", "@Override\n public void BitmapDownloadSuccess(String photoId, String mealId)\n {\n\n refreshUI();\n }", "boolean isComplete();", "boolean isComplete();", "private void takePhotoCompleted() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoCompleted\");\n // need to set jpeg_todo to false before calling onCompleted, as that may reenter CameraController to take another photo (if in auto-repeat burst mode) - see testTakePhotoRepeat()\n synchronized (background_camera_lock) {\n jpeg_todo = false;\n }\n checkImagesCompleted();\n }", "boolean isNetworkCallInProgress() {\n return mRepository.isNetworkCallInProgress();\n }", "boolean isBlipReady(String blipId);", "@Override\n public void onAlreadySaved(@NonNull PhotoCache photoCache) {\n Toast.makeText(context, \"The file already exist in:\\n\" +\n DEFAULT_PATH, Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "private boolean isBusyNow() {\n if (tip.visibleProperty().getValue()){\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"FTP Client\");\n alert.setHeaderText(\"Please wait current download finish!\");\n alert.initOwner(main.getWindow());\n alert.showAndWait();\n return true;\n }\n return false;\n }", "private void checkForOrphanFiles() {\n List<String> dbFileNames = getPhotoFilesInDatabase();\n List<String> dirFileNames = getPhotoFilesInDirectory();\n\n // Find files that are not in the db.\n dirFileNames.removeAll(dbFileNames);\n\n // Create a new photo shoot for the orphaned photos.\n if (dirFileNames.size() > 0) {\n long shootId = createOrphanShoot(dirFileNames);\n\n GhostPhotoPreferences.setHasOrphanPhotoShootBeenCreated(getApplicationContext(), true);\n Log.d(LOG_TAG, \"checkForOrphanFiles: Created orphan photo shoot: \" + shootId);\n }\n }", "public boolean hasImage(){\n return imageResourceID != NO_IMAGE_PROVIED;\n\n }", "private boolean checkIfReadyToRemoveFromTracking(long messageID) {\n MsgData messageTrackingData = getTrackingData(messageID);\n return messageTrackingData.messageStatus.isOKToRemove();\n }", "public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00001000) == 0x00001000);\n }", "boolean isRunning( String profileId );", "protected static boolean m34123lE(long j) {\n AppMethodBeat.m2504i(114772);\n if (sJT == null) {\n AppMethodBeat.m2505o(114772);\n return true;\n }\n C4990ab.m7417i(\"MicroMsg.TrafficClickFlow\", \"isDownloadFileNormal downLoadObjects : %s\", sJT.toString());\n int i = 0;\n while (i < sJT.size()) {\n C22440b c22440b = (C22440b) sJT.get(i);\n if (c22440b.endTime <= j || TrafficClickFlowReceiver.m34124lF(c22440b.startTime)) {\n i++;\n } else {\n AppMethodBeat.m2505o(114772);\n return false;\n }\n }\n if (sJR == null) {\n AppMethodBeat.m2505o(114772);\n return true;\n }\n C4990ab.m7417i(\"MicroMsg.TrafficClickFlow\", \"isDownloadFileNormal currentDownloadMap : %s\", sJR.toString());\n if (sJR.size() > 0) {\n for (Entry value : sJR.entrySet()) {\n if (!TrafficClickFlowReceiver.m34124lF(((C22440b) value.getValue()).startTime)) {\n AppMethodBeat.m2505o(114772);\n return false;\n }\n }\n }\n AppMethodBeat.m2505o(114772);\n return true;\n }", "boolean hasMediaFile();", "boolean hasRetrieveFileResponse();", "boolean checkIfCopyAvailable(int materialId);", "boolean hasAsset();", "private boolean isVideoExists(GetMethod aGetMethod) {\n\t\t/* This already called while this class is instantiated\n\t\tif (mHttpClient == null) {\n\t\t\tmHttpClient = prepareHttpClient();\n\t\t}*/\n try {\n \tint r = mHttpClient.executeMethod(aGetMethod);\n \tSystem.out.println(\"--> \" + r);\n\t\t\tif (HttpURLConnection.HTTP_OK == r) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch (HttpException e) {\n\t\t\t//mm.. silence the exception and just print the stacktrace?\n\t\t\te.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t\tthrow new DownloadInterruptedException(\"Problem while getting the video due to IOException. Message: \" +\n\t\t\t\t\tioe.getMessage(),ioe);\n\t\t} \n\t\treturn false;\n\t}", "public boolean isKeepProgressBar() {\r\n return keepProgressBar;\r\n }", "public boolean isFinishedLoading(){ return FINISHED_LOADING; }", "private static boolean assetHasLocalReference(MD5Key id) {\n \n \t\treturn getLocalReference(id) != null;\n \t}", "public boolean hasImageByHandler() {\n return ((bitField0_ & 0x00004000) == 0x00004000);\n }", "public abstract boolean isLoadCompleted();", "public boolean processVote() {\n\t\tlong start = System.currentTimeMillis();\n\t\tlong end = start;\n\t\tint replyCnt = 0;\n\t\tint voteTotal = users.size();\n\t\tboolean needCommit = true;\n\t\tSystem.out.println(\"process vote for \"+ filename);\n\t\twhile(end - start < 3000 && replyCnt < voteTotal) {\n\t\t\t// System.out.println(\"within loop\");\n\t\t\tif(!voteReply.isEmpty()) {\n\t\t\t\t//if queue is not empty, get reply from queue\n\t\t\t\tMsg ele = voteReply.poll();\n\t\t\t\tif(ele.voteForCollage == true) {\n\t\t\t\t\treplyCnt ++;\n\t\t\t\t\tcontinue;\n\t\t\t\t} else { // if one user disagree, total answer should be false\n\t\t\t\t\tneedCommit = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//if is empty, update end time, continue loop\n\t\t\tend = System.currentTimeMillis();\n\t\t}\n\t\t//check if there exists timeout\n\t\tif( needCommit && replyCnt < voteTotal) needCommit = false;\n\t\tSystem.out.println(\"commit finished, result \"+ needCommit);\n\t\treturn needCommit;\n\t}", "protected static boolean containsFileID(double fileID) {\n\n String sql = \"SELECT fileID FROM files\";\n\n try (Connection conn = DatabaseOperations.connect();\n Statement stmt = conn.createStatement();\n ResultSet rs = stmt.executeQuery(sql)) {\n\n // loop through the result set\n while (rs.next()) {\n if (fileID == rs.getDouble(\"fileID\")) {\n return true;\n }\n }\n } catch (SQLException e) {\n System.out.println(\"fileIDExists: \" + e.getMessage());\n }\n return false;\n\n }", "public Boolean getHasPhoto() {\n\t\treturn hasPhoto;\n\t}", "public boolean hasCompleteFile() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "@Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount());\n if (progress < 20) {\n progress = 20;\n }\n progressBar.setProgress((int) progress);\n\n }", "public boolean hasCompleteFile() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "@Override\n public void onProgress(\n UploadTask.TaskSnapshot taskSnapshot) {\n double progress\n = (100.0\n * taskSnapshot.getBytesTransferred()\n / taskSnapshot.getTotalByteCount());\n progressDialog.setMessage(\n \"Uploaded \"\n + (int) progress + \"%\");\n }", "@Override\n public void onProgress(\n UploadTask.TaskSnapshot taskSnapshot) {\n double progress\n = (100.0\n * taskSnapshot.getBytesTransferred()\n / taskSnapshot.getTotalByteCount());\n progressDialog.setMessage(\n \"Uploaded \"\n + (int) progress + \"%\");\n }", "public boolean isComplete();", "@Override\r\n\tpublic boolean isInProgress() {\n\t\treturn false;\r\n\t}" ]
[ "0.66421133", "0.66421133", "0.65517193", "0.606573", "0.59971523", "0.5944897", "0.58323884", "0.58189946", "0.5770405", "0.5644858", "0.56043875", "0.5591717", "0.5479031", "0.5452001", "0.5413447", "0.5325571", "0.5324729", "0.5319222", "0.5282067", "0.52222157", "0.5220879", "0.52100515", "0.52061385", "0.5196045", "0.518734", "0.51555645", "0.51319706", "0.5106984", "0.5090747", "0.5088563", "0.50884926", "0.50806946", "0.50591606", "0.50501627", "0.5048244", "0.50426984", "0.5041008", "0.5037008", "0.5032035", "0.5020604", "0.5003757", "0.5000008", "0.4985829", "0.4985829", "0.49796337", "0.4968079", "0.49680752", "0.4962616", "0.49591547", "0.4951257", "0.49424338", "0.49197766", "0.49176526", "0.49080572", "0.49070305", "0.49015445", "0.489125", "0.48906752", "0.4889758", "0.4884544", "0.48709628", "0.48672006", "0.48658895", "0.48541683", "0.48480043", "0.48396993", "0.48345774", "0.48259512", "0.48259512", "0.48249614", "0.48184365", "0.4797822", "0.4792429", "0.4778635", "0.47741655", "0.47702312", "0.47635847", "0.4762075", "0.47602603", "0.4754395", "0.47515243", "0.4750124", "0.4746251", "0.4739596", "0.47354007", "0.4734368", "0.4733212", "0.47327006", "0.47236317", "0.4722677", "0.47220904", "0.47204313", "0.47176787", "0.4716521", "0.47111923", "0.47073036", "0.4707103", "0.4707103", "0.4703956", "0.47000292" ]
0.8027126
0
Method that start the downloading process
public void startInlineDownloading() { inDownloadingProgress.add(photoId); if (fullPhotosCaching.containsKey(photoId)) { final PhotoCache photoCache = fullPhotosCaching.get(photoId); saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this); } else { getPhotoCache(photoId, DEFAULT_PATH, context, this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start() {\n\n String pathFile = mainMenu.menuTakePathFile();\n int countThreads = mainMenu.menuCountThreads();\n int downloadSpeed = mainMenu.menuDownloadSpeed();\n String folderForDownload = mainMenu.menuPathDownload();\n\n List<String> urls = null;\n try {\n urls = bootPreparation.parsingFileForUrls(pathFile);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n List<String> fileNames = bootPreparation.parsingListUrlsForNames(urls);\n\n multiThreadedDownloader.startDownloading(countThreads, urls.size(), urls, fileNames, downloadSpeed, folderForDownload);\n\n }", "protected void download() {\r\n\t\tsetState(DOWNLOADING);\r\n\t\t\r\n\t\tThread t = new Thread(this);\r\n\t\tt.start();\r\n\t}", "public void download() {\r\n\t\t\ttThread = new Thread(this);\r\n\t\t\ttThread.start();\r\n\t\t}", "private void startDownload(){\n final DownloadCurrent downloadCurrent = new DownloadCurrent(this);\n downloadCurrent.execute(UpdateTalesData.sData_HTTP);\n sProgDialDownload.setOnCancelListener(new DialogInterface.OnCancelListener() {\n @Override\n public void onCancel(DialogInterface dialog) {\n downloadCurrent.cancel(true);\n }\n });\n\n }", "public void downloadStarted();", "private void startDownloadActivity() {\n checking();\n numDownloading = 0;\n updateMax = 0;\n updateProgress = 0;\n readPref();\n writePref();\n update();\n }", "@Override\r\n protected void onPreExecute() {\r\n super.onPreExecute();\r\n System.out.println(\"Starting download\");\r\n }", "public void download() {\n }", "private void startDownload() {\n Uri uri = Uri.parse( data.getStringExtra(PARAM_URL) );\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request( uri );\n request.setAllowedNetworkTypes( DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI)\n //移动网络情况下是否允许漫游。\n .setAllowedOverRoaming(false)\n .setTitle(\"更新\") // 用于信息查看\n .setDescription(\"下载apk\"); // 用于信息查看\n //利用此属性下载后使用响应程序打开下载文件\n //request.setMimeType(\"application/vnd.android.package-archive\");\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, new Date().getTime()+\".apatch\");\n enqueue = dm.enqueue(request);\n }", "public void run() {\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(\"yyyyMMdd HH:mm:ss\");\n\t\tSystem.out.println(\"ftp download \" + sdf.format(new Date()) );\n\t\t\n\t\ttry {\n\t\t\t// 从FTP中下载对账文件 参数 (ftp对象,本地地址,文件名)\n\t\t\tFtpUtil fu = new FtpUtil() ;\n\t\t\tfu.startDown(f, downloadUrl, f.getPath());//下载ftp文件测试\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\n\t\t}\n\t}", "public void start(){\n log.info(\"PageDownloaderPool started.\");\n downloaders.forEach(PageDownloader::start);\n }", "public void start() {\n\t\tif (path != null) {\n\t\t\tfileNameChain = new ByteArrayOutputStream();\n\t\t\tfileAsynctask doing = new fileAsynctask();\n\t\t\tdoing.execute(getPath());\n\t\t}\n\t}", "@Override\n public void run() {\n downloadFile(Const.MONITOR_SERVER_ADDRESS, downFilePath);\n }", "@Override\n\t\t\t\t\t\tpublic void finish() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载成功\");\n\t\t\t\t\t\t}", "@Override\r\n\tpublic void download() {\n\t\t\r\n\t}", "@Override\n public void run() {\n DownloadListener.getListener().execute();\n }", "private void startMovieDownload() {\n String sortOrder = AppPrefs.getInstance(this).getLastSortOrder();\n if (null == sortOrder) {\n sortOrder = SortBy.getDefaultSortOrder();\n }\n downloadData(sortOrder);\n }", "public void startDownload(String currentLink)\n\t{\n\t\t\n\t\ttry\n\t\t{\n\t\t\t\n\t\t\tURL webPage = new URL(currentLink);\n\t\t\t\t\n\t\t\tint fileSizeB = webPage.openConnection().getContentLength();//for progress bar\n\t\t\tfinal double fileSizeKb = Math.round((double)(100*fileSizeB/1024))/100;//getting file size to display\n\t\t\n\t\t\tfinal String fileType = currentLink.substring(currentLink.lastIndexOf(\".\")+1);//getting file type\n\t\t\tfinal JPanel statusPanel = new JPanel();//the panel to show status\n\t\t\t\t\n\t\t\tSwingUtilities.invokeLater(new Runnable(){//adding new row to table in AWT dispatch thread so thread safe\n\t\t\t\tpublic void run()\n\t\t\t\t{\n\t\t\t\t\tImageIcon queue = new ImageIcon(\"in_queue.png\");\n\t\t\t\t\tJLabel qLabel = new JLabel(queue);//label with image\n\t\t\t\t\tstatusPanel.add(qLabel);//adding starting image to panel\n\t\t\t\t\t\t\t\n\t\t\t\t\ttableModel.addRow(new Object[]{currentLink.substring(currentLink.lastIndexOf(\"/\")+1),\n\t\t\t\t\t\t\tfileType,fileSizeKb,statusPanel});//adding new row\n\t\t\t\t\ttableModel.fireTableDataChanged();//notifying table about changes\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tDownloadImage newFile = new DownloadImage(this.tableModel,statusPanel,currentLink,this.folderPath,fileSizeB);//create task\n\t\t\tthis.threadPool.submit(newFile);//submit to job queue\n\t\t\t\t\n\t\t}\n\t\tcatch(IOException e)//if one file can't be downloaded\n\t\t{\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\t\"Unable to download: \" + currentLink.substring(currentLink.lastIndexOf(\"/\")+1) + \", sorry for any inconvenience\",\n\t\t\t\t\t\"Unable To Download File\",JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n try{\n final DownloadManager downloadManager = DownloadManager.getInstance();\n String downloadUrl = jTextField1.getText();\n String qQString = \"http://dldir1.qq.com/qqfile/qq/QQ2013/QQ2013Beta2.exe\";\n String fileName = jTextField2.getText();\n final DownloadMission downloadMission;\n downloadMission = new DownloadMission(qQString, jFileChooser1.getCurrentDirectory().getName(), \"Sample\");\n downloadManager.addMission(downloadMission);\n \n jButton2 = new JButton();\n jButton2.addActionListener(new ActionListener() {\n\n @Override\n public void actionPerformed(ActionEvent e) {\n downloadManager.start();\n }\n });\n add(jButton2);\n downloadManager.start();\n //initialise the progress bar with a counter\n int counter = 0;\n while(true){\n jProgressBar1.setMinimum(0);\n jProgressBar1.setMaximum(Integer.parseInt(downloadManager.getReadableDownloadSize()));\n \n jTextField3.setText(downloadManager.getReadableTotalSpeed());\n jTextField4.setText(downloadManager.getReadableDownloadSize());\n counter++;\n }\n \n \n } catch (IOException ex) {\n Logger.getLogger(DownloadInterface.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n int result;\n \n jFileChooser1 = new JFileChooser();\n jFileChooser1.setCurrentDirectory(new java.io.File(\" \"));\n jFileChooser1.setDialogTitle(chooserTitle);\n jFileChooser1.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n \n //disable all files option\n jFileChooser1.setAcceptAllFileFilterUsed(false);\n if (jFileChooser1.showOpenDialog(this) == JFileChooser.APPROVE_OPTION) { \n System.out.println(\"getCurrentDirectory(): \" \n + jFileChooser1.getCurrentDirectory());\n System.out.println(\"getSelectedFile() : \" \n + jFileChooser1.getSelectedFile());\n }\n else {\n System.out.println(\"No Selection \");\n }\n }", "private void onDownloadComplete(String file_name, String downloadPath) {\n\n file_name_nv=file_name;\n getstartshow(file_name_nv);\n }", "public void startDownload(String url){\n\n\t\tDownloadThread thread = new DownloadThread(url, downloadFolder());\n\t\tSystem.setProperty(\"java.net.preferIPv4Stack\" , \"true\");\n\t\tProxy proxy = new Proxy();\n\t\tproxy.setHttpProxy(\"172.16.0.2\", \"8080\");\n\t\tproxy.setHttpsProxy(\"172.16.0.2\", \"8080\");\n//\t\tthread.start();\n\t\tthread.start();\n\t\t\n\t\t\n\t}", "@Override \r\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, \r\n\t long contentLength) {\n \tString filename = SDHelper.getAppDataPath() + File.separator \r\n\t\t\t\t\t+ getFilename(url);\r\n \tFile file =new File(filename);\r\n \tif (file.exists()) {\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tString ext = getExt(file);\r\n\t\t\t\tString mark = null;\r\n\t\t\t if (ext.equalsIgnoreCase(\"doc\")||ext.equalsIgnoreCase(\"docx\"))\r\n\t\t\t\t\tmark = \"application/msword\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"xls\")||ext.equalsIgnoreCase(\"xlsx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-excel\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"ppt\")||ext.equalsIgnoreCase(\"pptx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-powerpoint\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"pdf\"))\r\n\t\t\t\t\tmark = \"application/pdf\";\r\n\t\t\t\t\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"apk\"))\r\n\t\t\t\t\tmark = \t\"application/vnd.android.package-archive\"; \r\n\t\t\t\tintent.setDataAndType(Uri.fromFile(file), mark);\r\n\t\t\t\tmContext.startActivity(intent);\r\n\r\n \t}\r\n \telse \r\n \t new getFileAsync().execute(url);\r\n \t\r\n \t}", "@Override\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype,\n long contentLength) {\n }", "private void startAllDownloads() {\n\t\tif (!downloading && jobs != null && jobs.size() > 0) {\n\t\t\tfor (DownloadJob nextJob : jobs) {\n\t\t\t\tAppLogger.log(TAG, \"job \" + nextJob.getJobId() + \" working=\" + nextJob.isWorking());\n\t\t\t\tif (!nextJob.isWorking()) {\n\t\t\t\t\tstartDownloadJob(nextJob);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// for (DownloadJob job : jobs) {\n\t\t\t// AppLogger.log(TAG, \"job \" + job.generateJobId() + \" working=\" +\n\t\t\t// job.isWorking());\n\t\t\t// if (!job.isWorking()) {\n\t\t\t// startDownloadJob(job);\n\t\t\t// }\n\t\t\t// }\n\t\t}\n\t}", "@Override\n protected void startDownload(ArrayList<Uri> urls) {\n // Start the Gallery Activity with the Uri(s) passed in.\n // TODO - you fill in here.\n startActivity(GalleryActivity.makeStartIntent(this, urls));\n\t\t\n }", "@Override\n\t\t\tpublic void onStart() {\n\t\t\t\tsuper.onStart();\n\t\t\t\tToast.makeText(context, \"开始下载。。。\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tdownProgressVersion();\n\t\t\t}", "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 }", "private void downloadInBackground(){\n\t\tdownloadResourceInBackground(imageUrl1, R.id.dl_image_1, R.id.dl_progressbar_1);\n\t\tdownloadResourceInBackground(imageUrl2, R.id.dl_image_2, R.id.dl_progressbar_2);\n\t\tdownloadResourceInBackground(imageUrl3, R.id.dl_image_3, R.id.dl_progressbar_3);\n\t\tdownloadResourceInBackground(imageUrl4, R.id.dl_image_4, R.id.dl_progressbar_4);\n\t\tdownloadResourceInBackground(imageUrl5, R.id.dl_image_5, R.id.dl_progressbar_5);\n\t}", "void downloadingFile(String path);", "@Override\n public void run() {\n downloadInfo.state = STATE_DOWNLOADING;\n notifyStateChange(downloadInfo);\n\n //6.specific download, two kinds of education\n // re-download and resume downloads\n Request request;\n File file = new File(downloadInfo.path);\n if (!file.exists() || file.length() != downloadInfo.currentLength) {\n //file is not exists, or file size in downloadInfo saved inconsistent\n //the file is invalid\n file.delete();\n downloadInfo.currentLength = 0;\n\n //need to re-download\n String url = String.format(Url.APP_DOWNLOAD, downloadInfo.downloadUrl);\n request = new Request.Builder().url(url).build();\n } else {\n //need to resume download\n String url = String.format(Url.APP_BREAK_DOWNLOAD, downloadInfo.downloadUrl, downloadInfo.currentLength);\n request = new Request.Builder().url(url).build();\n }\n\n Response response = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n response = okHttpClient.newCall(request).execute();\n is = response.body().byteStream();\n\n if (response != null && is != null) {\n fos = new FileOutputStream(file, true);\n\n byte[] buffer = new byte[1024 * 8];\n int len = -1;\n while ((len = is.read(buffer)) != -1 && downloadInfo.state == STATE_DOWNLOADING) {\n fos.write(buffer, 0, len);\n fos.flush();\n\n downloadInfo.currentLength = downloadInfo.currentLength + len;\n notifyProgressChange(downloadInfo);\n }\n } else {\n //the server return an error\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //handle the case did not come here,there are has three situation\n //1.download finish 2.download error 3.download pause\n if (file.length() == downloadInfo.currentLength && downloadInfo.state == STATE_DOWNLOADING) {\n //说明下载完成\n downloadInfo.state = STATE_FINISH;\n notifyStateChange(downloadInfo);\n } else if (downloadInfo.state == STATE_PAUSE) {\n notifyStateChange(downloadInfo);\n } else {\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n //requires runnable is removed from the current from downloadTaskMap at the end of the task\n downloadTaskMap.remove(downloadInfo.id);\n }", "@Override\n public void onCreate() {\n super.onCreate();\n\n retriveFilePath();\n\n new Thread(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n downloadFile(Const.MONITOR_SERVER_ADDRESS, downFilePath);\n }\n }).start();\n }", "@Override\n protected Void call() {\n if(download_queue.isEmpty()) return null;\n \n //Proceed to create a file with a list of addresses\n Writer writer = null;\n String file_dir = Configuration.root_dir + \"Download_list.txt\";\n try{\n writer = new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\n file_dir), \"utf-8\"));\n String server_root = Configuration.getInstance().getSina_server_root();\n //Traverse through the download list and write each download address to file\n String content = \"\";\n for(int i = 0; i < download_queue.size(); i++){\n SoundTrack track = download_queue.get(i);\n String address = server_root + track.getLocalFileName();\n content += address;\n if(i < (download_queue.size() - 1)){\n content += \"\\n\";\n }\n }\n //Write to file\n writer.write(content);\n \n } catch (UnsupportedEncodingException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (FileNotFoundException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } finally{\n try {\n if(writer != null)\n writer.close();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n \n //Run wget command to download the listed files\n String command = \"wget\";\n command += \" -P \" + Configuration.root_dir + \"SoundTracks/\";\n command += \" -i list\";\n try {\n Process p = Runtime.getRuntime().exec(command);\n p.waitFor();\n } catch (IOException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n } catch (InterruptedException ex) {\n Logger.getLogger(IOHandler.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n return null;\n }", "private void download()\n {\n if(mDownloadConnection!=null && mDownloadConnection.mBinder!=null)\n {\n if (mDownloadConnection.mBinder.download(\"file1\"))\n {\n mTvFilename.setText(\"file1\");\n }\n }\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 }", "@Override\n\t\tpublic void run() {\n\t\t\tbm = getBitmap(url);\n\t\t\tdownLoaderListenner.onDownLoadSuccess(bm,url);\n\t\t}", "@Override\r\n protected void onPostExecute(String file_url) {\r\n System.out.println(\"Downloaded\");\r\n }", "public void startDownloadInParallel(String url, String outputPath,\n DownloadListener listener) {\n if (null != mContext && URLUtil.isHttpUrl(url)\n && !TextUtils.isEmpty(outputPath) && null != listener) {\n Intent intent = new Intent(mContext, DownloadService.class);\n intent.setData(Uri.parse(url));\n\n intent.putExtra(IPCConstants.EXTRA_OUTPUT_PATH, outputPath);\n intent.putExtra(IPCConstants.EXTRA_RECEIVER,\n new DownloadReceiver(mLoopHandler, listener));\n mContext.startService(intent);\n }\n }", "public static void main(String[] args) throws IOException {\n\n downloadFileRequest();\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\tDownloadDialog dialog = new DownloadDialog(Database.currentActivity, text, list);\r\n\t\t\t\tdialog.show();\r\n\t\t\t}", "public void onDownloadStart(String url, String userAgent,\n String contentDisposition, String mimeType,\n long contentLength) {\n\n DownloadManager.Request request = new DownloadManager.Request(\n Uri.parse(url));\n request.setMimeType(mimeType);\n String cookies = CookieManager.getInstance().getCookie(url);\n request.addRequestHeader(\"cookie\", cookies);\n request.addRequestHeader(\"User-Agent\", userAgent);\n request.setDescription(\"Downloading File...\");\n request.setTitle(URLUtil.guessFileName(url, contentDisposition, mimeType));\n request.allowScanningByMediaScanner();\n request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n request.setDestinationInExternalPublicDir(\n \"/MyUniversity\", URLUtil.guessFileName(\n url, contentDisposition, mimeType));\n DownloadManager dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n dm.enqueue(request);\n Toast.makeText(getApplicationContext(), \"Downloading File\", Toast.LENGTH_LONG).show();\n\n\n }", "@Override\n\t\t\t\t\tpublic void run() {\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tList<String> headers = readRequest(client);\n\t\t\t\t\t\t\tif (headers != null && headers.size() >= 1) {\n\t\t\t\t\t\t\t\tString requestURL = getRequestURL(headers.get(0));\n\t\t\t\t\t\t\t\tLog.d(TAG, requestURL);\n\n\t\t\t\t\t\t\t\tif (requestURL.startsWith(\"http://\")) {\n\n\t\t\t\t\t\t\t\t\t// HttpRequest request = new\n\t\t\t\t\t\t\t\t\t// BasicHttpRequest(\"GET\", requestURL);\n\n\t\t\t\t\t\t\t\t\tprocessHttpRequest(requestURL, client, headers);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tprocessFileRequest(requestURL, client, headers);\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} catch (IllegalStateException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} catch (IOException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t}", "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 }", "@Override\n public void onDownloadStart(String url, String userAgent,\n String contentDisposition, String mimetype,\n long contentLength) {\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\n }", "public static void startDownload(String id, Context context) {\n DownloadManager.Request request = getDownloadRequest(id, context);\n DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);\n long downloadId = manager.enqueue(request);\n PrefUtils.setDownloadId(id, downloadId, context);\n }", "@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tmpProgress = ProgressDialog.show(mContext,\n\t\t\t\t\t\t\t\"Downloading data\",\n\t\t\t\t\t\t\t\"Please wait for a moment...\");\n\t\t\t\t}", "@Override\r\n\tpublic void downloadHomework() {\n\t\t\r\n\t}", "private synchronized void executeDownload(DownloadRequest request, String downloadUrl) {\n HttpURLConnection conn = null;\n URL url;\n InputStream inputStream = null;\n RandomAccessFile randomAccessFile;\n\n try {\n url = new URL(downloadUrl);\n long localFileLength = FileUtils.getLocalFileSize(getFullFileName());\n long remoteFileLength = fileTotalSize;\n\n // 远程文件不存在\n if (remoteFileLength == -1l) {\n // Log.log(\"下载文件不存在...\");\n updateDownloadFailed(request, DownloadManager.ERROR_UNHANDLED_HTTP_CODE, \"Remote file not found\");\n return;\n }\n\n request.setFileFullName(getFullFileName());\n randomAccessFile = new RandomAccessFile(getFullFileName(), \"rwd\");\n\n\n conn = (HttpURLConnection) url.openConnection();\n conn.setInstanceFollowRedirects(false);\n conn.setConnectTimeout(request.getRetryPolicy().getCurrentTimeout());\n conn.setReadTimeout(request.getRetryPolicy().getCurrentTimeout());\n conn.setRequestMethod(\"GET\");\n\n // 本地文件存在\n randomAccessFile.seek(localFileLength);\n conn.setRequestProperty(\"Range\", \"bytes=\"\n + localFileLength + \"-\" + remoteFileLength);\n\n inputStream = conn.getInputStream();\n\n\n HashMap<String, String> customHeaders = request.getCustomHeaders();\n if (customHeaders != null) {\n for (String headerName : customHeaders.keySet()) {\n conn.addRequestProperty(headerName, customHeaders.get(headerName));\n }\n }\n\n // Status Connecting is set here before\n // urlConnection is trying to connect to destination.\n updateDownloadState(request, DownloadManager.STATUS_CONNECTING);\n\n final int responseCode = conn.getResponseCode();\n\n DownLoadLog.v(\"Response code obtained for downloaded Id \"\n + request.getDownloadId()\n + \" : httpResponse Code \"\n + responseCode);\n\n switch (responseCode) {\n case HTTP_PARTIAL:\n case HTTP_OK:\n shouldAllowRedirects = false;\n if (fileTotalSize > 1) {\n transferData(request, inputStream, randomAccessFile);\n } else {\n updateDownloadFailed(request, DownloadManager.ERROR_DOWNLOAD_SIZE_UNKNOWN, \"Transfer-Encoding not found as well as can't know size of download, giving up\");\n }\n break;\n case HTTP_MOVED_PERM:\n case HTTP_MOVED_TEMP:\n case HTTP_SEE_OTHER:\n case HTTP_TEMP_REDIRECT:\n // Take redirect url and call executeDownload recursively until\n // MAX_REDIRECT is reached.\n while (mRedirectionCount < MAX_REDIRECTS && shouldAllowRedirects) {\n mRedirectionCount++;\n DownLoadLog.v(TAG, \"Redirect for downloaded Id \" + request.getDownloadId());\n final String location = conn.getHeaderField(\"Location\");\n executeDownload(request, location);\n }\n\n if (mRedirectionCount > MAX_REDIRECTS && shouldAllowRedirects) {\n updateDownloadFailed(request, DownloadManager.ERROR_TOO_MANY_REDIRECTS, \"Too many redirects, giving up\");\n return;\n }\n break;\n case HTTP_REQUESTED_RANGE_NOT_SATISFIABLE:\n updateDownloadFailed(request, HTTP_REQUESTED_RANGE_NOT_SATISFIABLE, conn.getResponseMessage());\n break;\n case HTTP_UNAVAILABLE:\n updateDownloadFailed(request, HTTP_UNAVAILABLE, conn.getResponseMessage());\n break;\n case HTTP_INTERNAL_ERROR:\n updateDownloadFailed(request, HTTP_INTERNAL_ERROR, conn.getResponseMessage());\n break;\n default:\n updateDownloadFailed(request, DownloadManager.ERROR_UNHANDLED_HTTP_CODE, \"Unhandled HTTP response:\" + responseCode + \" message:\" + conn.getResponseMessage());\n break;\n }\n } catch (SocketTimeoutException e) {\n e.printStackTrace();\n // Retry.\n attemptRetryOnTimeOutException(request);\n } catch (ConnectTimeoutException e) {\n e.printStackTrace();\n attemptRetryOnTimeOutException(request);\n } catch (IOException e) {\n e.printStackTrace();\n updateDownloadFailed(request, DownloadManager.ERROR_HTTP_DATA_ERROR, \"IOException \" + e.getMessage());\n } finally {\n if (conn != null) {\n conn.disconnect();\n }\n }\n }", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "@Override\n protected Integer doInBackground(String... params) {\n\n // Set current thread priority lower than main thread priority, so main thread Pause, Continue and Cancel action will not be blocked.\n Thread.currentThread().setPriority(Thread.NORM_PRIORITY - 2);\n\n String downloadFileUrl = \"\";\n if(params!=null && params.length > 0)\n {\n downloadFileUrl = params[0];\n }\n\n currDownloadUrl = downloadFileUrl;\n File downloadLocalFile = createDownloadLocalFile(downloadFileUrl);\n\n int ret = DownloadUtil.downloadFileFromUrl(downloadFileUrl, downloadLocalFile);\n\n return ret;\n }", "public void start() {\n retainQueue();\n mRequestHandle = mRequestQueue.queueRequest(mUrl, \"GET\", null, this, null, 0);\n }", "private void startDownloadJob(final DownloadJob job) {\n\n\t\tfinal int notificationId = ++NOTIFICATION_ID;\n\n\t\tfinal NotificationManager mNotifyManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\t\tfinal NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this);\n\t\t// mBuilder.setContentTitle(\"Message Download\")\n\t\tString notificationTitle = job.getFolderName();\n\t\tFBFriend loggedUser = DataStorage.getLoggedUser();\n\t\tif (loggedUser != null) {\n\t\t\tnotificationTitle = job.getThread().getFriendsNames(loggedUser);\n\t\t}\n\t\tmBuilder.setContentTitle(notificationTitle).setContentText(\"Download in progress\")\n\t\t\t\t.setSmallIcon(R.drawable.ic_launcher).setAutoCancel(true);\n\n\t\tIntent resultIntent = new Intent(this, StatusActivity.class);\n\t\tresultIntent.putExtra(StatusActivity.INTENT_EXTRA_STATUS, 1);\n\t\tresultIntent.putExtra(StatusActivity.INTENT_EXTRA_JOB, job);\n\t\tresultIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP\n\t\t\t\t| Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\t\t// resultIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP |\n\t\t// Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\n\t\t// generate unique request id\n\t\tint n = new Random().nextInt(50) + 1;\n\t\tint requestID = n * notificationId;\n\n\t\tPendingIntent resultPendingIntent = PendingIntent.getActivity(this, requestID, resultIntent,\n\t\t\t\tPendingIntent.FLAG_UPDATE_CURRENT);\n\t\t// PendingIntent.FLAG_ONE_SHOT);\n\t\tmBuilder.setContentIntent(resultPendingIntent);\n\n\t\tThread thread = new Thread() {\n\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\tsuper.run();\n\t\t\t\tdownloading = true;\n\t\t\t\tString threadId = job.getThread().getThreadId();\n\n\t\t\t\tFBMessageTable dbTable = new FBMessageTable(getApplicationContext(), threadId);\n\t\t\t\tdbTable.createTableIfNotExist();\n\n\t\t\t\t// indexes starts from 0\n\t\t\t\t// start from begining or from the last index\n\t\t\t\t// long start = Math.max(job.getMinIndex() - 1,\n\t\t\t\t// job.getDownloadIndex());\n\t\t\t\tlong start = job.getMinIndex() - 1;\n\t\t\t\tlong end = job.getMaxIndex() - 1;\n\n\t\t\t\tlong current = start;\n\n\t\t\t\tAppLogger.log(TAG, \"Job started thread_id=\" + threadId + \" from \" + start + \" to \" + end);\n\n\t\t\t\tDate startDate = new Date();\n\n\t\t\t\tboolean working = true;\n\t\t\t\tjob.setWorking(true);\n\t\t\t\tsaveJobList();\n\t\t\t\twhile (working) {\n\n\t\t\t\t\tlong lowerLimit = current;\n\t\t\t\t\t// long upperLimit = Math.min(end, current +\n\t\t\t\t\t// FB_MAX_MESSAGE_LIMIT);\n\t\t\t\t\tlong upperLimit = Math.min(end, current + FB_MAX_MESSAGE_LIMIT);\n\n\t\t\t\t\t// check if already found in the database\n\t\t\t\t\tCursor cursor = dbTable.getExportMessages(threadId, lowerLimit, upperLimit);\n\n\t\t\t\t\tboolean contains = containsAll(lowerLimit, upperLimit, cursor);\n\t\t\t\t\tdbTable.closeReadableDatabase();\n\t\t\t\t\tif (contains) {\n\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\tsb.append(\"found in database from \");\n\t\t\t\t\t\tsb.append(lowerLimit);\n\t\t\t\t\t\tsb.append(\" to \");\n\t\t\t\t\t\tsb.append(upperLimit);\n\t\t\t\t\t\tAppLogger.log(TAG, sb.toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// List<FBMessage> messages =\n\t\t\t\t\t\t// DataLoader.loadMessages(threadId, lowerLimit,\n\t\t\t\t\t\t// upperLimit);\n\t\t\t\t\t\tList<FBMessage> messages = DataLoader.loadMessages(threadId, lowerLimit, FB_MAX_MESSAGE_LIMIT);\n\n\t\t\t\t\t\tif (messages == null) {\n\t\t\t\t\t\t\t// error occured\n\n\t\t\t\t\t\t\t// 104 = OAuthException.\n\t\t\t\t\t\t\tif (DataLoader.getErrorCode() == 104) {\n\t\t\t\t\t\t\t\t// try to create session from cache\n\t\t\t\t\t\t\t\tvalidateFBLogin();\n\t\t\t\t\t\t\t\t// try missed one again\n\t\t\t\t\t\t\t\tupperLimit = lowerLimit;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// TODO testing use. should remove after testing\n\t\t\t\t\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\t\t\t\t\tsb.append(\"Messages from \");\n\t\t\t\t\t\t\tsb.append(lowerLimit);\n\t\t\t\t\t\t\tsb.append(\" to \");\n\t\t\t\t\t\t\tsb.append(upperLimit);\n\t\t\t\t\t\t\tsb.append(\" size=\");\n\t\t\t\t\t\t\tsb.append(messages.size());\n\n\t\t\t\t\t\t\tAppLogger.log(TAG, sb.toString());\n\n\t\t\t\t\t\t\t// save to database\n\t\t\t\t\t\t\tdbTable.addAll(messages, lowerLimit);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tjob.setDownloadIndex(current);\n\t\t\t\t\t// saveJobList();\n\n\t\t\t\t\t// prepare for next iteration\n\t\t\t\t\tcurrent = upperLimit;\n\n\t\t\t\t\tif (current >= end) {\n\t\t\t\t\t\tworking = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (job.isStop()) {\n\t\t\t\t\t\tworking = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tint progress = 0;\n\t\t\t\t\tif (end == start) {\n\t\t\t\t\t\tprogress = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tprogress = (int) ((current - start) * 100 / (end - start));\n\t\t\t\t\t}\n\t\t\t\t\tmBuilder.setProgress(100, progress, false);\n\t\t\t\t\tmNotifyManager.notify(notificationId, mBuilder.build());\n\t\t\t\t\tpublishStatus(job, progress);\n\t\t\t\t}\n\n\t\t\t\tAppLogger.log(TAG, \"Job ended thread_id=\" + threadId + \" from \" + start + \" to \" + end + \" in \"\n\t\t\t\t\t\t+ (new Date().getTime() - startDate.getTime()) / 1000 + \"seconds\");\n\n\t\t\t\t// write csv file\n\t\t\t\tmBuilder.setContentText(\"Download complete. Generating file\").setProgress(0, 0, false);\n\t\t\t\tCursor cursor = dbTable.getExportMessages(threadId, start, end);\n\n\t\t\t\tif (cursor != null) {\n\t\t\t\t\tgenerateOutFile(job, cursor);\n\t\t\t\t}\n\n\t\t\t\tdbTable.closeReadableDatabase();\n\n\t\t\t\t// //////////////\n\t\t\t\tif (job.isStop()) {\n\t\t\t\t\tmBuilder.setContentText(\"Download stopped\").setProgress(0, 0, false);\n\t\t\t\t} else {\n\t\t\t\t\tmBuilder.setContentText(\"Finished\").setProgress(0, 0, false);\n\t\t\t\t}\n\t\t\t\tmNotifyManager.notify(notificationId, mBuilder.build());\n\n\t\t\t\t// //////////////\n\t\t\t\tjob.setStop(true);\n\t\t\t\tboolean removed = removeJob(job);\n\t\t\t\tif (removed) {\n\t\t\t\t\tsaveJobList();\n\t\t\t\t}\n\t\t\t\tdownloading = false;\n\t\t\t\tif (jobs != null) {\n\t\t\t\t\tif (jobs.size() == 0) {\n\t\t\t\t\t\tstopSelf();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tstartAllDownloads();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t};\n\n\t\tif (threads == null) {\n\t\t\tthreads = new ArrayList<Thread>();\n\t\t}\n\t\tthreads.add(thread);\n\t\tthread.start();\n\n\t}", "private void btnDownloadActionPerformed(java.awt.event.ActionEvent evt) {\n path = JOptionPane.showInputDialog(\"Digite o local de destino do arquivo:\");\n System.out.println(\"Path\" + path);\n if (rbBpa.isSelected()) {\n site = \"ftp://arpoador.datasus.gov.br/siasus/BPA/\";\n } else {\n site = \"ftp://arpoador.datasus.gov.br/siasus/sia/\";\n }\n resposta = Download.terminou;\n System.out.println(\"Resposta \" + resposta);\n\n new Thread() {\n public void run() {\n progress.setValue(0);\n progress.setStringPainted(true);\n// Download.downloadArquivo(site, path);\n for (int i = 0; i < 101; i++) {\n progress.setValue(i);\n progress.setString(i + \"%\");\n try {\n Thread.sleep(100);\n } catch (InterruptedException err) {\n\n }\n if (i == 5) {\n lbMsg.setText(\"Baixando arquivo.\");\n }\n if (i > 5) {\n while (resposta != true) {\n Download.downloadArquivo(site, path);\n lbMsg.setText(\"Baixando arquivo....\");\n resposta = Download.terminou;\n }\n }\n if (i == 100) {\n lbMsg.setText(\"Arquivo baixado\");\n }\n }\n }\n }.start();\n\n }", "public void download() {\n // Attempt to perform the download\n Log.d(TAG, \"download\");\n try {\n // Open a connection to the PHP server.\n // Get the response code\n // Open an input stream as well as a buffered input reader\n try {\n // if (responseCode == HttpURLConnection.HTTP_OK) {\n // Attempt to parse the data from the server\n\n /* Add the crumb objects, but only add the coordinates, the rating,\n * the name, and the number of visits to the local database structure.\n */\n\n // Perhaps add a post method to add the crumbs to the hashmap\n\n // Post: Notify the UI thread that the markers are ready to be loaded.\n\n } catch (Exception e) {\n\n } finally {\n // Close the input streams\n }\n } catch(Exception e) {\n\n }\n }", "public static void main(String args[]) {\n (Installer.instance = new Installer(true)).loadWindow();\n\n //TODO: Save autohide status on file before implementing\n Installer.instance.autoHide.setState(false);\n Installer.instance.autoHide.setVisible(false);\n\n String gameDir = FileUtils.getWorkingDirectory().getAbsolutePath();\n\n /* Forces the forge installer download, enables the progress bar */\n Rectangle oldBounds = Installer.instance.frame.getBounds();\n Installer.instance.frame.setBounds(oldBounds.x, oldBounds.y, oldBounds.width, oldBounds.height + 50);\n\n download(new File(gameDir), manifest_url, true, \"forge\");\n\n /* Removes the progress bar & download status after finishing download */\n Installer.instance.frame.setBounds(oldBounds);\n Installer.instance.downloadStatus.setVisible(false);\n\n log(\"Download completed\");\n }", "protected void waitDownloads() throws Exception {\n runtimeWrapper.newCommand();\n }", "public void onDownloadStart(String url, String userAgent,\n String contentDisposition, String mimetype,\n long contentLength) {\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));\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}", "@Override public byte Async_init() {\n\t\tString src = \"http://ftp.sunet.se/pub/multimedia/graphics/ImageMagick/binaries/ImageMagick-6.8.8-1-Q16-x86-windows.zip\";\r\n\t\tthis.Init(\"downloading\", src, trg);\r\n\t\treturn super.Async_init();\r\n\t}", "public void run() {\n\t\tHtmlPage page = null;\n\t\tHtmlSelect select = null;\n\t\tHtmlOption option = null;\n\t\tDataStreamWriter connection = null;\n\t\tWebClient client = new WebClient(BrowserVersion.FIREFOX_3);\n\t\t/* eseguo i job assegnati al thread in esecuzione */\n\t\tfor(int j = 0; j < this.jobs.length; j++) {\n\t\t\tint currentJob = this.jobs[j];\n\t\t\ttry {\n\t\t\t\t/* faccio dei tentativi per collegarmi alle pagine */\n\t\t\t\tpage = getPage(client, this.getDataSourceURL());\n\t\t\t\t/* seleziono l'opzione relativa alla regione assegnata al task */\n\t\t\t\tselect = (HtmlSelect) page.getByXPath(\"//select\").get(0);\n\t\t\t\toption = select.getOption(currentJob);\n\t\t\t\toption.setSelected(true);\n\t\t\t\tString regione = option.asText();\n\t\t\t\t/* seleziono l'opzione ed ottengo la pagina aggiornata */\n\t\t\t\tpage = (HtmlPage) select.fireEvent(Event.TYPE_CHANGE).getNewPage();\n\t\t\t\t\n\t\t\t\t/* estraggo i dati e li salvo nello \"storage\" */\n\t\t\t\tconnection = this.storageFacade.getDataStreamWriter();\n\t\t\t\tconnection.openStreamWriter();\n\t\t\t\tthis.extractData(client, connection, page, regione);\n\t\t\t}\n\t\t\tcatch (HTMLCrawlerException e) {\n\t\t\t\tSystem.err.println(\"@ HTMLCrawlerException : Extracting Data Error\");\n\t\t\t\tSystem.err.println(e.getMessage());\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\t//client.closeAllWindows();\n\t\t\t\tif (connection != null)\n\t\t\t\t\tconnection.closeStreamWriter();\n\t\t\t}\n\t\t}\n\t\tclient.closeAllWindows();\n\t}", "@Override\n public void initiateDownloadService() {\n mServiceBinder = ClientToServiceBinder.getInstance(this);\n mServiceBinder.doBindService();\n\n // initiate repeating download service\n DownloadAlarmManager.setAlarm(mContext);\n }", "void download(SearchResult result, String downloadPath);", "@Override\n protected String doInBackground(String... url) {\n\n // Increment progress up to half of total background processing\n while(progress_status < 50){\n\n progress_status += 2;\n\n // send progress to UI thread\n publishProgress(progress_status);\n\n // sleep to show progress bar\n SystemClock.sleep(SLEEP_DURATION);\n }\n\n String s = null;\n try {\n\n // Download directions with url\n s = downloadUrl(url[0]);\n }\n catch (IOException e) {\n Log.d(\"Background Task\",e.toString());\n }\n\n // Return a string with xml data\n return s;\n }", "private ImageDownloader(){ \t\n \n }", "public void run() {\n\t\t\t\tMessage msg = new Message();\n\t\t\t\tmsg.what = Msg_SetProgress;\n\t\t\t\tmHandler.sendMessage(msg);\n\t\t\t}", "void mo54428b(DownloadTask downloadTask);", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tToast.makeText(context, \"下载成功\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "public void init() {\n // TODO start asynchronous download of heavy resources\n }", "public void run() {\n try {\n //first send the file name to the receiver\n out.flush();\n out.writeUTF(fileName);\n out.flush();\n //sends the destination folder name\n out.writeUTF(destFolder);\n out.flush(); //flushes the buffer\n //array of bytes that holds the file bytes\n byte[] file = readFile(srcFilePath +\"/\"+fileName);\n System.out.println(\"Sending file: \"+fileName+\" to folder: \"+destFolder);\n //sends the file\n out.write(file,0,file.length);\n out.flush();\n if(notifDownloader) {\n NodeInterface nodeStub = (NodeInterface) Naming.lookup(\"/\"+clientSocket.getInetAddress().toString()+\"/Node\");\n nodeStub.fileDownloaded(fileName);\n }\n } catch (IOException e) {\n System.out.println(\"readline: \" + e.getMessage());\n } catch (NotBoundException e) {\n //e.printStackTrace();\n System.err.println(\"There was an error notifying the downloader \"+e.getMessage());\n } finally{\n try{\n //closes the socket\n clientSocket.close();\n }catch(IOException e){\n System.out.println(\"problem closing the socket: \"+e.getMessage());\n }\n }\n }", "@Override\r\n public void onDownloading(String url, int progress) {\n DownloadInfo info = new DownloadInfo(url, callback).setProgress(progress);\r\n handleMessage(MSG_DOWNLOAD_ING, info);\r\n }", "public static void main(String[] args) {\n\t\tDownloadManager manager = new DownloadManager();\n\t\tmanager.show();\n\t}", "void onDownloadComplete(EzDownloadRequest downloadRequest);", "public void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }", "public void pressOnDownloadBtn() {\n Network.sendMsg(\n new FileRequest(\n serverFilesList.getSelectionModel().getSelectedItem()));\n }", "public interface DownloadFile {\n\n void start(ZionDownloadListener downloadListener);\n\n}", "public void startDownloadNotification(Context context) {\r\n mNotifyManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\r\n mBuilder = new NotificationCompat.Builder(context);\r\n mBuilder.setContentTitle(\"Files Downloading From PC\").setContentText(\"Download progress\").setSmallIcon(android.R.drawable.stat_sys_download_done);\r\n }", "public URLSpout() {\n \tURLSpout.activeThreads = new AtomicInteger();\n \tlog.debug(\"Starting URL spout\");\n \t\n \ttry { \t\t\n\t\t\treader = new BufferedReader(new FileReader(\"URLDisk.txt\"));\n\t\t\tint num_lines = XPathCrawler.getInstance().getFileCount().get();\n\t\t\tfor (int i = 0; i < num_lines; i++) {\n\t\t\t\treader.readLine(); //set reader to latest line\n\t\t\t}\t\t\t\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));\n //cookie\n String cookie= CookieManager.getInstance().getCookie(url);\n //Add cookie and User-Agent to request\n request.addRequestHeader(\"Cookie\",cookie);\n request.addRequestHeader(\"User-Agent\",userAgent);\n\n //file scanned by MediaScannar\n request.allowScanningByMediaScanner();\n //Download is visible and its progress, after completion too.\n request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\n //DownloadManager created\n DownloadManager downloadManager= (DownloadManager) getContext().getSystemService(Context.DOWNLOAD_SERVICE);\n //Saving file in Download folder\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, filename);\n //download enqued\n downloadManager.enqueue(request);\n }", "public void run(){\n\t\tc = Controller.getApp();\n\t\t//sets the selected folder so we know how much the view needs to refresh\n\t\ttry{\n\t\t\ttarget = c.getActiveView().getSelectedFolder();\n\t\t}catch(NoItemSelectedException e){\n\t\t\t//if they haven't selected a folder, let them know so they aren't confused why it isn't doing anything\n\t\t\tMessageDialog.openWarning(Display.getCurrent().getActiveShell(), \"Warning\", \"Please select a folder to import feeds into\");\n\t\t\treturn;\n\t\t}\n\t\t//gets the url\n\t\tInputDialog dlg = new InputDialog(Display.getCurrent().getActiveShell(),\"Import from OPML\",\"Enter OPML file URL and Click 'OK'\",\"\", null);\n\t\tint rc = dlg.open();\n\t\tif (rc == Window.OK){\n\t\t\topmlurl = dlg.getValue();\n\t\t\ttry{\n\t\t\t\t//prepares the statusline to use as the progress monitor\n\t\t\t\tStatusLineManager s = c.getStatusLine();\n\t\t\t\ts.setCancelEnabled(true);\n\t\t\t\t//performs action in progress dialog since it takes awhile\n\t\t\t\tModalContext.run(this,true,s.getProgressMonitor(),Display.getCurrent());\n\t\t\t\t//updates the folder contents\n\t\t\t\tc.getActiveView().updateFolderContents(target);\n\t\t\t\tc.setStatus(\"done\");\n\t\t\t}catch(InterruptedException e){\n\t\t\t\tc.setStatus(\"Problem opening file: \"+e.getMessage());\n\t\t\t\tc.getActiveView().updateFolderContents(target);\n\t\t\t}catch(InvocationTargetException e){\n\t\t\t\tc.setStatus(\"Done\");\n\t\t\t\tc.getActiveView().updateFolderContents(target);\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\t//if the tread throws some big time exception just exit gracefully\n\t\t\t\tc.setStatus(\"Error importing feeds: \"+e);\n\t\t\t\tc.getActiveView().updateFolderContents(target);\n\t\t\t}\n\t\t}\n\t}", "@Override\n protected String doInBackground(String... f_url) {\n int count;\n try {\n URL url = new URL(f_url[0]);\n filename=url.getPath().substring(url.getPath().lastIndexOf(\"/\")+1);\n URLConnection conection = url.openConnection();\n conection.connect();\n\n // this will be useful so that you can show a tipical 0-100%\n // progress bar\n int lenghtOfFile = conection.getContentLength();\n\n // download the file\n InputStream input = new BufferedInputStream(url.openStream(),\n 8192);\n\n\n filePath = Environment\n .getExternalStorageDirectory().toString()\n + \"/easycover/\" +filename;\n\n String easycoverFolder = Environment\n .getExternalStorageDirectory().toString()\n + \"/easycover\";\n File dir = new File(easycoverFolder);\n\n if (!dir.exists())\n dir.mkdir();\n\n // Output stream\n OutputStream output = new FileOutputStream(Environment\n .getExternalStorageDirectory().toString()\n + \"/easycover/\" + filename);\n\n\n byte data[] = new byte[1024];\n\n long total = 0;\n\n while ((count = input.read(data)) != -1) {\n total += count;\n // publishing the progress....\n // After this onProgressUpdate will be called\n publishProgress(\"\" + (int) ((total * 100) / lenghtOfFile));\n\n // writing data to file\n output.write(data, 0, count);\n }\n\n // flushing output\n output.flush();\n\n // closing streams\n output.close();\n input.close();\n\n } catch (Exception e) {\n Log.e(\"Error: \", e.getMessage());\n }\n\n return null;\n }", "@Override\n protected void onPostExecute(Integer downloadStatue) {\n if(downloadStatue == DOWNLOAD_SUCCESS)\n {\n this.setDownloadCanceled(false);\n this.setDownloadPaused(false);\n downloadListener.onSuccess();\n //scanFile();\n }else if(downloadStatue == DOWNLOAD_FAILED)\n {\n this.setDownloadCanceled(false);\n this.setDownloadPaused(false);\n downloadListener.onFailed();\n }else if(downloadStatue == DOWNLOAD_PAUSED)\n {\n downloadListener.onPaused();\n }else if(downloadStatue == DOWNLOAD_CANCELED)\n {\n downloadListener.onCanceled();\n }\n }", "public void establishChannel(String Download)\r\n {\r\n try\r\n {\r\n int lines=0;\r\n while(true)\r\n {\r\n lines=getLines(path,Download);\r\n if(lines == 0)\r\n {\r\n //nothing to copy\r\n System.out.println(\"Nothing to copy will try in 5 secs\");\r\n Thread.sleep(5000);\r\n }\r\n else\r\n\t {\r\n String command1=\"tail -\"+lines+\" \"+path;\r\n System.out.println(\"Setting command: \"+command1); \r\n settingCommand(command1,Download);\r\n Thread.sleep(1000);\r\n }\r\n }\r\n }\r\n catch(Exception e)\r\n {\r\n System.out.println(e);\r\n }\r\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 }", "@Override\n\tpublic void run( ) {\n\t\tConnect();\n\t\tSendFile( filePath );\n\t\tDisconnect();\n\t}", "private void start() {\n\t\twhile(!navi.pathCompleted())\n\t\t{\n\t\t\tThread.yield();\n\t\t\t\n\t\t}\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_start_download);\n\t\t\n\t\t\n\t\t/*mgr=(DownloadManager)getSystemService(DOWNLOAD_SERVICE);\n\t\tregisterReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));\n\t\tregisterReceiver(onNotificationClick, new IntentFilter(DownloadManager.ACTION_NOTIFICATION_CLICKED));\n\t*/\n\t\t\n\t}", "@Override\n public void startListening() {\n //Download proj upon connection response from cs\n RxBus.INSTANCE\n .listen(DownloadProjectUseCase.Request.class)\n .subscribe(request -> {\n this.projectForDownload = request.projectForDownload;\n downloadProject(request.projectForDownload);\n });\n\n //Retry download proj when there is a problem\n RxBus.INSTANCE\n .listen(RetryCacheProblemUseCase.Request.class)\n .subscribe(request -> {\n downloadProject(projectForDownload);\n });\n\n }", "public void run() {\n try {\n System.out.println(\"Calling Process\");\n processRequest();\n\n } catch (Exception e) {\n System.out.println(\"Run Exception\" + e);\n }\n\n }", "@Override\n\t\tprotected String doInBackground(String... f_url) {\n\t\t\tint count;\n\n\t\t\ttry {\n\n\t\t\t\tFile folder = new File(\n\t\t\t\t\t\tEnvironment.getExternalStorageDirectory() + \"/sdcard\");\n\t\t\t\tboolean success = true;\n\t\t\t\tif (!folder.exists()) {\n\t\t\t\t\tsuccess = folder.mkdir();\n\t\t\t\t}\n\t\t\t\tFile folder2 = new File(\n\t\t\t\t\t\tEnvironment.getExternalStorageDirectory()\n\t\t\t\t\t\t\t\t+ \"/sdcard/RBK\");\n\t\t\t\tif (!folder2.exists()) {\n\t\t\t\t\tsuccess = folder2.mkdir();\n\t\t\t\t}\n\n\t\t\t\tURL url = new URL(f_url[0]);\n\t\t\t\tURLConnection conection = url.openConnection();\n\t\t\t\tconection.connect();\n\t\t\t\t// getting file length\n\t\t\t\tint lenghtOfFile = conection.getContentLength();\n\n\t\t\t\t// input stream to read file - with 8k buffer\n\t\t\t\tInputStream input = new BufferedInputStream(url.openStream(),\n\t\t\t\t\t\t8192);\n\n\t\t\t\t// Output stream to write file\n\n\t\t\t\tOutputStream output = new FileOutputStream(Environment\n\t\t\t\t\t\t.getExternalStorageDirectory().toString()\n\t\t\t\t\t\t+ \"/sdcard/RBK/downloadedfile\" + j + \".jpg\");\n\n\t\t\t\tbyte data[] = new byte[1024];\n\n\t\t\t\tlong total = 0;\n\t\t\t\tj++;\n\t\t\t\tLog.v(\"log_tag\", \"j ::: \" + j);\n\n\t\t\t\twhile ((count = input.read(data)) != -1) {\n\t\t\t\t\ttotal += count;\n\n\t\t\t\t\t// writing data to file\n\t\t\t\t\toutput.write(data, 0, count);\n\n\t\t\t\t}\n\n\t\t\t\t// flushing output\n\t\t\t\toutput.flush();\n\n\t\t\t\t// closing streams\n\t\t\t\tinput.close();\n\n\t\t\t} catch (Exception e) {\n\t\t\t\tIntent intent = new Intent(getApplicationContext(), Error.class);\n\n\t\t\t\tstartActivityForResult(intent, 0);\n\t\t\t\tLog.e(\"Error: \", e.getMessage());\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}", "@Override\n\tpublic void run() {\n\t\tString request;\n\t\ttry {\n\t\t\tSocketBuilder socketBuilder = new SocketBuilder(this.IP);\n\n\t\t\tSocket clientSocketStrings = socketBuilder.createStringSocket();\n\t\t\tSocket clientSocketBytes = socketBuilder.createByteSocket();\n\n\t\t\tDataOutputStream outToServer = new DataOutputStream(clientSocketStrings.getOutputStream());\n\n\t\t\tDataInputStream bytesStream = new DataInputStream(clientSocketBytes.getInputStream());\n\n\t\t\tBufferedReader inFromServer = new BufferedReader(\n\t\t\t\t\tnew InputStreamReader(clientSocketStrings.getInputStream(), StandardCharsets.UTF_8));\n\t\t\t\n\t\t\tMessage requestMessage = new Message();\n\t\t\trequestMessage.createDownloadMessage(path);\n\n\t\t\trequest = JsonParser.messageToJson(requestMessage);\n\n\t\t\toutToServer.write(request.getBytes(\"UTF-8\"));\n\t\t\toutToServer.writeByte('\\n');\n\n\t\t\tMessage responseMessage = JsonParser.jsonToMessage(inFromServer.readLine());\n\n\t\t\t// check if operation is possible\n\t\t\tif (responseMessage.isERRORMessage()) {\n\t\t\t\t/*\n\t\t\t\t * Handle Error Here\n\t\t\t\t */\n\t\t\t} else {\n\n\t\t\t\tFileTransfer fileTransfer = new FileTransfer();\n\n\t\t\t\tlong size = Long.parseLong(inFromServer.readLine());\n\n\t\t\t\tEstimationViewManagementThread manage = new EstimationViewManagementThread(size, \n\t\t\t\t\t\tfileTransfer, clientSocketStrings, clientSocketBytes);\n\t\t\t\tmanage.start();\n\t\t\t\tfileTransfer.receiveFiles(bytesStream, inFromServer, locationToSave);\n\t\t\t}\n\t\t\t\n\t\t\toutToServer.close();\n\t\t\tbytesStream.close();\n\t\t\tinFromServer.close();\n\t\t\tclientSocketBytes.close();\n\t\t\tclientSocketStrings.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void downloadDay(){\n\n}", "public void run() {\n\t\t\t\tHttpURLConnection connection = null;\r\n\t\t\t\tStringBuilder response = new StringBuilder();\r\n\t\t\t\ttry{\r\n\t\t\t\t\tURL url = new URL(address);\r\n\t\t\t\t\tconnection = (HttpURLConnection) url.openConnection();\r\n\t\t\t\t\tconnection.setRequestMethod(\"GET\");\r\n\t\t\t\t\tconnection.setConnectTimeout(8000);\r\n\t\t\t\t\tconnection.setReadTimeout(8000);\r\n\t\t\t\t\tconnection.setDoInput(true);\r\n\t\t\t\t\t//connection.setDoOutput(true);\r\n\t\t\t\t\tint responseCode = connection.getResponseCode();\r\n\t\t\t\t\tLog.d(\"HttpUtil\", String.valueOf(responseCode));\r\n\t\t\t\t\tif(responseCode != 200){\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Fail\");\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\tInputStream in = connection.getInputStream();\r\n\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(in));\r\n\t\t\t\t\t\tString line;\r\n\t\t\t\t\t\twhile((line = reader.readLine()) != null){\r\n\t\t\t\t\t\t\tresponse.append(line);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tLog.d(\"HttpUtil\", \"Get Success\");\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onFinish(response.toString());\r\n\t\t\t\t\t}\r\n\t\t\t\t}catch(Exception e){\r\n\t\t\t\t\tif(listener != null){\r\n\t\t\t\t\t\tlistener.onError(e);\r\n\t\t\t\t\t}\r\n\t\t\t\t}finally{\r\n\t\t\t\t\tif(connection != null){\r\n\t\t\t\t\t\tconnection.disconnect();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}", "@Override\n\tpublic void run() {\n\t\ttry {\n\t\t\tuploadCurrentImage();\n\t\t} catch (IOException | InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t//Call function from client with the Image URL\n\t}", "@Override\n public void onClick(View view) {\n switch (view.getId()) {\n case R.id.downloadPdf:\n if (isConnectingToInternet()){\n Toast.makeText(getApplicationContext(), \"it's me\", Toast.LENGTH_SHORT).show();\n new DownloadTask(MainActivity.this, downloadPdf, Utils.downloadPdfUrl);\n }\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadDoc:\n if(isStoragePermissionGranted()){\n\n }\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadDoc, Utils.downloadDocUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadZip:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadZip, Utils.downloadZipUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadVideo:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadVideo, Utils.downloadVideoUrl);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.downloadMp3:\n if (isConnectingToInternet())\n new DownloadTask(MainActivity.this, downloadMp3, Utils.downloadMp3Url);\n else\n Toast.makeText(MainActivity.this, \"Oops!! There is no internet connection. Please enable internet connection and try again.\", Toast.LENGTH_SHORT).show();\n break;\n case R.id.openDownloadedFolder:\n openDownloadedFolder();\n break;\n case R.id.go_to_downlaod:\n Intent i = new Intent(MainActivity.this, DownloadActivity.class);\n startActivity(i);\n break;\n\n }\n }", "@Override\n\t\t\tpublic void onSuccess(ResponseInfo<File> arg0) {\n\t\t\t\tdialog2.dismiss();\n\t\t\t\tToast.makeText(context, \"文件下载成功!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tintent.setDataAndType(\n\t\t\t\t\t\tUri.fromFile(new File(file_path+filename)),\n\t\t\t\t\t\t\"application/vnd.android.package-archive\");\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t((Activity) context).startActivityForResult(intent, 1);\n\t\t\t}", "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 }", "@Override\n\t\tprotected void onPreExecute() {\n\t\t\tDialog.setMessage(\"Downloading Delivery Data..\");\n\t\t\tDialog.setCancelable(false);\n\t\t\tDialog.show();\n\t\t}", "public void run(){\n\t\tGlobal.printer.print(\"\\ngetting resource from \"+apkName+\" ... \");\n\t\tString cmd = \"java -jar \\\"\"+this.apktoolPath+\"\\\" d \\\"\"+this.filePath+\"\\\" -f -o \\\"\"+ this.apkPath+\"\\\"\";\n\t\t//Global.copyDir(this.tmpResPath, this.apkPath);\n\t\ttry {\n\t\t\tGlobal.sysCmd(cmd );//,Global.printer);\n\t\t\tGlobal.printer.print(\"succeed!!\");\n\t\t} catch (Exception e) {\n\t\t\tGlobal.printer.print(\"error!!\");\n\t\t\t//Global.printer.print(e.getMessage());\n\t\t}\n\t}", "public void run() {\n\t\t\t\twhile (queue.size() > 0) {\n\t\t\t\t\tJobQueue urlList = queue.poll();\n\t\t\t\t\tdoRequests(urlList);\n\t\t\t\t}\n\t\t\t}", "void startProgress();", "public void download(BillDownloadEventNotification eventNotification) throws Exception {\n\t\tStopWatch timer = new StopWatch();\n\t\ttimer.start();\n\t\t\n\t\tOLBBillDownloadRequest request = null;\n\t\tboolean successful = false;\n\t\t//update status to processing\n\t\trequest = dao.getBillDownloadRequest(eventNotification.getRecordId());\n\t\tif (null == request) {\n\t\t\tthrow new Exception(\"BillDownloadRequest cannot be found: \" + eventNotification.getRecordId());\n\t\t}\n\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_PROCESSING);\n\t\tdao.update(request);\n\t\t\n\t\tDataHandler billContent = null;\n\t\tString extension = \".pdf\";\n\t\tsuccessful = true;\n\t\tString billSysId = getBillSysId(request.getDdn());\n\t\t\n\t\tString billNumber = \"\";\n\t\tif(billSysId.equals(BILL_SYS_ID_FLEXCAB)){\n\t\t\tbillNumber = request.getBillNumber();\n\t\t} else if(billSysId.equals(BILL_SYS_ID_MICA)){\n\t\t\tbillNumber = getMICABillNumber(request.getBillNumber());\t\t\t\n\t\t}\n\t\t\n\t\tDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString issueDate = df.format(request.getBillIssueDate());\n\t\tif (log.isDebugEnabled()) log.debug(\"Calling webservice client\");\n\t\ttry {\n\t\t\tString requestType = REQUEST_TYPE_BULK;\n\t\t\tif(eventNotification.getParentRecordId() == ONE_OFF_DOWNLOAD_BULK_ID){\n\t\t\t\trequestType = REQUEST_TYPE_ONEOFF;\n\t\t\t}\n\t\t\tbillContent = getDoc(requestType,billSysId,request.getAccountNumber(), billNumber, issueDate,PAGE_LIMIT, PAGE_RANGE, id, pw);\n\t\t} catch(TelJIesRpcServiceFault e){\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Service Fault received: \",e);\t\t\t\n\t\t\tif(e.getFaultID().equals(TelstraCBMConstants.SALMAT_ERROR_CODE_001)){\n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_NOT_FOUND);\n\t\t\t} else if(e.getFaultID().equals(TelstraCBMConstants.SALMAT_ERROR_CODE_008)){\n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_TOO_LARGE);\n\t\t\t} else { \n\t\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\t}\n\t\t\tsuccessful = false;\n\t\t} catch(RemoteException re){\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Remote exception occured: \",re);\n\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\tsuccessful = false;\n\t\t}\n\t\ttry {\n\t\t\teventNotification.setSuccessful(false);\n\t\t\tif (successful) {\n\t\t\t\t//save file to file system\n\t\t\t\tMessageFormat pathFormat = new MessageFormat(this.billsPath);\n\t\t\t\tString[] pathArgs = {eventNotification.getUserId(),eventNotification.getBulkReqestName()};\n\t\t\t\tStringBuffer path = new StringBuffer(pathFormat.format(pathArgs));\n\t\t\n\t\t\t\tpath.append(request.getAccountNumber()).append(\"_\")\n\t\t\t\t\t\t.append(request.getBillNumber()).append(\"_\")\n\t\t\t\t\t\t.append(df.format(request.getBillIssueDate())).append(extension);\n\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Writing PDF to the location: \"+path.toString());\n\t\t\t\tFile file = new File(path.toString());\n\t\t\t\tif(!file.exists()){ file.createNewFile();}\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\n\t\t\t\tbillContent.writeTo(fos);\n\t\t\t\tfos.close();\n\t\t\t\t\n\t\t\t\t//update status to complete\n\t\t\t\trequest.setBillFilePath(path.toString());\n\t\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_COMPLETE);\n\t\t\t\tdao.update(request);\n\t\t\t\tdao.flushToDatabase();\n\t\t\t\n\t\t\t\teventNotification.setSuccessful(true);\n\t\t\t} else {\n\t\t\t\tif (log.isDebugEnabled()) log.debug(\"Saving failed bill status to database\");\n\t\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_ERROR);\n\t\t\t\tdao.update(request);\n\t\t\t\tdao.flushToDatabase();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Exception caught while saving bill download request to file system: \", e);\n\t\t\tif (log.isDebugEnabled()) log.debug(\"Cleaning up bill download request\");\n\t\t\t//get fresh copy of request\n\t\t\trequest = dao.getBillDownloadRequest(eventNotification.getRecordId());\n\t\t\trequest.setComments(TelstraCBMConstants.BILL_DOWNLOAD_COMMENT_FAILED);\n\t\t\trequest.setStatus(TelstraCBMConstants.DOWNLOAD_STATUS_ERROR);\n\t\t\tdao.update(request);\n\t\t\tdao.flushToDatabase();\n\t\t}\n\t\t\n\t\ttimer.stop();\n\t\tOLBBillDownloadTime time = new OLBBillDownloadTime();\n\t\ttime.setCreated(new Date());\n\t\ttime.setGeneratorTypeId(getGeneratorType(request.getDownloadFormat()));\n\t\ttime.setElapsedSeconds((float)timer.getElapsedTime()/(float)1000);\n\t\ttime.setReference(request.getId()+\"\");\n\t\tif(log.isDebugEnabled()) { log.debug(\"Recording response time: \" + time.getElapsedSeconds()); }\n\t\tgetDao().recordTime(time);\n\t\t\n\t\tif(eventNotification.getParentRecordId() != ONE_OFF_DOWNLOAD_BULK_ID){\n\t\t\tjmsSender.sendMesage(eventNotification);\n\t\t}\n\t}" ]
[ "0.8189714", "0.77973884", "0.7786114", "0.7623378", "0.7591302", "0.7224123", "0.7163487", "0.7099468", "0.6984672", "0.68045545", "0.6784277", "0.6749627", "0.6676374", "0.6611131", "0.6583437", "0.65180916", "0.6508953", "0.6480096", "0.6452604", "0.64431816", "0.6401524", "0.63568646", "0.6347131", "0.63390636", "0.63039243", "0.627758", "0.62308395", "0.62274665", "0.621822", "0.6215141", "0.6198613", "0.6196185", "0.6178585", "0.61077964", "0.61021245", "0.60992646", "0.6065036", "0.60626054", "0.6056082", "0.6032706", "0.6001467", "0.59908426", "0.5987209", "0.59860504", "0.5973347", "0.59708613", "0.5959745", "0.5956001", "0.5939991", "0.5935081", "0.5910472", "0.59062445", "0.5893572", "0.58930093", "0.5886319", "0.58862454", "0.58796626", "0.5866637", "0.5845607", "0.584493", "0.58270276", "0.57820046", "0.5769677", "0.5755681", "0.5745621", "0.57301664", "0.57240635", "0.57148343", "0.5693714", "0.5679608", "0.56755096", "0.56638116", "0.5663331", "0.5659382", "0.5656912", "0.56470025", "0.56397325", "0.5622898", "0.5621924", "0.5618205", "0.56144", "0.5609096", "0.56035745", "0.5597167", "0.5591748", "0.55912733", "0.558634", "0.5577395", "0.557367", "0.5570604", "0.5568404", "0.55619776", "0.5558325", "0.55500484", "0.5548758", "0.5548064", "0.5544304", "0.55430806", "0.5540692", "0.5534422" ]
0.59079343
51
Save the image file after we succeed to cache it.
@Override public void onResult(@NonNull PhotoCache photoCache) { saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this); fullPhotosCaching.put(photoCache.getPhotoId(), photoCache); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void saveBitmapToCacheFile(String url, Bitmap bitmap){\n \t\n \tif(bitmap != null){\n \t\tFile bufferFolder = new File(MainActivity.image_cache_dir);\n \t\tif(!bufferFolder.exists()) bufferFolder.mkdirs();\n \t\t\t\t\t\n \t\tFile imageFile = new File(MainActivity.image_cache_dir + getFileName(url));\n \t\t//System.out.println(\"saveBitmapToCacheFile \" + imageFile.getAbsolutePath());\n \t\tif(imageFile.exists()) {\n \t\t\t//If the file already exist, don't save it again.\n \t\t\treturn;\n \t\t\t//imageFile.delete();\n \t\t}\n \t\tFileOutputStream fout = null;\n \t\ttry {\n\t\t\t\tfout = new FileOutputStream(imageFile);\t\t\t\t\n\t\t\t\tbitmap.compress(Bitmap.CompressFormat.JPEG, 100, fout);\t\n\t\t\t\t//System.out.println(\"bitmap.compress \" + imageFile.getAbsolutePath());\n \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}finally{\n\t\t\t\tif(fout != null){\n\t\t\t\t\ttry {\n\t\t\t\t\t\tfout.flush();\n\t\t\t\t\t\tfout.close();\n\t\t\t\t\t} catch (IOException e) {\t\t\t\t\t\t\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t}\t \n\t\t\t} \t\t \t\t\n \t}\n }", "@Override\n public void onComplete(Bitmap bitMap) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }", "public void save() {\n Path root = Paths.get(storagePath);\n try {\n Files.copy(file.getInputStream(), root.resolve(file.getOriginalFilename()),\n StandardCopyOption.REPLACE_EXISTING);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void saveFile() {\r\n\t\tFile file = new File(this.picture.getFileName());\r\n\r\n\t\ttry {\r\n\t\t\tImageIO.write(this.picture.getBufferedImage(),\r\n\t\t\t\t\tthis.picture.getExtension(), file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(this.pictureFrame,\r\n\t\t\t\t \"Could not save file.\",\r\n\t\t\t\t \"Save Error\",\r\n\t\t\t\t JOptionPane.WARNING_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "synchronized static void saveFile(String url){\n\t\tint count=1,size=0;\n\t\tbyte buffer[] = new byte[0x100];\n\t\ttry {\n\t\t\tFileOutputStream fos = new FileOutputStream(new File(context.getCacheDir(), hashURL(url)));\n\t\t\tInputStream input = new BufferedInputStream(new URL(url).openStream());\n\t\t\tLog.i(\"FILEBANK\",\"Saveing \"+hashURL(url));\n\t\t\twhile(true){\n\t\t\t\tcount=input.read(buffer);\n\t\t\t\tif(count<0)break;\n\t\t\t\tfos.write(buffer,0,count);\n\t\t\t\tsize+=count;\n\t\t\t}\n\t\t\tinput.close();\n\t\t\tfos.close();\n\t\t\tLog.i(\"FILEBANK\",\"Saved \"+hashURL(url)+\" \"+size+\" bytes.\");\n\t\t} catch (FileNotFoundException ex) {\n\t\t\tLog.e(\"FILEBANK\", \"Error saving file to cache\", ex);\n\t\t} catch (MalformedURLException ex) {\n\t\t\tLog.e(\"FILEBANK\",\"Invalid url: \"+url, ex);\n\t\t} catch (IOException ex) {\n\t\t\tLog.e(\"FILEBANK\",\"Error reading image\", ex);\n\t\t} catch (IndexOutOfBoundsException ex) {\n\t\t\tLog.e(\"FILEBANK\", \"(count, size) = \"+count+\",\"+size, ex);\n\t\t}\n\t}", "@FXML public void saveToFile()throws java.io.IOException {\n Highgui.imwrite( this.originalImagePath, this.image );\n System.out.println(\"Saving\");\n }", "@Override\n public void onComplete(String url) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n saveImageToFile(image,localFileName);\n //3. return the image using the listener\n listener.onComplete(image.toString());\n }", "private static void putInPersistentCache(final Asset asset) {\n \n \t\tif (!usePersistentCache) {\n \t\t\treturn;\n \t\t}\n \n \t\tif (!assetIsInPersistentCache(asset)) {\n \n \t\t\tfinal File assetFile = getAssetCacheFile(asset);\n \n \t\t\tnew Thread() {\n \t\t\t\t@Override\n \t\t\t\tpublic void run() {\n \n \t\t\t\t\ttry {\n \t\t\t\t\t\tassetFile.getParentFile().mkdirs();\n \t\t\t\t\t\t// Image\n \t\t\t\t\t\tOutputStream out = new FileOutputStream(assetFile);\n \t\t\t\t\t\tout.write(asset.getImage());\n \t\t\t\t\t\tout.close();\n \n \t\t\t\t\t} catch (IOException ioe) {\n \t\t\t\t\t\tlog.error(\"Could not persist asset while writing image data\", ioe);\n \t\t\t\t\t\treturn;\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}.start();\n \n \t\t}\n \t\tif (!assetInfoIsInPersistentCache(asset)) {\n \n \t\t\tFile infoFile = getAssetInfoFile(asset);\n \n \t\t\ttry {\n \t\t\t\t// Info\n \t\t\t\tOutputStream out = new FileOutputStream(infoFile);\n \t\t\t\tProperties props = new Properties();\n \t\t\t\tprops.put(NAME, asset.getName() != null ? asset.getName() : \"\");\n \t\t\t\tprops.store(out, \"Asset Info\");\n \t\t\t\tout.close();\n \n \t\t\t} catch (IOException ioe) {\n \t\t\t\tlog.error(\"Could not persist asset while writing image properties\", ioe);\n \t\t\t\treturn;\n \t\t\t}\n \n \t\t}\n \t}", "public boolean saveImage() throws IOException\n\t{\n\t\tConfiguration config = GlobalConfiguration.CONFIG;\n\t\tString rootPath = config.get(GlobalConfiguration.CRAWL_IMAGE_ROOT, \"/export/public_html/image\");\n\t\tFile imageDir = new File(rootPath);\n\t\tif(!imageDir.exists())\n\t\t{\n\t\t\timageDir.mkdirs();\n\t\t}\n\t\t///image name is image data hash in hex format\n\t\tString fullPath = rootPath + \"/\" + this.getImageFileName();\n\t\tFileOutputStream fos = new FileOutputStream(fullPath);\n\t\tfos.write(this.getImageData());\n\t\tfos.close();\n\t\treturn true;\n\t}", "boolean saveImage(Image img) {\r\n\t\treturn true;\r\n\t}", "int saveCached(String fileName) throws IOException\n\t {\n\t\t File f = new File (fileName);\n\t\t \n\t\t\t\tif (f.exists())\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println(\"ATTENTION!!! File \" +fileName+ \" already exists. Adding new records to it.\");\n\t\t\t\t\tFileWriter fw = new FileWriter (f, true);\n\t\t\t\t\tPrintWriter pwx = new PrintWriter (fw);\n\t\t\t\t\tBufferedReader brx = new BufferedReader(new FileReader (\".cache\"));\n\t\t\t\t\t \n\t\t\t\t\t String lineX = brx.readLine();\n\t\t\t\t\t \n\t\t\t\t\t while (lineX != null)\n\t\t\t\t\t {\n\t\t\t\t\t\t pwx.println(lineX);\n\t\t\t\t\t\t lineX=brx.readLine();\n\t\t\t\t\t }\n\t\t\t\t\t brx.close();\n\t\t\t\t\t pwx.flush();\n\t\t\t\t\t pwx.close();\n\t\t\t\t\t \n\t\t\t\t\t return 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tf.createNewFile();\n\t\t\t\t}\n\t\t \n\t\t \n\t\t PrintWriter pn = new PrintWriter (fileName);\n\t\t BufferedReader br = new BufferedReader(new FileReader (\".cache\"));\n\t\t \n\t\t String line = br.readLine();\n\t\t \n\t\t while (line != null)\n\t\t {\n\t\t\t pn.println(line);\n\t\t\t line=br.readLine();\n\t\t }\n\t\t pn.flush();\n\t\t br.close();\n\t\t pn.close();\n\t\t System.out.println(\"Your file was saved as follows\");\n\t\t FileManager fm = new FileManager();\n\t\t fm.show(fileName);\n\t\treturn 1;\n\t }", "public void saveAsset() throws IOException {\n file.saveAsset();\n }", "public void saveScreenshot() {\n if (ensureSDCardAccess()) {\n Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888);\n Canvas canvas = new Canvas(bitmap);\n doDraw(1, canvas);\n File file = new File(mScreenshotPath + \"/\" + System.currentTimeMillis() + \".jpg\");\n FileOutputStream fos;\n try {\n fos = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, fos);\n fos.close();\n } catch (FileNotFoundException e) {\n Log.e(\"Panel\", \"FileNotFoundException\", e);\n } catch (IOException e) {\n Log.e(\"Panel\", \"IOEception\", e);\n }\n }\n }", "synchronized public void saveToFile() {\n try {\n saveObjToFile(this, saveFilePath);\n } catch (IOException e) {\n e.printStackTrace();\n log(\"error saving resource to file\");\n }\n }", "public void save(View view) {\n String root = Environment.getExternalStorageDirectory().toString();\n File myDir = new File(root + \"/App_images\");\n if (!myDir.exists()) {\n myDir.mkdir();\n }\n // STOP creating directory for images\n Random generator = new Random();\n int n = 10000;\n n = generator.nextInt(n);\n String fname = \"Image-\" + n + \".jpg\";\n File file = new File(myDir, fname);\n if (file.exists()) file.delete();\n try {\n FileOutputStream out = new FileOutputStream(file);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void writeImage() {\n // Write generated image to a file\n try {\n // Save as JPEG\n File file = new File(\"Images/\" + name + \"INS\" + System.currentTimeMillis() + \".jpg\");\n ImageIO.write(bufferedImage, \"jpg\", file);\n\t\t\t\t\n\n } catch (IOException e) {\n }\n }", "public void saveImageCache(Integer key, Bitmap data)\n {\n synchronized(mLinkedHashMap)\n {\n if(mLinkedHashMap.get(key) == null)\n {\n try\n {\n String cacheKeyStr = String.valueOf(key);\n final String filePath = createFilePath(cacheDirectory, cacheKeyStr);\n if (writeBitmapToFile(data, filePath))\n {\n referenceAdd(key, filePath);\n flushCache();\n }\n }\n catch (IOException e)\n {\n Log.e(\"DiskLruCache\", \"Error in put: \" + e.getMessage());\n }\n }// if (mLinkedHashMap.get(key) == null)\n }// synchronized (mLinkedHashMap)\n }", "@Override\r\n\tpublic FileImage save(FileImage fileImage) {\n\t\treturn fileImageDao.save(fileImage);\r\n\t}", "public static void saveImageCache( Context context, Bitmap bitmap, String url ) {\n\t\ttry {\n\t\t\tString fileName = createPath(url, context);\n\t\t\t\n\t\t\tLog.i( TAG, \"saveImageCache: \" + fileName );\n\t\t\t\n\t\t\tList<String> fileList = Arrays.asList(fileName.split((\"/\")));\n\t\t\tString dirName = TextUtils.join(\"/\", fileList.subList(0, (fileList.size() - 1)));\n\t\t\t\n\t\t\tFile dirHnd = new File(dirName);\n\t\t\tdirHnd.mkdirs();\n\t\t\t\n\t\t\tFile file = new File ( fileName );\n\t\t\t\n\t\t\tFileOutputStream fileOutputStream = new FileOutputStream(file);\n\t\t\tBufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);\n\t\t\t\n\t\t\tif ( fileName.toLowerCase().indexOf(\"png\") > 0 ) {\n\t\t\t\tbitmap.compress( CompressFormat.PNG , 100, bos);\n\t\t\t} else {\n\t\t\t\tbitmap.compress( CompressFormat.JPEG , 100, bos);\n\t\t\t}\n\t\t\t\n\t\t\tbos.flush();\n\t bos.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tLog.i( TAG, \"ERROR: saveImageCache: \" + e);\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\tLog.i( TAG, \"ERROR: saveImageCache: \" + e);\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\tLog.i( TAG, \"ERROR: saveImageCache: \" + e);\n\t\t\te.printStackTrace();\n\t\t} \t\t\n\t}", "public String saveImage() {\n\t\tFile externalPath = Environment.getExternalStorageDirectory();\n\n\t\t// Create a new folder in SD Card\n\t\tFile dir = new File(externalPath.getAbsolutePath() + \"/\" + DIRECTORY_NAME\n\t\t\t\t+ \"/\");\n\t\tdir.mkdirs();\n\n\t\tString fileName = df.format(Calendar.getInstance().getTime()) + \".png\";\n\t\t// Create a name for the saved image\n\t\tFile file = new File(dir, fileName);\n\t\tString filePath = file.getAbsolutePath();\n\t\ttry {\n\t\t\toutput = new FileOutputStream(file);\n\t\t\t// Compress into png format image from 0% - 100%\n\t\t\tif (bitmap != null) {\n\t\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, output);\n\t\t\t}\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tfilePath = \"SORRY, THERE IS AN ERROR WHILE SAVING!\";\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn filePath;\n\t}", "public void saveState() {\n\t\tFileOutputStream fos = null;\n\t\tObjectOutputStream out = null;\n\t\ttry {\n\t\t\tFile savefile = new File(getServletContext().getRealPath(\"/WEB-INF/\"), SAVED_RECEPTOR_FILE_NAME);\n\t\t\tfos = new FileOutputStream(savefile);\n\t\t\tout = new ObjectOutputStream(fos);\n\t\t\tout.writeObject(pgtMap);\n\t\t\tout.close();\n\t\t} catch (IOException ex) {\n\t\t\tSystem.err.println(\"IO Exception saving proxyTicket cache\");\n\t\t\tex.printStackTrace();\n\t\t} catch (Exception e) { //don't think this is possible, but I'm seeing some goofy behavior, so...\n\t\t\tSystem.err.println(\"Non-IO Exception saving proxyTicket cache\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void saveImage(Bitmap bitmap, String fileName) {\n File createFolder = new File(Environment.getExternalStorageDirectory(), FILEPATH);\n if (!createFolder.exists())\n createFolder.mkdir();\n\n File output = new File(Environment.getExternalStorageDirectory(),\n FILEPATH + \"/\" + fileName + \".jpg\");\n if (output.exists()) {\n output.delete();\n\n /*Whenever you delete a file, let MediaStore Content Provider knows about it*/\n// getContentResolver().delete(Uri.fromFile(output), null, null);\n }\n\n// System.currentTimeMillis()\n File saveImage = new File(createFolder, fileName + \".jpg\");\n try {\n OutputStream outputStream = new FileOutputStream(saveImage);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n if (saveImage.exists()) {\n /*Whenever you add a file, let MediaStore Content Provider knows about it using*/\n sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(saveImage)));\n\n\n publishResults(fileName, result);//output.getAbsolutePath()\n Log.v(TAG, fileName + \", size : \" + saveImage.getAbsoluteFile().length());\n }\n } catch (FileNotFoundException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n }\n }", "public void Save( String saveImgAs )\n {\n saveImage(image, saveImgAs); \n }", "private boolean SaveImage(Bitmap imageData, String filename, Context ctx) {\n\n String folder = \"\";\n String sdState = android.os.Environment.getExternalStorageState(); //Получаем состояние SD карты (подключена она или нет) - возвращается true и false соответственно\n if (sdState.equals(android.os.Environment.MEDIA_MOUNTED)) {\n folder = ctx.getCacheDir().toString();\n }\n else {\n folder = ctx.getExternalCacheDir().toString();\n }\n\n try {\n String filePath = folder + \"/\" + filename;\n FileOutputStream fileOutputStream = new FileOutputStream(filePath);\n\n BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);\n\n //choose another format if PNG doesn't suit you\n imageData.compress(Bitmap.CompressFormat.PNG, 100, bos);\n\n bos.flush();\n bos.close();\n\n } catch (FileNotFoundException e) {\n Log.w(\"TAG\", \"Error saving image file: \" + e.getMessage());\n return false;\n } catch (IOException e) {\n Log.w(\"TAG\", \"Error saving image file: \" + e.getMessage());\n return false;\n }\n\n return true;\n }", "public void saveImage(){\n fixMediaDir(); // fixes bug in Android 4.4\n\n // name file eSketch + timestamp\n final String filename = \"eSketch\" + System.currentTimeMillis() + \".jpg\";\n\n // insert image on the device\n String location = MediaStore.Images.Media.insertImage(\n getContext().getContentResolver(), mBitmap, filename, \"eSketch Drawing\"\n );\n\n if( location != null ){\n // notify user image was saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_saved, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n } else {\n // notify user image was NOT saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_error_saving, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n }", "private void save(FileItem file) throws Exception {\n FileHandler fileHandler = new FileHandler(oriImgFile());\n fileHandler.saveFile(file);\n }", "private void saveImage(File file) throws IOException {\n File compressedImageFile = new Compressor(this).compressToFile(file);\n int size = (int) compressedImageFile.length();\n byte[] bytes = new byte[size];\n BufferedInputStream buf = new BufferedInputStream(new FileInputStream(compressedImageFile));\n int bytesRead = buf.read(bytes, 0, bytes.length);\n buf.close();\n uploadImage(bytes);\n }", "private String saveToInternalStorage(Bitmap bitmapImage, String imagePath) {\n\n FileOutputStream fos = null;\n try {\n fos = new FileOutputStream(new File(imagePath));\n // Use the compress method on the BitMap object to write image to the OutputStream\n bitmapImage.compress(Bitmap.CompressFormat.PNG, 100, fos);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return imagePath;\n }", "public String save(){\n this.setDrawingCacheEnabled(true);\n this.buildDrawingCache();\n //mBitmap = Bitmap.createBitmap(this.getWidth(),this.getHeight(),Bitmap.Config.ARGB_8888);\n Bitmap bmp = Bitmap.createBitmap(this.getDrawingCache());\n this.setDrawingCacheEnabled(false);\n\n ByteArrayOutputStream byteArrayOutputStream=new ByteArrayOutputStream();\n bmp.compress(Bitmap.CompressFormat.PNG,100,byteArrayOutputStream);\n byte[] imgBytes=byteArrayOutputStream.toByteArray();\n\n return Base64.encodeToString(imgBytes,Base64.DEFAULT);\n\n }", "@Override\n protected void onSaveInstanceState(Bundle outState) {\n super.onSaveInstanceState(outState);\n\n outState.putString(IMAGE_FILE, currentPhotoPath);\n }", "public void writeToImage() {\r\n\t\t_imageWriter.writeToImage();\r\n\t}", "public void writeToFile() {\n\t\ttry {\n\t\t\tFileOutputStream file = new FileOutputStream(pathName);\n\t\t\tObjectOutputStream output = new ObjectOutputStream(file);\n\n\t\t\tMap<String, HashSet<String>> toSerialize = tagToImg;\n\t\t\toutput.writeObject(toSerialize);\n\t\t\toutput.close();\n\t\t\tfile.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void salvaFoto(){\n\n try {\n\n File f = new File(Environment.getExternalStorageDirectory() +getResources().getString(R.string.folder_package)+ \"/\" +id_Familiar+ \".jpg\");\n\n if(f.exists()){ boolean deleted = f.delete();}\n\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, qualidade_image_profile, bytes);\n\n try {\n f.createNewFile();\n FileOutputStream fo = new FileOutputStream(f);\n fo.write(bytes.toByteArray());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }\n catch (Exception E){\n Log.e(\"error\",\"Erro ao carregar imagem\");\n }\n }", "void save(Images image);", "private void saveToInternalStorage(Bitmap bitmapImage) {\n String root = Environment.getExternalStorageDirectory().toString();\n File myDir = new File(root + \"/saved_images\");\n if (!myDir.exists()) {\n myDir.mkdirs();\n }\n String fname = \"profile.jpg\";\n File file = new File(myDir, fname);\n if (file.exists()){\n file.delete();\n }\n try {\n FileOutputStream out = new FileOutputStream(file);\n bitmapImage.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n out.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void writeToImage() {\n imageWriter.writeToImage();\n }", "public void saveBitmapToDisk(String fileName) throws FileNotFoundException, IOException {\n // serialize\n // save to disk\n FileOutputStream fout = new FileOutputStream(\"assets/\"+fileName+\".bitmap\");\n ObjectOutputStream oos = new ObjectOutputStream(fout);\n oos.writeObject(this);\n }", "public void saveFile(Bitmap imageToSave, String folder) {\n File folderName = new File(Environment.\n getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), folder);\n\n if (!folderName.exists()) {\n Log.i(TAG, \"Folder doesn't exist, creating it...\");\n boolean rv = folderName.mkdir();\n Log.i(TAG, \"Folder creation \" + (rv ? \"success\" : \"failed\"));\n } else {\n Log.i(TAG, \"Folder already exists.\");\n }\n\n String captured = Global.currUser.email + \"Deja_\" + Global.imageNumber + \".jpg\";\n Global.imageNumber++;\n\n File file = new File(folderName, captured);\n\n try {\n FileOutputStream out = new FileOutputStream(file);\n imageToSave.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n\n Global.uploadImageQueue.add(file.getAbsolutePath());\n Log.d(TAG, \"filePath added: \" + file.getAbsolutePath());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n scanSD(file);\n\n Log.d(TAG, \"+++++++\");\n }", "public void saveImgFile(Bitmap mImg, String nName, String mPath) {\n\t\tBufferedOutputStream bos = null;\n\t\tFile mFile = new File(mPath, nName);\n\t\ttry {\n\t\t\tbos = new BufferedOutputStream(new FileOutputStream(mFile));\n\t\t\tif (mImg != null) {\n\t\t\t\tmImg.compress(Bitmap.CompressFormat.JPEG, 80, bos);\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (bos != null) {\n\t\t\t\t\tbos.flush();\n\t\t\t\t\tbos.close();\n\t\t\t\t}\n\t\t\t\tmFile = null;\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onComplete(String url) {\n String localName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"cach image: \" + localName);\n saveImageToFile(imageBitmap,localName); // synchronously save image locally\n //listener.oncomplete(url);\n listener.onComplete(url);\n }", "public void writeToDir() {\n\t\ttry{\n\t\t\tString dirPath = Paths.get(\".\").toAbsolutePath().normalize().toString()+\"/\";\n\t\t\tString path = dirPath + filename; //get server dir path\n\t\t\tSystem.out.println(\"output file path is: \" + path);\n\t\t\tFileOutputStream out = new FileOutputStream(path);\n out.write(img);\n out.close();\n PL.fsync();\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void saveImageFromURL() {\n Executors.newFixedThreadPool(1).execute(new Runnable() {\n @Override\n public void run() {\n if (context != null) {\n OutputStream os = null;\n InputStream is = null;\n final File file = new File(context.getExternalFilesDir(null), pictureName);\n\n try {\n URL url = new URL(loadUrl);\n httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setDoInput(true);\n httpConnection.connect();\n is = httpConnection.getInputStream();\n Bitmap bit = BitmapFactory.decodeStream(is);\n os = new FileOutputStream(file);\n bit.compress(compressFormat, compressPercent, os);\n is.close();\n os.close();\n httpConnection.disconnect();\n } catch (IOException e) {\n Log.w(\"ExternalStorage\", \"Error writing \" + file, e);\n } finally {\n if (httpConnection != null) {\n httpConnection.disconnect();\n try {\n os.flush();\n os.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n });\n }", "private void saveUserData() {\n mSharedPreferences.clearProfile();\n mSharedPreferences.setName(mName);\n mSharedPreferences.setEmail(mEmail);\n mSharedPreferences.setGender(mGender);\n mSharedPreferences.setPassWord(mPassword);\n mSharedPreferences.setYearGroup(mYearGroup);\n mSharedPreferences.setPhone(mPhone);\n mSharedPreferences.setMajor(mMajor);\n\n mImageView.buildDrawingCache();\n Bitmap bmap = mImageView.getDrawingCache();\n try {\n FileOutputStream fos = openFileOutput(getString(R.string.profile_photo_file_name), MODE_PRIVATE);\n bmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n fos.flush();\n fos.close();\n } catch (IOException ioe) {\n ioe.printStackTrace();\n }\n\n if (entryPoint.getStringExtra(SOURCE).equals(MainActivity.ACTIVITY_NAME)) {\n Toast.makeText(RegisterActivity.this,\n R.string.edit_success, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(RegisterActivity.this,\n R.string.register_success, Toast.LENGTH_SHORT).show();\n }\n\n }", "public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }", "public synchronized void setPictureFromCache() {\n Runnable run = new Runnable() {\n @Override\n public void run() {\n File file = new File(context.getExternalFilesDir(null), pictureName);\n if (file != null) {\n Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());\n if (imageView != null) {\n //imageView.setImageDrawable(new BitmapDrawable(null, myBitmap));\n new ResizeImage(imageView, file.getAbsolutePath()).setImageView();\n }\n }\n }\n };\n new Handler(context.getMainLooper()).post(run);\n }", "public static void saveFile(final Context context, Uri uri, final String oldFilename) {\n\n Target target = new Target() {\n\n @Override\n public void onBitmapLoaded(final Bitmap bitmap, LoadedFrom from) {\n\n new Thread(() -> {\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault());\n String currentTimeStamp = format.format(new Date());\n String filename = oldFilename;\n\n if (oldFilename.isEmpty()) {\n filename = \"assi_\" + currentTimeStamp;\n\n Log.d(TAG, \"new user pic filename: \" + filename);\n }\n\n PreferenceUtils.setUserPicFilename(context, filename);\n\n Log.e(TAG, Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n FileOutputStream oStream = null;\n try {\n file.createNewFile();\n\n oStream = new FileOutputStream(file);\n\n bitmap.compress(CompressFormat.JPEG, 80, oStream);\n\n } catch (Exception e) {\n Log.e(TAG, \"Cannot save image to internal file storage! Error: \" + e.getMessage());\n } finally {\n try {\n if (oStream != null) {\n oStream.close();\n }\n } catch (IOException e) {\n Log.e(TAG, \"Cannot close output stream! Error: \" + e.getMessage());\n }\n }\n }).start();\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n }\n };\n\n // save file to internal storage\n Picasso.with(context)\n .load(uri)\n .into(target);\n }", "public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }", "public void saveAll() {\n try {\n writeObject(IMAGE_DATA_PATH, imageFiles);\n writeObject(EXISTING_TAGS_PATH, existingTags);\n } catch (IOException e) {\n // e.printStackTrace();\n }\n }", "public void save(String name) throws IOException {\n\t\tFile outputfile = new File(name+\".jpg\");\n\t\tImageIO.write(this.img, \"jpg\", outputfile);\n\t}", "public void saveImageFromURL(final CacheLoaderCallBack callBack) {\n Executors.newFixedThreadPool(1).execute(new Runnable() {\n @Override\n public void run() {\n if (context != null) {\n OutputStream os = null;\n InputStream is = null;\n final File file = new File(context.getExternalFilesDir(null), pictureName);\n\n try {\n URL url = new URL(loadUrl);\n httpConnection = (HttpURLConnection) url.openConnection();\n httpConnection.setDoInput(true);\n httpConnection.connect();\n is = httpConnection.getInputStream();\n Bitmap bit = BitmapFactory.decodeStream(is);\n os = new FileOutputStream(file);\n bit.compress(Bitmap.CompressFormat.JPEG, 85, os);\n is.close();\n os.close();\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n callBack.onSuccess();\n }\n };\n new Handler(Looper.getMainLooper()).post(runnable);\n httpConnection.disconnect();\n } catch (final IOException e) {\n Log.w(\"ExternalStorage\", \"Error writing \" + file, e);\n Runnable runnable = new Runnable() {\n @Override\n public void run() {\n callBack.onError(e.getMessage());\n }\n };\n new Handler(Looper.getMainLooper()).post(runnable);\n } finally {\n if (httpConnection != null) {\n httpConnection.disconnect();\n try {\n os.flush();\n os.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n }\n }\n }\n }\n });\n }", "private static void SaveImage(Bitmap finalBitmap) {\n File path = Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES);\n File file = new File(path, \"DemoPicture.jpg\");\n\n String fname = \"Image\" +\".jpg\";\n\n try {\n path.mkdirs();\n FileOutputStream out = new FileOutputStream(file);\n finalBitmap.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n out.close();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public void tempSaveToFile() {\n try {\n ObjectOutputStream outputStream = new ObjectOutputStream(\n this.openFileOutput(MenuActivity2048.TEMP_SAVE_FILENAME, MODE_PRIVATE));\n outputStream.writeObject(boardManager);\n outputStream.close();\n } catch (IOException e) {\n Log.e(\"Exception\", \"File write failed: \" + e.toString());\n }\n }", "@Override\r\n protected Boolean doInBackground(Void... params) {\n try{\r\n String ImgPath = ImageUtils.getImageSavePath(GlobalDefinitions.TAG);\r\n PhotoUtils.saveBitmap(mFaceEditor.getDisplayImage(), ImgPath,PhotoUtils.IMAGE_FORMAT_JPG, BeautyfaceActivity.this);\r\n GlobalDefinitions.IMAGE_EDIT_DONE = true;\r\n\r\n }\r\n catch(Exception e)\r\n {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean saveImage(String outPath){\n if (saveLocation == null || saveLocation.isEmpty()){\n System.err.println(\"ERROR: No image destination path given.\");\n return false;\n }\n\n try {\n File output = new File(outPath);\n// if (output.exists() && !overwrite){\n// System.err.println(\"ERROR: Attempting to overwritable existing file when the overwriting option is off.\");\n// return false;\n// }\n// else {\n// ImageIO.write(image, \"png\", output);\n// return true;\n// }\n ImageIO.write(image, \"png\", output);\n return true;\n }\n catch (Exception e){\n System.err.println(\"ERROR: Could not save file.\");\n return false;\n }\n }", "public void saveToFile(String filename)\r\n {\r\n String ftype=filename.substring(filename.lastIndexOf('.')+1);\r\n try\r\n {\r\n if(isReadyToSave)\r\n ImageIO.write(cropedEdited,ftype,new File(filename));\r\n }\r\n catch(IOException e)\r\n {\r\n System.out.println(\"Error in saving the file\");\r\n }\r\n }", "public void save(View view){\n if(shouldAskPermissions()) {\n askPermissions();\n }\n\n if(bitmap == null){\n bitmap = Bitmap.createBitmap(content.getWidth(), content.getHeight(), Bitmap.Config.RGB_565);\n }\n Canvas canvas = new Canvas(bitmap);\n try{\n //asking permissions for creating directory\n if(shouldAskPermissions()) {\n askPermissions();\n }\n\n FileOutputStream fileOutputStream = new FileOutputStream(currentPhotoPath);\n\n view.draw(canvas);\n\n String url = MediaStore.Images.Media.insertImage(getContentResolver(), bitmap, imgName, null);\n\n bitmap.compress(Bitmap.CompressFormat.JPEG, 90, fileOutputStream);\n fileOutputStream.flush();\n fileOutputStream.close();\n }catch (Exception e){\n e.printStackTrace();\n }\n }", "public void saveImage(String path, BufferedImage bufferedImage) throws FileNotFoundException, IOException {\r\n\t\tImageIO.write(bufferedImage, \"png\", new FileOutputStream(path));\r\n\t}", "public String saveBitmap(Bitmap bitmap){\n String imagePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM)+ \"/screenshot.png\";\n File mFile = new File(imagePath);\n FileOutputStream outputStream;\n try\n {\n outputStream = new FileOutputStream(mFile);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return imagePath;\n }", "private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }", "public void storeImage(Bitmap bitmap, String outPath) throws FileNotFoundException {\n FileOutputStream os = new FileOutputStream(outPath);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, os);\n }", "private boolean savePicture(Mesero pictureInfo) {\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG,\"The system was not ready. No external media\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t/** Now, let's do the heavy lifting */\r\n\t\t//YAY! http://stackoverflow.com/questions/649154/save-bitmap-to-location\r\n\t\tFileOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tout = new FileOutputStream(new File(directory,pictureInfo.getName()));\r\n\t\t\tpictureInfo.getBitmap().compress(Bitmap.CompressFormat.JPEG, 100, out);\r\n\t\t\t\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tLog.e(TAG,\"Unable to save file \"+pictureInfo.getName(),e);\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(out!=null) out.close();\r\n\t\t\t} catch(IOException ioe) {\r\n\t\t\t\tioe.printStackTrace();\r\n\t\t\t\tLog.e(TAG,\"Unable to close file \"+pictureInfo.getName(),ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public static void flushImageCache() {\n // Only clear this as normally it will be at least an order of magnitude greater than the\n // other maps used for caching images.\n rotatedImages.clear();\n }", "public boolean savePicture(){\n String path = MediaStore.Images.Media.insertImage(getContentResolver(),\n ((BitmapDrawable)PicSingleton.getInstance().getPicShaped()).getBitmap(),\n \"pichsape\"+ System.currentTimeMillis(),\n \"PicShape\");\n\n if(path != null) return true;\n\n return false;\n }", "public boolean save() {\n\t\treturn save(_file);\n\t}", "public void saveImage(MultipartFile imageFile) throws IOException {\n\t\tlogger.info(\"ComicDetail ID is \"+imageFile.getOriginalFilename());\r\n\t\tString folder=\"/images/comiccover\";\r\n\t\tbyte[] bytes = imageFile.getBytes();\r\n\t\tlogger.info(\"ComicDetail ID is \"+imageFile.getOriginalFilename());\r\n\t\t//Path path = Paths.get(folder+imageFile.getOriginalFilename());\r\n\t\r\n\t\t//Files.write(path, bytes);\r\n\t}", "private File createImageFile() throws IOException\n {\n String timeStamp = new SimpleDateFormat(\"yyyymmddHHmmss\").format(new Date());\n String imageFileName = timeStamp;\n File image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n userCacheDir /* directory */\n );\n\n // Save a file: path for use with ACTION_VIEW intents\n return image;\n }", "private String storeImage(Bitmap imageData) {\n // get path to external storage (SD card)\n String filePath = null;\n if (imageData != null) {\n\n\n try {\n //boolean s = sdIconStorageDir.mkdirs();\n filePath = Environment.getExternalStorageState()\n + System.currentTimeMillis() + \".jpg\";\n Log.d(\"Donde\", filePath);\n FileOutputStream fileOutputStream = new FileOutputStream(\n filePath);\n\n BufferedOutputStream bos = new BufferedOutputStream(\n fileOutputStream);\n\n // choose another format if PNG doesn't suit you\n imageData.compress(Bitmap.CompressFormat.JPEG, 0, bos);\n\n bos.flush();\n bos.close();\n return filePath;\n } catch (IOException e) {\n return \"fail\";\n }\n } else {\n return \"fail\";\n }\n\n }", "private File createImageFile() {\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n String imageFileName = \"JPEG_\" + timeStamp + \"_\";\n //File storageDir = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File storageDir = new File(utils.getSentImagesDirectory());\n\n File image = null;\n try {\n image = File.createTempFile(\n imageFileName, /* prefix */\n \".jpg\", /* suffix */\n storageDir /* directory */\n );\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n // Save a file: path for use with ACTION_VIEW intents\n //LOG.info(\"test place3\");\n try {\n imageFilePath = image.getAbsolutePath();\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n //LOG.info(\"test place4\");\n if (image == null) {\n LOG.info(\"image file is null\");\n } else {\n LOG.info(\"image file is not null path is:\" + imageFilePath);\n }\n return image;\n }", "public String saveimage(Bitmap bmp, String file_name) {\n String path = null;\n File filepath = Environment.getExternalStorageDirectory();\n OutputStream output;\n // Create a new folder in SD Card\n\n File dir = new File(filepath.getAbsolutePath()\n + \"/JVHUB/\");\n if (dir.exists() && dir.isDirectory()) {\n // do something here\n\n\n // Create a name for the saved image\n String timeStamp = \"JVHUB_pic\";\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"yyyyMMdd_HH_mm_ss\");\n String currentTimeStamp = dateFormat.format(new Date());\n File file = new File(dir, currentTimeStamp + \".png\");\n\n // Show a toast message on successful save\n\n try {\n\n output = new FileOutputStream(file);\n path = file.getAbsolutePath();\n\n // Compress into png format image from 0% - 100%\n bmp.compress(Bitmap.CompressFormat.PNG, 100, output);\n output.flush();\n output.close();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n } else {\n dir.mkdirs();\n String timeStamp = \"JVHUB_pic\";\n File file = new File(dir, timeStamp + \".png\");\n\n // Show a toast message on successful save\n\n try {\n\n output = new FileOutputStream(file);\n path = file.getAbsolutePath();\n\n // Compress into png format image from 0% - 100%\n bmp.compress(Bitmap.CompressFormat.PNG, 100, output);\n output.flush();\n output.close();\n } catch (Exception e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return path;\n }", "public void save() throws Exception {\n // create a File object for the output file\n File outputFile = new File(MinuteUpdater.mapDir, this.fileName);\n // outputFile.mkdirs();\n outputFile.createNewFile();\n FileOutputStream fileOutputStream = new FileOutputStream(outputFile);\n ObjectOutputStream objectOutputStream = new ObjectOutputStream(fileOutputStream);\n\n objectOutputStream.writeObject(this);\n objectOutputStream.close();\n }", "private void saveImage(BufferedImage newImg, String fileName)\n {\n\n File imageFile = new File(fileName+\".jpg\");\n try\n {\n ImageIO.write(newImg,\"jpg\",imageFile);\n }\n catch (IOException e)\n {\n System.out.println(fileName+\" not saved\"+e);\n }\n\n }", "public void saveImagePanel() throws IOException, ClassNotFoundException {\n\t\tFile archiveImage = null;\n\t\tarchiveImage = new File(\"CAMBIAR NOMBRE \");\n\t\tfile_chooser.setSelectedFile(archiveImage);\n\t\tif (file_chooser.showDialog(null, \"Guardar\") == JFileChooser.APPROVE_OPTION) {\n\t\t\tarchiveImage = file_chooser.getSelectedFile();\n\t\t\tif (archiveImage.getName().endsWith(\"jpg\") || archiveImage.getName().endsWith(\"png\")) {\n\t\t\t\t// realizar accion\n\t\t\t\tfileSeralization.saveFile(archiveImage);\n\t\t\t}\n\t\t}\n\t}", "private boolean saveObjectToFile(String filename,Object object) {\n //engine.logMessage(\"Saving new cache data to: \"+filename);\n ObjectOutputStream outputStream = null;\n try { \n File file=new File(filename);\n File directory=file.getParentFile();\n if (directory==null) throw new IOException(\"Cache directory error\");\n synchronized(this) { // synchronize this because the mkdirs will return false if the directory has been created by another Thread in the meantime\n if (!directory.exists()) {\n if (!directory.mkdirs()) throw new IOException(\"Unable to create cache directory: \"+directory.getAbsolutePath());\n }\n }\n outputStream = new ObjectOutputStream(new BufferedOutputStream(new FileOutputStream(file)));\n outputStream.writeObject(object);\n outputStream.close(); \n } catch (Exception e) {\n engine.logMessage(\"WARNING: Unable to store data in cache: \"+e.getMessage());\n return false;\n } finally {\n try {if (outputStream!=null) outputStream.close();} catch (Exception x) {engine.logMessage(\"SYSTEM WARNING: Unable to close ObjectOutputStream in cache: \"+x.getMessage());}\n } \n return true; \n }", "public void saveImage(File dir, Context c) {\r\n\r\n try {\r\n //finds file name that isn't used up\r\n File f;\r\n int i = 0;\r\n do {\r\n i++;\r\n f = new File(dir, \"Impressionist_\" + i + \".PNG\");\r\n } while (f.exists());\r\n //save the file\r\n FileOutputStream fos = new FileOutputStream(f);\r\n _offScreenBitmap.compress(Bitmap.CompressFormat.PNG, 90, fos);\r\n fos.close();\r\n //add it to the gallery\r\n FileUtils.addImageToGallery(f.getAbsolutePath(), c);\r\n //let the user know where it is saved\r\n Toast.makeText(c, \"Saved to \" + f.getAbsolutePath(), Toast.LENGTH_SHORT).show();\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "public void save()\n\t{\n\t\ttry\n\t\t{\n\t\t\tgetConnection().commit();\n\t\t\tgetPreparedStatement(\"SET FILES SCRIPT FORMAT COMPRESSED\").execute();\n\t\t\t// causes a checkpoint automatically.\n\t\t} catch (SQLException e)\n\t\t{\n\t\t\tm_logger.error(\"Couldn't cleanly save.\", e);\n\t\t}\n\t}", "public void savePicture() {\n\t\tLog.d(TAG, \"savePicture\");\n\t\t\n\t\tFile cropFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + \"/Lente/crop.jpg\");\n\t\tmCropView.setDrawingCacheEnabled(true);\n\t\tBitmap bm = Bitmap.createBitmap(mCropView.getDrawingCache());\n\t\tmCropView.setDrawingCacheEnabled(false);\n\t\t\n\t\ttry {\n\t\t FileOutputStream outputStream = new FileOutputStream(cropFile);\n\t\t Log.d(TAG, \"Compressing and saving...\");\n\t\t bm.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n\t\t outputStream.flush();\n\t\t outputStream.close();\n\t\t \n\t\t MediaScannerConnection.scanFile(getBaseContext(),\n\t new String[] { cropFile.toString() }, null,\n\t new MediaScannerConnection.OnScanCompletedListener() {\n\t public void onScanCompleted(String path, Uri uri) {\n\t Log.i(\"ExternalStorage\", \"Scanned \" + path + \":\");\n\t Log.i(\"ExternalStorage\", \"-> uri=\" + uri);\n\t //passUri(uri); //Pass the URI once obtained and move onto OCRopus\n\t }\n\t\t\t});\n\t }\n\t\t\n\t\tcatch (IOException e) {\n\t\t\tToast.makeText(ImageTextSelect.this, \"Failed to save selected image area.\", 2000).show();\n\t\t\tLog.e(TAG, \"IO Exception\");\n\t\t}\n\t}", "public boolean saveImage(String _element) {\r\n\t\tGregorianCalendar cal = new GregorianCalendar();\r\n\t\tDecimalFormat format = org.opensourcephysics.numerics.Util.newDecimalFormat(\"00\");\r\n\t\tString date = cal.get(Calendar.YEAR) + \"\" + format.format(cal.get(Calendar.MONTH)) + \"\"\r\n\t\t\t\t+ format.format(cal.get(Calendar.DATE)) + \"_\" + format.format(cal.get(Calendar.HOUR_OF_DAY)) + \"\"\r\n\t\t\t\t+ format.format(cal.get(Calendar.MINUTE)) + \"\" + format.format(cal.get(Calendar.SECOND));\r\n\t\treturn saveImage(getClassname() + \"_\" + date + \".jpg\", _element);\r\n\t}", "private void updateImageFile() throws FileNotFoundException {\n \t\tfinal PrintWriter out = new PrintWriter(asciiImageFile);\n \t\tout.print(asciiImage(false));\n \t\tout.close();\n \t}", "@Override\n protected void onPostExecute(Bitmap bitmap) {\n if (isCancelled()) {\n bitmap = null;\n }\n\n addBitmapToCache(url, bitmap);\n \n // write to cache file at the same time\n // Defect: Because transfer into bitmap, we can't save as GIF with transparent background\n // saveBitmapToCacheFile(url, bitmap);\n \n if (imageViewReference != null) {\n ImageView imageView = imageViewReference.get();\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n // Change bitmap only if this process is still associated with it\n // Or if we don't use any bitmap to task association (NO_DOWNLOADED_DRAWABLE mode)\n if ((this == bitmapDownloaderTask) || (mode != Mode.CORRECT)) {\n imageView.setImageBitmap(bitmap);\n }\n }\n }", "public void save() {\n JAXB.marshal(this, new File(fileName));\n }", "private void savePreviousRates() {\n\t\tFileInputStream fis = null;\n\t\tFileOutputStream fos = null;\n\t\t\n\t\ttry {\n\t\t\tfis = openFileInput(getResString(R.string.INTERNAL_STORAGE_CACHE));\n\t\t\t\n\t\t\tByteArrayOutputStream baos = new ByteArrayOutputStream(1024);\n\t\t\tbyte[] buffer = new byte[1024];\n\t\t\tint read = -1;\n\t\t\twhile( (read = fis.read(buffer) ) != -1 ) {\n\t\t\t\tbaos.write(buffer, 0, read);\n\t\t\t}\n\t\t\tbaos.close();\n\t\t\tfis.close();\n\n\t\t\t// write to old rates cache\n\t\t\tfos = openFileOutput(getResString(R.string.PREVIOUS_INTERNAL_STORAGE_CACHE), MODE_PRIVATE);\n\t\t\tbaos.writeTo(fos);\n\t\t\tfos.close();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tLog.e(TAG, \"Error saving previous rates!\");\n\t\t}\n\t\tfinally {\n\t\t\ttry { if ( fis != null ) fis.close(); } catch (IOException e) { }\n\t\t\ttry { if ( fos != null ) fos.close(); } catch (IOException e) { }\n\t\t}\n\t}", "public static void saveBitmapToPath(Bitmap bitmap, String imagePath) {\n FileOutputStream out = null;\n File file = new File(imagePath);\n if (file.getParentFile().exists() == false) {\n file.getParentFile().mkdirs();\n }\n try {\n out = new FileOutputStream(imagePath);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);\n out.flush();\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n if (out != null) out.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }", "public void saveAs() {\n MimsJFileChooser fileChooser = new MimsJFileChooser(ui);\n fileChooser.setSelectedFile(new File(ui.getLastFolder(), ui.getImageFilePrefix() + \".png\"));\n ResourceBundle localizationResources = ResourceBundleWrapper.getBundle(\"org.jfree.chart.LocalizationBundle\");\n ExtensionFileFilter filter = new ExtensionFileFilter(\n localizationResources.getString(\"PNG_Image_Files\"), \".png\");\n fileChooser.addChoosableFileFilter(filter);\n fileChooser.setFileFilter(filter);\n int option = fileChooser.showSaveDialog(chartpanel);\n if (option == MimsJFileChooser.APPROVE_OPTION) {\n String filename = fileChooser.getSelectedFile().getPath();\n if (!filename.endsWith(\".png\")) {\n filename = filename + \".png\";\n }\n try {\n ChartUtils.saveChartAsPNG(new File(filename), chartpanel.getChart(), getWidth(), getHeight());\n } catch (IOException ioe) {\n IJ.error(\"Unable to save file.\\n\\n\" + ioe.toString());\n }\n }\n }", "@Override\n\tpublic void save(Photo photo) {\n\t\t\n\t}", "public void write(File path) throws IOException{\n\t\tif(this.picture != null){ // in cazul in care poza are continut null se arunca exceptie\n\t\t\t//File output = new File(path);\n\t\t\tImageIO.write(zoomed,\"bmp\",path);\n\t\t\tSystem.out.println(path);\n\t\t\tSystem.out.println(\"\\nS-a scris in fisier cu succes\");\n\t\t}\n\t}", "@Override\n\tpublic void saveImage(Image image) {\n\t\tnew ImageDaoImpl().saveImage(image);\n\t}", "private boolean setImage(BufferedImage image, File file, String ext) {\n try {\n file.delete(); // delete resources used by the File\n ImageIO.write(image, ext, file);\n return true;\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"File could not be saved!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "private static void putInCache(final String key, final Bitmap bitmap) {\n\n\t\tBufferedOutputStream output = null;\n\n\t\ttry {\n\n\t\t\t// trying to get the desired file form cache directory.\n\t\t\tFile cacheFile = null;\n\t\t\tif (Constants.CACHE_DIR_PATH.endsWith(\"/\")) {\n\t\t\t\tcacheFile = new File(Constants.CACHE_DIR_PATH + key);\n\t\t\t} else {\n\t\t\t\tcacheFile = new File(Constants.CACHE_DIR_PATH + \"/\" + key);\n\t\t\t}\n\t\t\t// no need to save the file if already exists. so return\n\t\t\tif (cacheFile.exists())\n\t\t\t\treturn;\n\n\t\t\t// copies the bitmap data into the file in cache directory.\n\t\t\toutput = new BufferedOutputStream(new FileOutputStream(cacheFile),\n\t\t\t\t\tBUFFER_SIZE);\n\t\t\tbitmap.compress(Bitmap.CompressFormat.PNG, 100, output);\n\n\t\t\tcacheFile = null;\n\n\t\t\tFile weededOut = getWeededOut();\n\n\t\t\tif (weededOut != null) {\n\n\t\t\t\tweededOut.delete();\n\t\t\t}\n\t\t\tweededOut = null;\n\n\t\t} catch (FileNotFoundException e) {\n\n\t\t} finally {\n\t\t\tif (output == null) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\ttry {\n\t\t\t\toutput.close();\n\t\t\t\toutput = null;\n\t\t\t} catch (IOException e) {\n\n\t\t\t}\n\t\t}\n\n\t}", "@Override\r\n\tpublic Image save(Image model) throws PersistenceException {\n\t\treturn null;\r\n\t}", "public void saveActions()\r\n {\r\n\t imageCopy[0] = bufferedImage;\r\n\t imageCopy[1] = edited;\r\n\t imageCopy[2] = cropedPart;\r\n\t imageCopy[3] = bufferedImage;\r\n\t \r\n\t statesCopy[0] = isBlured;\r\n\t statesCopy[1] = isReadyToSave;\r\n\t statesCopy[2] = isChanged;\r\n\t statesCopy[3] = isInverted;\r\n\t statesCopy[4] = isRectangularCrop;\r\n\t statesCopy[5] = isCircularCrop;\r\n\t statesCopy[6] = isImageLoaded;\r\n\t \r\n }", "public Bitmap processCapturedImage(Intent intentData){\n Bitmap processedImage = (Bitmap) intentData.getExtras().get(\"data\");\n ByteArrayOutputStream bytes = new ByteArrayOutputStream();\n processedImage.compress(Bitmap.CompressFormat.JPEG, 90, bytes);\n File destination = new File(Environment.getExternalStorageDirectory(),\n System.currentTimeMillis() + \".jpg\");\n FileOutputStream fo;\n try {\n destination.createNewFile();\n fo = new FileOutputStream(destination);\n fo.write(bytes.toByteArray());\n fo.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return processedImage;\n }", "@FXML\r\n void btnSave(ActionEvent event) throws IOException {\r\n \tdos.writeInt(server.ServerConstants.DRAW_SAVE);\r\n \tString fileName = \"D://image/snapshot\" + new Date().getTime() + \".png\";\r\n \tFile file = new File(fileName);\r\n \tWritableImage writableImage = new WritableImage(768, 431);\r\n canvas.snapshot(null, writableImage);\r\n RenderedImage renderedImage = SwingFXUtils.fromFXImage(writableImage, null);\r\n ImageIO.write(renderedImage, \"png\", file);\r\n \r\n OutputStream outputStream = client.getOutputStream();\r\n FileInputStream fileInputStream = new FileInputStream(file);\r\n byte[] buf = new byte[1024];\r\n int length = 0;\r\n while((length = fileInputStream.read(buf))!=-1){\r\n \toutputStream.write(buf);\r\n }\r\n fileInputStream.close();\r\n }", "public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}", "public Save(BufferedImage image){\n\tthis.new_buff_image = image;\n }", "public static void cacheImage(final File file, ImageRequest imageCallback) {\n\n HttpURLConnection urlConnection = null;\n FileOutputStream fileOutputStream = null;\n InputStream inputStream = null;\n boolean isGif = false;\n\n try{\n // Setup the connection\n urlConnection = (HttpURLConnection) new URL(imageCallback.mUrl).openConnection();\n urlConnection.setConnectTimeout(ImageManager.LONG_CONNECTION_TIMEOUT);\n urlConnection.setReadTimeout(ImageManager.LONG_REQUEST_TIMEOUT);\n urlConnection.setUseCaches(true);\n urlConnection.setInstanceFollowRedirects(true);\n\n // Set the progress to 0\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 0);\n\n // Connect\n inputStream = urlConnection.getInputStream();\n\n // Do not proceed if the file wasn't downloaded\n if(urlConnection.getResponseCode()==404){\n urlConnection.disconnect();\n return;\n }\n\n // Check if the image is a GIF\n String contentType = urlConnection.getHeaderField(\"Content-Type\");\n if(contentType!=null){\n isGif = contentType.equals(GIF_MIME);\n }\n\n // Grab the length of the image\n int length = 0;\n try{\n String fileLength = urlConnection.getHeaderField(\"Content-Length\");\n if(fileLength!=null){\n length = Integer.parseInt(fileLength);\n }\n }catch(NumberFormatException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n\n // Write the input stream to disk\n fileOutputStream = new FileOutputStream(file, true);\n int byteRead = 0;\n int totalRead = 0;\n final byte[] buffer = new byte[8192];\n int frameCount = 0;\n\n // Download the image\n while ((byteRead = inputStream.read(buffer)) != -1) {\n\n // If the image is a gif, count the start of frames\n if(isGif){\n for(int i=0;i<byteRead-3;i++){\n if( buffer[i] == 33 && buffer[i+1] == -7 && buffer[i+2] == 4 ){\n frameCount++;\n\n // Once we have at least one frame, stop the download\n if(frameCount>1){\n fileOutputStream.write(buffer, 0, i);\n fileOutputStream.close();\n\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 100);\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n urlConnection.disconnect();\n return;\n }\n }\n }\n }\n\n // Write the buffer to the file and update the total number of bytes\n // read so far (used for the callback)\n fileOutputStream.write(buffer, 0, byteRead);\n totalRead+=byteRead;\n\n // Update the callback with the current progress\n if(length>0){\n imageCallback.sendProgressUpdate(imageCallback.mUrl, \n (int) (((float)totalRead/(float)length)*100) );\n }\n }\n\n // Tidy up after the download\n if (fileOutputStream != null){\n fileOutputStream.close();\n }\n\n // Sent the callback that the image has been downloaded\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n if (inputStream != null){\n inputStream.close();\n }\n\n // Disconnect the connection\n urlConnection.disconnect();\n } catch (final MalformedURLException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n } catch (final IOException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n }\n\n }", "public static boolean saveImage(\n Context context, \n CameraCharacteristics characteristics, \n CaptureResult captureResult, \n Image image, \n File file, \n boolean use_storage) {\n\n DngCreator dngCreator = new DngCreator(characteristics, captureResult);\n\n boolean is_error = false;\n FileOutputStream output = null;\n try {\n output = new FileOutputStream(file);\n dngCreator.writeImage(output, image);\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n image.close();\n }\n\n try {\n if (output != null) output.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if(use_storage ) {\n FileUtil.scanFile(context, file);\n }\n\n return !is_error;\n\n}", "public boolean saveImage() {\n try {\n //Save the modified image\n iEXIF.setAttribute(ExifInterface.TAG_DATETIME, ((TextView) findViewById(R.id.image_date_taken)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_MAKE, ((TextView) findViewById(R.id.image_camera)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_APERTURE, ((TextView) findViewById(R.id.image_lens)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_EXPOSURE_TIME, ((TextView) findViewById(R.id.image_exposure)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_FLASH, ((TextView) findViewById(R.id.image_flash)).getText().toString());\n iEXIF.setAttribute(ExifInterface.TAG_FOCAL_LENGTH, ((TextView) findViewById(R.id.image_focal_length)).getText().toString());\n\n if (posMarker != null) {\n\n TextView latitude = (TextView) findViewById(R.id.image_latitude);\n TextView longitude = (TextView) findViewById(R.id.image_longitude);\n\n //Use text view values instead of posMarker values\n String lat = toDMS(posMarker.getPosition().latitude);\n String lon = toDMS(posMarker.getPosition().longitude);\n\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LATITUDE, lat);\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LONGITUDE, lon);\n\n if (posMarker.getPosition().latitude > 0) {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, \"N\");\n } else {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LATITUDE_REF, \"S\");\n }\n\n if (posMarker.getPosition().longitude > 0) {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, \"E\");\n } else {\n iEXIF.setAttribute(ExifInterface.TAG_GPS_LONGITUDE_REF, \"W\");\n }\n }\n iEXIF.saveAttributes();\n View coordLayout = findViewById(R.id.main_content);\n Snackbar successSnackbar = Snackbar.make(coordLayout, R.string.photo_save_success_text, Snackbar.LENGTH_SHORT);\n successSnackbar.show();\n\n ViewGroup mapGroup = (ViewGroup) findViewById(R.id.map);\n int count = mapGroup.getChildCount();\n\n return true;\n } catch (Exception e) {\n return false;\n }\n }", "private void saveCacheKey(String key){\n \n if (!saveCacheKeys)\n return;\n \n String cacheKey = VolleyUtils.BitmapCache.getCacheKey(builder, key, 0, 0);\n if (!cacheKeys.contains(cacheKey))\n cacheKeys.add(cacheKey);\n }", "public boolean saveImage(String _filename, String _element) {\r\n\t\tif (view == null)\r\n\t\t\treturn false;\r\n\t\tControlElement ctrlEl = view.getElement(_element);\r\n\t\tif (ctrlEl == null) {\r\n\t\t\tSystem.err.println(\"Component not found: \" + _element);\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tComponent comp = ctrlEl.getComponent();\r\n\t\treturn SnapshotTool.getTool().saveImage(_filename, comp, null);\r\n\t}" ]
[ "0.6757615", "0.67500985", "0.6649376", "0.6573707", "0.6485126", "0.64741206", "0.64530355", "0.640463", "0.63758415", "0.635048", "0.6345326", "0.6315373", "0.6312461", "0.6273598", "0.62461436", "0.62366056", "0.6235663", "0.62013036", "0.61825335", "0.616924", "0.61446214", "0.60789144", "0.60547435", "0.6049206", "0.6024106", "0.60090065", "0.60064673", "0.6003579", "0.6000209", "0.5999459", "0.5979772", "0.5976634", "0.59755903", "0.5970052", "0.5964433", "0.59631026", "0.5931382", "0.5929411", "0.5926259", "0.5908685", "0.5907541", "0.5899778", "0.58898485", "0.5850684", "0.5843922", "0.58353937", "0.58288425", "0.5824888", "0.5810319", "0.5791941", "0.5776908", "0.5772973", "0.5764648", "0.5763419", "0.57464874", "0.57455885", "0.57371974", "0.5732712", "0.57324874", "0.5729106", "0.57277757", "0.5724215", "0.57147586", "0.5708384", "0.57071584", "0.56817156", "0.5671928", "0.56594926", "0.56592625", "0.5655381", "0.56552154", "0.5647327", "0.56274664", "0.56201863", "0.56119484", "0.5607317", "0.5606472", "0.5590434", "0.55897033", "0.55821145", "0.5582046", "0.55734074", "0.5572994", "0.55702066", "0.5568749", "0.5567022", "0.5561212", "0.5555946", "0.5551754", "0.55444074", "0.5539906", "0.55246735", "0.55231404", "0.55195653", "0.55192345", "0.5514904", "0.55131805", "0.5503509", "0.55031544", "0.5498637" ]
0.58238494
48
When fail to cache the photo, and an exception is thrown from any reason. we just notify the user (UI message).
@Override public void onError(@NonNull Exception e) { if (e instanceof InterruptedException || e instanceof ExecutionException) { Toast.makeText(context, "Something wrong while caching the photo", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show(); } notifyAfterDownloadingProgress(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "void onPhotoError();", "private void onTakePhotoFailed() {\n final String errorMessage = getString(R.string.photo_error_message);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(CameraActivity.this, errorMessage, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\r\n \tpublic void onCacheFailure(int modelId) {\n \t\tserviceManager.callModelInformationService(modelId, this);\r\n \t}", "@Override\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n final String changedUrl = official.getPhotoURL().replace(\"http:\", \"https:\");\n picasso.load(changedUrl)\n .error(R.drawable.brokenimage)\n .placeholder(R.drawable.placeholder)\n .into(imageView);\n }", "private void getPic(final CacheHolder cacheHolder, final CacheImage imageInfo) {\n String fileName = cacheHolder.getCode() + \"_\" + imageInfo.getURL().substring(imageInfo.getURL().lastIndexOf('/') + 1);\n fileName = Common.ClearForFileName(fileName).toLowerCase();\n final String target = MainForm.profile.dataDir + fileName;\n imageInfo.setFilename(fileName);\n try {\n File ftest = new File(target);\n if (ftest.exists()) {\n if (ftest.length() == 0) {\n ftest.delete();\n }\n else {\n cacheHolder.getDetails().getImages().add(imageInfo);\n }\n }\n else {\n if (downloadPics) {\n UrlFetcher.fetchDataFile(imageInfo.getURL(), target);\n ftest = new File(target);\n if (ftest.exists()) {\n if (ftest.length() > 0) {\n cacheHolder.getDetails().getImages().add(imageInfo);\n }\n else {\n ftest.delete();\n }\n }\n }\n }\n }\n catch (final IOException e) {\n String ErrMessage;\n String wp, n;\n if (cacheHolder != null && cacheHolder.getCode() != null)\n wp = cacheHolder.getCode();\n else\n wp = \"WP???\";\n if (cacheHolder != null && cacheHolder.getName() != null)\n n = cacheHolder.getName();\n else\n n = \"name???\";\n\n String m;\n try {\n m = e.getMessage();\n if (m == null)\n m = \"\";\n }\n catch (Exception e2) {\n m = \"\";\n }\n\n if (m.length() == 0)\n ErrMessage = \"Ignoring error: OCXMLImporter.getPic: IOExeption == null, while downloading picture: \" + fileName + \" from URL:\" + imageInfo.getURL();\n else {\n if (m.equalsIgnoreCase(\"could not connect\") || m.equalsIgnoreCase(\"unkown host\")) {\n // is there a better way to find out what happened?\n ErrMessage = MyLocale.getMsg(1618, \"Ignoring error in cache: \") + n + \" (\" + wp + \")\" + MyLocale.getMsg(1619, \": could not download image from URL: \") + imageInfo.getURL();\n }\n else {\n ErrMessage = MyLocale.getMsg(1618, \"Ignoring error in cache: \") + n + \" (\" + wp + \"): ignoring IOException: \" + m + \" while downloading picture:\" + fileName + \" from URL:\" + imageInfo.getURL();\n }\n }\n inf.addWarning(ErrMessage);\n Preferences.itself().log(ErrMessage, e, true);\n }\n }", "@Override\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n final String changedUrl = photoUrl.replace(\"http:\", \"https:\");\n picasso.load(changedUrl)\n .error(R.drawable.brokenimage)\n .placeholder(R.drawable.holder)\n .into(imageTV);\n\n }", "@Override\n public void onAlreadySaved(@NonNull PhotoCache photoCache) {\n Toast.makeText(context, \"The file already exist in:\\n\" +\n DEFAULT_PATH, Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(f.getItemImage())\n .error(R.drawable.placeholder)\n .into(foodItemHolder.imageView, new Callback() {\n @Override\n public void onSuccess() {\n Log.d(\"IMAGE LOAD\", \"LOADED FROM INTERNET\");\n }\n\n @Override\n public void onError() {\n Log.v(\"Picasso\",\"Could not fetch image\");\n }\n });\n }", "private void onPhotoError() {\n ToastModifications.createToast(this, getString(R.string.error_saving_photo), Toast.LENGTH_LONG);\n }", "@Override\n public void failure(int rc, Object error)\n {\n task.setReadPoolSelectionContext(getReply().getContext());\n switch (rc) {\n case CacheException.OUT_OF_DATE:\n /* Pool manager asked for a\n * refresh of the request.\n * Retry right away.\n */\n retry(task, 0);\n break;\n case CacheException.FILE_NOT_IN_REPOSITORY:\n case CacheException.PERMISSION_DENIED:\n fail(task, rc, error.toString());\n break;\n default:\n /* Ideally we would delegate the retry to the door,\n * but for the time being the retry is dealed with\n * by pin manager.\n */\n retry(task, RETRY_DELAY);\n break;\n }\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(StudententryActivity.this, \"Image Not Set. Please Try Again....\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\r\n public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {\n final String changedUrl = bean.getArticle_urlToImage().replace(\"http:\", \"https:\");\r\n picasso.load(changedUrl).error(R.drawable.brokenimage)\r\n .placeholder(R.drawable.placeholder)\r\n .into(imgNewsArticleImage);\r\n }", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(profileModel.getDriverPhoto())\n .error(R.drawable.profile)\n .resize(0, 200)\n .into(driverImg, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n Log.v(\"Picasso\",\"Could not fetch image\");\n }\n });\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n Toast.makeText(context, \"Image process failed\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Picasso.get().load(\"https://media.wired.com/photos/5b17381815b2c744cb650b5f/master/w_1164,c_limit/GettyImages-134367495.jpg\").into(image);\n }", "private void onFailImageTransfer()\n {\n Log.d(TAG, \"onFailImageTransfer: finished.\");\n this.fragmentActivity.runOnUiThread(() -> Toast.makeText(this.fragmentActivity,\n \"Image transfer failed\", Toast.LENGTH_SHORT).show());\n\n switchToPickLayout();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n //Muestra un Snackbar informando al usuaario del error\n Snackbar.make(ivFotoPerfil,\"Error al subir la imagen al servidor: \"\n + e.getMessage(),\n Snackbar.LENGTH_LONG).show();\n }", "public void onImageDownloadError() {\n this.mDownloadInfoTextView.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(getContext(), R.drawable.ic_error), (Drawable) null, (Drawable) null, (Drawable) null);\n this.mDownloadInfoTextView.setCompoundDrawablePadding(getContext().getResources().getDimensionPixelOffset(R.dimen.common_padding_3));\n this.mDownloadInfoTextView.setTextColor(ContextCompat.getColor(getContext(), R.color.share_error_text_color));\n this.mDownloadInfoTextView.setText(R.string.save_failed);\n this.mContentInfoTextView.setText(R.string.retry_save_images);\n this.mChannelContainer.setVisibility(8);\n }", "private void loadImage(){\n Log.d(getString(R.string.app_name), \"photoURL: \" + photoURL);\n String hash = photoURL.substring(0, photoURL.lastIndexOf(\".\"));\n try {\n MessageDigest md = MessageDigest.getInstance(\"MD5\");\n md.update(hash.getBytes());\n hash = bytesToHex(md.digest());\n } catch (NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n// File cachedFile = new File(getCacheDir(), photoURL.substring(0, photoURL.lastIndexOf(\".\")));\n File cachedFile = new File(getCacheDir(), hash);\n if(cachedFile.exists()) {\n //load image from cache\n Glide.with(getApplicationContext())\n .load(cachedFile)\n .diskCacheStrategy(DiskCacheStrategy.NONE)\n// .crossFade()\n .into(picture);\n// TileBitmapDrawable.attachTileBitmapDrawable(picture, getCacheDir() + \"/\" + photoURL.split(\"\\\\.\")[0], null, null);\n setupPictureClickListener();\n\n postImageLoaded();\n } else {\n //download image\n setupReloadButtonListener();\n initImageLoader();\n }\n }", "@Override\n public void onError() {\n Picasso.with(context)\n .load(uri).fit().centerCrop()\n .placeholder(R.drawable.ic_menu_gallery)\n .error(R.drawable.ic_menu_gallery)\n .into(imageView);\n }", "public void run() {\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }", "public void mailStoreRequestFailed(MailStoreRequest request, Throwable exception, boolean isFinal) {\n endFolderRefreshOperation(false);\r\n }", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(),\"Imagens não serão baixadas.\",Toast.LENGTH_SHORT).show();\n }", "private void onProfileRefreshFail() {\n loadingBar.hideBoth();\n Toast.makeText(this, \"Failed to load profile\", Toast.LENGTH_SHORT)\n .show();\n\n swipeRefreshLayout.setRefreshing(false);\n ProfileCache.setUserCached(userId, false);\n }", "@Override\n public void onSavingFailed(@NonNull IOException e) {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "@Override\r\n public void onFailure(Call call, IOException e) {\n closeNetworkCacheCardView();\r\n showErrorCardView(ACCESS_TIMEOUT);\r\n lockPayNowOrHavePayButton(ACCESS_TIMEOUT);\r\n }", "@Override\n public void onError() {\n Picasso.with(getApplicationContext())\n .load(images[pos])\n .error(R.drawable.downloderror)\n .placeholder(R.drawable.epaper_error)\n .into(imageView, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n\n }\n });\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n StorageReference storageRef = ref.child(DEFAULT_IMAGE_PATH);\n\n storageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(@NonNull Uri uri) {\n // If we are successful, return the default image\n HashMap<String, Object> callback = new HashMap<>();\n callback.put(\"uri\", uri);\n observer.notifyOfCallback(callback);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // If we fail, something is wrong and we cannot do anything about it\n // return an empty Uri\n HashMap<String, Object> callback = new HashMap<>();\n callback.put(\"uri\", Uri.EMPTY);\n observer.notifyOfCallback(callback);\n e.printStackTrace();\n }\n });\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void onFail(String msg) {\n\t\t\t\t\t\t\t\tToast.makeText(PhotoImagePagerActivity.this, \"服务器错误\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "@Override\r\n\tpublic void onFetchFailure(String msg) {\n\t}", "@Override\n public void onError(Exception e) {\n Picasso.get()\n .load(data.getString(INDEX_MOVIE_POSTER_PATH))\n .placeholder(R.drawable.user_placeholder)\n .error(R.drawable.user_placeholder_error)\n .into(mImageDetail);\n }", "@Override\n public void onFetchFailure(String msg) {\n if(dialog != null) dialog.dismiss();\n // show failure message\n Toast.makeText(this, msg, Toast.LENGTH_LONG).show();\n }", "@Override\n\t\t\t\t\t\tpublic void failed() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载失败\");\n\t\t\t\t\t\t}", "@Override\n public void BitmapDownloadFailedWithError(MessageObj response)\n {\n }", "public synchronized void setPictureFromCache() {\n Runnable run = new Runnable() {\n @Override\n public void run() {\n File file = new File(context.getExternalFilesDir(null), pictureName);\n if (file != null) {\n Bitmap myBitmap = BitmapFactory.decodeFile(file.getAbsolutePath());\n if (imageView != null) {\n //imageView.setImageDrawable(new BitmapDrawable(null, myBitmap));\n new ResizeImage(imageView, file.getAbsolutePath()).setImageView();\n }\n }\n }\n };\n new Handler(context.getMainLooper()).post(run);\n }", "@Override\n public void onError(Exception e) {\n Picasso.get().load(image)\n .placeholder(R.drawable.default_profile_picture)\n .resize(900, 900)\n .centerInside()\n .into(settingProfileImage);\n }", "public void mailStoreRequestFailed(MailStoreRequest request, Throwable exception, boolean isFinal) {\n folderMessageCache.commit();\r\n mailStoreServices.fireFolderMessagesAvailable(folderTreeItem, null, false);\r\n }", "@Override\n public void onFailure(Call call, IOException e) {\n listener.onDownloadFailed(MyApplication.getContext().getString(R.string.failure_please_try_again));\n }", "private void handleDownloadFailure(){\n Toast.makeText(this,\n \"Could not establish connection to service.\\n\" +\n \"Please check your internet connection and \\n\" +\n \"make sure internet permissions are granted.\",\n Toast.LENGTH_LONG\n ).show();\n }", "public CacheException(String message){\r\n\t\tsuper(message);\r\n\t}", "@Override\r\n\t\t\t\tpublic void onLoadFailed(PhotoView arg0, String arg1,\r\n\t\t\t\t\t\tDrawable arg2) {\n\t\t\t\t}", "@Override\n public void onErrorResponse(VolleyError error) {\n if (weakReference != null) {\n ImageView imageView = weakReference.get();\n if (imageView != null) {\n imageView.setImageResource(resId);\n }\n }\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] bytes, Throwable throwable) {\n mProgress.setVisibility(View.INVISIBLE);\n mStatus.setText(R.string.failure);\n mPhotoFile.delete();\n }", "public interface CacheValueComputationFailureHandler {\n public void onFailure(String key, Throwable e);\n}", "protected Image forceCaching(Image img) throws IOException {\n/* 221 */ if (img instanceof ImageRawStream) {\n/* 222 */ ImageRawStream raw = (ImageRawStream)img;\n/* 223 */ if (log.isDebugEnabled()) {\n/* 224 */ log.debug(\"Image is made cacheable: \" + img.getInfo());\n/* */ }\n/* */ \n/* */ \n/* 228 */ ByteArrayOutputStream baout = new ByteArrayOutputStream();\n/* 229 */ InputStream in = raw.createInputStream();\n/* */ try {\n/* 231 */ IOUtils.copy(in, baout);\n/* */ } finally {\n/* 233 */ IOUtils.closeQuietly(in);\n/* */ } \n/* 235 */ byte[] data = baout.toByteArray();\n/* 236 */ raw.setInputStreamFactory((ImageRawStream.InputStreamFactory)new ImageRawStream.ByteArrayStreamFactory(data));\n/* 237 */ return (Image)raw;\n/* */ } \n/* 239 */ return null;\n/* */ }", "public void requestImage(final ImageRequest request) {\n\n // If the request has no URL, abandon it\n if(request.mUrl==null){\n return;\n }\n\n // Create the image download runnable\n final ImageDownloadThread imageDownloadThread = new ImageDownloadThread(){\n\n public void run() {\n\n // Sleep the request for the specified time\n if(request!=null && request.mLoadDelay>0){\n try {\n Thread.sleep(request.mLoadDelay);\n } catch (InterruptedException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n File file = null;\n\n // If the URL is not a local reseource, grab the file\n if(!getUrl().startsWith(\"content://\")){\n\n // Grab a link to the file\n file = new File(getFullCacheFileName(mContext, getUrl()));\n\n // If the file doesn't exist, grab it from the network\n if (!file.exists()){\n cacheImage( file, request);\n } \n\n // Otherwise let the callback know the image is cached\n else if(request!=null){\n request.sendCachedCallback(getUrl(), true);\n }\n\n // Check if the file is a gif\n boolean isGif = isGif(getUrl());\n\n // If the file downloaded was a gif, tell all the callbacks\n if( isGif && request!=null ){\n request.sendGifCallback(getUrl());\n }\n }\n\n // Check if we should cache the image and the dimens\n boolean shouldCache = false;\n int maxWidth = MAX_WIDTH;\n int maxHeight = MAX_HEIGHT;\n if(request!=null){\n maxWidth = request.mMaxWidth;\n maxHeight = request.mMaxHeight;\n shouldCache = request.mCacheImage;\n }\n\n // If any of the callbacks request the image should be cached, cache it\n if(shouldCache && \n (request!=null&&request.mContext!=null)||request==null){\n\n // First check the image isn't actually in the cache\n Bitmap bitmap = get(getUrl());\n\n // If the bitmap isn't in the cache, try to grab it\n // Or the bitmap was in the cache, but is of no use\n if(bitmap == null){\n\n if(!getUrl().startsWith(\"content://\")){\n bitmap = decodeBitmap(file, maxWidth, maxHeight);\n }else{\n Uri uri = Uri.parse(getUrl());\n try{\n InputStream input = mContext.getContentResolver().openInputStream(uri);\n bitmap = BitmapFactory.decodeStream(input);\n input.close();\n }catch(FileNotFoundException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }catch(IOException e){\n if(DEBUG){\n e.printStackTrace();\n }\n }\n }\n\n // If we grabbed the image ok, add to the cache\n if(bitmap!=null){\n addEntry(getUrl(), bitmap);\n }\n }\n\n // Send the cached callback\n if(request!=null){\n request.sendCallback(getUrl(), bitmap);\n }\n }\n }\n };\n\n // Set the url of the request\n imageDownloadThread.setUrl(request.mUrl);\n\n // Set the creation time of the request\n imageDownloadThread.setCreated(request.mCreated);\n\n // Assign a priority to the request\n if(request.mImageListener==null){\n // If there is no image listener, assign it background priority\n imageDownloadThread.setPriority(BACKGROUND_PRIORITY);\n }else{\n // If there is an image listener, assign it UI priority\n imageDownloadThread.setPriority(UI_PRIORITY);\n }\n\n // If the new request is not a duplicate of an entry of the active and \n // task queues, add the request to the task queue\n if(!mTaskQueue.contains(imageDownloadThread) && \n !mActiveTasks.contains(imageDownloadThread)){\n mThreadPool.execute(imageDownloadThread);\n }\n\n // If the request is a duplicate, add it to the blocked tasks queue\n else{\n mBlockedTasks.add(imageDownloadThread);\n }\n }", "public void onUpdateFailure();", "public CacheException() {\r\n\t\tsuper();\r\n\t}", "public void handleNetworkException(WorkerChore chore, CallNetworkException e);", "@Override\n public void onServiceResult(int requestCode, int resultCode, Bundle data) {\n if( resultCode == Activity.RESULT_CANCELED){\n handleDownloadFailure();\n }\n }", "public void notifyFailedToLoad() {\n if (isEnabled()) {\n Toaster.showLong((Activity) getActivity(), (int) R.string.failed_to_retrieve_likes);\n }\n }", "@Override\r\n\tpublic void OnActivityResult(int requestCode, int ResultCode, Intent resultData)\r\n\t{\r\n\t\tif(requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK)\r\n\t\t{\r\n\t\t\tUri uri = null;\r\n\t\t\tif(resultData != null)\r\n\t\t\t{\r\n\t\t\t\turi = resultData.getData();\r\n\t\t\t\timagePlaceholder.setImageUri(null);\r\n\t\t\t\timagePlaceholder.setImageUri(uri);\r\n\t\t\t}\r\n else\r\n {\r\n //trow an exception and catch it with sentry\r\n\r\n }\r\n }\r\n\t}", "@Override\n public void BitmapDownloadSuccess(String photoId, String mealId)\n {\n\n refreshUI();\n }", "@Override\n public void onSaved(@NonNull PhotoCache photoCache) {\n\n boolean addStatus = localPhotosUtil.add(photoCache.getPhotoId(),\n photoCache.getFormatExtension());\n if (addStatus) {\n Toast.makeText(context, \"Successfully Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(context, \"Something wrong while adding to Downloads\",\n Toast.LENGTH_SHORT).show();\n }\n notifyAfterDownloadingProgress();\n }", "@Override\r\n\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\tToast.makeText(context, \"下载出错\", Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\t\t\t}", "void onFetchDataError(Throwable e);", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(s)\n .error(R.drawable.background_default)\n .placeholder(R.drawable.loading)\n .into(foodimageone, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n // vs.Icon.setImageResource(R.drawable.groupchat_icon_48dp);\n }\n });\n }", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(s)\n .error(R.drawable.background_default)\n .placeholder(R.drawable.loading)\n .into(viewHolder.profileimage, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n // vs.Icon.setImageResource(R.drawable.groupchat_icon_48dp);\n }\n });\n }", "private void notifyUploadFail() {\n numberOfFail++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public static void cancelCache()\n {\n try\n {\n HttpConnection httpConn = new HttpConnection(AppContext.getInstance().getCancelCacheUrl());\n httpConn.doPost(\"\");\n if (httpConn.getResponseCode() != HttpConnection.HTTP_RESPONSECODE_200_OK)\n {\n logger.error(\"error deleting cache\");\n }\n }\n catch (IOException ex)\n {\n logger.error(\"error deleting cache\", ex);\n }\n }", "@Override\n\t\tprotected void handleError(Context ctx, Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t// Retrieve data from cache\n\t Map<String, ?> movieTitles = ImageAdapter.this.mOwner.getSharedPreferences(TITLES, 0).getAll();\n\t ImageAdapter.this.mNumLoaded = 0;\n\t int movieCount = movieTitles.size();\n\t ImageAdapter.this.movies = new MovieData[movieCount];\n\t // Initialise app with cached data\n\t for (Map.Entry<String, ?> movieData : movieTitles.entrySet()) {\n\t \tImageAdapter.this.movies[ImageAdapter.this.mNumLoaded] = new MovieData(ImageAdapter.this.mOwner, movieData);\n\t \tImageAdapter.this.mNumLoaded++;\n\t }\n\t\t\tImageAdapter.this.notifyDataSetChanged();\n\t\t}", "public static void cacheImage(final File file, ImageRequest imageCallback) {\n\n HttpURLConnection urlConnection = null;\n FileOutputStream fileOutputStream = null;\n InputStream inputStream = null;\n boolean isGif = false;\n\n try{\n // Setup the connection\n urlConnection = (HttpURLConnection) new URL(imageCallback.mUrl).openConnection();\n urlConnection.setConnectTimeout(ImageManager.LONG_CONNECTION_TIMEOUT);\n urlConnection.setReadTimeout(ImageManager.LONG_REQUEST_TIMEOUT);\n urlConnection.setUseCaches(true);\n urlConnection.setInstanceFollowRedirects(true);\n\n // Set the progress to 0\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 0);\n\n // Connect\n inputStream = urlConnection.getInputStream();\n\n // Do not proceed if the file wasn't downloaded\n if(urlConnection.getResponseCode()==404){\n urlConnection.disconnect();\n return;\n }\n\n // Check if the image is a GIF\n String contentType = urlConnection.getHeaderField(\"Content-Type\");\n if(contentType!=null){\n isGif = contentType.equals(GIF_MIME);\n }\n\n // Grab the length of the image\n int length = 0;\n try{\n String fileLength = urlConnection.getHeaderField(\"Content-Length\");\n if(fileLength!=null){\n length = Integer.parseInt(fileLength);\n }\n }catch(NumberFormatException e){\n if(ImageManager.DEBUG){\n e.printStackTrace();\n }\n }\n\n // Write the input stream to disk\n fileOutputStream = new FileOutputStream(file, true);\n int byteRead = 0;\n int totalRead = 0;\n final byte[] buffer = new byte[8192];\n int frameCount = 0;\n\n // Download the image\n while ((byteRead = inputStream.read(buffer)) != -1) {\n\n // If the image is a gif, count the start of frames\n if(isGif){\n for(int i=0;i<byteRead-3;i++){\n if( buffer[i] == 33 && buffer[i+1] == -7 && buffer[i+2] == 4 ){\n frameCount++;\n\n // Once we have at least one frame, stop the download\n if(frameCount>1){\n fileOutputStream.write(buffer, 0, i);\n fileOutputStream.close();\n\n imageCallback.sendProgressUpdate(imageCallback.mUrl, 100);\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n urlConnection.disconnect();\n return;\n }\n }\n }\n }\n\n // Write the buffer to the file and update the total number of bytes\n // read so far (used for the callback)\n fileOutputStream.write(buffer, 0, byteRead);\n totalRead+=byteRead;\n\n // Update the callback with the current progress\n if(length>0){\n imageCallback.sendProgressUpdate(imageCallback.mUrl, \n (int) (((float)totalRead/(float)length)*100) );\n }\n }\n\n // Tidy up after the download\n if (fileOutputStream != null){\n fileOutputStream.close();\n }\n\n // Sent the callback that the image has been downloaded\n imageCallback.sendCachedCallback(imageCallback.mUrl, true);\n\n if (inputStream != null){\n inputStream.close();\n }\n\n // Disconnect the connection\n urlConnection.disconnect();\n } catch (final MalformedURLException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n } catch (final IOException e) {\n if (ImageManager.DEBUG){\n e.printStackTrace();\n }\n\n // If the file exists and an error occurred, delete the file\n if (file != null){\n file.delete();\n }\n\n }\n\n }", "@Override\n\tpublic void onNewsReceiveError() {\n\t\tsetProgressBarIndeterminateVisibility(false);\n\t\t// reset fetcher task\n\t\tmFetcherTask = null;\n\t}", "@Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n }", "@Override\n\t\t\tpublic void onFail() {\n\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t}", "@Override\n public void onResult(@NonNull PhotoCache photoCache) {\n saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this);\n fullPhotosCaching.put(photoCache.getPhotoId(), photoCache);\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n Log.i(\"update\", \"failed\");\n }", "@Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Snackbar.make(save, R.string.update_fail, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "public void procLoadFromFileThread() {\n try {\n\n do {\n /*----------Check Thread Interrupt----------*/\n Thread.sleep(1); if (!_running) break;\n /*------------------------------------------*/\n\n MemoryCacheEntry cacheEntry = _downloader.getMemCache().get(_cacheKey);\n\n if (cacheEntry!=null && cacheEntry.size()>0) {\n _cacheEntry = cacheEntry;\n _downloader.handleState(this, ImageDownloader.State.DOWNLOAD_SUCCESS);\n return;\n } else {\n _cacheEntry = null;\n }\n\n\n _isSuccess = false;\n\n _mutex.lock();\n if (_phoneAlbums!=null && _phoneAlbums.size()>0) {\n _isSuccess = true;\n } else {\n ImageManager.getPhoneAlbumInfo(SMDirector.getDirector().getActivity(), new ImageManager.OnImageLoadListener() {\n @Override\n public void onAlbumImageLoadComplete(ArrayList<PhoneAlbum> albums) {\n _isSuccess = true;\n _phoneAlbums = albums;\n// _cond.notify();\n synchronized (_this) {\n _this.notify();\n }\n }\n\n @Override\n public void onError() {\n synchronized (_this) {\n _this.notify();\n }\n// _cond.notify();\n }\n });\n\n synchronized (_this) {\n _this.wait();\n }\n\n// _cond.wait();\n }\n\n if (!_isSuccess || _phoneAlbums.size()==0) {\n Log.i(\"DT\", \"[[[[[ Failed to get Album list~\");\n _mutex.unlock();\n break;\n }\n\n /*----------Check Thread Interrupt----------*/\n Thread.sleep(1); if (!_running) break;\n /*------------------------------------------*/\n\n Bitmap bmp = getPhotoImage(_requestPath);\n if (bmp==null) {\n Log.i(\"DT\", \"[[[[[ Failed to get Album list~\");\n _mutex.unlock();\n break;\n }\n\n _imageEntry = ImageCacheEntry.createEntry(bmp);\n _mutex.unlock();\n\n _downloader.handleState(this, ImageDownloader.State.DECODE_SUCCESS);\n _cacheEntry = null;\n return;\n } while (false);\n\n\n } catch (InterruptedException e) {\n\n }\n\n _cacheEntry = null;\n _downloader.handleState(this, ImageDownloader.State.DOWNLOAD_FAILED);\n }", "@Override\n\t\tpublic boolean onException(Exception arg0, T arg1,\n\t\t\t\tTarget<GlideDrawable> arg2, boolean arg3) {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\t\tpublic void onNetworkError() {\n\n\t\t\t}", "@Override\n protected void onPostExecute(Bitmap result) {\n progressBar.setVisibility(View.INVISIBLE);\n if(result!=null)\n imageView.setImageBitmap(result);\n else\n Toast.makeText(DisplayItem.this, \"Image Does Not exist or Network Error\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n if (progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n\n showErrorMessageDialogue(\"Some error just happened. \" +\n \"Please try again in a little bit.\");\n\n }", "@Override // com.facebook.p463d.BaseDataSubscriber\n public void onFailureImpl(DataSource<CloseableReference<CloseableImage>> cVar) {\n C32569u.m150519b(cVar, C6969H.m41409d(\"G6D82C11B8C3FBE3BE50B\"));\n Log.e(\"PanoramaViewParser\", C6969H.m41409d(\"G6893C516A670A224E7099508F4E4CADB2581D019BE25B82CA609955CB2EBC6C37E8CC711FF36AA20EA\"));\n PanoramaViewWrap.access$getMPanoramaView$p(this.this$0).setVisibility(4);\n }", "@Override\n\tpublic void onStartBlobStoreSessionFail() {\n\t\t\n\t}", "void onDownloadFailed(EzDownloadRequest downloadRequest, int errorCode, String errorMessage);", "@Override\n public void onLoadingFailed(String imageUri, View view,\n FailReason failReason) {\n Log.d(TAG, \"#onLoadingFailed imageUri = \" + imageUri + \" failReason = \" + failReason);\n// HcAppState.getInstance().removeActivity(BigImageActivity.this);\n finish();\n overridePendingTransition(0, 0);\n }", "@Test \n\t@DisplayName(\"czyToJpg\")\n\tvoid testExceptionIfNotJpg() {\n\t\tAssertions.assertThrows(NotJpgException.class, () -> {photo.loadImage(notImage);});\n\t}", "@Override\n public void onFailure(HttpException arg0, String arg1) {\n mProgressDialog.setMessage(\"下载失败\");\n mProgressDialog.dismiss();\n enterHome();\n }", "@Override\n public void onComplete(Bitmap bitMap) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n HashMap<String, Object> callback = new HashMap<>();\n callback.put(\"uri\", Uri.EMPTY);\n observer.notifyOfCallback(callback);\n e.printStackTrace();\n }", "@Override\n public void fetchNewsFail() {\n }", "public static void loadCacheImage(Context context, final ImageView imageView, String imageUrl, String tag) {\n Cache cache = MySingleton.getInstance(context).getRequestQueue().getCache();\n Cache.Entry entry = cache.get(imageUrl);\n if (entry != null) {\n try {\n Bitmap bitmap = BitmapFactory.decodeByteArray(entry.data, 0, entry.data.length);\n imageView.setImageBitmap(bitmap);\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"ERROR\", e.getMessage());\n }\n } else {\n cache.invalidate(imageUrl, true);\n cache.clear();\n ImageRequest request = new ImageRequest(imageUrl,\n new Response.Listener<Bitmap>() {\n @Override\n public void onResponse(Bitmap bitmap) {\n imageView.setImageBitmap(bitmap);\n }\n }, 0, 0, null,\n new Response.ErrorListener() {\n public void onErrorResponse(VolleyError error) {\n error.printStackTrace();\n Log.e(\"ERROR VOLLY 1\", error.getMessage() + \"\");\n imageView.setImageResource(R.drawable.ic_check_black_24dp);\n }\n });\n request.setTag(tag);\n MySingleton.getInstance(context).addToRequestQueue(request);\n }\n }", "@Override\n public void onLoadingFailed(String imageUri, View view, FailReason failReason) {\n }", "@Override\n public boolean onException(Exception e, String model, Target<GlideDrawable> target, boolean isFirstResource) {\n\n return false;\n }", "@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tWindow.alert(\"FAILED TO UPLOAD\");\n\t\t\t\t}", "public CacheException(Throwable cause) {\r\n\t\tsuper(cause);\r\n\t}", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(s)\n .resize(height, height)\n .centerCrop()\n .error(R.drawable.background_default)\n .placeholder(R.drawable.loading)\n .into(viewHolder.profileimage, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n // vs.Icon.setImageResource(R.drawable.groupchat_icon_48dp);\n }\n });\n }", "@Override\n public void onError() {\n holder.mPosterPortrait.setImageDrawable(\n mMainActivity.getResources().getDrawable(R.drawable.poster_not_found));\n holder.mPosterPortrait.setAlpha(0.5f);\n //Making title visible\n holder.mTitle.setVisibility(View.VISIBLE);\n }", "public void onLoadingFailed(String imageUri, View view);", "@Test\n public void testBlobFetchRetries() throws IOException {\n testBlobFetchRetries(new VoidBlobStore(), null, TRANSIENT_BLOB);\n }", "@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\tview.showErrorMessage(caught.getMessage());\n\t\t\t\tview.setLoading(false);\n\t\t\t}", "@Override\n\t\t\t\t\t\tpublic void onFailure(int arg0, Header[] arg1,\n\t\t\t\t\t\t\t\tbyte[] arg2, Throwable arg3) {\n\t\t\t\t\t\t\tToast.makeText(ChangeUserResumeActivity.this,\n\t\t\t\t\t\t\t\t\t\"网络连接失败,请检测网络!\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tpd.dismiss();\n\t\t\t\t\t\t}", "@Override\n\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\tToast.makeText(context, \"下载失败。。。\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tdialog2.dismiss();\n\t\t\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getApplicationContext(),\"Uh-oh! something went wrong, please try again.\",Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onCompleted(Exception e, String result) {\n\n if (result.equals(\"-1\")) {\n imagepath_server = null;\n\n } else {\n imagepath_server = result;\n\n }\n }", "@Override\n public void onCancelled(CancelledException arg0) {\n\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {\n Helpers.MostrarError(getActivity(), getString(R.string.failuploadphoto));\n }", "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}" ]
[ "0.6442093", "0.638022", "0.63745147", "0.6292673", "0.62092376", "0.61793995", "0.614375", "0.6119175", "0.60901576", "0.6083647", "0.605793", "0.6051912", "0.60483384", "0.60405785", "0.59967124", "0.5983934", "0.5964962", "0.5953506", "0.5925815", "0.5877479", "0.5840627", "0.5834517", "0.5830421", "0.57992667", "0.5767775", "0.57666904", "0.5760181", "0.5744584", "0.57443243", "0.5726672", "0.57098913", "0.5693418", "0.5691376", "0.56843364", "0.56810755", "0.56339514", "0.5624951", "0.559073", "0.5537506", "0.55338746", "0.5533191", "0.55269593", "0.55093104", "0.55046564", "0.5489139", "0.54684746", "0.54554224", "0.54484385", "0.54443794", "0.5437083", "0.5435299", "0.5433803", "0.541839", "0.5409783", "0.54072315", "0.5399242", "0.5396707", "0.5384155", "0.5372908", "0.53695583", "0.5366841", "0.53607947", "0.5331074", "0.53282726", "0.5325246", "0.5323723", "0.53092074", "0.530792", "0.53059113", "0.53015685", "0.52993244", "0.5298754", "0.52938056", "0.52924633", "0.52922887", "0.52863175", "0.5286234", "0.5271211", "0.5270547", "0.5270146", "0.5264048", "0.5256734", "0.5250916", "0.52491987", "0.5247392", "0.5227555", "0.5226963", "0.5216557", "0.52144957", "0.5214226", "0.52107114", "0.52104443", "0.5205114", "0.5203424", "0.52014554", "0.5196024", "0.51921207", "0.5189045", "0.51864815", "0.5184719" ]
0.75727886
0
When successfully saved the image file, we add the the photo to the singleton that hold all the Id's of the downloaded photos and then notify the user (UI message).
@Override public void onSaved(@NonNull PhotoCache photoCache) { boolean addStatus = localPhotosUtil.add(photoCache.getPhotoId(), photoCache.getFormatExtension()); if (addStatus) { Toast.makeText(context, "Successfully Saved", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(context, "Something wrong while adding to Downloads", Toast.LENGTH_SHORT).show(); } notifyAfterDownloadingProgress(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void BitmapDownloadSuccess(String photoId, String mealId)\n {\n\n refreshUI();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n taskSnapshot.getMetadata().getReference().getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n FirebaseStorage.getInstance().getReference().child(\"faculty_images\").child(imageIdentifier).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Useremail.photouri = uri;\n FirebaseFirestore.getInstance().collection(\"Faculty_Bag\").document(Useremail.email).update(\"photo_uri\",Useremail.photouri.toString()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Showfancytoasr.show(MainActivity.this,\"Uploading process was successful\");\n progressDialog.dismiss();\n finish();\n startActivity(getIntent());\n }\n });\n }\n });\n }\n }\n });\n }", "public void savePhoto() {\n\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\tSystem.err.println(\"save photo: url----------\" + url);\n\n\t\ttry {\n\n\t\t\t// if not uploading file\n\t\t\tif (url == null || url.equals(\"null\") || url.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_warn_info\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_warn_charge_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.err.println(\"etudiantid:\" + this.dossierEtudiantId);\n\n\t\t\tif (this.dossierEtudiantId == null || this.dossierEtudiantId.equals(\"null\")\n\t\t\t\t\t|| this.dossierEtudiantId.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_passage_parametres_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tdossierEtudiantDto = dossierEtudiantService.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tDossierEtudiantDto oldDossierEtudiant = dossierEtudiantService\n\t\t\t\t\t.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tif (oldDossierEtudiant.getPhoto() == null || oldDossierEtudiant.getPhoto().trim().isEmpty()) {\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"--------oldDossierEtudiant---------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\t\t\t\tSystem.err.println(\"-----------------file moved------\");\n\t\t\t\t// deleteTempFileByName(url);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif (!oldDossierEtudiant.getPhoto().equals(url)) {\n\n\t\t\t\t// String oldUrl = oldDossierEtudiant.getPhoto();\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"-------------------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\n\t\t\t\t// deleteFileByName(oldUrl);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t}\n\n\t\t} catch (Exception e2) {\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_echec\") + \": \"\n\t\t\t\t\t+ bundleDocument.getString(\"document_error_persistence_photo\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\tlog.info(e2.getMessage());\n\t\t}\n\t}", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n photoUrl = taskSnapshot.getDownloadUrl();\r\n prosesUpdate();\r\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n fotoReferencia.getDownloadUrl()\n .addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Mensaje mensajeFoto = new Mensaje\n (nombreUsuario,\n \"Ha enviado una foto\",\n FirebaseAuth.getInstance().getCurrentUser()\n .getPhotoUrl().toString(),\n \"2\",\n DateFormat.getTimeInstance().format\n (Timestamp.now().toDate()),\n uri.toString(),\n idUsuario,\n idVeterinario);\n db.collection(\"chat\")\n .document(idChat)\n .collection(\"mensajes\")\n .add(mensajeFoto);\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask= uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n\n if(!task.isSuccessful()){\n\n throw task.getException();\n\n }\n ImageUrl = filepath.getDownloadUrl().toString();\n return filepath.getDownloadUrl();\n\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n\n ImageUrl = task.getResult().toString();\n //Toast.makeText(getApplicationContext(),\"Image saved to database\" ,Toast.LENGTH_SHORT).show();\n SaveProductInfo();\n }\n }\n });\n }", "public void saveImage(){\n new Thread() {\n public void run() {\n String image_url = stuffRoomInfo.getStuffLink();\n Log.i(\"OGT\", \"image_url:in showImage \" + image_url);\n getOGTag(image_url);\n // Display a png image from the specified file\n ImageUrlSendServer();\n }\n }.start();\n }", "@Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Image Updated..\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n\t\t\tpublic void onComplete(List<PhotoBean> bean) {\n\r\n\t\t\t}", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == GALLERY_INTETN && resultCode==RESULT_OK) {\n dialog.setMessage(\"Uploading\");\n dialog.show();\n Uri uri= data.getData();\n\n StorageReference filepath= mStorage.child(\"volunteer_aadhar_pic\").child(uri.getLastPathSegment());\n try\n {\n compressed = MediaStore.Images.Media.getBitmap(ApplyAsVolunteer.this.getContentResolver(), uri);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressed.compress(Bitmap.CompressFormat.JPEG, 30, baos);\n byte[] cimg = baos.toByteArray();\n filepath.putBytes(cimg).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n path = taskSnapshot.getDownloadUrl();\n //accountref = FirebaseDatabase.getInstance().getReference().child(\"user_details\").child(auth.getUid());\n //accountref.child(\"userImgUrl\").setValue(String.valueOf(path));\n Toast.makeText(ApplyAsVolunteer.this, \"Document uploaded\", Toast.LENGTH_LONG).show();\n //finish();\n //startActivity(getIntent());\n afterText.setVisibility(View.VISIBLE);\n clicksubmit.setVisibility(View.GONE);\n dialog.dismiss();\n }\n });\n }\n }", "@Override\n public void onSuccess(Location location) {\n createPhoto(location);\n }", "@Override\n public void onSuccess(Location location) {\n createPhoto(location);\n }", "@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Ref.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n figureURL = String.valueOf(uri);\n }\n });\n Toast.makeText(Create_order.this, \"Upload Image Berhasil\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getApplicationContext(),\"Photo uploaded successfully!\",Toast.LENGTH_SHORT).show();\n }", "private void putImageInStorage() {\n final StorageReference ref = storageReference.child(\"images/\" + java.util.UUID.randomUUID().toString());\n ref.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n if (taskSnapshot.getMetadata() != null) {\n if (taskSnapshot.getMetadata().getReference() != null) {\n Task<Uri> result = taskSnapshot.getStorage().getDownloadUrl();\n result.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n imageUrl = uri.toString();\n ChatMessage Message = new\n ChatMessage(null,\n mUsername,\n imageUrl, dateAndTime);\n mFirebaseDatabaseReference.child(CHATS_PATH + chatCode)\n .push().setValue(Message);\n }\n });\n }\n }\n }\n });\n }", "public void addPhoto(ActionEvent event) throws IOException {\n\t\t//System.out.println(\"ITEM ADDED______________________________________________\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Photo\"); \n\t\tAccessibleUsersList.masterUserList.userLoggedIn.fileList = fileChooser.showOpenMultipleDialog(this.myNewStage);\n\t\t\n\t\tboolean checkIfImages = true;\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null){\n\t\t\t\n\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\n\t\t\t\tMimetypesFileTypeMap mimetype= new MimetypesFileTypeMap();\n\t\t\t\tmimetype.addMimeTypes(\"image png jpg jpeg JPG PNG\");\t\n\t\t\t\t\n\t\t\t\tString mimetype1 = mimetype.getContentType(file);\n\t\t\t\tString type = mimetype1.split(\"/\")[0];\n\t\t\t\t\n\t\t\t\tif(type.contains(\"image\")){\n\t\t\t //System.out.println(\"It's an image\");\n\t\t\t\t} else { \n\t\t\t \t //System.out.println(\"It's NOT an image\");\n\t\t\t \t Alert majorBagAlert = new Alert(AlertType.ERROR);\n\t\t\t\t majorBagAlert.setTitle(\"Error\");\n\t\t\t\t majorBagAlert.setHeaderText(\"One or more images is not an image file type.\");\n\t\t\t\t majorBagAlert.setContentText(\"Please enter photo(s) again\");\n\t\t\t\t majorBagAlert.showAndWait();\n\t\t\t \t \n\t\t\t\t //adding comment\n\t\t\t checkIfImages = false; \n\t\t\t }\n\t\t\t}\n }\n\t\t\n\n\t\t//iterate through the logged in user's albums \n\t\t//this is the album we have to add our photos to \n\t\tthis.selectedAlbum = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getName(); \n\t\tAlbum foundAlbum = null; \n\t\tlong lastModifiedDate = 0; \n\t\tString path; \n\t\t\n\t\t//if we are certain we only collected files of type jpg, png or jpeg \n\t\tif(checkIfImages){\n\t\t\t\n\t\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null) {\n\t\t\t\t\n\t\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t\t\tFileInputStream inputstream = new FileInputStream(path); \n\t\t\t\t\tImage image1 = new Image(inputstream); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//iterate through the logged in user's albums \n\t\t\t\t\tint x=0; \n\t\t\t\t\tfor(Album album: AccessibleUsersList.masterUserList.userLoggedIn.albums_list){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//looking for the current album to add our photos into \n\t\t\t\t\t\tif(album.getName().equals(this.selectedAlbum)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfoundAlbum = AccessibleUsersList.masterUserList.userLoggedIn.albums_list.get(x);\n\t\t\t\t\t\t\tlastModifiedDate = file.lastModified();\n\t\t\t\n\t\t\t\t\t\t\tPhoto albumPhoto = new Photo(path, lastModifiedDate); \n\t\t\t\t\t\t\tfoundAlbum.getAlbum().add(albumPhoto);\t \n\t\t\t\t\t\t\t//System.out.println(foundAlbum.getAlbum());\n\t\t\t\t\t\t\t//foundAlbum.photos.add(new model.Photo(image1, lastModifiedDate));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tImageView pic = new ImageView();\n\t\t\t\t\t\t\tpic.setFitWidth(340);\n\t\t\t\t\t\t\tpic.setFitHeight(180);\n\t\t\t\t\t\t\tpic.setImage(image1);\n\t\t\t\t\t\t\tlistOfPhotos.add(pic);\n\t\t\t\t\t\t\talbumPhoto.setImage(pic);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"photo added\");\n\t\t\t\t\t\t\t//System.out.println(albumPhoto.getPathToPhoto());\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn);\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.addPhoto(albumPhoto); <-----cause of bug, added photo TWICE, X\n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t} \n\t\t\t\t\t\tx++; \n\t\t\t\t\t}\n \t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}", "@Override\n\t\t\t\t\t\t\tpublic void success(Collection<Photo> result) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(AddingPlace.this,\"image uploaded successfully\",Toast.LENGTH_LONG).show();\n }", "@Override\n public void onClick(View view) {\n StorageReference myfileRef = storageRef.child(email).child(\"ProfPic.jpg\");\n //StorageReference myfileRef = storageRef.child(\"ProfPic.jpg\");\n viewImage.setDrawingCacheEnabled(true);\n viewImage.buildDrawingCache();\n Bitmap bitmap = viewImage.getDrawingCache();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask = myfileRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(ProfilePicture.this, \"TASK FAILED\", Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(ProfilePicture.this, \"Upload Successful!\", Toast.LENGTH_SHORT).show();\n //progressBar.setVisibility(View.GONE);\n\n Uri downloadUrl =taskSnapshot.getDownloadUrl();\n String DOWNLOAD_URL = downloadUrl.getPath();\n Log.v(\"Download URL\", DOWNLOAD_URL);\n Toast.makeText(ProfilePicture.this, DOWNLOAD_URL, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onComplete(Bitmap bitMap) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }", "@Override\n public void onSuccess(\n UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n Toast.makeText(ProfileActivity.this, \"Image Uploaded!!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n if (uriTask.isSuccessful())\n {\n //save info with image\n HashMap<String, Object> hashMap = new HashMap<>();\n\n hashMap.put(\"uid\",\"\"+uid_user);\n hashMap.put(\"name\",\"\"+nameSt);\n hashMap.put(\"phone\",\"91\"+phoneSt);\n hashMap.put(\"mail\",\"\"+mailSt);\n hashMap.put(\"profileImage\", \"\"+downloadImageUri);\n hashMap.put(\"timestamp\", \"\" + timpstamp);\n mRef.child(uid_user).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"add user sucessfully\", Toast.LENGTH_SHORT).show();\n goToHomePage();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n }", "@Override\n public void onSuccess (UploadTask.TaskSnapshot taskSnapshot){\n Toast.makeText(IncomeActivity.this, \"Image uploaded successfully\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSuccess(byte[] bytes) {\n storageRef.child(\"profilepics/\" + authUser.getUid()+ \".jpg\")\n .putBytes(bytes)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"control\", \"foto subida\");\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(DetailsForm.this, \"Image Uploaded Successfully\", Toast.LENGTH_LONG).show();\n }", "@Override\n public void run() {\n ImageService.uploadProductImage(sequentialClient, gtin, imagePath, new\n PLYCompletion<ProductImage>() {\n @Override\n public void onSuccess(ProductImage result) {\n Log.d(\"UploadPImageCallback\", \"New image for product with GTIN \" + gtin + \" \" +\n \"uploaded\");\n LoadingIndicator.hide();\n if (isNewProduct) {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded_more_info,\n Snackbar.LENGTH_LONG).show();\n } else {\n SnackbarUtil.make(getActivity(), getView(), R.string.image_uploaded, Snackbar\n .LENGTH_LONG).show();\n }\n DataChangeListener.imageCreate(result);\n }\n\n @Override\n public void onPostSuccess(ProductImage result) {\n loadProductImage(imagePath, productImage);\n }\n\n @Override\n public void onError(PLYAndroid.QueryError error) {\n Log.d(\"UploadPImageCallback\", error.getMessage());\n LoadingIndicator.hide();\n SnackbarUtil.make(getActivity(), getView(), error.getMessage(), Snackbar\n .LENGTH_LONG).show();\n }\n });\n }", "public void saveSubjectImage(Uri imageUri, final ImageInterface listner) {\n storageReference = FirebaseStorage.getInstance().getReference();\n collectionReference = db.collection(\"Users\");\n final StorageReference filePath = storageReference.child(\"Subjects_Images\").child(EntityClass.getInstance().getSubjectEmail());\n filePath.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n final String uriLink = uri.toString();\n collectionReference.whereEqualTo(\"UserIdInDB\", EntityClass.getInstance().getUserIdInDb()).get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\n for (QueryDocumentSnapshot snapshots: queryDocumentSnapshots) {\n\n snapshots.getReference().collection(EntityClass.getInstance().getSubjectEmail()).document(\"SubjectData\").update(\"imageUri\",uriLink);\n listner.statusAndUri(true, null);\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.statusAndUri(false, null);\n listner.onFailure(e.getMessage());\n }\n });\n\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.statusAndUri(false, null);\n listner.onFailure(e.getMessage());\n }\n });\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.statusAndUri(false, null);\n listner.onFailure(e.getMessage());\n }\n });\n }", "private void saveAndUploadAndSendNotification(byte[] bytes) throws IOException {\n Log.d(TAG, \"saving picture \");\n Bitmap pictureAsBitmap = BitmapFactory.decodeByteArray(bytes, 0, bytes.length);\n\n Matrix matrix = new Matrix();\n if (currentCamera == CAMERA_FRONT) {\n matrix.postRotate(-90);\n } else {\n if (currentCamera == CAMERA_BACK) {\n matrix.postRotate(90);\n }\n }\n Bitmap rotatedBitmap = Bitmap.createBitmap(pictureAsBitmap, 0, 0, pictureAsBitmap.getWidth(), pictureAsBitmap.getHeight(), matrix, true);\n\n Uri uri = getImageUri(getContext(), rotatedBitmap);\n\n double altitude = 0;\n double latitude = 0;\n double longitude = 0;\n if (currentLocation != null) {\n altitude = currentLocation.getAltitude();\n latitude = currentLocation.getLatitude();\n longitude = currentLocation.getLongitude();\n }\n HEPicture hePicture = new HEPicture(rotatedBitmap,\n uri.getLastPathSegment(),\n sizeOf(rotatedBitmap),\n altitude,\n latitude,\n longitude,\n cityName,\n Calendar.getInstance().getTime().toString()\n );\n HEPicture.getPictures().put(hePicture.getLastPathSegment(), hePicture);\n PictureListFragment.hePictureInterface.onNewPictureLoaded(hePicture.getLastPathSegment());\n HEPicture.savePicture(hePicture);\n uploadFromUri(uri, hePicture);\n }", "@Override\n\tpublic void save(Photo photo) {\n\t\t\n\t}", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\r\n updateRealTimeDB(userId, path);\r\n\r\n //and displaying a success toast\r\n finish();\r\n\r\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\r\n }", "void onPictureCompleted();", "private void uploadPhoto() {\n\n final ProgressDialog pd = new ProgressDialog(this);\n pd.setTitle(\"Uploading Image...\");;\n pd.show();\n\n final String randomKey = UUID.randomUUID().toString();\n StorageReference storageRef = storageReference.child(\"images/\" + randomKey);\n\n storageRef.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n final Task<Uri> firebaseUri = taskSnapshot.getStorage().getDownloadUrl();\n firebaseUri.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n photoURL = uri.toString();\n }\n });\n\n pd.dismiss();\n Snackbar.make(findViewById(android.R.id.content), \"Image Uploaded.\", Snackbar.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n pd.dismiss();\n Toast.makeText(getApplicationContext(), \"Failed To Upload\", Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot snapshot) {\n double progressPercent = (100.00 * snapshot.getBytesTransferred() / snapshot.getTotalByteCount());\n pd.setMessage(\"Percentage: \" + (int) progressPercent + \"%\");\n }\n });\n }", "@Override\n public void onComplete(String url) {\n String localName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"cach image: \" + localName);\n saveImageToFile(imageBitmap,localName); // synchronously save image locally\n //listener.oncomplete(url);\n listener.onComplete(url);\n }", "@Override\n public void onFinish() {\n i++;\n transferBalance(picture.getId(), AppConfig.URL_TRANSFER_PICTURE, getArguments().getString(\"userId\"));\n }", "void onSavingCompleted(List<File> files);", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downLoadUrl = uriTask.getResult();\n\n Map userInfo = new HashMap();\n //write where to put values in database\n userInfo.put(\"profileImageUrl\",downLoadUrl.toString());\n mUserDb.updateChildren(userInfo);\n\n return;\n }", "@Override\n protected void onPostExecute(ArrayList<BitmapAndFileName> iconData) {\n int dataLength = iconData.size();\n for (int i = 0; i < dataLength; i++) {\n\n Bitmap iconBitmap = iconData.get(i).bitmap;\n String fileName = generateComplicateFileName(iconData.get(i).url);\n\n String iconsStoragePath = Environment.getExternalStorageDirectory() + dirPath;\n File sdIconStorageDir = new File(iconsStoragePath);\n sdIconStorageDir.mkdirs();\n\n try {\n String filePath = sdIconStorageDir.toString() + \"/\" + fileName;\n FileOutputStream fileOutputStream = new FileOutputStream(filePath);\n\n BufferedOutputStream bos = new BufferedOutputStream(fileOutputStream);\n iconBitmap.compress(Bitmap.CompressFormat.PNG, 100, bos);\n\n bos.flush();\n bos.close();\n\n } catch (FileNotFoundException e) {\n Log.w(\"TAG\", \"Error saving image file: \" + e.getMessage());\n } catch (IOException e) {\n Log.w(\"TAG\", \"Error saving image file: \" + e.getMessage());\n }\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n mStorageRef.child(\"url\").getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n //Setting the url to database\n\n reference2.child(\"url\").setValue(uri.toString());\n reference2.child(\"name\").setValue(shared.getName());\n reference2.child(\"date\").setValue(date+\"+\"+formattedDate);\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }\n\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n String downloadUrl = task.getResult().toString();\n product.setImage(downloadUrl);\n databaseReference.child(\"productos\").child(product.getId()).setValue(product);\n progressDialog.dismiss();\n Intent mainActivityView = new Intent(AddProduct.this, MainActivity.class);\n AddProduct.this.startActivity(mainActivityView);\n Toast.makeText(AddProduct.this, \"¡Producto guardado con éxito!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "@Override\n public void onAlreadySaved(@NonNull PhotoCache photoCache) {\n Toast.makeText(context, \"The file already exist in:\\n\" +\n DEFAULT_PATH, Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // Pick photo\n if (requestCode == PICK_PHOTO_GALLERY && resultCode == Activity.RESULT_OK) {\n if (data == null) {\n Toast.makeText(this, R.string.error_selecting_photo, Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n InputStream inputStream = getContentResolver().openInputStream(data.getData());\n mViewModel.studentPicBitmap = BitmapFactory.decodeStream(inputStream);\n mAddPhotoView.setImageBitmap(mViewModel.studentPicBitmap);\n studentHasPhoto = true;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n // Take new photo\n } else if (requestCode == CAPTURE_PHOTO && resultCode == Activity.RESULT_OK) {\n mViewModel.studentPicBitmap = BitmapFactory.decodeFile(mTempPhotoPath);\n mAddPhotoView.setImageBitmap(mViewModel.studentPicBitmap);\n studentHasPhoto = true;\n }\n checkIfThereIsStudentPhoto();\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"TAG\", \"onSuccess: \" + localFile + \" :This is the tasksnap: \" + taskSnapshot);\n bitmap = BitmapFactory.decodeFile(localFile.getAbsolutePath());\n imageView.setImageBitmap(bitmap);\n navImage.setImageBitmap(bitmap);\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n startActivity(new Intent(getApplicationContext(),ChatApp.class));\n\n Toast.makeText(Image.this, \"Image Uploaded Successfylly\", Toast.LENGTH_SHORT).show();\n }", "public static void saveFile(final Context context, Uri uri, final String oldFilename) {\n\n Target target = new Target() {\n\n @Override\n public void onBitmapLoaded(final Bitmap bitmap, LoadedFrom from) {\n\n new Thread(() -> {\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault());\n String currentTimeStamp = format.format(new Date());\n String filename = oldFilename;\n\n if (oldFilename.isEmpty()) {\n filename = \"assi_\" + currentTimeStamp;\n\n Log.d(TAG, \"new user pic filename: \" + filename);\n }\n\n PreferenceUtils.setUserPicFilename(context, filename);\n\n Log.e(TAG, Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n FileOutputStream oStream = null;\n try {\n file.createNewFile();\n\n oStream = new FileOutputStream(file);\n\n bitmap.compress(CompressFormat.JPEG, 80, oStream);\n\n } catch (Exception e) {\n Log.e(TAG, \"Cannot save image to internal file storage! Error: \" + e.getMessage());\n } finally {\n try {\n if (oStream != null) {\n oStream.close();\n }\n } catch (IOException e) {\n Log.e(TAG, \"Cannot close output stream! Error: \" + e.getMessage());\n }\n }\n }).start();\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n }\n };\n\n // save file to internal storage\n Picasso.with(context)\n .load(uri)\n .into(target);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filepath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n // teh result uri of the image on WEB\n Uri downloadURIofImage = uri;\n\n // Pass the URI and ImageView to Picasso\n Picasso.get().load(downloadURIofImage).into(resultImageView);\n }\n });\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n mStorageRef.child(type).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n //Setting the url to database\n\n reference2.child(type).setValue(uri.toString());\n\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }\n\n });\n }", "private void uploadPhoto() {\n // Get the data from an ImageView as bytes\n ImageView imageView = (ImageView)findViewById(R.id.imgView);\n imageView.setDrawingCacheEnabled(true);\n imageView.buildDrawingCache();\n Bitmap bitmap = imageView.getDrawingCache();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n FirebaseStorage storage = FirebaseStorage.getInstance();\n\n // Create a storage reference from our app\n StorageReference storageRef = storage.getReferenceFromUrl(Config.FIREBASE_STORAGE_URL);\n\n // Create a reference to 'images/profile/userNodeId.jpg'\n StorageReference mountainImagesRef = storageRef.child(\"images/profile/\"+currentUser.getFireUserNodeId()+\".jpg\"); // set image name as userid.jpg which is unique\n\n UploadTask uploadTask = mountainImagesRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(Exception exception) {\n // Handle unsuccessful uploads\n Toast.makeText(getApplicationContext(),\"Photo upload failed!\",Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n // taskSnapshot.getMetadata() contains file metadata such as size, content-type, and download URL.\n Toast.makeText(getApplicationContext(),\"Photo uploaded successfully!\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n public void onSuccess(Uri uri) {\n\n reference2.child(\"url\").setValue(uri.toString());\n reference2.child(\"name\").setValue(shared.getName());\n reference2.child(\"date\").setValue(date+\"+\"+formattedDate);\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(getApplicationContext(),\"Image uploaded\",Toast.LENGTH_SHORT).show();\n }", "private void takePhotoCompleted() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoCompleted\");\n // need to set jpeg_todo to false before calling onCompleted, as that may reenter CameraController to take another photo (if in auto-repeat burst mode) - see testTakePhotoRepeat()\n synchronized (background_camera_lock) {\n jpeg_todo = false;\n }\n checkImagesCompleted();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n // picup =true;\n }", "@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] responseBody) {\n byte[] bite = responseBody;\n try {\n final String response = new String(bite, \"UTF-8\");\n System.out.println(\"response \" + response);\n// stsimgsid[imgcoutpos]=response;\n// String tempcmid=response;\n// String [] Commnt1 = Constants.Commentid;\n// String[] temp =new String[1];\n// temp[0]=tempcmid;\n// String [] comd2=ArrayUtils.addAll(Commnt1,temp);\n// Constants.Commentid=comd2;\n//\n// String [] Commntlike = Constants.CommentLikeCount;\n// String[] temp1 =new String[1];\n//\n// temp1[0]=\"0\";\n// String [] comdlike=ArrayUtils.addAll(Commntlike,temp1);\n// Constants.CommentLikeCount=comdlike;\n Log.e(\"image response\", response);\n boolean containerContainsContent = StringUtils.containsIgnoreCase(response, \"Record inserted suceessfully\");\n if(containerContainsContent) Toast.makeText(getApplicationContext(), \"Record inserted suceessfully\", Toast.LENGTH_LONG).show();\n // imageUploadid=imageUploadid.concat(response.trim()+\",\");\n// Toast.makeText(getApplicationContext(),String.valueOf(imageUploadid),Toast.LENGTH_SHORT).show();\n// Log.e(\"image names\",String.valueOf(response));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n\n// Log.e(\"file path\", file);\n }", "@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist same with imagelist arraylist\n if (ImageListUrl.size() == ImageList.size()) {\n Toast.makeText(NewRecipe.this, ImageListUrl.toString(), Toast.LENGTH_SHORT).show();\n\n saveRecipe();\n\n }\n }\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == TAKE_PIC_CODE && resultCode == Activity.RESULT_OK) {\n try {\n Bitmap photo = (Bitmap) data.getExtras().get(\"data\");\n saveToInternalStorage(photo, mImagePath);\n } catch (Exception e) {\n e.getStackTrace();\n }\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n riversRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n Model model = new Model(uri.toString());\n String modelID = myRef.push().getKey();\n myRef.child(modelID).setValue(model);\n userID = fAuth.getCurrentUser().getUid();\n DocumentReference documentReference = fStore.collection(\"users\").document(userID);\n\n\n Map<String, Object> fuser = new HashMap<>();\n fuser.put(\"FileUrl\", model);\n documentReference.set(fuser, SetOptions.merge());\n Toast.makeText(eeg4.this, \"Uploaded successfully\", Toast.LENGTH_SHORT).show();\n }\n });\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n }", "@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, byte[] responseBody) {\n byte[] bite = responseBody;\n try {\n final String response = new String(bite, \"UTF-8\");\n System.out.println(\"response \" + response);\n// stsimgsid[imgcoutpos]=response;\n// String tempcmid=response;\n// String [] Commnt1 = Constants.Commentid;\n// String[] temp =new String[1];\n// temp[0]=tempcmid;\n// String [] comd2=ArrayUtils.addAll(Commnt1,temp);\n// Constants.Commentid=comd2;\n//\n// String [] Commntlike = Constants.CommentLikeCount;\n// String[] temp1 =new String[1];\n//\n// temp1[0]=\"0\";\n// String [] comdlike=ArrayUtils.addAll(Commntlike,temp1);\n// Constants.CommentLikeCount=comdlike;\n Log.e(\"image response\", response);\n boolean containerContainsContent = StringUtils.containsIgnoreCase(response, \"Record inserted suceessfully\");\n if(containerContainsContent) Toast.makeText(getApplicationContext(), \"Record inserted suceessfully\", Toast.LENGTH_LONG).show();\n// // imageUploadid=imageUploadid.concat(response.trim()+\",\");\n// Toast.makeText(getApplicationContext(),String.valueOf(imageUploadid),Toast.LENGTH_SHORT).show();\n// Log.e(\"image names\",String.valueOf(response));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n\n// Log.e(\"file path\", file);\n }", "private void uploadFile() {\n //if there is a file to upload\n if (filePath != null) {\n\n\n final StorageReference storageReference2nd = storageReference.child(System.currentTimeMillis() + \".\" + GetFileExtension(filePath));\n storageReference2nd.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n /* storageReference2nd.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n final String ImageUrl = uri.toString();\n\n }\n });*/\n\n // Getting Description, Price, Address, Mobile from EditText and store into string variable.\n String TempDescription = Description.getText().toString().trim();\n String TempPrice = Price.getText().toString().trim();\n String TempAddress = Address.getText().toString().trim();\n String TempPhone = Phone.getText().toString().trim();\n String TempImageUrl = ImageUrl;\n\n\n\n\n\n //if the upload is successfull\n\n //and displaying a success toast\n Toast.makeText(postadv.this, \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n\n @SuppressWarnings(\"VisibleForTests\")\n ImageUploadInfo imageUploadInfo = new ImageUploadInfo(TempDescription, TempPrice, TempAddress, TempPhone, storageReference2nd.getDownloadUrl().toString());\n\n // Getting image upload ID.\n String ImageUploadId = databaseReference.push().getKey();\n\n // Adding image upload id s child element into databaseReference.\n databaseReference.child(ImageUploadId).setValue(imageUploadInfo);\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n //if the upload is not successfull\n //hiding the progress dialog\n\n //and displaying error message\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n });\n }\n //if there is not any file\n else {\n Toast.makeText(postadv.this, \"Failed\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tll.setDrawingCacheEnabled(true);\n\t\t\t\t\t\t\t\tBitmap b = ll.getDrawingCache();\n\t\t\t\t\t\t\t\tb.compress(\n\t\t\t\t\t\t\t\t\t\tCompressFormat.JPEG,\n\t\t\t\t\t\t\t\t\t\t95,\n\t\t\t\t\t\t\t\t\t\tnew FileOutputStream(\n\t\t\t\t\t\t\t\t\t\t\t\tEnvironment\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getExternalStoragePublicDirectory(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tEnvironment.DIRECTORY_PICTURES)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getPath()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ File.separator\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"image.jpg\"));\n\t\t\t\t\t\t\t\tfile=new File(Environment\n\t\t\t\t\t\t\t\t\t\t.getExternalStoragePublicDirectory(\n\t\t\t\t\t\t\t\t\t\t\t\tEnvironment.DIRECTORY_PICTURES)\n\t\t\t\t\t\t\t\t\t\t.getPath()\n\t\t\t\t\t\t\t\t\t\t+ File.separator\n\t\t\t\t\t\t\t\t\t\t+ \"image.jpg\");\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\t pd = ProgressDialog.show(getActivity(), \"Working..\", \"Uploading Item\", true,\n\t\t\t\t false);\n\t\t\t\t\t\t\t\t try\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t entity=new MultipartEntity();\n\t\t\t\t\t\t\t\t\tentity.addPart(\"days\",new StringBody( days.getText().toString()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"id\", new StringBody( idItems.get(spinner2.getSelectedItemPosition())));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"title\", new StringBody(title.getText().toString()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"desc\", new StringBody(desc.getText().toString()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"advertype\", new StringBody(B2BUtils.getUser().getUsertype()));\n\t\t\t\t\t\t\t\t\tentity.addPart(\"catid\", new StringBody(B2BUtils.categoryId.get(B2BUtils.categoryNames.indexOf(spinner1.getSelectedItem().toString().toUpperCase(Locale.getDefault())))));\n\t\t\t\t\t\t\t\t\tSystem.out.println((B2BUtils.categoryId.get(B2BUtils.categoryNames.indexOf(spinner1.getSelectedItem().toString().toUpperCase(Locale.getDefault())))));\n\t\t\t\t\t\t\t\t\tThread t=new Uploader(file, url, handler, entity);\n\t\t\t\t\t\t\t\t\tt.start();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tLog.d(\"Error\", e.toString());\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} catch (Exception e) {\n\t\t\t\t\t\t\t\tSystem.out.println(e);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "public void startInlineDownloading() {\n inDownloadingProgress.add(photoId);\n if (fullPhotosCaching.containsKey(photoId)) {\n final PhotoCache photoCache = fullPhotosCaching.get(photoId);\n saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this);\n }\n else {\n getPhotoCache(photoId, DEFAULT_PATH, context, this);\n }\n }", "private void retrieveFavoritePhotos() {\n showProgress(this.mProgressBar, this.mRlContent);\n this.mFavoritePhotosViewModel.retrievePhotos();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n if (downloadUrl != null) {\n mStringArrayList.add(downloadUrl.toString());\n }\n startUploading();\n }", "private void saveStudentPhotoToFirebaseStorage(final String studentId) {\n // Show progress bar\n mSavingProgressBar.setVisibility(View.VISIBLE);\n\n // Save photo to firebase storage\n final StorageReference photoRef = mStudentPhotosStorageReference.child(studentId);\n photoRef.putBytes(BitmapUtils.bitmapToByteArray(mViewModel.studentPicBitmap)).addOnSuccessListener(\n new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n photoRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n // On success, get the URL link, which will be saved in the student database\n mFirebaseStoragePhotoUri = uri;\n\n String studentPhoto = mFirebaseStoragePhotoUri.toString();\n String studentName = mStudentNameEditText.getText().toString().toLowerCase().trim();\n int studentSex = mStudentSex;\n long studentBirthdate = mStudentBirthdate;\n int studentGrade = Integer.parseInt(mStudentGradeEditText.getText().toString());\n\n Student newStudent = new Student(studentName, studentSex, studentBirthdate,\n studentGrade, mChosenClassesList, studentPhoto, studentId);\n\n mStudentsDatabaseReference.child(studentId).setValue(newStudent);\n\n finish();\n }\n });\n }\n });\n }", "public void uploadPhotoProfile(FileEntryEvent ev){\n\tArrayList<Photo> listePhotos=new ArrayList<Photo>();\r\n\tlistePhotos=mbb.getMembre().getListePhotos();\r\n\tint idPhotoProfile=0;\r\n\t\r\n\tfor(Photo photo : listePhotos)\r\n\t{\r\n\t\tif(photo.getIsProfil())\r\n\t\t\tidPhotoProfile=photo.getId();\r\n\t}\r\n\t\r\n\tint photoProfileSupprime=PhotoManager.deletePhoto(idPhotoProfile);\r\n\tSystem.out.println(photoProfileSupprime);\r\n\tif(photoProfileSupprime>0)\r\n\t{\r\n\t\t\r\n\t//mettre la main sur le fileEntry\r\n\tFileEntry fiE = (FileEntry)ev.getSource();\r\n\t//récupérer ses results\r\n\tFileEntryResults fr = fiE.getResults();\r\n\t\r\n\t// Create an instance of SimpleDateFormat used for formatting \r\n\t\t\t// the string representation of date (month/day/year)\r\n\t\t\tDateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\r\n\r\n\t\t\t// Get the date today using Calendar object.\r\n\t\t\tDate today = Calendar.getInstance().getTime(); \r\n\t\t\t// Using DateFormat format method we can create a string \r\n\t\t\t// representation of a date with the defined format.\r\n\t\t\tString reportDate = df.format(today);\r\n\t\t\t\r\n\t\r\n\t//boucler sur les FileInfo\r\n\tfor(FileEntryResults.FileInfo fi: fr.getFiles()){\r\n\t\t//s'assurer que le fichier est enregistrer\r\n\t\tif(fi.isSaved()){\r\n\t\t\tSystem.out.println(\"le nom ========= \"+reportDate+fi.getFileName());\r\n\t\t\t//recu le fichier\r\n\t\t\tFile f = fi.getFile();\r\n\t\t\t\r\n\t\t\t//TODO verifier que c'est le bon type de fichier\r\n\t\t\t//renommer\r\n\t\t\ttry {\r\n\t\t\t\tString cheminApp=FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\r\n\t\t\t\tString newch=cheminApp;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tboolean ren=f.renameTo(new File(newch+\"photos/\"+reportDate+fi.getFileName()));\r\n\t\t\t\t\r\n\t\t\t\tif (ren) {\r\n\t\t\t\t\tthis.chemin=\"photos/\"+reportDate+fi.getFileName();\r\n\t\t\t\t\tSystem.out.println(newch);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"pas possible. \"+newch);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//ajouter un message \r\n\t\t\tFacesContext.getCurrentInstance().addMessage(fiE.getClientId(),new FacesMessage(\"le fichier a été uploadé\"));\r\n\t\t\r\n\t\t\tPhoto photo= new Photo();\r\n\t\t\tphoto.setMemberID(mbb.getMembre().getMembreId());\r\n\t\t\tphoto.setChemin(chemin);\r\n\t\t\tphoto.setIsProfil(true);\r\n\r\n\t\t\tint ajoute=PhotoManager.addPhoto(photo);\r\n\t\t\tSystem.out.println(\"photo profile ajoute\");\r\n\t\t\tif(ajoute>0){\r\n\t\t\t\tmbb.getMembre().setListePhotos(PhotoManager.getPhotosByMemberId(mbb.getMembre().getMembreId()));//maj liste photos\r\n\t\t\t\tArrayList<Photo> photos=new ArrayList<Photo>();\r\n\t\t\t\tphotos=PhotoManager.getProfilPhotosByMemberId(mbb.getMembre().getMembreId());\r\n\t\t\t\tmbb.getMembre().setProfilImagePath(photos.get(0).getChemin()); //maj chemin photo profil\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\t\r\n\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n imageFilePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n //Uri contain User URL\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder().setDisplayName(lname).setPhotoUri(uri).build();\n currentUser.updateProfile(profileUpdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n //user info updated succssfully\n saveInformation();\n showMessage(\"Register Complete\");\n updateUI();\n }\n }\n });\n }\n });\n }", "public void saveFile(Bitmap imageToSave, String folder) {\n File folderName = new File(Environment.\n getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), folder);\n\n if (!folderName.exists()) {\n Log.i(TAG, \"Folder doesn't exist, creating it...\");\n boolean rv = folderName.mkdir();\n Log.i(TAG, \"Folder creation \" + (rv ? \"success\" : \"failed\"));\n } else {\n Log.i(TAG, \"Folder already exists.\");\n }\n\n String captured = Global.currUser.email + \"Deja_\" + Global.imageNumber + \".jpg\";\n Global.imageNumber++;\n\n File file = new File(folderName, captured);\n\n try {\n FileOutputStream out = new FileOutputStream(file);\n imageToSave.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n\n Global.uploadImageQueue.add(file.getAbsolutePath());\n Log.d(TAG, \"filePath added: \" + file.getAbsolutePath());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n scanSD(file);\n\n Log.d(TAG, \"+++++++\");\n }", "public void storePhoto(int receiptId, FileArguments args);", "@Override\n public void onSuccess() {\n btn_addPhoto.setText(\"Change Photo\");\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n String filePath = localFile.getPath();\n Bitmap bitmap = BitmapFactory.decodeFile(filePath);\n viewHolder.itemImage.setImageBitmap(bitmap);\n }", "private void notifyUploadSuccess() {\n numberOfDone++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n }", "private void loadActuality(){\n\n Log.i(\"TAG0\", \"TAG0\");\n if (mPaths.size() > 0){\n Log.i(\"TAG1\", \"TAG1\");\n try {\n File file = new File(mPaths.get(0));\n Bitmap bitmap = new Compressor(this)\n .setMaxWidth(320)\n .setMaxHeight(180)\n .setQuality(90)\n .compressToBitmap(file);\n\n Log.i(\"TAG11\", \"TAG11\");\n final String path = getPathFile();\n StorageReference storageReference = FireBaseUtil.mStorageRef.child(path);\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask = storageReference.putBytes(data);\n\n uploadTask.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.i(\"TAG2\", \"TAG2\");\n url = taskSnapshot.getDownloadUrl().toString();\n\n saveFakenews(url, taskSnapshot.getMetadata().getCreationTimeMillis());\n Log.i(\"TAG3\", \"TAG3\");\n uploading.stop();\n Log.i(\"TAG4\", \"TAG4\");\n }\n });\n }catch (IOException ex){\n Log.e(\"TAG\", ex.getMessage());\n }\n }else {\n Toast.makeText(this,\"Veuillez sélectionner une image\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n dialog.dismiss();\n //Display success toast msg\n Toast.makeText(getApplicationContext(), \"Product Saved\", Toast.LENGTH_SHORT).show();\n\n MenuProduct menuCategory = new MenuProduct(txtProductName.getText().toString(),\n txtCategoryName.getText().toString(),txtProductIngredients.getText().toString(), txtProductDescription.getText().toString(),\n Float.parseFloat(txtPrice.getText().toString()),0,\"\",\n taskSnapshot.getDownloadUrl().toString(),Integer.parseInt(txtCal.getText().toString()),\n Integer.parseInt(txtQuantity.getText().toString()));\n\n //Save image info in to firebase database\n String uploadId = mDatabaseRef.push().getKey();\n mDatabaseRef.child(uploadId).setValue(menuCategory);\n\n clearComponents();\n\n }", "private void uploadFile(Uri selectedImageUri) {\n String imageName = UUID.randomUUID().toString();\n StorageReference mStorageRefrence = mStorage.getReference().child(\"driver_images\");\n final StorageReference storageReference = mStorageRefrence.child(imageName);\n storageReference.putFile(selectedImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n dialog.dismiss();\n storageReference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Glide.with(view).load(uri).apply(new RequestOptions().override(150, 150)).into(driverImage);\n\n if (FirebaseAuth.getInstance().getCurrentUser() != null) {\n Map map = new HashMap();\n map.put(\"photo\", uri.toString());\n FirebaseDatabase.getInstance().getReference(Common.user_driver_tbl).child(mAuth.getCurrentUser().getUid()).updateChildren(map, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError databaseError, @NonNull DatabaseReference databaseReference) {\n if (databaseError == null) {\n dialog.dismiss();\n Toast.makeText(DriverHome.this, \" information updated successfully!\", Toast.LENGTH_SHORT).show();\n\n } else {\n dialog.dismiss();\n Toast.makeText(DriverHome.this, \" uploading fialed !\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n }\n });\n }\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n dialog.setMessage(\"uploading \" + (int) progress + \"%\");\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n\n @Override\n public void onFailure(@NonNull Exception e) {\n\n Toast.makeText(DriverHome.this, \"Error \" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n /* .continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n\n // Continue with the task to get the download URL\n return storageReference.getDownloadUrl();\n }\n })*/\n\n }", "public void savePhoto(MyPhoto photo) {\n \t\tContentValues values = new ContentValues();\n \n \t\tUser user = photo.getUser();\n \n \t\tString userName = null;\n \n \t\tif (user != null) {\n \t\t\tuserName = user.getUserName();\n \t\t}\n \n \t\tvalues.put(SQLiteHelper.COLUMN_PARENT_ID, photo.getLocalParentId());\n \t\tvalues.put(SQLiteHelper.COLUMN_GLOBALID, photo.getId());\n \t\tvalues.put(SQLiteHelper.COLUMN_PARENT_GLOBALID, photo.getParentId());\n \t\tvalues.put(SQLiteHelper.COLUMN_PHOTO, photo.getImageAsString());\n \t\tvalues.put(SQLiteHelper.COLUMN_USER, userName);\n \n \t\tLog.v(TAG, \"Saving photo: \" + photo.getImageAsString());\n \n \t\tif (photo.getLocalId() == 0) {\n \t\t\t// Insert\n \t\t\tlong insertId = database.insert(SQLiteHelper.TABLE_PHOTOS, null,\n \t\t\t\t\tvalues);\n \t\t\t// Set local id\n \t\t\tphoto.setLocalId(insertId);\n \n\t\t\tLog.v(TAG, \"Insert: \" + photo.getLocalId());\n \t\t} else {\n \t\t\tString strFilter = SQLiteHelper.COLUMN_ID + \"=\"\n \t\t\t\t\t+ photo.getLocalId();\n \t\t\tdatabase.update(SQLiteHelper.TABLE_PHOTOS, values, strFilter, null);\n \n \t\t\tLog.v(TAG, \"Update\");\n \t\t}\n \n \t}", "@Override\n\tvoid postarFoto() {\n\n\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(final Uri uri) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbBook = database.getReference(\"books\");\n\n Map<String, String> book = new HashMap<>();\n final String book_name = tvDialogCreateBookName.getText().toString();\n book.put(\"book_name\", book_name.substring(0, 1).toUpperCase() + book_name.substring(1));\n book.put(\"author\", tvDialogCreateAuthor.getText().toString());\n book.put(\"book_image\", uri.toString());\n final String bookId = dbBook.push().getKey();\n dbBook.child(bookId).setValue(book, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError databaseError, @NonNull DatabaseReference databaseReference) {\n if (databaseError == null){\n final Snackbar snackbar = Snackbar.make(findViewById(R.id.BookActivity), \"Thêm thành công\", Snackbar.LENGTH_LONG);\n snackbar.setAction( \"Thêm thông tin ?\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackbar.dismiss();\n Intent intent = new Intent(BookActivity.this, Input_Details_BookActivity.class);\n intent.putExtra(\"book_id\",bookId);\n intent.putExtra(\"book_image\", uri.toString());\n intent.putExtra(\"author\", tvDialogCreateAuthor.getText().toString());\n intent.putExtra(\"book_name\",book_name.substring(0, 1).toUpperCase() + book_name.substring(1));\n startActivity(intent);\n }\n });\n snackbar.setActionTextColor(Color.GREEN);\n snackbar.show();\n dialogCreateBook.cancel();\n progressDialog.dismiss();\n }else { Toast.makeText(BookActivity.this, \"Thêm thất bại\", Toast.LENGTH_SHORT).show(); }\n }\n });\n }\n });\n }", "@Override\n public void onClick(View v) {\n progressDialog = new ProgressDialog(activity,\n R.style.MMBAppTheme);\n progressDialog.setIndeterminate(true);\n progressDialog.setMessage(\"Saving Data\");\n progressDialog.show();\n\n //Save path to Shared Pref\n SharedPrefManager.getInstance(activity).saveStringInfoToSharedPreferences(activity, \"profileImageFilePath\", profileImageFilePathForLocalSaving);\n try {\n uploadProfileImage(); //FIXME: should not happen here but in the next screen\n } catch (ExecutionException | InterruptedException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n Intent intent = new Intent(AppoinmentDetails.this, Payments.class);\n Bundle b = new Bundle();\n b.putString(\"total\",Totalfee);\n b.putString(\"timeperpatient\",timeperpatient);\n b.putString(\"number\",number );\n b.putString(\"consulID\",consulID);\n b.putString(\"Bill\",downloadUrl.toString());\n\n ByteArrayOutputStream baos=new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.PNG,100, baos);\n byte [] arr=baos.toByteArray();\n String result= Base64.encodeToString(arr, Base64.DEFAULT);\n\n b.putString(\"bitmap\",result);\n intent.putExtras(b);\n progressBar.setVisibility(View.GONE);\n startActivity(intent);\n finish();\n }", "@Override\n public void onSuccess(Uri uri) {\n\n reference2.child(type).setValue(uri.toString());\n\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }", "public void saveContact(View view) {\n EditText nameField = (EditText) findViewById(R.id.name);\n EditText emailField = (EditText) findViewById(R.id.email);\n EditText phoneField = (EditText) findViewById(R.id.phone);\n String name = nameField.getText().toString();\n String email = emailField.getText().toString();\n String phone = phoneField.getText().toString();\n String image = name.replace(' ', '_') + \".jpg\";\n\n //create and save image to internal storage, and save image name in DB\n Bitmap bitmap = null;\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n File directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\n\n File mypath = new File(directory, image);\n\n FileOutputStream fos = null;\n\n //create bitmap Image\n try{\n bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), selectedImageUri);\n fos = new FileOutputStream(mypath);\n bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n //Save directory to use for specifying path of image\n setDir(directory.getAbsolutePath());\n\n int end = 0;\n\n //update contacts info and image\n for(int i=0; i < contacts.size(); i++){\n name = nameField.getText().toString();\n email = emailField.getText().toString();\n phone = phoneField.getText().toString();\n if(contacts.get(i).name.equals(name)){\n contacts.get(i).setEmail(email);\n contacts.get(i).setMobile(phone);\n contacts.get(i).setImage(image);\n contactRepository.update(contacts.get(i));\n }else{\n end += 1;\n }\n }\n\n if(end == contacts.size()){\n contactRepository.insert(new Contact(image, name, email, phone));\n }\n\n Toast.makeText(this, \"Contact saved\",\n Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n progressBar.setVisibility(View.GONE);\n Toast.makeText(getContext(), \"Your file is saved in \" + localFile.toString(), Toast.LENGTH_LONG).show();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n\n if (uriTask.isSuccessful()){\n\n\n //setup data to save\n HashMap<String,Object> hashMap = new HashMap<>();\n hashMap.put(\"uid\",\"\"+firebaseAuth.getUid());\n hashMap.put(\"email\",\"\"+email);\n hashMap.put(\"name\",\"\"+fullName);\n hashMap.put(\"phone\",\"\"+phoneNumber);\n hashMap.put(\"address\",\"\"+address);\n hashMap.put(\"timestamp\",\"\"+timestamp);\n // hashMap.put(\"code\",\"\"+code);\n hashMap.put(\"accountType\",\"User\");\n // hashMap.put(\"online\",\"true\");\n hashMap.put(\"profileImage\",\"\"+downloadImageUri); //url of uploaded image\n\n //save to db\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"SchoolFirst\");\n ref.child(firebaseAuth.getUid()).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //db updated\n progressDialog.dismiss();\n startActivity(new Intent(RegisterUserActivity.this,MainActivity.class));\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //failed updating db\n progressDialog.dismiss();\n startActivity(new Intent(RegisterUserActivity.this,MainActivity.class));\n finish();\n }\n });\n\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.setMessage(\"Please wait\");\n progressDialog.dismiss();\n Task<Uri> downloadUrl = taskSnapshot.getStorage().getDownloadUrl();\n image = downloadUrl.toString();\n //Toast.makeText(StudententryActivity.this, \"image path\"+image, Toast.LENGTH_SHORT).show();\n Log.e(\"path\",\"path\"+downloadUrl);\n // Picasso.get().load(downloadUrl).into(imageview);\n Glide.with(context).load(downloadUrl).placeholder(R.mipmap.ic_launcher).into(imageview);\n //imageview.setBackground();\n Toast.makeText(StudententryActivity.this, \"Student Image Set Success\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n StorageReference downloadUrl = taskSnapshot.getStorage();\n downloadImage(downloadUrl);\n Log.e(\"downloadUrl\", \" \" + downloadUrl);\n\n\n }", "private void saveImage(Bitmap bitmap, String fileName) {\n File createFolder = new File(Environment.getExternalStorageDirectory(), FILEPATH);\n if (!createFolder.exists())\n createFolder.mkdir();\n\n File output = new File(Environment.getExternalStorageDirectory(),\n FILEPATH + \"/\" + fileName + \".jpg\");\n if (output.exists()) {\n output.delete();\n\n /*Whenever you delete a file, let MediaStore Content Provider knows about it*/\n// getContentResolver().delete(Uri.fromFile(output), null, null);\n }\n\n// System.currentTimeMillis()\n File saveImage = new File(createFolder, fileName + \".jpg\");\n try {\n OutputStream outputStream = new FileOutputStream(saveImage);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n if (saveImage.exists()) {\n /*Whenever you add a file, let MediaStore Content Provider knows about it using*/\n sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(saveImage)));\n\n\n publishResults(fileName, result);//output.getAbsolutePath()\n Log.v(TAG, fileName + \", size : \" + saveImage.getAbsoluteFile().length());\n }\n } catch (FileNotFoundException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n }\n }", "@Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()) {\n Uri downloadUri = task.getResult();\n String mUri = downloadUri.toString();\n //Log.d(\"uri\", mUri);\n\n //get firebase reference, update map w/ profilePic, and update map in reference\n reference = FirebaseDatabase.getInstance().getReference(\"USERS\").child(firebaseUser.getUid());\n HashMap<String, Object> map = new HashMap<>();\n map.put(\"ProfilePic\", mUri);\n reference.updateChildren(map);\n\n pd.dismiss();\n }\n //if task not successful --> show toast\n else {\n Toast.makeText(getApplicationContext(), \"Upload failed!\", Toast.LENGTH_SHORT).show();\n pd.dismiss();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }", "private void savePhotoFiles(Bitmap anypicImage, Uri uri) {\n\t\tMatrix matrix = new Matrix();\n\t\t// matrix.postRotate(90);\n\t\tBitmap rotatedImage = Bitmap.createBitmap(anypicImage, 0, 0,\n\t\t\t\tanypicImage.getWidth(), anypicImage.getHeight(), matrix, true);\n\n\t\t// make thumbnail with size of 86 pixels\n\t\tBitmap anypicThumbnail = Bitmap.createScaledBitmap(anypicImage, 86, 86,\n\t\t\t\tfalse);\n\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\trotatedImage.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n\t\tbyte[] rotatedData = bos.toByteArray();\n\n\t\tbos.reset(); // reset the stream to prepare for the thumbnail\n\t\tanypicThumbnail.compress(Bitmap.CompressFormat.JPEG, 100, bos);\n\t\tbyte[] thumbnailData = bos.toByteArray();\n\n\t\ttry {\n\t\t\t// close the byte array output stream\n\t\t\tbos.close();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Create the ParseFiles and save them in the background\n\t\timage = new ParseFile(\"photo.jpg\", rotatedData);\n\t\tsong = new ParseFile(\"song.\"\n\t\t\t\t+ songPath.substring(songPath.length() - 3),\n\t\t\t\tconvertAudioToByte(uri));\n\t\tthumbnail = new ParseFile(\"photo_thumbnail.jpg\", thumbnailData);\n\t\timage.saveInBackground(new SaveCallback() {\n\t\t\t@Override\n\t\t\tpublic void done(ParseException e) {\n\t\t\t\tif (e != null) {\n\t\t\t\t\tToast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\"Error saving image file: \" + e.getMessage(),\n\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t} else {\n\t\t\t\t\t// saved image to Parse\n\t\t\t\t\tgetCurrentPhoto().setImage(image);\n\t\t\t\t\tgetCurrentPhoto().setThumbnail(thumbnail);\n\t\t\t\t\tgetCurrentPhoto().setSong(song);\n\t\t\t\t\t//getCurrentPhoto().setUploadCount((songCount.intValue()+1));\n\t\t\t\t\tgData.setUploadCount(1+gData.getUploadCount());\n\t\t\t\t\tParseUser.getCurrentUser().put(\"uploadCount\",gData.getUploadCount());\n\t\t\t\t\tParseUser.getCurrentUser().saveInBackground();\n\n\t\t\t\t\tif (publicUpload) {\n\t\t\t\t\t\tgetCurrentPhoto().setVisiblity(publicUpload);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tgetCurrentPhoto().setVisiblity(privateUpload);\n\n\t\t\t\t\t}\n\t\t\t\t\tgetCurrentPhoto().setSongTitle(songTitle);\n\t\t\t\t\tgetCurrentPhoto().setArtistName(artistName);\n\t\t\t\t\tgetCurrentPhoto().setUser(ParseUser.getCurrentUser());\n\t\t\t\t\tgetCurrentPhoto().setSongSize(fileSize);\n\n\t\t\t\t\tgData.setUsedSpace(gData.getUsedSpace()+fileSize);\n\t\t\t\t\tParseUser.getCurrentUser().put(\"usedSpace\",gData.getUsedSpace());\n\t\t\t\t\tParseUser.getCurrentUser().saveInBackground();\n\t\t\t\t\t//getCurrentPhoto().setUsedSpace(\n\t\t\t\t\t\t\t//(value.intValue() + fileSize));\n\t\t\t\t\tdoe();\n\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tLog.i(\"dsd\", \"Finished saving the photos to ParseFiles!\");\n\n\t}", "private void processAndSetImage() {\n\n // Resample the saved image to fit the ImageView\n mResultsBitmap = resamplePic(this, mTempPhotoPath);\n\n// tv.setText(base64conversion(photoFile));\n//\n// Intent intent = new Intent(Intent.ACTION_SEND);\n// intent.setType(\"text/plain\");\n// intent.putExtra(Intent.EXTRA_TEXT, base64conversion(photoFile));\n// startActivity(intent);\n\n /**\n * UPLOAD IMAGE USING RETROFIT\n */\n\n retroFitHelper(base64conversion(photoFile));\n\n // Set the new bitmap to the ImageView\n imageView.setImageBitmap(mResultsBitmap);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n imageFilePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n // uri contain user image url\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }\n });\n\n\n\n\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n imageFilePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n // uri contain user image url\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }\n });\n\n\n\n\n\n }", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n System.out.println(\"picturex\");\n\n File mediaStorageDir = new File(\n Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n \"Aloah\");\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n System.out.println(\"failed to create directory\");\n return;\n }\n }\n\n File pictureFile = new File(mediaStorageDir.getPath() +\n File.separator + \"photo\" + System.currentTimeMillis() + \".png\");\n\n try {\n FileOutputStream fos = new FileOutputStream(pictureFile);\n fos.write(data);\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n attachMetaData(pictureFile);\n\n System.out.println(\"Path taken photo: \" + pictureFile.getAbsolutePath());\n String path = pictureFile.getAbsolutePath();\n\n\n Intent intentResult = new Intent();\n intentResult.putExtra(PHOTO_PATH, path);\n setResult(RESULT_OK, intentResult);\n finish();\n\n// try {\n// FileOutputStream stream = new FileOutputStream(file);\n// bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n// stream.close();\n//\n// System.out.println(\"picturex added to downloads\");\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }", "private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void saveAvatar(Bitmap avatar) {\n String strAvatarFilename = \"avatar.jpg\";\r\n try {\r\n avatar.compress(CompressFormat.JPEG,\r\n 100, openFileOutput(strAvatarFilename, MODE_PRIVATE));\r\n } catch (FileNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n// TODO: Determine the Uri to the local avatar.jpg file\r\n\r\n// TODO: Save the Uri path as a String preference\r\n Uri imageUri = Uri.fromFile(new File(getFilesDir(), strAvatarFilename));\r\n// TODO: Update the ImageButton with the new image\r\n ImageButton ava = (ImageButton) findViewById(R.id.avatar);\r\n\r\n ava.setImageURI(imageUri);\r\n String curimg = imageUri.getPath().toString();\r\n\r\n Editor edit = mGameSettings.edit();\r\n edit.putString(GAME_PREFERENCES_AVATAR, curimg);\r\n edit.commit();\r\n\r\n String userName = mGameSettings.getString(GAME_PREFERENCES_USERNAME, null);\r\n String avatarName = userName + \"Avatar\";\r\n String filePath = curimg;\r\n String description = \"My player avatar \";\r\n App42API.initialize(this, \"33febecb03a579e972755eccde307dd94a279b5cfe348f845b8762f8e3feb2d6\",\r\n \"b5be405b4e76d40a94cdc01250311205b5a7c7b2dc4d003714f24d0df3e219f8\");\r\n AvatarService avatarService = App42API.buildAvatarService();\r\n App42API.setOfflineStorage(true);\r\n avatarService.createAvatar(avatarName, userName, filePath, description, new App42CallBack() {\r\n public void onSuccess(Object response) {\r\n Avatar avatar = (Avatar) response;\r\n System.out.println(\"avatarName is :\" + avatar.getName());\r\n System.out.println(\"url is :\" + avatar.getURL());\r\n System.out.println(\"tinyUrl is :\" + avatar.getTinyURL());\r\n System.out.println(\"createdOn is :\" + avatar.getCreatedOn());\r\n System.out.println(\"Description is :\" + avatar.getDescription());\r\n System.out.println(\"Is Current :\" + avatar.isCurrent());\r\n System.out.println(\"UserName is :\" + avatar.getUserName());\r\n }\r\n\r\n public void onException(Exception ex) {\r\n System.out.println(\"Exception Message\" + ex.getMessage());\r\n }\r\n });\r\n\r\n\r\n }", "private void uploadData() {\n if (imageUri != null) {\n final StorageReference fileReference = firebaseStorage.child(\"imageUploads\")\n .child(System.currentTimeMillis() + \".\" + getFileExtension(imageUri));\n\n uploadTask = fileReference.putFile(imageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n progressBar.setProgress(0);\n\n }\n //delay upload\n }, 500);\n\n //upload success\n //progressDialog.dismiss();\n Task<Uri> downloadUrl = fileReference.getDownloadUrl();\n downloadUrl.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n imageReference = uri.toString();\n String uploadId = firebaseDatabase.push().getKey();\n\n SimpleDateFormat sdf = new SimpleDateFormat(\"dd.MM.yyyy 'at' HH:mm z\");\n\n Toast.makeText(SellActivity.this, \"Posting Successful\", Toast.LENGTH_LONG).show();\n ImageUpload upload =\n new ImageUpload(editTextTitle.getText().toString().trim(),\n editTextDesc.getText().toString().trim(),\n imageReference,\n category.trim(),\n price,\n uploadId,\n user.getUid(),\n sdf.format(new Date()));\n\n firebaseDatabase.child(\"category\").child(category).child(uploadId).setValue(upload);\n\n\n //store user's listing history\n firebaseDatabase.child(\"users\").child(user.getUid()).child(\"Sell History\").child(uploadId).setValue(upload);\n firebaseDatabase.child(\"users\").child(user.getUid()).child(\"Sell Current\").child(uploadId).setValue(upload);\n\n endTask();\n\n }\n });\n }\n\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n //upload fail\n //progressDialog.dismiss();\n Toast.makeText(SellActivity.this, \"Posting Unsuccessful\", Toast.LENGTH_SHORT).show();\n\n }\n\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot taskSnapshot) {\n\n //show progress while image is uploaded\n double progress = (100.0 * taskSnapshot.getBytesTransferred() / taskSnapshot.getTotalByteCount());\n if (progress < 20) {\n progress = 20;\n }\n progressBar.setProgress((int) progress);\n\n }\n });\n\n } else {\n Toast.makeText(this, \"No file selected\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(TAG, \"Image upload done\");\n\n Intent intent = new Intent(Signup2.this, Signup3.class);\n intent.putExtra(\"facialID\", facialID.toString());\n /* pass the facial id to the next activity*/\n findViewById(R.id.loadingPanel).setVisibility(View.GONE);\n startActivity(intent);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n if (downloadUrl != null) {\n mPlayer.image = downloadUrl.toString();\n savePlayerInfo();\n ToastUtils.show(R.string.toast_profile_saved, Toast.LENGTH_SHORT);\n } else {\n ToastUtils.show(R.string.toast_error_generic, Toast.LENGTH_SHORT);\n }\n showProgress(false);\n }", "public void addImage(Bitmap bm) {\n ByteArrayOutputStream stream = new ByteArrayOutputStream();\n bm.compress(Bitmap.CompressFormat.JPEG, 100, stream);\n byte[] bytes = stream.toByteArray();\n try {\n File file = new File(this.getCacheDir(), \"image.jpg\");\n file.createNewFile();\n FileOutputStream fos = new FileOutputStream(file);\n fos.write(bytes);\n fos.flush();\n fos.close();\n RequestBody rb = RequestBody.create(MediaType.parse(\"multipart/form-data\"), file);\n MultipartBody.Part body = MultipartBody.Part.createFormData(\"files\", file.getName(), rb);\n Url url = new Url();\n Call<ImageFile> imgCall = url.createInstanceofRetrofit().uploadImage(body);\n imgCall.enqueue(new Callback<ImageFile>() {\n\n @Override\n public void onResponse(Call<ImageFile> call, Response<ImageFile> response) {\n venueimage.setText(response.body().getFilename());\n }\n\n @Override\n public void onFailure(Call<ImageFile> call, Throwable t) {\n Toast.makeText(VenueAdd.this, t.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n } catch (Exception e) {\n Toast.makeText(VenueAdd.this, e.getMessage(), Toast.LENGTH_LONG).show();\n }\n }" ]
[ "0.6820895", "0.66400516", "0.66160506", "0.64096117", "0.63976556", "0.62593126", "0.62288463", "0.6228435", "0.62136334", "0.6204605", "0.620438", "0.620438", "0.6192825", "0.6180728", "0.61805993", "0.61680764", "0.61548275", "0.61470747", "0.6121007", "0.61097896", "0.6098792", "0.6085816", "0.60854685", "0.6079566", "0.6070848", "0.6063729", "0.6041282", "0.6040814", "0.60348624", "0.6024091", "0.60194474", "0.6018396", "0.60028356", "0.59982276", "0.598494", "0.5979648", "0.5979076", "0.59576845", "0.5955982", "0.5944827", "0.5942307", "0.5940565", "0.59264433", "0.5922699", "0.592124", "0.5917226", "0.591423", "0.5913496", "0.59038883", "0.5902788", "0.5902516", "0.59019905", "0.5892031", "0.5885323", "0.58833444", "0.58819485", "0.58810675", "0.587881", "0.5876325", "0.58760834", "0.58752245", "0.5874187", "0.5871457", "0.5854326", "0.58537185", "0.5846406", "0.5845537", "0.583325", "0.5832313", "0.5829794", "0.5828783", "0.58243537", "0.5822365", "0.58114725", "0.58075935", "0.5802457", "0.5802206", "0.5800758", "0.58000016", "0.57997334", "0.57967454", "0.57802564", "0.57801044", "0.5776154", "0.5773779", "0.5773085", "0.57712984", "0.5770643", "0.5762416", "0.57524717", "0.5751711", "0.57504016", "0.57504016", "0.5749193", "0.57429254", "0.5741475", "0.57392347", "0.57375646", "0.5737493", "0.573311" ]
0.6061669
26
When the photo already saved or another photo with same Id (should never happen), exist in the default downloads folder, we just notify the user with a message (UI message).
@Override public void onAlreadySaved(@NonNull PhotoCache photoCache) { Toast.makeText(context, "The file already exist in:\n" + DEFAULT_PATH, Toast.LENGTH_SHORT).show(); notifyAfterDownloadingProgress(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void BitmapDownloadSuccess(String photoId, String mealId)\n {\n\n refreshUI();\n }", "@Override\n public void onSaved(@NonNull PhotoCache photoCache) {\n\n boolean addStatus = localPhotosUtil.add(photoCache.getPhotoId(),\n photoCache.getFormatExtension());\n if (addStatus) {\n Toast.makeText(context, \"Successfully Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(context, \"Something wrong while adding to Downloads\",\n Toast.LENGTH_SHORT).show();\n }\n notifyAfterDownloadingProgress();\n }", "private void notifyAfterDownloadingProgress() {\n if (inDownloadingProgress.contains(photoId)) {\n inDownloadingProgress.remove(photoId);\n onFinishDownloadingListener.notifyItemDownloaded(photoId, position);\n }\n else {\n onFinishDownloadingListener.notifyUnexpected();\n }\n }", "private void showUploadFinishedNotification(@Nullable Uri downloadUrl, @Nullable Uri fileUri) {\n Intent intent = new Intent(this, FirebaseActivity.class)\n .putExtra(EXTRA_DOWNLOAD_URL, downloadUrl)\n .putExtra(EXTRA_FILE_URI, fileUri)\n .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\n // Make PendingIntent for notification\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0 /* requestCode */, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Set message and icon based on success or failure\n boolean success = downloadUrl != null;\n String message = success ? \"Upload finished\" : \"Upload failed\";\n int icon = success ? R.drawable.ic_menu_gallery : R.drawable.ic_menu_gallery;\n\n NotificationCompat.Builder builder = (NotificationCompat.Builder) new NotificationCompat.Builder(this)\n .setSmallIcon(icon)\n .setContentTitle(getString(R.string.app_name))\n .setContentText(message)\n .setAutoCancel(true)\n .setContentIntent(pendingIntent);\n\n NotificationManager manager =\n (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n\n manager.notify(NOTIF_ID_DOWNLOAD, builder.build());\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n taskSnapshot.getMetadata().getReference().getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n FirebaseStorage.getInstance().getReference().child(\"faculty_images\").child(imageIdentifier).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Useremail.photouri = uri;\n FirebaseFirestore.getInstance().collection(\"Faculty_Bag\").document(Useremail.email).update(\"photo_uri\",Useremail.photouri.toString()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Showfancytoasr.show(MainActivity.this,\"Uploading process was successful\");\n progressDialog.dismiss();\n finish();\n startActivity(getIntent());\n }\n });\n }\n });\n }\n }\n });\n }", "private void checkForOrphanFiles() {\n List<String> dbFileNames = getPhotoFilesInDatabase();\n List<String> dirFileNames = getPhotoFilesInDirectory();\n\n // Find files that are not in the db.\n dirFileNames.removeAll(dbFileNames);\n\n // Create a new photo shoot for the orphaned photos.\n if (dirFileNames.size() > 0) {\n long shootId = createOrphanShoot(dirFileNames);\n\n GhostPhotoPreferences.setHasOrphanPhotoShootBeenCreated(getApplicationContext(), true);\n Log.d(LOG_TAG, \"checkForOrphanFiles: Created orphan photo shoot: \" + shootId);\n }\n }", "public void savePhoto() {\n\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\tSystem.err.println(\"save photo: url----------\" + url);\n\n\t\ttry {\n\n\t\t\t// if not uploading file\n\t\t\tif (url == null || url.equals(\"null\") || url.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_warn_info\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_warn_charge_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.err.println(\"etudiantid:\" + this.dossierEtudiantId);\n\n\t\t\tif (this.dossierEtudiantId == null || this.dossierEtudiantId.equals(\"null\")\n\t\t\t\t\t|| this.dossierEtudiantId.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_passage_parametres_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tdossierEtudiantDto = dossierEtudiantService.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tDossierEtudiantDto oldDossierEtudiant = dossierEtudiantService\n\t\t\t\t\t.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tif (oldDossierEtudiant.getPhoto() == null || oldDossierEtudiant.getPhoto().trim().isEmpty()) {\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"--------oldDossierEtudiant---------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\t\t\t\tSystem.err.println(\"-----------------file moved------\");\n\t\t\t\t// deleteTempFileByName(url);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif (!oldDossierEtudiant.getPhoto().equals(url)) {\n\n\t\t\t\t// String oldUrl = oldDossierEtudiant.getPhoto();\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"-------------------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\n\t\t\t\t// deleteFileByName(oldUrl);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t}\n\n\t\t} catch (Exception e2) {\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_echec\") + \": \"\n\t\t\t\t\t+ bundleDocument.getString(\"document_error_persistence_photo\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\tlog.info(e2.getMessage());\n\t\t}\n\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n fotoReferencia.getDownloadUrl()\n .addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Mensaje mensajeFoto = new Mensaje\n (nombreUsuario,\n \"Ha enviado una foto\",\n FirebaseAuth.getInstance().getCurrentUser()\n .getPhotoUrl().toString(),\n \"2\",\n DateFormat.getTimeInstance().format\n (Timestamp.now().toDate()),\n uri.toString(),\n idUsuario,\n idVeterinario);\n db.collection(\"chat\")\n .document(idChat)\n .collection(\"mensajes\")\n .add(mensajeFoto);\n }\n });\n }", "@Override\n public void onClick(View view) {\n if(!titleNameofFiles.contains(content.getFileName())) {\n // Download the content\n //Toast.makeText(getActivity(), \"::Download process begins:: with url:\" + content.getDownloadUrl(), Toast.LENGTH_SHORT).show();\n Log.i(\"url:\", content.getDownloadUrl());\n// new ContentDownloader(getActivity()).downloadFile(content.getDownloadUrl(),content.getTitle(),choosenSubject,choosenType);\n AnotherContentDownloader.getInstance(getActivity()).downloadFile(content.getDownloadUrl(), content.getFileName(), choosenSubject, choosenType);\n\n }else{\n Toast.makeText(getActivity(),\" You already have downloaded this file!\",Toast.LENGTH_SHORT).show();\n }\n DialogFragment dialog = (DialogFragment) getFragmentManager().findFragmentByTag(\"Download\");\n dialog.dismiss();\n }", "private void onPhotoError() {\n ToastModifications.createToast(this, getString(R.string.error_saving_photo), Toast.LENGTH_LONG);\n }", "@Override\n public void onSavingFailed(@NonNull IOException e) {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "public static boolean isDownloadingNow(final String photoId) {\n return inDownloadingProgress.contains(photoId);\n }", "private void showUploadFinishedNotification(@Nullable Uri downloadUrl, @Nullable Uri fileUri) {\n dismissProgressNotification();\n\n // Make Intent to UploadActivity\n Intent intent = new Intent(this, Upload_Video_activity.class)\n .putExtra(EXTRA_DOWNLOAD_URL, downloadUrl)\n .putExtra(EXTRA_FILE_URI, fileUri)\n .addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n\n boolean success = downloadUrl == null;\n String caption=\"\" ;\n if (success==true)\n {\n caption=\"Upload fail\";\n }\n else if (success==false)\n {\n caption=\"Upload Complete\";\n }\n\n showFinishedNotification(caption, intent);\n }", "public void addPhoto(ActionEvent event) throws IOException {\n\t\t//System.out.println(\"ITEM ADDED______________________________________________\");\n\t\tFileChooser fileChooser = new FileChooser();\n\t\tfileChooser.setTitle(\"Open Photo\"); \n\t\tAccessibleUsersList.masterUserList.userLoggedIn.fileList = fileChooser.showOpenMultipleDialog(this.myNewStage);\n\t\t\n\t\tboolean checkIfImages = true;\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null){\n\t\t\t\n\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\n\t\t\t\tMimetypesFileTypeMap mimetype= new MimetypesFileTypeMap();\n\t\t\t\tmimetype.addMimeTypes(\"image png jpg jpeg JPG PNG\");\t\n\t\t\t\t\n\t\t\t\tString mimetype1 = mimetype.getContentType(file);\n\t\t\t\tString type = mimetype1.split(\"/\")[0];\n\t\t\t\t\n\t\t\t\tif(type.contains(\"image\")){\n\t\t\t //System.out.println(\"It's an image\");\n\t\t\t\t} else { \n\t\t\t \t //System.out.println(\"It's NOT an image\");\n\t\t\t \t Alert majorBagAlert = new Alert(AlertType.ERROR);\n\t\t\t\t majorBagAlert.setTitle(\"Error\");\n\t\t\t\t majorBagAlert.setHeaderText(\"One or more images is not an image file type.\");\n\t\t\t\t majorBagAlert.setContentText(\"Please enter photo(s) again\");\n\t\t\t\t majorBagAlert.showAndWait();\n\t\t\t \t \n\t\t\t\t //adding comment\n\t\t\t checkIfImages = false; \n\t\t\t }\n\t\t\t}\n }\n\t\t\n\n\t\t//iterate through the logged in user's albums \n\t\t//this is the album we have to add our photos to \n\t\tthis.selectedAlbum = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getName(); \n\t\tAlbum foundAlbum = null; \n\t\tlong lastModifiedDate = 0; \n\t\tString path; \n\t\t\n\t\t//if we are certain we only collected files of type jpg, png or jpeg \n\t\tif(checkIfImages){\n\t\t\t\n\t\t\tif(AccessibleUsersList.masterUserList.userLoggedIn.fileList != null) {\n\t\t\t\t\n\t\t\t\tfor(File file : AccessibleUsersList.masterUserList.userLoggedIn.fileList){\n\t\t\t\t\t\n\t\t\t\t\tpath = file.getAbsolutePath();\n\t\t\t\t\tFileInputStream inputstream = new FileInputStream(path); \n\t\t\t\t\tImage image1 = new Image(inputstream); \n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t//iterate through the logged in user's albums \n\t\t\t\t\tint x=0; \n\t\t\t\t\tfor(Album album: AccessibleUsersList.masterUserList.userLoggedIn.albums_list){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//looking for the current album to add our photos into \n\t\t\t\t\t\tif(album.getName().equals(this.selectedAlbum)){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfoundAlbum = AccessibleUsersList.masterUserList.userLoggedIn.albums_list.get(x);\n\t\t\t\t\t\t\tlastModifiedDate = file.lastModified();\n\t\t\t\n\t\t\t\t\t\t\tPhoto albumPhoto = new Photo(path, lastModifiedDate); \n\t\t\t\t\t\t\tfoundAlbum.getAlbum().add(albumPhoto);\t \n\t\t\t\t\t\t\t//System.out.println(foundAlbum.getAlbum());\n\t\t\t\t\t\t\t//foundAlbum.photos.add(new model.Photo(image1, lastModifiedDate));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tImageView pic = new ImageView();\n\t\t\t\t\t\t\tpic.setFitWidth(340);\n\t\t\t\t\t\t\tpic.setFitHeight(180);\n\t\t\t\t\t\t\tpic.setImage(image1);\n\t\t\t\t\t\t\tlistOfPhotos.add(pic);\n\t\t\t\t\t\t\talbumPhoto.setImage(pic);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//System.out.println(\"photo added\");\n\t\t\t\t\t\t\t//System.out.println(albumPhoto.getPathToPhoto());\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn);\n\t\t\t\t\t\t\t//System.out.println(AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.addPhoto(albumPhoto); <-----cause of bug, added photo TWICE, X\n\t\t\t\t\t\t\tbreak; \n\t\t\t\t\t\t} \n\t\t\t\t\t\tx++; \n\t\t\t\t\t}\n \t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\t\n\t}", "public FileUpload verifyFileUploadExistenceById(Long id);", "@Override\n public void onClick(View view) {\n StorageReference myfileRef = storageRef.child(email).child(\"ProfPic.jpg\");\n //StorageReference myfileRef = storageRef.child(\"ProfPic.jpg\");\n viewImage.setDrawingCacheEnabled(true);\n viewImage.buildDrawingCache();\n Bitmap bitmap = viewImage.getDrawingCache();\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, baos);\n byte[] data = baos.toByteArray();\n\n UploadTask uploadTask = myfileRef.putBytes(data);\n uploadTask.addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n Toast.makeText(ProfilePicture.this, \"TASK FAILED\", Toast.LENGTH_SHORT).show();\n }\n }).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Toast.makeText(ProfilePicture.this, \"Upload Successful!\", Toast.LENGTH_SHORT).show();\n //progressBar.setVisibility(View.GONE);\n\n Uri downloadUrl =taskSnapshot.getDownloadUrl();\n String DOWNLOAD_URL = downloadUrl.getPath();\n Log.v(\"Download URL\", DOWNLOAD_URL);\n Toast.makeText(ProfilePicture.this, DOWNLOAD_URL, Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n photoUrl = taskSnapshot.getDownloadUrl();\r\n prosesUpdate();\r\n }", "private void notifyUploadSuccess() {\n numberOfDone++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public void startInlineDownloading() {\n inDownloadingProgress.add(photoId);\n if (fullPhotosCaching.containsKey(photoId)) {\n final PhotoCache photoCache = fullPhotosCaching.get(photoId);\n saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this);\n }\n else {\n getPhotoCache(photoId, DEFAULT_PATH, context, this);\n }\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n progressBar.setVisibility(View.GONE);\n Toast.makeText(getContext(), \"Your file is saved in \" + localFile.toString(), Toast.LENGTH_LONG).show();\n }", "private void sendNotification(Download download) {\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent i = new Intent(\n\t\t\t\t\t\tIntent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n\n\t\t\t\tif(isAdded())\n\t\t\t\t\tstartActivityForResult(i, RESULT_LOAD_POST_IMAGE);\n\t\t\t\telse{\n\t\t\t\t\tstatusAlert.dismiss();\n\t\t\t\t\tToast.makeText(getActivity(), \"Something went wrong.Try sharing your updates again.\", 1000).show();\n\t\t\t\t}\n\t\t\t}", "private void notifyUploadFail() {\n numberOfFail++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "private void find_user_sendimage_notifaction() {\r\n FirebaseDatabase.getInstance().getReference().child(DataManager.NotifactionUserRoot).child(FirebaseAuth.getInstance().getCurrentUser().getUid())\r\n .addValueEventListener(new ValueEventListener() {\r\n @Override\r\n public void onDataChange(DataSnapshot dataSnapshot) {\r\n if (dataSnapshot.exists()) {\r\n if (dataSnapshot.hasChild(DataManager.UserFullname)) {\r\n String name = dataSnapshot.child(DataManager.UserFullname).getValue().toString();\r\n if (!name.isEmpty()) {\r\n send_image_notfaction(name);\r\n }\r\n }\r\n }\r\n }\r\n\r\n @Override\r\n public void onCancelled(DatabaseError databaseError) {\r\n\r\n }\r\n });\r\n }", "boolean canTakeNewPhoto();", "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "private void setFinalNotification() {\n //finished downloading all files\n // update notification\n String note = getResources().getString(R.string.update_complete);\n mBuilder.setContentTitle(note)\n .setContentText(\"\")\n .setSmallIcon(R.drawable.ic_launcher_mp)\n .setTicker(note)\n .setProgress(0, 0, false);\n nm.notify(0, mBuilder.build());\n }", "@Override\n public void onSaveAttachmentToUserProvidedDirectory(final AttachmentViewInfo attachment) {\n MessageViewFragment fragment = messageViewFragmentWeakReference.get();\n if (fragment == null) {\n return;\n }\n\n Intent intent = new Intent();\n intent.putExtra(\"attachmentInfo\", attachment);\n FileBrowserHelper.getInstance().showFileBrowserActivity(fragment, null,\n MessageViewFragment.ACTIVITY_CHOOSE_DIRECTORY, new FileBrowserHelper.FileBrowserFailOverCallback() {\n @Override\n public void onPathEntered(String path) {\n getAttachmentController(attachment).saveAttachmentTo(path);\n }\n\n @Override\n public void onCancel() {\n // Do nothing\n }\n }, intent);\n\n }", "private void saveImage(Bitmap bitmap, String fileName) {\n File createFolder = new File(Environment.getExternalStorageDirectory(), FILEPATH);\n if (!createFolder.exists())\n createFolder.mkdir();\n\n File output = new File(Environment.getExternalStorageDirectory(),\n FILEPATH + \"/\" + fileName + \".jpg\");\n if (output.exists()) {\n output.delete();\n\n /*Whenever you delete a file, let MediaStore Content Provider knows about it*/\n// getContentResolver().delete(Uri.fromFile(output), null, null);\n }\n\n// System.currentTimeMillis()\n File saveImage = new File(createFolder, fileName + \".jpg\");\n try {\n OutputStream outputStream = new FileOutputStream(saveImage);\n bitmap.compress(Bitmap.CompressFormat.JPEG, 100, outputStream);\n outputStream.flush();\n outputStream.close();\n if (saveImage.exists()) {\n /*Whenever you add a file, let MediaStore Content Provider knows about it using*/\n sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE, Uri.fromFile(saveImage)));\n\n\n publishResults(fileName, result);//output.getAbsolutePath()\n Log.v(TAG, fileName + \", size : \" + saveImage.getAbsoluteFile().length());\n }\n } catch (FileNotFoundException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n } catch (IOException e) {\n publishResults(fileName, result);\n e.printStackTrace();\n }\n }", "public void uploadPhotoProfile(FileEntryEvent ev){\n\tArrayList<Photo> listePhotos=new ArrayList<Photo>();\r\n\tlistePhotos=mbb.getMembre().getListePhotos();\r\n\tint idPhotoProfile=0;\r\n\t\r\n\tfor(Photo photo : listePhotos)\r\n\t{\r\n\t\tif(photo.getIsProfil())\r\n\t\t\tidPhotoProfile=photo.getId();\r\n\t}\r\n\t\r\n\tint photoProfileSupprime=PhotoManager.deletePhoto(idPhotoProfile);\r\n\tSystem.out.println(photoProfileSupprime);\r\n\tif(photoProfileSupprime>0)\r\n\t{\r\n\t\t\r\n\t//mettre la main sur le fileEntry\r\n\tFileEntry fiE = (FileEntry)ev.getSource();\r\n\t//récupérer ses results\r\n\tFileEntryResults fr = fiE.getResults();\r\n\t\r\n\t// Create an instance of SimpleDateFormat used for formatting \r\n\t\t\t// the string representation of date (month/day/year)\r\n\t\t\tDateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\r\n\r\n\t\t\t// Get the date today using Calendar object.\r\n\t\t\tDate today = Calendar.getInstance().getTime(); \r\n\t\t\t// Using DateFormat format method we can create a string \r\n\t\t\t// representation of a date with the defined format.\r\n\t\t\tString reportDate = df.format(today);\r\n\t\t\t\r\n\t\r\n\t//boucler sur les FileInfo\r\n\tfor(FileEntryResults.FileInfo fi: fr.getFiles()){\r\n\t\t//s'assurer que le fichier est enregistrer\r\n\t\tif(fi.isSaved()){\r\n\t\t\tSystem.out.println(\"le nom ========= \"+reportDate+fi.getFileName());\r\n\t\t\t//recu le fichier\r\n\t\t\tFile f = fi.getFile();\r\n\t\t\t\r\n\t\t\t//TODO verifier que c'est le bon type de fichier\r\n\t\t\t//renommer\r\n\t\t\ttry {\r\n\t\t\t\tString cheminApp=FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\r\n\t\t\t\tString newch=cheminApp;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tboolean ren=f.renameTo(new File(newch+\"photos/\"+reportDate+fi.getFileName()));\r\n\t\t\t\t\r\n\t\t\t\tif (ren) {\r\n\t\t\t\t\tthis.chemin=\"photos/\"+reportDate+fi.getFileName();\r\n\t\t\t\t\tSystem.out.println(newch);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"pas possible. \"+newch);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//ajouter un message \r\n\t\t\tFacesContext.getCurrentInstance().addMessage(fiE.getClientId(),new FacesMessage(\"le fichier a été uploadé\"));\r\n\t\t\r\n\t\t\tPhoto photo= new Photo();\r\n\t\t\tphoto.setMemberID(mbb.getMembre().getMembreId());\r\n\t\t\tphoto.setChemin(chemin);\r\n\t\t\tphoto.setIsProfil(true);\r\n\r\n\t\t\tint ajoute=PhotoManager.addPhoto(photo);\r\n\t\t\tSystem.out.println(\"photo profile ajoute\");\r\n\t\t\tif(ajoute>0){\r\n\t\t\t\tmbb.getMembre().setListePhotos(PhotoManager.getPhotosByMemberId(mbb.getMembre().getMembreId()));//maj liste photos\r\n\t\t\t\tArrayList<Photo> photos=new ArrayList<Photo>();\r\n\t\t\t\tphotos=PhotoManager.getProfilPhotosByMemberId(mbb.getMembre().getMembreId());\r\n\t\t\t\tmbb.getMembre().setProfilImagePath(photos.get(0).getChemin()); //maj chemin photo profil\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\t\r\n\t}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Ref.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n figureURL = String.valueOf(uri);\n }\n });\n Toast.makeText(Create_order.this, \"Upload Image Berhasil\", Toast.LENGTH_SHORT).show();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n // Pick photo\n if (requestCode == PICK_PHOTO_GALLERY && resultCode == Activity.RESULT_OK) {\n if (data == null) {\n Toast.makeText(this, R.string.error_selecting_photo, Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n InputStream inputStream = getContentResolver().openInputStream(data.getData());\n mViewModel.studentPicBitmap = BitmapFactory.decodeStream(inputStream);\n mAddPhotoView.setImageBitmap(mViewModel.studentPicBitmap);\n studentHasPhoto = true;\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n // Take new photo\n } else if (requestCode == CAPTURE_PHOTO && resultCode == Activity.RESULT_OK) {\n mViewModel.studentPicBitmap = BitmapFactory.decodeFile(mTempPhotoPath);\n mAddPhotoView.setImageBitmap(mViewModel.studentPicBitmap);\n studentHasPhoto = true;\n }\n checkIfThereIsStudentPhoto();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent returnData) {\n\n // Remove loading image\n loadingGIF.setVisibility(View.GONE);\n\n if(resultCode == RESULT_OK && requestCode == REQUEST_CODE_QAQC) {\n appData.Notify(\"Information\",\"File successfully saved.\", this);\n } else {\n appData.Notify(\"An error has occurred\",\"An error has occurred. Please check your file for any errors. Contact us for more information.\",this);\n }\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n String downloadUrl = task.getResult().toString();\n product.setImage(downloadUrl);\n databaseReference.child(\"productos\").child(product.getId()).setValue(product);\n progressDialog.dismiss();\n Intent mainActivityView = new Intent(AddProduct.this, MainActivity.class);\n AddProduct.this.startActivity(mainActivityView);\n Toast.makeText(AddProduct.this, \"¡Producto guardado con éxito!\", Toast.LENGTH_LONG).show();\n }\n });\n }", "private void confirmDelete()\n {\n if (imageCapture.getDrawable() != null)\n {\n\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity())\n .setCancelable(true).setTitle(\"Delete\").setMessage(\"Are you sure you want to delete this local image?\");\n\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n imageCapture.setImageDrawable(null);\n File file = new File(currentPhotoPath);\n file.delete();\n getActivity().sendBroadcast(new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE,\n Uri.fromFile(new File(currentPhotoPath))));\n }\n });\n\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener()\n {\n @Override\n public void onClick(DialogInterface dialog, int which)\n {\n dialog.cancel();\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n else\n {\n Log.w(\"confirmDelete\", \"getDrawable:failure\");\n Toast.makeText(getActivity(), \"Unable to Delete: No current Image\",\n Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n if (downloadUrl != null) {\n mPlayer.image = downloadUrl.toString();\n savePlayerInfo();\n ToastUtils.show(R.string.toast_profile_saved, Toast.LENGTH_SHORT);\n } else {\n ToastUtils.show(R.string.toast_error_generic, Toast.LENGTH_SHORT);\n }\n showProgress(false);\n }", "protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == GALLERY_INTETN && resultCode==RESULT_OK) {\n dialog.setMessage(\"Uploading\");\n dialog.show();\n Uri uri= data.getData();\n\n StorageReference filepath= mStorage.child(\"volunteer_aadhar_pic\").child(uri.getLastPathSegment());\n try\n {\n compressed = MediaStore.Images.Media.getBitmap(ApplyAsVolunteer.this.getContentResolver(), uri);\n }\n catch (IOException e)\n {\n e.printStackTrace();\n }\n ByteArrayOutputStream baos = new ByteArrayOutputStream();\n compressed.compress(Bitmap.CompressFormat.JPEG, 30, baos);\n byte[] cimg = baos.toByteArray();\n filepath.putBytes(cimg).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot)\n {\n path = taskSnapshot.getDownloadUrl();\n //accountref = FirebaseDatabase.getInstance().getReference().child(\"user_details\").child(auth.getUid());\n //accountref.child(\"userImgUrl\").setValue(String.valueOf(path));\n Toast.makeText(ApplyAsVolunteer.this, \"Document uploaded\", Toast.LENGTH_LONG).show();\n //finish();\n //startActivity(getIntent());\n afterText.setVisibility(View.VISIBLE);\n clicksubmit.setVisibility(View.GONE);\n dialog.dismiss();\n }\n });\n }\n }", "public void storePhoto(int receiptId, FileArguments args);", "@Override\n public void onFailure(@NonNull Exception e) {\n StorageReference storageRef = ref.child(DEFAULT_IMAGE_PATH);\n\n storageRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(@NonNull Uri uri) {\n // If we are successful, return the default image\n HashMap<String, Object> callback = new HashMap<>();\n callback.put(\"uri\", uri);\n observer.notifyOfCallback(callback);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n // If we fail, something is wrong and we cannot do anything about it\n // return an empty Uri\n HashMap<String, Object> callback = new HashMap<>();\n callback.put(\"uri\", Uri.EMPTY);\n observer.notifyOfCallback(callback);\n e.printStackTrace();\n }\n });\n }", "void onDownloadFileCreated(DownloadFileInfo downloadFileInfo);", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n\n if (downloadUrl != null) {\n // article = new Article(newref.getKey(), date.getTime(), title.getText().toString(), input.getText().toString(), MyData.getMyUser().id, MyData.getMyUser().name, downloadUrl.toString());\n if (dialog != null && dialog.isShowing())\n dialog.dismiss();\n\n upload(downloadUrl.toString());\n\n\n\n\n final String s = name;\n if (s.trim().length() != 0) {\n\n if(MainActivity.rootLayout!=null)\n Snackbar.make(MainActivity.rootLayout, \"Successfully created page \" + s, Snackbar.LENGTH_LONG)\n .setAction(\"Show\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n Intent intent = new Intent(AddPage.this, PageOpenActivity.class);\n intent.putExtra(\"id\", s);\n startActivity(intent);\n\n }\n }).show();\n\n\n\n if(PageActivity.rootlayout!=null)\n Snackbar.make(PageActivity.rootlayout, \"Successfully created page \" + s, Snackbar.LENGTH_LONG)\n .setAction(\"Show\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n Intent intent = new Intent(AddPage.this, PageOpenActivity.class);\n intent.putExtra(\"id\", s);\n startActivity(intent);\n\n }\n }).show();\n\n\n\n\n\n }\n\n // FirebaseAuth.getInstance().signOut();\n// finish()\n\n finish();\n }\n }", "public void onClick(View arg0) {\n\t\t\t\tif(!new File(\"/sdcard/.NoteLib/\" + mNoteID + \"_0.jpg.n\").exists()){\r\n\t\t\t\t\tToast.makeText(NLNoteInfoAct.this, R.string.noteinfo_share_needimages, Toast.LENGTH_SHORT).show();\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\t//Check if pictures cached -------------------\r\n\t\t\t\t\r\n\t\t\t\t//Read File\r\n\t\t\t\tFile _tmpImageFile = new File(\"/sdcard/.NoteLib/\" + mNoteID + \"_0.jpg.n\");\r\n\t\t\t\tFile _tmpTempFileToSend = new File(\"/sdcard/.NoteLib/_TmpNoteImg.jpg.n\");\r\n\t\t\t\tNAFileUtils.CopyFile(_tmpImageFile, _tmpTempFileToSend);\r\n\t\t\t\t\r\n\t\t\t\t//Create Intent and put data\r\n\t\t\t\tIntent _tmpIntent = new Intent();\r\n\t\t\t\t_tmpIntent.setAction(\"android.intent.action.SEND\");\r\n\t\t\t\t_tmpIntent.putExtra(Intent.EXTRA_TEXT, \r\n\t\t\t\t\t\tgetString(R.string.noteinfo_share_text) + \r\n\t\t\t\t\t\t((TextView)findViewById(R.id.NLNoteInfoAct_txtNoteName)).getText() + \r\n\t\t\t\t\t\tgetString(R.string.noteinfo_share_text2)\r\n\t\t\t\t\t\t);\r\n\t\t\t\t_tmpIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(_tmpTempFileToSend));\r\n\t\t\t\t_tmpIntent.setType(\"image/*\"); \r\n\t\t\t\tstartActivity(Intent.createChooser(_tmpIntent, getString(R.string.noteinfo_share_chooser)));\r\n\t\t\t\toverridePendingTransition(R.anim.act_enter, R.anim.act_exit);\r\n\t\t\t}", "public void uploadFileButton(Uri pdfUri) {\n title = titleUpdate.getText().toString();\n content = contentUpdate.getText().toString();\n time = timeUpdate.getText().toString();\n place = placeUpdate.getText().toString();\n organize = organizeUpdate.getText().toString();\n\n fileReference = firebaseStorage.getReference().child(firebaseAuth.getUid()).child(\"FileAdmin\").child(titlestarred).child(\"file\");\n\n if(pdfUri == null){\n imageURL=imageNameUpdate.getText().toString();\n fileURL = fileNameUpdate.getText().toString();\n event = new Event(content, fileURL, imageURL, organize, place, time, title);\n eventPathDatabaseReference.setValue(event);\n uploadImageButton(imageUri);\n\n }else if(pdfUri != null) {\n uploadTaskFile = fileReference.putFile(pdfUri);\n Task<Uri> urlTask = uploadTaskFile.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n // Continue with the task to get the download URL\n return fileReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n fileURL = task.getResult().toString();\n event = new Event(content, fileURL, imageURL, organize, place, time, title);\n eventPathDatabaseReference.setValue(event);\n }\n else {\n // Handle failures\n // ...\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getContext(), \"File not Succesfully upload\", Toast.LENGTH_SHORT).show();\n }\n });\n uploadImageButton(imageUri);\n }\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(final Uri uri) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbBook = database.getReference(\"books\");\n\n Map<String, String> book = new HashMap<>();\n final String book_name = tvDialogCreateBookName.getText().toString();\n book.put(\"book_name\", book_name.substring(0, 1).toUpperCase() + book_name.substring(1));\n book.put(\"author\", tvDialogCreateAuthor.getText().toString());\n book.put(\"book_image\", uri.toString());\n final String bookId = dbBook.push().getKey();\n dbBook.child(bookId).setValue(book, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError databaseError, @NonNull DatabaseReference databaseReference) {\n if (databaseError == null){\n final Snackbar snackbar = Snackbar.make(findViewById(R.id.BookActivity), \"Thêm thành công\", Snackbar.LENGTH_LONG);\n snackbar.setAction( \"Thêm thông tin ?\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackbar.dismiss();\n Intent intent = new Intent(BookActivity.this, Input_Details_BookActivity.class);\n intent.putExtra(\"book_id\",bookId);\n intent.putExtra(\"book_image\", uri.toString());\n intent.putExtra(\"author\", tvDialogCreateAuthor.getText().toString());\n intent.putExtra(\"book_name\",book_name.substring(0, 1).toUpperCase() + book_name.substring(1));\n startActivity(intent);\n }\n });\n snackbar.setActionTextColor(Color.GREEN);\n snackbar.show();\n dialogCreateBook.cancel();\n progressDialog.dismiss();\n }else { Toast.makeText(BookActivity.this, \"Thêm thất bại\", Toast.LENGTH_SHORT).show(); }\n }\n });\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n mStorageRef.child(\"url\").getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n //Setting the url to database\n\n reference2.child(\"url\").setValue(uri.toString());\n reference2.child(\"name\").setValue(shared.getName());\n reference2.child(\"date\").setValue(date+\"+\"+formattedDate);\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }\n\n });\n }", "public void saveSubjectImage(Uri imageUri, final ImageInterface listner) {\n storageReference = FirebaseStorage.getInstance().getReference();\n collectionReference = db.collection(\"Users\");\n final StorageReference filePath = storageReference.child(\"Subjects_Images\").child(EntityClass.getInstance().getSubjectEmail());\n filePath.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n filePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n final String uriLink = uri.toString();\n collectionReference.whereEqualTo(\"UserIdInDB\", EntityClass.getInstance().getUserIdInDb()).get()\n .addOnSuccessListener(new OnSuccessListener<QuerySnapshot>() {\n @Override\n public void onSuccess(QuerySnapshot queryDocumentSnapshots) {\n for (QueryDocumentSnapshot snapshots: queryDocumentSnapshots) {\n\n snapshots.getReference().collection(EntityClass.getInstance().getSubjectEmail()).document(\"SubjectData\").update(\"imageUri\",uriLink);\n listner.statusAndUri(true, null);\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.statusAndUri(false, null);\n listner.onFailure(e.getMessage());\n }\n });\n\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.statusAndUri(false, null);\n listner.onFailure(e.getMessage());\n }\n });\n\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.statusAndUri(false, null);\n listner.onFailure(e.getMessage());\n }\n });\n }", "public static void saveFile(final Context context, Uri uri, final String oldFilename) {\n\n Target target = new Target() {\n\n @Override\n public void onBitmapLoaded(final Bitmap bitmap, LoadedFrom from) {\n\n new Thread(() -> {\n\n SimpleDateFormat format = new SimpleDateFormat(\"yyyyMMdd_HHmmss\", Locale.getDefault());\n String currentTimeStamp = format.format(new Date());\n String filename = oldFilename;\n\n if (oldFilename.isEmpty()) {\n filename = \"assi_\" + currentTimeStamp;\n\n Log.d(TAG, \"new user pic filename: \" + filename);\n }\n\n PreferenceUtils.setUserPicFilename(context, filename);\n\n Log.e(TAG, Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n\n File file = new File(Environment.getExternalStorageDirectory().getPath() + '/' + Config.USER_PIC_PATH + '/' + filename + \".jpg\");\n FileOutputStream oStream = null;\n try {\n file.createNewFile();\n\n oStream = new FileOutputStream(file);\n\n bitmap.compress(CompressFormat.JPEG, 80, oStream);\n\n } catch (Exception e) {\n Log.e(TAG, \"Cannot save image to internal file storage! Error: \" + e.getMessage());\n } finally {\n try {\n if (oStream != null) {\n oStream.close();\n }\n } catch (IOException e) {\n Log.e(TAG, \"Cannot close output stream! Error: \" + e.getMessage());\n }\n }\n }).start();\n }\n\n @Override\n public void onBitmapFailed(Drawable errorDrawable) {\n }\n\n @Override\n public void onPrepareLoad(Drawable placeHolderDrawable) {\n }\n };\n\n // save file to internal storage\n Picasso.with(context)\n .load(uri)\n .into(target);\n }", "private void putImageInStorage() {\n final StorageReference ref = storageReference.child(\"images/\" + java.util.UUID.randomUUID().toString());\n ref.putFile(filePath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n if (taskSnapshot.getMetadata() != null) {\n if (taskSnapshot.getMetadata().getReference() != null) {\n Task<Uri> result = taskSnapshot.getStorage().getDownloadUrl();\n result.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n imageUrl = uri.toString();\n ChatMessage Message = new\n ChatMessage(null,\n mUsername,\n imageUrl, dateAndTime);\n mFirebaseDatabaseReference.child(CHATS_PATH + chatCode)\n .push().setValue(Message);\n }\n });\n }\n }\n }\n });\n }", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(StudententryActivity.this, \"Image Not Set. Please Try Again....\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n mStorageRef.child(type).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n //Setting the url to database\n\n reference2.child(type).setValue(uri.toString());\n\n Toast.makeText(UserHomeActivity.this, \"Shared Successfully\", Toast.LENGTH_SHORT).show();\n\n uploadUserImageView.setImageDrawable(getResources().getDrawable(R.drawable.uploadimage));\n\n }\n\n });\n }", "public void uploadImageButton(Uri imageUri) {\n title = titleUpdate.getText().toString();\n content = contentUpdate.getText().toString();\n time = timeUpdate.getText().toString();\n place = placeUpdate.getText().toString();\n organize = organizeUpdate.getText().toString();\n\n\n imageReference = firebaseStorage.getReference().child(firebaseAuth.getUid()).child(\"AdminImage\").child(titlestarred).child(\"image\");\n\n if(imageUri == null) {\n imageURL=imageNameUpdate.getText().toString();\n //Log.d(\"kimmy\", imageURL);\n event = new Event(content, fileURL, imageURL, organize, place, time, title);\n eventPathDatabaseReference.setValue(event);\n //uploadFileButton(pdfUri);\n\n }else if(imageUri != null){\n uploadTaskImage = imageReference.putFile(imageUri);\n Task<Uri> urlTask = uploadTaskImage.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n if (!task.isSuccessful()) {\n throw task.getException();\n }\n // Continue with the task to get the download URL\n return imageReference.getDownloadUrl();\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if (task.isSuccessful()) {\n imageURL = task.getResult().toString();\n event = new Event(content, fileURL, imageURL, organize, place, time, title);\n eventPathDatabaseReference.setValue(event);\n }\n else {\n // Handle failures\n // ...\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(getContext(), \"File not Succesfully upload\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n }", "@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }", "@FXML\n private void btnDownloadClick() {\n\n // Check the menu item to see if it should display a file choose or download the poster instantly\n if (isMenuItemChecked) {\n saveImageInstantly();\n } else {\n displayFileChooser();\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n riversRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n Model model = new Model(uri.toString());\n String modelID = myRef.push().getKey();\n myRef.child(modelID).setValue(model);\n userID = fAuth.getCurrentUser().getUid();\n DocumentReference documentReference = fStore.collection(\"users\").document(userID);\n\n\n Map<String, Object> fuser = new HashMap<>();\n fuser.put(\"FileUrl\", model);\n documentReference.set(fuser, SetOptions.merge());\n Toast.makeText(eeg4.this, \"Uploaded successfully\", Toast.LENGTH_SHORT).show();\n }\n });\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n }", "private void UploadPic(String name){\n if(filepath!=null)\n {\n progressDialog.setTitle(\"Uploading...\");\n progressDialog.show();\n //\"UserProfile/user.jpg\"\n StorageReference imageRef = storageReference.child(firebaseAuth.getCurrentUser().getEmail() + \"/\" + name + \".jpg\" );\n imageRef.putFile(filepath)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //Get URL to uploaded Content\n progressDialog.hide();\n Toast.makeText(UserInfoForm.this, \"Upload Successful\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.hide();\n Toast.makeText(UserInfoForm.this, \"Upload Failed\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n double progress = (100.0 * taskSnapshot.getBytesTransferred()/taskSnapshot.getTotalByteCount());\n progressDialog.setMessage( (int)progress + \"% Uploaded\");\n }\n });\n }\n else{\n Toast.makeText(this, \"Upload Failed\", Toast.LENGTH_SHORT).show();\n }\n }", "private void uploadPhoto() {\n\n final ProgressDialog pd = new ProgressDialog(this);\n pd.setTitle(\"Uploading Image...\");;\n pd.show();\n\n final String randomKey = UUID.randomUUID().toString();\n StorageReference storageRef = storageReference.child(\"images/\" + randomKey);\n\n storageRef.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n final Task<Uri> firebaseUri = taskSnapshot.getStorage().getDownloadUrl();\n firebaseUri.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n photoURL = uri.toString();\n }\n });\n\n pd.dismiss();\n Snackbar.make(findViewById(android.R.id.content), \"Image Uploaded.\", Snackbar.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n pd.dismiss();\n Toast.makeText(getApplicationContext(), \"Failed To Upload\", Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot snapshot) {\n double progressPercent = (100.00 * snapshot.getBytesTransferred() / snapshot.getTotalByteCount());\n pd.setMessage(\"Percentage: \" + (int) progressPercent + \"%\");\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n // picup =true;\n }", "@FXML\n private void chooseFavouritePhotoEvent() {\n if (!PhotoManager.getFavouriteList().isEmpty()) {\n User.setGalleryPhotos(PhotoManager.getFavouriteList());\n fadeOutEvent();\n }\n }", "@Override\n\tprotected void onPhotoTaked(String photoPath) {\n\t\t\n\t}", "public void saveImage(){\n fixMediaDir(); // fixes bug in Android 4.4\n\n // name file eSketch + timestamp\n final String filename = \"eSketch\" + System.currentTimeMillis() + \".jpg\";\n\n // insert image on the device\n String location = MediaStore.Images.Media.insertImage(\n getContext().getContentResolver(), mBitmap, filename, \"eSketch Drawing\"\n );\n\n if( location != null ){\n // notify user image was saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_saved, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n } else {\n // notify user image was NOT saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_error_saving, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n }", "@Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Image Updated..\", Toast.LENGTH_SHORT).show();\n }", "@Override\r\n public void handleMessage(Message msg) {\n ImgBeanHolder holder= (ImgBeanHolder) msg.obj;\r\n Bitmap bitmap = holder.bitmap;\r\n ImageView imageview= holder.imageView;\r\n String path = holder.path;\r\n if (imageview.getTag().toString().equals( path)){\r\n imageview.setImageBitmap(bitmap);\r\n }\r\n }", "private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask= uploadTask.continueWithTask(new Continuation<UploadTask.TaskSnapshot, Task<Uri>>() {\n @Override\n public Task<Uri> then(@NonNull Task<UploadTask.TaskSnapshot> task) throws Exception {\n\n if(!task.isSuccessful()){\n\n throw task.getException();\n\n }\n ImageUrl = filepath.getDownloadUrl().toString();\n return filepath.getDownloadUrl();\n\n }\n }).addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n\n ImageUrl = task.getResult().toString();\n //Toast.makeText(getApplicationContext(),\"Image saved to database\" ,Toast.LENGTH_SHORT).show();\n SaveProductInfo();\n }\n }\n });\n }", "@Override\n public void onSuccess(\n UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n Toast.makeText(ProfileActivity.this, \"Image Uploaded!!\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\r\n updateRealTimeDB(userId, path);\r\n\r\n //and displaying a success toast\r\n finish();\r\n\r\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\r\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n startActivity(new Intent(getApplicationContext(),ChatApp.class));\n\n Toast.makeText(Image.this, \"Image Uploaded Successfylly\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot state) {\n useGlide(Uri.fromFile(animal_file1));\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n intf.afterUpload(downloadUrl.toString());\n //Toast.makeText(context, \"Success Upload to \"+downloadUrl.toString(),Toast.LENGTH_SHORT).show();\n }", "private void afficherImage() {\n\n //get the link of the storage reference of the user\n StorageReference st = stm.child(\"users/\" + auth.getCurrentUser().getUid());\n try {\n File localFile = File.createTempFile(\"image\", \"png\");\n st.getFile(localFile).addOnSuccessListener(taskSnapshot -> st.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n //load the picture in the activity\n Picasso.with(getActivity()).load(uri).into(image);\n }\n }));\n } catch (IOException e) {\n Log.e(getClass().getName(), e.toString());\n }\n\n\n }", "@Override\n public void onClick(View v) {\n if(imageCounter<3)\n showFileChooser();\n else\n Toast.makeText(AddNewCommentActivity.this,\"最多只能添加三张照片哦!\",Toast.LENGTH_SHORT).show();\n }", "public void uploadPhoto(boolean isCheckDeviceAssocation) {\n\n String stSdcardState = Environment.getExternalStorageState();\n\n if (stSdcardState.equals(Environment.MEDIA_SHARED)) {\n\n Toast.makeText(this, getString(R.string.error_msg_sdcard_write), Toast.LENGTH_LONG)\n .show();\n finish();\n return;\n\n } else if (stSdcardState.equals(Environment.MEDIA_REMOVED)) {\n Toast.makeText(this, getString(R.string.error_msg_sdcard), Toast.LENGTH_LONG).show();\n finish();\n return;\n }\n\n finish();\n }", "public boolean isImageNotPresent() {\n if (addingItem) {\n if (picturePath == null) {\n if (makeImageMandatory) {\n return true;\n //true creates toast\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "public static void onNotificationClicked(long downloadId, Context context) {\n String id = DownloadHelper.getStringId(downloadId, context);\n if(id != null) {\n onNotificationClicked(id, context);\n } else {\n Timber.e(\"No download present with downloadId \" + downloadId + \"doing nothing on Notification clicked\");\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n Log.i(TAG, \"Fb profile pic successfully uploaded\");\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n mDatabaseUserReference.child(userID).child(\"name\").setValue(username);\n // Reference to the IMAGE of a particular user through userID\n // Can't pass imageUri\n // Get reference to the image stored in Firebase\n String downloadUrl = taskSnapshot.getDownloadUrl().toString();\n mDatabaseUserReference.child(userID).child(\"image\").setValue(downloadUrl);\n\n // Redirect user back to MainActivity\n Intent mainIntent = new Intent(\n SetupActivity.this, MainActivity.class\n );\n startActivity(mainIntent);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n if (uriTask.isSuccessful())\n {\n //save info with image\n HashMap<String, Object> hashMap = new HashMap<>();\n\n hashMap.put(\"uid\",\"\"+uid_user);\n hashMap.put(\"name\",\"\"+nameSt);\n hashMap.put(\"phone\",\"91\"+phoneSt);\n hashMap.put(\"mail\",\"\"+mailSt);\n hashMap.put(\"profileImage\", \"\"+downloadImageUri);\n hashMap.put(\"timestamp\", \"\" + timpstamp);\n mRef.child(uid_user).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"add user sucessfully\", Toast.LENGTH_SHORT).show();\n goToHomePage();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n imageFilePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n //Uri contain User URL\n UserProfileChangeRequest profileUpdate = new UserProfileChangeRequest.Builder().setDisplayName(lname).setPhotoUri(uri).build();\n currentUser.updateProfile(profileUpdate).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n //user info updated succssfully\n saveInformation();\n showMessage(\"Register Complete\");\n updateUI();\n }\n }\n });\n }\n });\n }", "public void saveFile(Bitmap imageToSave, String folder) {\n File folderName = new File(Environment.\n getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), folder);\n\n if (!folderName.exists()) {\n Log.i(TAG, \"Folder doesn't exist, creating it...\");\n boolean rv = folderName.mkdir();\n Log.i(TAG, \"Folder creation \" + (rv ? \"success\" : \"failed\"));\n } else {\n Log.i(TAG, \"Folder already exists.\");\n }\n\n String captured = Global.currUser.email + \"Deja_\" + Global.imageNumber + \".jpg\";\n Global.imageNumber++;\n\n File file = new File(folderName, captured);\n\n try {\n FileOutputStream out = new FileOutputStream(file);\n imageToSave.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n\n Global.uploadImageQueue.add(file.getAbsolutePath());\n Log.d(TAG, \"filePath added: \" + file.getAbsolutePath());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n scanSD(file);\n\n Log.d(TAG, \"+++++++\");\n }", "void updateProfilePhoto(int userId, String filename);", "public void onClick(DialogInterface dialog, int id) {\n takePhoto();\n }", "private void uploadImagesIfNecessaryThenRegisterNewPub(final Pub pub) {\n\n if (pub.getPhotos().size() == 0) {\n registerNewPub(pub);\n return;\n }\n\n doUploadImages(imageFilesToUpload, pub.getPhotos(), new ErrorSuccessListener() {\n @Override\n public void onError(@Nullable Object result) {\n Utils.simpleDialog(NewPubActivity.this, getString(R.string.image_upload_error_title),\n getString(R.string.new_pub_activity_upload_image_error_message));\n }\n\n @Override\n public void onSuccess(@Nullable Object result) {\n registerNewPub(pub);\n }\n });\n }", "@Override\n protected void onPostExecute(String message) {\n this.progressDialog.dismiss();\n\n // Display File path after downloading\n Toast.makeText(context,\n message, Toast.LENGTH_LONG).show();\n }", "public void sendMessage(String str, final String str2) {\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setMessage(\"Sending...\");\n progressDialog.setCancelable(false);\n progressDialog.show();\n final DatabaseReference reference2 = FirebaseDatabase.getInstance().getReference(this.dbname);\n this.uploadId = reference2.push().getKey();\n if (this.filePath != null) {\n StorageReference reference3 = FirebaseStorage.getInstance().getReference(this.dbname);\n final StorageReference child = reference3.child(this.uploadId + \".pdf\");\n final String str3 = str;\n final String str4 = str2;\n final ProgressDialog progressDialog2 = progressDialog;\n child.putFile(this.filePath).addOnSuccessListener((OnSuccessListener) new OnSuccessListener<UploadTask.TaskSnapshot>() {\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n child.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n public void onSuccess(Uri uri) {\n HashMap hashMap = new HashMap();\n hashMap.put(\"sender\", str3);\n hashMap.put(\"message\", str4);\n hashMap.put(\"time\", DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\", System.currentTimeMillis()).toString());\n hashMap.put(ImagesContract.URL, uri.toString());\n hashMap.put(JamXmlElements.TYPE, DiscussionActivity.this.type);\n hashMap.put(Scopes.PROFILE, DiscussionActivity.this.profile_url);\n hashMap.put(\"receiver\", DiscussionActivity.this.name);\n reference2.child(DiscussionActivity.this.uploadId).setValue(hashMap);\n DiscussionActivity.this.filePath = null;\n progressDialog2.dismiss();\n }\n });\n }\n }).addOnFailureListener((OnFailureListener) new OnFailureListener() {\n public void onFailure(Exception exc) {\n progressDialog.dismiss();\n Toast.makeText(DiscussionActivity.this, exc.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n } else {\n HashMap hashMap = new HashMap();\n hashMap.put(\"sender\", str);\n hashMap.put(\"message\", str2);\n hashMap.put(\"time\", DateFormat.format(\"dd-MM-yyyy (HH:mm:ss)\", System.currentTimeMillis()).toString());\n hashMap.put(ImagesContract.URL, (Object) null);\n hashMap.put(JamXmlElements.TYPE, (Object) null);\n hashMap.put(Scopes.PROFILE, this.profile_url);\n hashMap.put(\"receiver\", this.name);\n reference2.child(this.uploadId).setValue(hashMap);\n progressDialog.dismiss();\n }\n if (this.department.isEmpty()) {\n FirebaseDatabase.getInstance().getReference(\"Staff\").addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot children : dataSnapshot.getChildren()) {\n for (DataSnapshot next : children.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Staff staff = (Staff) next.getValue(Staff.class);\n if (!staff.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(staff.getToken(), staff.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"HODs\").addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot children : dataSnapshot.getChildren()) {\n for (DataSnapshot next : children.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Hod hod = (Hod) next.getValue(Hod.class);\n if (!hod.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(hod.getToken(), hod.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"Principal\").addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Principal principal = (Principal) next.getValue(Principal.class);\n if (!principal.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(principal.getToken(), principal.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n return;\n }\n FirebaseDatabase.getInstance().getReference(\"Staff\").child(this.department).addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Staff staff = (Staff) next.getValue(Staff.class);\n if (staff.getId() != null && !staff.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(staff.getToken(), staff.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"HODs\").child(this.department).addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Hod hod = (Hod) next.getValue(Hod.class);\n if (!hod.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(hod.getToken(), hod.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n FirebaseDatabase.getInstance().getReference(\"Students\").child(this.department).child(this.semester).addListenerForSingleValueEvent(new ValueEventListener() {\n public void onCancelled(@NonNull DatabaseError databaseError) {\n }\n\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n for (DataSnapshot next : dataSnapshot.getChildren()) {\n if (next.getChildrenCount() != 0) {\n Student student = (Student) next.getValue(Student.class);\n if (!student.getId().equals(FirebaseAuth.getInstance().getCurrentUser().getUid())) {\n DiscussionActivity.this.sendNotification(student.getToken(), student.getId(), DiscussionActivity.this.name, str2);\n }\n }\n }\n }\n });\n }", "public void manageFile() {\n long seconds = System.currentTimeMillis();\n filename = \"sdcard/LocationWise/LocationWiseImages/\" + seconds + \".png\";\n path_to_file = new File(filename);\n if (path_to_file.exists()) {\n boolean delete = path_to_file.delete();\n if (delete == true) {\n writeFile();\n // Toast.makeText(this, \"Deleted Successfully\", Toast.LENGTH_SHORT).show();\n\n } else {\n\n // Toast.makeText(this, \"Deletion Failed\", Toast.LENGTH_SHORT).show();\n }\n\n } else {\n writeFile();\n\n }\n }", "public void onSaveActionPressed() {\n navigateInFlow(LYSStep.Photos);\n }", "@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n System.out.println(\"picturex\");\n\n File mediaStorageDir = new File(\n Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n \"Aloah\");\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n System.out.println(\"failed to create directory\");\n return;\n }\n }\n\n File pictureFile = new File(mediaStorageDir.getPath() +\n File.separator + \"photo\" + System.currentTimeMillis() + \".png\");\n\n try {\n FileOutputStream fos = new FileOutputStream(pictureFile);\n fos.write(data);\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n attachMetaData(pictureFile);\n\n System.out.println(\"Path taken photo: \" + pictureFile.getAbsolutePath());\n String path = pictureFile.getAbsolutePath();\n\n\n Intent intentResult = new Intent();\n intentResult.putExtra(PHOTO_PATH, path);\n setResult(RESULT_OK, intentResult);\n finish();\n\n// try {\n// FileOutputStream stream = new FileOutputStream(file);\n// bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n// stream.close();\n//\n// System.out.println(\"picturex added to downloads\");\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n String myurl=taskSnapshot.getDownloadUrl().toString();\n\n String filepathuri=filePath.toString();\n\n String filename=filepathuri.substring(filepathuri.lastIndexOf(\"/\")+1);\n uploadreferance(myurl,filename);\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Upload_files.this,navigation_bar.class);\n startActivity(intent);\n }", "public void notifyStartRetrievingArtistImages(long id);", "@Override\n public void onSuccess(byte[] bytes) {\n storageRef.child(\"profilepics/\" + authUser.getUid()+ \".jpg\")\n .putBytes(bytes)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"control\", \"foto subida\");\n }\n });\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n userDB.child(\"profileUrl\").setValue(downloadUrl.toString());\n waitingDialog.dismiss();\n }", "public void onImageDownloadError() {\n this.mDownloadInfoTextView.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(getContext(), R.drawable.ic_error), (Drawable) null, (Drawable) null, (Drawable) null);\n this.mDownloadInfoTextView.setCompoundDrawablePadding(getContext().getResources().getDimensionPixelOffset(R.dimen.common_padding_3));\n this.mDownloadInfoTextView.setTextColor(ContextCompat.getColor(getContext(), R.color.share_error_text_color));\n this.mDownloadInfoTextView.setText(R.string.save_failed);\n this.mContentInfoTextView.setText(R.string.retry_save_images);\n this.mChannelContainer.setVisibility(8);\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n StorageReference downloadUrl = taskSnapshot.getStorage();\n downloadImage(downloadUrl);\n Log.e(\"downloadUrl\", \" \" + downloadUrl);\n\n\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n imageName.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(final Uri uri) {\n submitInfo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String name = productName.getText().toString();\n String price = productPrice.getText().toString();\n String desc = productDes.getText().toString();\n String offer = productOffer.getText().toString();\n\n\n databaseReference = FirebaseDatabase.getInstance().getReference(\"Product\").child(key).child(name);\n ProductUpload productUpload = new ProductUpload(name,desc,price,String.valueOf(uri),user.getUid(),offer);\n databaseReference.setValue(productUpload);\n\n startActivity(new Intent(SubmitProduct.this,ProfileForCompany.class));\n }\n });\n }\n });\n\n }", "private static boolean updateMediaStore(Context context, long albumId, String imageFileName) {\n\n ContentValues cv = new ContentValues();\n cv.put(MediaStore.Audio.Albums.ALBUM_ID, albumId);\n cv.put(\"_data\", imageFileName);\n\n return context.getContentResolver().insert(MEDIA_STORE_ALBUM_ART_URI, cv) != null;\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n deleteFavouriteImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n try {\n if (dataSnapshot1.child(\"thumbnail\").getValue().toString().equals(mList.get(position).getWallpaperItemURL())) {\n\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"thumbnail\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"userId\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"category\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"postNumber\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"numberOfImages\").setValue(favouriteNumberOfImages - 1);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").addListenerForSingleValueEvent(deleteFavouriteImageValueEventListener);\n\n// delete from recently uploaded\n deleteRecentlyUploadedImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n try {\n\n if (dataSnapshot1.child(\"thumbnail\").getValue().toString().equals(mList.get(position).getWallpaperItemURL())) {\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"thumbnail\").removeValue();\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"userId\").removeValue();\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"category\").removeValue();\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"postNumber\").removeValue();\n mRef3.child(\"numberOfImages\").setValue(recentNumberOfImages - 1);\n\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef3.child(\"images\").addListenerForSingleValueEvent(deleteRecentlyUploadedImageValueEventListener);\n\n // delete from upload of user\n\n deleteUploadedImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull final DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (final DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n try {\n if (dataSnapshot1.child(\"uploadedImage\").getValue(String.class).equals(mList.get(position).getWallpaperItemURL())) {\n\n category = dataSnapshot1.child(\"category\").getValue(String.class);\n\n categoryValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull final DataSnapshot categorysnapshot) {\n\n// categoryNumberOfImages = categorysnapshot.getValue(Integer.class);\n\n // delete from images category section\n\n deleteCategoryImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot3) {\n if (dataSnapshot3.exists()) {\n// Log.d(TAG, \"onDataChange: This comes to the delete category part\");\n for (DataSnapshot dataSnapshot4 : dataSnapshot3.getChildren()) {\n// Log.d(TAG, \"onDataChange: This comes in the for loop of the delete category part\\n datasnapshot4 image url : \"+dataSnapshot4.child(\"thumbnail\").getValue(String.class)+\"\\n getWallpaperItemURL : \"+mList.get(position).getWallpaperItemURL());\n if (dataSnapshot4.child(\"thumbnail\").getValue(String.class).equals(mList.get(position).getWallpaperItemURL())) {\n// Log.d(TAG, \"onDataChange: This comes in if part of delete category part\");\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"thumbnail\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"userId\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"postNumber\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"category\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"numberOfImages\").setValue((categorysnapshot.getValue(Integer.class)) - 1).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"uploadedImage\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"category\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"userId\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"postNumber\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"numberOfImages\").setValue(uploadedNumberOfImages - 1);\n }\n });\n break;\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").addListenerForSingleValueEvent(deleteCategoryImageValueEventListener);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"numberOfImages\").addListenerForSingleValueEvent(categoryValueEventListener);\n\n break;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").addListenerForSingleValueEvent(deleteUploadedImageValueEventListener);\n\n// Intent intent = new Intent(mContext, MyUploadsActivity.class);\n// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);\n// mContext.startActivity(intent);\n\n }", "@TargetApi(Build.VERSION_CODES.M)\n @Override\n public void onClick(View view) {\n if (ActivityCompat.checkSelfPermission(WallpaperActivity.this,\n Manifest.permission.WRITE_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {\n requestPermissions(new String[] { Manifest.permission.WRITE_EXTERNAL_STORAGE }, Common.PERMISSION_REQUEST_CODE);\n } else {\n AlertDialog dialog = new SpotsDialog.Builder().setContext(WallpaperActivity.this).build();\n dialog.show();\n dialog.setMessage(\"Please waiting ...\");\n String fileName = UUID.randomUUID().toString() + \".png\";\n Picasso.get()\n .load(Common.selecte_background.getImageUrl())\n .into(new SaveImageHelper(getBaseContext(), dialog, getApplicationContext().getContentResolver(),fileName, \"FGDev LiveWallpaper\"));\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n if (mDownloadedFileID == -1)\n return;\n Toast.makeText(getApplicationContext(), getString(R.string.atom_ui_tip_download_success), //To notify the Client that the file is being downloaded\n Toast.LENGTH_LONG).show();\n QunarWebActvity.this.finish();\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n imageFilePath.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n // uri contain user image url\n\n\n UserProfileChangeRequest profleUpdate = new UserProfileChangeRequest.Builder()\n .setDisplayName(name)\n .setPhotoUri(uri)\n .build();\n\n\n currentUser.updateProfile(profleUpdate)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n if (task.isSuccessful()) {\n // user info updated successfully\n showMessage(\"Register Complete\");\n updateUI();\n }\n\n }\n });\n\n }\n });\n\n\n\n\n\n }" ]
[ "0.6324641", "0.6111079", "0.6057244", "0.5967277", "0.5875302", "0.58529407", "0.5788144", "0.57727015", "0.5724559", "0.5667712", "0.5639066", "0.5616323", "0.55989295", "0.55979073", "0.55864733", "0.55316347", "0.5494336", "0.5480926", "0.5480842", "0.5475656", "0.54685783", "0.54583025", "0.54551923", "0.5430189", "0.5412701", "0.5407558", "0.5385641", "0.5364779", "0.5364217", "0.5361769", "0.53467464", "0.5345147", "0.5333455", "0.5331272", "0.5326161", "0.53071094", "0.5305625", "0.5304001", "0.5297524", "0.52974725", "0.5290571", "0.52889156", "0.5287372", "0.5280641", "0.5276498", "0.52733415", "0.5270695", "0.5267041", "0.52572566", "0.52520704", "0.5249023", "0.5243147", "0.52390975", "0.5235522", "0.52330923", "0.52297354", "0.52273875", "0.52244437", "0.5215225", "0.52148306", "0.5213881", "0.52130866", "0.5191416", "0.51859117", "0.5185489", "0.5182997", "0.51721317", "0.5170322", "0.5170043", "0.51685727", "0.51627165", "0.51425797", "0.5136464", "0.5134593", "0.5133347", "0.5127257", "0.5117872", "0.51104283", "0.5103342", "0.50949126", "0.50928", "0.50912863", "0.5088062", "0.50851613", "0.50820786", "0.50801396", "0.5077353", "0.5074774", "0.5069338", "0.50678843", "0.5066159", "0.5064402", "0.5062456", "0.50579023", "0.50556713", "0.5055563", "0.5055284", "0.50541556", "0.50511456", "0.50497884" ]
0.76952463
0
When we fail to save the image file, from any reason, we notify the user with a message.
@Override public void onSavingFailed(@NonNull IOException e) { Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show(); notifyAfterDownloadingProgress(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void onPhotoError() {\n ToastModifications.createToast(this, getString(R.string.error_saving_photo), Toast.LENGTH_LONG);\n }", "private void notifyUploadFail() {\n numberOfFail++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public void onImageDownloadError() {\n this.mDownloadInfoTextView.setCompoundDrawablesWithIntrinsicBounds(ContextCompat.getDrawable(getContext(), R.drawable.ic_error), (Drawable) null, (Drawable) null, (Drawable) null);\n this.mDownloadInfoTextView.setCompoundDrawablePadding(getContext().getResources().getDimensionPixelOffset(R.dimen.common_padding_3));\n this.mDownloadInfoTextView.setTextColor(ContextCompat.getColor(getContext(), R.color.share_error_text_color));\n this.mDownloadInfoTextView.setText(R.string.save_failed);\n this.mContentInfoTextView.setText(R.string.retry_save_images);\n this.mChannelContainer.setVisibility(8);\n }", "public void saveImage(){\n fixMediaDir(); // fixes bug in Android 4.4\n\n // name file eSketch + timestamp\n final String filename = \"eSketch\" + System.currentTimeMillis() + \".jpg\";\n\n // insert image on the device\n String location = MediaStore.Images.Media.insertImage(\n getContext().getContentResolver(), mBitmap, filename, \"eSketch Drawing\"\n );\n\n if( location != null ){\n // notify user image was saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_saved, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n } else {\n // notify user image was NOT saved successfully\n Toast msg = Toast.makeText( getContext(), R.string.message_error_saving, Toast.LENGTH_SHORT);\n msg.setGravity(Gravity.CENTER, msg.getXOffset()/2, msg.getYOffset()/2);\n msg.show();\n }\n }", "private void onFailImageTransfer()\n {\n Log.d(TAG, \"onFailImageTransfer: finished.\");\n this.fragmentActivity.runOnUiThread(() -> Toast.makeText(this.fragmentActivity,\n \"Image transfer failed\", Toast.LENGTH_SHORT).show());\n\n switchToPickLayout();\n }", "@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\tWindow.alert(\"FAILED TO UPLOAD\");\n\t\t\t\t}", "void onSavingFailed(Throwable e);", "private void saveImageInstantly() {\n\n if (movie != null) {\n\n // Get movie's title and set an initial file name\n String movieTitle = movie.getMovieTitle();\n\n // Replace any invalid characters\n movieTitle = movieTitle.replaceAll(\"[\\\"/?\\\"*><|]\", \"\").replace(\":\", \"-\");\n\n // If preferences file is empty\n if (userDirectoryString.equals(\"empty\")) {\n\n userDirectoryString = System.getProperty(\"user.home\");\n }\n\n File userDirectory = new File(userDirectoryString + \"/\" + movieTitle + \".jpg\");\n\n // If it can't access User Home, default to C drive\n if (!userDirectory.getParentFile().canRead()) {\n userDirectory = new File(\"D:\\\\\" + movieTitle + \".jpg\");\n }\n\n // Check file isn't null, so it the image view\n if (imgPoster.getImage() != null) {\n\n try {\n\n ImageIO.write(SwingFXUtils.fromFXImage(imgPoster.getImage(), null), \"jpg\", userDirectory);\n setLblStatus(\"Poster saved successfully.\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }", "private void saveFile() {\r\n\t\tFile file = new File(this.picture.getFileName());\r\n\r\n\t\ttry {\r\n\t\t\tImageIO.write(this.picture.getBufferedImage(),\r\n\t\t\t\t\tthis.picture.getExtension(), file);\r\n\t\t} catch (IOException e) {\r\n\t\t\tJOptionPane.showMessageDialog(this.pictureFrame,\r\n\t\t\t\t \"Could not save file.\",\r\n\t\t\t\t \"Save Error\",\r\n\t\t\t\t JOptionPane.WARNING_MESSAGE);\r\n\t\t}\r\n\r\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "public void alertSaveError() {\n\t\tthis.alert(\"ERROR\",\"Save error\",AlertType.ERROR);\n\t}", "@FXML\n void save () {\n try {\n String message = app.saveToFile();\n setMessage(message, false);\n } catch (Exception exception) {\n showError(\"saving to file\", exception.toString());\n }\n }", "void onPhotoError();", "@Override\n public void onFailure(@NonNull Exception e) {\n e.printStackTrace();\n Toast.makeText(context, \"Image process failed\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public void onFailure(@NonNull Exception e) {\n //Muestra un Snackbar informando al usuaario del error\n Snackbar.make(ivFotoPerfil,\"Error al subir la imagen al servidor: \"\n + e.getMessage(),\n Snackbar.LENGTH_LONG).show();\n }", "@Override\n public void onFailure(@NonNull @NotNull Exception e) {\n Snackbar.make(save, R.string.update_fail, BaseTransientBottomBar.LENGTH_SHORT).show();\n }", "public void savePhoto() {\n\n\t\tFacesMessage msg = new FacesMessage();\n\n\t\tSystem.err.println(\"save photo: url----------\" + url);\n\n\t\ttry {\n\n\t\t\t// if not uploading file\n\t\t\tif (url == null || url.equals(\"null\") || url.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_warn_info\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_warn_charge_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tSystem.err.println(\"etudiantid:\" + this.dossierEtudiantId);\n\n\t\t\tif (this.dossierEtudiantId == null || this.dossierEtudiantId.equals(\"null\")\n\t\t\t\t\t|| this.dossierEtudiantId.isEmpty()) {\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_WARN);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_passage_parametres_photo\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tdossierEtudiantDto = dossierEtudiantService.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tDossierEtudiantDto oldDossierEtudiant = dossierEtudiantService\n\t\t\t\t\t.findById(Integer.parseInt(dossierEtudiantId));\n\n\t\t\tif (oldDossierEtudiant.getPhoto() == null || oldDossierEtudiant.getPhoto().trim().isEmpty()) {\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"--------oldDossierEtudiant---------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\t\t\t\tSystem.err.println(\"-----------------file moved------\");\n\t\t\t\t// deleteTempFileByName(url);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\t\t\t\treturn;\n\n\t\t\t}\n\n\t\t\tif (!oldDossierEtudiant.getPhoto().equals(url)) {\n\n\t\t\t\t// String oldUrl = oldDossierEtudiant.getPhoto();\n\n\t\t\t\tdossierEtudiantDto.setPhoto(url);\n\t\t\t\tdossierEtudiantService.insertOrUpdate(dossierEtudiantDto);\n\t\t\t\tSystem.out.println(\"-------------------->>>\" + url);\n\t\t\t\tmoveFile(url);\n\n\t\t\t\t// deleteFileByName(oldUrl);// probleme en ours d'utilisation\n\n\t\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_INFO);\n\t\t\t\tmsg.setSummary(bundleDocument.getString(\"document_msg_success\") + \": \"\n\t\t\t\t\t\t+ bundleDocument.getString(\"document_msg_success_photo_saved\"));\n\t\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\t}\n\n\t\t} catch (Exception e2) {\n\n\t\t\tmsg.setSeverity(FacesMessage.SEVERITY_ERROR);\n\t\t\tmsg.setSummary(bundleDocument.getString(\"document_error_echec\") + \": \"\n\t\t\t\t\t+ bundleDocument.getString(\"document_error_persistence_photo\"));\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, msg);\n\n\t\t\tlog.info(e2.getMessage());\n\t\t}\n\t}", "@Override\n public void onFailure(int code, String msg) {\n Log.i(\"Allen\", \"上传文件失败:\" + msg + \" ImgURL=\" + ImgURL);\n mDialog.dismiss();\n ToastUtils.toastFail(RegisterActivity.this, \"上传文件失败\" + msg);\n\n }", "@Override\n public void failed() {\n Log.d(\"elomelo\",\"not saved\");\n }", "@Override\n\tpublic void event(PictureEvent e) {\n\t\ttry {\n\t\t\tif (null != fname) {\n\t\t\t\tImageIO.write(e.getImage(), \"jpg\", new File(fname));\n\t\t\t}\n\t\t} catch (Exception ex) { SewerSender.println(ex.toString()); }\n\t}", "void fileSendFailed(IMSession session, String requestId, String fileId, ReasonInfo reason);", "private void ErreurImage() \n {\n JOptionPane.showMessageDialog(rootPane, \"Cette image n'est plus disponible\");\n }", "private void showInvalidFileFormatError()\n {\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Image Load Error\");\n alert.setHeaderText(null);\n alert.setContentText(\"The file was not recognized as an image file.\");\n\n alert.showAndWait();\n }", "protected abstract String persistFailedMessage();", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent returnData) {\n\n // Remove loading image\n loadingGIF.setVisibility(View.GONE);\n\n if(resultCode == RESULT_OK && requestCode == REQUEST_CODE_QAQC) {\n appData.Notify(\"Information\",\"File successfully saved.\", this);\n } else {\n appData.Notify(\"An error has occurred\",\"An error has occurred. Please check your file for any errors. Contact us for more information.\",this);\n }\n\n }", "@Override\n public void onWriteFailed(byte fileType, byte errCode) {\n }", "private void checkSave() {\n if (view.getSave()) {\n try {\n saveGame.export(view.getSaveGameName());\n } catch (Exception e) {\n System.out.println(\"saving failed\");\n }\n System.exit(0);\n }\n }", "private void testSaveFile() {\n System.out.println(\"------ TESTING : saveFile(String filename) ------\");\n try{\n if(!iTestFileList.saveFile(sFile)) {\n throw new RuntimeException(\"FAILED -> saveFile(String filename) not working correctly\");\n }\n }catch (RuntimeException e){\n System.out.print(e.getMessage());\n }\n }", "@FXML\r\n public void save(ActionEvent actionEvent) {\r\n FileChooser fileChooser = new FileChooser();\r\n fileChooser.setTitle(\"Save Dot File\");\r\n fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(\r\n \"Dot File\", \"*.dot\"));\r\n File file = fileChooser.showSaveDialog(null);\r\n if(file != null) {\r\n try {\r\n picture.save(file.toPath());\r\n } catch(IOException e) {\r\n ALERT.setTitle(\"Error Dialog\");\r\n ALERT.setHeaderText(\"File Save Error\");\r\n ALERT.setContentText(\"Error Saving File\");\r\n ALERT.showAndWait();\r\n }\r\n }\r\n }", "public void SaveActionPerformed(java.awt.event.ActionEvent evt) {\n if (jfcSave.showSaveDialog(this) == JFileChooser.APPROVE_OPTION){\r\n //get selected file name\r\n File fileSave = jfcSave.getSelectedFile();\r\n String fileSaveName = fileSave.toString();\r\n\r\n try {\r\n SaveScreenShot(drawingPanel,fileSaveName);\r\n } catch (Exception e){\r\n System.out.println(\"image failed to save!\");\r\n }\r\n }\r\n }", "@Override\r\n\t\t\t\tpublic void onFail(String desc) {\n\t\t\t\t Log.e(\"upload\",desc);\t\r\n\t\t\t\t}", "@Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(StudententryActivity.this, \"Image Not Set. Please Try Again....\", Toast.LENGTH_SHORT).show();\n\n }", "@FXML\r\n void save(ActionEvent event) {\r\n \tFileChooser saver = new FileChooser();\r\n \t//saver.setSelectedExtensionFilter(new FileChooser.ExtensionFilter(\"Images\",\"*.gif\",\"*.png\",\"*.jpg\",\"*.jpeg\"));\r\n \tsaver.setInitialDirectory(this.file.getParentFile());\r\n\r\n saver.getExtensionFilters().addAll(\r\n new FileChooser.ExtensionFilter(\"All Images\", \"*.*\"),\r\n new FileChooser.ExtensionFilter(\"JPG\", \"*.jpg\"),\r\n new FileChooser.ExtensionFilter(\"PNG\", \"*.png\"),\r\n new FileChooser.ExtensionFilter(\"GIF\", \"*.gif\"),\r\n new FileChooser.ExtensionFilter(\"JPEG\", \"*.jpeg\")\r\n );\r\n \tsaver.setInitialFileName(\"solved.\"+this.file.toString().substring(file.toString().lastIndexOf('.')+1));\r\n \tif(new File(fileLocation.getText()).exists()) {\r\n \t\tsaver.setInitialDirectory(new File(fileLocation.getText()).getParentFile());\r\n \t}\r\n \tFile file = saver.showSaveDialog(new Stage());\r\n \tSystem.out.println(file.toString().substring(file.toString().lastIndexOf('.')));\r\n \ttry {\r\n\t\t\tSystem.out.println(ImageIO.write(SwingFXUtils.fromFXImage(tim, null), this.file.toString().substring(file.toString().lastIndexOf('.')+1),file));\r\n\t\t\tSystem.out.println(\"should work\");\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n }", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"保存成功\");\n\t\t}", "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 }", "public void markFileAsNotSaved()\r\n {\r\n saved = false;\r\n }", "@Override\n public void uploadFailed() {\n }", "public void onFailure(Throwable caught) {\n\t\t\tGWT.log(\"Error uploading file\", caught);\t\n\t\t}", "private void onTakePhotoFailed() {\n final String errorMessage = getString(R.string.photo_error_message);\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(CameraActivity.this, errorMessage, Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void actualizarImagenConError() {\n\t\tentidadGrafica.actualizarImagenConError(this.valor);\n\t}", "private void savedMessageFrame() {\r\n\t\tcreateWarning(2000, \"MESSAGE SAVED\"); //show warning message\r\n\t\t\r\n\t\twarningFrame.dispose(); //close warning window\r\n\t}", "boolean saveImage(Image img) {\r\n\t\treturn true;\r\n\t}", "public void onTestFailure(ITestResult result) {\n\tString \tMethodName=result.getName();\n\t\tFile src=((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);\n\t\ttry {\n\t\t\tFileHandler.copy(src, new File(ProjectBasePath+\"SeleniumPOM\\\\ScreenShots\\\\\"+MethodName+\".png\"));\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\t\n\t}", "public void alertSaveSuccess() {\n\t\tthis.alert(\"Saved\",\"Game saved\",AlertType.INFORMATION);\n\t}", "@Override\n\tprotected void onPostExecute(Void result) {\n\t\tsuper.onPostExecute(result);\n\t\t\n\t\tif (!saveStatus) {\n\t\t\tToast.makeText(context, \"嗡嗡图片存储失败!\", Toast.LENGTH_SHORT)\n\t\t\t\t\t.show();\n\t\t}\n\t}", "public void actionPerformed(ActionEvent arg0) {\n \tlblWarning.setVisible(false);\r\n \t\r\n \t\r\n \t//初始化文件选择框\r\n \tJFileChooser fDialog = new JFileChooser();\r\n \t//设置文件选择框的标题 \r\n \tfDialog.setDialogTitle(\"请选择要上传的图片\");\r\n \t//弹出选择框\r\n \tint returnVal = fDialog.showOpenDialog(null);\r\n \t// 如果是选择了文件\r\n \tif(JFileChooser.APPROVE_OPTION == returnVal){ \r\n \t\t//把路径值 写到 textField 中\t\r\n \t\ttxtPicPath.setText(fDialog.getSelectedFile().toString());\r\n \t}\r\n \tString path = txtPicPath.getText().toString();\r\n \t//Limit this field to jpg and png and \r\n \t//Force this field must be filled \r\n \tif (!path.isEmpty() && !path.equals(\"\") && !path.equals(null) \r\n \t\t\t&& (path.endsWith(\"jpg\") || path.endsWith(\"png\"))) {\r\n \t\t\r\n \tFile upload = new File(path);\r\n \t\r\n\t \ttry{ \r\n\t\t \tFileOutputStream fos1 = new FileOutputStream(fileUploadedProduct1); \r\n\t\t \tFileInputStream fis=new FileInputStream(upload); \r\n\t\t \tbyte[] buffer=new byte[1024]; \r\n\t\t \tint len=0; \r\n\t\t \twhile((len=fis.read(buffer))>0){ \r\n\t\t \t\tfos1.write(buffer,0,len); \r\n\t\t \t\t\r\n\t\t \t} \r\n\t\t \tfos1.close(); \r\n\t\t \tfis.close();\r\n\t } catch (Exception e) { \r\n\t \te.printStackTrace(); \r\n\t \tJOptionPane.showMessageDialog(null, e.getMessage(), \"错误\", JOptionPane.ERROR_MESSAGE);\r\n\t } \r\n } \r\n else {\r\n \t//For warning msg\r\n \t//lblWarning = new JLabel(\"上传图片的格式或者路径不对\");\r\n \tfr.add(lblWarning);\r\n \t\t//Font font = new Font(\"Dialog\",1,16);\r\n \t\t//lblWarning.setFont(font);\r\n \t\tlblWarning.setVisible(true);\r\n \t\t//lblWarning.setBounds(150,400,400,50);\r\n }\r\n }", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(profileModel.getDriverPhoto())\n .error(R.drawable.profile)\n .resize(0, 200)\n .into(driverImg, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n Log.v(\"Picasso\",\"Could not fetch image\");\n }\n });\n }", "private void onMakeCoffeeFail(){\n\t\t// ui\n\t\tmMakeCoffeeProgress.setVisibility(View.INVISIBLE);\n\t\tmMakeCoffeeSuccess.setVisibility(View.INVISIBLE);\n\t\tmMakeCoffeeProgressTip.setText(getString(R.string.make_coffee_failed));\n\t\tmMakeCoffeeFailed.setVisibility(View.VISIBLE);\n\t\tmMakeCoffeeRetry.setVisibility(View.INVISIBLE);\n\t\t// sound tip\n\t\tAudioPlayer.getInstance().play(this, R.raw.sound_coffee_make_fail);\n\t}", "@Override\n public void onError(Exception e) {\n Picasso.get()\n .load(data.getString(INDEX_MOVIE_POSTER_PATH))\n .placeholder(R.drawable.user_placeholder)\n .error(R.drawable.user_placeholder_error)\n .into(mImageDetail);\n }", "@Override\n public void onAlreadySaved(@NonNull PhotoCache photoCache) {\n Toast.makeText(context, \"The file already exist in:\\n\" +\n DEFAULT_PATH, Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "@Override\n\tpublic void actionPerformed(ActionEvent arg0) \n\t{\n\t\t\n\t\t\n\t\tJFileChooser fileChooser = new JFileChooser(); //fichero a grabar.\n\t\t\n\t\tint seleccion=fileChooser.showSaveDialog(null);\t\t\n\t\t\n\t\t\n\t\tString mensajeError=\"\";\n\t\tswitch (seleccion) {// si es o.k pues lo guardo.\n\t\tcase JFileChooser.APPROVE_OPTION:\t\t\t\t\t\n\t\t\ttry {\n\t\t\t\telementosBackup.getClasificacion().escribirFicheroTexto(fileChooser.getSelectedFile().getPath()+\".txt\");\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\tif(mensajeError.length()==0) {\n\t\t\t\tJLabel label = new JLabel(\"Datos guardados correctamente en \"+fileChooser.getSelectedFile().getPath()+\".txt\");\n\t\t\t\tObject[] ob = {label};\n\t\t\t\tJOptionPane.showMessageDialog(null, ob, \"Guardar datos\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t}\n\t\t\telse \n\t\t\t\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(null, mensajeError, \"Guardar datos\", JOptionPane.ERROR_MESSAGE);\n\t\t\t}\n\t\t\tbreak;\n\t\tdefault:\n\n\t\t}\n\t}", "public void saveImagePanel() throws IOException, ClassNotFoundException {\n\t\tFile archiveImage = null;\n\t\tarchiveImage = new File(\"CAMBIAR NOMBRE \");\n\t\tfile_chooser.setSelectedFile(archiveImage);\n\t\tif (file_chooser.showDialog(null, \"Guardar\") == JFileChooser.APPROVE_OPTION) {\n\t\t\tarchiveImage = file_chooser.getSelectedFile();\n\t\t\tif (archiveImage.getName().endsWith(\"jpg\") || archiveImage.getName().endsWith(\"png\")) {\n\t\t\t\t// realizar accion\n\t\t\t\tfileSeralization.saveFile(archiveImage);\n\t\t\t}\n\t\t}\n\t}", "@FXML public void saveToFile()throws java.io.IOException {\n Highgui.imwrite( this.originalImagePath, this.image );\n System.out.println(\"Saving\");\n }", "@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t JFileChooser file = new JFileChooser();\n\t\t file.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\n\t\t //filter the files\n\t\t FileNameExtensionFilter filter = new FileNameExtensionFilter(\"*.Images\", \"jpg\",\"gif\",\"png\");\n\t\t file.addChoosableFileFilter(filter);\n\t\t int result = file.showSaveDialog(null);\n\t\t //if the user click on save in Jfilechooser\n\t\t if(result == JFileChooser.APPROVE_OPTION){\n\t\t File selectedFile = file.getSelectedFile();\n\t\t path = selectedFile.getAbsolutePath();\n\t\t name = System.currentTimeMillis() + \"\" ;\n\t\t lblNewLabel.setIcon(ResizeImage(path));\n\t\t }\n\t\t //if the user click on save in Jfilechooser\n\t\t else if(result == JFileChooser.CANCEL_OPTION){\n\t\t System.out.println(\"No File Select\");\n\t\t }\n\t\t\t}", "@Test\n\tpublic void testFileWritingExceptionsShowErrorDialog() throws Exception {\n\t\tfinal File exceptionsThrowingFile = mock(File.class);\n\t\t// Directory path throws an exception\n\t\twhen(exceptionsThrowingFile.getAbsolutePath()).thenReturn(\"/.stl/\");\n\n\t\t// Create a test image\n\t\tfinal DefaultLinearAxis xAxis = new DefaultLinearAxis(Axes.X, \"mm\");\n\t\tfinal DefaultLinearAxis yAxis = new DefaultLinearAxis(Axes.Y, \"mm\");\n\t\tfinal DefaultLinearAxis zAxis = new DefaultLinearAxis(Axes.Z, \"mm\");\n\t\tfinal Img<BitType> img = ArrayImgs.bits(1, 1, 1);\n\t\tfinal ImgPlus<BitType> imgPlus = new ImgPlus<>(img, \"Test image\", xAxis,\n\t\t\tyAxis, zAxis);\n\n\t\t// Mock UI\n\t\tfinal UserInterface mockUI = mock(UserInterface.class);\n\t\tfinal SwingDialogPrompt mockPrompt = mock(SwingDialogPrompt.class);\n\t\twhen(mockUI.chooseFile(any(File.class), anyString())).thenReturn(\n\t\t\texceptionsThrowingFile);\n\t\twhen(mockUI.dialogPrompt(startsWith(STL_WRITE_ERROR), anyString(), eq(\n\t\t\tERROR_MESSAGE), any())).thenReturn(mockPrompt);\n\t\tIMAGE_J.ui().setDefaultUI(mockUI);\n\n\t\t// Run plugin\n\t\tIMAGE_J.command().run(IsosurfaceWrapper.class, true, \"inputImage\", imgPlus,\n\t\t\t\"exportSTL\", true).get();\n\n\t\t// Verify that write error dialog got shown\n\t\tverify(mockUI, after(100).times(1)).dialogPrompt(startsWith(\n\t\t\tSTL_WRITE_ERROR), anyString(), eq(ERROR_MESSAGE), any());\n\t}", "@Override\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tString name = file.getName().split(\"\\\\.\")[0].trim(); //获取当前图片的名字\n\t\t\tif(name.equals(answerText.getText().trim())) {\n\t\t\t\tanswerText.setText(\"\");\n\t\t\t\tresultText.setText(\"回答正确!\");\n\t\t\t\tfile = files[new Random().nextInt(files.length)];\n\t\t\t\ttry {\n\t\t\t\t\tpicturePanel.image = getImage(file);\n\t\t\t\t\tpicturePanel.repaint();\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}\n\t\t\telse {\n\t\t\t\tanswerText.setText(\"\");\n\t\t\t\tresultText.setText(\"回答错误!\");\n\t\t\t}\n\t\t}", "private boolean savePicture(Mesero pictureInfo) {\r\n\t\tif(!isReady) prepare();\r\n\t\tif(!isReady) {\r\n\t\t\tLog.e(TAG,\"The system was not ready. No external media\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t/** Now, let's do the heavy lifting */\r\n\t\t//YAY! http://stackoverflow.com/questions/649154/save-bitmap-to-location\r\n\t\tFileOutputStream out = null;\r\n\t\ttry {\r\n\t\t\tout = new FileOutputStream(new File(directory,pictureInfo.getName()));\r\n\t\t\tpictureInfo.getBitmap().compress(Bitmap.CompressFormat.JPEG, 100, out);\r\n\t\t\t\r\n\t\t} catch(IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tLog.e(TAG,\"Unable to save file \"+pictureInfo.getName(),e);\r\n\t\t\treturn false;\r\n\t\t} finally {\r\n\t\t\ttry {\r\n\t\t\t\tif(out!=null) out.close();\r\n\t\t\t} catch(IOException ioe) {\r\n\t\t\t\tioe.printStackTrace();\r\n\t\t\t\tLog.e(TAG,\"Unable to close file \"+pictureInfo.getName(),ioe);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public void BitmapDownloadFailedWithError(MessageObj response)\n {\n }", "public void actionPerformed(final ActionEvent e) {\r\n\t\tFileDialog chooser = new FileDialog(this,\r\n\t\t\t\t\"Use a .png or .jpg extension\", FileDialog.SAVE);\r\n\t\tchooser.setVisible(true);\r\n\t\tif (chooser.getFile() != null) {\r\n\t\t\tsave(chooser.getDirectory() + File.separator + chooser.getFile());\r\n\t\t}\r\n\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\tSkillSale.getSkillImage(\"error.jpg\");\n\t\t\t}", "public boolean checkForSave(String msg) {\r\n \t\t// Checks if there's an old graph to save\r\n \t\tif (model != null && model.toBeSaved()) {\r\n \t\t\tint resultValue = JOptionPane.showConfirmDialog(mainWindow, msg, \"JMODEL - Warning\", JOptionPane.YES_NO_CANCEL_OPTION,\r\n \t\t\t\t\tJOptionPane.WARNING_MESSAGE);\r\n \t\t\tif (resultValue == JOptionPane.YES_OPTION) {\r\n \t\t\t\tsaveModel();\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t\tif (resultValue == JOptionPane.CANCEL_OPTION) {\r\n \t\t\t\treturn true;\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn false;\r\n \t}", "public void fail(String message, BufferedImage image) {\r\n\t\treport(FAILED, message, image);\r\n\t}", "@Override protected void failed(Throwable e) {\n logger.log(Level.WARNING, \"couldn't load \" + getFile(), e);\n String msg = getResourceMap().getString(\"loadFailedMessage\", getFile());\n String title = getResourceMap().getString(\"loadFailedTitle\");\n int type = JOptionPane.ERROR_MESSAGE;\n JOptionPane.showMessageDialog(app.getFrame().getFrame(), msg, title, type);\n }", "@Override\n public void onError(@NonNull Exception e) {\n if (e instanceof InterruptedException || e instanceof ExecutionException) {\n Toast.makeText(context, \"Something wrong while caching the photo\",\n Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n notifyAfterDownloadingProgress();\n }", "public void saveAsImage(){\n\t\tif(currentView == null){\r\n\t\t\tJOptionPane.showMessageDialog(this, \"A tab must be open before an image can be saved\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tcurrentView.saveAsImage();\r\n\t}", "public void onClickSave(MenuItem mi) {\n // Setup the EditText view for our save dialog\n final EditText input = new EditText(this);\n input.setSingleLine();\n\n AlertDialog.Builder alert = new AlertDialog.Builder(this);\n alert.setTitle(\"Save Image\");\n alert.setMessage(\"Name\");\n\n alert.setView(input);\n alert.setPositiveButton(\"Save\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n final String fileName = input.getText().toString()+\".png\";\n Log.d(PaintPaint.NAME,\"saving: \"+fileName);\n mCanvas.getSurfaceView().queueEvent(new Runnable() {public void run() {\n mCanvas.save(mSavePath, fileName);\n }});\n }\n });\n\n alert.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int whichButton) {\n // Canceled\n }\n });\n\n alert.show();\n\n }", "void fileTransferFailed(IMSession session, String requestId, ReasonInfo reason);", "private void displayErrorMessage(String message, String fileName)\n {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"File error\");\n alert.setHeaderText(null);\n alert.setContentText(\"Error: \" + message + \": \" + fileName);\n\n alert.showAndWait();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] bytes, Throwable throwable) {\n mProgress.setVisibility(View.INVISIBLE);\n mStatus.setText(R.string.failure);\n mPhotoFile.delete();\n }", "public void saveFile(Bitmap imageToSave, String folder) {\n File folderName = new File(Environment.\n getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM), folder);\n\n if (!folderName.exists()) {\n Log.i(TAG, \"Folder doesn't exist, creating it...\");\n boolean rv = folderName.mkdir();\n Log.i(TAG, \"Folder creation \" + (rv ? \"success\" : \"failed\"));\n } else {\n Log.i(TAG, \"Folder already exists.\");\n }\n\n String captured = Global.currUser.email + \"Deja_\" + Global.imageNumber + \".jpg\";\n Global.imageNumber++;\n\n File file = new File(folderName, captured);\n\n try {\n FileOutputStream out = new FileOutputStream(file);\n imageToSave.compress(Bitmap.CompressFormat.JPEG, 100, out);\n out.flush();\n out.close();\n\n Global.uploadImageQueue.add(file.getAbsolutePath());\n Log.d(TAG, \"filePath added: \" + file.getAbsolutePath());\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n scanSD(file);\n\n Log.d(TAG, \"+++++++\");\n }", "@Override\n public void onError() {\n Picasso.with(getApplicationContext())\n .load(images[pos])\n .error(R.drawable.downloderror)\n .placeholder(R.drawable.epaper_error)\n .into(imageView, new Callback() {\n @Override\n public void onSuccess() {\n\n }\n\n @Override\n public void onError() {\n\n\n }\n });\n }", "@Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n Toast.makeText(getApplicationContext(),\"Imagens não serão baixadas.\",Toast.LENGTH_SHORT).show();\n }", "public void onSubmitComplete(FormPanel.SubmitCompleteEvent event) {\n GWT.log(event.getResults());\n mywebapp.log(\"saveMediaFile complete non-markdata style\");\n if (event.getResults().equals(\"SUCCESS\")) {\n doSave();\n } else {\n postDialog.hide();\n mywebapp.getMessagePanel().displayError(event.getResults());\n }\n }", "public void sendImageToAll(){\n JFileChooser fileChooser = new JFileChooser();\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.dir\")));\n int result = fileChooser.showOpenDialog(null);\n if (result == JFileChooser.APPROVE_OPTION) {\n String imagepath = fileChooser.getSelectedFile().getAbsolutePath();\n File image = new File(imagepath);\n long imgsize = image.length();\n try {\n BufferedImage img = ImageIO.read(image);\n String base64Img = null;\n if (imagepath.endsWith(\".png\")) {\n base64Img = base64helper.encodeImageToBase64String(img, \"png\");\n } else {\n base64Img = base64helper.encodeImageToBase64String(img, \"jpg\");\n }\n if (base64Img == null){\n JOptionPane.showMessageDialog(null, \"Error sending image to all because image didnt get loaded correctly.\", Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n try {\n if (socket == null){\n JOptionPane.showMessageDialog(null, \"SSLSocket is not connected to server. Connect before sending image.\",Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n return;\n }\n PrintWriter writer = new PrintWriter(new OutputStreamWriter(socket.getOutputStream(), \"UTF-8\"), true);\n writer.println(passUtil.toHexString(\"image|split|\" + user.getUsername() + \"|split|\" + base64Img));\n writer.flush();\n chatClientController.appendToPane(new Date(System.currentTimeMillis()) + \": You (\" + user.getUsername() + \"): \" , \"BLUE\", imagepath);\n } catch (Exception ex){\n ex.printStackTrace();\n if (ex.toString().toLowerCase().contains(\"socket output is already shutdown\")){\n disconnectFromServer(false);\n }\n JOptionPane.showMessageDialog(null, \"Error sending image to all: \" + ex.toString(),Env.ChatClientMessageBoxTitle, JOptionPane.ERROR_MESSAGE);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }\n\n }", "@Override\n\tpublic void doSaveAs() {\n\t\tMessageDialog.openInformation(Display.getCurrent().getActiveShell(), null,\"doSaveAs\");\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n if (progressDialog.isShowing()) {\n progressDialog.dismiss();\n }\n\n showErrorMessageDialogue(\"Some error just happened. \" +\n \"Please try again in a little bit.\");\n\n }", "public void createErrorDialog(int title, int message) {\n //Couldn't load the image, display an error message\n new AlertDialog.Builder(MainActivity.this)\n .setTitle(title)\n .setMessage(message)\n .setNeutralButton(android.R.string.ok, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n //Do nothing\n }\n })\n .setIcon(android.R.drawable.ic_dialog_alert)\n .show();\n }", "@Override\n\t\t\t\t\t\tpublic void failed() {\n\t\t\t\t\t\t\tSystem.out.println(\"下载失败\");\n\t\t\t\t\t\t}", "@Override\n\tpublic void OnFailCommand() {\n\t\tSoundManage.playSound(failSound);\n\t\tsuper.OnFailCommand();\n\t}", "private boolean setImage(BufferedImage image, File file, String ext) {\n try {\n file.delete(); // delete resources used by the File\n ImageIO.write(image, ext, file);\n return true;\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(\n null,\n \"File could not be saved!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n return false;\n }\n }", "@Override\n public void onFailure(Call call, IOException e) {\n listener.onDownloadFailed(MyApplication.getContext().getString(R.string.failure_please_try_again));\n }", "@Override\r\n protected Boolean doInBackground(Void... params) {\n try{\r\n String ImgPath = ImageUtils.getImageSavePath(GlobalDefinitions.TAG);\r\n PhotoUtils.saveBitmap(mFaceEditor.getDisplayImage(), ImgPath,PhotoUtils.IMAGE_FORMAT_JPG, BeautyfaceActivity.this);\r\n GlobalDefinitions.IMAGE_EDIT_DONE = true;\r\n\r\n }\r\n catch(Exception e)\r\n {\r\n return false;\r\n }\r\n return true;\r\n }", "void fileReceiveFailed(IMSession session, String requestId, String fileId, ReasonInfo reason);", "private void saveAvatar(Intent picData) {\n if(cropFilePath != null) {\n File cropFile = new File(cropFilePath);\n if(cropFile.exists()) {\n HjtApp.getInstance().getAppService().uploadAvatar(cropFilePath);\n } else {\n onAvatarUploadEvent(new AvatarUploadEvent(false, \"Crop file not exist\"));\n }\n } else {\n onAvatarUploadEvent(new AvatarUploadEvent(false, \"no Extras back from scale image\"));\n }\n }", "@Override\n public void onError(Exception e) {\n Picasso.get().load(image)\n .placeholder(R.drawable.default_profile_picture)\n .resize(900, 900)\n .centerInside()\n .into(settingProfileImage);\n }", "public void onEffectWriteFaild() {\n mModeExitListener.onStorageCheck();\r\n startPreview();\r\n }", "private void saveImage(BufferedImage newImg, String fileName)\n {\n\n File imageFile = new File(fileName+\".jpg\");\n try\n {\n ImageIO.write(newImg,\"jpg\",imageFile);\n }\n catch (IOException e)\n {\n System.out.println(fileName+\" not saved\"+e);\n }\n\n }", "public void sendErrorNotification(String msg){\n this.sendNotification(1, ATTENTION, msg, R.drawable.ic_stat_error_outline);\n }", "public void warning(String message, BufferedImage image) {\r\n\t\treport(WARNING, message, image);\r\n\t}", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Fail\");\n\t\t\t\t\t}", "@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }", "protected void failed()\r\n {\r\n //overwrite\r\n }", "public void saveFile(){\n\t\t// the files name\n\t\tString fileName = nameOfFile.getText();\n\t\tString folderName = saveTo.getText();\n\t\tString pattern = \"^[a-zA-Z0-9_]*$\";\n\t\tString seperator = System.getProperty(\"file.separator\");\n\t\t\t\t\t\n\t\t//checks if file name is valid\n\t\tif (!fileName.matches(pattern)){\n\t\t\tif (mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tmf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 7:\", \"Invalid Name!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}else if (fileName.equals(\"\")){\n\t\t\tif (mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tmf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 1:\", \"Please enter name for new file!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\t// makes sure the file is a .mp3 file\n\t\tfileName = fileName + \".mp3\";\n\t\t\t\t\t\n\t\tif(!folderName.equals(\"\")){\n\t\t\tfileName = folderName + seperator + fileName;\n\t\t}\n\t\t// used to check if the file exists\n\t\t\t\t\t\n\t\tFile tmpFile = new File(fileName);\n\t\tFile tmpDir = new File(folderName);\n\t\t\t\t\t\n\t\t// checks if file already exists or file is a directory\n\t\tif (tmpFile.exists() && !tmpFile.isDirectory()){\n\t\t\tif(mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tMessageFrame mf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 3:\", \"File Already Exists!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}else if (!tmpDir.exists()){\n\t\t\tif(mf != null){\n\t\t\t\tmf.dispose();\n\t\t\t}\n\t\t\tMessageFrame mf = new MessageFrame(getX()+368,getY()-150,\"Error\", \"ERROR 4\", \"Folder does not Exists!\");\n\t\t\tmf.setVisible(true);\n\t\t\treturn;\n\t\t}\n\t\t\t\t\t\n\t\t// Creates the wave file the user requests\n\t\tSaveSpeech ss = new SaveSpeech(message, fileName,statuslbl,progressBar, voice, rate, pitchStart, pitchEnd);\n\t\tss.execute();\n\t\tthisFrame.dispose();\n\t}", "@Override\r\n\tpublic FileImage save(FileImage fileImage) {\n\t\treturn fileImageDao.save(fileImage);\r\n\t}", "private void notifyUploadSuccess() {\n numberOfDone++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public void Save( String saveImgAs )\n {\n saveImage(image, saveImgAs); \n }", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Failure : \" + caught.getMessage());\n\t\t\t\t\t}", "@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\tWindow.alert(\"Failure : \" + caught.getMessage());\n\t\t\t\t\t}", "@Override\n public void onError(int statuscode, String errormsg) {\n Log.i(\"bmob\", \"文件上传失败:\" + errormsg);\n Toast.makeText(context, \"头像上传失败\" + errormsg, Toast.LENGTH_SHORT).show();\n uploadListener.onError(statuscode,errormsg);\n }", "@Override\n public void onError(int statuscode, String errormsg) {\n Log.i(\"bmob\", \"文件上传失败:\" + errormsg);\n Toast.makeText(context, \"头像上传失败\" + errormsg, Toast.LENGTH_SHORT).show();\n uploadListener.onError(statuscode,errormsg);\n }" ]
[ "0.6870552", "0.6851518", "0.65686905", "0.6477146", "0.6384003", "0.63674027", "0.63614255", "0.63296676", "0.6266808", "0.6244202", "0.61724806", "0.6106064", "0.6082145", "0.60586494", "0.60527253", "0.59759635", "0.5933653", "0.58959574", "0.5893697", "0.5884583", "0.58790326", "0.58770376", "0.5876429", "0.58695805", "0.58616066", "0.57714725", "0.5770092", "0.5755788", "0.5746107", "0.5733305", "0.56989896", "0.56986517", "0.56903744", "0.56884676", "0.56830883", "0.56705993", "0.5658311", "0.56231433", "0.55991", "0.5591379", "0.5584496", "0.5579304", "0.5571979", "0.5542567", "0.55407435", "0.5539214", "0.5527599", "0.5524517", "0.5523851", "0.55212224", "0.54851925", "0.54768556", "0.5474074", "0.54635334", "0.5439606", "0.5439421", "0.5438738", "0.54328597", "0.54322124", "0.54251164", "0.54245186", "0.54134554", "0.5400543", "0.5398206", "0.5393603", "0.5392585", "0.53885406", "0.5388211", "0.53870016", "0.53859144", "0.53848404", "0.53824896", "0.5376744", "0.53758377", "0.5369428", "0.5367083", "0.53607637", "0.53562933", "0.5354885", "0.53535265", "0.5347525", "0.5344843", "0.53394234", "0.53393406", "0.5331964", "0.53108734", "0.5295563", "0.52939814", "0.5291727", "0.5287301", "0.5279113", "0.52763784", "0.5276254", "0.527499", "0.5273686", "0.5270652", "0.5270335", "0.5270335", "0.5269171", "0.5269171" ]
0.6661547
2
After downloading or fail to download the photo, we remove the photoId from the set that hold the current downloading photos (photos in the downloading progress), and then notify that the progress done/fail.
private void notifyAfterDownloadingProgress() { if (inDownloadingProgress.contains(photoId)) { inDownloadingProgress.remove(photoId); onFinishDownloadingListener.notifyItemDownloaded(photoId, position); } else { onFinishDownloadingListener.notifyUnexpected(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void startInlineDownloading() {\n inDownloadingProgress.add(photoId);\n if (fullPhotosCaching.containsKey(photoId)) {\n final PhotoCache photoCache = fullPhotosCaching.get(photoId);\n saveImageFile(photoCache, DEFAULT_PATH, MAX_QUALITY, this);\n }\n else {\n getPhotoCache(photoId, DEFAULT_PATH, context, this);\n }\n }", "@Override\n public void BitmapDownloadSuccess(String photoId, String mealId)\n {\n\n refreshUI();\n }", "private void notifyListeners(ImageDownloadTask imageDownloadTask) {\n imageDownloadTaskMap.remove(imageDownloadTask.getStringUrl());\n if (imageDownloadTask.getBitmapImage() != null) {\n for (ImageRetrieverListener listener : listeners) {\n listener.newImageAvailable(imageDownloadTask.getStringUrl(), imageDownloadTask.getBitmapImage());\n }\n }\n }", "@Override\n protected void onPostExecute(List<Photo> photos) {\n if (!runningOnSameThread && callback != null) {\n callback.onDataAvailable(photoList, DownloadStatus.OK);\n }\n }", "@Override\n public void run() {\n mRequestMap.remove(target);\n mHQImageDownloadListener.onImageDownloaded(target, postBitmap);\n }", "private void retrieveFavoritePhotos() {\n showProgress(this.mProgressBar, this.mRlContent);\n this.mFavoritePhotosViewModel.retrievePhotos();\n }", "private void notifyUploadFail() {\n numberOfFail++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "public final void removeUnCompletedDoanload() {\n if (mUpdateInfo != null && mUpdateInfo.downId != -1) {\n if (mUpdateInfo.downId != -1) {\n Cursor c = null;\n try {\n c = mJDownloadManager.queryTask(mUpdateInfo.downId);\n if (c != null && c.moveToFirst()) {\n int status = c.getInt(JDownloadTaskColumnIndex.STATUS);\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"check delete task or not status=\" + status);\n }\n if (status != JDownloadManager.STATUS_SUCCESSFUL) {\n if (TvApplication.DEBUG_LOG) {\n JLog.d(TAG, \"removeDoanload \" + mUpdateInfo.downId);\n }\n mJDownloadManager.remove(mUpdateInfo.downId);\n }\n }\n } finally {\n if (c != null) {\n c.close();\n }\n }\n }\n }\n }", "void downloadCompleted(String blobId);", "public void deletePhotoForMovePhoto(ActionEvent event) {\n\t\tObservableList<ImageView> pho;\n\t\tpho = PhotoListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\t//System.out.println(\"before deletion: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(pho.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Photo Selected\");\n\t\t\talert.setContentText(\"No photo selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(ImageView p: pho) {\n\t\t\t//delUsername.setText(name.getUsername());\n\t\t\t//this is a confirmation\n\t\t\t\n\t\t\t//removed it from observable list\n\t\t\tlistOfPhotos.remove(p);\n\t\t\tdisplayedPhoto.remove(0);\n\t\t\t\n\t\t\t//removing photo from the master list\n\t\t\tPhoto getPhoto = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getPhotoFromImage(p);\n\t\t\t//System.out.println(\"Path to this image is: \" + getPhoto.getPathToPhoto());\n\t\t\tAccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum().remove(getPhoto);\n\t\t\t\n\t\t\t//System.out.println(\"removing album\");\n\t\t\tdisplayedPhoto.clear();\n\t\t\tdisplayedPhoto = FXCollections.observableArrayList();\n\t\t\tDisplayedImage.setItems(displayedPhoto);\n\t\t\t\n\t\t\tPhotoCaptionDisplay.setText(\"\");\n\t\t\tOldCaptionText.setText(\"\");\n\t\t\t\n\t\t\tArrayList<Tag> list = new ArrayList<Tag>();\n\t\t\ttagObsList = FXCollections.observableList(list);\n\t\t\tTagListDisplay.setItems(tagObsList);\n\t\t\t\n\t\t\t//System.out.println(\"after: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t\n\t\t\t\n\t\t\t//*******************CHECK FOR BUG HERE, (deleting newly added user creates zombie photos\n\t\t\t//System.out.println(\"1: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t//System.out.println(\"2: \" + listOfPhotos);\n\t\t\t//System.out.println(\"3: \" + displayedPhoto);\n\t\t\t\n\t\t}\n\t\t\n\t\trefreshPhotos();\n\t\t\n\t\t//Note: MUST SERIALIZE AFTER DELETING (also after adding)\n\t\t\n\t\t//updates permanent list(Serialized List) of users\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public void onFinish() {\n i++;\n transferBalance(picture.getId(), AppConfig.URL_TRANSFER_PICTURE, getArguments().getString(\"userId\"));\n }", "@Override\n public void onError(@NonNull Exception e) {\n if (e instanceof InterruptedException || e instanceof ExecutionException) {\n Toast.makeText(context, \"Something wrong while caching the photo\",\n Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(context, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n notifyAfterDownloadingProgress();\n }", "@Override\n public void onFailure(int statusCode, Header[] headers, byte[] bytes, Throwable throwable) {\n mProgress.setVisibility(View.INVISIBLE);\n mStatus.setText(R.string.failure);\n mPhotoFile.delete();\n }", "@Override\r\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n photoUrl = taskSnapshot.getDownloadUrl();\r\n prosesUpdate();\r\n }", "@Override\n public void onComplete(@NonNull Task<PlacePhotoMetadataResponse> task) {\n try{\n PlacePhotoMetadataResponse photos = task.getResult();\n\n // Get the PlacePhotoMetadataBuffer (metadata for all of the photos).\n photoMetadataBuffer = photos.getPhotoMetadata();\n MyAdapter.photoMetadataBuffer = photos.getPhotoMetadata();\n\n Log.d(\"MainActivity\",photoMetadataBuffer.toString());\n\n Log.d(\"MainActivity\", \" Number of photos \" + photoMetadataBuffer.getCount());\n\n\n // Get the first photo in the list.\n MyAdapter.myPhotos = null;\n if(photoMetadataBuffer.getCount() == 0){\n getYelpReviews();\n MyAdapter.myPhotos = null;\n }\n else{\n myPhotos = new Bitmap[photoMetadataBuffer.getCount()];\n Log.d(\"MainActivity\", \" Number of photos \" + photoMetadataBuffer.getCount());\n\n int i = 0;\n for(i=0;i<photoMetadataBuffer.getCount();i++){\n PlacePhotoMetadata photoMetadata = photoMetadataBuffer.get(i);\n // Get a full-size bitmap for the photo.\n Task<PlacePhotoResponse> photoResponse = mGeoDataClient.getPhoto(photoMetadata);\n\n final int finalI = i;\n photoResponse.addOnCompleteListener(new OnCompleteListener<PlacePhotoResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlacePhotoResponse> task) {\n PlacePhotoResponse photo = task.getResult();\n myPhotos[finalI] = photo.getBitmap();\n Log.d(\"MainActivity\",\"Completed\" + finalI);\n if(finalI == photoMetadataBuffer.getCount()-1){\n getYelpReviews();\n\n }\n }\n });\n\n MyAdapter.myPhotos = myPhotos;\n }\n }\n } catch (Exception e){\n Log.d(\"MainActivity\",\"Some Error Occured\" + e.toString());\n }\n\n }", "@Override\n protected void onPostExecute(String result)\n {\n progressDialog.dismiss();\n switch (id)\n {\n case IMAGE_LIST_INFO:\n {\n //get the amount of images on users database\n //store it in dbImageArray\n for (int i = 0; i < dbImageArray.length(); i++)\n {\n try\n {\n dbFileNames.add(dbImageArray.getString(i));\n } catch (JSONException e)\n {\n e.printStackTrace();\n }\n }\n\n //create a list of remainingImgs that stores only the photos\n //the user does NOT have in cache\n List<String> remainingImgs = ListUtils.subtract(dbFileNames, cachedFileNames);\n\n //download remaining images from server\n for (int i = 0; i < remainingImgs.size(); i++)\n {\n new HttpTasks(LOAD_IMAGE).execute(remainingImgs.get(i));\n }\n break;\n }\n case LOAD_IMAGE:\n {\n photoAdapter.notifyDataSetChanged();\n break;\n }\n case UPLOAD_IMAGE:\n {\n if (response != null)\n {\n Toast.makeText(context, response, Toast.LENGTH_SHORT).show();\n } else\n {\n imageList.add(file);\n photoAdapter.notifyDataSetChanged();\n }\n break;\n }\n }\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void done(ParseException arg0) {\n\t\t\t\t\t\t\t\t\t\tTheMissApplication.getInstance().hideProgressDialog();\n\t\t\t\t\t\t\t\t\t\tif(arg0 == null){\n\t\t\t\t\t\t\t\t\t\t\tmFlaggedPicturesList.remove(flaggedPicture);\n\t\t\t\t\t\t\t\t\t\t\tFlaggedPicturesListCellAdapter.this.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}", "@Override\n public void onAlreadySaved(@NonNull PhotoCache photoCache) {\n Toast.makeText(context, \"The file already exist in:\\n\" +\n DEFAULT_PATH, Toast.LENGTH_SHORT).show();\n notifyAfterDownloadingProgress();\n }", "public void deletePhoto(ActionEvent event) {\n\t\tObservableList<ImageView> pho;\n\t\tpho = PhotoListDisplay.getSelectionModel().getSelectedItems();\n\t\t\n\t\t//System.out.println(\"before deletion: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(pho.isEmpty() == true) {\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.setTitle(\"Error!\");\n\t\t\talert.setHeaderText(\"No Photo Selected\");\n\t\t\talert.setContentText(\"No photo selected. Delete Failed!\");\n\t\t\talert.showAndWait();\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(ImageView p: pho) {\n\t\t\t//delUsername.setText(name.getUsername());\n\t\t\t//this is a confirmation\n\t\t\tAlert alert2 = new Alert(AlertType.CONFIRMATION);\n\t\t\talert2.setTitle(\"Confirmation Dialog\");\n\t\t\talert2.setHeaderText(\"Confirm Action\");\n\t\t\talert2.setContentText(\"Are you sure?\");\n\t\t\tOptional<ButtonType> result = alert2.showAndWait();\n\t\t\t\n\t\t\tif(result.get() == ButtonType.OK) {\n\t\t\t\t//removed it from observable list\n\t\t\t\tlistOfPhotos.remove(p);\n\t\t\t\tdisplayedPhoto.remove(0);\n\t\t\t\t\n\t\t\t\t//removing photo from the master list\n\t\t\t\tPhoto getPhoto = AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getPhotoFromImage(p);\n\t\t\t\t//System.out.println(\"Path to this image is: \" + getPhoto.getPathToPhoto());\n\t\t\t\tAccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum().remove(getPhoto);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"removing album\");\n\t\t\t\tdisplayedPhoto.clear();\n\t\t\t\tdisplayedPhoto = FXCollections.observableArrayList();\n\t\t\t\tDisplayedImage.setItems(displayedPhoto);\n\t\t\t\t\n\t\t\t\tPhotoCaptionDisplay.setText(\"\");\n\t\t\t\tOldCaptionText.setText(\"\");\n\t\t\t\t\n\t\t\t\tArrayList<Tag> list = new ArrayList<Tag>();\n\t\t\t\ttagObsList = FXCollections.observableList(list);\n\t\t\t\tTagListDisplay.setItems(tagObsList);\n\t\t\t\t\n\t\t\t\t//System.out.println(\"after: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//*******************CHECK FOR BUG HERE, (deleting newly added user creates zombie photos\n\t\t\t\t//System.out.println(\"1: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\t\t//System.out.println(\"2: \" + listOfPhotos);\n\t\t\t\t//System.out.println(\"3: \" + displayedPhoto);\n\t\t\t}else {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t\n\t\trefreshPhotos();\n\t\t\n\t\t//Note: MUST SERIALIZE AFTER DELETING (also after adding)\n\t\t\n\t\t//updates permanent list(Serialized List) of users\n\t\ttry {\n\t\t\tserializeUsers(AccessibleUsersList.masterUserList);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n deleteFavouriteImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n try {\n if (dataSnapshot1.child(\"thumbnail\").getValue().toString().equals(mList.get(position).getWallpaperItemURL())) {\n\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"thumbnail\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"userId\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"category\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"postNumber\").removeValue();\n mRef.child(userId).child(\"favouriteImages\").child(\"numberOfImages\").setValue(favouriteNumberOfImages - 1);\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef.child(userId).child(\"favouriteImages\").child(\"images\").addListenerForSingleValueEvent(deleteFavouriteImageValueEventListener);\n\n// delete from recently uploaded\n deleteRecentlyUploadedImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n try {\n\n if (dataSnapshot1.child(\"thumbnail\").getValue().toString().equals(mList.get(position).getWallpaperItemURL())) {\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"thumbnail\").removeValue();\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"userId\").removeValue();\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"category\").removeValue();\n mRef3.child(\"images\").child(dataSnapshot1.getKey()).child(\"postNumber\").removeValue();\n mRef3.child(\"numberOfImages\").setValue(recentNumberOfImages - 1);\n\n break;\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef3.child(\"images\").addListenerForSingleValueEvent(deleteRecentlyUploadedImageValueEventListener);\n\n // delete from upload of user\n\n deleteUploadedImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull final DataSnapshot dataSnapshot) {\n if (dataSnapshot.exists()) {\n for (final DataSnapshot dataSnapshot1 : dataSnapshot.getChildren()) {\n try {\n if (dataSnapshot1.child(\"uploadedImage\").getValue(String.class).equals(mList.get(position).getWallpaperItemURL())) {\n\n category = dataSnapshot1.child(\"category\").getValue(String.class);\n\n categoryValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull final DataSnapshot categorysnapshot) {\n\n// categoryNumberOfImages = categorysnapshot.getValue(Integer.class);\n\n // delete from images category section\n\n deleteCategoryImageValueEventListener = new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot3) {\n if (dataSnapshot3.exists()) {\n// Log.d(TAG, \"onDataChange: This comes to the delete category part\");\n for (DataSnapshot dataSnapshot4 : dataSnapshot3.getChildren()) {\n// Log.d(TAG, \"onDataChange: This comes in the for loop of the delete category part\\n datasnapshot4 image url : \"+dataSnapshot4.child(\"thumbnail\").getValue(String.class)+\"\\n getWallpaperItemURL : \"+mList.get(position).getWallpaperItemURL());\n if (dataSnapshot4.child(\"thumbnail\").getValue(String.class).equals(mList.get(position).getWallpaperItemURL())) {\n// Log.d(TAG, \"onDataChange: This comes in if part of delete category part\");\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"thumbnail\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"userId\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"postNumber\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").child(dataSnapshot4.getKey()).child(\"category\").removeValue();\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"numberOfImages\").setValue((categorysnapshot.getValue(Integer.class)) - 1).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"uploadedImage\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"category\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"userId\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").child(dataSnapshot1.getKey()).child(\"postNumber\").removeValue();\n mRef.child(userId).child(\"uploadedImages\").child(\"numberOfImages\").setValue(uploadedNumberOfImages - 1);\n }\n });\n break;\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"images\").addListenerForSingleValueEvent(deleteCategoryImageValueEventListener);\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef2.child(dataSnapshot1.child(\"category\").getValue(String.class)).child(\"numberOfImages\").addListenerForSingleValueEvent(categoryValueEventListener);\n\n break;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n };\n\n mRef.child(userId).child(\"uploadedImages\").child(\"images\").addListenerForSingleValueEvent(deleteUploadedImageValueEventListener);\n\n// Intent intent = new Intent(mContext, MyUploadsActivity.class);\n// intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_NO_ANIMATION);\n// mContext.startActivity(intent);\n\n }", "private void takePhotoCompleted() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoCompleted\");\n // need to set jpeg_todo to false before calling onCompleted, as that may reenter CameraController to take another photo (if in auto-repeat burst mode) - see testTakePhotoRepeat()\n synchronized (background_camera_lock) {\n jpeg_todo = false;\n }\n checkImagesCompleted();\n }", "private void setFinalNotification() {\n //finished downloading all files\n // update notification\n String note = getResources().getString(R.string.update_complete);\n mBuilder.setContentTitle(note)\n .setContentText(\"\")\n .setSmallIcon(R.drawable.ic_launcher_mp)\n .setTicker(note)\n .setProgress(0, 0, false);\n nm.notify(0, mBuilder.build());\n }", "protected void onPostExecute(UploadInfo result) {\n numPending--;\n if(result.success) {\n UploadDataSetSucceeded(result.mediaId);\n } else {\n //TODO: Make these error messages kid friendly\n //UploadDataSetFailed(result.errorMessage);\n if(result.errorMessage.equals(\"[\\\"Duplicate media object detected\\\"]\")) {\n UploadDataSetFailed(\"Image already exists on server\");\n } else {\n UploadDataSetFailed(result.errorMessage);\n }\n }\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n taskSnapshot.getMetadata().getReference().getDownloadUrl().addOnCompleteListener(new OnCompleteListener<Uri>() {\n @Override\n public void onComplete(@NonNull Task<Uri> task) {\n if(task.isSuccessful()){\n FirebaseStorage.getInstance().getReference().child(\"faculty_images\").child(imageIdentifier).getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n Useremail.photouri = uri;\n FirebaseFirestore.getInstance().collection(\"Faculty_Bag\").document(Useremail.email).update(\"photo_uri\",Useremail.photouri.toString()).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Showfancytoasr.show(MainActivity.this,\"Uploading process was successful\");\n progressDialog.dismiss();\n finish();\n startActivity(getIntent());\n }\n });\n }\n });\n }\n }\n });\n }", "@Override\n\t\tpublic void downloadCanceled() {\n\n\t\t}", "@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] bytes) {\n mProgress.setVisibility(View.INVISIBLE);\n mStatus.setText(R.string.success);\n mPhotoFile.delete();\n }", "private void downloadImages(){\n new Thread(new Runnable() {\n @Override\n public void run() {\n while(true){\n if(jsonFlag) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"\\tJSON DOWNLOADED\\nIMAGES DOWNLOADING...\", Toast.LENGTH_SHORT).show();\n }\n });\n for ( int i = 0; i < getSize(); ++i) {\n final int index = i;\n new Thread(new Runnable() {\n @Override\n public void run() {\n long startTime;\n synchronized (mutex) {\n startTime = System.currentTimeMillis();\n bitmapList.add(getBitmapFromURL(urlList.get(index)));\n threadOrder.add(index);\n }\n long stopTime = System.currentTimeMillis();\n long elapsedTime = stopTime - startTime;\n Log.i(TAG, \"Image [\" + index + \"] downloaded. Duration is: \" + elapsedTime + \" ms.\");\n ++downloadCount;\n if (downloadCount == getSize()) {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n Toast.makeText(getApplicationContext(), \"IMAGES DOWNLOADED\", Toast.LENGTH_SHORT).show();\n }\n });\n downloadFlag = true;\n downloadCount = 0;\n }\n }\n }).start();\n }\n break;\n }\n }\n }\n }).start();\n }", "public void notifyStartRetrievingArtistImages(long id);", "public void completeNetworkAttachments() {\n completeNetworkAttachmentsByLabels();\n completeNetworkAttachmentsByRemovedLabels();\n }", "private static boolean cancelPotentialDownload(int resourceId, ImageView imageView) {\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n\n if (bitmapDownloaderTask != null) {\n int bitmapId = bitmapDownloaderTask.resourceId;\n if (resourceId != bitmapId) {\n bitmapDownloaderTask.cancel(true);\n } else {\n // The same URL is already being downloaded.\n return false;\n }\n }\n return true;\n }", "private void notifyListTaskFinished(List<IFile> files) {\n Intent intent = new Intent(LocalAction.ACTION_BACKUP_SERVICE_FINISHED);\n intent.putExtra(ACTION, ACTION_LIST);\n intent.putParcelableArrayListExtra(FOLDER_CONTENT, Utils.wrapAsArrayList(files));\n intent.putExtra(CALLER_ID, mCallerId);\n mBroadcastManager.sendBroadcast(intent);\n }", "@Override\n public void BeforeReConnect() {\n nCurrentDownloadNum = 0;\n nCurrentUpload = 0;\n mapDownload.clear();\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\t\tmImageFetcher.setPauseWork(false);\n\t\tmImageFetcher.setExitTasksEarly(true);\n\t\tmImageFetcher.flushCache();\n\t}", "@Override\n\t\tprotected void onPostExecute(String file_url) {\n\n\t\t\t// Reading image path from sdcard\n\n\t\t\tString imagePath = Environment.getExternalStorageDirectory()\n\t\t\t\t\t.toString() + \"/sdcard/RBK/downloadedfile\" + k + \".jpg\";\n\t\t\t// setting downloaded into image view\n\n\t\t\t// my_image.setImageDrawable(Drawable.createFromPath(imagePath));\n\t\t\tk++;\n\n\t\t\tLog.v(\"log_tag\", \"k ::: \" + k);\n\t\t\tfloat y = (k / map.size()) * 100;\n\t\t\tpublishProgress(\"\" + (int) (y));\n\t\t\tif (k == map.size())\n\n\t\t\t{\n\t\t\t\tpDialog.setProgress(0);\n\t\t\t\tbtnShowProgress.setEnabled(false);\n\t\t\t\tdismissDialog(progress_bar_type);\n\n\t\t\t}\n\n\t\t}", "private void clearDownloadListStatus() {\r\n /* reset ip waittimes only for local ips */\r\n ProxyController.getInstance().removeIPBlockTimeout(null, true);\r\n /* reset temp unavailble times for all ips */\r\n ProxyController.getInstance().removeHostBlockedTimeout(null, false);\r\n for (final DownloadLink link : DownloadController.getInstance().getAllDownloadLinks()) {\r\n /*\r\n * do not reset if link is offline, finished , already exist or pluginerror (because only plugin updates can fix this)\r\n */\r\n link.getLinkStatus().resetStatus(LinkStatus.ERROR_FATAL | LinkStatus.ERROR_PLUGIN_DEFECT | LinkStatus.ERROR_ALREADYEXISTS, LinkStatus.ERROR_FILE_NOT_FOUND, LinkStatus.FINISHED);\r\n }\r\n }", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n if (downloadUrl != null) {\n mStringArrayList.add(downloadUrl.toString());\n }\n startUploading();\n }", "private void forceDownload(int resourceId, ImageView imageView) {\n if (cancelPotentialDownload(resourceId, imageView)) {\n BitmapDownloaderTask task = new BitmapDownloaderTask(imageView);\n DownloadedDrawable downloadedDrawable = new DownloadedDrawable(task);\n imageView.setImageDrawable(downloadedDrawable);\n task.execute(resourceId);\n }\n }", "private void finishRequests(){\n\t\tpeer.getRequests().removeAll(finishedRequestsList);\n\t\tfinishedRequestsList.clear();\n\t}", "private void checkForOrphanFiles() {\n List<String> dbFileNames = getPhotoFilesInDatabase();\n List<String> dirFileNames = getPhotoFilesInDirectory();\n\n // Find files that are not in the db.\n dirFileNames.removeAll(dbFileNames);\n\n // Create a new photo shoot for the orphaned photos.\n if (dirFileNames.size() > 0) {\n long shootId = createOrphanShoot(dirFileNames);\n\n GhostPhotoPreferences.setHasOrphanPhotoShootBeenCreated(getApplicationContext(), true);\n Log.d(LOG_TAG, \"checkForOrphanFiles: Created orphan photo shoot: \" + shootId);\n }\n }", "public final synchronized void bfk() {\n C4990ab.m7416i(\"MicroMsg.MsgFileWorker_Base\", \"onDownloadFail\");\n if (this.ktU != null) {\n this.ktU.bfe();\n this.ktU = null;\n }\n }", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n }", "void onTaskComplete(MediaDownloadTask mediaDownloadTask);", "private void workerExecute() {\r\n\r\n\t\t_workerStart = System.currentTimeMillis();\r\n\r\n\t\tPhoto[] newPhotos = null;\r\n\r\n\t\tif (_workerStateDir != null) {\r\n\r\n\t\t\t_display.syncExec(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\r\n\t\t\t\t\t// guard against the ui being closed before this runs\r\n\t\t\t\t\tif (_uiContainer.isDisposed()) {\r\n\t\t\t\t\t\treturn;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tsetStatusMessage(UI.EMPTY_STRING);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\r\n\t\t\t// get all image files, sorting is not yet done\r\n\t\t\tfinal File[] files = _workerStateDir.listFiles(_fileFilter);\r\n\r\n\t\t\t// check if interruption occred\r\n\t\t\tif (_workerCancelled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\tint numberOfImages = 0;\r\n\r\n\t\t\tif (files == null) {\r\n\r\n\t\t\t\t// prevent NPE\r\n\r\n\t\t\t\tnewPhotos = new Photo[0];\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\t// image files are available\r\n\r\n\t\t\t\tnumberOfImages = files.length;\r\n\r\n\t\t\t\tnewPhotos = new Photo[numberOfImages];\r\n\r\n\t\t\t\t// create a photo for each image file\r\n\t\t\t\tfor (int fileIndex = 0; fileIndex < numberOfImages; fileIndex++) {\r\n\r\n\t\t\t\t\tfinal File photoFile = files[fileIndex];\r\n\r\n\t\t\t\t\tPhoto galleryPhoto = PhotoCache.getPhoto(photoFile.getAbsolutePath());\r\n\r\n\t\t\t\t\tif (galleryPhoto == null) {\r\n\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * photo is not found in the photo cache, create a new photo\r\n\t\t\t\t\t\t */\r\n\r\n\t\t\t\t\t\tgalleryPhoto = new Photo(photoFile);\r\n\r\n\t\t\t\t\t\tPhotoCache.setPhoto(galleryPhoto);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tnewPhotos[fileIndex] = galleryPhoto;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * sort photos with currently selected comparator\r\n\t\t\t\t */\r\n\t\t\t\t_currentComparator = getCurrentComparator();\r\n\t\t\t\tArrays.sort(newPhotos, _currentComparator);\r\n\t\t\t}\r\n\r\n\t\t\t// check if the previous files retrival has been interrupted\r\n\t\t\tif (_workerCancelled) {\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t_photoFolder = _workerStateDir;\r\n\r\n\t\t\tif (_photoFolder != null) {\r\n\t\t\t\t_newGalleryPositionKey = _photoFolder.getAbsolutePath();\r\n\t\t\t}\r\n\r\n\t\t\tworkerExecute_DisplayImages(newPhotos);\r\n\t\t}\r\n\t}", "@Override\n protected void onPostExecute(thumbNailAdapter result) {\n result.notifyDataSetChanged();\n }", "@Override\r\n\t\t\tpublic void onComplete(List<PhotoBean> bean) {\n\r\n\t\t\t}", "private void eventLookupCompleted() {\n\t\tsynchronized(lookupCounterMutex) {\n\t\t\tlookupCounter--;\n\t\t\tif (lookupCounter == 0)\n\t\t\t\tlookupCounterMutex.notifyAll();\n\t\t}\n\t}", "@Override\n\tpublic void delPhotos(Iterable<Photo> photos) {\n\t\t\n\t}", "public void downloadBitmapsForFragment() {\n if (mMeta != null) {\n for (final ImageMetaData data : mMeta) {\n BitmapDownloader.downloadBitmap(null, data.getImageURL(), new Handler() {\n @Override\n public void handleMessage(Message msg) {\n GridViewAdapter adapter = getAdapter();\n switch (msg.what) {\n case BitmapDownloader.DOWNLOAD_SUCCESS:\n if (adapter != null) adapter.notifyDataSetChanged();\n break;\n case BitmapDownloader.ALREADY_DOWNLOADED:\n if (adapter != null) adapter.notifyDataSetChanged();\n break;\n default:\n }\n\n }\n });\n }\n }\n }", "private void downloadingIssueHistoryImages(final List<Result> listOfPersons) {\n\n ImageLoader imageLoader = ImageLoader.getInstance();\n\n for (int i = 0; i < listOfPersons.size(); i++) {\n final String imageUrl = listOfPersons.get(i).getPicture().getMedium();\n\n imageLoader.loadImage(imageUrl, new SimpleImageLoadingListener() {\n @Override\n public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) {\n if (loadedImage != null) {\n\n String encodedImageString = UtilFunctions.bitmapToString(loadedImage);\n /**\n * Calling function to updating profile pic string data in local database\n */\n AppDatabase.getInstance(context).updateProfileImages(imageUri, encodedImageString);\n\n } else {\n Log.d(\"az\", \"image bitmap is null with url \" + imageUri);\n }\n }\n });\n }\n\n }", "private void cancelBitmapFetcher() {\n if (null != mBitmapFetcher) {\n mBitmapFetcher.cancel();\n mBitmapFetcher = null;\n }\n }", "@Override\n protected void onPostExecute(String file_url) {\n mContext.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n MyApplication.getContext().stopProgress(mContext);\n MyApplication.getContext().showCustomProgress(mContext, R.drawable.complete, Constants.DOWNLOAD_COMPLETE);\n MyApplication.getContext().scheduleDismiss();\n mAdapter.notifyDataSetChanged();\n }\n });\n\n }", "@Override\n public void onComplete(Bitmap bitMap) {\n String localFileName = getLocalImageFileName(url);\n //Log.d(\"TAG\",\"save image to cache: \" + localFileName);\n\n saveImageToFile(bitMap,localFileName);\n //3. return the image using the listener\n listener.onComplete(bitMap);\n }", "public void stoppingBatchDownload(Model firstPatch, Model finalPatch) \n {\n }", "private void onFailImageTransfer()\n {\n Log.d(TAG, \"onFailImageTransfer: finished.\");\n this.fragmentActivity.runOnUiThread(() -> Toast.makeText(this.fragmentActivity,\n \"Image transfer failed\", Toast.LENGTH_SHORT).show());\n\n switchToPickLayout();\n }", "@Override\n protected void done() {\n super.done();\n if (!this.isCancelled()) {\n openMergeModifiedFile(); \n }\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}", "@Override\n protected void onPostExecute(Integer downloadStatue) {\n if(downloadStatue == DOWNLOAD_SUCCESS)\n {\n this.setDownloadCanceled(false);\n this.setDownloadPaused(false);\n downloadListener.onSuccess();\n //scanFile();\n }else if(downloadStatue == DOWNLOAD_FAILED)\n {\n this.setDownloadCanceled(false);\n this.setDownloadPaused(false);\n downloadListener.onFailed();\n }else if(downloadStatue == DOWNLOAD_PAUSED)\n {\n downloadListener.onPaused();\n }else if(downloadStatue == DOWNLOAD_CANCELED)\n {\n downloadListener.onCanceled();\n }\n }", "public void downloadImages(Vector<BasePin> pins) {\n\t\tVector<Long> uids = new Vector<Long>();\n\t\tBoolean b;\n\t\tfor (int i = 0; i < pins.size(); i++) {\n\t\t\tBasePin p = pins.get(i);\n\t\t\tlong uid = p.getUid();\n\t\t\t\n\t\t\tif (pins.get(i).getType() != BasePin.CATEGORY_NEWS) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tFile f = new File(context.getExternalFilesDir(null), uid + \".jpg\");\n\t\t\tif (f.exists()) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tuids.add(p.getUid());\n\t\t}\n\t\t\n\t\tif (uids.size() > 0) {\n\t\t\tLongDownloadNewsImages d = new LongDownloadNewsImages();\n\t\t\td.execute(uids);\n\t\t}\n\t}", "private void processFiles(List<File> mFileList, java.io.File targetFolder) {\n // check if the local file exists\n for (File file : mFileList) {\n java.io.File local = new java.io.File(targetFolder, file.getTitle());\n if (!local.exists()) {\n downloadFile(file, targetFolder);\n } else {\n if (checkTimeStamp(file)) {\n Log.e(\"DELETE TIME\", local.getParentFile().getName() + \"/\" + local.getName());\n deleteFile(local);\n downloadFile(file, targetFolder);\n } else {\n check = 1;\n Log.e(\"DL NOT NEEDED\", local.getParentFile().getName() + \"/\" + local.getName());\n numDownloading--;\n Log.e(\"STATUS NOT DL\",\"numDownloading is at \" + numDownloading);\n \n setNotification();\n if (numDownloading <= 0) {\n setFinalNotification();\n }\n }\n }\n }\n }", "@Override\n public void onLoadding(long total, long current, boolean isUploading) {\n mProgressDialog.setMax((int) total);\n mProgressDialog.setMessage(\"正在下载...\");\n mProgressDialog.setProgress((int) current);\n }", "public void uploadPhotoProfile(FileEntryEvent ev){\n\tArrayList<Photo> listePhotos=new ArrayList<Photo>();\r\n\tlistePhotos=mbb.getMembre().getListePhotos();\r\n\tint idPhotoProfile=0;\r\n\t\r\n\tfor(Photo photo : listePhotos)\r\n\t{\r\n\t\tif(photo.getIsProfil())\r\n\t\t\tidPhotoProfile=photo.getId();\r\n\t}\r\n\t\r\n\tint photoProfileSupprime=PhotoManager.deletePhoto(idPhotoProfile);\r\n\tSystem.out.println(photoProfileSupprime);\r\n\tif(photoProfileSupprime>0)\r\n\t{\r\n\t\t\r\n\t//mettre la main sur le fileEntry\r\n\tFileEntry fiE = (FileEntry)ev.getSource();\r\n\t//récupérer ses results\r\n\tFileEntryResults fr = fiE.getResults();\r\n\t\r\n\t// Create an instance of SimpleDateFormat used for formatting \r\n\t\t\t// the string representation of date (month/day/year)\r\n\t\t\tDateFormat df = new SimpleDateFormat(\"ddMMyyyyHHmmss\");\r\n\r\n\t\t\t// Get the date today using Calendar object.\r\n\t\t\tDate today = Calendar.getInstance().getTime(); \r\n\t\t\t// Using DateFormat format method we can create a string \r\n\t\t\t// representation of a date with the defined format.\r\n\t\t\tString reportDate = df.format(today);\r\n\t\t\t\r\n\t\r\n\t//boucler sur les FileInfo\r\n\tfor(FileEntryResults.FileInfo fi: fr.getFiles()){\r\n\t\t//s'assurer que le fichier est enregistrer\r\n\t\tif(fi.isSaved()){\r\n\t\t\tSystem.out.println(\"le nom ========= \"+reportDate+fi.getFileName());\r\n\t\t\t//recu le fichier\r\n\t\t\tFile f = fi.getFile();\r\n\t\t\t\r\n\t\t\t//TODO verifier que c'est le bon type de fichier\r\n\t\t\t//renommer\r\n\t\t\ttry {\r\n\t\t\t\tString cheminApp=FacesContext.getCurrentInstance().getExternalContext().getRealPath(\"/\");\r\n\t\t\t\tString newch=cheminApp;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tboolean ren=f.renameTo(new File(newch+\"photos/\"+reportDate+fi.getFileName()));\r\n\t\t\t\t\r\n\t\t\t\tif (ren) {\r\n\t\t\t\t\tthis.chemin=\"photos/\"+reportDate+fi.getFileName();\r\n\t\t\t\t\tSystem.out.println(newch);\r\n\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\telse{\r\n\t\t\t\t\tSystem.out.println(\"pas possible. \"+newch);\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\t// TODO: handle exception\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//ajouter un message \r\n\t\t\tFacesContext.getCurrentInstance().addMessage(fiE.getClientId(),new FacesMessage(\"le fichier a été uploadé\"));\r\n\t\t\r\n\t\t\tPhoto photo= new Photo();\r\n\t\t\tphoto.setMemberID(mbb.getMembre().getMembreId());\r\n\t\t\tphoto.setChemin(chemin);\r\n\t\t\tphoto.setIsProfil(true);\r\n\r\n\t\t\tint ajoute=PhotoManager.addPhoto(photo);\r\n\t\t\tSystem.out.println(\"photo profile ajoute\");\r\n\t\t\tif(ajoute>0){\r\n\t\t\t\tmbb.getMembre().setListePhotos(PhotoManager.getPhotosByMemberId(mbb.getMembre().getMembreId()));//maj liste photos\r\n\t\t\t\tArrayList<Photo> photos=new ArrayList<Photo>();\r\n\t\t\t\tphotos=PhotoManager.getProfilPhotosByMemberId(mbb.getMembre().getMembreId());\r\n\t\t\t\tmbb.getMembre().setProfilImagePath(photos.get(0).getChemin()); //maj chemin photo profil\r\n\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}\t\r\n\t}", "private void downloadFinished() {\n downloadFinished = true;\n editor.getProgressBar().setVisible(false);\n editor.getProgressBarLabel().setVisible(false);\n editor.setOkEnabled(true);\n editor.getProgressBar().setValue(editor.getProgressBar().getMaximum());\n }", "private void uploadNextImage(final int current, final File[] imageFiles, final List<String> remoteFilenames, final ProgressDialog pDialog, final ErrorSuccessListener listener) {\n\n // If there are still pictures to upload\n if (current < remoteFilenames.size()) {\n\n final String filePath = imageFiles[current].getAbsolutePath();\n final String remoteFileName = remoteFilenames.get(current);\n\n if( ! new File(filePath).isFile() ) {\n Log.e(LOG_TAG, \"An error occurred: '\"+ filePath +\"' does not exist or is not a file\");\n listener.onError(null);\n return;\n }\n\n File sourceFile = new File(filePath);\n\n int kbTotal = (int) (sourceFile.length() / 1024.0f); // progress will be measured in KB\n String fileSize = Utils.readableSize(sourceFile.length()); // a string ended with B/KB/MB/...\n\n Log.d(LOG_TAG, \"Uploading file '\"+ filePath +\"' (\"+ fileSize +\")...\");\n\n pDialog.setMessage(getString(R.string.new_pub_activity_uploading_pictures)\n + (1+current) + \"/\"+ remoteFilenames.size() +\")...\");\n pDialog.setProgress(0);\n pDialog.setMax(kbTotal);\n\n im.uploadImage(sourceFile, remoteFileName, new ImageManager.ImageUploadListener() {\n\n @Override\n public void onProgressChanged(int transferId, long bytesCurrent, long bytesTotal) {\n int kbCurrent = (int) (bytesCurrent / 1024.0f);\n pDialog.setProgress( kbCurrent );\n }\n\n @Override\n public void onImageUploadError(int transferId, Exception e) {\n pDialog.dismiss();\n Log.e(LOG_TAG, \"[id \"+ transferId +\"] An error occurred: \"+ e.toString());\n\n listener.onError(null);\n }\n\n @Override\n public void onImageUploadCompletion(int transferId) {\n Log.d(LOG_TAG, \"[id \"+ transferId +\"] File '\" + filePath + \"' has been stored as: \"+ remoteFileName);\n\n uploadNextImage(current+1, imageFiles, remoteFilenames, pDialog, listener);\n }\n });\n }\n\n // If we already uploaded all the images successfully\n else {\n pDialog.dismiss();\n Log.d(LOG_TAG, \"All images uploaded successfully\");\n\n listener.onSuccess(null);\n }\n }", "@Override\n public void onBindViewHolder(@NonNull ViewHolder holder, int position) {\n String path = UploadImages.images.get(position);\n StorageReference filePath = storageReference.child(path);\n\n try {\n String[] token = path.split(\"/\");\n final File localFile =File.createTempFile(token[2], \"\") ;\n filePath.getFile(localFile)\n .addOnSuccessListener(new OnSuccessListener<FileDownloadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n Bitmap bitmap = BitmapFactory.decodeFile(localFile.getAbsolutePath());\n localFile.deleteOnExit();\n holder.imageFromWeb.setImageBitmap(bitmap);\n PhotoViewAttacher pAttacher;\n pAttacher = new PhotoViewAttacher(holder.imageFromWeb);\n pAttacher.update();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(context, \"Cannot load images, check internet\", Toast.LENGTH_LONG).show();\n }\n });\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n\n holder.toDelete.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n // Deleting from the QuestionImages path\n String path = UploadImages.images.get(position);\n\n // Have to also delete from firebase storage\n ProgressDialog progressDialog = new ProgressDialog(context);\n progressDialog.setTitle(\"Deleting...Please wait\");\n progressDialog.show();\n\n storageReference.child(path)\n .delete()\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(context, \"Deleted Successfully\", Toast.LENGTH_SHORT).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n });\n UploadImages.images.remove(position);\n notifyItemRemoved(position);\n notifyItemRangeChanged(position, UploadImages.images.size());\n }\n });\n\n }", "@Override\n public void onTaskComplete(Object response)\n {\n try\n {\n SoapObject outer = (SoapObject) response;\n SoapObject inner = (SoapObject) outer.getPropertySafely(\"Success\");\n successMessage = inner.getPropertySafelyAsString(\"Message\", \"0\");\n planTaskId = Integer.parseInt(inner.getPropertySafelyAsString(\"PlanTaskID\", \"0\"));\n\n if (imageDragableGridView.getUpdatedImageListWithoutPlus().size() >= 1)\n {\n for (int i = 0; i < imageDragableGridView.getUpdatedImageListWithoutPlus().size(); i++)\n {\n uploadDocFiles();\n }\n\n } else\n {\n hideProgressDialog();\n CustomDialogManager.showOkDialog(getActivity(), successMessage, new DialogListener()\n {\n @Override\n public void onButtonClicked(int type)\n {\n hideProgressDialog();\n if (getFragmentManager().getBackStackEntryCount() != 0)\n {\n getFragmentManager().popBackStack();\n } else\n {\n getActivity().finish();\n }\n }\n });\n }\n\n } catch (Exception e)\n {\n hideProgressDialog();\n e.printStackTrace();\n }\n\n }", "private void resumePullSnapshotTasks() {\n File snapshotTaskDir = new File(getPullSnapshotTaskDir());\n if (!snapshotTaskDir.exists()) {\n return;\n }\n\n File[] files = snapshotTaskDir.listFiles();\n if (files != null) {\n for (File file : files) {\n if (!file.getName().endsWith(PullSnapshotTask.TASK_SUFFIX)) {\n continue;\n }\n try (DataInputStream dataInputStream =\n new DataInputStream(new BufferedInputStream(new FileInputStream(file)))) {\n PullSnapshotTaskDescriptor descriptor = new PullSnapshotTaskDescriptor();\n descriptor.deserialize(dataInputStream);\n pullFileSnapshot(descriptor, file);\n } catch (IOException e) {\n logger.error(\"Cannot resume pull-snapshot-task in file {}\", file, e);\n try {\n Files.delete(file.toPath());\n } catch (IOException ex) {\n logger.debug(\"Cannot remove pull snapshot task file {}\", file, e);\n }\n }\n }\n }\n }", "@Override\n public void onSaved(@NonNull PhotoCache photoCache) {\n\n boolean addStatus = localPhotosUtil.add(photoCache.getPhotoId(),\n photoCache.getFormatExtension());\n if (addStatus) {\n Toast.makeText(context, \"Successfully Saved\", Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(context, \"Something wrong while adding to Downloads\",\n Toast.LENGTH_SHORT).show();\n }\n notifyAfterDownloadingProgress();\n }", "public void undoLastCapturedPhoto() {\n\t\t\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(UserProfile.this, \"Error updating Image..\", Toast.LENGTH_SHORT).show();\n\n }", "@Override\n\t\tprotected void onPostExecute(String file_url) {\n\n\t\t\t// Displaying downloaded image into image view\n\t\t\t// Reading image path from sdcard\n\n\t\t\tString imagePath = Environment.getExternalStorageDirectory()\n\t\t\t\t\t.toString() + \"sdcard/RBK/FeaturedImage\" + r + \".jpg\";\n\t\t\t// setting downloaded into image view\n\n\t\t\t// my_image.setImageDrawable(Drawable.createFromPath(imagePath));\n\t\t\tr++;\n\n\t\t\tLog.v(\"log_tag\", \"r ::: \" + r);\n\t\t\tfloat x = (r / map1.size()) * 100;\n\t\t\tpublishProgress(\"\" + (int) x);\n\t\t\tif (r == map1.size())\n\n\t\t\t{\n\n\t\t\t\tpDialog.setProgress(0);\n\t\t\t\tbtnShowProgress1.setEnabled(false);\n\t\t\t\tdismissDialog(progress_bar_type);\n\n\t\t\t}\n\n\t\t}", "@Override\n protected void onPostExecute(Void aVoid) {\n if (checkDelay.onDownloadImageTaskCheck()) {\n checkDelay.onDelayDownloadingError();\n }\n }", "protected void onPostExecute(String file_url) {\r\n\t\t\t// dismiss the dialog after getting all products\r\n\t\t\t// pDialog.dismiss();\r\n\t\t\trefreshMenuItem.collapseActionView();\r\n\t\t\t// remove the progress bar view\r\n\t\t\trefreshMenuItem.setActionView(null);\r\n\t\t\t// updating UI from Background Thread\r\n\t\t\trunOnUiThread(new Runnable() {\r\n\t\t\t\tpublic void run() {\r\n\t\t\t\t\tproductArrayAdapter = new CustomAdapter(\r\n\t\t\t\t\t\t\tgetApplicationContext(), productList);\r\n\t\t\t\t\tproductListView.setAdapter(productArrayAdapter);\r\n\t\t\t\t\tcacheObjectWriting(productList);\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t\trefreshFlag = true;\r\n\t\t}", "private void queuePhoto(String id, String url, Activity activity, View imageView)\n {\n photosQueue.Clean(imageView);\n PhotoToLoad p = new PhotoToLoad(id, url, imageView);\n synchronized(photosQueue.photosToLoad)\n {\n photosQueue.photosToLoad.push(p);\n photosQueue.photosToLoad.notifyAll();\n }\n \n //start thread if it's not started yet\n if(photoLoaderThread.getState()==Thread.State.NEW)\n {\n \tif(!photoLoaderThread.isAlive())\n \tphotoLoaderThread.start();\n }\n }", "@Override\n protected void onPostExecute(Bitmap bitmap) {\n if (isCancelled()) {\n bitmap = null;\n }\n\n // Add bitmap to cache\n if (bitmap != null) {\n synchronized (sHardBitmapCache) {\n sHardBitmapCache.put(resourceId, bitmap);\n }\n }\n\n if (imageViewReference != null) {\n ImageView imageView = imageViewReference.get();\n BitmapDownloaderTask bitmapDownloaderTask = getBitmapDownloaderTask(imageView);\n // Change bitmap only if this process is still associated with it\n if (this == bitmapDownloaderTask) {\n imageView.setImageBitmap(bitmap);\n }\n }\n }", "@Override\n\t\t\t\t\t\t\tpublic void success(Collection<Photo> result) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public void deleteAttachments(String notice_firbaseID){\n\n pd=new ProgressDialog(AddNewNoticeActivity.this);\n pd.setProgress(100);;\n pd.setProgressStyle(ProgressDialog.STYLE_SPINNER);\n pd.setTitle(\"Deleting\");\n pd.setMessage(\"Please Wait ...\");\n pd.setCancelable(false);\n\n String attchFilesPath = \"Global/\" + StartUpActivity.userDetails.getState() + \"/Notice_Board/\" + notice_firbaseID + \"/Attachments/\";\n\n mDatabase = FirebaseDatabase.getInstance().getReference(attchFilesPath);\n\n //adding an event listener to fetch values\n mDatabase.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot snapshot) {\n //dismissing the progress dialog\n\n //iterating through all the values in database\n for (DataSnapshot postSnapshot : snapshot.getChildren()) {\n Upload upload = postSnapshot.getValue(Upload.class);\n\n pd.show();\n\n // Delete One by one all files\n deleteFileFromStorage(upload);\n\n }\n\n mDatabase.removeEventListener(this);\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n pd.dismiss();\n }\n });\n\n }", "@Override\n public void run() {\n downloadInfo.state = STATE_DOWNLOADING;\n notifyStateChange(downloadInfo);\n\n //6.specific download, two kinds of education\n // re-download and resume downloads\n Request request;\n File file = new File(downloadInfo.path);\n if (!file.exists() || file.length() != downloadInfo.currentLength) {\n //file is not exists, or file size in downloadInfo saved inconsistent\n //the file is invalid\n file.delete();\n downloadInfo.currentLength = 0;\n\n //need to re-download\n String url = String.format(Url.APP_DOWNLOAD, downloadInfo.downloadUrl);\n request = new Request.Builder().url(url).build();\n } else {\n //need to resume download\n String url = String.format(Url.APP_BREAK_DOWNLOAD, downloadInfo.downloadUrl, downloadInfo.currentLength);\n request = new Request.Builder().url(url).build();\n }\n\n Response response = null;\n InputStream is = null;\n FileOutputStream fos = null;\n\n try {\n response = okHttpClient.newCall(request).execute();\n is = response.body().byteStream();\n\n if (response != null && is != null) {\n fos = new FileOutputStream(file, true);\n\n byte[] buffer = new byte[1024 * 8];\n int len = -1;\n while ((len = is.read(buffer)) != -1 && downloadInfo.state == STATE_DOWNLOADING) {\n fos.write(buffer, 0, len);\n fos.flush();\n\n downloadInfo.currentLength = downloadInfo.currentLength + len;\n notifyProgressChange(downloadInfo);\n }\n } else {\n //the server return an error\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n } finally {\n try {\n fos.close();\n is.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n //handle the case did not come here,there are has three situation\n //1.download finish 2.download error 3.download pause\n if (file.length() == downloadInfo.currentLength && downloadInfo.state == STATE_DOWNLOADING) {\n //说明下载完成\n downloadInfo.state = STATE_FINISH;\n notifyStateChange(downloadInfo);\n } else if (downloadInfo.state == STATE_PAUSE) {\n notifyStateChange(downloadInfo);\n } else {\n downloadInfo.state = STATE_ERROR;\n downloadInfo.currentLength = 0;\n file.delete();\n notifyStateChange(downloadInfo);\n }\n\n //requires runnable is removed from the current from downloadTaskMap at the end of the task\n downloadTaskMap.remove(downloadInfo.id);\n }", "private void downloadInBackground(){\n\t\tdownloadResourceInBackground(imageUrl1, R.id.dl_image_1, R.id.dl_progressbar_1);\n\t\tdownloadResourceInBackground(imageUrl2, R.id.dl_image_2, R.id.dl_progressbar_2);\n\t\tdownloadResourceInBackground(imageUrl3, R.id.dl_image_3, R.id.dl_progressbar_3);\n\t\tdownloadResourceInBackground(imageUrl4, R.id.dl_image_4, R.id.dl_progressbar_4);\n\t\tdownloadResourceInBackground(imageUrl5, R.id.dl_image_5, R.id.dl_progressbar_5);\n\t}", "@Override\n public void onSuccess(FileDownloadTask.TaskSnapshot taskSnapshot) {\n listener.onDownlaoded(finalFile);\n }", "@Override\n protected void onPostExecute(String file_url) {\n Log.i(TAG,\"onPostExecute()\");\n download = null;\n // dismiss the dialog after the file was downloaded\n runOnUiThread(()->dismissDialog());\n }", "@Override\n\t\tpublic void onDownloadGalleryIconFinish(String iconUrl) {\n\t\t\tMessage msg = mHandler.obtainMessage();\n\t\t\tmsg.what = MSG_REFRESH_GALLERY_ICON;\n\t\t\tmsg.obj = iconUrl;\n\t\t\tmsg.sendToTarget();\n\t\t}", "@Override\n\t\t\t\tpublic void onPostExecute(Bitmap result)\n\t\t\t\t{\n\t\t\t\t\tif (null != result)\n\t\t\t\t\t{\n\t\t\t\t\t\t// create the drawable\n\t\t\t\t\t\tDrawable drawable = new BitmapDrawable(result);\n\t\t\t\t\t\t\n\t\t\t\t\t\t// synchronize on this map so that no other thread can access it until we\n\t\t\t\t\t\t// are done\n\t\t\t\t\t\tsynchronized (viewImageMap)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// retrieve the expected from the table\n\t\t\t\t\t\t\tID expectedID = viewImageMap.get(imageViewReference.get());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// make sure the expected id matches this one\n\t\t\t\t\t\t\tif (null != expectedID && expectedID.equals(id))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t// remove this view from the map\n\t\t\t\t\t\t\t\tviewImageMap.remove(imageView);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t// check to see if the image view is visible\n\t\t\t\t\t\t\t\tif (imageWrapper.getVisibility() != View.VISIBLE)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t// swap out the loading view with the image view\n\t\t\t\t\t\t\t\t\timageWrapper.setVisibility(View.VISIBLE);\n\t\t\t\t\t\t\t\t\tloadingView.setVisibility(View.GONE);\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// update the image view\n\t\t\t\t\t\t\t\timageView.setImageDrawable(drawable);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t// save the drawable to the RecentOpponent\n\t\t\t\t\t\tdataContainer.setDrawable(drawable);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// remove this id from the set\n\t\t\t\t\tloadingIDs.remove(id);\n\t\t\t\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n if (intent.getAction() == DownloadManager.ACTION_DOWNLOAD_COMPLETE) {\n long id = intent\n .getLongExtra(DownloadManager.EXTRA_DOWNLOAD_ID, -1);\n if (tag_id == id) {\n downOK();\n }\n }\n }", "private void downloadImagesIfMissing()\t{\n\n\t\tarrayOfImageIDsToDownload = getArrayOfMissingImages(getImageIDs(shopName));\t\t\n\n\t\tif(networkIsAvailable() && !(arrayOfImageIDsToDownload.length == 1 && arrayOfImageIDsToDownload[0].equals(\"\")) && arrayOfImageIDsToDownload.length != 0 )\t{\n\n\t\t\tpDialog = new ProgressDialog (DisplayActivity.this);\n\t\t\tpDialog.setMessage(\"Downloading \"+arrayOfImageIDsToDownload.length+\" Image(s)...\");\n\t\t\tpDialog.show();\t\n\n\t\t\timageCounter=0;\n\t\t\t\n\t\t\tString url = \"http://www.loyal3.co.za/downloadImage?image=\"+arrayOfImageIDsToDownload[imageCounter].trim()+\"&res=\"+screenSize();\n\n\t\t\tnew DownloadAdvertImages().execute(url);\n\n\t\t} else {\n\n\t\t\tsetLogo(getLogoID(shopName), logoButton);\n\t\t\t\t\t\n\t\t\tsetAdvertFlipper();\t//Mag dalk die 2 moet omruil.\n\t\t\tsetAdvertImages();\n\t\t}\n\t}", "private void update() {\n Thread t = new Thread(new Runnable() {\n @Override\n public void run() {\n List<File> list = getContents(NOT_TRASHED + \" and \" + NOT_FOLDER + \" and \" + SUPPORTED_FILES);\n List<File> filteredList = new ArrayList<File>();\n \n // filters out shared drive files\n for (File f : list) {\n if(!f.getShared()) {\n filteredList.add(f);\n }\n }\n\n numDownloading = filteredList.size();\n Log.e(\"START NUM\", \"\" + numDownloading);\n updateMax = numDownloading;\n \n // notification progress bar\n String note = getResources().getString(R.string.notification_message);\n nm = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n mBuilder = new NotificationCompat.Builder(mContext);\n mBuilder.setContentTitle(note)\n .setSmallIcon(android.R.drawable.stat_sys_download)\n .setTicker(note);\n\n // main progress bar\n mProgress = (ProgressBar) findViewById(R.id.progressBar1);\n new Thread(new Runnable() {\n @Override\n public void run() {\n while (numDownloading > 0) {\n mHandler.post(new Runnable() {\n @Override\n public void run() {\n int progress = 100 * (updateMax - numDownloading) / updateMax; \n mProgress.setProgress(progress);\n if (numDownloading <= 0) {\n back();//finish();\n }\n } \n });\n }\n }\n }).start();\n\n if (!targetDir.exists())\n targetDir.mkdirs();\n getDriveContents();\n }\n });\n t.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}", "@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downLoadUrl = uriTask.getResult();\n\n Map userInfo = new HashMap();\n //write where to put values in database\n userInfo.put(\"profileImageUrl\",downLoadUrl.toString());\n mUserDb.updateChildren(userInfo);\n\n return;\n }", "private void notifyUploadSuccess() {\n numberOfDone++;\n notificationBuilder.setContentText(getNotificationContent());\n notificationManger.notify(0, notificationBuilder.build());\n }", "private void deletePressedPhoto() {\r\n if (lastPressedPhoto == null)\r\n return;\r\n\r\n int photoId = (int) lastPressedPhoto.getTag(R.integer.tag_event_photo);\r\n\r\n LinearLayout layoutPhotos = findViewById(R.id.layoutPhotos);\r\n layoutPhotos.removeView(lastPressedPhoto);\r\n\r\n EventPhoto photo = DatabaseManager.getInstance().getDatabase().eventPhotoDao().findById(photoId);\r\n DatabaseManager.getInstance().getDatabase().eventPhotoDao().deleteById(photo.uid);\r\n showToast(getString(R.string.event_photo_removed), Toast.LENGTH_SHORT);\r\n disablePhotoEditing();\r\n }", "public void onClick(View v) {\n if (photoGallery.size() != 0) {\n switch (v.getId()) {\n case R.id.btnUpload:\n task.execute(new String[] { \"http://localhost:9091/PhotoServer/sends\" });\n case R.id.btnCaption:\n File source = new File(currentPhotoPath);\n String[] split_str2 = currentPhotoPath.split(\"_\");\n String fin = split_str2[0] + \"_\" + split_str2[1] + \"_\" + split_str2[2] + \"_\" + caption.getText() + \"_\" + split_str2[4] + \"_\" + split_str2[5] + \"_\" + split_str2[6];\n File destination = new File(fin);\n source.renameTo(destination);\n photoGallery = photoGallery = populateGallery(minDate, maxDate, \"\", min_long, max_long, min_lat, max_lat);\n\n break;\n case R.id.btnLeft:\n --currentPhotoIndex;\n break;\n case R.id.btnRight:\n ++currentPhotoIndex;\n break;\n default:\n break;\n }\n if (currentPhotoIndex < 0)\n currentPhotoIndex = 0;\n if (currentPhotoIndex >= photoGallery.size())\n currentPhotoIndex = photoGallery.size() - 1;\n if (photoGallery.size() != 0) {\n currentPhotoPath = photoGallery.get(currentPhotoIndex);\n String[] split_str = currentPhotoPath.split(\"_\");\n timestamp.setText(split_str[1]);\n caption.setText(split_str[3]);\n lat_text.setText(split_str[4]);\n long_text.setText(split_str[5]);\n caption.invalidate();\n timestamp.invalidate();\n }\n Log.d(\"phpotoleft, size\", Integer.toString(photoGallery.size()));\n Log.d(\"photoleft, index\", Integer.toString(currentPhotoIndex));\n displayPhoto(currentPhotoPath);\n\n }\n }", "private void uploadPhoto() {\n\n final ProgressDialog pd = new ProgressDialog(this);\n pd.setTitle(\"Uploading Image...\");;\n pd.show();\n\n final String randomKey = UUID.randomUUID().toString();\n StorageReference storageRef = storageReference.child(\"images/\" + randomKey);\n\n storageRef.putFile(imageUri)\n .addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n final Task<Uri> firebaseUri = taskSnapshot.getStorage().getDownloadUrl();\n firebaseUri.addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n photoURL = uri.toString();\n }\n });\n\n pd.dismiss();\n Snackbar.make(findViewById(android.R.id.content), \"Image Uploaded.\", Snackbar.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n pd.dismiss();\n Toast.makeText(getApplicationContext(), \"Failed To Upload\", Toast.LENGTH_LONG).show();\n }\n })\n .addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(@NonNull UploadTask.TaskSnapshot snapshot) {\n double progressPercent = (100.00 * snapshot.getBytesTransferred() / snapshot.getTotalByteCount());\n pd.setMessage(\"Percentage: \" + (int) progressPercent + \"%\");\n }\n });\n }", "public void procLoadFromFileThread() {\n try {\n\n do {\n /*----------Check Thread Interrupt----------*/\n Thread.sleep(1); if (!_running) break;\n /*------------------------------------------*/\n\n MemoryCacheEntry cacheEntry = _downloader.getMemCache().get(_cacheKey);\n\n if (cacheEntry!=null && cacheEntry.size()>0) {\n _cacheEntry = cacheEntry;\n _downloader.handleState(this, ImageDownloader.State.DOWNLOAD_SUCCESS);\n return;\n } else {\n _cacheEntry = null;\n }\n\n\n _isSuccess = false;\n\n _mutex.lock();\n if (_phoneAlbums!=null && _phoneAlbums.size()>0) {\n _isSuccess = true;\n } else {\n ImageManager.getPhoneAlbumInfo(SMDirector.getDirector().getActivity(), new ImageManager.OnImageLoadListener() {\n @Override\n public void onAlbumImageLoadComplete(ArrayList<PhoneAlbum> albums) {\n _isSuccess = true;\n _phoneAlbums = albums;\n// _cond.notify();\n synchronized (_this) {\n _this.notify();\n }\n }\n\n @Override\n public void onError() {\n synchronized (_this) {\n _this.notify();\n }\n// _cond.notify();\n }\n });\n\n synchronized (_this) {\n _this.wait();\n }\n\n// _cond.wait();\n }\n\n if (!_isSuccess || _phoneAlbums.size()==0) {\n Log.i(\"DT\", \"[[[[[ Failed to get Album list~\");\n _mutex.unlock();\n break;\n }\n\n /*----------Check Thread Interrupt----------*/\n Thread.sleep(1); if (!_running) break;\n /*------------------------------------------*/\n\n Bitmap bmp = getPhotoImage(_requestPath);\n if (bmp==null) {\n Log.i(\"DT\", \"[[[[[ Failed to get Album list~\");\n _mutex.unlock();\n break;\n }\n\n _imageEntry = ImageCacheEntry.createEntry(bmp);\n _mutex.unlock();\n\n _downloader.handleState(this, ImageDownloader.State.DECODE_SUCCESS);\n _cacheEntry = null;\n return;\n } while (false);\n\n\n } catch (InterruptedException e) {\n\n }\n\n _cacheEntry = null;\n _downloader.handleState(this, ImageDownloader.State.DOWNLOAD_FAILED);\n }", "public void onPostExecute(NexImage nexImage) {\n NexEditorEventListener.this.m.remove(this);\n Log.d(\"NexEditorEventHandler\", String.format(\"Done:image thread queue length:%d\", new Object[]{Integer.valueOf(NexEditorEventListener.this.m.size())}));\n }", "private synchronized void notifyCompleted() {\n // since there will be no more observer messages after this, there\n // is no need to keep any observers registered after we finish here\n // so get the observers one last time, and at the same time\n // remove them from the table\n Observer[] observers = observersTable.remove(this);\n if (observers != null) {\n for (Observer observer : observers) {\n observer.completed(this);\n }\n observersTable.remove(this);\n }\n\n }", "void removeOfflineEndpointsCompleted();", "private void queuePhoto(String url, ImageView imageView, ProgressBar bar) {\n mPhotosQueue.clean(imageView);\n PhotoToLoad p = new PhotoToLoad(url, imageView, bar);\n synchronized (mPhotosQueue.photosToLoad) {\n mPhotosQueue.photosToLoad.push(p);\n mPhotosQueue.photosToLoad.notifyAll();\n }\n\n //start thread if it's not started yet\n if (mPhotoLoaderThread.getState() == Thread.State.NEW) {\n mPhotoLoaderThread.start();\n }\n }", "@OnClick(R.id.retryButton)\n public void retryUpload() {\n callback.retryUpload(contribution);\n }", "void returnTaskToFreePool(ImageDownloadTask downloadTask) {\n downloadTask.cleanup();\n imageDownloadTaskWorkQueue.offer(downloadTask);\n }", "protected void applyPendingDeletes ()\n {\n while (!m_aDeleteStack.isEmpty ())\n removeMonitoredFile (m_aDeleteStack.pop ());\n }", "public void performComplete(BitmapHunter bitmapHunter) {\n if (MemoryPolicy.shouldWriteToMemoryCache(bitmapHunter.getMemoryPolicy())) {\n this.cache.set(bitmapHunter.getKey(), bitmapHunter.getResult());\n }\n this.hunterMap.remove(bitmapHunter.getKey());\n batch(bitmapHunter);\n if (bitmapHunter.getPicasso().loggingEnabled) {\n Utils.log(DISPATCHER_THREAD_NAME, \"batched\", Utils.getLogIdsForHunter(bitmapHunter), \"for completion\");\n }\n }" ]
[ "0.5928691", "0.58333457", "0.58113974", "0.577866", "0.574264", "0.5541516", "0.5528289", "0.54786694", "0.5475687", "0.5457268", "0.54383075", "0.54049546", "0.5388825", "0.5368901", "0.5364108", "0.531733", "0.53117347", "0.5308387", "0.52938557", "0.5282995", "0.5254448", "0.52519816", "0.5237823", "0.5206425", "0.5201314", "0.5191056", "0.51886034", "0.51861", "0.5172611", "0.5167848", "0.51405185", "0.5126119", "0.5123004", "0.50897884", "0.50802654", "0.5072516", "0.5068331", "0.50668836", "0.50447327", "0.5042353", "0.50404185", "0.5035236", "0.5026746", "0.50257236", "0.50244105", "0.5015537", "0.50113153", "0.50088984", "0.5007632", "0.5006321", "0.5004948", "0.5004672", "0.49956816", "0.49852806", "0.49831304", "0.49804232", "0.49769753", "0.4976293", "0.49732062", "0.49683917", "0.49649787", "0.49647954", "0.4963021", "0.49629796", "0.49614608", "0.49612495", "0.49610612", "0.49571285", "0.49552134", "0.4953128", "0.4951768", "0.49433845", "0.49432862", "0.49423218", "0.4938837", "0.49382272", "0.492786", "0.49244332", "0.49233848", "0.49016717", "0.48941314", "0.4892743", "0.48887718", "0.48840892", "0.48836544", "0.4876628", "0.48738408", "0.4868672", "0.48683897", "0.48605826", "0.48605764", "0.48555216", "0.48523533", "0.48507804", "0.4849899", "0.48459107", "0.48458225", "0.48455092", "0.48262227", "0.48238885" ]
0.7875273
0
Native methods that call into the JNI interface
static native void classInitNative();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private native String native_init();", "private static native void init();", "private static native void classInitNative();", "protected native void init();", "public native void initNativeCallback();", "public /*static*/ native void init();", "private static native boolean nativeClassInit();", "private static native long init();", "private native boolean initFromJNI(int port);", "public native String sayHello();", "private native void detectJNI(byte[] data, int height, int width, int[] nMarker, int[] idList, float[] cornerList);", "public static native void run();", "private native long nativeCreateDelegate();", "public native void answer();", "public native static void jnikillMira();", "public native int iniciarTracker();", "private native String native_finalize();", "private native int nativeAdd(int x, int y);", "public native void constructor();", "private static native int ptInitLibrary0(String lang);", "private static native boolean retrieve_0(long nativeObj, long image_nativeObj, int flag);", "static native int jniToBuf(Buf out, long patch);", "private native void nRegister();", "public static native void printHello();", "public interface jni总结 {\n /**\n * jni:\n * 方法名-->包名+类名+方法名;\n */\n}", "public native int __intMethod( long __swiftObject, int arg );", "public native void instanceVoid();", "public native String stringFromJNI();", "public interface Native {\n\n}", "private native void nativeFinalize();", "private static native boolean open_1(long nativeObj, int device);", "private native void nativePlay();", "static native ByteBuffer loadJni(long[] nativeData, byte[] buffer, int offset, int len);", "private static native long nativeInitialize(int arch, int mode) throws UnicornException;", "private native void CreateJNIObj(String device);", "private native void pararCamara();", "private native static long init(long avi);", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "public native String stringFromJNI();", "private static native String decode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_code_nativeObj);", "Object getNative();", "public interface SearchJniBridge {\n\n /**\n * Inits native side and registers data change observer.\n * Native initialization will be done on UI thread.\n */\n boolean init(DataChangeObserver observer);\n\n /**\n * Queries native side for delta file entries which will be served to local indexing service.\n * @param lastSeqNo which is a lower bound for seqno's of returned entries\n * @param limit of returned entries\n */\n DeltaFileEntry[] query(long lastSeqNo, int limit);\n\n /**\n * Trims delta file by dropping entries with seqno smaller and equal to seqNoLowerBound.\n * It returns highest seqno in delta file.\n */\n long trimDeltaFile(long seqNoLowerBound);\n\n /**\n * Queries native side for a batch of usage reports which will be sync'ed with local indexing\n * service.\n * @param batchSize intended number of usage reports in a batch.\n */\n UsageReport[] getUsageReportsBatch(int batchSize);\n\n /**\n * Removes usage reports from the internal buffer.\n */\n void removeUsageReports(UsageReport[] reports);\n\n /**\n * Clear the buffer of usage reports.\n */\n void clearUsageReports();\n\n /**\n * Adds all the historic visits to the usage report buffer.\n *\n * Should be done only once.\n * @return whether the visits were successfully added to the buffer.\n */\n boolean addHistoricVisitsToUsageReportsBuffer();\n\n /**\n * Observer on data changes.\n */\n public static interface DataChangeObserver {\n /**\n * Called when data has been changed.\n */\n void onDataChanged();\n /**\n * Called when data has been cleared.\n */\n void onDataCleared();\n /**\n * Called when usage reports can be reported to local indexing service.\n */\n void startReportingTask();\n /**\n * Called when usage reports can't be reported to local indexing service any more.\n */\n void stopReportingTask();\n }\n\n boolean isStartedForTest();\n\n void dump(PrintWriter writer);\n}", "public static native void staticVoid();", "private static native void runFrame(long pointer);", "private static native void initIDs();", "private static native void initIDs();", "private static native void initIDs();", "private native static void initIDs();", "private NativeSupport() {\n\t}", "public native String stringFromJNI(Activity activity, String data);", "private static native String detectAndDecode_0(long nativeObj, long img_nativeObj, long points_nativeObj, long straight_code_nativeObj);", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "@Override\n\tprotected void GetDataFromNative() {\n\t\t\n\t}", "public static native void release();", "public interface NativeCallInterface {\n SValue call(Atom atom, ExecEnvironment env, ListEx<SValue> arguments) throws EgException;\n}", "private native String native_clinit();", "private native int simpleOnCreate(String packageName);", "private native void nativeSurfaceInit(Object surface);", "public static synchronized void initNativeLibs(android.content.Context r6) {\n /*\n r2 = org.telegram.messenger.NativeLoader.class;\n monitor-enter(r2);\n r0 = nativeLoaded;\t Catch:{ all -> 0x00d1 }\n if (r0 == 0) goto L_0x0009;\n L_0x0007:\n monitor-exit(r2);\n return;\n L_0x0009:\n net.hockeyapp.android.C2367a.m11720a(r6);\t Catch:{ all -> 0x00d1 }\n r0 = android.os.Build.CPU_ABI;\t Catch:{ Exception -> 0x0122 }\n r1 = \"armeabi-v7a\";\n r0 = r0.equalsIgnoreCase(r1);\t Catch:{ Exception -> 0x0122 }\n if (r0 == 0) goto L_0x00d4;\n L_0x0017:\n r0 = \"armeabi-v7a\";\n L_0x001a:\n r1 = \"os.arch\";\n r1 = java.lang.System.getProperty(r1);\t Catch:{ Throwable -> 0x012b }\n if (r1 == 0) goto L_0x0130;\n L_0x0023:\n r3 = \"686\";\n r1 = r1.contains(r3);\t Catch:{ Throwable -> 0x012b }\n if (r1 == 0) goto L_0x0130;\n L_0x002c:\n r0 = \"x86\";\n r1 = r0;\n L_0x0030:\n r0 = getNativeLibraryDir(r6);\t Catch:{ Throwable -> 0x012b }\n if (r0 == 0) goto L_0x005f;\n L_0x0036:\n r3 = new java.io.File;\t Catch:{ Throwable -> 0x012b }\n r4 = \"libtmessages.27.so\";\n r3.<init>(r0, r4);\t Catch:{ Throwable -> 0x012b }\n r0 = r3.exists();\t Catch:{ Throwable -> 0x012b }\n if (r0 == 0) goto L_0x005f;\n L_0x0044:\n r0 = \"load normal lib\";\n org.telegram.messenger.FileLog.m13725d(r0);\t Catch:{ Throwable -> 0x012b }\n r0 = \"tmessages.27\";\n java.lang.System.loadLibrary(r0);\t Catch:{ Error -> 0x005b }\n r0 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x005b }\n r3 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x005b }\n init(r0, r3);\t Catch:{ Error -> 0x005b }\n r0 = 1;\n nativeLoaded = r0;\t Catch:{ Error -> 0x005b }\n goto L_0x0007;\n L_0x005b:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ Throwable -> 0x012b }\n L_0x005f:\n r3 = new java.io.File;\t Catch:{ Throwable -> 0x012b }\n r0 = r6.getFilesDir();\t Catch:{ Throwable -> 0x012b }\n r4 = \"lib\";\n r3.<init>(r0, r4);\t Catch:{ Throwable -> 0x012b }\n r3.mkdirs();\t Catch:{ Throwable -> 0x012b }\n r4 = new java.io.File;\t Catch:{ Throwable -> 0x012b }\n r0 = \"libtmessages.27loc.so\";\n r4.<init>(r3, r0);\t Catch:{ Throwable -> 0x012b }\n r0 = r4.exists();\t Catch:{ Throwable -> 0x012b }\n if (r0 == 0) goto L_0x009c;\n L_0x007c:\n r0 = \"Load local lib\";\n org.telegram.messenger.FileLog.m13725d(r0);\t Catch:{ Error -> 0x0095 }\n r0 = r4.getAbsolutePath();\t Catch:{ Error -> 0x0095 }\n java.lang.System.load(r0);\t Catch:{ Error -> 0x0095 }\n r0 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x0095 }\n r5 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x0095 }\n init(r0, r5);\t Catch:{ Error -> 0x0095 }\n r0 = 1;\n nativeLoaded = r0;\t Catch:{ Error -> 0x0095 }\n goto L_0x0007;\n L_0x0095:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ Throwable -> 0x012b }\n r4.delete();\t Catch:{ Throwable -> 0x012b }\n L_0x009c:\n r0 = new java.lang.StringBuilder;\t Catch:{ Throwable -> 0x012b }\n r0.<init>();\t Catch:{ Throwable -> 0x012b }\n r5 = \"Library not found, arch = \";\n r0 = r0.append(r5);\t Catch:{ Throwable -> 0x012b }\n r0 = r0.append(r1);\t Catch:{ Throwable -> 0x012b }\n r0 = r0.toString();\t Catch:{ Throwable -> 0x012b }\n org.telegram.messenger.FileLog.m13726e(r0);\t Catch:{ Throwable -> 0x012b }\n r0 = loadFromZip(r6, r3, r4, r1);\t Catch:{ Throwable -> 0x012b }\n if (r0 != 0) goto L_0x0007;\n L_0x00b9:\n r0 = \"tmessages.27\";\n java.lang.System.loadLibrary(r0);\t Catch:{ Error -> 0x00cb }\n r0 = net.hockeyapp.android.C2367a.f7955a;\t Catch:{ Error -> 0x00cb }\n r1 = org.telegram.messenger.BuildVars.DEBUG_VERSION;\t Catch:{ Error -> 0x00cb }\n init(r0, r1);\t Catch:{ Error -> 0x00cb }\n r0 = 1;\n nativeLoaded = r0;\t Catch:{ Error -> 0x00cb }\n goto L_0x0007;\n L_0x00cb:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ all -> 0x00d1 }\n goto L_0x0007;\n L_0x00d1:\n r0 = move-exception;\n monitor-exit(r2);\n throw r0;\n L_0x00d4:\n r0 = android.os.Build.CPU_ABI;\t Catch:{ Exception -> 0x0122 }\n r1 = \"armeabi\";\n r0 = r0.equalsIgnoreCase(r1);\t Catch:{ Exception -> 0x0122 }\n if (r0 == 0) goto L_0x00e4;\n L_0x00df:\n r0 = \"armeabi\";\n goto L_0x001a;\n L_0x00e4:\n r0 = android.os.Build.CPU_ABI;\t Catch:{ Exception -> 0x0122 }\n r1 = \"x86\";\n r0 = r0.equalsIgnoreCase(r1);\t Catch:{ Exception -> 0x0122 }\n if (r0 == 0) goto L_0x00f4;\n L_0x00ef:\n r0 = \"x86\";\n goto L_0x001a;\n L_0x00f4:\n r0 = android.os.Build.CPU_ABI;\t Catch:{ Exception -> 0x0122 }\n r1 = \"mips\";\n r0 = r0.equalsIgnoreCase(r1);\t Catch:{ Exception -> 0x0122 }\n if (r0 == 0) goto L_0x0104;\n L_0x00ff:\n r0 = \"mips\";\n goto L_0x001a;\n L_0x0104:\n r0 = \"armeabi\";\n r1 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0122 }\n r1.<init>();\t Catch:{ Exception -> 0x0122 }\n r3 = \"Unsupported arch: \";\n r1 = r1.append(r3);\t Catch:{ Exception -> 0x0122 }\n r3 = android.os.Build.CPU_ABI;\t Catch:{ Exception -> 0x0122 }\n r1 = r1.append(r3);\t Catch:{ Exception -> 0x0122 }\n r1 = r1.toString();\t Catch:{ Exception -> 0x0122 }\n org.telegram.messenger.FileLog.m13726e(r1);\t Catch:{ Exception -> 0x0122 }\n goto L_0x001a;\n L_0x0122:\n r0 = move-exception;\n org.telegram.messenger.FileLog.m13728e(r0);\t Catch:{ Throwable -> 0x012b }\n r0 = \"armeabi\";\n goto L_0x001a;\n L_0x012b:\n r0 = move-exception;\n r0.printStackTrace();\t Catch:{ all -> 0x00d1 }\n goto L_0x00b9;\n L_0x0130:\n r1 = r0;\n goto L_0x0030;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.messenger.NativeLoader.initNativeLibs(android.content.Context):void\");\n }", "public native int nativeOnFrame(VideoFrame.Buffer buffer, int i, int i2, int i3, long j);", "static native int jniPrint(long patch, JJJCallback printCb);", "private static native int initSPIDevice();", "public native static void jniinitMira(int miraVersion);", "private static native long create_0();", "static native int jniFromBuffers(\n AtomicLong out,\n byte[] oldBuffer,\n int oldLen,\n String oldAsPath,\n byte[] newBuffer,\n int newLen,\n String newAsPath,\n long opts);", "private static native boolean read_0(long nativeObj, long image_nativeObj);", "public interface BridgeListener {\n\n void getJsInvokeNativeResult(Map<String, String> resultMap);\n}", "public native int add(int a,int b);", "private static native boolean open_0(long nativeObj, String filename);", "@C_FUNCTION\n public static native void syscall_membarrier();", "protected void callJava() throws MathLinkException {\n int callType;\n boolean byVal;\n int classID;\n Object instance = null;\n int[] indices = null;\n Object[] args = null;\n try {\n this.checkFunction(\"List\");\n classID = this.getInteger();\n callType = this.getInteger();\n instance = this.getObject();\n indices = this.getIntArray1();\n byVal = this.getInteger() != 0;\n int argCount = this.getInteger();\n args = new Object[argCount];\n for (int i = 0; i < argCount; ++i) {\n args[i] = this.getTypeObjectPair();\n }\n this.newPacket();\n }\n catch (Exception e) {\n this.handleCleanException(e);\n return;\n }\n try {\n switch (callType) {\n case 1: {\n Object obj = null;\n try {\n obj = this.objectHandler.callCtor(classID, indices, args);\n }\n catch (Throwable t) {\n if (this.isRecoverableException(t)) {\n this.handleCleanException(t);\n break;\n }\n throw (Error)t;\n }\n if (this.wasInterrupted()) {\n this.putFunction(\"Abort\", 0);\n break;\n }\n this.putReference(obj);\n break;\n }\n case 2: {\n boolean wasManual = this.isManual();\n this.setManual(false);\n try {\n Object res = this.objectHandler.callMethod(classID, instance, indices, args);\n if (this.isManual()) {\n this.endPacket();\n this.putSymbol(\"Null\");\n break;\n }\n if (this.wasInterrupted()) {\n this.putFunction(\"Abort\", 0);\n break;\n }\n if (byVal) {\n this.put(res);\n break;\n }\n this.putReference(res);\n }\n catch (InvocationTargetException e) {\n Throwable t = e.getTargetException();\n if (this.isManual()) {\n this.lastExceptionDuringCallPacketHandling = t;\n this.clearError();\n t.printStackTrace();\n String msg = Utils.createExceptionMessage(t);\n this.endPacket();\n this.flush();\n this.putFunction(\"JLink`Package`manualException\", 1);\n this.put(msg);\n } else {\n this.handleCleanException(t);\n if (!this.isRecoverableException(t)) {\n throw (Error)t;\n }\n }\n break;\n }\n catch (Exception t) {\n this.lastExceptionDuringCallPacketHandling = t;\n this.handleCleanException(t);\n }\n finally {\n this.setManual(wasManual);\n }\n }\n case 3: {\n int fieldIndex = indices[indices.length - 1];\n try {\n if (args.length == 0) {\n Object res = this.objectHandler.getField(classID, instance, fieldIndex);\n if (byVal) {\n this.put(res);\n break;\n }\n this.putReference(res);\n break;\n }\n this.objectHandler.setField(classID, instance, fieldIndex, args[0]);\n this.putSymbol(\"Null\");\n break;\n }\n catch (Exception t) {\n this.lastExceptionDuringCallPacketHandling = t;\n this.handleCleanException(t);\n break;\n }\n }\n }\n }\n catch (MathLinkException e) {\n System.err.println(\"Serious error: MathLinkException trying to report results of previous exception.\");\n this.clearError();\n try {\n this.endPacket();\n }\n catch (MathLinkException ee) {\n // empty catch block\n }\n }\n }", "private synchronized static native int nativeLoadImage( String fileName ) \n throws UnsatisfiedLinkError;", "protected void javaCallback() {\n\t}", "public native int cargarDatosTracker();", "public synchronized native static int open();", "public native com.johnholdsworth.swiftbindings.SwiftHelloTest.TestListener __TestListenerMethod( long __swiftObject, com.johnholdsworth.swiftbindings.SwiftHelloTest.TestListener arg );", "public native void onScannerStatusNative(String Status);", "public native java.lang.String[] __StringArrayMethod( long __swiftObject, java.lang.String[] arg );", "static native int jniFromBlobAndBuffer(\n AtomicLong out,\n long oldBlob,\n String oldAsPath,\n byte[] buffer,\n int bufferLen,\n String bufferAsPath,\n long opts);", "public abstract long getNativePtr();", "public native String nativeGetNV(int i);", "public native String editTextFromJNI(String str);", "public native int startService(long nativeHandle);", "private native static int load_object(String componentFileName);" ]
[ "0.76441854", "0.7594708", "0.7335335", "0.7330725", "0.73143834", "0.7228165", "0.7129286", "0.7121013", "0.7070551", "0.6994246", "0.6965568", "0.68953985", "0.68747014", "0.6842608", "0.6785438", "0.6768115", "0.662698", "0.6599575", "0.65865713", "0.65740955", "0.6566459", "0.6555942", "0.6549101", "0.65280235", "0.65193254", "0.65165186", "0.6507586", "0.65026194", "0.6495312", "0.64870787", "0.64631176", "0.64583224", "0.6454614", "0.64484394", "0.63836133", "0.63792926", "0.637725", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.6373637", "0.63267785", "0.6314897", "0.6299826", "0.629946", "0.6260644", "0.6257325", "0.6257325", "0.6257325", "0.6243837", "0.6230683", "0.6230419", "0.621064", "0.6209173", "0.6209173", "0.62000775", "0.61953306", "0.6193307", "0.6182953", "0.61526084", "0.6140204", "0.61350083", "0.613047", "0.6121688", "0.61132425", "0.610168", "0.6056585", "0.6055671", "0.60457045", "0.6035087", "0.6033224", "0.60137695", "0.6008599", "0.6003018", "0.5997622", "0.599692", "0.5965945", "0.5964336", "0.59421206", "0.5933963", "0.591606", "0.59160024", "0.5901555", "0.589557", "0.5892802", "0.58867437" ]
0.7186372
6
Callbacks from the native back into the java framework. All callbacks are routed via the Service which will disambiguate which state machine the message should be routed through.
private void onConnectionStateChanged(int state, int peerFeat, int chldFeat, byte[] address) { StackEvent event = new StackEvent(StackEvent.EVENT_TYPE_CONNECTION_STATE_CHANGED); event.valueInt = state; event.valueInt2 = peerFeat; event.valueInt3 = chldFeat; event.device = getDevice(address); // BluetoothAdapter.getDefaultAdapter().getRemoteDevice(Utils.getAddressStringFromByte // (address)); if (DBG) { Log.d(TAG, "Device addr " + event.device.getAddress() + " State " + state); } HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); if (service != null) { service.messageFromNative(event); } else { Log.w(TAG, "Ignoring message because service not available: " + event); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FlightTrackingCallbackHandler extends Remote {\n\n /*\n * Callback cuando el vuelo fue asignado a una pista\n */\n void onRunwayAssignment(final String flightId, final String destination, final String runway, final long flightsAhead)\n throws RemoteException;\n\n /*\n * Callback cuando el vuelo cambió su posicion en la cola de espera de la pista\n */\n void onQueuePositionUpdate(final String flightId, final String destination, final String runway, final long flightsAhead)\n throws RemoteException;\n\n /*\n * Callback cuando el vuelo despego\n */\n void onDeparture(final String flightId, final String destination, final String runway)\n throws RemoteException;\n\n /*\n * Callback para eliminar el handler de callbacks\n */\n void endProcess()\n throws RemoteException;\n}", "int callback(int num_msg, Pointer msg, Pointer resp, Pointer _ptr);", "public interface MessageCallBack {\n\n void onMessage(String message);\n}", "public interface IClimateMessageCallback {\n\n /**\n * Call back with CPG messages as StatusMessage.\n * \n * @param statusMessage\n */\n public void messageArrived(StatusMessage statusMessage);\n}", "public interface MessageReceivedCallback {\n public void BLEMessageReceived(byte[] data);\n void BLEDeviceConnected();\n void BLEDeviceDisconnected();\n}", "private void execServiceHandler( Message msg ) {\n \tswitch ( msg.what ) {\n\t\t\tcase BluetoothService.WHAT_READ:\n\t\t\t\texecHandlerRead( msg );\n break;\n case BluetoothService.WHAT_WRITE:\n\t\t\t\texecHandlerWrite( msg );\n break;\n\t\t\tcase BluetoothService.WHAT_STATE_CHANGE:\n\t\t\t\texecHandlerChange( msg );\n break;\n case BluetoothService.WHAT_DEVICE_NAME:\n\t\t\t\texecHandlerDevice( msg );\n break;\n case BluetoothService.WHAT_FAILED:\n\t\t\t\texecHandlerFailed( msg );\n break;\n\t\t\tcase BluetoothService.WHAT_LOST:\n\t\t\t\texecHandlerLost( msg );\n break;\n }\n\t}", "@Override\n\tpublic void messageBusErrorCallback() {\n\t}", "JflowMethod buildCallback(String cbid)\n{\n Iterable<JflowMethod> it = model_master.getCallbacks(cbid);\n if (it == null) return null;\n\n JflowMethod m = callback_methods.get(cbid);\n if (m != null) return m;\n\n try {\n BT_Class dcls = BT_Class.forName(\"edu.brown.cs.ivy.jflow.JflowDummy\");\n BT_Method bm = null;\n try {\n\t bm = dcls.findMethod(\"callbackHandler_\" + cbid,\"()\");\n }\n catch (NoSuchMethodError e) {\n\t BT_ClassVector args = new BT_ClassVector();\n\t BT_MethodSignature bsg = BT_MethodSignature.create(BT_Class.getVoid(),args);\n\t bm = dcls.addStubMethod(\"callbackHandler_\" + cbid,bsg);\n }\n m = model_master.createMetaMethod(bm);\n callback_methods.put(cbid,m);\n }\n catch (Exception e) {\n System.err.println(\"Problem finding callback method: \" + e);\n return null;\n }\n\n if (model_master.doDebug()) {\n System.err.println(\"Create CALLBACK \" + cbid + \" \" + m);\n }\n\n ModelState enter = ModelState.createSimpleState(m,0);\n ModelState exit = ModelState.createSimpleState(m,0);\n ModelState s1 = ModelState.createSimpleState(m,0);\n ModelState s2 = ModelState.createSimpleState(m,0);\n enter.addTransition(s1);\n s2.addTransition(s2);\n s2.addTransition(s1);\n\n for (JflowMethod mi : it) {\n if (!isMethodIgnored(mi)) {\n\t ModelState sc = ModelState.createCallState(m,0,mi,false,null);\n\t s1.addTransition(sc);\n\t sc.addTransition(s2);\n\t addMethodTodo(mi);\n }\n }\n\n simplify(enter);\n\n ModelMethod mm = new ModelMethod(m,enter,exit);\n complete_calls.put(m,mm);\n\n return m;\n}", "public interface ReceiveCallback extends MessageReceivedCallback{\n}", "public void beginLoadingService(MVCCallback<MVCService> onServiceLoadedCallback);", "void processCallback (ZyniMsg msg);", "public interface PhoneStateChangeCallback {\n void onInComingOffHook(String incomingNumber);\n void onInComingEnd(String incomingNumber);\n void onOutComingStart(String outNumber);\n void onOutComingEnd(String outNumber);\n}", "public void OnMessageReceived(String msg);", "public interface UserControllerCallback {\n void userAction(int code);\n}", "abstract void onMessage(byte[] message);", "public interface RecivMessageCallBack {\n\n\tpublic List<AppServerType> getServerType();\n\n\tpublic void onRecivMessage(Channel ctx, NettyMessage message, String tag, JsonParser parser)throws UnsupportedEncodingException;\n}", "public interface C44035d extends C1677a {\n C7358b addICoreServiceLifecycleCallback(C30032a c30032a);\n\n C7358b addNotifyReceiverCallback(C44034c c44034c);\n\n void setILightPushDelegate(C23228b c23228b);\n}", "void onMessageReceived(Message message);", "public static abstract interface M0_callbackPtr {\n\n public abstract int handler();\n }", "public interface ClientCallbackSIMON_IF // extends ClientCallback_IF\n{\n public void callback(String text);\n\n public void ping();\n\n}", "@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}", "public interface AutoServiceRunningCallBack {\n void call();\n}", "void systemMessageReceived(IMSession session, Message message);", "public ApplicationManagementServiceCallbackHandler(){\n this.clientData = null;\n }", "public interface Callbacks {\n void onStateChanged();\n void onProximityNegative();\n }", "@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}", "public void messageArrived(StatusMessage statusMessage);", "public interface MessageReceived {\n void onMessageReceived(String message);\n}", "@Override\n\t\tpublic void handleMessage(final Message msg) {\n\t\t\tswitch (msg.what) {\n\t\t\tcase 0:\n\t\t\t\ttry {\n\t\t\t\t\tHttpDataCallBackEntity entity = (HttpDataCallBackEntity) msg.obj;\n\t\t\t\t\tentity.HttpSuccessCallBack();\n\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\ttry {\n\t\t\t\t\tHttpDataCallBackEntity entity = (HttpDataCallBackEntity) msg.obj;\n\t\t\t\t\tentity.HttpFailCallBack();\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t// Looper.loop();\n\t\t}", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tsuper.handleMessage(msg);\n\t\t\tswitch (msg.what) {\n\t\t\tcase SUCCESS:\n\t\t\t\tmCallback.onSuccess(mTag);\n\t\t\t\tbreak;\n\t\t\tcase FAIL:\n\t\t\t\tmCallback.onFail(mTag);\n\t\t\t}\n\t\t}", "public abstract EnvioMensajesCallBackInterface getInterfaceCallback();", "void onServiceSuccess(MasterResponse masterResponse, int taskCode);", "public interface ApplicationCallback {\n void callback(Application application, StatusResponse statusResponse);\n}", "public interface OnMessageReceived {\n public void messageReceived(String message);\n }", "@Override\n\t\t\t\t\t\t\tpublic void callback(HBCIPassport passport, int reason, String msg,\n\t\t\t\t\t\t\t\t\tint datatype, StringBuffer retData) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}", "public interface PaymentCallBackFacade {\n\n CommonResp callback(NotifyTradeStatusReq notifyTradeStatusReq);\n}", "public interface NetworkStringCallback\n{\n void onServiceCallback(String response, Exception exception);\n}", "public interface APICallbacks\r\n{\r\n\r\n /**\r\n * <p>This is the copyright notice for this class </p>\r\n *\r\n * @copyright<br><p><B>Patsystems UK Limited 2000-2007</b></p>\r\n */\r\n public static final String COPYRIGHT = \"Copyright (c) Patsystems UK Limited 2000-2007\";\r\n\r\n /**\r\n * Host Link Status Change message ID.\r\n */\r\n public static final int MID_HOST_LINK_CHANGE = 1;\r\n\r\n /**\r\n * Price Link Status Change message ID.\r\n */\r\n public static final int MID_PRICE_LINK_CHANGE = 2;\r\n\r\n /**\r\n * Logon Status message ID.\r\n */\r\n public static final int MID_LOGON_STATUS = 3;\r\n\r\n /**\r\n * User Message message ID.\r\n */\r\n public final static int MID_MESSAGE = 4;\r\n\r\n /**\r\n * Order message ID.\r\n */\r\n public static final int MID_ORDER = 5;\r\n\r\n /**\r\n * End of Day message ID.\r\n */\r\n public static final int MID_FORCED_LOGOUT = 6;\r\n\r\n /**\r\n * Download Complete message ID.\r\n */\r\n public static final int MID_DOWNLOAD_COMPLETE = 7;\r\n\r\n /**\r\n * Price Change message ID.\r\n */\r\n public static final int MID_PRICE = 8;\r\n\r\n /**\r\n * Fill message ID.\r\n */\r\n public static final int MID_FILL = 9;\r\n\r\n /**\r\n * Status Update message ID.\r\n */\r\n public static final int MID_STATUS = 10;\r\n\r\n /**\r\n * Contract Added message ID.\r\n */\r\n public static final int MID_CONTRACT_ADDED = 11;\r\n\r\n /**\r\n * Contract Deleted message ID.\r\n */\r\n public static final int MID_CONTRACT_DELETED = 12;\r\n\r\n /**\r\n * Exchange Rate Updated message ID.\r\n */\r\n public static final int MID_EXCHANGE_RATE = 13;\r\n\r\n /**\r\n * Connectivity Status Update message ID.\r\n */\r\n public static final int MID_CONNECTIVITY_STATUS = 14;\r\n\r\n /**\r\n * Order Cancellation Timeout message ID.\r\n */\r\n public static final int MID_ORDER_CANCEL_FAILURE_ID = 15;\r\n\r\n /**\r\n * At Best message ID.\r\n */\r\n public static final int MID_AT_BEST_ID = 16;\r\n\r\n /**\r\n * Memory warning message ID.\r\n */\r\n public static final int MID_MEMORY_WARNING = 18;\r\n\r\n /**\r\n * Subscriber Depth message ID.\r\n */\r\n public static final int MID_SUBSCRIBER_DEPTH = 19;\r\n\r\n /**\r\n * DOM update message ID.\r\n */\r\n public static final int MID_DOM_UPDATE = 21;\r\n\r\n /**\r\n * Settlement Price message ID.\r\n */\r\n public static final int MID_SETTLEMENT_PRICE = 22;\r\n\r\n /**\r\n * Strategy creation successfullyReceived ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_RECEIVED = 23;\r\n\r\n /**\r\n * Strategy creation failure ID.\r\n */\r\n public static final int MID_STRATEGY_CREATION_FAILURE = 24;\r\n\r\n /**\r\n * Generic Price message ID.\r\n */\r\n public static final int MID_GENERIC_PRICE = 26;\r\n\r\n /**\r\n * Price blank message ID\r\n */\r\n public static final int MID_BLANK_PRICE = 27;\r\n\r\n /**\r\n * Order Queued Timeout ID.\r\n */\r\n public static final int MID_ORDER_QUEUED_TIMEOUT = 28;\r\n\r\n /**\r\n * Order Sent Timeout ID.\r\n */\r\n public static final int MID_ORDER_SENT_TIMEOUT = 29;\r\n\r\n /**\r\n * Order Book reset ID.\r\n */\r\n public static final int MID_RESET_ORDERBOOK = 30;\r\n\r\n /**\r\n * Exception/Error ID (Internal).\r\n */\r\n public static final int MID_ERROR = -1;\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQ = 100;\r\n\r\n /**\r\n * LOW Price Alert.\r\n */\r\n public static final int MID_LOWPRICE = 101;\r\n\r\n /**\r\n * HIGH Price Alert.\r\n */\r\n public static final int MID_HIGHPRICE = 102;\r\n\r\n\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_BID = 103;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_OFFER = 104;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQI_2_SIDES = 105;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_BID = 106;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_OFFER = 107;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_2_SIDES = 108;\r\n /**\r\n * RFQ Change message ID.\r\n */\r\n public static final int MID_RFQT_CROSS = 109;\r\n\r\n /**\r\n * Strategy creation strategy created event id.\r\n */\r\n public static final int MID_STRATEGY_CREATION_CREATED = 200;\r\n\r\n /**\r\n * Event ID to update order history\r\n */\r\n public static final int MID_UPDATE_ORDERHISTORY = 1000;\r\n\r\n\r\n}", "public interface StateCallback {\n void onEndFailed(int i, String str);\n\n void onEndSuccess();\n\n void onError(String str);\n\n void onStartFailed(int i, String str);\n\n void onStartSuccess();\n\n void onWarn(String str);\n}", "@Override\n\t\t\tpublic void callbackCall() {\n\t\t\t}", "public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n void serviceFailure(Exception exception);\n}", "public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n void serviceFailure(Exception exception);\n}", "public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n void serviceFailure(Exception exception);\n}", "public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n\n void serviceFailure(Exception exception);\n}", "public interface WeiBackCallBack {\n void BackAction();\n}", "public UrbrWSServiceCallbackHandler(){\r\n this.clientData = null;\r\n }", "public void onMessage(Session session);", "@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}", "void onServiceBegin(int taskCode);", "private void internalHandleMessage(android.os.Message r1) throws android.os.RemoteException {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.telecom.ConnectionServiceAdapterServant.1.internalHandleMessage(android.os.Message):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.1.internalHandleMessage(android.os.Message):void\");\n }", "public abstract void callback(VixHandle handle, int eventType, \n\t\tVixHandle moreEventInfo, Object clientData);", "public interface EventCallback {\n void invoke(String receiver,Object result);\n}", "public void onMessage(Message arg0) {\n\r\n\t}", "public interface CallbackListener {\n\n public abstract void callBack(String returnCode, Object result);\n\n}", "public SendSmsServiceCallbackHandler(){\n this.clientData = null;\n }", "public interface Callback {\n public static final int TYPE_REGULAR = 0;\n public static final int TYPE_DRAFT = 1;\n public static final int TYPE_TRASH = 2;\n\n /**\n * Called when the specified mailbox does not exist.\n */\n public void onMailboxNotFound(boolean firstLoad);\n\n /**\n * Called when the user wants to open a message.\n * Note {@code mailboxId} is of the actual mailbox of the message, which is different from\n * {@link MessageListFragment#getMailboxId} if it's magic mailboxes.\n *\n * @param messageId the message ID of the message\n * @param messageMailboxId the mailbox ID of the message.\n * This will never take values like {@link Mailbox#QUERY_ALL_INBOXES}.\n * @param listMailboxId the mailbox ID of the listbox shown on this fragment.\n * This can be that of a magic mailbox, e.g. {@link Mailbox#QUERY_ALL_INBOXES}.\n * @param type {@link #TYPE_REGULAR}, {@link #TYPE_DRAFT} or {@link #TYPE_TRASH}.\n */\n public void onMessageOpen(long messageId, long messageMailboxId, long listMailboxId,\n int type);\n\n /**\n * Called when an operation is initiated that can potentially advance the current\n * message selection (e.g. a delete operation may advance the selection).\n * @param affectedMessages the messages the operation will apply to\n */\n public void onAdvancingOpAccepted(Set<Long> affectedMessages);\n\n /**\n * Called when a drag & drop is initiated.\n *\n * @return true if drag & drop is allowed\n */\n public boolean onDragStarted();\n\n /**\n * Called when a drag & drop is ended.\n */\n public void onDragEnded();\n }", "public interface ActionCallBack {\n void acceptOrder(int position);\n void cancelOrder(int position);\n void readyToDeliver(int position);\n void showDetails(int position);\n\n\n\n}", "public interface YTranslatorCallBack {\n void getYTranslateCallBack(String responcse, String progressingName);\n /*void getYTranslateCallBackFromText(String response);\n void getYTranslateCallBackFromQTrans(String response);*/\n}", "public static interface Callbacks\n {\n public abstract void ledClientConnected(LedClient ledclient);\n\n public abstract void ledClientDisconnected(LedClient ledclient);\n }", "public interface CallBackListener\n{\n public void drawbackTexto0(String response);\n}", "public interface OnMessageReceived {\n\t\tpublic void messageReceived(String message);\n\t}", "public void callback();", "@Override\n public void handleMessage(Message msg) {\n\t \tif(mService.get() != null && inAllowedState(msg.what)){\n\t \n\t \t\t// Keep track of the current request\n\t \t\tif(msg.what != MSG_GETSTATE)\n\t \t\t\tmService.get().currentRequest = msg.what;\n\t \t\t\n\t \t\t// Send the message to the service\n\t \t\tswitch (msg.what) {\n case MSG_INITIALIZE:\n \tLog.v(TAG, \"initialize client request: \" + msg.obj.toString());\n \tif(!isInitialized() || msg.arg1 > 0){\n mService.get().initializeOCR(new WeakReference<Messenger> (msg.replyTo), msg.obj.toString());\n \t} else {\n \t\tmService.get().sendMessage(new WeakReference<Messenger> (msg.replyTo), MSG_REPLY, \n \t\t\t\tmsg.what, mService.get().getString(R.string.error_already_initialized));\n \t}\n break;\n case MSG_RELEASE:\n \tLog.v(TAG, \"release client request\");\n \tmService.get().releaseOCR();\t\n \tmService.get().sendMessage(new WeakReference<Messenger> (msg.replyTo), MSG_REPLY, \n \t\t\tmsg.what, mService.get().getString(R.string.success_release));\n break;\n case MSG_RECOGNIZE:\n case MSG_RECOGNIZE_TXT:\n \tLog.v(TAG, \"recognize client request\");\n \t\tmService.get().recognize(new WeakReference<Messenger> (msg.replyTo), \n \t\t\t\t(msg.obj instanceof Bitmap) ? (Bitmap) msg.obj : null);\n break;\n case MSG_GETSTATE:\n \tLog.v(TAG, \"get state client request\");\n \tmService.get().sendMessage(new WeakReference<Messenger> (msg.replyTo), MSG_REPLY, \n \t\t\tmsg.what, mService.get().mState.toString());\n \tbreak;\n case MSG_CANCEL:\n \tLog.v(TAG, \"cancel request\");\n \tmService.get().cancel();\n \tbreak;\n case MSG_INSTALL_CHECK:\n \tLog.v(TAG, \"check installation request\");\n \tmService.get().checkInstallation(new WeakReference<Messenger> (msg.replyTo));\n \tbreak;\n default:\n super.handleMessage(msg);\n\t }\t \t\t\n\t \t} else {\n\t try {\n\t \tif(mService.get() != null){\n\t \t\t// It is in an invalid state\n\t \t \t\tLog.e(TAG,\"IncomingHandler: Invalid state, namely: \" + mService.get().mState + \".\");\n\t \t\tmsg.replyTo.send(Message.obtain(null, MSG_ERROR, \n\t \t\t\t\tmService.get().getString(R.string.error_invalid_state)));\n\t \t} else {\n\t \t \t\t// The service does not exist\n\t \t \t\tLog.e(TAG,\"IncomingHandler: Service reference is null.\");\n\t \t\tmsg.replyTo.send(Message.obtain(null, MSG_ERROR, \"Service does not exist.\"));\n\t \t}\n\t } catch (RemoteException e) {\n\t // The client is dead. \n\t\t \t\tLog.e(TAG,\"IncomingHandler: The client is dead.\");\n\t } catch (NullPointerException e) {\n\t // The reply to client is does not exist. \n\t\t \t\tLog.e(TAG,\"IncomingHandler: msg.replyTo was null.\");\n\t }\n\t \t}\n\t }", "protected void javaCallback() {\n\t}", "public void callback() {\n }", "public interface OnMessageReceived {\n void messageReceived(String message);\n }", "public interface IPostListener {\n /**\n * The state message from the service.\n * @param msg\n */\n void stateUpdate(String msg);\n}", "void messageReceived(IMSession session, Message message);", "public interface HomeResponseListener\n extends ResponseListener\n{\n\n public abstract void completed(ServiceCall servicecall);\n\n public abstract void receivedCartItems(CartItems cartitems, ServiceCall servicecall);\n\n public abstract void receivedCompletedRemembersItemIds(List list, ServiceCall servicecall);\n\n public abstract void receivedLoginData(LoginData logindata, ServiceCall servicecall);\n\n public abstract void receivedNotification(Notification notification, ServiceCall servicecall);\n\n public abstract void receivedPromoSlot0(PromoSlot promoslot, ServiceCall servicecall);\n\n public abstract void receivedPromoSlot1(PromoSlot promoslot, ServiceCall servicecall);\n\n public abstract void receivedShoveler0(HomeShoveler homeshoveler, ServiceCall servicecall);\n\n public abstract void receivedShoveler1(HomeShoveler homeshoveler, ServiceCall servicecall);\n}", "public interface ContactUsCallback {\n void onMessageSuccess(ContactUsData contactUsData);\n void onMessageFailure(String error);\n}", "public interface IGFVoiceWakeupListener extends android.os.IInterface\n{\n/** Local-side IPC implementation stub class. */\npublic static abstract class Stub extends android.os.Binder implements com.gofun.voice.IGFVoiceWakeupListener\n{\nprivate static final java.lang.String DESCRIPTOR = \"com.gofun.voice.IGFVoiceWakeupListener\";\n/** Construct the stub at attach it to the interface. */\npublic Stub()\n{\nthis.attachInterface(this, DESCRIPTOR);\n}\n/**\n * Cast an IBinder object into an com.gofun.voice.IGFVoiceWakeupListener interface,\n * generating a proxy if needed.\n */\npublic static com.gofun.voice.IGFVoiceWakeupListener asInterface(android.os.IBinder obj)\n{\nif ((obj==null)) {\nreturn null;\n}\nandroid.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR);\nif (((iin!=null)&&(iin instanceof com.gofun.voice.IGFVoiceWakeupListener))) {\nreturn ((com.gofun.voice.IGFVoiceWakeupListener)iin);\n}\nreturn new com.gofun.voice.IGFVoiceWakeupListener.Stub.Proxy(obj);\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn this;\n}\n@Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException\n{\njava.lang.String descriptor = DESCRIPTOR;\nswitch (code)\n{\ncase INTERFACE_TRANSACTION:\n{\nreply.writeString(descriptor);\nreturn true;\n}\ncase TRANSACTION_onBeginOfSpeech:\n{\ndata.enforceInterface(descriptor);\nthis.onBeginOfSpeech();\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onWakeup:\n{\ndata.enforceInterface(descriptor);\njava.lang.String _arg0;\n_arg0 = data.readString();\njava.lang.String _arg1;\n_arg1 = data.readString();\njava.lang.String _arg2;\n_arg2 = data.readString();\nthis.onWakeup(_arg0, _arg1, _arg2);\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onVolumeChanged:\n{\ndata.enforceInterface(descriptor);\nint _arg0;\n_arg0 = data.readInt();\nthis.onVolumeChanged(_arg0);\nreply.writeNoException();\nreturn true;\n}\ncase TRANSACTION_onError:\n{\ndata.enforceInterface(descriptor);\nint _arg0;\n_arg0 = data.readInt();\nthis.onError(_arg0);\nreply.writeNoException();\nreturn true;\n}\ndefault:\n{\nreturn super.onTransact(code, data, reply, flags);\n}\n}\n}\nprivate static class Proxy implements com.gofun.voice.IGFVoiceWakeupListener\n{\nprivate android.os.IBinder mRemote;\nProxy(android.os.IBinder remote)\n{\nmRemote = remote;\n}\n@Override public android.os.IBinder asBinder()\n{\nreturn mRemote;\n}\npublic java.lang.String getInterfaceDescriptor()\n{\nreturn DESCRIPTOR;\n}\n@Override public void onBeginOfSpeech() throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\nmRemote.transact(Stub.TRANSACTION_onBeginOfSpeech, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onWakeup(java.lang.String sst, java.lang.String id, java.lang.String score) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(sst);\n_data.writeString(id);\n_data.writeString(score);\nmRemote.transact(Stub.TRANSACTION_onWakeup, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onVolumeChanged(int volume) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(volume);\nmRemote.transact(Stub.TRANSACTION_onVolumeChanged, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n@Override public void onError(int code) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeInt(code);\nmRemote.transact(Stub.TRANSACTION_onError, _data, _reply, 0);\n_reply.readException();\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\n}\n}\nstatic final int TRANSACTION_onBeginOfSpeech = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0);\nstatic final int TRANSACTION_onWakeup = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1);\nstatic final int TRANSACTION_onVolumeChanged = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2);\nstatic final int TRANSACTION_onError = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3);\n}\npublic void onBeginOfSpeech() throws android.os.RemoteException;\npublic void onWakeup(java.lang.String sst, java.lang.String id, java.lang.String score) throws android.os.RemoteException;\npublic void onVolumeChanged(int volume) throws android.os.RemoteException;\npublic void onError(int code) throws android.os.RemoteException;\n}", "public interface OnReceive{\n void onReceive(String message);\n}", "public interface ServiceConnectionListener {\n /**\n * 服务绑定成功的监听回调\n * 注册或者注销场景TTS回调监听\n *\n * @param callbackListener 返回TTS到客户端的Binder\n */\n void onCallbackNotify(ICallbackListener callbackListener);\n\n /**\n * 服务绑定成功的监听回调\n * 注册或者注销场景回调监听\n *\n * @param sceneNotifyListener 返现场景状态到客户端的Binder\n */\n void onSceneNotifyListener(ISceneNotifyListener sceneNotifyListener);\n}", "public ApplicationManagementServiceCallbackHandler(Object clientData){\n this.clientData = clientData;\n }", "public Ice.AsyncResult begin_startService(String service, Callback_ServiceManager_startService __cb);", "public interface Callback {\n }", "@Override\n\t\t\t\tpublic void onServiceConnected(ComponentName p1, IBinder p2)\n\t\t\t\t{\n\t\t\t\t}", "@Override\n public void onMessageReceived(RemoteMessage remoteMessage) {\n }", "public void handleMessage(Message message);", "public interface UHFCallbackLiatener {\n void refreshSettingCallBack(ReaderSetting readerSetting);\n void onInventoryTagCallBack(RXInventoryTag tag);\n void onInventoryTagEndCallBack(RXInventoryTag.RXInventoryTagEnd tagEnd);\n void onOperationTagCallBack(RXOperationTag tag);\n}", "public interface ServiceCallBack extends AppBaseServiceCallBack {\n void onSuccessLogout(JSONObject mJsonObject);\n}", "public void handleMessage(android.os.Message r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 0073 in method: android.telecom.ConnectionServiceAdapterServant.1.handleMessage(android.os.Message):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.telecom.ConnectionServiceAdapterServant.1.handleMessage(android.os.Message):void\");\n }", "public interface ServiceCallListener extends ServiceInstanceCallListener, RemoteServiceCallListener {\r\n\r\n}", "public interface SDKCallback {\n void onSDKSuccess(String tag, Object message);\n\n void onSDKFail(String tag, String message);\n\n}", "public interface WebServiceListener {\n\n /**\n * Callback method indicating start event of the service. Call it from your service class in order to give begin callback to the presenter layer.\n * @param taskCode : Web service task code against which service has began. This is used for web service type identification.\n */\n void onServiceBegin(int taskCode);\n\n /**\n * Callback method on service success. Call it from your service class in order to give success callback to the presenter layer.\n * @param masterResponse : Response model from the server API\n * @param taskCode : Web service task code against which response is taken. This is used for web service type identification.\n */\n\n void onServiceSuccess(MasterResponse masterResponse, int taskCode);\n\n /**\n * Callback method on service error. Call it from your service class in order to give error callback to the presenter layer.\n * @param message : Error message.\n * @param taskCode : Web service task code against which error is taken. This is used for web service type identification.\n * @param errorType : Error type.\n */\n void onServiceError(String message, int taskCode, int errorType);\n void onValidationError(ValidationError[] validationError, int taskCode);\n\n}", "public SIO_FI_OA_AFS_OA024ServiceCallbackHandler() {\n\t\tthis.clientData = null;\n\t}", "@Override\r\n\tprotected void handleMessage(Message msg) {\r\n\t\tswitch (msg.what) {\r\n\t\tcase SUCCESS_JSON_MESSAGE:\r\n\t\t\tStationState response = (StationState) msg.obj;\r\n\t\t\tonSuccess(response);\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\tsuper.handleMessage(msg);\r\n\t\t}\r\n\t}", "public interface BOSHClientResponseListener\n{\n\n public abstract void responseReceived(BOSHMessageEvent boshmessageevent);\n}", "@Override\n public void handleMessage(Message msg){\n BTRobotRemoteActivity activity = outer.get();\n\n //can't access main UI activity\n if(activity == null){return;}\n\n //find out what message was sent\n switch(msg.what){\n //bluetooth\n case BluetoothClientService.MESSAGE_STATE_CHANGE:{\n //update bluetooth connection status\n activity.setStatus(msg.arg1);\n break;\n }\n //service wrote data \n case BluetoothClientService.MESSAGE_WRITE:{\n //store data as a string\n String writeMessage = new String((byte[]) msg.obj);\n break;\n }\n //service read data\n case BluetoothClientService.MESSAGE_READ:{\n String readMessage = new String((byte[])msg.obj, 0, msg.arg1);\n break;\n }\n //service retreived device's name\n case BluetoothClientService.MESSAGE_DEVICE_NAME:{\n // save the connected device's name\n activity.setDeviceName(msg.getData().getString(DEVICE_NAME));\n Toast.makeText(activity.getApplicationContext(), \"Connected to \"\n + activity.getDeviceName(), Toast.LENGTH_SHORT).show();\n break;\n }\n //motion sensor\n case MotionMonitor.MESSAGE_MOTION:{\n if(msg.arg1 == MotionMonitor.ARG_ACCEL){\n Bundle b = (Bundle) msg.obj;\n if(b == null){Log.e(TAG, \"Failed to convert message object to bundle\");}\n float [] data = b.getFloatArray(MotionMonitor.KEY_ACCEL);\n activity.updateOrientation(data);\n }\n else if(msg.arg1 == MotionMonitor.ARG_GYRO){\n Bundle b = (Bundle) msg.obj;\n if(b == null){Log.e(TAG, \"Failed type message data to float []\");}\n //set data in gyrostats view \n float [] data = b.getFloatArray(MotionMonitor.KEY_ROTATE);\n TextView stats = (TextView) activity.findViewById(R.id.gyro_stats);\n stats.setText(String.format(\"%4f, %4f, %4f\", data[0], data[1], data[2]));\n }\n else{Log.e(TAG, \"Unsupported argument for MESSAGE_MOTION in handleMessage()\");}\n }\n //ignore other types\n default:{\n }}\n }", "void processMessage(VoidMessage message);", "abstract public Object handleMessage(Object message) throws Exception;", "protected void handleMessage(Message msg) {}", "public interface MessageUpdateCallbacks {\n /**\n * The operation caused the message's UID to change\n * @param message The message for which the UID changed\n * @param newUid The new UID for the message\n */\n public void onMessageUidChange(Message message, String newUid) throws MessagingException;\n\n /**\n * The operation could not be completed because the message doesn't exist\n * (for example, it was already deleted from the server side.)\n * @param message The message that does not exist\n * @throws MessagingException\n */\n public void onMessageNotFound(Message message) throws MessagingException;\n }", "public interface ActivityClientInterfaceTCP {\r\n void clientCallBackTCP(String commandID, String text);\r\n}", "@Override\n\tvoid receiveCall() {\n\n\t}", "@Override\n\tpublic void callback(Object o) {}", "public interface ComCallBack {\n public void onCallBack(Object obj);\n}", "public interface ServiceMessenger\n{\n\t/* public: ServiceMessager interface */\n\n\tpublic void sendEvent(Event event);\n}", "public void messageReceived(Message m) {\n\t\t\r\n\t}", "public interface Callbacks {\n /**\n * Item Processing - method which handling specified Note (save/update in current version)\n * @param noteModel instance of @{@link NoteModel}\n * @param actionAdd boolean\n */\n void itemProcessing(NoteModel noteModel, boolean actionAdd);\n\n /**\n * ActionBack - method which get previous activity\n */\n void actionBack();\n }", "public interface BridgeListener {\n\n void getJsInvokeNativeResult(Map<String, String> resultMap);\n}" ]
[ "0.64459044", "0.63441694", "0.629733", "0.62007856", "0.6183573", "0.6171264", "0.6150805", "0.6145131", "0.60953325", "0.6091911", "0.6063927", "0.60534155", "0.60005444", "0.5936365", "0.5926088", "0.5920692", "0.5901145", "0.58764046", "0.58734643", "0.5848676", "0.5847694", "0.5840004", "0.5828397", "0.58233297", "0.58178574", "0.5812844", "0.5802746", "0.5797228", "0.5786651", "0.5757077", "0.5742557", "0.57244736", "0.5722436", "0.5720656", "0.57198924", "0.57141435", "0.5705229", "0.57024956", "0.57001907", "0.56987655", "0.56969154", "0.56969154", "0.56969154", "0.56907195", "0.56874394", "0.56850827", "0.56839216", "0.56827223", "0.56823003", "0.5675436", "0.5674466", "0.5671845", "0.56705695", "0.5669831", "0.5664424", "0.5659999", "0.56504077", "0.5649982", "0.5644375", "0.5643283", "0.5641816", "0.5635279", "0.5635167", "0.5633484", "0.5632931", "0.56327003", "0.5613136", "0.5604353", "0.5595242", "0.559243", "0.55884117", "0.55788213", "0.5576453", "0.55739254", "0.55639565", "0.55604583", "0.5558503", "0.5550889", "0.5548981", "0.5527959", "0.55245566", "0.55172807", "0.551366", "0.55113447", "0.55075395", "0.55064315", "0.55037755", "0.55013293", "0.5491289", "0.5474619", "0.5471049", "0.5470367", "0.54695207", "0.5465445", "0.5463133", "0.5463105", "0.5461053", "0.54587364", "0.5458339", "0.54520994", "0.54506487" ]
0.0
-1
CIEV (Call indicators) notifying if call(s) are getting set up. Values include: 0 No current call is in setup 1 Incoming call process ongoing 2 Outgoing call process ongoing 3 Remote party being alerted for outgoing call
private void onCallSetup(int callsetup, byte[] address) { StackEvent event = new StackEvent(StackEvent.EVENT_TYPE_CALLSETUP); event.valueInt = callsetup; event.device = getDevice(address); if (DBG) { Log.d(TAG, "onCallSetup: addr " + address + " device" + event.device); Log.d(TAG, "onCallSetup: address " + address + " event " + event); } HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); if (service != null) { service.messageFromNative(event); } else { Log.w(TAG, "onCallSetup: Ignoring message because service not available: " + event); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onCallStateChanged(int state, String incomingNumber) {\n if (state == 2) {\n\n String msg = \" New Phone Call Event. Incoming Number : \"+incomingNumber;\n int mID = 1;\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent notificationIntent = new Intent(context, afterCall.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,\n notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n writeToFile(2, Calendar.getInstance().getTime().toString(), context);\n NotificationCompat.Builder mNotifyBuilder = new NotificationCompat.Builder(\n context).setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(\"Phone Call Made\")\n .setContentText(\"Touch to Take Survey\")\n .setSound(alarmSound)\n .setAutoCancel(true).setWhen(when)\n .setContentIntent(pendingIntent)\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000});\n notificationManager.notify(mID,mNotifyBuilder.build());\n mID++;\n\n }\n }", "public void onCallStateChanged(Context context, int state, String number) {\n if (lastState == state) {\n //No change, debounce extras\n return;\n }\n switch (state) {\n case TelephonyManager.CALL_STATE_RINGING:\n start_time = System.currentTimeMillis();\n String sub = number.replaceAll(\" \", \"\");\n String sub1 = sub.replaceAll(\"\\\\(\", \"\").replaceAll(\"\\\\)\", \"\").replaceAll(\"\\\\-\", \"\");\n mynumber = sub1.substring(Math.max(sub1.length() - 10, 0));\n//contactExists(context, mynumber) ||\n if (contactExistsinApp(context, mynumber)) {\n\n rejectCall(context);\n\n if (PreferenceManager.GetSw3()) {\n\n sendSMS(number, PreferenceManager.Getsms());\n }\n } else if (!contactExists(context, mynumber)) {\n rejectCall(context);\n if (PreferenceManager.GetSw3()) {\n\n sendSMS(number, PreferenceManager.Getsms());\n }\n } else {\n Toast.makeText(context, \"Incoming Detect\" + mynumber + start_time, Toast.LENGTH_SHORT).show();\n }\n\n// Toast.makeText(context, \"Incoming Detect\" + mynumber + start_time, Toast.LENGTH_SHORT).show();\n //There is incoming call\n break;\n case TelephonyManager.CALL_STATE_OFFHOOK:\n if (lastState == TelephonyManager.CALL_STATE_RINGING) {\n Toast.makeText(context, \"Incoming Detect\" + mynumber, Toast.LENGTH_SHORT).show();\n\n }\n if (lastState != TelephonyManager.CALL_STATE_RINGING) {\n }\n\n break;\n case TelephonyManager.CALL_STATE_IDLE:\n //Went to idle- this is the end of a call. What type depends on previous state(s)\n if (lastState == TelephonyManager.CALL_STATE_RINGING) {\n //Ring but no pickup- a miss\n\n }\n }\n lastState = state;\n }", "private static boolean isActiveCall(Call call)\n {\n List<Call> calls;\n CallGroup group = call.getCallGroup();\n if(group != null)\n {\n calls = group.getCalls();\n }\n else\n {\n calls = new Vector<Call>();\n calls.add(call);\n }\n\n for(int i = 0; i < calls.size(); ++i)\n {\n if(isAtLeastOneActiveCallPeer(calls.get(i).getCallPeers()))\n {\n // If there is a single active call peer, then the call is\n // active.\n return true;\n }\n }\n return false;\n }", "public boolean onStateChanged(Call call, int i) {\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onStateChanged fail, no remote.\", new Object[0]);\n return false;\n } else if (call != null) {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n obtain = CallSerializationUtils.writeCallToParcel(obtain, call, getIdByCall(call).intValue());\n obtain.writeInt(i);\n this.mRemote.transact(6, obtain, obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"onStateChanged: %{public}s.\", new Object[]{call.toString()});\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"onStateChanged got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n } else {\n HiLog.error(LOG_LABEL, \"onStateChanged fail, no call.\", new Object[0]);\n return false;\n }\n }", "public boolean handleCallKey() {\n Log.v(this, \"handleCallKey\");\n\n // The green CALL button means either \"Answer\", \"Unhold\", or\n // \"Swap calls\", or can be a no-op, depending on the current state\n // of the Phone.\n\n /**\n * INCOMING CALL\n */\n final CallList calls = mCallList;\n final Call incomingCall = calls.getIncomingCall();\n Log.v(this, \"incomingCall: \" + incomingCall);\n\n // (1) Attempt to answer a call\n if (incomingCall != null) {\n TelecomAdapter.getInstance().answerCall(\n incomingCall.getId(), VideoProfile.STATE_AUDIO_ONLY);\n return true;\n }\n\n /**\n * STATE_ACTIVE CALL\n */\n final Call activeCall = calls.getActiveCall();\n if (activeCall != null) {\n // TODO: This logic is repeated from CallButtonPresenter.java. We should\n // consolidate this logic.\n final boolean canMerge = activeCall.can(\n android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE);\n final boolean canSwap = activeCall.can(\n android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE);\n\n Log.v(this, \"activeCall: \" + activeCall + \", canMerge: \" + canMerge +\n \", canSwap: \" + canSwap);\n\n // (2) Attempt actions on conference calls\n if (canMerge) {\n TelecomAdapter.getInstance().merge(activeCall.getId());\n return true;\n } else if (canSwap) {\n TelecomAdapter.getInstance().swap(activeCall.getId());\n return true;\n }\n }\n\n /**\n * BACKGROUND CALL\n */\n final Call heldCall = calls.getBackgroundCall();\n if (heldCall != null) {\n // We have a hold call so presumeable it will always support HOLD...but\n // there is no harm in double checking.\n final boolean canHold = heldCall.can(android.telecom.Call.Details.CAPABILITY_HOLD);\n\n Log.v(this, \"heldCall: \" + heldCall + \", canHold: \" + canHold);\n\n // (4) unhold call\n if (heldCall.getState() == Call.State.ONHOLD && canHold) {\n TelecomAdapter.getInstance().unholdCall(heldCall.getId());\n return true;\n }\n }\n\n // Always consume hard keys\n return true;\n }", "public boolean inCall();", "private void updateInCallNotification(final InCallState state, CallList callList) {\n /// M: [log optimize] @{\n /** Google log:\n Log.d(this, \"updateInCallNotification...\");\n */\n /// @}\n\n final Call call = getCallToShow(callList);\n\n if (call != null) {\n showNotification(call);\n } else {\n cancelNotification();\n }\n\n /// M: add for OP02 plugin. @{\n// ExtensionManager.getStatusBarExt().updateInCallNotification(call);\n /// @}\n }", "private static void updateCdmaCallStateOnNewOutgoingCall(PhoneGlobals app,\n Connection connection) {\n if (app.cdmaPhoneCallState.getCurrentCallState() ==\n CdmaPhoneCallState.PhoneCallState.IDLE) {\n // This is the first outgoing call. Set the Phone Call State to ACTIVE\n app.cdmaPhoneCallState.setCurrentCallState(\n CdmaPhoneCallState.PhoneCallState.SINGLE_ACTIVE);\n } else {\n // This is the second outgoing call. Set the Phone Call State to 3WAY\n app.cdmaPhoneCallState.setCurrentCallState(\n CdmaPhoneCallState.PhoneCallState.THRWAY_ACTIVE);\n\n // TODO: Remove this code.\n //app.getCallModeler().setCdmaOutgoing3WayCall(connection);\n }\n }", "@Override\n public void onCallEstablished(SipAudioCall call) {\n Toast.makeText(CallActivity.this, \"onCallEstablished\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, \"onCallEstablished: \");\n try {\n call.answerCall(30);\n } catch (Exception e) {\n e.printStackTrace();\n }\n call.startAudio();\n call.setSpeakerMode(true);\n // call.toggleMute();\n updateStatus(call);\n updateLayout(CONNECTED);\n }", "boolean hasCallView();", "private boolean manageNextIncomingCall(CallAction callAction)\n {\n synchronized(incomingCalls)\n {\n Call call;\n int i = incomingCalls.size();\n while(i != 0)\n {\n --i;\n call = incomingCalls.get(i);\n\n // Either this incoming call is already answered, or we will\n // answered it. Thus, we switch it to the answered list.\n answeredCalls.add(call);\n incomingCalls.remove(i);\n\n // We find a call not answered yet.\n if(call.getCallState() == CallState.CALL_INITIALIZATION)\n {\n // Answer or hang up the ringing call.\n CallShortcut.doCallAction(call, callAction);\n return true;\n }\n }\n }\n return false;\n }", "@Override\n\t\tpublic void onCallStateChanged(int state, String incomingNumber) {\n\t\t\tswitch (state) {\n\t\t\t/* 取得手机是待机状态 */\n\t\t\tcase TelephonyManager.CALL_STATE_IDLE:\n\t\t\t\tstateTips.setText(R.string.str_CALL_STATE_IDLE);\n\n\t\t\t\ttry {\n\t\t\t\t\tAudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\t\tif (audioManager != null) {\n\t\t\t\t\t\t/* 设置手机为待机时响铃为正常模式 */\n\t\t\t\t\t\taudioManager\n\t\t\t\t\t\t\t\t.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n\t\t\t\t\t\taudioManager.getStreamVolume(AudioManager.STREAM_RING);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tstateTips.setText(e.toString());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/* 取得手机状态为通话中 */\n\t\t\tcase TelephonyManager.CALL_STATE_OFFHOOK:\n\t\t\t\tstateTips.setText(R.string.str_CALL_STATE_OFFHOOK);\n\t\t\t\tbreak;\n\n\t\t\t/* 取得手机状态为来电 */\n\t\t\tcase TelephonyManager.CALL_STATE_RINGING:\n\t\t\t\t/* 显示来电信息 */\n\t\t\t\tstateTips.setText(getResources().getText(\n\t\t\t\t\t\tR.string.str_CALL_STATE_RINGING)\n\t\t\t\t\t\t+ incomingNumber);\n Log.i(\"电话\",phoneView.getText().toString());\n\t\t\t\t/* 判断与输入电话是否为一样,一样则转为静音模式 */\n\t\t\t\tif (incomingNumber.equals(phoneView.getText().toString())) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\t\t\tif (audioManager != null) {\n\t\t\t\t\t\t\t/* 设置响铃模式为静音 */\n\t\t\t\t\t\t\taudioManager\n\t\t\t\t\t\t\t\t\t.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n\t\t\t\t\t\t\taudioManager\n\t\t\t\t\t\t\t\t\t.getStreamVolume(AudioManager.STREAM_RING);\n\t\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.str_msg),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tstateTips.setText(e.toString());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuper.onCallStateChanged(state, incomingNumber);\n\n\t\t\tetPhone.setOnKeyListener(new EditText.OnKeyListener() {\n\t\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t/* 同步显示TextView */\n\t\t\t\t\tphoneView.setText(etPhone.getText());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "@Override\n public void onCallListChange(CallList callList) {\n if (mInCallActivity != null && mInCallActivity.getCallCardFragment() != null &&\n mInCallActivity.getCallCardFragment().isAnimating()) {\n mAwaitingCallListUpdate = true;\n return;\n }\n if (callList == null) {\n return;\n }\n\n mAwaitingCallListUpdate = false;\n\n InCallState newState = getPotentialStateFromCallList(callList);\n InCallState oldState = mInCallState;\n Log.d(this, \"onCallListChange oldState= \" + oldState + \" newState=\" + newState);\n newState = startOrFinishUi(newState);\n Log.d(this, \"onCallListChange newState changed to \" + newState);\n\n // Set the new state before announcing it to the world\n Log.i(this, \"Phone switching state: \" + oldState + \" -> \" + newState);\n mInCallState = newState;\n\n // notify listeners of new state\n for (InCallStateListener listener : mListeners) {\n Log.d(this, \"Notify \" + listener + \" of state \" + mInCallState.toString());\n listener.onStateChange(oldState, mInCallState, callList);\n }\n\n if (isActivityStarted()) {\n final boolean hasCall = callList.getActiveOrBackgroundCall() != null ||\n callList.getOutgoingCall() != null;\n mInCallActivity.dismissKeyguard(hasCall);\n }\n }", "@Override\n public void onIncomingCall(Call call) {\n InCallState newState = startOrFinishUi(InCallState.INCOMING);\n InCallState oldState = mInCallState;\n\n Log.i(this, \"Phone switching state: \" + oldState + \" -> \" + newState);\n mInCallState = newState;\n\n for (IncomingCallListener listener : mIncomingCallListeners) {\n listener.onIncomingCall(oldState, mInCallState, call);\n }\n }", "@Override\n public void peerStateChanged(CallPeerChangeEvent evt)\n {\n CallPeer sourcePeer = evt.getSourceCallPeer();\n \n if (!sourcePeer.equals(callPeer))\n return;\n \n CallPeerState newState = (CallPeerState) evt.getNewValue();\n CallPeerState oldState = (CallPeerState) evt.getOldValue();\n \n String newStateString = sourcePeer.getState().getLocalizedStateString();\n \n // Play the dialing audio when in connecting and initiating call state.\n // Stop the dialing audio when we enter any other state.\n if (newState == CallPeerState.INITIATING_CALL\n || newState == CallPeerState.CONNECTING)\n {\n NotificationManager\n .fireNotification(NotificationManager.DIALING);\n }\n else\n {\n NotificationManager.stopSound(NotificationManager.DIALING);\n }\n \n if (newState == CallPeerState.ALERTING_REMOTE_SIDE\n //if we were already in state CONNECTING_WITH_EARLY_MEDIA the server\n //is already taking care of playing the notifications so we don't\n //need to fire a notification here.\n && oldState != CallPeerState.CONNECTING_WITH_EARLY_MEDIA)\n {\n //\n NotificationManager\n .fireNotification(NotificationManager.OUTGOING_CALL);\n }\n else if (newState == CallPeerState.BUSY)\n {\n NotificationManager.stopSound(NotificationManager.OUTGOING_CALL);\n \n // We start the busy sound only if we're in a simple call.\n if (!renderer.getCallDialog().isConference())\n {\n NotificationManager.fireNotification(\n NotificationManager.BUSY_CALL);\n }\n }\n else if (newState == CallPeerState.CONNECTING_INCOMING_CALL ||\n newState == CallPeerState.CONNECTING_INCOMING_CALL_WITH_MEDIA)\n {\n if (!CallPeerState.isOnHold(oldState))\n {\n NotificationManager\n .stopSound(NotificationManager.OUTGOING_CALL);\n NotificationManager\n .stopSound(NotificationManager.INCOMING_CALL);\n }\n }\n else if (newState == CallPeerState.CONNECTING_WITH_EARLY_MEDIA)\n {\n //this means a call with early media. make sure that we are not\n //playing local notifications any more.\n NotificationManager\n .stopSound(NotificationManager.OUTGOING_CALL);\n }\n else if (newState == CallPeerState.CONNECTED)\n {\n if (!CallPeerState.isOnHold(oldState))\n {\n NotificationManager\n .stopSound(NotificationManager.OUTGOING_CALL);\n NotificationManager\n .stopSound(NotificationManager.INCOMING_CALL);\n \n if (!renderer.getCallDialog().isCallTimerStarted())\n renderer.getCallDialog().startCallTimer();\n \n // Enabling all buttons when the call is connected.\n renderer.getCallDialog().enableButtons();\n }\n else\n {\n renderer.setOnHold(false);\n renderer.getCallDialog().updateHoldButtonState();\n // Enabling all buttons when the call get back from hold\n renderer.getCallDialog().enableButtonsWhileOnHold(false);\n }\n }\n else if (newState == CallPeerState.DISCONNECTED)\n {\n // The call peer should be already removed from the call\n // see CallPeerRemoved\n }\n else if (newState == CallPeerState.FAILED)\n {\n // The call peer should be already removed from the call\n // see CallPeerRemoved\n }\n else if (CallPeerState.isOnHold(newState))\n {\n renderer.setOnHold(true);\n renderer.getCallDialog().enableButtonsWhileOnHold(true);\n renderer.getCallDialog().updateHoldButtonState();\n }\n \n renderer.setPeerState(newStateString);\n \n String reasonString = evt.getReasonString();\n if (reasonString != null)\n renderer.setErrorReason(reasonString);\n }", "private InCallState startOrFinishUi(InCallState newState) {\n Log.d(this, \"startOrFinishUi: \" + mInCallState + \" -> \" + newState);\n\n // TODO: Consider a proper state machine implementation\n\n // If the state isn't changing we have already done any starting/stopping of activities in\n // a previous pass...so lets cut out early\n if (newState == mInCallState) {\n return newState;\n }\n\n // A new Incoming call means that the user needs to be notified of the the call (since\n // it wasn't them who initiated it). We do this through full screen notifications and\n // happens indirectly through {@link StatusBarNotifier}.\n //\n // The process for incoming calls is as follows:\n //\n // 1) CallList - Announces existence of new INCOMING call\n // 2) InCallPresenter - Gets announcement and calculates that the new InCallState\n // - should be set to INCOMING.\n // 3) InCallPresenter - This method is called to see if we need to start or finish\n // the app given the new state.\n // 4) StatusBarNotifier - Listens to InCallState changes. InCallPresenter calls\n // StatusBarNotifier explicitly to issue a FullScreen Notification\n // that will either start the InCallActivity or show the user a\n // top-level notification dialog if the user is in an immersive app.\n // That notification can also start the InCallActivity.\n // 5) InCallActivity - Main activity starts up and at the end of its onCreate will\n // call InCallPresenter::setActivity() to let the presenter\n // know that start-up is complete.\n //\n // [ AND NOW YOU'RE IN THE CALL. voila! ]\n //\n // Our app is started using a fullScreen notification. We need to do this whenever\n // we get an incoming call. Depending on the current context of the device, either a\n // incoming call HUN or the actual InCallActivity will be shown.\n final boolean startIncomingCallSequence = (InCallState.INCOMING == newState);\n\n // A dialog to show on top of the InCallUI to select a PhoneAccount\n final boolean showAccountPicker = (InCallState.WAITING_FOR_ACCOUNT == newState);\n\n // A new outgoing call indicates that the user just now dialed a number and when that\n // happens we need to display the screen immediately or show an account picker dialog if\n // no default is set. However, if the main InCallUI is already visible, we do not want to\n // re-initiate the start-up animation, so we do not need to do anything here.\n //\n // It is also possible to go into an intermediate state where the call has been initiated\n // but Telecomm has not yet returned with the details of the call (handle, gateway, etc.).\n // This pending outgoing state can also launch the call screen.\n //\n // This is different from the incoming call sequence because we do not need to shock the\n // user with a top-level notification. Just show the call UI normally.\n final boolean mainUiNotVisible = !isShowingInCallUi() || !getCallCardFragmentVisible();\n boolean showCallUi = InCallState.OUTGOING == newState && mainUiNotVisible;\n\n // Direct transition from PENDING_OUTGOING -> INCALL means that there was an error in the\n // outgoing call process, so the UI should be brought up to show an error dialog.\n showCallUi |= (InCallState.PENDING_OUTGOING == mInCallState\n && InCallState.INCALL == newState && !isActivityStarted());\n\n // Another exception - InCallActivity is in charge of disconnecting a call with no\n // valid accounts set. Bring the UI up if this is true for the current pending outgoing\n // call so that:\n // 1) The call can be disconnected correctly\n // 2) The UI comes up and correctly displays the error dialog.\n // TODO: Remove these special case conditions by making InCallPresenter a true state\n // machine. Telecom should also be the component responsible for disconnecting a call\n // with no valid accounts.\n showCallUi |= InCallState.PENDING_OUTGOING == newState && mainUiNotVisible\n && isCallWithNoValidAccounts(mCallList.getPendingOutgoingCall());\n\n // The only time that we have an instance of mInCallActivity and it isn't started is\n // when it is being destroyed. In that case, lets avoid bringing up another instance of\n // the activity. When it is finally destroyed, we double check if we should bring it back\n // up so we aren't going to lose anything by avoiding a second startup here.\n boolean activityIsFinishing = mInCallActivity != null && !isActivityStarted();\n if (activityIsFinishing) {\n Log.i(this, \"Undo the state change: \" + newState + \" -> \" + mInCallState);\n return mInCallState;\n }\n\n if (showCallUi || showAccountPicker) {\n Log.i(this, \"Start in call UI\");\n showInCall(false /* showDialpad */, !showAccountPicker /* newOutgoingCall */);\n } else if (startIncomingCallSequence) {\n Log.i(this, \"Start Full Screen in call UI\");\n\n // We're about the bring up the in-call UI for an incoming call. If we still have\n // dialogs up, we need to clear them out before showing incoming screen.\n if (isActivityStarted()) {\n mInCallActivity.dismissPendingDialogs();\n }\n if (!startUi(newState)) {\n // startUI refused to start the UI. This indicates that it needed to restart the\n // activity. When it finally restarts, it will call us back, so we do not actually\n // change the state yet (we return mInCallState instead of newState).\n return mInCallState;\n }\n } else if (newState == InCallState.NO_CALLS) {\n // The new state is the no calls state. Tear everything down.\n attemptFinishActivity();\n attemptCleanup();\n }\n\n return newState;\n }", "public void readyToReceive()\n { ua.printLog(\"WAITING FOR INCOMING CALL\");\n if (!ua.ua_profile.audio && !ua.ua_profile.video) ua.printLog(\"ONLY SIGNALING, NO MEDIA\"); \n //ua.listen();\n changeStatus(UA_IDLE);\n printOut(\"digit the callee's URL to make a call or press 'enter' to exit\");\n }", "@Test\n public void testConferenceInProgressCDMA() throws Exception {\n ArrayList<BluetoothCall> calls = new ArrayList<>();\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall confCall1 = getMockCall();\n final BluetoothCall confCall2 = createHeldCall();\n calls.add(parentCall);\n calls.add(confCall1);\n calls.add(confCall2);\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(confCall1);\n mBluetoothInCallService.onCallAdded(confCall2);\n\n when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);\n when(confCall1.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall2.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall1.isIncoming()).thenReturn(false);\n when(confCall2.isIncoming()).thenReturn(true);\n when(confCall1.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0000\")));\n when(confCall2.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0001\")));\n addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n String confCall1Id = confCall1.getTelecomCallId();\n when(parentCall.getGenericConferenceActiveChildCallId())\n .thenReturn(confCall1Id);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(confCall1.getTelecomCallId(),\n confCall2.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n //Add links from child calls to parent\n String parentId = parentCall.getTelecomCallId();\n when(confCall1.getParentId()).thenReturn(parentId);\n when(confCall2.getParentId()).thenReturn(parentId);\n\n clearInvocations(mMockBluetoothHeadset);\n mBluetoothInCallService.queryPhoneState();\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(true);\n List<BluetoothCall> children =\n mBluetoothInCallService.getBluetoothCallsByIds(parentCall.getChildrenIds());\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(parentCall, children);\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(0), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n\n when(mMockCallInfo.getHeldCall()).thenReturn(null);\n // Spurious BluetoothCall to onIsConferencedChanged.\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(parentCall, children);\n // Make sure the BluetoothCall has only occurred collectively 2 times (not on the third)\n verify(mMockBluetoothHeadset, times(2)).phoneStateChanged(any(int.class),\n any(int.class), any(int.class), nullable(String.class), any(int.class),\n nullable(String.class));\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle myBundle = intent.getExtras();\n if (myBundle != null) {\n System.out.println(\"--------Not null-----\");\n try {\n System.out.println(\"BlockCallReceiver:\"+intent.getAction());\n if (intent.getAction().equals(\"android.intent.action.PHONE_STATE\")) {\n String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);\n System.out.println(\"--------in state-----\");\n if (state.equals(TelephonyManager.EXTRA_STATE_RINGING)) {\n // Incoming call\n String incomingNumber = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);\n System.out.println(\"--------------my number---------\" + incomingNumber);\n\n List<Plan> list = GetIfResult.getBoolean(ApplicationController.getIfPlanDB(Plan.IF_CALL), incomingNumber);\n if (list.size() == 0) return;\n for (int i = 0; i < list.size(); i++) {\n GetIfResult.doitResult(list.get(i).resultCode, list.get(i).resultValue, context);\n }\n\n if ((System.currentTimeMillis() - ApplicationController.getEndcall() > 5000)\n || (ApplicationController.getEndcall() == -1)) return;\n\n try {\n // this is main section of the code,. could also be use for particular number.\n // Get the boring old TelephonyManager.\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n // Get the getITelephony() method\n Class<?> classTelephony = Class.forName(telephonyManager.getClass().getName());\n Method methodGetITelephony = classTelephony.getDeclaredMethod(\"getITelephony\");\n\n // Ignore that the method is supposed to be private\n methodGetITelephony.setAccessible(true);\n\n // Invoke getITelephony() to get the ITelephony interface\n Object telephonyInterface = methodGetITelephony.invoke(telephonyManager);\n\n // Get the endCall method from ITelephony\n Class<?> telephonyInterfaceClass = Class.forName(telephonyInterface.getClass().getName());\n Method methodEndCall = telephonyInterfaceClass.getDeclaredMethod(\"endCall\");\n\n // Invoke endCall()\n methodEndCall.invoke(telephonyInterface);\n\n SendNotification.sendNotification(context, \"전화가 자동 거절되었습니다.\", incomingNumber);\n } catch (Exception e) {\n //am.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (mode == -1) {\n mode = notificationManager.getCurrentInterruptionFilter();\n }\n notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_NONE);\n } else {\n AudioManager mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n if (mode == -1) {\n mode = mAudioManager.getRingerMode();\n }\n mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); //무음\n }\n //am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n }finally {\n isDoing = true;\n }\n\n //}\n\n } else if (state.equals(TelephonyManager.EXTRA_STATE_IDLE)) {\n Log.d(\"EXTRA_STATE_IDLE\", mode + \"/\"+isDoing);\n if (isDoing) {\n isDoing = false;\n if (mode == -1) return;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n assert notificationManager != null;\n notificationManager.setInterruptionFilter(mode);\n mode = -1;\n\n } else {\n AudioManager mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n assert mAudioManager != null;\n mAudioManager.setRingerMode(mode);\n mode = -1;\n }\n }\n Log.e(\"EXTRA_STATE_IDLE\", mode + \"\");\n }\n }\n } catch (Exception ex) { // Many things can go wrong with reflection calls\n ex.printStackTrace();\n }\n }\n }", "public InCallState getPotentialStateFromCallList(CallList callList) {\n\n InCallState newState = InCallState.NO_CALLS;\n\n if (callList == null) {\n return newState;\n }\n if (callList.getIncomingCall() != null) {\n newState = InCallState.INCOMING;\n } else if (callList.getWaitingForAccountCall() != null) {\n newState = InCallState.WAITING_FOR_ACCOUNT;\n } else if (callList.getPendingOutgoingCall() != null) {\n newState = InCallState.PENDING_OUTGOING;\n } else if (callList.getOutgoingCall() != null) {\n newState = InCallState.OUTGOING;\n } else if (callList.getActiveCall() != null ||\n callList.getBackgroundCall() != null ||\n callList.getDisconnectedCall() != null ||\n callList.getDisconnectingCall() != null) {\n newState = InCallState.INCALL;\n }\n\n if (newState == InCallState.NO_CALLS) {\n if (mBoundAndWaitingForOutgoingCall) {\n return InCallState.OUTGOING;\n }\n }\n\n return newState;\n }", "public void processLiveCallWhenServiceConnected() {\n if (!this.mCallMapById.isEmpty()) {\n for (Integer num : this.mCallMapById.keySet()) {\n Call callById = getCallById(num);\n if (!(callById == null || callById.getState() == 10 || callById.getState() == 7)) {\n HiLog.info(LOG_LABEL, \"processLiveCallWhenServiceConnected: still has call\", new Object[0]);\n addCall(callById);\n }\n }\n processCallAudioStateWhenServiceConnected();\n processCanAddCallWhenServiceConnected();\n }\n }", "@Test\n public void testListCurrentCallsCdmaConference() throws Exception {\n ArrayList<BluetoothCall> calls = new ArrayList<>();\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall confCall1 = getMockCall();\n final BluetoothCall confCall2 = createHeldCall();\n calls.add(parentCall);\n calls.add(confCall1);\n calls.add(confCall2);\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(confCall1);\n mBluetoothInCallService.onCallAdded(confCall2);\n\n when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);\n when(confCall1.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall2.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall1.isIncoming()).thenReturn(false);\n when(confCall2.isIncoming()).thenReturn(true);\n when(confCall1.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0000\")));\n when(confCall2.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0001\")));\n removeCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(true);\n //when(parentCall.getConferenceLevelActiveCall()).thenReturn(confCall1);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(confCall1.getTelecomCallId(),\n confCall2.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n //Add links from child calls to parent\n String parentId = parentCall.getTelecomCallId();\n when(confCall1.getParentId()).thenReturn(parentId);\n when(confCall2.getParentId()).thenReturn(parentId);\n\n clearInvocations(mMockBluetoothHeadset);\n mBluetoothInCallService.listCurrentCalls();\n\n verify(mMockBluetoothHeadset).clccResponse(eq(1), eq(0), eq(CALL_STATE_ACTIVE), eq(0),\n eq(true), eq(\"5550000\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(eq(2), eq(1), eq(CALL_STATE_ACTIVE), eq(0),\n eq(true), eq(\"5550001\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0);\n }", "public static boolean isRealIncomingCall(Call.State state) {\n return (state == Call.State.INCOMING && !PhoneGlobals.getInstance().mCM.hasActiveFgCall());\n }", "@Test\n public void testOnCallAddedCdmaActiveHold() throws Exception {\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall foregroundCall = getMockCall();\n final BluetoothCall heldCall = createHeldCall();\n addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(foregroundCall.getTelecomCallId(),\n heldCall.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n\n mBluetoothInCallService.onCallAdded(parentCall);\n\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n }", "public boolean onCallAdded(Call call) {\n if (call == null) {\n HiLog.error(LOG_LABEL, \"onCallAdded fail, no call.\", new Object[0]);\n return false;\n } else if (call.getState() == 9 && this.mPendingDisconnectPreAddedCall != null) {\n HiLog.info(LOG_LABEL, \"onCallAdded, has pending disconnect call.\", new Object[0]);\n CallAppAbilityConnnectionHandler callAppAbilityConnnectionHandler = this.mHandler;\n if (callAppAbilityConnnectionHandler != null) {\n callAppAbilityConnnectionHandler.removeEvent(1001);\n }\n this.mPendingDisconnectPreAddedCall = null;\n call.disconnect();\n return true;\n } else if (!canAddCallToCallMap()) {\n return false;\n } else {\n if (isConnected()) {\n HiLog.info(LOG_LABEL, \"onCallAdded, already connectted call ability.\", new Object[0]);\n if (this.mPreAddedCall == null && this.mPendingDisconnectPreAddedCall == null) {\n HiLog.info(LOG_LABEL, \"onCallAdded, no pre added call.\", new Object[0]);\n addCallToCallMap(call);\n } else {\n if (this.mPreAddedCall == null) {\n PreAddedCall preAddedCall = this.mPendingDisconnectPreAddedCall;\n }\n processPreAddedCall(this.mPreAddedCall, call);\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n }\n return addCall(call);\n }\n addCallToCallMap(call);\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n connect();\n return true;\n }\n }", "public void handleVoiceNotification(Intent intent) {\n Log.d(TAG, \"status check dnd = \" + this.mIsInterruptMode + \" carmode = \" + this.isCarModeCheck + \" earjack = \" + this.isEarJackConnected);\n if (!this.mIsInterruptMode || this.isCarModeCheck || this.isEarJackConnected) {\n return;\n }\n if (!Application.getCoreService().isConnected()) {\n Log.d(TAG, \"handleVoiceNotification:: Not connected\");\n } else if (!NotificationUtil.isActiveDevice()) {\n Log.d(TAG, \"handleVoiceNotification:: Not ActiveDevice\");\n } else {\n final NotificationMessage notificationMessage = (NotificationMessage) intent.getSerializableExtra(NotificationConstants.VN_MESSAGE);\n if (notificationMessage != null) {\n notificationMessage.log();\n EarBudsInfo earBudsInfo = Application.getCoreService().getEarBudsInfo();\n if (notificationMessage.getType() == 4866 && !earBudsInfo.wearingR && !earBudsInfo.wearingL) {\n Log.d(TAG, \"handleVoiceNotification:: none wearing\");\n } else if (this.mTTSCore != null) {\n Log.d(TAG, \" appName: \" + notificationMessage.getAppName());\n if (notificationMessage.getType() == 4864) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n if (NotificationCoreService.this.mTTSCore == null || NotificationCoreService.this.telephony.getCallState() != 0) {\n Log.d(NotificationCoreService.TAG, \"alarm, call state is not idle\");\n } else {\n NotificationCoreService.this.mTTSCore.makeAlarm(NotificationCoreService.this.mContext, notificationMessage);\n }\n }\n }, 1000);\n } else if (notificationMessage.getType() == 4866) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n Log.d(NotificationCoreService.TAG, \" mCurCallTTSTh start\");\n if (NotificationCoreService.this.mTTSCore != null && NotificationCoreService.this.telephony.getCallState() == 1) {\n NotificationCoreService.this.mTTSCore.makeCall(NotificationCoreService.this.mContext, notificationMessage);\n }\n }\n }, 2000);\n } else {\n this.mTTSCore.insert(notificationMessage, false);\n Log.d(TAG, this.mTTSCore.getMsgQsize() + \" , \" + this.mTTSCore + \" , \");\n if (this.mTTSCore.getMsgQsize() > 0 && this.mTTSCore != null && this.telephony.getCallState() == 0) {\n Log.d(TAG, \"MESSAGE_SPEAK_TTS after 1500 \");\n new Handler().postDelayed(new Runnable() {\n public void run() {\n if (NotificationCoreService.this.mTTSCore != null) {\n NotificationCoreService.this.mTTSCore.makeTTS(NotificationCoreService.this.mContext);\n }\n }\n }, 1500);\n }\n }\n }\n }\n }\n }", "boolean isCalibrating();", "public static void main(String [] args) {\n\t\t//System.load(\"/usr/local/src/freeswitch/libs/esl/java/libesljni.so\");\n\t\tSystem.load(\"/usr/local/freeswitch/scripts/Mod_CallCenterScripts/libesljni.so\");\n\t\tESLconnection con = new ESLconnection(\"127.0.0.1\",\"8021\",\"ClueCon\");\n\t//\tESLconnection con = new ESLconnection(\"10.128.83.112\",\"8021\",\"ClueCon\");\n\t\tESLevent evt;\n\t\tif (con.connected() == 1) System.out.println(\"connected\");\n\t\tcon.events(\"plain\",\"all\");\n\t\t\n\t\tint mode =0;\n\t\twhile (con.connected() == 1) {\t\t\t\t\t\t\n\t\t\t// Get an event - recvEvent will block if nothing is queued\n\t\t\tevt = con.recvEvent();\n\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\tString str = \"\";\n\t\t\t//System.out.println(\"Got the body as :\"+str);\n\t\t\tstr = evt.getHeader(\"Event-Name\",-1);\n\t\t\tif(str==null){\n\t\t\t\tSystem.out.println(\"Got nul event skipping\");\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif(str.equals(\"CUSTOM\")){\n\t\t\t\t//System.out.println(\"Got a Custom event\"+str);\n\t\t\t\tstr = evt.getHeader(\"Event-Subclass\",-1);\n\t\t\t\tif(str.equals(\"callcenter::info\")){\n\t\t\t\t\tSystem.out.println(\"Got a CallCenter event\"+str);\n\t\t\t\t\tstr = evt.getHeader(\"CC-Action\",-1);\n\t\t\t\t\t//System.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\tif(str.equals(\"member-queue-start\")){\n\t\t\t\t\t\tSystem.out.println(\"Someone entering the queue \"+str);\n\t\t\t\t\t\t//CC-Queue: support@default\n\t\t\t\t\t\t//CC-Action: member-queue-start\n\t\t\t\t\t\t//CC-Member-UUID: 453324f8-3424-4322-4242362fd23d \n\t\t\t\t\t\t//CC-Member-Session-UUID: b77c49c2-a732-11df-9438-e7d9456f8886\n\t\t\t\t\t\t//CC-Member-CID-Name: CHOUINARD MO\n\t\t\t\t\t\t//CC-Member-CID-Number: 4385551212\n\t\t\t\t\t\tString Caller = evt.getHeader(\"CC-Member-CID-Number\",-1);\n\t\t\t\t\t\tif(Caller.startsWith(\"11\")){\n\t\t\t\t\t\t\tCaller = Caller.substring(2);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(Caller.length()>10){\n\t\t\t\t\t\tCaller = Caller.substring(Caller.length()-10);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tString Query=\"Insert into Announcement(Number, Date, Mtype,Textualdate,CallUUID) value('\"+Caller+\"',NOW(),'M\"+mode+\"','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t\t\t\t\t\tString Mesg= evt.getHeader(\"CC-Member-Session-UUID\",-1)+\",\";\n\t\t\t\t\t\t\t\tMesg+=updateandReturn(Query);\n\t\t\t\t\t\tif(mode<5){\n\t\t\t\t\t\t\tif(mode==0){\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//SimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t//Thread th = new Thread(p);\n\t\t\t\t\t\t\t\t//th.start();\n\t\t\t\t\t\t\t}else if(mode==1){\n\t\t\t\t\t\t\t\tPosition p = new Position(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==2){\n\t\t\t\t\t\t\t\tSimpleTime p = new SimpleTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==3){\n\t\t\t\t\t\t\t\tDynamicTime p = new DynamicTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if(mode==4){\n\t\t\t\t\t\t\t\tManipulatedTime p = new ManipulatedTime(Mesg);\n\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\tth.start();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t//\tmessage_announce(evt.getHeader(\"CC-Member-Session-UUID\",-1));\n\t\t\t\t\t\tmode++;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t if(mode==5){\n\t\t\t\t\t\t\t\t\tSimpleMessage p = new SimpleMessage(Mesg);\n\t\t\t\t\t\t\t\t\tThread th = new Thread(p);\n\t\t\t\t\t\t\t\t\tth.start();\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\tmode=0;\n\t\t\t\t\t\t}\n//\t\t\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t\t\t//String Query=\"Insert into calls(StartTime, Number, Bound, TextualDate, CallUUID) values(Now(),'\"+Caller+\"','IN','\"+evt.getHeader(\"CC-Member-UUID\",-1)+\"','\"+evt.getHeader(\"CC-Member-Session-UUID\",-1)+\"')\";\n\t//update(Query);\n\t\t\t\t\t\t\t\t\t\n\t}\n\t\t\n\t\t\t\t}else{\n\t\t\t\t//\tSystem.out.println(\"EVent Subclass is \"+ str);\n\t//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t\t}\n\t\t\t}else{\n//\t\t\t\tSystem.out.println(evt.serialize(\"plain\"));\n\t\t\t}\n\n\t\t\t// Print the entire event in key : value format. serialize() according to the wiki usually takes no arguments\n\t\t\t// but if you do not put in something you will not get any output so I just stuck plain in.\t\t\t\n\n\t\t}\n\t}", "private void processCallStateIdle () {\n\t\t\n\t\ttry {\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"IDLE\");\n\t\t\t\n\t\t\tConfigAppValues.processRingCall = false;\n\t\t\t\n\t\t\tif (ringerMode() == AudioManager.RINGER_MODE_SILENT && \n\t\t\t\t\tCheckSettingsOperations.checkQuiteSleepServiceState() && \n\t\t\t\t\t!ConfigAppValues.processIdleCall) {\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\n\t\t\t\t/* Put one pause of 1 second for wait before put the\n\t\t\t\t * ringer mode to normal again\n\t\t\t\t */\t\t\t\t\t\t\n\t\t\t\t//Thread.sleep(1000);\t\t\t\t\t\t\n\t\t\t\tConfigAppValues.processIdleCall = true;\n\n\t\t\t\t//-- If you choose use Android Service for process incoming call use this --//\t\t\t\t\n\t\t\t\tConfigAppValues.getContext().startService(\n\t\t\t\t\t\tnew Intent(\n\t\t\t\t\t\t\t\tConfigAppValues.getContext(),\n\t\t\t\t\t\t\t\tNormalModeCallService.class)); \t\t\t\t\n\t\t\t\t//------------------------------------------------------------//\t\t\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (QSToast.DEBUG) QSToast.d(\n\t\t\t\t\t\tConfigAppValues.getContext().getApplicationContext(),\n\t\t\t\t\t\t\"IDLE!!!!!!!!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(\n\t\t\t\t\tCLASS_NAME, \n\t\t\t\t\tExceptionUtils.exceptionTraceToString(e.toString(), e.getStackTrace()));\n\t\t\t\n\t\t}\n\t}", "private static void checkStatus() {\n\r\n\t\tDate date = new Date();\r\n\t\tSystem.out.println(\"Checking at :\"+date.toString());\r\n\t\tString response = \"\";\r\n\t\ttry {\r\n\t\t\tresponse = sendGET(GET_URL_COVAXIN);\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t//System.out.println(response.toString());\r\n\t\tArrayList<Map> res = formatResponse(response);\r\n\r\n\t\tres = checkAvailability(res);\r\n\t\tif(res.size()>0)\r\n\t\t\tnotifyUser(res);\r\n\t\t//System.out.println(emp.toString());\r\n\t}", "private void processCallStateOffhook () {\n\t\t\n\t\ttry {\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"OFFHOOK\");\t\n\t\t\t\n\t\t\tConfigAppValues.processRingCall = false;\n\t\t\t\n\t\t\tif (QSToast.DEBUG) QSToast.d(\n \t\tConfigAppValues.getContext().getApplicationContext(),\n \t\t\"OFFHOOK!!!!!!!!\",\n \t\tToast.LENGTH_SHORT);\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t}\n\t}", "public boolean isIPVoiceCallSupported() {\n\t\tLogger.i(TAG, \"isIPVoiceCallSupported value \" + ipVoiceCall);\n\t\treturn ipVoiceCall;\t\t\t\t\n\t}", "public Call getCurrentCall();", "private void processCallPresence(PresenceMessage message) throws Exception {\n\t\t\t\t\t\t\n\t\tJID fromJid = message.getFrom();\t\t\n\t\tString callId = fromJid.getNode();\n\t\t\n\t\tif (isOffer(message)) {\t\t\t\n\t\t\tif (!processOffer(message, callId)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (isUnjoinedMixer(message)) {\n\t\t\tprocessUnjoinedMixer(message);\n\t\t} else if (isJoinedMixer(message)) {\n\t\t\tprocessJoinedMixer(message);\t\t\t\n\t\t}\n\t\t\t\t \t\n \tJID from = createExternalJid(callId, fromJid.getResource());\n\t\tString jid = gatewayStorageService.getclientJID(callId); \n\t \tif (jid == null) {\n\t\t log.error(\"Could not find registered JID for call id [%s]\", callId);\n\t\t sendPresenceError(message.getTo(), message.getFrom(), Condition.RECIPIENT_UNAVAILABLE, Type.CANCEL, \"Could not find registered JID for id \" + callId);\n\t\t gatewayStatistics.errorProcessed();\n\t \treturn;\n\t \t}\n \tJID to = getXmppFactory().createJID(jid);\t\t\n\n\t\tif (message.getElement(\"end\", \"urn:xmpp:rayo:1\") != null) {\n\t\t\tgatewayStorageService.unregistercall(callId);\n\t\t}\n\t\t\n\t \tforwardPresence(message, from, to, callId);\t\t\t\t\t\n\t}", "private void acceptCall() {\n\t\ttry {\n\t\t\tupdateText(\"Pratar med \", call.getPeerProfile().getUserName());\n\t\t\tcall.answerCall(30);\n\t\t\tcall.startAudio();\n\t\t\tif (call.isMuted()) {\n\t\t\t\tcall.toggleMute();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (call != null) {\n\t\t\t\tcall.close();\n\t\t\t}\n\n\t\t}\n\t}", "private void ConnectCalls(){\n FunctionLogger logger=new FunctionLogger(\"SetOutboundCallState\",this,myLogger);\n \n //I think if we want to support the Transaction logging we need to throw them in the conf here\n // for now lets just join them\n if(PlayRingbackFlag){\n myInboundCall.Stop();\n } \n SetInboundCallState(InboundCallStates.JOINED);\n SetOutboundCallState(OutboundCallStates.JOINED);\n SetGatewayState(GatewayStates.CONNECTED);\n myInboundCall.Join(myOutboundCall);\n \n }", "public void onCallStateChanged (int state, String incomingNumber) {\n\t\t\n\t\ttry {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tswitch (state) {\t\t\t\t\t\n\t\t\t\n\t\t\t\t//-------------\t\tCALL_STATE_IDLE\t\t----------------------//\n\t\t\t\t//Device call state: No activity. \n\t\t\t\tcase TelephonyManager.CALL_STATE_IDLE:\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\tprocessCallStateIdle();\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//-----------------\t\tCALL_STATE_OFFHOOK\t\t--------------//\n\t\t\t\t//Device call state: Off-hook. At least one call exists that is \n\t\t\t\t//dialing, active, or on hold, and no calls are ringing or waiting. \n\t\t\t\tcase TelephonyManager.CALL_STATE_OFFHOOK:\t\t\t\t\t\n\t\t\t\t\tprocessCallStateOffhook();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//-----------------\t\tCALL_STATE_RINGING\t\t--------------//\n\t\t\t\t//Device call state: Ringing. A new call arrived and is ringing \n\t\t\t\t//or waiting. In the latter case, another call is already active. \n\t\t\t\tcase TelephonyManager.CALL_STATE_RINGING:\t\t\t\t\t\t\t\n\t\t\t\t\tprocessCallStateRinging(incomingNumber);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\t\t\t\n\t\t}\n\t}", "@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG, \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(phoneIsInUse());\n }\n }", "private void makeCall() {\n\t\t// send the originate action (Call)\n\t\tthis.asteriskServer.originateAsync(this.originateAction, new OriginateCallbackAdapter() {\n\t\t\t@Override\n\t\t\tpublic void onDialing(final AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.log.log(Level.INFO, \"Dialing: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\t\t\t\tCall.this.state=CallState.DIALING;\n\t\t\t\tCall.this.currentChannel = asteriskChannel.getName();\n\t\t\t\t// Make sure when there was a hangup event that it is realy hung up.\n\t\t\t\tif(Call.this.hangup)\n\t\t\t\t\tCall.this.hangup();\n\t\t\t\t// Listen for cool stuff like \"ringing\"\n\t\t\t\tasteriskChannel.addPropertyChangeListener(new PropertyChangeListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void propertyChange(PropertyChangeEvent evt) {\n\t\t\t\t\t\t// is the phone ringing?\n\t\t\t\t\t\tif (evt.getPropertyName().equals(\"state\") && evt.getNewValue().toString().equals(\"RINGING\")) {\n\t\t\t\t\t\t\tCall.this.log.log(Level.INFO, \"Ringing: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\t\t\t\t\t\t\t// Schedule hangup timeout\n\t\t\t\t\t\t\tCall.this.timeoutTimer.schedule(new TimerTask() {\n\n\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\t\t\tif (!Call.this.success) {\n\t\t\t\t\t\t\t\t\t\tCall.this.asteriskServer.getChannelByName(Call.this.currentChannel).hangup();\n\t\t\t\t\t\t\t\t\t\t// no \"noAnswer()\" called here because a\n\t\t\t\t\t\t\t\t\t\t// onNoAnswer event will come in anyway\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}, new Long(EPursuit.properties.getProperty(\"callTime\")));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess(AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.state=CallState.RUNNING;\n\t\t\t\tCall.this.success = true;\n\t\t\t\tCall.this.log.log(Level.INFO, \"Connection successful: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onNoAnswer(AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.log.log(Level.INFO, \"Channel not answered: \" + Call.this.currentChannel + \" \" + Call.this.destination);\n\t\t\t\tif (asteriskChannel.getHangupCause().toString().equals(\"CALL_REJECTED\")) {\n\t\t\t\t\tCall.this.noAnswer();\n\t\t\t\t} else {\n\t\t\t\t\tCall.this.noAnswer();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onBusy(AsteriskChannel asteriskChannel) {\n\t\t\t\tCall.this.noAnswer();\n\n\t\t\t\tCall.this.log.log(Level.INFO, \"Busy: \" + asteriskChannel.getName() + \" \" + Call.this.destination);\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onFailure(LiveException cause) {\n\t\t\t\tCall.this.noAnswer();\n\n\t\t\t\tif (cause.getClass().getCanonicalName().equals(\"org.asteriskjava.live.NoSuchChannelException\")) {\n\t\t\t\t\t// Called when the channel is busy... dunno why\n\t\t\t\t\tCall.this.log.log(Level.INFO, \"Channel perhabs busy. \" + Call.this.destination);\n\t\t\t\t} else {\n\t\t\t\t\tCall.this.log.log(Level.WARNING, \"Received unknown error.\\n\" + cause + \" \" + Call.this.destination);\n\t\t\t\t}\n\n\t\t\t}\n\t\t});\n\n\t}", "private void processCallStateRinging (String incomingNumber) {\n\t\t\n\t\ttry {\n\t\t\t\t\t\t\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"RINGING\");\t\t\t\t\t\n\t\t\t\n\t\t\t/* Put the device in silent mode if the incoming number is\n\t\t\t * from contact banned and in schedule interval \n\t\t\t */\t\t\t\t\t\n\t\t\tif (ringerMode() != AudioManager.RINGER_MODE_SILENT && \n\t\t\t\t\tCheckSettingsOperations.checkQuiteSleepServiceState() &&\n\t\t\t\t\t!ConfigAppValues.processRingCall) {\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tConfigAppValues.processRingCall = true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Process to control the incoming call and kill it if proceed.\t\t\t\t\n\t\t\t\tConfigAppValues.getContext().startService(\n\t\t\t\t\t\tnew Intent(\n\t\t\t\t\t\t\t\tConfigAppValues.getContext(),\n\t\t\t\t\t\t\t\tSilentModeCallService.class).putExtra(\n\t\t\t\t\t\t\t\t\tConfigAppValues.INCOMING_CALL_NUMBER, \n\t\t\t\t\t\t\t\t\tincomingNumber));\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t//------------------------------------------------------------//\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (QSToast.DEBUG) QSToast.d(\n\t\t\t\t\t\tConfigAppValues.getContext().getApplicationContext(),\n\t\t\t\t\t\t\"RINGING!!!!!!!!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t}\n\t}", "public int askCouncillorToChange();", "@Test\n public void testListCurrentCallsCdmaHold() throws Exception {\n List<BluetoothCall> calls = new ArrayList<BluetoothCall>();\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall foregroundCall = getMockCall();\n final BluetoothCall heldCall = createHeldCall();\n calls.add(parentCall);\n calls.add(foregroundCall);\n calls.add(heldCall);\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(foregroundCall);\n mBluetoothInCallService.onCallAdded(heldCall);\n\n when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);\n when(foregroundCall.getState()).thenReturn(Call.STATE_ACTIVE);\n when(heldCall.getState()).thenReturn(Call.STATE_ACTIVE);\n when(foregroundCall.isIncoming()).thenReturn(false);\n when(heldCall.isIncoming()).thenReturn(true);\n when(foregroundCall.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0000\")));\n when(heldCall.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0001\")));\n addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n\n String foregroundCallId = foregroundCall.getTelecomCallId();\n when(parentCall.getGenericConferenceActiveChildCallId()).thenReturn(foregroundCallId);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(foregroundCall.getTelecomCallId(),\n heldCall.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n //Add links from child calls to parent\n String parentId = parentCall.getTelecomCallId();\n when(foregroundCall.getParentId()).thenReturn(parentId);\n when(heldCall.getParentId()).thenReturn(parentId);\n\n clearInvocations(mMockBluetoothHeadset);\n mBluetoothInCallService.listCurrentCalls();\n\n verify(mMockBluetoothHeadset).clccResponse(eq(1), eq(0), eq(CALL_STATE_ACTIVE), eq(0),\n eq(false), eq(\"5550000\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(eq(2), eq(1), eq(CALL_STATE_HELD), eq(0),\n eq(false), eq(\"5550001\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0);\n }", "public boolean\n hasCall()\n {\n //##62 return hasCallInSubp;\n if (fCallCount > 0)\n return true;\n else\n return false;\n }", "public void hangUpOngoingCall(Context context) {\n // By the time we receive this intent, we could be shut down and call list\n // could be null. Bail in those cases.\n if (mCallList == null) {\n if (mStatusBarNotifier == null) {\n // The In Call UI has crashed but the notification still stayed up. We should not\n // come to this stage.\n StatusBarNotifier.clearAllCallNotifications(context);\n }\n return;\n }\n\n Call call = mCallList.getOutgoingCall();\n if (call == null) {\n call = mCallList.getActiveOrBackgroundCall();\n }\n\n if (call != null) {\n TelecomAdapter.getInstance().disconnectCall(call.getId());\n call.setState(Call.State.DISCONNECTING);\n mCallList.onUpdate(call);\n }\n }", "public void communicate() {\r\n System.out.println(\"This iPhone is making a phone call.\");\r\n }", "public void onCallClicked(View view) {\n if (mUIState == UIState.DISCONNECTED) {\n // Prior to joining the channel, ensure audio is muted.\n setAudioState(true);\n\n // Join the channel.\n String token = getString(R.string.agora_access_token);\n if (TextUtils.isEmpty(token) || TextUtils.equals(token, \"#YOUR ACCESS TOKEN#\")) {\n token = null; // default, no token\n }\n mRtcEngine.joinChannel(token, mChannelText.getEditableText().toString(), \"Extra Optional Data\", 0);\n setUIState(UIState.CONNECTED_SPLITSCREEN);\n } else {\n // Leave the channel.\n mRemoteCameraUid = 0;\n removeRemoteCamera();\n removeRemoteShare();\n mRtcEngine.leaveChannel();\n mLogView.logI(\"Left channel\");\n setUIState(UIState.DISCONNECTED);\n }\n }", "protected void ProcessInboundEvent(XMSEvent evt){\n \n FunctionLogger logger=new FunctionLogger(\"ProcessInboundEvent\",this,myLogger);\n logger.args(evt);\n try{\n switch(evt.getEventType()){\n case CALL_OFFERED:\n System.out.println(\"***** Inbound CALL_Offered *****\");\n SetGatewayState(GatewayStates.ESTABLISHING);\n SetInboundCallState(InboundCallStates.ACCEPTCALL);\n //Should there ba an accept Call\n\n StartOutboundCall(evt.getCall().getCalledAddress(),evt.getCall().getConnectionAddress());\n \n break;\n case CALL_CONNECTED:\n System.out.println(\"***** Inbound CALL_Connected *****\");\n SetInboundCallState(InboundCallStates.CALLCONNECTED);\n StartOutboundCall(evt.getCall().getCalledAddress(),evt.getCall().getConnectionAddress());\n if(PlayRingbackFlag ){\n myInboundCall.PlayOptions.SetMediaType(XMSMediaType.VIDEO);\n myInboundCall.Play(RingbackFile);\n } \n break;\n \n case CALL_INFO:\n \n System.out.println(\"***** Inbound CALL_INFO *****\");\n System.out.println(\"data=\" + evt.getData());\n myOutboundCall.SendInfo(evt.getData());\n \n break;\n case CALL_DTMF:\n \n System.out.println(\"***** inbound CALL_DTMF *****\");\n System.out.println(\"data=\" + evt.getData());\n \n UnJoinCalls(); \n SendDTMF(evt.getData()); \n \n break; \n case CALL_SENDDTMF_END:\n \n System.out.println(\"***** END_DTMF *****\");\n System.out.println(\"***** ReJoin Calls *****\");\n ConnectCalls();\n \n break;\n \n case CALL_RECORD_END:\n break; \n case CALL_PLAY_END:\n break;\n case CALL_DISCONNECTED: \n System.out.println(\"***** inbound CALL_Disconnected *****\");\n DisconnectCalls();\n break;\n default:\n System.out.println(\"Unknown Event Type!!\");\n }\n }catch(XMSGatewayOutboundCallException e){\n logger.info(\"Error is received\",e);\n }\n }", "@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG, \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(false);\n }\n }", "public void processCall() {\n\t\tif (call == null)\n\t\t\treturn;\n\n\t\tString msg = new StringBuffer(\"Call processed on: \").append(new Date()).append(\" by: \")\n\t\t\t\t.append(CallCenterWorker.this.name).append(\" call length: \")\n\t\t\t\t.append(CallCenterWorker.this.call.getLenght()).toString();\n\t\tSystem.out.println(msg);\n\t\tCallCenterWorker.this.call = null;\n\t}", "private boolean checkPhoneStatusOK() {\n return true;\n }", "protected String getStatus()\n { return call_state; \n }", "public void onIccStatusChanged(Integer index) {\n if (isNeedToGetIccId()) {\n this.mCis[index.intValue()].getICCID(obtainMessage(HwFullNetworkConstantsInner.EVENT_GET_ICCID_DONE, index));\n }\n }", "@MotechListener(subjects = {SCHEDULED_IVR_CALL_EVENT })\n public void handleEndWorkflowEvent(MotechEvent event) {\n LOG.info(\"Handling IVR message call\");\n\n Map<String, Object> params = event.getParameters();\n Map<String, String> ivrParams = new HashMap<>();\n\n if (params.get(IVRCallCommand.CALLBACK_URL) != null) {\n ivrParams.put(IVRCallCommand.CALLBACK_URL, (String) params.get(IVRCallCommand.CALLBACK_URL));\n }\n if (params.get(IVRCallCommand.CALLBACK_STATUS_URL) != null) {\n ivrParams.put(IVRCallCommand.CALLBACK_STATUS_URL, (String) params.get(IVRCallCommand.CALLBACK_STATUS_URL));\n }\n\n ivrParams.put(IVRCallCommand.CALL_FLOW_ID, (String) params.get(IVRCallCommand.CALL_FLOW_ID));\n ivrParams.put(IVRCallCommand.LANGUAGE, (String) params.get(IVRCallCommand.LANGUAGE));\n ivrParams.put(PHONE_NUM, (String) params.get(IVRCallCommand.PHONE_NUM));\n ivrParams.put(IVRCallCommand.CHANNEL, (String) params.get(IVRCallCommand.CHANNEL));\n\n callService.initiateCall((String) params.get(IVRCallCommand.IVR_CONFIG), ivrParams);\n }", "public void prepareCallObject(){\n\n SipAudioCall.Listener listener = new SipAudioCall.Listener(){\n\n\n @Override\n public void onCallEstablished(SipAudioCall call) {\n// call.startAudio();\n// call.setSpeakerMode(true);\n Log.i(\"sip-->\", \"onCallEstablished\");\n\n\n if (mTotalTime == 0L){\n mPointTime = System.currentTimeMillis();\n mHandler.removeCallbacks(mUpdateTimeTask);\n mHandler.postDelayed(mUpdateTimeTask, 100);\n }\n }\n\n\n @Override\n public void onCallEnded(SipAudioCall call) {\n\n mHandler.removeCallbacks(mUpdateTimeTask);\n finish();\n\n// endCall();\n\n }\n\n };\n try {\n call = manager.takeAudioCall(IncomingCallService_new.incomingIntent, listener);\n\n sipNameIncome = call.getPeerProfile().getUserName();\n// updateStatus(\"Odebrano od \" + sipNameIncome);\n caller_name.setText(sipNameIncome);\n } catch (SipException e) {\n e.printStackTrace();\n }\n\n\n }", "static final void registerIccStatus(Handler handler, int event) {\n for (Phone phone : PhoneFactory.getPhones()) {\n IccCard sim = phone.getIccCard();\n if (sim != null) {\n if (VDBG) Log.v(LOG_TAG, \"register for ICC status, phone \" + phone.getPhoneId());\n sim.registerForNetworkLocked(handler, event, phone);\n }\n }\n }", "public void handleCall(Call c) {\n\t}", "private void missedCall() {\n\n NotificationCompat.Builder nBuilder = new NotificationCompat.Builder(this);\n\n nBuilder.setSmallIcon(android.R.drawable.stat_notify_missed_call);\n\n nBuilder.setContentTitle(name);\n\n nBuilder.setContentText(resources.getString(R.string.missed_call));\n\n nBuilder.setColor(Color.rgb(4, 137, 209));\n\n nBuilder.setAutoCancel(true);\n\n Intent showCallLog = new Intent(Intent.ACTION_VIEW);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, showCallLog, PendingIntent.FLAG_CANCEL_CURRENT);\n\n nBuilder.setContentIntent(pendingIntent);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n notificationManager.notify(MISSED_CALL_NOTIFICATION, nBuilder.build());\n\n CallLogUtilities.addCallToLog(contentResolver, number, 0, CallLog.Calls.MISSED_TYPE, System.currentTimeMillis());\n\n }", "public boolean onCallAudioStateChanged(CallAudioState callAudioState) {\n this.mCurrentCallAudioState = callAudioState;\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onCallAudioStateChanged fail, no remote.\", new Object[0]);\n this.mPendingCallAudioState = callAudioState;\n return false;\n } else if (callAudioState != null) {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n this.mRemote.transact(1, CallSerializationUtils.writeCallAudioStateToParcel(obtain, callAudioState), obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"onCallAudioStateChanged.\", new Object[0]);\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"onCallAudioStateChanged got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n } else {\n HiLog.error(LOG_LABEL, \"onCallAudioStateChanged fail, no audioState.\", new Object[0]);\n return false;\n }\n }", "public boolean isIncomingInvitePending();", "private void missedCall() {\n\n NotificationCompat.Builder nBuilder = new NotificationCompat.Builder(mContext);\n\n nBuilder.setSmallIcon(android.R.drawable.stat_notify_missed_call);\n\n nBuilder.setContentTitle(name);\n\n nBuilder.setContentText(resources.getString(R.string.missed_call));\n\n nBuilder.setColor(Color.rgb(4, 137, 209));\n\n nBuilder.setAutoCancel(true);\n\n Intent showCallLog = new Intent(Intent.ACTION_VIEW);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, showCallLog, PendingIntent.FLAG_CANCEL_CURRENT);\n\n nBuilder.setContentIntent(pendingIntent);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n notificationManager.notify(MISSED_CALL_NOTIFICATION, nBuilder.build());\n\n CallLogUtilities.addCallToLog(contentResolver, number, 0, CallLog.Calls.MISSED_TYPE, System.currentTimeMillis());\n\n }", "public void processCallAudioStateWhenServiceConnected() {\n CallAudioState callAudioState = this.mCurrentCallAudioState;\n if (callAudioState != null) {\n HiLog.info(LOG_LABEL, \"processCallAudioStateWhenServiceConnected:onCallAudioStateChanged %{public}s\", new Object[]{callAudioState.toString()});\n onCallAudioStateChanged(this.mCurrentCallAudioState);\n }\n }", "public void processCanAddCallWhenServiceConnected() {\n Boolean bool = this.mCurrentCanAddCall;\n if (bool != null) {\n HiLog.info(LOG_LABEL, \"processCanAddCallWhenServiceConnected:onCanAddCallChanged %{public}s\", new Object[]{bool.toString()});\n onCanAddCallChanged(this.mCurrentCanAddCall.booleanValue());\n }\n }", "public String getCallState() {\n return \"\";\n }", "public interface PhoneStateChangeCallback {\n void onInComingOffHook(String incomingNumber);\n void onInComingEnd(String incomingNumber);\n void onOutComingStart(String outNumber);\n void onOutComingEnd(String outNumber);\n}", "@Test\n public void testOnCallAddedRinging() throws Exception {\n BluetoothCall ringingCall = createRingingCall();\n when(ringingCall.getHandle()).thenReturn(Uri.parse(\"tel:555000\"));\n\n mBluetoothInCallService.onCallAdded(ringingCall);\n\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(0), eq(0), eq(CALL_STATE_INCOMING),\n eq(\"555000\"), eq(PhoneNumberUtils.TOA_Unknown), nullable(String.class));\n }", "public boolean onCanAddCallChanged(boolean z) {\n this.mCurrentCanAddCall = new Boolean(z);\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onCanAddCallChanged fail, no remote.\", new Object[0]);\n this.mPendingCanAddCall = new Boolean(z);\n return false;\n }\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z2 = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n obtain.writeBoolean(z);\n this.mRemote.transact(4, obtain, obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"onCanAddCallChanged: %{public}b.\", new Object[]{Boolean.valueOf(z)});\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z2 = false;\n try {\n HiLog.error(LOG_LABEL, \"onCanAddCallChanged got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z2;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z2;\n }", "public boolean hasLiveCalls() {\n if (this.mCallMapById.isEmpty()) {\n return false;\n }\n for (Integer num : this.mCallMapById.keySet()) {\n Call callById = getCallById(num);\n if (!(callById == null || callById.getState() == 10 || callById.getState() == 7)) {\n HiLog.info(LOG_LABEL, \"hasLiveCalls.\", new Object[0]);\n return true;\n }\n }\n return false;\n }", "@Test\n public void testOnParentOnChildrenChanged() throws Exception {\n BluetoothCall parentCall = createActiveCall();\n BluetoothCall activeCall = getMockCall();\n BluetoothCall heldCall = createHeldCall();\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(activeCall);\n mBluetoothInCallService.onCallAdded(heldCall);\n String parentId = parentCall.getTelecomCallId();\n when(activeCall.getParentId()).thenReturn(parentId);\n when(heldCall.getParentId()).thenReturn(parentId);\n\n ArrayList<String> calls = new ArrayList<>();\n calls.add(activeCall.getTelecomCallId());\n\n when(parentCall.getChildrenIds()).thenReturn(calls);\n when(parentCall.isConference()).thenReturn(true);\n\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(false);\n\n clearInvocations(mMockBluetoothHeadset);\n // Be sure that onIsConferencedChanged rejects spurious changes during set up of\n // CDMA \"conference\"\n mBluetoothInCallService.getCallback(activeCall).onParentChanged(activeCall);\n verify(mMockBluetoothHeadset, never()).phoneStateChanged(anyInt(), anyInt(), anyInt(),\n anyString(), anyInt(), nullable(String.class));\n\n mBluetoothInCallService.getCallback(heldCall).onParentChanged(heldCall);\n verify(mMockBluetoothHeadset, never()).phoneStateChanged(anyInt(), anyInt(), anyInt(),\n anyString(), anyInt(), nullable(String.class));\n\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(\n parentCall,\n mBluetoothInCallService.getBluetoothCallsByIds(calls));\n verify(mMockBluetoothHeadset, never()).phoneStateChanged(anyInt(), anyInt(), anyInt(),\n anyString(), anyInt(), nullable(String.class));\n\n calls.add(heldCall.getTelecomCallId());\n mBluetoothInCallService.onCallAdded(heldCall);\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(\n parentCall,\n mBluetoothInCallService.getBluetoothCallsByIds(calls));\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n }", "public interface OnCallingListener {\n void onCallEnd();\n}", "public void updateNotification(InCallState state, CallList callList) {\n updateInCallNotification(state, callList);\n }", "public interface InCallStateListener {\n // TODO: Enhance state to contain the call objects instead of passing CallList\n public void onStateChange(InCallState oldState, InCallState newState, CallList callList);\n }", "@Test\n public void getCalleeNeedsToBeImplemented(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"345-876-3456\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCallee(), not(nullValue()));\n }", "public boolean isEchoCancellerCalibrationRequired();", "public void answerIncomingCall(Context context, int videoState) {\n // By the time we receive this intent, we could be shut down and call list\n // could be null. Bail in those cases.\n if (mCallList == null) {\n StatusBarNotifier.clearAllCallNotifications(context);\n return;\n }\n\n Call call = mCallList.getIncomingCall();\n if (call != null) {\n TelecomAdapter.getInstance().answerCall(call.getId(), videoState);\n showInCall(false, false/* newOutgoingCall */);\n }\n }", "public void takeEmergencyCallAction() {\n if (PhoneUtils.isInCall(this.mContext)) {\n PhoneUtils.resumeCall(this.mContext);\n return;\n }\n KeyguardUpdateMonitor.getInstance(this.mContext).reportEmergencyCallAction(true);\n this.mContext.startActivityAsUser(INTENT_EMERGENCY_DIAL, ActivityOptions.makeCustomAnimation(this.mContext, 0, 0).toBundle(), new UserHandle(KeyguardUpdateMonitor.getCurrentUser()));\n }", "@Override\n public boolean onCall() {\n return true;\n }", "final void checkForComodification() {\n\t}", "public void onCallClicked(View view) {\n if (mCallEnd) {\n startCall();\n mCallEnd = false;\n mCallBtn.setImageResource(R.drawable.btn_endcall);\n } else {\n endCall();\n mCallEnd = true;\n mCallBtn.setImageResource(R.drawable.btn_startcall);\n }\n showButtons(!mCallEnd);\n }", "private void buildAndSendNotification(Call originalCall, ContactCacheEntry contactInfo) {\n // This can get called to update an existing notification after contact information has come\n // back. However, it can happen much later. Before we continue, we need to make sure that\n // the call being passed in is still the one we want to show in the notification.\n final Call call = getCallToShow(CallList.getInstance());\n if (call == null || !call.getId().equals(originalCall.getId())) {\n return;\n }\n\n final int callState = call.getState();\n\n // Check if data has changed; if nothing is different, don't issue another notification.\n final int iconResId = getIconToDisplay(call);\n Bitmap largeIcon = getLargeIconToDisplay(contactInfo, call);\n final String content =\n getContentString(call, contactInfo.userType);\n final String contentTitle = getContentTitle(contactInfo, call);\n\n final int notificationType;\n if (callState == Call.State.INCOMING || callState == Call.State.CALL_WAITING) {\n notificationType = NOTIFICATION_INCOMING_CALL;\n } else {\n notificationType = NOTIFICATION_IN_CALL;\n }\n final int color = InCallPresenter.getInstance().getPrimaryColorFromCall(call);\n\n if (!checkForChangeAndSaveData(iconResId, content, largeIcon, contentTitle, callState,\n notificationType, contactInfo.contactRingtoneUri,\n /// M: need update notification for video state changed during SRVCC @{\n call.getVideoState(), color)) {\n /// @}\n return;\n }\n\n if (largeIcon != null) {\n largeIcon = getRoundedIcon(largeIcon);\n }\n\n /*\n * This builder is used for the notification shown when the device is locked and the user\n * has set their notification settings to 'hide sensitive content'\n * {@see Notification.Builder#setPublicVersion}.\n */\n Notification.Builder publicBuilder = new Notification.Builder(mContext);\n publicBuilder.setSmallIcon(iconResId)\n .setColor(mContext.getResources().getColor(R.color.dialer_theme_color))\n // Hide work call state for the lock screen notification\n .setContentTitle(getContentString(call, ContactsUtils.USER_TYPE_CURRENT));\n setNotificationWhen(call, callState, publicBuilder);\n\n /*\n * Builder for the notification shown when the device is unlocked or the user has set their\n * notification settings to 'show all notification content'.\n */\n final Notification.Builder builder = getNotificationBuilder();\n builder.setPublicVersion(publicBuilder.build());\n\n // Set up the main intent to send the user to the in-call screen\n final PendingIntent inCallPendingIntent = createLaunchPendingIntent();\n builder.setContentIntent(inCallPendingIntent);\n\n // Set the intent as a full screen intent as well if a call is incoming\n if (notificationType == NOTIFICATION_INCOMING_CALL\n && !InCallPresenter.getInstance().isShowingInCallUi()) {\n configureFullScreenIntent(builder, inCallPendingIntent, call);\n // Set the notification category for incoming calls\n builder.setCategory(Notification.CATEGORY_CALL);\n }\n\n builder.setSmallIcon(iconResId);\n builder.setLargeIcon(largeIcon);\n /// M: CTA request, set sim color from call. @{\n // Google code:\n // builder.setColor(mContext.getResources().getColor(R.color.dialer_theme_color));\n builder.setColor(InCallPresenter.getInstance().getPrimaryColorFromCall(call));\n /// @}\n /// M: Add for [1A1H2W] @{\n// builder.setContentTitle(mContext.getString(R.string.two_incoming_calls));\n// if(!InCallUtils.isTwoIncomingCalls()) {\n// /// @}\n//\n// // Set the content\n// builder.setContentText(content);\n// builder.setContentTitle(contentTitle);\n//\n// final boolean isVideoUpgradeRequest = call.getSessionModificationState()\n// == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST;\n// if (isVideoUpgradeRequest) {\n// appendCountdown(builder, content);\n// builder.setUsesChronometer(false);\n// addDismissUpgradeRequestAction(builder);\n// addAcceptUpgradeRequestAction(builder);\n// } else {\n// createIncomingCallNotification(call, callState, builder);\n// }\n//\n// addPersonReference(builder, contactInfo, call);\n// ///M: OP18Plugin <Status bar modification of vowifi quality >@{\n// ExtensionManager.getStatusBarExt().customizeNotification(\n// CallList.getInstance(), builder, largeIcon);\n// /// @}\n// }\n\n /*\n * Fire off the notification\n */\n Notification notification = builder.build();\n\n if (mDialerRingtoneManager.shouldPlayRingtone(callState, contactInfo.contactRingtoneUri)) {\n notification.flags |= Notification.FLAG_INSISTENT;\n notification.sound = contactInfo.contactRingtoneUri;\n AudioAttributes.Builder audioAttributes = new AudioAttributes.Builder();\n audioAttributes.setContentType(AudioAttributes.CONTENT_TYPE_MUSIC);\n audioAttributes.setUsage(AudioAttributes.USAGE_NOTIFICATION_RINGTONE);\n notification.audioAttributes = audioAttributes.build();\n if (mDialerRingtoneManager.shouldVibrate(mContext.getContentResolver())) {\n notification.vibrate = VIBRATE_PATTERN;\n }\n }\n if (mDialerRingtoneManager.shouldPlayCallWaitingTone(callState)) {\n Log.v(this, \"Playing call waiting tone\");\n mDialerRingtoneManager.playCallWaitingTone();\n }\n if (mCurrentNotification != notificationType && mCurrentNotification != NOTIFICATION_NONE) {\n Log.i(this, \"Previous notification already showing - cancelling \"\n + mCurrentNotification);\n mNotificationManager.cancel(mCurrentNotification);\n }\n Log.i(this, \"Displaying notification for \" + notificationType);\n mNotificationManager.notify(notificationType, notification);\n mCurrentNotification = notificationType;\n }", "public boolean onDetailsChanged(Call call, Call.Details details) {\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onDetailsChanged fail, no remote.\", new Object[0]);\n return false;\n } else if (call != null) {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n this.mRemote.transact(7, CallSerializationUtils.writeCallToParcel(obtain, call, getIdByCall(call).intValue()), obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"onDetailsChanged: %{public}s.\", new Object[]{call.toString()});\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"onDetailsChanged got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n } else {\n HiLog.error(LOG_LABEL, \"onDetailsChanged fail, no call.\", new Object[0]);\n return false;\n }\n }", "static final void registerIccStatus(Handler handler, int event, int phoneId) {\n Phone[] phones = PhoneFactory.getPhones();\n IccCard sim = phones[phoneId].getIccCard();\n if (sim != null) {\n if (VDBG) {\n Log.v(LOG_TAG, \"register for ICC status, phone \" + phones[phoneId].getPhoneId());\n }\n sim.registerForNetworkLocked(handler, event, phones[phoneId]);\n }\n }", "boolean isAssignedForChannel(String ccid);", "public boolean processPreAddedCall(PreAddedCall preAddedCall, Call call) {\n if (preAddedCall == null) {\n HiLog.error(LOG_LABEL, \"processPreAddedCall fail, no pre added call.\", new Object[0]);\n return false;\n } else if (call == null) {\n HiLog.error(LOG_LABEL, \"processPreAddedCall fail, no call.\", new Object[0]);\n return false;\n } else {\n String number = AospInCallService.getNumber(call);\n String number2 = preAddedCall.getNumber();\n if (call.getState() != 9 || number == null || !number.equals(number2)) {\n HiLog.info(LOG_LABEL, \"processPreAddedCall, disconnect pre added call.\", new Object[0]);\n disconnectPreAddedCall(preAddedCall);\n sCallId++;\n addCallToCallMap(call);\n } else {\n HiLog.info(LOG_LABEL, \"processPreAddedCall, update pre added call.\", new Object[0]);\n addCallToCallMap(call);\n onStateChanged(call, call.getState());\n onDetailsChanged(call, call.getDetails());\n }\n return true;\n }\n }", "@Override\n public boolean init() {\n MyLogger.logD(CLASS_TAG, \"[init]\");\n try {\n mCalllogDatas = getCallLogEntry();\n mOtherPhone = isOtherPhone();\n MyLogger.logD(CLASS_TAG, \"[init]====otherPhone?===\" + mOtherPhone);\n } catch (Exception e) {\n // TODO Auto-generated catch block\n MyLogger.logE(CLASS_TAG, \"[init]====>> FAILED!\");\n return false;\n }\n return true;\n }", "private Call getCallToShow(CallList callList) {\n if (callList == null) {\n return null;\n }\n Call call = callList.getIncomingCall();\n if (call == null) {\n call = callList.getOutgoingCall();\n }\n if (call == null) {\n call = callList.getVideoUpgradeRequestCall();\n }\n if (call == null) {\n call = callList.getActiveOrBackgroundCall();\n }\n return call;\n }", "public void notifyNoAcctReport (COPSPdpOSReqStateMan man);", "private boolean checkForChangeAndSaveData(int icon, String content, Bitmap largeIcon,\n String contentTitle, int state, int notificationType, Uri ringtone,\n /** M: need check video state too @{ */\n int videoState, int color) {\n /** @} */\n ///M: OP18Plugin <Status bar modification of vowifi quality >@{\n// if(ExtensionManager.getStatusBarExt().needUpdateNotification()) {\n// return true;\n// }\n /// @}\n // The two are different:\n // if new title is not null, it should be different from saved version OR\n // if new title is null, the saved version should not be null\n final boolean contentTitleChanged =\n (contentTitle != null && !contentTitle.equals(mSavedContentTitle)) ||\n (contentTitle == null && mSavedContentTitle != null);\n ///M:[VideoCall]when call is waiting for upgrade to video call , we should\n //update the timer for 20 seconds. //@{\n final boolean countDownChanged = mSavedCountDown !=\n InCallPresenter.getInstance().getAutoDeclineCountdown();\n\n // any change means we are definitely updating\n boolean retval = (mSavedIcon != icon) || !Objects.equals(mSavedContent, content)\n || (mCallState != state) || (mSavedLargeIcon != largeIcon)\n || contentTitleChanged || !Objects.equals(mRingtone, ringtone)\n || countDownChanged\n /// need update notification for video state changed during SRVCC.\n || (mVideoState != videoState)\n /// M: [1A1H2W] add check 2W state and Call color\n /*|| (mIsTwoIncoming != InCallUtils.isTwoIncomingCalls()) || (mSavedColor != color)*/;\n mIsTwoIncoming = false;//InCallUtils.isTwoIncomingCalls();\n mSavedColor = color;\n mVideoState = videoState;\n ///@}\n\n /**\n * M: Need update notification after InCall activity shown or hidden.\n * For new incoming call, when user back to InCallActivity while the notification\n * not update and the notification still in FullScreen mode. @{\n */\n final boolean isInCallShown = InCallPresenter.getInstance().isShowingInCallUi();\n if (mIsCallUiShown != isInCallShown){\n mIsCallUiShown = isInCallShown;\n retval = true;\n }\n /** @} */\n\n // If we aren't showing a notification right now or the notification type is changing,\n // definitely do an update.\n if (mCurrentNotification != notificationType) {\n if (mCurrentNotification == NOTIFICATION_NONE) {\n Log.d(this, \"Showing notification for first time.\");\n }\n retval = true;\n }\n\n mSavedIcon = icon;\n mSavedContent = content;\n mCallState = state;\n mSavedLargeIcon = largeIcon;\n mSavedContentTitle = contentTitle;\n mRingtone = ringtone;\n\n ///[video call] store the countdown time\n mSavedCountDown = InCallPresenter.getInstance().getAutoDeclineCountdown();\n if (retval) {\n Log.d(this, \"Data changed. Showing notification\");\n }\n\n return retval;\n }", "public void incomingCallReceived(CallEvent event)\n {\n CallShortcut.addCall(event.getSourceCall(), this.incomingCalls);\n }", "public void onUaCallAccepted(UserAgent ua)\n { changeStatus(UA_ONCALL);\n if (ua_profile.hangup_time>0) automaticHangup(ua_profile.hangup_time); \n }", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "private boolean m56374a(C18301is c18301is) {\n AppMethodBeat.m2504i(21761);\n if (c18301is instanceof C18301is) {\n byte[] bArr = c18301is.cDS.cDT;\n if (bArr == null || bArr.length <= 0) {\n AppMethodBeat.m2505o(21761);\n return false;\n } else if (bArr[0] == (byte) 101) {\n byte[] bArr2 = new byte[(bArr.length - 1)];\n System.arraycopy(bArr, 1, bArr2, 0, bArr2.length);\n try {\n bmc bmc = (bmc) new bmc().parseFrom(bArr2);\n C4990ab.m7411d(\"MicroMsg.IPCallSvrNotifyListener\", \"roomId: %d, roomKey: %d, DtmfPayloadType: %d\", Integer.valueOf(bmc.wem), Long.valueOf(bmc.wen), Integer.valueOf(bmc.nwP));\n LinkedList linkedList = bmc.wPh;\n if (linkedList != null) {\n Iterator it = linkedList.iterator();\n while (it.hasNext()) {\n bml bml = (bml) it.next();\n C4990ab.m7411d(\"MicroMsg.IPCallSvrNotifyListener\", \"userstatus: %d, userstatusKey: %d, memberId: %d\", Integer.valueOf(bml.wPr), Integer.valueOf(bml.wPs), Integer.valueOf(bml.wPq));\n }\n }\n if (this.nvS != null) {\n this.nvS.mo46242a(bmc);\n }\n } catch (Exception e) {\n C4990ab.m7413e(\"MicroMsg.IPCallSvrNotifyListener\", \"parse PstnNotify error: %s\", e.getMessage());\n }\n }\n }\n AppMethodBeat.m2505o(21761);\n return false;\n }", "private void listenVoiceCall() {\n final String username = MyAccount.getInstance().getName();\n final String topic = String.format(\"voice/%s\", username);\n new Subscriber(topic, username)\n .setNewMessageListener(new SubscribedTopicListener() {\n @Override\n public void onReceive(DataTransfer message) {\n String action = message.data.toString();\n switch (action) {\n case Constants.VOICE_REQUEST:\n onReceiveVoiceRequest(message);\n break;\n\n case Constants.VOICE_ACCEPT:\n hideCallingPane();\n onReceiveVoiceAccept(message);\n break;\n\n case Constants.VOICE_REJECT:\n hideCallingPane();\n onReceiveVoiceReject(message);\n break;\n\n case Constants.VOICE_QUIT:\n onReceiveVoiceQuit(message);\n\n }\n }\n })\n .listen();\n }", "@Override\n public void onInernetConnectionStateChanged(Intent intent) {\n if (NETWORK_CUSTOM_AVAILABILITY_INTENT.equals(intent.getAction())) {\n\n if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_AVAILABLE) {\n\n if (firstResponsePassed) {\n onInternetConnectionResume();\n } else {\n\n Log.d(TAG, \"Internet available first intent recieved\");\n\n firstResponsePassed = true;\n internetAvailable = true;\n }\n\n\n } else if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_NOT_AVAILABLE) {\n\n onInternetConnectionLost();\n Log.d(TAG, \"Change Detected. Not Avaiable -1\");\n\n }\n\n //Received on requesting only\n }\n\n// else if (NETWORK_CUSTOM_AVAILABILITY_ASYNC_RESPONSE_INTENT.equals(intent.getAction())) {\n//\n// if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_AVAILABLE) {\n//\n// //Internet availabale\n//\n// if (firstResponsePassed) {\n//\n// Log.d(TAG, \"Response Detected. Available 1 but as first <negleced> \");\n// onInternetConnectionResume();\n//\n// } else {\n//\n// Log.d(TAG, \"Response Detected. Available 1\");\n//\n// firstResponsePassed = true;\n// internetAvaiable = true;\n// }\n//\n// } else if (intent.getIntExtra(\"STATUS\", NETWORK_NOT_AVAILABLE) == NETWORK_NOT_AVAILABLE) {\n//\n// //Interner not avaiable\n// Log.d(TAG, \"Response Detected. unAvailable -1\");\n// onInternetConnectionLost();\n//\n// }\n// }\n }", "@Override\n public void notifyHasPhone(boolean hasPhone) {\n }", "public void subscribeToCovRequest() {\n try {\n DeviceService.localDevice.send(bacnetDevice, new SubscribeCOVRequest(new UnsignedInteger(1), getObjectIdentifier(), Boolean.TRUE, new UnsignedInteger(0))).get();\n LOG.info(\"Subscription @: '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n } catch (BACnetException e) {\n LOG.warn(\"Can't subscribe : '\" + getObjectIdentifier() + \"' on: \" + bacnetDevice.getObjectIdentifier());\n }\n\n }", "public void updateMissedCalls() {\n // Mark all \"new\" missed calls as not new anymore\n StringBuilder where = new StringBuilder();\n where.append(\"type = \");\n where.append(Calls.MISSED_TYPE);\n where.append(\" AND \");\n where.append(Calls.NEW);\n where.append(\" = 1\");\n \n ContentValues values = new ContentValues(1);\n values.put(Calls.NEW, \"0\");\n \n startUpdate(UPDATE_MISSED_CALLS_TOKEN, null, Calls.CONTENT_URI_WITH_VOICEMAIL,\n values, where.toString(), null);\n }", "private void checkUSBConnectionOnStartUp(){\n //Notification and icon\n NotificationCompat.Builder builder = new NotificationCompat.Builder(this, \"765\");\n Intent chargingStatus = registerReceiver(powerConnectionReceiver, filter);\n int plugged = chargingStatus.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);\n isPowerConnected = plugged == BatteryManager.BATTERY_PLUGGED_AC || plugged == BatteryManager.BATTERY_PLUGGED_USB;\n if(SensorService.isPowerConnected){\n builder.setContentTitle(\"Earthquake Detection Enabled\")\n .setSmallIcon(R.drawable.ic_earthquake)\n .setAutoCancel(true);\n // Main Activity icon change: StateBroadcast\n sendBroadcast(new Intent().setAction(EARTHQUAKE_STATE));\n }\n else{\n builder.setContentTitle(\"Fall Detection Enabled\")\n .setSmallIcon(R.drawable.ic_falling_man)\n .setAutoCancel(true);\n // Main Activity icon change: StateBroadcast\n sendBroadcast(new Intent().setAction(STANDING_STATE));\n }\n notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);\n notificationManager.notify(1, builder.build());\n }", "@Test\n public void testUnknownCall() throws IOException {\n InputStream fileStream;\n fileStream = mTestResources.openRawResource(\n com.android.bluetooth.tests.R.raw.unknown_number_call);\n BluetoothPbapVcardList pbapVCardList = new BluetoothPbapVcardList(mAccount, fileStream,\n PbapClientConnectionHandler.VCARD_TYPE_30);\n Assert.assertEquals(2, pbapVCardList.getCount());\n CallLogPullRequest processor =\n new CallLogPullRequest(mTargetContext, PbapClientConnectionHandler.MCH_PATH,\n new HashMap<>(), mAccount);\n processor.setResults(pbapVCardList.getList());\n\n // Verify that these entries aren't in the call log to start.\n Assert.assertFalse(verifyCallLog(\"\", \"1483232520000\", \"3\"));\n Assert.assertFalse(verifyCallLog(\"\", \"1483232580000\", \"3\"));\n\n // Finish processing the data and verify entries were added to the call log.\n processor.onPullComplete();\n Assert.assertTrue(verifyCallLog(\"\", \"1483232520000\", \"3\"));\n Assert.assertTrue(verifyCallLog(\"\", \"1483232580000\", \"3\"));\n }", "public void setStuckCall(){\n this.stuckCall = true;\n }" ]
[ "0.6399367", "0.6141955", "0.5943318", "0.5889924", "0.5792784", "0.57781595", "0.575136", "0.57324195", "0.5640316", "0.55496764", "0.5544958", "0.55300117", "0.5529367", "0.55232465", "0.5512204", "0.550693", "0.55043405", "0.5475861", "0.5474011", "0.54715717", "0.5450334", "0.5445136", "0.5426397", "0.5423896", "0.5418375", "0.5389945", "0.5368346", "0.5367028", "0.53652346", "0.5365145", "0.53611106", "0.5312859", "0.5295913", "0.5291234", "0.52733016", "0.52667004", "0.5264649", "0.5259702", "0.5254833", "0.5249741", "0.5244997", "0.5222711", "0.5222", "0.52193946", "0.5216755", "0.52121955", "0.52115256", "0.5209285", "0.5201736", "0.51857686", "0.5178558", "0.51755816", "0.5173912", "0.5172238", "0.5172218", "0.51689893", "0.5167334", "0.51501435", "0.5136428", "0.5136373", "0.51332253", "0.5127699", "0.51215035", "0.50961226", "0.50909173", "0.50871694", "0.50802314", "0.5075176", "0.5061793", "0.5039539", "0.5035675", "0.5034541", "0.5029169", "0.5027293", "0.5018408", "0.50180733", "0.5010052", "0.5008389", "0.5002885", "0.50023836", "0.49939772", "0.49929243", "0.4988408", "0.49881843", "0.49872643", "0.49807897", "0.49777374", "0.4974678", "0.49728814", "0.49711147", "0.49629423", "0.49507692", "0.49465442", "0.49420407", "0.49331623", "0.49298936", "0.49231514", "0.49225485", "0.49218783" ]
0.52253306
42
CIEV (Call indicators) notifying call held states. Values include: 0 No calls held 1 Call is placed on hold or active/held calls wapped (The AG has both an ACTIVE and HELD call) 2 Call on hold, no active call
private void onCallHeld(int callheld, byte[] address) { StackEvent event = new StackEvent(StackEvent.EVENT_TYPE_CALLHELD); event.valueInt = callheld; event.device = getDevice(address); if (DBG) { Log.d(TAG, "onCallHeld: address " + address + " event " + event); } HeadsetClientService service = HeadsetClientService.getHeadsetClientService(); if (service != null) { service.messageFromNative(event); } else { Log.w(TAG, "onCallHeld: Ignoring message because service not available: " + event); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void processCallStateIdle () {\n\t\t\n\t\ttry {\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"IDLE\");\n\t\t\t\n\t\t\tConfigAppValues.processRingCall = false;\n\t\t\t\n\t\t\tif (ringerMode() == AudioManager.RINGER_MODE_SILENT && \n\t\t\t\t\tCheckSettingsOperations.checkQuiteSleepServiceState() && \n\t\t\t\t\t!ConfigAppValues.processIdleCall) {\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\n\t\t\t\t/* Put one pause of 1 second for wait before put the\n\t\t\t\t * ringer mode to normal again\n\t\t\t\t */\t\t\t\t\t\t\n\t\t\t\t//Thread.sleep(1000);\t\t\t\t\t\t\n\t\t\t\tConfigAppValues.processIdleCall = true;\n\n\t\t\t\t//-- If you choose use Android Service for process incoming call use this --//\t\t\t\t\n\t\t\t\tConfigAppValues.getContext().startService(\n\t\t\t\t\t\tnew Intent(\n\t\t\t\t\t\t\t\tConfigAppValues.getContext(),\n\t\t\t\t\t\t\t\tNormalModeCallService.class)); \t\t\t\t\n\t\t\t\t//------------------------------------------------------------//\t\t\t\t\t\t\t\n\n\t\t\t\t\n\t\t\t\tif (QSToast.DEBUG) QSToast.d(\n\t\t\t\t\t\tConfigAppValues.getContext().getApplicationContext(),\n\t\t\t\t\t\t\"IDLE!!!!!!!!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT);\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(\n\t\t\t\t\tCLASS_NAME, \n\t\t\t\t\tExceptionUtils.exceptionTraceToString(e.toString(), e.getStackTrace()));\n\t\t\t\n\t\t}\n\t}", "public STATE_KEY eventNotifyCall() {\n\t\treturn STATE_KEY.NOT_CHANGE;\n\t}", "@Test\n public void testOnCallAddedCdmaActiveHold() throws Exception {\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall foregroundCall = getMockCall();\n final BluetoothCall heldCall = createHeldCall();\n addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(foregroundCall.getTelecomCallId(),\n heldCall.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n\n mBluetoothInCallService.onCallAdded(parentCall);\n\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n }", "public void onCallStateChanged(int state, String incomingNumber) {\n if (state == 2) {\n\n String msg = \" New Phone Call Event. Incoming Number : \"+incomingNumber;\n int mID = 1;\n long when = System.currentTimeMillis();\n NotificationManager notificationManager = (NotificationManager) context\n .getSystemService(Context.NOTIFICATION_SERVICE);\n\n Intent notificationIntent = new Intent(context, afterCall.class);\n notificationIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0,\n notificationIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n\n Uri alarmSound = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);\n writeToFile(2, Calendar.getInstance().getTime().toString(), context);\n NotificationCompat.Builder mNotifyBuilder = new NotificationCompat.Builder(\n context).setSmallIcon(R.drawable.ic_launcher)\n .setContentTitle(\"Phone Call Made\")\n .setContentText(\"Touch to Take Survey\")\n .setSound(alarmSound)\n .setAutoCancel(true).setWhen(when)\n .setContentIntent(pendingIntent)\n .setVibrate(new long[]{1000, 1000, 1000, 1000, 1000});\n notificationManager.notify(mID,mNotifyBuilder.build());\n mID++;\n\n }\n }", "public void onCallStateChanged(Context context, int state, String number) {\n if (lastState == state) {\n //No change, debounce extras\n return;\n }\n switch (state) {\n case TelephonyManager.CALL_STATE_RINGING:\n start_time = System.currentTimeMillis();\n String sub = number.replaceAll(\" \", \"\");\n String sub1 = sub.replaceAll(\"\\\\(\", \"\").replaceAll(\"\\\\)\", \"\").replaceAll(\"\\\\-\", \"\");\n mynumber = sub1.substring(Math.max(sub1.length() - 10, 0));\n//contactExists(context, mynumber) ||\n if (contactExistsinApp(context, mynumber)) {\n\n rejectCall(context);\n\n if (PreferenceManager.GetSw3()) {\n\n sendSMS(number, PreferenceManager.Getsms());\n }\n } else if (!contactExists(context, mynumber)) {\n rejectCall(context);\n if (PreferenceManager.GetSw3()) {\n\n sendSMS(number, PreferenceManager.Getsms());\n }\n } else {\n Toast.makeText(context, \"Incoming Detect\" + mynumber + start_time, Toast.LENGTH_SHORT).show();\n }\n\n// Toast.makeText(context, \"Incoming Detect\" + mynumber + start_time, Toast.LENGTH_SHORT).show();\n //There is incoming call\n break;\n case TelephonyManager.CALL_STATE_OFFHOOK:\n if (lastState == TelephonyManager.CALL_STATE_RINGING) {\n Toast.makeText(context, \"Incoming Detect\" + mynumber, Toast.LENGTH_SHORT).show();\n\n }\n if (lastState != TelephonyManager.CALL_STATE_RINGING) {\n }\n\n break;\n case TelephonyManager.CALL_STATE_IDLE:\n //Went to idle- this is the end of a call. What type depends on previous state(s)\n if (lastState == TelephonyManager.CALL_STATE_RINGING) {\n //Ring but no pickup- a miss\n\n }\n }\n lastState = state;\n }", "public boolean handleCallKey() {\n Log.v(this, \"handleCallKey\");\n\n // The green CALL button means either \"Answer\", \"Unhold\", or\n // \"Swap calls\", or can be a no-op, depending on the current state\n // of the Phone.\n\n /**\n * INCOMING CALL\n */\n final CallList calls = mCallList;\n final Call incomingCall = calls.getIncomingCall();\n Log.v(this, \"incomingCall: \" + incomingCall);\n\n // (1) Attempt to answer a call\n if (incomingCall != null) {\n TelecomAdapter.getInstance().answerCall(\n incomingCall.getId(), VideoProfile.STATE_AUDIO_ONLY);\n return true;\n }\n\n /**\n * STATE_ACTIVE CALL\n */\n final Call activeCall = calls.getActiveCall();\n if (activeCall != null) {\n // TODO: This logic is repeated from CallButtonPresenter.java. We should\n // consolidate this logic.\n final boolean canMerge = activeCall.can(\n android.telecom.Call.Details.CAPABILITY_MERGE_CONFERENCE);\n final boolean canSwap = activeCall.can(\n android.telecom.Call.Details.CAPABILITY_SWAP_CONFERENCE);\n\n Log.v(this, \"activeCall: \" + activeCall + \", canMerge: \" + canMerge +\n \", canSwap: \" + canSwap);\n\n // (2) Attempt actions on conference calls\n if (canMerge) {\n TelecomAdapter.getInstance().merge(activeCall.getId());\n return true;\n } else if (canSwap) {\n TelecomAdapter.getInstance().swap(activeCall.getId());\n return true;\n }\n }\n\n /**\n * BACKGROUND CALL\n */\n final Call heldCall = calls.getBackgroundCall();\n if (heldCall != null) {\n // We have a hold call so presumeable it will always support HOLD...but\n // there is no harm in double checking.\n final boolean canHold = heldCall.can(android.telecom.Call.Details.CAPABILITY_HOLD);\n\n Log.v(this, \"heldCall: \" + heldCall + \", canHold: \" + canHold);\n\n // (4) unhold call\n if (heldCall.getState() == Call.State.ONHOLD && canHold) {\n TelecomAdapter.getInstance().unholdCall(heldCall.getId());\n return true;\n }\n }\n\n // Always consume hard keys\n return true;\n }", "public boolean onStateChanged(Call call, int i) {\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onStateChanged fail, no remote.\", new Object[0]);\n return false;\n } else if (call != null) {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n obtain = CallSerializationUtils.writeCallToParcel(obtain, call, getIdByCall(call).intValue());\n obtain.writeInt(i);\n this.mRemote.transact(6, obtain, obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"onStateChanged: %{public}s.\", new Object[]{call.toString()});\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"onStateChanged got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n } else {\n HiLog.error(LOG_LABEL, \"onStateChanged fail, no call.\", new Object[0]);\n return false;\n }\n }", "private void processCallStateOffhook () {\n\t\t\n\t\ttry {\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"OFFHOOK\");\t\n\t\t\t\n\t\t\tConfigAppValues.processRingCall = false;\n\t\t\t\n\t\t\tif (QSToast.DEBUG) QSToast.d(\n \t\tConfigAppValues.getContext().getApplicationContext(),\n \t\t\"OFFHOOK!!!!!!!!\",\n \t\tToast.LENGTH_SHORT);\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t}\n\t}", "boolean isCalibrating();", "public String getCallState() {\n return \"\";\n }", "@Test\n public void testListCurrentCallsCdmaHold() throws Exception {\n List<BluetoothCall> calls = new ArrayList<BluetoothCall>();\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall foregroundCall = getMockCall();\n final BluetoothCall heldCall = createHeldCall();\n calls.add(parentCall);\n calls.add(foregroundCall);\n calls.add(heldCall);\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(foregroundCall);\n mBluetoothInCallService.onCallAdded(heldCall);\n\n when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);\n when(foregroundCall.getState()).thenReturn(Call.STATE_ACTIVE);\n when(heldCall.getState()).thenReturn(Call.STATE_ACTIVE);\n when(foregroundCall.isIncoming()).thenReturn(false);\n when(heldCall.isIncoming()).thenReturn(true);\n when(foregroundCall.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0000\")));\n when(heldCall.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0001\")));\n addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n\n String foregroundCallId = foregroundCall.getTelecomCallId();\n when(parentCall.getGenericConferenceActiveChildCallId()).thenReturn(foregroundCallId);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(foregroundCall.getTelecomCallId(),\n heldCall.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n //Add links from child calls to parent\n String parentId = parentCall.getTelecomCallId();\n when(foregroundCall.getParentId()).thenReturn(parentId);\n when(heldCall.getParentId()).thenReturn(parentId);\n\n clearInvocations(mMockBluetoothHeadset);\n mBluetoothInCallService.listCurrentCalls();\n\n verify(mMockBluetoothHeadset).clccResponse(eq(1), eq(0), eq(CALL_STATE_ACTIVE), eq(0),\n eq(false), eq(\"5550000\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(eq(2), eq(1), eq(CALL_STATE_HELD), eq(0),\n eq(false), eq(\"5550001\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0);\n }", "public int askCouncillorToChange();", "@Test\n public void testProcessChldHoldActiveSwapConference() throws Exception {\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall foregroundCall = getMockCall();\n final BluetoothCall heldCall = createHeldCall();\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n when(parentCall.isConference()).thenReturn(true);\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(false);\n List<String> childrenIds = Arrays.asList(foregroundCall.getTelecomCallId(),\n heldCall.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n\n clearInvocations(mMockBluetoothHeadset);\n boolean didProcess = mBluetoothInCallService.processChld(\n CHLD_TYPE_HOLDACTIVE_ACCEPTHELD);\n\n verify(parentCall).swapConference();\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE), eq(\"\"),\n eq(128), nullable(String.class));\n Assert.assertTrue(didProcess);\n }", "private void processCallStateRinging (String incomingNumber) {\n\t\t\n\t\ttry {\n\t\t\t\t\t\t\n\t\t\tif (QSLog.DEBUG_D)QSLog.d(CLASS_NAME, \"RINGING\");\t\t\t\t\t\n\t\t\t\n\t\t\t/* Put the device in silent mode if the incoming number is\n\t\t\t * from contact banned and in schedule interval \n\t\t\t */\t\t\t\t\t\n\t\t\tif (ringerMode() != AudioManager.RINGER_MODE_SILENT && \n\t\t\t\t\tCheckSettingsOperations.checkQuiteSleepServiceState() &&\n\t\t\t\t\t!ConfigAppValues.processRingCall) {\t\t\t\t\n\t\t\t\t\t\n\t\t\t\tConfigAppValues.processRingCall = true;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Process to control the incoming call and kill it if proceed.\t\t\t\t\n\t\t\t\tConfigAppValues.getContext().startService(\n\t\t\t\t\t\tnew Intent(\n\t\t\t\t\t\t\t\tConfigAppValues.getContext(),\n\t\t\t\t\t\t\t\tSilentModeCallService.class).putExtra(\n\t\t\t\t\t\t\t\t\tConfigAppValues.INCOMING_CALL_NUMBER, \n\t\t\t\t\t\t\t\t\tincomingNumber));\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t//------------------------------------------------------------//\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (QSToast.DEBUG) QSToast.d(\n\t\t\t\t\t\tConfigAppValues.getContext().getApplicationContext(),\n\t\t\t\t\t\t\"RINGING!!!!!!!!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\n\t\t}\n\t}", "public void onCallBellPressed(MessageReason reason);", "@Override\n public void onCallListChange(CallList callList) {\n if (mInCallActivity != null && mInCallActivity.getCallCardFragment() != null &&\n mInCallActivity.getCallCardFragment().isAnimating()) {\n mAwaitingCallListUpdate = true;\n return;\n }\n if (callList == null) {\n return;\n }\n\n mAwaitingCallListUpdate = false;\n\n InCallState newState = getPotentialStateFromCallList(callList);\n InCallState oldState = mInCallState;\n Log.d(this, \"onCallListChange oldState= \" + oldState + \" newState=\" + newState);\n newState = startOrFinishUi(newState);\n Log.d(this, \"onCallListChange newState changed to \" + newState);\n\n // Set the new state before announcing it to the world\n Log.i(this, \"Phone switching state: \" + oldState + \" -> \" + newState);\n mInCallState = newState;\n\n // notify listeners of new state\n for (InCallStateListener listener : mListeners) {\n Log.d(this, \"Notify \" + listener + \" of state \" + mInCallState.toString());\n listener.onStateChange(oldState, mInCallState, callList);\n }\n\n if (isActivityStarted()) {\n final boolean hasCall = callList.getActiveOrBackgroundCall() != null ||\n callList.getOutgoingCall() != null;\n mInCallActivity.dismissKeyguard(hasCall);\n }\n }", "private void handlePhoneStateChanged(String str) {\n Assert.isMainThread();\n Log.d(\"KeyguardUpdateMonitor\", \"handlePhoneStateChanged(\" + str + \")\");\n if (TelephonyManager.EXTRA_STATE_IDLE.equals(str)) {\n this.mPhoneState = 0;\n } else if (TelephonyManager.EXTRA_STATE_OFFHOOK.equals(str)) {\n this.mPhoneState = 2;\n } else if (TelephonyManager.EXTRA_STATE_RINGING.equals(str)) {\n this.mPhoneState = 1;\n }\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onPhoneStateChanged(this.mPhoneState);\n }\n }\n }", "@Override\n\t\tpublic void onCallStateChanged(int state, String incomingNumber) {\n\t\t\tswitch (state) {\n\t\t\t/* 取得手机是待机状态 */\n\t\t\tcase TelephonyManager.CALL_STATE_IDLE:\n\t\t\t\tstateTips.setText(R.string.str_CALL_STATE_IDLE);\n\n\t\t\t\ttry {\n\t\t\t\t\tAudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\t\tif (audioManager != null) {\n\t\t\t\t\t\t/* 设置手机为待机时响铃为正常模式 */\n\t\t\t\t\t\taudioManager\n\t\t\t\t\t\t\t\t.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n\t\t\t\t\t\taudioManager.getStreamVolume(AudioManager.STREAM_RING);\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tstateTips.setText(e.toString());\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/* 取得手机状态为通话中 */\n\t\t\tcase TelephonyManager.CALL_STATE_OFFHOOK:\n\t\t\t\tstateTips.setText(R.string.str_CALL_STATE_OFFHOOK);\n\t\t\t\tbreak;\n\n\t\t\t/* 取得手机状态为来电 */\n\t\t\tcase TelephonyManager.CALL_STATE_RINGING:\n\t\t\t\t/* 显示来电信息 */\n\t\t\t\tstateTips.setText(getResources().getText(\n\t\t\t\t\t\tR.string.str_CALL_STATE_RINGING)\n\t\t\t\t\t\t+ incomingNumber);\n Log.i(\"电话\",phoneView.getText().toString());\n\t\t\t\t/* 判断与输入电话是否为一样,一样则转为静音模式 */\n\t\t\t\tif (incomingNumber.equals(phoneView.getText().toString())) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);\n\t\t\t\t\t\tif (audioManager != null) {\n\t\t\t\t\t\t\t/* 设置响铃模式为静音 */\n\t\t\t\t\t\t\taudioManager\n\t\t\t\t\t\t\t\t\t.setRingerMode(AudioManager.RINGER_MODE_SILENT);\n\t\t\t\t\t\t\taudioManager\n\t\t\t\t\t\t\t\t\t.getStreamVolume(AudioManager.STREAM_RING);\n\t\t\t\t\t\t\tToast.makeText(MainActivity.this,\n\t\t\t\t\t\t\t\t\tgetString(R.string.str_msg),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tstateTips.setText(e.toString());\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tsuper.onCallStateChanged(state, incomingNumber);\n\n\t\t\tetPhone.setOnKeyListener(new EditText.OnKeyListener() {\n\t\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t/* 同步显示TextView */\n\t\t\t\t\tphoneView.setText(etPhone.getText());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t});\n\t\t}", "public void handleVoiceNotification(Intent intent) {\n Log.d(TAG, \"status check dnd = \" + this.mIsInterruptMode + \" carmode = \" + this.isCarModeCheck + \" earjack = \" + this.isEarJackConnected);\n if (!this.mIsInterruptMode || this.isCarModeCheck || this.isEarJackConnected) {\n return;\n }\n if (!Application.getCoreService().isConnected()) {\n Log.d(TAG, \"handleVoiceNotification:: Not connected\");\n } else if (!NotificationUtil.isActiveDevice()) {\n Log.d(TAG, \"handleVoiceNotification:: Not ActiveDevice\");\n } else {\n final NotificationMessage notificationMessage = (NotificationMessage) intent.getSerializableExtra(NotificationConstants.VN_MESSAGE);\n if (notificationMessage != null) {\n notificationMessage.log();\n EarBudsInfo earBudsInfo = Application.getCoreService().getEarBudsInfo();\n if (notificationMessage.getType() == 4866 && !earBudsInfo.wearingR && !earBudsInfo.wearingL) {\n Log.d(TAG, \"handleVoiceNotification:: none wearing\");\n } else if (this.mTTSCore != null) {\n Log.d(TAG, \" appName: \" + notificationMessage.getAppName());\n if (notificationMessage.getType() == 4864) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n if (NotificationCoreService.this.mTTSCore == null || NotificationCoreService.this.telephony.getCallState() != 0) {\n Log.d(NotificationCoreService.TAG, \"alarm, call state is not idle\");\n } else {\n NotificationCoreService.this.mTTSCore.makeAlarm(NotificationCoreService.this.mContext, notificationMessage);\n }\n }\n }, 1000);\n } else if (notificationMessage.getType() == 4866) {\n new Handler().postDelayed(new Runnable() {\n public void run() {\n Log.d(NotificationCoreService.TAG, \" mCurCallTTSTh start\");\n if (NotificationCoreService.this.mTTSCore != null && NotificationCoreService.this.telephony.getCallState() == 1) {\n NotificationCoreService.this.mTTSCore.makeCall(NotificationCoreService.this.mContext, notificationMessage);\n }\n }\n }, 2000);\n } else {\n this.mTTSCore.insert(notificationMessage, false);\n Log.d(TAG, this.mTTSCore.getMsgQsize() + \" , \" + this.mTTSCore + \" , \");\n if (this.mTTSCore.getMsgQsize() > 0 && this.mTTSCore != null && this.telephony.getCallState() == 0) {\n Log.d(TAG, \"MESSAGE_SPEAK_TTS after 1500 \");\n new Handler().postDelayed(new Runnable() {\n public void run() {\n if (NotificationCoreService.this.mTTSCore != null) {\n NotificationCoreService.this.mTTSCore.makeTTS(NotificationCoreService.this.mContext);\n }\n }\n }, 1500);\n }\n }\n }\n }\n }\n }", "public InCallState getPotentialStateFromCallList(CallList callList) {\n\n InCallState newState = InCallState.NO_CALLS;\n\n if (callList == null) {\n return newState;\n }\n if (callList.getIncomingCall() != null) {\n newState = InCallState.INCOMING;\n } else if (callList.getWaitingForAccountCall() != null) {\n newState = InCallState.WAITING_FOR_ACCOUNT;\n } else if (callList.getPendingOutgoingCall() != null) {\n newState = InCallState.PENDING_OUTGOING;\n } else if (callList.getOutgoingCall() != null) {\n newState = InCallState.OUTGOING;\n } else if (callList.getActiveCall() != null ||\n callList.getBackgroundCall() != null ||\n callList.getDisconnectedCall() != null ||\n callList.getDisconnectingCall() != null) {\n newState = InCallState.INCALL;\n }\n\n if (newState == InCallState.NO_CALLS) {\n if (mBoundAndWaitingForOutgoingCall) {\n return InCallState.OUTGOING;\n }\n }\n\n return newState;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle myBundle = intent.getExtras();\n if (myBundle != null) {\n System.out.println(\"--------Not null-----\");\n try {\n System.out.println(\"BlockCallReceiver:\"+intent.getAction());\n if (intent.getAction().equals(\"android.intent.action.PHONE_STATE\")) {\n String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);\n System.out.println(\"--------in state-----\");\n if (state.equals(TelephonyManager.EXTRA_STATE_RINGING)) {\n // Incoming call\n String incomingNumber = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);\n System.out.println(\"--------------my number---------\" + incomingNumber);\n\n List<Plan> list = GetIfResult.getBoolean(ApplicationController.getIfPlanDB(Plan.IF_CALL), incomingNumber);\n if (list.size() == 0) return;\n for (int i = 0; i < list.size(); i++) {\n GetIfResult.doitResult(list.get(i).resultCode, list.get(i).resultValue, context);\n }\n\n if ((System.currentTimeMillis() - ApplicationController.getEndcall() > 5000)\n || (ApplicationController.getEndcall() == -1)) return;\n\n try {\n // this is main section of the code,. could also be use for particular number.\n // Get the boring old TelephonyManager.\n TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);\n\n // Get the getITelephony() method\n Class<?> classTelephony = Class.forName(telephonyManager.getClass().getName());\n Method methodGetITelephony = classTelephony.getDeclaredMethod(\"getITelephony\");\n\n // Ignore that the method is supposed to be private\n methodGetITelephony.setAccessible(true);\n\n // Invoke getITelephony() to get the ITelephony interface\n Object telephonyInterface = methodGetITelephony.invoke(telephonyManager);\n\n // Get the endCall method from ITelephony\n Class<?> telephonyInterfaceClass = Class.forName(telephonyInterface.getClass().getName());\n Method methodEndCall = telephonyInterfaceClass.getDeclaredMethod(\"endCall\");\n\n // Invoke endCall()\n methodEndCall.invoke(telephonyInterface);\n\n SendNotification.sendNotification(context, \"전화가 자동 거절되었습니다.\", incomingNumber);\n } catch (Exception e) {\n //am.setRingerMode(AudioManager.RINGER_MODE_NORMAL);\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n if (mode == -1) {\n mode = notificationManager.getCurrentInterruptionFilter();\n }\n notificationManager.setInterruptionFilter(NotificationManager.INTERRUPTION_FILTER_NONE);\n } else {\n AudioManager mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n if (mode == -1) {\n mode = mAudioManager.getRingerMode();\n }\n mAudioManager.setRingerMode(AudioManager.RINGER_MODE_SILENT); //무음\n }\n //am.setRingerMode(AudioManager.RINGER_MODE_VIBRATE);\n }finally {\n isDoing = true;\n }\n\n //}\n\n } else if (state.equals(TelephonyManager.EXTRA_STATE_IDLE)) {\n Log.d(\"EXTRA_STATE_IDLE\", mode + \"/\"+isDoing);\n if (isDoing) {\n isDoing = false;\n if (mode == -1) return;\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);\n assert notificationManager != null;\n notificationManager.setInterruptionFilter(mode);\n mode = -1;\n\n } else {\n AudioManager mAudioManager = (AudioManager) context.getSystemService(Context.AUDIO_SERVICE);\n assert mAudioManager != null;\n mAudioManager.setRingerMode(mode);\n mode = -1;\n }\n }\n Log.e(\"EXTRA_STATE_IDLE\", mode + \"\");\n }\n }\n } catch (Exception ex) { // Many things can go wrong with reflection calls\n ex.printStackTrace();\n }\n }\n }", "public STATE_KEY eventRemoteStateMissedCall() {\n\t\tviewMissedNotification();\n\t\treturn STATE_KEY.NOT_CHANGE;\n\t}", "private static void updateCdmaCallStateOnNewOutgoingCall(PhoneGlobals app,\n Connection connection) {\n if (app.cdmaPhoneCallState.getCurrentCallState() ==\n CdmaPhoneCallState.PhoneCallState.IDLE) {\n // This is the first outgoing call. Set the Phone Call State to ACTIVE\n app.cdmaPhoneCallState.setCurrentCallState(\n CdmaPhoneCallState.PhoneCallState.SINGLE_ACTIVE);\n } else {\n // This is the second outgoing call. Set the Phone Call State to 3WAY\n app.cdmaPhoneCallState.setCurrentCallState(\n CdmaPhoneCallState.PhoneCallState.THRWAY_ACTIVE);\n\n // TODO: Remove this code.\n //app.getCallModeler().setCdmaOutgoing3WayCall(connection);\n }\n }", "com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();", "protected String getStatus()\n { return call_state; \n }", "public interface PhoneStateChangeCallback {\n void onInComingOffHook(String incomingNumber);\n void onInComingEnd(String incomingNumber);\n void onOutComingStart(String outNumber);\n void onOutComingEnd(String outNumber);\n}", "private NotifySuspendedCommandControllerPowerState() {\n\n\t}", "public void processLiveCallWhenServiceConnected() {\n if (!this.mCallMapById.isEmpty()) {\n for (Integer num : this.mCallMapById.keySet()) {\n Call callById = getCallById(num);\n if (!(callById == null || callById.getState() == 10 || callById.getState() == 7)) {\n HiLog.info(LOG_LABEL, \"processLiveCallWhenServiceConnected: still has call\", new Object[0]);\n addCall(callById);\n }\n }\n processCallAudioStateWhenServiceConnected();\n processCanAddCallWhenServiceConnected();\n }\n }", "public boolean isClockChangeCalled();", "@Override\n public void onIncomingCall(Call call) {\n InCallState newState = startOrFinishUi(InCallState.INCOMING);\n InCallState oldState = mInCallState;\n\n Log.i(this, \"Phone switching state: \" + oldState + \" -> \" + newState);\n mInCallState = newState;\n\n for (IncomingCallListener listener : mIncomingCallListeners) {\n listener.onIncomingCall(oldState, mInCallState, call);\n }\n }", "@Override\n public void peerStateChanged(CallPeerChangeEvent evt)\n {\n CallPeer sourcePeer = evt.getSourceCallPeer();\n \n if (!sourcePeer.equals(callPeer))\n return;\n \n CallPeerState newState = (CallPeerState) evt.getNewValue();\n CallPeerState oldState = (CallPeerState) evt.getOldValue();\n \n String newStateString = sourcePeer.getState().getLocalizedStateString();\n \n // Play the dialing audio when in connecting and initiating call state.\n // Stop the dialing audio when we enter any other state.\n if (newState == CallPeerState.INITIATING_CALL\n || newState == CallPeerState.CONNECTING)\n {\n NotificationManager\n .fireNotification(NotificationManager.DIALING);\n }\n else\n {\n NotificationManager.stopSound(NotificationManager.DIALING);\n }\n \n if (newState == CallPeerState.ALERTING_REMOTE_SIDE\n //if we were already in state CONNECTING_WITH_EARLY_MEDIA the server\n //is already taking care of playing the notifications so we don't\n //need to fire a notification here.\n && oldState != CallPeerState.CONNECTING_WITH_EARLY_MEDIA)\n {\n //\n NotificationManager\n .fireNotification(NotificationManager.OUTGOING_CALL);\n }\n else if (newState == CallPeerState.BUSY)\n {\n NotificationManager.stopSound(NotificationManager.OUTGOING_CALL);\n \n // We start the busy sound only if we're in a simple call.\n if (!renderer.getCallDialog().isConference())\n {\n NotificationManager.fireNotification(\n NotificationManager.BUSY_CALL);\n }\n }\n else if (newState == CallPeerState.CONNECTING_INCOMING_CALL ||\n newState == CallPeerState.CONNECTING_INCOMING_CALL_WITH_MEDIA)\n {\n if (!CallPeerState.isOnHold(oldState))\n {\n NotificationManager\n .stopSound(NotificationManager.OUTGOING_CALL);\n NotificationManager\n .stopSound(NotificationManager.INCOMING_CALL);\n }\n }\n else if (newState == CallPeerState.CONNECTING_WITH_EARLY_MEDIA)\n {\n //this means a call with early media. make sure that we are not\n //playing local notifications any more.\n NotificationManager\n .stopSound(NotificationManager.OUTGOING_CALL);\n }\n else if (newState == CallPeerState.CONNECTED)\n {\n if (!CallPeerState.isOnHold(oldState))\n {\n NotificationManager\n .stopSound(NotificationManager.OUTGOING_CALL);\n NotificationManager\n .stopSound(NotificationManager.INCOMING_CALL);\n \n if (!renderer.getCallDialog().isCallTimerStarted())\n renderer.getCallDialog().startCallTimer();\n \n // Enabling all buttons when the call is connected.\n renderer.getCallDialog().enableButtons();\n }\n else\n {\n renderer.setOnHold(false);\n renderer.getCallDialog().updateHoldButtonState();\n // Enabling all buttons when the call get back from hold\n renderer.getCallDialog().enableButtonsWhileOnHold(false);\n }\n }\n else if (newState == CallPeerState.DISCONNECTED)\n {\n // The call peer should be already removed from the call\n // see CallPeerRemoved\n }\n else if (newState == CallPeerState.FAILED)\n {\n // The call peer should be already removed from the call\n // see CallPeerRemoved\n }\n else if (CallPeerState.isOnHold(newState))\n {\n renderer.setOnHold(true);\n renderer.getCallDialog().enableButtonsWhileOnHold(true);\n renderer.getCallDialog().updateHoldButtonState();\n }\n \n renderer.setPeerState(newStateString);\n \n String reasonString = evt.getReasonString();\n if (reasonString != null)\n renderer.setErrorReason(reasonString);\n }", "void currentStateChanged();", "@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tif (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_IDLE))\n\t\t{\n\t\t\t//hang off - return volume\n\t\t\t//System.out.println (\"Idle\");\n\t\t\tIntent intentTo = new Intent();\n\t\t\tintentTo.putExtra(\"event\", \"idle\");\n\t\t\tintentTo.setAction(\"CallActionHappened\");\n\t\t\tcontext.sendBroadcast(intentTo);\n\t\t}\n\t\telse if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_OFFHOOK))\n\t\t{\n\t\t\tIntent intentTo = new Intent();\n\t\t\tintentTo.putExtra(\"event\", \"offhook\");\n\t\t\tintentTo.setAction(\"CallActionHappened\");\n\t\t\tcontext.sendBroadcast(intentTo);\n\t\t\t//hang on - mute\n\t\t\t//System.out.println (\"Offhook\");\n\t\t}\n\t\telse if (intent.getStringExtra(TelephonyManager.EXTRA_STATE).equals(TelephonyManager.EXTRA_STATE_RINGING))\n\t\t{\n\t\t\t//System.out.println (\"Ringing\");\n\t\t}\n\t}", "public void onCallStateChanged (int state, String incomingNumber) {\n\t\t\n\t\ttry {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tswitch (state) {\t\t\t\t\t\n\t\t\t\n\t\t\t\t//-------------\t\tCALL_STATE_IDLE\t\t----------------------//\n\t\t\t\t//Device call state: No activity. \n\t\t\t\tcase TelephonyManager.CALL_STATE_IDLE:\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\tprocessCallStateIdle();\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//-----------------\t\tCALL_STATE_OFFHOOK\t\t--------------//\n\t\t\t\t//Device call state: Off-hook. At least one call exists that is \n\t\t\t\t//dialing, active, or on hold, and no calls are ringing or waiting. \n\t\t\t\tcase TelephonyManager.CALL_STATE_OFFHOOK:\t\t\t\t\t\n\t\t\t\t\tprocessCallStateOffhook();\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t//-----------------\t\tCALL_STATE_RINGING\t\t--------------//\n\t\t\t\t//Device call state: Ringing. A new call arrived and is ringing \n\t\t\t\t//or waiting. In the latter case, another call is already active. \n\t\t\t\tcase TelephonyManager.CALL_STATE_RINGING:\t\t\t\t\t\t\t\n\t\t\t\t\tprocessCallStateRinging(incomingNumber);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}catch (Exception e) {\n\t\t\tif (QSLog.DEBUG_E)QSLog.e(CLASS_NAME, ExceptionUtils.exceptionTraceToString(\n\t\t\t\t\te.toString(), \n\t\t\t\t\te.getStackTrace()));\t\t\t\n\t\t}\n\t}", "public interface InCallStateListener {\n // TODO: Enhance state to contain the call objects instead of passing CallList\n public void onStateChange(InCallState oldState, InCallState newState, CallList callList);\n }", "private void updateInCallNotification(final InCallState state, CallList callList) {\n /// M: [log optimize] @{\n /** Google log:\n Log.d(this, \"updateInCallNotification...\");\n */\n /// @}\n\n final Call call = getCallToShow(callList);\n\n if (call != null) {\n showNotification(call);\n } else {\n cancelNotification();\n }\n\n /// M: add for OP02 plugin. @{\n// ExtensionManager.getStatusBarExt().updateInCallNotification(call);\n /// @}\n }", "public void broadcastState() {\n StringBuilder sb = new StringBuilder();\n sb.append(MSG_STATE);\n\n if(mService.isTransmitterMode()) {\n sb.append(\" t \");\n }\n else {\n sb.append(\" r \");\n }\n\n sb.append(mService.getVADThreshold());\n sb.append(\" \");\n\n sb.append(mService.getNoiseTracker().getLastNoiseHeard() / 1000);\n\n try {\n sendChannelMessage(sb.toString());\n }\n catch(RemoteException e) {\n e.printStackTrace();\n }\n }", "public int getVibrationState() {\n return -1;\n }", "public void setStuckCall(){\n this.stuckCall = true;\n }", "public boolean inCall();", "public final void cVE() {\n AppMethodBeat.i(91447);\n d.post(new Runnable() {\n public final void run() {\n AppMethodBeat.i(91444);\n a aVar = a.b.eGM;\n c ll = a.ll(\"100458\");\n if (ll == null) {\n ab.i(\"WidgetSafeModeProxyImpl\", \"ABTEST_LAYERID_SEARCH_WIDGET_SAFE_MODE_SWITCH item is null\");\n AppMethodBeat.o(91444);\n return;\n }\n e eVar = e.this;\n boolean z = ll.isValid() && \"1\".equals(ll.dru().get(\"isOpen\"));\n eVar.RP = z;\n AppMethodBeat.o(91444);\n }\n }, \"WidgetSafeModeProxyImpl\");\n AppMethodBeat.o(91447);\n }", "public boolean isStuckCall(){\n return this.stuckCall;\n }", "public boolean isHolding();", "public native CallClosedReasons getClosedReason();", "void composingIndicatorReceived(IMSession session, String sender, int timeout);", "long getStateChange();", "void controllerChangeReceived(rwmidi.Controller cntrl){\n\t println(\"cc recieved\");\n\t println(\": \" + cntrl.getCC()) ;\n\n\t \n\t if(cntrl.getCC() == 2){\n\t modThresh1(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 3){\n\t modThresh2(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() ==4){\n\t modThresh3(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 5){ //// adjust skip\n\t modSkip(cntrl.getValue());\n\t }\n\t \n\t if(cntrl.getCC() == 6){ /// adjus scale\n\t modScale(cntrl.getValue());\n\t }\n\t}", "@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG, \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(phoneIsInUse());\n }\n }", "void onCheckedChanged(Chip chip, boolean isChecked);", "boolean isSignal();", "public void onCallClicked(View view) {\n if (mUIState == UIState.DISCONNECTED) {\n // Prior to joining the channel, ensure audio is muted.\n setAudioState(true);\n\n // Join the channel.\n String token = getString(R.string.agora_access_token);\n if (TextUtils.isEmpty(token) || TextUtils.equals(token, \"#YOUR ACCESS TOKEN#\")) {\n token = null; // default, no token\n }\n mRtcEngine.joinChannel(token, mChannelText.getEditableText().toString(), \"Extra Optional Data\", 0);\n setUIState(UIState.CONNECTED_SPLITSCREEN);\n } else {\n // Leave the channel.\n mRemoteCameraUid = 0;\n removeRemoteCamera();\n removeRemoteShare();\n mRtcEngine.leaveChannel();\n mLogView.logI(\"Left channel\");\n setUIState(UIState.DISCONNECTED);\n }\n }", "@Override\n public void onStateChanged(boolean changed, BranchError error) {\n int credits = Branch.getInstance(getApplicationContext()).getCredits();\n Toast.makeText(getApplicationContext(), \"You have : \" + credits + \" credits.\",\n Toast.LENGTH_LONG).show();\n }", "public interface SignalStateListener{\n\n void onSimStateChanged(boolean sim1Exist, boolean sim2Exist) ;\n\n void onSignalStrengthsChanged(int simId, SimSignalInfo signalInfo) ;\n }", "public Call getCurrentCall();", "private void updateCarrierStateWithSimStatus(State simState) {\n if (DEBUG) Log.d(TAG, \"updateCarrierTextWithSimStatus(), simState = \" + simState);\n \n CharSequence carrierText = null;\n int carrierHelpTextId = 0;\n mEmergencyButtonEnabledBecauseSimLocked = false;\n mStatus = getStatusForIccState(simState);\n mSimState = simState;\n switch (mStatus) {\n case Normal:\n carrierText = makeCarierString(mPlmn, mSpn);\n break;\n \n case NetworkLocked:\n carrierText = makeCarierString(mPlmn,\n getContext().getText(R.string.lockscreen_network_locked_message));\n carrierHelpTextId = R.string.lockscreen_instructions_when_pattern_disabled;\n break;\n \n case SimMissing:\n // Shows \"No SIM card | Emergency calls only\" on devices that are voice-capable.\n // This depends on mPlmn containing the text \"Emergency calls only\" when the radio\n // has some connectivity. Otherwise, it should be null or empty and just show\n // \"No SIM card\"\n carrierText = getContext().getText(R.string.lockscreen_missing_sim_message_short);\n if (mLockPatternUtils.isEmergencyCallCapable()) {\n carrierText = makeCarierString(carrierText, mPlmn);\n }\n carrierHelpTextId = R.string.lockscreen_missing_sim_instructions_long;\n break;\n \n case SimPermDisabled:\n carrierText = getContext().getText(R.string.lockscreen_missing_sim_message_short);\n carrierHelpTextId = R.string.lockscreen_permanent_disabled_sim_instructions;\n mEmergencyButtonEnabledBecauseSimLocked = true;\n break;\n \n case SimMissingLocked:\n carrierText = makeCarierString(mPlmn,\n getContext().getText(R.string.lockscreen_missing_sim_message_short));\n carrierHelpTextId = R.string.lockscreen_missing_sim_instructions;\n mEmergencyButtonEnabledBecauseSimLocked = true;\n break;\n \n case SimLocked:\n carrierText = makeCarierString(mPlmn,\n getContext().getText(R.string.lockscreen_sim_locked_message));\n mEmergencyButtonEnabledBecauseSimLocked = true;\n break;\n \n case SimPukLocked:\n carrierText = makeCarierString(mPlmn,\n getContext().getText(R.string.lockscreen_sim_puk_locked_message));\n if (!mLockPatternUtils.isPukUnlockScreenEnable()) {\n // This means we're showing the PUK unlock screen\n mEmergencyButtonEnabledBecauseSimLocked = true;\n }\n break;\n }\n \n setCarrierText(carrierText);\n setCarrierHelpText(carrierHelpTextId);\n updateEmergencyCallButtonState(mPhoneState);\n }", "ConnectionState getContactState();", "@Test\n public void testConferenceInProgressCDMA() throws Exception {\n ArrayList<BluetoothCall> calls = new ArrayList<>();\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall confCall1 = getMockCall();\n final BluetoothCall confCall2 = createHeldCall();\n calls.add(parentCall);\n calls.add(confCall1);\n calls.add(confCall2);\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(confCall1);\n mBluetoothInCallService.onCallAdded(confCall2);\n\n when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);\n when(confCall1.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall2.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall1.isIncoming()).thenReturn(false);\n when(confCall2.isIncoming()).thenReturn(true);\n when(confCall1.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0000\")));\n when(confCall2.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0001\")));\n addCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n addCallCapability(parentCall, Connection.CAPABILITY_SWAP_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n String confCall1Id = confCall1.getTelecomCallId();\n when(parentCall.getGenericConferenceActiveChildCallId())\n .thenReturn(confCall1Id);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(confCall1.getTelecomCallId(),\n confCall2.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n //Add links from child calls to parent\n String parentId = parentCall.getTelecomCallId();\n when(confCall1.getParentId()).thenReturn(parentId);\n when(confCall2.getParentId()).thenReturn(parentId);\n\n clearInvocations(mMockBluetoothHeadset);\n mBluetoothInCallService.queryPhoneState();\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(1), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(true);\n List<BluetoothCall> children =\n mBluetoothInCallService.getBluetoothCallsByIds(parentCall.getChildrenIds());\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(parentCall, children);\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(1), eq(0), eq(CALL_STATE_IDLE),\n eq(\"\"), eq(128), nullable(String.class));\n\n when(mMockCallInfo.getHeldCall()).thenReturn(null);\n // Spurious BluetoothCall to onIsConferencedChanged.\n mBluetoothInCallService.getCallback(parentCall)\n .onChildrenChanged(parentCall, children);\n // Make sure the BluetoothCall has only occurred collectively 2 times (not on the third)\n verify(mMockBluetoothHeadset, times(2)).phoneStateChanged(any(int.class),\n any(int.class), any(int.class), nullable(String.class), any(int.class),\n nullable(String.class));\n }", "private void checkIfCarrierIsLost (int c) {\n\t\tif (noCarrier[noCarrierIndex] == c)\n\t\t\t++noCarrierIndex;\n\t\telse\n\t\t\tnoCarrierIndex = 0;\n\t\t\n\t\tif (noCarrierIndex >= noCarrier.length) {\n\t\t\tstate = STATE_DISCONNECTED;\n\t\t}\n\t}", "public boolean onStateChange(int[] iArr) {\n boolean onStateChange = super.onStateChange(iArr);\n if (this.f9050a.f9051a.setState(iArr)) {\n onStateChange = true;\n }\n boolean e = RippleUtils.m11254e(iArr);\n C1269b bVar = this.f9050a;\n if (bVar.f9052b == e) {\n return onStateChange;\n }\n bVar.f9052b = e;\n return true;\n }", "public void checkState() {\r\n\t\tout.println(state);\r\n\t\tif(getEnergy() < 80 && getOthers() > 5) {\r\n\t\t\tstate = 1;\r\n\t\t\tturnLeft(getHeading() % 90);\r\n\t\t\tahead(moveAmount);\r\n\t\t}\r\n\t\telse if(getEnergy() < 80 && getOthers() < 5) {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstate = 0;\r\n\t\t}\r\n\t\t\r\n\t}", "public void ifServiceOnChecked() {\n\n\t\tif (serviceOnChecked) {\n\t\t\tLog.d(USER_TAG, \"serviceOnChecked - ifServiceOnChecked: \"\n\t\t\t\t\t+ serviceOnChecked);\n\t\t\talarmType = AlarmManager.ELAPSED_REALTIME_WAKEUP;\n\t\t\ttimeToStop = SystemClock.elapsedRealtime() + upTime * ONE_SECOND;\n\t\t\talarmManager_autoStop.set(alarmType, timeToStop,\n\t\t\t\t\tpendindIntent_autStop);\n\t\t\tLog.d(USER_TAG, \"upTime: \" + upTime + \" --- serviceOnChecked: \"\n\t\t\t\t\t+ serviceOnChecked);\n\t\t} else if (alarmManager_autoStop != null) {\n\t\t\talarmManager_autoStop.cancel(pendindIntent_autStop);\n\t\t\tLog.d(USER_TAG, \"alarmManager_autoStop.cancel - ifServiceOnChecked\");\n\t\t}\n\t}", "void channelInactive() throws Exception;", "void channelInactive() throws Exception;", "private void missedCall() {\n\n NotificationCompat.Builder nBuilder = new NotificationCompat.Builder(mContext);\n\n nBuilder.setSmallIcon(android.R.drawable.stat_notify_missed_call);\n\n nBuilder.setContentTitle(name);\n\n nBuilder.setContentText(resources.getString(R.string.missed_call));\n\n nBuilder.setColor(Color.rgb(4, 137, 209));\n\n nBuilder.setAutoCancel(true);\n\n Intent showCallLog = new Intent(Intent.ACTION_VIEW);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, showCallLog, PendingIntent.FLAG_CANCEL_CURRENT);\n\n nBuilder.setContentIntent(pendingIntent);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n notificationManager.notify(MISSED_CALL_NOTIFICATION, nBuilder.build());\n\n CallLogUtilities.addCallToLog(contentResolver, number, 0, CallLog.Calls.MISSED_TYPE, System.currentTimeMillis());\n\n }", "@Override\n public void onCallStateChanged(int state, String incomingNumber) {\n // Log.i(TAG, \"PhoneStateListener.onCallStateChanged: \"\n // + state + \", '\" + incomingNumber + \"'\");\n if ((state == TelephonyManager.CALL_STATE_IDLE) && dialpadChooserVisible()) {\n // Log.i(TAG, \"Call ended with dialpad chooser visible! Taking it down...\");\n // Note there's a race condition in the UI here: the\n // dialpad chooser could conceivably disappear (on its\n // own) at the exact moment the user was trying to select\n // one of the choices, which would be confusing. (But at\n // least that's better than leaving the dialpad chooser\n // onscreen, but useless...)\n showDialpadChooser(false);\n }\n }", "private void informTimeToCross() {\n if (continueAskingTimes) {\n requestTimes();\n }\n }", "private void missedCall() {\n\n NotificationCompat.Builder nBuilder = new NotificationCompat.Builder(this);\n\n nBuilder.setSmallIcon(android.R.drawable.stat_notify_missed_call);\n\n nBuilder.setContentTitle(name);\n\n nBuilder.setContentText(resources.getString(R.string.missed_call));\n\n nBuilder.setColor(Color.rgb(4, 137, 209));\n\n nBuilder.setAutoCancel(true);\n\n Intent showCallLog = new Intent(Intent.ACTION_VIEW);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, showCallLog, PendingIntent.FLAG_CANCEL_CURRENT);\n\n nBuilder.setContentIntent(pendingIntent);\n\n showCallLog.setType(CallLog.Calls.CONTENT_TYPE);\n\n notificationManager.notify(MISSED_CALL_NOTIFICATION, nBuilder.build());\n\n CallLogUtilities.addCallToLog(contentResolver, number, 0, CallLog.Calls.MISSED_TYPE, System.currentTimeMillis());\n\n }", "@Override\n\tpublic void CallEventL(int state, String incomingNumber) {\n\t\tLog.i(\"CallNumber\", incomingNumber);\n\t\t\n\t\tswitch (state){\n\t\tcase TelephonyManager.CALL_STATE_IDLE:{\n\t\t\t if(mVIPNeedDeleteLog)\n\t\t\t {\n\t\t\t\t deleteLastCallLog(incomingNumber);\n\t\t\t\t mVIPNeedDeleteLog = false;\t\t\t\t\n\t\t\t }\n\t\t \tbreak;\n\t\t }\n\t\tcase TelephonyManager.CALL_STATE_RINGING:{\n\t\t\t\n\t\t\t processCall(incomingNumber);\n\t\t\t break;\n\t\t\t \n\t\t }\n\t\t}\n\t}", "public boolean onCallAudioStateChanged(CallAudioState callAudioState) {\n this.mCurrentCallAudioState = callAudioState;\n if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"onCallAudioStateChanged fail, no remote.\", new Object[0]);\n this.mPendingCallAudioState = callAudioState;\n return false;\n } else if (callAudioState != null) {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n this.mRemote.transact(1, CallSerializationUtils.writeCallAudioStateToParcel(obtain, callAudioState), obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"onCallAudioStateChanged.\", new Object[0]);\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"onCallAudioStateChanged got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n } else {\n HiLog.error(LOG_LABEL, \"onCallAudioStateChanged fail, no audioState.\", new Object[0]);\n return false;\n }\n }", "public boolean hasLiveCalls() {\n if (this.mCallMapById.isEmpty()) {\n return false;\n }\n for (Integer num : this.mCallMapById.keySet()) {\n Call callById = getCallById(num);\n if (!(callById == null || callById.getState() == 10 || callById.getState() == 7)) {\n HiLog.info(LOG_LABEL, \"hasLiveCalls.\", new Object[0]);\n return true;\n }\n }\n return false;\n }", "public void updateIndication() {\n int i;\n if (TextUtils.isEmpty(this.mTransientIndication)) {\n this.mWakeLock.setAcquired(false);\n }\n Log.i(\"KeyguardIndication\", \"updateIndication: mVisible \" + this.mVisible + \" mDozing \" + this.mDozing + \" mTransientIndication \" + this.mTransientIndication + \" mPowerPluggedIn \" + this.mPowerPluggedIn + \" mShouldUpdateBatteryIndication \" + this.mShouldUpdateBatteryIndication + \" mUpArrowIndication \" + this.mUpArrowIndication);\n if (this.mVisible) {\n if (this.mDozing) {\n if (!TextUtils.isEmpty(this.mTransientIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mTransientIndication);\n this.mTextView.setTextColor(this.mTransientTextColor);\n } else {\n this.mTextView.switchIndication((CharSequence) null);\n }\n } else if (!TextUtils.isEmpty(this.mTransientIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mTransientIndication);\n this.mTextView.setTextColor(this.mTransientTextColor);\n } else if (this.mPowerPluggedIn) {\n if (this.mShouldUpdateBatteryIndication) {\n this.mHandler.removeMessages(6);\n this.mHandler.sendEmptyMessageDelayed(6, 500);\n }\n } else if (Build.IS_CM_CUSTOMIZATION_TEST && this.mSignalAvailable && !this.mIsCMSingleClicking) {\n this.mTextView.switchIndication((int) R.string.emergency_call_string);\n this.mTextView.setTextColor(getTextColor());\n } else if (this.mUpdateMonitor.isFaceUnlock() && this.mUpdateMonitor.isStayScreenFaceUnlockSuccess() && shouldShowFaceTransientIndication()) {\n this.mTextView.switchIndication((int) R.string.face_unlock_success);\n this.mTextView.setTextColor(getTextColor());\n } else if (!TextUtils.isEmpty(this.mUpArrowIndication)) {\n this.mTextView.switchIndication((CharSequence) this.mUpArrowIndication);\n this.mTextView.setTextColor(getTextColor());\n ImageView imageView = this.mUpArrow;\n if (this.mDarkMode) {\n i = R.drawable.miui_default_lock_screen_up_arrow_dark;\n } else {\n i = R.drawable.miui_default_lock_screen_up_arrow;\n }\n imageView.setImageResource(i);\n } else {\n this.mTextView.switchIndication((CharSequence) this.mRestingIndication);\n this.mTextView.setTextColor(getTextColor());\n }\n }\n }", "public void handleCall(Call c) {\n\t}", "@Override\n public String getICEState()\n {\n return null;\n }", "public void clockIn()\n {\n if(!(state instanceof ClockedIn))\n setState(\"Clock-In\");\n }", "private void handleReportEmergencyCallAction() {\n Assert.isMainThread();\n for (int i = 0; i < this.mCallbacks.size(); i++) {\n KeyguardUpdateMonitorCallback keyguardUpdateMonitorCallback = this.mCallbacks.get(i).get();\n if (keyguardUpdateMonitorCallback != null) {\n keyguardUpdateMonitorCallback.onEmergencyCallAction();\n }\n }\n }", "@Override\r\n\tpublic void activate() {\n\t\tif(CID==true) {\r\n\t\t\tinter.setState(inter.getResults());\r\n\t\t}\r\n\t}", "public void testAllSupportedMedicalConditionsForNotify() {\n Map<String, MedicalCondition> conditions = cache.getConditions(Service.NOTIFY);\n assertEquals(165, conditions.size());\n }", "protected void updateStateCease( int inState , boolean inRecoverable ) {\n\t\t\r\n\t\tif ( null == mPlayer ) inRecoverable = false;\r\n\r\n\t\tif ( mPlayState >= kStateOpening && mPlayState < kStatePrepared && ! inRecoverable ) {\r\n\t\t\tmOpenAttemptCount = 0;\r\n\t\t}\r\n\t\t\r\n\t\tcease();\r\n\t\tupdateState( inState );\r\n\t\t\r\n\t\tif ( mPlayRequested && inRecoverable ) {\r\n\t\t\tupdateStatus( kStatusOpening );\t\t\t//\tshow proper feedback\r\n\t\t\t\r\n\t\t\tmService.mThreadable.remove( kRetry );\r\n\t\t\tmService.mThreadable.handle( kRetry , 500L );\r\n\t\t}\r\n\t}", "private static boolean isActiveCall(Call call)\n {\n List<Call> calls;\n CallGroup group = call.getCallGroup();\n if(group != null)\n {\n calls = group.getCalls();\n }\n else\n {\n calls = new Vector<Call>();\n calls.add(call);\n }\n\n for(int i = 0; i < calls.size(); ++i)\n {\n if(isAtLeastOneActiveCallPeer(calls.get(i).getCallPeers()))\n {\n // If there is a single active call peer, then the call is\n // active.\n return true;\n }\n }\n return false;\n }", "boolean hasSignal();", "public boolean getCollectState() {\n return collectedOpticalSwitch.get();\n }", "public boolean isActiveValue() {\n\n\t\tint tmp = getValue();\n\t\tif (tmp == 25)\n\t\t\tdetectStatus = true;\n\t\telse // Getting 24 here\n\t\t\tdetectStatus = false;\n\n\t\treturn detectStatus;\n\t}", "public void onIccStatusChanged(Integer index) {\n if (isNeedToGetIccId()) {\n this.mCis[index.intValue()].getICCID(obtainMessage(HwFullNetworkConstantsInner.EVENT_GET_ICCID_DONE, index));\n }\n }", "@Test\n public void testListCurrentCallsCdmaConference() throws Exception {\n ArrayList<BluetoothCall> calls = new ArrayList<>();\n BluetoothCall parentCall = createActiveCall();\n final BluetoothCall confCall1 = getMockCall();\n final BluetoothCall confCall2 = createHeldCall();\n calls.add(parentCall);\n calls.add(confCall1);\n calls.add(confCall2);\n mBluetoothInCallService.onCallAdded(parentCall);\n mBluetoothInCallService.onCallAdded(confCall1);\n mBluetoothInCallService.onCallAdded(confCall2);\n\n when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);\n when(confCall1.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall2.getState()).thenReturn(Call.STATE_ACTIVE);\n when(confCall1.isIncoming()).thenReturn(false);\n when(confCall2.isIncoming()).thenReturn(true);\n when(confCall1.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0000\")));\n when(confCall2.getGatewayInfo()).thenReturn(\n new GatewayInfo(null, null, Uri.parse(\"tel:555-0001\")));\n removeCallCapability(parentCall, Connection.CAPABILITY_MERGE_CONFERENCE);\n removeCallCapability(parentCall, Connection.CAPABILITY_CONFERENCE_HAS_NO_CHILDREN);\n when(parentCall.wasConferencePreviouslyMerged()).thenReturn(true);\n //when(parentCall.getConferenceLevelActiveCall()).thenReturn(confCall1);\n when(parentCall.isConference()).thenReturn(true);\n List<String> childrenIds = Arrays.asList(confCall1.getTelecomCallId(),\n confCall2.getTelecomCallId());\n when(parentCall.getChildrenIds()).thenReturn(childrenIds);\n //Add links from child calls to parent\n String parentId = parentCall.getTelecomCallId();\n when(confCall1.getParentId()).thenReturn(parentId);\n when(confCall2.getParentId()).thenReturn(parentId);\n\n clearInvocations(mMockBluetoothHeadset);\n mBluetoothInCallService.listCurrentCalls();\n\n verify(mMockBluetoothHeadset).clccResponse(eq(1), eq(0), eq(CALL_STATE_ACTIVE), eq(0),\n eq(true), eq(\"5550000\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(eq(2), eq(1), eq(CALL_STATE_ACTIVE), eq(0),\n eq(true), eq(\"5550001\"), eq(PhoneNumberUtils.TOA_Unknown));\n verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0);\n }", "private void setNotificationWhen(Call call, int state, Notification.Builder builder) {\n if (state == Call.State.ACTIVE) {\n builder.setUsesChronometer(true);\n builder.setWhen(call.getConnectTimeMillis());\n } else {\n builder.setUsesChronometer(false);\n }\n }", "@Test\n public void testOnCallAddedRinging() throws Exception {\n BluetoothCall ringingCall = createRingingCall();\n when(ringingCall.getHandle()).thenReturn(Uri.parse(\"tel:555000\"));\n\n mBluetoothInCallService.onCallAdded(ringingCall);\n\n verify(mMockBluetoothHeadset).phoneStateChanged(eq(0), eq(0), eq(CALL_STATE_INCOMING),\n eq(\"555000\"), eq(PhoneNumberUtils.TOA_Unknown), nullable(String.class));\n }", "public void processCallAudioStateWhenServiceConnected() {\n CallAudioState callAudioState = this.mCurrentCallAudioState;\n if (callAudioState != null) {\n HiLog.info(LOG_LABEL, \"processCallAudioStateWhenServiceConnected:onCallAudioStateChanged %{public}s\", new Object[]{callAudioState.toString()});\n onCallAudioStateChanged(this.mCurrentCallAudioState);\n }\n }", "public interface OnChronoActiveListener {\n void onChronoActiveChange(boolean isCounting, long currentCount);\n }", "public void takeEmergencyCallAction() {\n if (PhoneUtils.isInCall(this.mContext)) {\n PhoneUtils.resumeCall(this.mContext);\n return;\n }\n KeyguardUpdateMonitor.getInstance(this.mContext).reportEmergencyCallAction(true);\n this.mContext.startActivityAsUser(INTENT_EMERGENCY_DIAL, ActivityOptions.makeCustomAnimation(this.mContext, 0, 0).toBundle(), new UserHandle(KeyguardUpdateMonitor.getCurrentUser()));\n }", "@Override\n\tpublic void onReceive(final Context context, final Intent intent) {\n\t\t isService= AppData.getBool(AppData.service,context);\n\t\tLog.e(TAG,\"\"+isService);\n\t\tthis.context=context;\n\t\tLog.e(TAG, \"start sevicek\"+isService+\" \"+intent.getAction());\n\t\t//isIncomming=true;\n\t\tif(!isService)\n\t\t\treturn;\n\n\t\t String blockingMode=\"\";\n\t\tTelephonyManager telephony = (TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE);\n\t\ttelephony.listen(new PhoneStateListener(){\n\t\t\t@Override\n\t\t\tpublic void onCallStateChanged(int state, String incomingNumber) {\n\t\t\t\tsuper.onCallStateChanged(state, incomingNumber);\n\t\t\t\tSystem.out.println(\"incomingNumber1 : \"+incomingNumber);\n\n//\t\t\t\tif(!Validation.isServiceRunning(context,RecordingService.class))\n//\t\t\t\t{\n//\t\t\t\t\tLog.e(TAG, \"start sevicek\");\n//\t\t\t\t\tIntent in = new Intent(context, RecordingService.class);\n//\t\t\t\t\tcontext.startService(in);\n//\t\t\t\t}\n\t\t\t\tif(incomingNumber!=null&&incomingNumber.length()>0)\n\t\t\t\tPhoneMunber=incomingNumber;\n\t\t\t\tLog.e(\"incomingNumber1\",state+intent.getAction()+ GetCurrentDateTime()+\" \"+incomingNumber);\n\n\t\t\t\tif(lastState == state)\n\t\t\t\t\treturn;\n\n\t\t\t\tswitch (state) {\n\t\t\t\t\tcase TelephonyManager.CALL_STATE_RINGING:\n\t\t\t\t\t\tisIncomming = true;\n\t\t\t\t\t\tin = new Intent(context, RecordingService.class);\n\t\t\t\t\t\tif(!Validation.isServiceRunning(context,RecordingService.class))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tLog.e(TAG, \"start sevicek\");\n\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\tcontext.startService(in);\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\tLog.e(TAG, \"start sevice after stop\");\n\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\tcontext.startService(in);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TelephonyManager.CALL_STATE_OFFHOOK:\n\t\t\t\t\t\t//Transition of ringing->offhook are pickups of incoming calls. Nothing done on them\n\t\t\t\t\t\tif(lastState != TelephonyManager.CALL_STATE_RINGING){\n\t\t\t\t\t\t\tisIncomming = false;\n\t\t\t\t\t\t\tin = new Intent(context, RecordingService.class);\n\t\t\t\t\t\t\tif(!Validation.isServiceRunning(context,RecordingService.class))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tLog.e(TAG, \"start sevicek\");\n\t\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\t\tcontext.startService(in);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tLog.e(TAG, \"start sevice after stop\");\n\t\t\t\t\t\t\t\tcontext.stopService(in);\n\t\t\t\t\t\t\t\tcontext.startService(in);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase TelephonyManager.CALL_STATE_IDLE:\n\t\t\t\t\t\t//Went to idle- this is the end of a call. What type depends on previous state(s)\n\t\t\t\t\t\tif(lastState == TelephonyManager.CALL_STATE_RINGING){\n\t\t\t\t\t\t\t//Ring but no pickup- a miss\n\t\t\t\t\t\t\tcontext.stopService(in);\n\n\t\t\t\t\t\t\tLog.e(\"onMissedCall\",\"call\");\n\t\t\t\t\t\t\t//onMissedCall(context, savedNumber, callStartTime);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(isIncomming){\n\t\t\t\t\t\t\tLog.e(\"onMissedCall\",\"call\");\n\t\t\t\t\t\t\tEndTime=\tGetCurrentDateTime();\n\t\t\t\t\t\t\tLog.e(TAG, GetCurrentDateTime()+\" \"+lastState+\" \"+\"IDLE\"+isIncomming);\n\n\t\t\t\t\t\t\tCallType=\"Incomming\";\n\n\t\t\t\t\t\t\tSetDutyTime();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tEndTime=\tGetCurrentDateTime();\n\t\t\t\t\t\t\tCallType=\"Outgoing\";\n\t\t\t\t\t\t\tLog.e(TAG, GetCurrentDateTime()+\" \"+lastState+\" \"+\"IDLE\"+isIncomming);\n\n\t\t\t\t\t\t\tSetDutyTime();\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tlastState = state;\n\n\n\t\t\t}\n\t\t},PhoneStateListener.LISTEN_CALL_STATE);\n\n\t\t {\n\t\t\t Bundle b = intent.getExtras();\n\n\t\t\t String outGoingNumber = b.getString(Intent.EXTRA_PHONE_NUMBER);\n\t\t\t outGoingNumber=getContactDisplayNameByNumber(outGoingNumber, context);\n\t\t\t Log.e(\"outGoingNumber33\",\"\"+outGoingNumber);\n\t\t\t if(outGoingNumber!=null&&outGoingNumber.length()>0)\n\t\t\t\t PhoneMunber=outGoingNumber;\n\t\t\t //blockCall(context, b);\n\n\t\t }\n\n\n }", "public void onStateChange(InCallState oldState, InCallState newState, CallList callList);", "@Override\n public void onClick(View v) {\n if(custActiveInactive.isChecked()){\n custHardwareReturned.setChecked(false);\n custHardwareReturned.setEnabled(false);\n custHardwareInstalled.setEnabled(true);\n cust.custActiveInActive = 1;\n }else{\n custHardwareInstalled.setChecked(false);\n custHardwareInstalled.setEnabled(false);\n custHardwareReturned.setEnabled(true);\n cust.custActiveInActive = 0;\n }\n }", "public void onTick(){\n if(mService!=null && mService.hasAlarm(kookPlaatID)){\n vegetableState = VegetableStates.VEGETABLE_SELECTED;\n VegetableAlarm vegAlarm = mService.getTimer(kookPlaatID);\n progress.setProgress(progress.getMax() - vegAlarm.getTimeLeft());\n\n if(vegAlarm.isRunning()){\n text.setText(formatTime(vegAlarm.getTimeLeft()));\n }else if(vegAlarm.isFinished()){\n timerState = TimerStates.TIMER_FINISHED;\n updateUI();\n }else if(!vegAlarm.isRunning()){\n timerState = TimerStates.TIMER_PAUSED;\n updateUI();\n }\n }\n }", "public void notifySwitchAway() { }", "protected boolean statusIs(String state)\n { return call_state.equals(state); \n }", "public void setCeaseFire(int value) {\n this.ceaseFire = value;\n }", "void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}", "public void updateImcState(int value) {\n }", "static final void registerIccStatus(Handler handler, int event) {\n for (Phone phone : PhoneFactory.getPhones()) {\n IccCard sim = phone.getIccCard();\n if (sim != null) {\n if (VDBG) Log.v(LOG_TAG, \"register for ICC status, phone \" + phone.getPhoneId());\n sim.registerForNetworkLocked(handler, event, phone);\n }\n }\n }" ]
[ "0.59386444", "0.58028144", "0.57762474", "0.56877625", "0.5669975", "0.5659816", "0.5564183", "0.5530014", "0.54155856", "0.5403795", "0.5393438", "0.5314045", "0.52881116", "0.52590096", "0.52511656", "0.52061474", "0.5203439", "0.51759183", "0.51479745", "0.51422924", "0.51377136", "0.50856096", "0.5071756", "0.5051054", "0.5046472", "0.5004461", "0.49805456", "0.49605852", "0.49579424", "0.49510983", "0.4948555", "0.4933148", "0.49304458", "0.49223194", "0.4921455", "0.4886538", "0.4854881", "0.48444784", "0.48437062", "0.48250556", "0.48193863", "0.48178795", "0.48175752", "0.48139697", "0.48104012", "0.48085275", "0.48042366", "0.48037636", "0.48034182", "0.4802029", "0.47985232", "0.47966683", "0.4790951", "0.47887272", "0.47886315", "0.47799048", "0.47743458", "0.47707835", "0.47608855", "0.4759789", "0.4754728", "0.47533172", "0.47533172", "0.47528327", "0.47527108", "0.47493094", "0.47478524", "0.4746076", "0.4745542", "0.47435153", "0.47395074", "0.47384268", "0.47342613", "0.47324464", "0.47298893", "0.4724935", "0.472144", "0.47121122", "0.47030258", "0.47017008", "0.4697432", "0.4693332", "0.46916035", "0.46915483", "0.46864498", "0.468532", "0.46791312", "0.4677578", "0.4674258", "0.4669277", "0.4659076", "0.46579888", "0.46558437", "0.4650961", "0.4650745", "0.46498936", "0.46498445", "0.46476167", "0.4643515" ]
0.54528505
9
Create authentication on google server
public GoogleAuth(String apiKey, String apiSecret, String scope){ this.apiKey = apiKey; this.apiSecret = apiSecret; this.scope = scope; this.service = new ServiceBuilder().provider(Google2Api.class) .apiKey(this.apiKey).apiSecret(this.apiSecret).callback(this.callbackUrl) .scope(this.scope).build(); try { HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport(); } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GoogleAuthenticatorKey createCredentials();", "GoogleAuthenticatorKey createCredentials(String userName);", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "public GoogleAuthenticatorAccount() {\n }", "private void createRequest() {\n // Configure Google Sign In\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }", "@Override\n\t\t\t\t\tpublic boolean loginWithGoogle(String userName, String password) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}", "boolean authNeeded();", "private void doSignup(RoutingContext ctx){\n // Get Data from view\n JsonObject req = ctx.getBodyAsJson();\n String username = req.getString(\"username\");\n String password = req.getString(\"password\");\n\n GoogleAuthenticator authenticator = new GoogleAuthenticator();\n\n //Get Generate Key\n System.out.println(\" Calling Google Authenticator to generate AuthKey\");\n GoogleAuthenticatorKey authKey = authenticator.createCredentials();\n String key = authKey.getKey();\n System.out.println(\" Google Authenticator generated AuthKey\");\n\n //Store Data from Repository\n User user = new User(username,password,key);\n\n //send response to the user\n JsonObject res = new JsonObject().put(\"key\",key);\n ctx.response().setStatusCode(200).end(res.encode());\n }", "abstract public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);", "private void formAuthenticate(String server) throws Exception{\n\t\tCredentialsProvider credsProvider = new BasicCredentialsProvider();\n\t\tcredsProvider.setCredentials(\n\t\t\t\tnew AuthScope(server, 8081),\n\t\t\t\tnew UsernamePasswordCredentials(\"debug\", \"debuglockss\"));\n\t\tCloseableHttpClient httpclient = HttpClients.custom()\n\t\t\t\t.setDefaultCredentialsProvider(credsProvider)\n\t\t\t\t.build();\n\t\ttry {\n\t\t\tHttpGet httpget = new HttpGet(\"https://\"+ server +\":8081/Home\");\n\n\t\t\tLOGGER.info(\"Executing request \" + httpget.getRequestLine());\n\t\t\tCloseableHttpResponse response = httpclient.execute(httpget);\n\t\t\ttry {\n\t\t\t\tLOGGER.info(\"----------------------------------------\");\n\t\t\t\tLOGGER.info(response.getStatusLine().toString());\n\t\t\t\tLOGGER.info(EntityUtils.toString(response.getEntity()));\n\t\t\t} finally {\n\t\t\t\tresponse.close();\n\t\t\t}\n\t\t} finally {\n\t\t\thttpclient.close();\n\t\t}\n\t}", "java.lang.String getAuth();", "java.lang.String getAuth();", "java.lang.String getAuth();", "private void setupGoogleSignin() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API and the\n // options specified by gso.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public AuthInfo createAuthInfo(String username, String userid, String passwd, String ha1, String realm, String domain);", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "private void configureGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n // for the requestIdToken, this is in the values.xml file that\n // is generated from your google-services.json\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n // Build a GoogleSignInClient with the options specified by gso.\n googleSignInClient = GoogleSignIn.getClient(this, gso);\n // Initialize Firebase Auth\n firebaseAuth = FirebaseAuth.getInstance();\n }", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "private String getAccessTokenUrl(String identityServer) {\n\t\treturn \"https://accounts.google.com/o/oauth2/token\";\n\t}", "private void creatRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id)) //R.string.default_web_client_id需要將系統執行一次,讓他產生\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this,gso);\n }", "private void initGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n\n // [START initialize_auth]\n // Initialize Firebase Auth\n // [END initialize_auth]\n }", "private void configureSignup() {\n\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(this.getResources().getString(R.string.web_client_id))\n .requestEmail().build();\n\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n\n mGoogleApiClient.connect();\n }", "private void configureGoogleSignIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(getApplicationContext()).enableAutoManage(this, new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(LoginActivity.this, \"Error\", Toast.LENGTH_LONG).show();\n }\n }).addApi(Auth.GOOGLE_SIGN_IN_API, gso).build();\n }", "private void requestToken(){\n APIAuth auth = new APIAuth(this.prefs.getString(\"email\", \"\"), this.prefs.getString(\"password\", \"\"), this.prefs.getString(\"fname\", \"\") + \" \" +this.prefs.getString(\"lname\", \"\"), this.prefs, null);\n auth.authenticate();\n }", "public interface ServerAuthenticatorInterface {\n public String signIn(final String email, final String password);\n}", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "@Override\n public Auth call() throws IOException {\n OkHttpClient client = new OkHttpClient();\n client.setFollowRedirects(false);\n client.setFollowSslRedirects(false);\n\n Request initRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .build();\n\n Response initResponse = client.newCall(initRequest).execute();\n String initCookie = initResponse.header(\"Set-Cookie\").split(\";\")[0];\n String initBody = initResponse.body().string();\n String authenticity_token = Jsoup.parse(initBody).body().select(\"[name=authenticity_token]\").val();\n\n // Phase 2 is to authenticate given the cookie and authentication token\n RequestBody loginBody = new FormEncodingBuilder()\n .add(\"utf8\", \"\\u2713\")\n .add(\"authenticity_token\", authenticity_token)\n .add(\"email\", login)\n .add(\"password\", password)\n .add(\"commit\", \"Login\")\n .add(\"referer\", \"https://lobste.rs/\")\n .build();\n Request loginRequest = new Request.Builder()\n .url(\"https://lobste.rs/login\")\n .header(\"Cookie\", initCookie) // We must use #header instead of #addHeader\n .post(loginBody)\n .build();\n\n Response loginResponse = client.newCall(loginRequest).execute();\n String loginCookie = loginResponse.header(\"Set-Cookie\").split(\";\")[0];\n\n // Phase 3 is to grab the actual username/email from the settings page\n Request detailsRequest = new Request.Builder()\n .url(\"https://lobste.rs/settings\")\n .header(\"Cookie\", loginCookie)\n .build();\n Response detailsResponse = client.newCall(detailsRequest).execute();\n String detailsHtml = detailsResponse.body().string();\n\n Document dom = Jsoup.parse(detailsHtml);\n String username = dom.select(\"#user_username\").val();\n String email = dom.select(\"#user_email\").val();\n\n // And then we return the result of all three phases\n return new Auth(email, username, loginCookie);\n }", "public static void main(String[] args) {\n log.info(\"Starting\");\n try {\n final GoogleMain main = new GoogleMain();\n if ( args.length > 0 ) {\n \n log.info(\"Using the following endpoint: \"+args[0]);\n main.space = SemiSpaceTokenProxy.retrieveSpace(args[0]);\n if ( args.length > 2 ) {\n ((SemiSpaceTokenProxy)main.space).setUsername(args[1]);\n ((SemiSpaceTokenProxy)main.space).setPassword(args[2]);\n }\n \n } else {\n log.info(\"Presuming we have been started as Terracotta DSO app\");\n main.space = SemiSpace.retrieveSpace();\n }\n //main.performTestQuery();\n main.startInThreadGroup();\n } catch (Exception e) {\n log.error(\"Got exception\", e);\n }\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions\n .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n signInButton = (SignInButton) findViewById(R.id.sign_in_button);\n signInButton.setSize(SignInButton.SIZE_WIDE);\n signInButton.setColorScheme(signInButton.COLOR_DARK);\n signInButton.setOnClickListener((v) -> {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(intent, SIGN_IN_CODE);\n });\n }", "private static GoogleApiClient getClient(@NonNull Context context) {\n final String serverClientId = context.getString(R.string.server_client_id);\n final GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(serverClientId)\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API\n return new GoogleApiClient.Builder(context)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "private void signInMethod() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "public String getCredentials();", "public void createClientFromCredential() {\n WebPubSubServiceAsyncClient serverClient = new WebPubSubServiceClientBuilder()\n .connectionString(\"<connection-string>\")\n .hub(\"<hub>>\")\n .buildAsyncClient();\n\n // wrap WebPubSubServiceAsyncClient.getClientAccessToken as WebPubSubClientCredential\n WebPubSubClientCredential clientCredential = new WebPubSubClientCredential(Mono.defer(() ->\n serverClient.getClientAccessToken(new GetClientAccessTokenOptions()\n .setUserId(\"<user-name>\")\n .addRole(\"webpubsub.joinLeaveGroup\")\n .addRole(\"webpubsub.sendToGroup\"))\n .map(WebPubSubClientAccessToken::getUrl)));\n\n // create WebPubSub client\n WebPubSubClient client = new WebPubSubClientBuilder()\n .credential(clientCredential)\n .buildClient();\n // END: readme-sample-createClientFromCredential\n }", "public AuthenticationService()\n\t\t\tthrows StorageInitException, AuthConfigurationException {\n\t\tquietLogger();\n\t\tfinal AuthConfig c = new KBaseAuthConfig();\n\t\tlogger = c.getLogger();\n\t\ttry {\n\t\t\tbuildApp(c);\n\t\t} catch (StorageInitException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Failed to initialize storage engine: \" + e.getMessage(),\n\t\t\t\t\te);\n\t\t\tthrow e;\n\t\t} catch (AuthConfigurationException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Invalid configuration: \" + e.getMessage(), e);\n\t\t\tthrow e;\n\t\t}\n\t}", "public interface HttpAdapter\n{\n /**\n * <P>Specify the realm that this authenticator is authenticating for. \n * \n * <P>This value should be well-known, very stable, and preferably\n * expressed in some \"canonical\" form.\n * \n * <P>As this value is a factor in authentication cryptography, any change\n * to it may invalidate passwords in the realm stored as part of digests.\n * \n */\n void setRealm(String realm);\n \n /**\n * Read authorization info from the client\n * \n * @param request The HttpServletRequest to read\n * @return An array of Credentials read from the client\n * @throws IOException\n * @throws ServletException\n */\n Credential<?>[] readAuthorization(HttpServletRequest request)\n throws IOException,ServletException;\n \n /**\n * Challenge the client to provide authorization info\n * \n * @param response The HttpServletResponse to write\n * @throws IOException\n * @throws ServletException\n */\n void writeChallenge(HttpServletResponse response)\n throws IOException,ServletException;\n}", "private void signInFeature() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n Button signInButton = (Button) findViewById(R.id.login_button);\n signInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signIn();\n }\n });\n }", "GmailClient getGmailClient(Credential credential);", "public void initOkGo() throws IOException {\r\n mSPCookieStore = new SPCookieStore(this);\r\n HttpHeaders headers = new HttpHeaders();\r\n if (new SPCookieStore(this).getAllCookie().size() != 0) {\r\n headers.put(\r\n \"Set-Cookie\",\r\n String.valueOf(mSPCookieStore.getCookie(HttpUrl.parse(BaseUrl.HTTP_Get_code_auth))));\r\n }\r\n headers.put(\"version\", \"3.0\");\r\n headers.put(\"uid\", \"6f1a8e0eb24afb7ddc829f96f9f74e9d\");\r\n\r\n OkHttpClient.Builder builder = new OkHttpClient.Builder();\r\n // log相关\r\n HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(\"OkHttp\");\r\n loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY); // log打印级别,决定了log显示的详细程度\r\n loggingInterceptor.setColorLevel(Level.INFO); // log颜色级别,决定了log在控制台显示的颜色\r\n builder.addInterceptor(loggingInterceptor); // 添加OkGo默认debug日志\r\n // 超时时间设置\r\n builder.readTimeout(10000, TimeUnit.MILLISECONDS); // 全局的读取超时时间\r\n builder.writeTimeout(10000, TimeUnit.MILLISECONDS); // 全局的写入超时时间\r\n builder.connectTimeout(10000, TimeUnit.MILLISECONDS); // 全局的连接超时时间\r\n builder.cookieJar(new CookieJarImpl(mSPCookieStore)); // 使用sp保持cookie,如果cookie不过期,则一直有效\r\n\r\n HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(getAssets().open(\"server.cer\"));\r\n builder.sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager);\r\n // //配置https的域名匹配规则,使用不当会导致https握手失败\r\n builder.hostnameVerifier(HttpsUtils.UnSafeHostnameVerifier);\r\n\r\n // 其他统一的配置\r\n OkGo.getInstance()\r\n .init(this.getApplication()) // 必须调用初始化\r\n .setOkHttpClient(builder.build()) // 必须设置OkHttpClient\r\n .setCacheMode(CacheMode.NO_CACHE) // 全局统一缓存模式,默认不使用缓存,可以不传\r\n .setCacheTime(CacheEntity.CACHE_NEVER_EXPIRE) // 全局统一缓存时间,默认永不过期,可以不传\r\n .setRetryCount(3) // 全局统一超时重连次数,默认为三次,那么最差的情况会请求4次(一次原始请求,三次重连请求),不需要可以设置为0\r\n .addCommonHeaders(headers); // 全局公共头\r\n }", "private static String getCloudAuth(String accessToken) {\n\t\ttry {\n\t\t\tURL urlResource = new URL(\"https://myapi.pathomation.com/api/v1/authenticate\");\n\t\t\tURLConnection conn = urlResource.openConnection();\n\t\t\tconn.setRequestProperty( \"Authorization\", \"Bearer \" + accessToken);\n\t\t\tconn.setUseCaches( false );\n\t\t\treturn getResponseString(conn);\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}", "private static PlusDomains authenticate() throws GeneralSecurityException, IOException {\n\n System.out.println(String.format(\"Authenticate the domain for %s\", USER_EMAIL));\n\n HttpTransport httpTransport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n // Setting the sub field with USER_EMAIL allows you to make API calls using the special keyword \n // 'me' in place of a user id for that user.\n GoogleCredential credential = new GoogleCredential.Builder()\n .setTransport(httpTransport)\n .setJsonFactory(jsonFactory)\n .setServiceAccountId(SERVICE_ACCOUNT_EMAIL)\n .setServiceAccountScopes(SCOPE)\n .setServiceAccountUser(USER_EMAIL)\n .setServiceAccountPrivateKeyFromP12File(\n new java.io.File(SERVICE_ACCOUNT_PKCS12_FILE_PATH))\n .build();\n\n // Create and return the Plus service object\n PlusDomains service = new PlusDomains.Builder(httpTransport, jsonFactory, credential).build();\n return service;\n }", "public static void authenticate() {\n\n Stage window = new Stage();\n\n final String url = OAUTH_URL + getQuery();\n\n BorderPane borderPane = new BorderPane();\n WebView browser = new WebView();\n WebEngine webEngine = browser.getEngine();\n\n webEngine.load(url);\n borderPane.setCenter(browser);\n\n webEngine.setOnStatusChanged(event -> {\n if (event.getSource() instanceof WebEngine) {\n WebEngine we = (WebEngine) event.getSource();\n String location = we.getLocation();\n // If we are redirected to REDIRECT_URL we get contents, and send it to verify() to get access token\n if (location.startsWith(REDIRECT_URL) && location.contains(\"code\") && AUTH_OBECT == null) try {\n URL url1 = new URL(location);\n String[] params = url1.getQuery().split(\"&\");\n Map<String, String> map = new HashMap<>();\n for (String param : params) {\n String name = param.split(\"=\")[0];\n String value = param.split(\"=\")[1];\n map.put(name, value);\n }\n String code = map.get(\"code\");\n // We have code so we continue the flow\n verify(code);\n window.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n });\n\n // create scene\n window.setTitle(\"Authentication\");\n Scene scene = new Scene(borderPane, 750, 500);\n window.setScene(scene);\n window.showAndWait();\n }", "GoogleAuthClient(ManagedChannel channel, CallCredentials callCredentials) {\n this.channel = channel;\n blockingStub = PublisherGrpc.newBlockingStub(channel).withCallCredentials(callCredentials);\n }", "public interface AuthManager {\n\n void signInGoogle(GoogleSignInAccount acct, Subscriber<String> signInSubscriber, CreateUser createUser);\n\n void signOut(Subscriber<String> signOutSubscriber);\n\n boolean isSignedIn();\n\n String getCurrentUserId();\n\n String getCurrentUserEmail();\n\n Uri getPhotoUrl();\n}", "private void startGoogleGamesSignIn () {\n\t\tfinal GPPSignIn s = GPPSignIn.sharedInstance();\n\t\tGPGManager m = GPGManager.sharedInstance();\n\n\t\tgamesAuthBlock = new GPGReAuthenticationBlock() {\n\t\t\t@Override\n\t\t\tpublic void invoke (boolean requiresKeychainWipe, NSError error) {\n\t\t\t\t// If you hit this, auth has failed and you need to authenticate.\n\t\t\t\t// Most likely you can refresh behind the scenes\n\t\t\t\tif (requiresKeychainWipe) {\n\t\t\t\t\ts.signOut();\n\t\t\t\t}\n\t\t\t\ts.authenticate();\n\t\t\t}\n\t\t};\n\n\t\t// pass the GPPSignIn to the GPGManager.\n\t\tm.signIn(s, gamesAuthBlock);\n\t}", "private AppAuth() {\n }", "public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}", "private static HttpResponse sendAuthenticated(HttpUriRequest request) throws Exception {\n if (accessToken == null) {\n throw new Exception(\"GitLab access token not set\");\n }\n request.addHeader(\"PRIVATE-TOKEN\", accessToken);\n return createClient().execute(request);\n }", "UserToken login(String username, String password) throws WorkspaceException;", "@Override\n\tpublic void setup(Context context) {\n\t\tlog.debug(\"XXX: try callback to enable authentication\");\n\n final URI uri = context.getPropertyAsURI(\"loginURL\");\n if (uri == null) {\n\t\t\tthrow new IllegalArgumentException(\"loginURL property not defined\");\n }\n\n String loginEmail = context.getString(\"loginEmail\");\n String loginPassword = context.getString(\"loginPassword\");\n if (StringUtils.isBlank(loginEmail) || StringUtils.isBlank(loginPassword)) {\n\t\t\tthrow new IllegalArgumentException(\"loginEmail and loginPassword properties are empty or missing\");\n }\n\n\t\tlog.debug(\"POST auth URL: {}\", uri);\n\t\tHttpPost httppost = new HttpPost(uri);\n\t\thttppost.setHeader(\"Cache-Control\", \"no-cache\");\n\t\tList<NameValuePair> formParams = new ArrayList<NameValuePair>(2);\n\t\tformParams.add(new BasicNameValuePair(\"email\", loginEmail));\n\t\tformParams.add(new BasicNameValuePair(\"id\", loginPassword));\n\t\tfinal HttpResponse response;\n\t\tHttpClient client = null;\n\t\tHttpContext httpContext = localContext;\n\t\ttry {\n\t\t\thttppost.setEntity(new UrlEncodedFormEntity(formParams));\n\t\t\tclient = context.getHttpClient();\n\t\t\tif (httpContext == null) {\n\t\t\t\t// Create a local instance of cookie store\n\t\t\t\tCookieStore cookieStore = new BasicCookieStore();\n\t\t\t\t// Create local HTTP context\n\t\t\t\thttpContext = new BasicHttpContext();\n\t\t\t\t// Bind custom cookie store to the local context\n\t\t\t\thttpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);\n\t\t\t}\n\t\t\tresponse = client.execute(httppost, httpContext);\n\t\t\t/*\n\t\t\t <form method='post' action='/auth/developer/callback' noValidate='noValidate'>\n\t\t\t <label for='name'>Name:</label>\n\t\t\t <input type='text' id='name' name='name'/>\n\t\t\t <label for='email'>Email:</label>\n\t\t\t <input type='text' id='email' name='email'/>\n\t\t\t <button type='submit'>Sign In</button> </form>\n\t\t\t */\n\t\t\tif (log.isDebugEnabled() || !checkAuth(response)) {\n ClientHelper.dumpResponse(httppost, response, true);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tlog.error(\"\", e);\n\t\t\treturn;\n\t\t} finally {\n\t\t\tif (client != null)\n\t\t\t\tclient.getConnectionManager().shutdown();\n\t\t}\n\n\t\tfinal StatusLine statusLine = response.getStatusLine();\n\t\tif (statusLine != null && statusLine.getStatusCode() == 302) {\n\t\t\t// HTTP/1.1 302 Moved Temporarily\n\t\t\tHeader cookie = response.getFirstHeader(\"Set-Cookie\");\n\t\t\tif (cookie != null) {\n\t\t\t\tlog.debug(\"XXX: set local context\");\n\t\t\t\tthis.localContext = httpContext;\n\t\t\t}\n\t\t\telse log.error(\"Expected Set-Cookie header in response\");\n\t\t\tif (log.isDebugEnabled()) {\n\t\t\t\tHeader location = response.getFirstHeader(\"Location\");\n\t\t\t\tif (location != null) {\n\t\t\t\t\tcheckAuthentication(context, location.getValue());\n\t\t\t\t\t//log.debug(\"XXX: set local context\");\n\t\t\t\t\t//this.localContext = httpContext;\n\t\t\t\t}\n\t\t\t\telse log.error(\"Expected Location header in response\");\n\t\t\t}\n\t\t} else {\n\t\t\tlog.error(\"Expected 302 status code in response\");\n\t\t}\n\t}", "private AuthenticationService() {}", "private void authenticate(String user, String pass) {\n }", "@Override\n protected void onStart(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n super.onStart();\n }", "@PostConstruct\n public void init() {\n rest.put(\"http://authenticationServer:8080/bot\", info);\n AuthServerChecker checker = new AuthServerChecker(name);\n checker.start();\n }", "public static void main(String... args) {\n\n OAuthRequest oathReq = new OAuthRequest();\n Gson gson = new Gson();\n String hostname = get(\"ne.url.hostname\");\n String urlOAuth2 = hostname + get(\"ne.url.auth\");\n\n try {\n // 3. Set the generated Client ID, Secret generated in https://developer.equinix.com (Your App).\n // 4. Set the grant type to \"password' or 'client_credentials' if you want API Gateway to generate the Access token.\n oathReq.clientId(get(\"ne.client.access.client.id\"));\n oathReq.clientSecret(get(\"ne.client.access.client.secret\"));\n oathReq.grantType(get(\"ne.client.access.client.granttype\"));\n oathReq.userName(get(\"ne.client.access.client.username\"));\n String password = new String(Base64.getDecoder().decode(get(\"ne.client.access.client.base64.password\")), \"UTF-8\");\n oathReq.userPassword(password);\n\n HttpResponse<String> response = Unirest.post(urlOAuth2)\n .header(\"Content-Type\", get(\"ne.client.http.body.contenttype\"))\n .body(gson.toJson(oathReq)).asString();\n OAuthResponse oauthResponse = gson.fromJson(response.getBody(), OAuthResponse.class);\n\n\n System.out.println(\"OAuth2 Access Token: \" + oauthResponse.getAccessToken());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "boolean authorize(\n String secret,\n int verificationCode,\n int window)\n throws GoogleAuthenticatorException;", "public interface IAuthService {\n AuthInfo getAuthentication(String username, String password);\n}", "public static void main(String[] args) {\n\t\tWebDriverManager.chromedriver().setup();\n\t\tWebDriver driver= new ChromeDriver();\n\t\t//driver.get(\"https://the-internet.herokuapp.com/\"); \n\t\tdriver.get(\"https://admin:admin@the-internet.herokuapp.com/basic_auth\"); \n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); //Implicit wait \n\t\n\t\t\n\t\t\n\t\tdriver.get(\"https://\"+username+\":\"+password+\"@the-internet.herokuapp.com/basic_auth\"); \n\t\t\n\t}", "private void authorize(){\n\t\t\n\t\tURL authURL = null;\n\t\tURL homeURL = null;\n\t\tURLConnection homeCon = null;\n\t\t\n\t\tString loginPage = GG.GG_LOGIN+\"?ACCOUNT=\"+GG.GG_UID\n\t\t\t+\"&PASSWORD=\"+GG.GG_PASS;\n\t\tString cookieString = \"\";\n\t\tString cookieString1 = \"\";\n\t\t\n\t\ttry{\n\t\t\thomeURL = new URL(GG.GG_HOME);\n\t\t\thomeCon = homeURL.openConnection();\n\t\t\t\n\t\t\t// Look At the headers\n\t\t\tMap headerMap = homeCon.getHeaderFields();\n\t\t\t\n\t\t\t// Look for the Cookie\n\t\t\tif(headerMap.containsKey(\"Set-Cookie\")){\n\t\t\t\t\n\t\t\t\t// this gets the exact value of the header\n\t\t\t\t// otherwise gets some formatted string\n\t\t\t\tcookieString = homeCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie1: \"+cookieString);\n\t\t\t\t\n\t\t\t\tauthURL = new URL(loginPage);\n\t\t\t\tHttpURLConnection.setFollowRedirects(false);\n\t\t\t\tHttpURLConnection loginCon = (HttpURLConnection) authURL.openConnection();\n\t\t\t\t\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tloginCon.setAllowUserInteraction(true);\n\t\t\t\tloginCon.setUseCaches(false);\n\t\t\t\tloginCon.setDoOutput(true);\n\t\t\t\tloginCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tloginCon.connect();\n\t\t\t\t\n\t\t\t\t// Look At the headers\n\t\t\t\tMap headerMap1 = loginCon.getHeaderFields();\n\t\t\t\t\n\t\t\t\tcookieString1 = loginCon.getHeaderField(\"Set-Cookie\");\n\t\t\t\t//log.finest(\"cookie2: \"+cookieString1);\n\t\t\t\tif(!Pattern.matches(\".*\\\\.\"+GG.GG_UID+\"\\\\.\\\\d+.*\", cookieString1)){\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tString location = loginCon.getHeaderField(\"Location\");\n\t\t\t\tURL gotURL = new URL(location);\n\t\t\t\tHttpURLConnection gotCon = (HttpURLConnection) gotURL.openConnection();\n\t\t\t\t// doOutput must be set before connecting\n\t\t\t\tgotCon.setAllowUserInteraction(true);\n\t\t\t\tgotCon.setUseCaches(false);\n\t\t\t\tgotCon.setDoOutput(true);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString);\n\t\t\t\tgotCon.setRequestProperty(\"Cookie\", cookieString1);\n\t\t\t\t\n\t\t\t\tgotCon.connect();\n\t\t\t\t\n\t\t\t\t// Got the Cookies\n\t\t\t\tcookies[0] = cookieString;\n\t\t\t\tcookies[1] = cookieString1;\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tlog.info(\"Unable to find the Cookie\");\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t\tauthorized = true;\n\t}", "public String signIn(String username, String password);", "private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}", "public static void initAuthentication(AuthenticationOptions options)\n {\n logger.info(\"Registering custom HTTPClient authentication with Solr\");\n SpnegoAuthenticatorFactory authenticatorFactory = \n new SpnegoAuthenticatorFactory.Builder()\n .keytab(options.keytab)\n .principal(options.principal)\n .sslContext(options.ctx)\n .hostnameVerifier(options.verifier)\n .build();\n HttpRequestAuthenticatorProvider.registerFactory(authenticatorFactory);\n }", "private void configureGoogleSignIn() {\n // Configure sign-in to request the user's ID, email address, and basic\n // profile. ID and basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n\n // Check for existing Google Sign In account, if the user is already signed in\n // the GoogleSignInAccount will be non-null.\n// GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n\n // Set the dimensions of the sign-in button.\n// googleSignInButton = findViewById(R.id.sign_in_button);\n// googleSignInButton.setSize(SignInButton.SIZE_STANDARD);\n// googleSignInButton.setOnClickListener(this);\n\n btn_google_login = navigationView.getHeaderView(1).findViewById(R.id.btn_google_login);\n btn_google_login.setOnClickListener(this);\n }", "Pokemon.RequestEnvelop.AuthInfo.JWT getToken();", "abstract public String buildAuthRequest(String userId, String authCallback) throws IOException;", "public AuthCredentials(String scheme,String name,String password)\n {\n this.scheme = scheme;\n this.name = name;\n this.password = password;\n }", "String getToken(String scope, String username, String password) throws AuthorizationException;", "public interface IGoogleServices {\n void signIn();\n void signOut();\n void changeUser();\n boolean isConnected();\n boolean isConnecting();\n}", "Pokemon.RequestEnvelop.AuthInfo getAuth();", "public static interface GoogleAuthenticationListener {\n\n /**\n * A non recoverable error happened while attempting to acquire an OAuth token.\n * @param throwable the unrecoverable error.\n */\n void onAuthenticationError(Throwable throwable);\n\n /**\n * An OAuth token was successfully acquired.\n *\n * @param token the acquired token.\n */\n void onAuthenticationSucceeded(String token);\n\n /**\n * An attempt to re-authenticate might succeed.\n */\n void onRetryAuthentication();\n }", "@Override\n public boolean isClientAuthEnabled() {\n return true;\n }", "public Authenticator(String authUrl, String clientId, String clientSecret)\r\n { \r\n RestTemplate rt = new RestTemplate();\r\n \r\n Map<String, String> vars = new HashMap<String, String>();\r\n\r\n vars.put(\"username\", clientId);\r\n vars.put(\"password\", clientSecret);\r\n this.user = rt.postForObject(authUrl, vars, UserInfo.class);\r\n \r\n }", "private HttpRequestInitializer getCredentials(final NetHttpTransport HTTP_TRANSPORT, TCC tcc) throws IOException {\n\t\tlogger.debug(\"Obtendo credenciais...\");\n\t\tString credentialsPath = CREDENTIALS_FILE_PATH + tcc.getAluno().getCurso().getCodigoCurso() + \".json\";\n\t\tlogger.debug(\"Caminho do arquivo de credenciais: \" + credentialsPath);\n\t\tGoogleCredentials credentials = GoogleCredentials.fromStream(new FileInputStream(credentialsPath));\n\t\tcredentials = credentials.createScoped(SCOPES);\n\t\tcredentials.refreshIfExpired();\n\t\tHttpRequestInitializer requestInitializer = new HttpCredentialsAdapter(credentials);\n\t\treturn requestInitializer;\n\t}", "private static Object doAuth(Request req, Response res) {\n \n HashMap<String, String> response = new HashMap<>();\n\t\t \n String email = Jsoup.parse(req.queryParams(\"email\")).text();\n\t\t String password = Jsoup.parse(req.queryParams(\"password\")).text();\n\t\t\n res.type(Path.Web.JSON_TYPE);\n \t\t\n\t\t\n\t\tif(email != null && !email.isEmpty() && password != null && !password.isEmpty() ) {\n \n authenticate = new Authenticate(password);\n\t\t\t//note that the server obj has been created during call to login()\n\t\t\tString M2 = authenticate.getM2(server);\n\t\t\t\n if(M2 != null || !M2.isEmpty()) {\n \n \n\t\t\tSession session = req.session(true);\n\t\t\tsession.maxInactiveInterval(Path.Web.SESSION_TIMEOUT);\n\t\t\tUser user = UserController.getUserByEmail(email);\n\t\t\tsession.attribute(Path.Web.ATTR_USER_NAME, user.getUsername());\n session.attribute(Path.Web.ATTR_USER_ID, user.getId().toString()); //saves the id as String\n\t\t\tsession.attribute(Path.Web.AUTH_STATUS, authenticate.authenticated);\n\t\t\tsession.attribute(Path.Web.ATTR_EMAIL, user.getEmail());\n logger.info(user.toString() + \" Has Logged In Successfully\");\n \n response.put(\"M2\", M2);\n response.put(\"code\", \"200\");\n response.put(\"status\", \"success\");\n response.put(\"target\", Path.Web.DASHBOARD);\n \n String respjson = gson.toJson(response);\n logger.info(\"Final response sent By doAuth to client = \" + respjson);\n res.status(200);\n return respjson;\n }\n\t\t\t\t\n\t\t} \n \n res.status(401);\n response.put(\"code\", \"401\");\n response.put(\"status\", \"Error! Invalid Login Credentials\");\n \n return gson.toJson(response);\n }", "public static void main(String[] args) {\n\t\t\n\t\tString code=\"4%2F1QFgMB-IBwhzNScNudUsvg4wEwJPFpHUahVAC5hwahXTHpg26ZFeTtC5bl69P55H6_jVbxE8tuD6voRw5d30ZB8\";\n\t\t\n\t\tString authentication = given().log().all().urlEncodingEnabled(false)\n\t\t.queryParam(\"redirect_uri\", \"https://rahulshettyacademy.com/getCourse.php\")\n\t\t.queryParam(\"code\", code)\n\t\t.queryParam(\"client_id\", \"692183103107-p0m7ent2hk7suguv4vq22hjcfhcr43pj.apps.googleusercontent.com\")\n\t\t.queryParam(\"client_secret\", \"erZOWM9g3UtwNRj340YYaK_W\")\n\t\t.queryParam(\"grant_type\", \"authorization_code\")\n\t\t.queryParams(\"state\", \"verifyfjdss\")\n\t\t.queryParam(\"scope\", \"https://www.googleapis.com/auth/userinfo.email\")\n\t\t.when().log().all()\n\t\t.post(\"https://www.googleapis.com/oauth2/v4/token\")\n\t\t.asString();\n\t\t\n\t\t//System.out.println(authentication);\n\t\t\n\t\tJsonPath jP = new JsonPath(authentication);\n\t\tString accessToken = jP.get(\"access_token\");\n\t\t\n\t\tGetCourse gc = given()\n\t\t.queryParam(\"access_token\", accessToken)\n\t\t.expect().defaultParser(Parser.JSON)\n\t\t.when()\n .get(\"https://rahulshettyacademy.com/getCourse.php\")\n .as(GetCourse.class);\n\t\tSystem.out.println(\"--------------**************--------------\");\n\t\tSystem.out.println(\"Instructor name\"+gc.getInstructor());\n\t\t\n\t\tList<Api> api =gc.getCourses().getApi();\n\t\tfor(int i=0; i<api.size();i++) {\n\t\t\tif(api.get(i).getCourseTitle().equalsIgnoreCase(\"SoapUI Webservices testing\")) {\n\t\t\t\tSystem.out.println(\"Price of course \"+api.get(i).getPrice());\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "AuthenticationToken authenticate(String username, CharSequence password) throws Exception;", "public FuzzerAuthString(){\r\n\t\tusername = \"\";\r\n\t\tpassword = \"\";\r\n\t}", "private static Credential authorize(List<String> scopes) throws Exception {\r\n\r\n\t // Load client secrets.\r\n\t GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(\r\n\t JSON_FACTORY, UploadVideo.class.getResourceAsStream(\"/client_secrets.json\"));\r\n\r\n\t // Checks that the defaults have been replaced (Default = \"Enter X here\").\r\n\t if (clientSecrets.getDetails().getClientId().startsWith(\"Enter\")\r\n\t || clientSecrets.getDetails().getClientSecret().startsWith(\"Enter \")) {\r\n\t System.out.println(\r\n\t \"Enter Client ID and Secret from https://code.google.com/apis/console/?api=youtube\"\r\n\t + \"into youtube-cmdline-uploadvideo-sample/src/main/resources/client_secrets.json\");\r\n\t System.exit(1);\r\n\t }\r\n\r\n\t // Set up file credential store.\r\n\t FileCredentialStore credentialStore = new FileCredentialStore(\r\n\t new File(System.getProperty(\"user.home\"), \".credentials/youtube-api-uploadvideo.json\"),\r\n\t JSON_FACTORY);\r\n\r\n\t // Set up authorization code flow.\r\n\t GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n\t HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, scopes).setCredentialStore(credentialStore)\r\n\t .build();\r\n\r\n\t // Build the local server and bind it to port 9000\r\n\t LocalServerReceiver localReceiver = new LocalServerReceiver.Builder().setPort(8080).build();\r\n\r\n\t // Authorize.\r\n\t return new AuthorizationCodeInstalledApp(flow, localReceiver).authorize(\"user\");\r\n\t }", "@Override\n public void clientAuthenticate()\n throws HubIntegrationException {\n try {\n final ArrayList<String> segments = new ArrayList<>();\n segments.add(\"j_spring_security_check\");\n final HttpUrl httpUrl = createHttpUrl(segments, null);\n\n final Map<String, String> content = new HashMap<>();\n final String username = hubServerConfig.getGlobalCredentials().getUsername();\n String password = hubServerConfig.getGlobalCredentials().getEncryptedPassword();\n if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(password)) {\n try {\n password = hubServerConfig.getGlobalCredentials().getDecryptedPassword();\n\n content.put(\"j_username\", username);\n content.put(\"j_password\", password);\n final Request request = createPostRequest(httpUrl, createEncodedRequestBody(content));\n Response response = null;\n try {\n logRequestHeaders(request);\n response = getClient().newCall(request).execute();\n logResponseHeaders(response);\n if (!response.isSuccessful()) {\n throw new HubIntegrationException(response.message());\n }\n } finally {\n if (response != null) {\n response.close();\n }\n }\n } catch (IllegalArgumentException | EncryptionException e) {\n throw new HubIntegrationException(e.getMessage(), e);\n }\n }\n } catch (final IOException e) {\n throw new HubIntegrationException(e.getMessage(), e);\n }\n }", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public void loginAsUser() {\n vinyardApp.navigateToUrl(\"http://localhost:8080\");\n vinyardApp.fillUsername(\"user\");\n vinyardApp.fillPassord(\"123\");\n vinyardApp.clickSubmitButton();\n }", "public AuthClient(String protocol, String host, Integer port, String context) {\n\t\tthis.protocol = protocol;\n\t\tthis.host = host;\n\t\tthis.port = port;\n\t\tthis.context = context;\n\t}", "@Override\n public void authenticate() throws IOException, BadAccessIdOrKeyException {\n try{\n HttpPost post = new HttpPost(Constants.FRGXAPI_TOKEN);\n List<NameValuePair> params = new ArrayList<>();\n params.add(new BasicNameValuePair(\"grant_type\", \"apiAccessKey\"));\n params.add(new BasicNameValuePair(\"apiAccessId\", accessId));\n params.add(new BasicNameValuePair(\"apiAccessKey\", accessKey));\n post.setEntity(new UrlEncodedFormEntity(params, \"UTF-8\"));\n\n HttpResponse response = client.execute(post);\n String a = response.getStatusLine().toString();\n\n if(a.equals(\"HTTP/1.1 400 Bad Request\")){\n throw (new BadAccessIdOrKeyException(\"Bad Access Id Or Key\"));\n }\n HttpEntity entity = response.getEntity();\n String responseString = EntityUtils.toString(response.getEntity());\n\n JsonParser jsonParser = new JsonParser();\n JsonObject jo = (JsonObject) jsonParser.parse(responseString);\n if(jo.get(\"access_token\") == null){\n throw new NullResponseException(\"The Access Token you get is null.\");\n }\n String accessToken = jo.get(\"access_token\").getAsString();\n List<Header> headers = new ArrayList<>();\n headers.add(new BasicHeader(HttpHeaders.CONTENT_TYPE, \"application/json\"));\n headers.add(new BasicHeader(\"Authorization\", \"Bearer \" + accessToken));\n\n client = HttpClients.custom().setDefaultHeaders(headers).build();\n } catch (NullResponseException e) {\n System.out.println(e.getMsg());\n }\n }", "interface PodAuthService {\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> authenticate(\n @Field(\"grant_type\") String grantType,\n @Field(\"username\") String username,\n @Field(\"password\") String password,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret\n );\n\n @FormUrlEncoded\n @POST(\"/oauth/token\")\n Observable<Auth> refreshToken(\n @Field(\"grant_type\") String grantType,\n @Field(\"client_id\") String clientId,\n @Field(\"client_secret\") String clientSecret,\n @Field(\"refresh_token\") String refreshToken\n );\n}", "private boolean authenticate (HttpRequest request, HttpResponse response) throws UnsupportedEncodingException\n\t{\n\t\tString[] requestSplit=request.getPath().split(\"/\",3);\n\t\tif(requestSplit.length<2)\n\t\t\treturn false;\n\t\tString serviceName=requestSplit[1];\n\t\tfinal int BASIC_PREFIX_LENGTH=\"BASIC \".length();\n\t\tString userPass=\"\";\n\t\tString username=\"\";\n\t\tString password=\"\";\n\t\t\n\t\t//Check for authentication information in header\n\t\tif(request.hasHeaderField(AUTHENTICATION_FIELD)\n\t\t\t\t&&(request.getHeaderField(AUTHENTICATION_FIELD).length()>BASIC_PREFIX_LENGTH))\n\t\t{\n\t\t\tuserPass=request.getHeaderField(AUTHENTICATION_FIELD).substring(BASIC_PREFIX_LENGTH);\n\t\t\tuserPass=new String(Base64.decode(userPass), \"UTF-8\");\n\t\t\tint separatorPos=userPass.indexOf(':');\n\t\t\t//get username and password\n\t\t\tusername=userPass.substring(0,separatorPos);\n\t\t\tpassword=userPass.substring(separatorPos+1);\n\t\t\t\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\t\n\t\t\t\tlong userId;\n\t\t\t\tAgent userAgent;\n\t\t\t\t\n\t\t\t\tif ( username.matches (\"-?[0-9].*\") ) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tuserId = Long.valueOf(username);\n\t\t\t\t\t} catch ( NumberFormatException e ) {\n\t\t\t\t\t\tthrow new L2pSecurityException (\"The given user does not contain a valid agent id!\");\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tuserId = l2pNode.getAgentIdForLogin(username);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tuserAgent = l2pNode.getAgent(userId);\n\t\t\t\t\n\t\t\t\tif ( ! (userAgent instanceof PassphraseAgent ))\n\t\t\t\t\tthrow new L2pSecurityException (\"Agent is not passphrase protected!\");\n\t\t\t\t((PassphraseAgent)userAgent).unlockPrivateKey(password);\n\t\t\t\t_currentUserId=userId;\n\t\t\t\t\n\t\t\t\tif(!_userSessions.containsKey(userId))//if user not registered\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tMediator mediator = l2pNode.getOrRegisterLocalMediator(userAgent);\n\t\t\t\t\t_userSessions.put(userId, new UserSession(mediator));\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t_userSessions.get(userId).updateServiceTime(serviceName,new Date().getTime());//update last access time for service\n\t\t\t\t\n\t\t\t\tconnector.logMessage(\"Login: \"+username);\n\t\t\t\tconnector.logMessage(\"Sessions: \"+Integer.toString(_userSessions.size()));\n\t\t\t\t\n\t\t\t\treturn true;\n\t\t\t\t\n\t\t\t}catch (AgentNotKnownException e) {\n\t\t\t\tsendUnauthorizedResponse(response, null, request.getRemoteAddress() + \": login denied for user \" + username);\n\t\t\t} catch (L2pSecurityException e) {\n\t\t\t\tsendUnauthorizedResponse( response, null, request.getRemoteAddress() + \": unauth access - prob. login problems\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t\n\t\t\t\tsendInternalErrorResponse(\n\t\t\t\t\t\tresponse, \n\t\t\t\t\t\t\"The server was unable to process your request because of an internal exception!\", \n\t\t\t\t\t\t\"Exception in processing create session request: \" + e);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tresponse.setStatus ( HttpResponse.STATUS_BAD_REQUEST );\n\t\t\tresponse.setContentType( \"text/plain\" );\n\t\t\tresponse.print ( \"No authentication provided!\" );\n\t\t\tconnector.logError( \"No authentication provided!\" );\n\t\t}\n\t\treturn false;\n\t}", "@TargetApi(Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n @Override\n public void authenticate() throws CloudStorageAuthenticationError {\n final AccountManager am = AccountManager.get(context);\n\n if (am == null) {\n System.err.println(\"Could not retrieve Google Drive Account manager\");\n throw new CloudStorageAuthenticationError();\n }\n\n //find the account by name\n Account acf = null;\n for (Account acc : am.getAccounts()) {\n if (acc.name.equals(accountName)) {\n acf = acc;\n break;\n }\n }\n final Account account = acf;\n\n if (acf == null) {\n System.err.println(\"No Google account \" + accountName + \" found\");\n throw new CloudStorageAuthenticationError();\n } else {\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n try {\n final String token = am.blockingGetAuthToken(account, //get the first available google account\n \"oauth2:\" + DriveScopes.DRIVE, true);\n\n HttpTransport httpTransport = new NetHttpTransport();\n JacksonFactory jsonFactory = new JacksonFactory();\n Drive.Builder b = new Drive.Builder(httpTransport, jsonFactory, null);\n b.setDriveRequestInitializer(new DriveRequestInitializer() {\n @Override\n public void initializeDriveRequest(DriveRequest request) throws IOException {\n DriveRequest driveRequest = request;\n driveRequest.setPrettyPrint(true);\n driveRequest.setKey(APP_KEY);\n driveRequest.setOauthToken(token);\n }\n });\n\n drive = b.build();\n } catch (OperationCanceledException e) {\n drive = null;\n System.err.println(\"Could not complete operation\");\n } catch (IOException e) {\n drive = null;\n System.err.println(\"I/O exception\");\n } catch (AuthenticatorException e) {\n drive = null;\n System.err.println(\"Could not authenticate\");\n }\n\n synchronized (authenticationComplete) {\n authenticationComplete.notify();\n }\n }\n });\n //start the authentication thread\n thread.start();\n\n //wait for the authentication to complete\n synchronized (authenticationComplete) {\n try {\n authenticationComplete.wait();\n } catch (InterruptedException e) {\n }\n }\n\n }\n\n }", "public ClientCredentials() {\n }", "public GoogleAPI() {\n try {\n ytService = getService();\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n }\n DEVELOPER_KEY = DEVELOPER_KEY_Junwei;\n }", "boolean authenticate(String userName, String password);", "@Test\r\n\tpublic void authImplicit() {\n\t\t Storage storage = StorageOptions.getDefaultInstance().getService();\r\n\r\n\t\t logger.info(\"Buckets loading...\");\r\n\t\t Page<Bucket> buckets = storage.list();\r\n\t\t logger.info(String.format(\"Buckets found:'%s'\", buckets.getValues().toString()));\r\n\t\t assertNotNull(storage.getServiceAccount(\"bulorosinterview\"));\r\n\t\t}", "public void authentication() throws AuthorizationException {\n\t\tclient = new RennClient(API_KEY, SECRET_KEY);\n\t\tclient.authorizeWithClientCredentials();\n\t}", "protected EscidocAuthenticationProvider() {\r\n }", "@Override\n public void fetchFromSource(){\n System.out.println(\"pull the user credential from gmail\");\n }", "private DefaultHttpClient createHttpClient()\n throws IOException\n {\n XCapCredentialsProvider credentialsProvider\n = new XCapCredentialsProvider();\n credentialsProvider.setCredentials(\n AuthScope.ANY,\n new UsernamePasswordCredentials(getUserName(), password));\n\n return HttpUtils.getHttpClient(\n null , null, uri.getHost(), credentialsProvider);\n }", "private void getGredentialsFromMemoryAndSetUser()\n\t{\n\t SharedPreferences settings = getSharedPreferences(LOGIN_CREDENTIALS, 0);\n\t String username = settings.getString(\"username\", null);\n\t String password = settings.getString(\"password\", null);\n\t \n\t //Set credentials to CouponsManager.\n\t CouponsManager.getInstance().setUser(new User(username, password));\n\t \n\t}", "private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }", "public DefaultCredentialsProvider() {\n // nothing\n }", "@ClassVersion(\"$Id: Authenticator.java 16154 2012-07-14 16:34:05Z colin $\")\r\npublic interface Authenticator\r\n{\r\n\r\n /**\r\n * Checks whether the given credentials can be used to initiate a\r\n * new session on behalf of the client with the given context.\r\n *\r\n * @param context The context.\r\n * @param user The user name.\r\n * @param password The password.\r\n *\r\n * @return True if the given credentials are acceptable.\r\n *\r\n * @throws I18NException Thrown if the authenticator encounters an\r\n * error while checking the credentials.\r\n */\r\n\r\n boolean shouldAllow\r\n (StatelessClientContext context,\r\n String user,\r\n char[] password)\r\n throws I18NException;\r\n}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }" ]
[ "0.76693153", "0.7117845", "0.6558951", "0.6188289", "0.61369467", "0.6045887", "0.60360867", "0.6018315", "0.5999249", "0.5995626", "0.5970663", "0.596264", "0.596264", "0.596264", "0.5961765", "0.59436464", "0.59347373", "0.5927073", "0.5925828", "0.59239876", "0.5916661", "0.5894381", "0.5880259", "0.5844195", "0.58278644", "0.58186936", "0.57763636", "0.5753085", "0.57502496", "0.5725032", "0.57234186", "0.5716991", "0.5681381", "0.5651526", "0.56501323", "0.5642572", "0.5637686", "0.56313264", "0.5627574", "0.56130123", "0.56114477", "0.559859", "0.5596671", "0.5588936", "0.5587894", "0.55874604", "0.5583434", "0.5573819", "0.557334", "0.5562333", "0.5560536", "0.5553388", "0.554445", "0.55233735", "0.55048674", "0.55015224", "0.54995286", "0.5489883", "0.54833406", "0.5469238", "0.54672694", "0.5462788", "0.54601115", "0.5457688", "0.54565877", "0.54490924", "0.54354227", "0.5428834", "0.542753", "0.54251647", "0.5425012", "0.5409192", "0.5385966", "0.5381103", "0.5374754", "0.53743577", "0.5373715", "0.5371686", "0.53709084", "0.53667516", "0.5366428", "0.53621525", "0.536086", "0.53510123", "0.5348322", "0.53458834", "0.5345441", "0.5343484", "0.53415626", "0.5340019", "0.5339552", "0.53323656", "0.5324955", "0.53176653", "0.53144425", "0.53116006", "0.5309322", "0.5297473", "0.52881414", "0.52770764" ]
0.5488295
58
Get the code automatically
public void setAuto(){ this.codeAuto = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "Code getCode();", "java.lang.String getCode();", "java.lang.String getCode();", "public String getCode();", "public String getCode();", "public abstract String getFullCode();", "public String getCode(){\n\t\treturn new SmartAPIModel().getCpSourceCode(cp.getLocalName());\n\t}", "public static void generateCode()\n {\n \n }", "public String getCode() {\n\t\treturn codeText.getText().toString();\n\t}", "public String CodeInterpreter() {\n\n\t\tString timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(Calendar.getInstance().getTime());\n\t\treturn \"DA\" + \"_\" + timeStamp;\n\t}", "int getCode();", "int getCode();", "int getCode();", "public String getCode() {\t\t\t\t\t\t\t\t\treturn code;\t\t\t\t\t\t\t}", "String getAdditionalCode();", "String getAdditionalCode();", "String getAdditionalCode();", "public String getCode() { \n\t\treturn getCodeElement().getValue();\n\t}", "public String getCode(){\n\t\treturn code;\n\t}", "public String getCompiler();", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }", "public int getCode();", "public String getCode () {\r\n\t\treturn code;\r\n\t}", "@Override\r\n\tpublic String getCode() {\n\t\treturn code;\r\n\t}", "public java.lang.String getCode() {\r\n return code;\r\n }", "public String getCode()\r\n\t{\r\n\t\treturn code;\r\n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.String getCode() {\n return (java.lang.String)__getInternalInterface().getFieldValueForCodegen(CODE_PROP.get());\n }", "public byte getCode();", "public String getCode()\n {\n return code;\n }", "protected String getCurrentCode() {\n IDocument doc = EditorUtilities.getDocument(editor);\n if (doc != null) {\n return doc.get();\n }\n return null;\n }", "public byte[] code();", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode() {\r\n return code;\r\n }", "public String getCode(){\n\t\treturn codeService;\n\t}", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "java.lang.String getCodeName();", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCode() {\n return code;\n }", "public String getCodeExample() {\r\n return SOURCE_CODE;\r\n }", "public long getCode () {\r\n\t\treturn code;\r\n\t}", "@Override\n\tpublic String getAutoCode() {\n\t\treturn null;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\n\t\treturn code;\n\t}", "public String getCode() {\r\n\t\treturn code;\r\n\t}", "public String getCode() {\r\n\t\treturn code;\r\n\t}", "public String getCode()\n {\n return fCode;\n }", "public String code() {\n return this.code;\n }", "public String code() {\n return this.code;\n }", "public String getCode() {\n return super.getString(Constants.Properties.CODE);\n }", "Integer getCode();", "public String getCode() {\n return (String) get(\"code\");\n }", "public abstract int code();", "int getCodeValue();", "public String getPyCode() {\n return pyCode;\n }", "public String getPyCode() {\n return pyCode;\n }", "String getEACCode();", "public String generateCode(){\n return \"P\" + repository.getCount();\n }", "public void generateCode() {\n code = java.util.UUID.randomUUID().toString();\n }", "public String getCode() {\n return _code;\n }", "public long getCode() {\n return code;\n }", "String getMapCode();", "public void generateCode() {\n new CodeGenerator(data).generateCode();\n }", "public int getCode () {\n return code;\n }", "public String getCode() {\n\t\treturn Code;\n\t}", "public String sourceCode() {\n\t\treturn m_sourceCode;\n\t}", "public String getCode() {\n return this.code;\n }" ]
[ "0.7935361", "0.7935361", "0.7935361", "0.7935361", "0.7935361", "0.7727352", "0.76258427", "0.76258427", "0.73728347", "0.73728347", "0.73303723", "0.7298667", "0.7173717", "0.71324867", "0.7118695", "0.7008242", "0.7008242", "0.7008242", "0.69437355", "0.69126165", "0.69126165", "0.69126165", "0.6849945", "0.6831076", "0.68161136", "0.6805306", "0.6795464", "0.6776538", "0.6773407", "0.6751735", "0.67433256", "0.67368764", "0.6736769", "0.6735084", "0.6716363", "0.6713658", "0.6707828", "0.6707828", "0.6707828", "0.6707828", "0.6707828", "0.6707828", "0.6707828", "0.669672", "0.6659181", "0.6659181", "0.6659181", "0.6659181", "0.6657755", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6652766", "0.6624441", "0.66198313", "0.6618167", "0.66177243", "0.66177243", "0.66177243", "0.66177243", "0.66177243", "0.66177243", "0.66114795", "0.66114795", "0.6609085", "0.66006505", "0.66006505", "0.6551365", "0.65479964", "0.6539099", "0.65067065", "0.6505386", "0.65043515", "0.65043515", "0.647929", "0.6469919", "0.6460154", "0.6457152", "0.6451462", "0.64483935", "0.6429669", "0.64242136", "0.6417971", "0.64148027", "0.633351" ]
0.0
-1
Get the code by user's console input
public void setManual(){ this.codeAuto = false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String consoleInput();", "String getUserInput();", "public static String inputCommand() {\n String command;\n Scanner in = new Scanner(System.in);\n\n command = in.nextLine();\n\n return command;\n }", "public String readCommand() {\n Scanner sc = new Scanner(System.in);\n return sc.nextLine();\n }", "static String getCourseCode() {\n\t\tScanner s = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter course code: \");\n\t\tString cc = s.nextLine();\n\t\treturn cc;\n\t}", "String getInput();", "String getCommand(){\n\t\tString command=\"\";\n\t\ttry{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tcommand = br.readLine();\n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"Somethinf went wrong with the system input!! Please try again.\");\n\t\t}\n\t\treturn command;\n\t}", "public String readCommand() {\n sc = new Scanner(System.in);\n userInput = new TextField();\n return userInput.getText();\n }", "String userInput(String question);", "private static String getReservCodeOrQ() \n {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter reservation code for more details \"\n\t + \"(or (q)uit to exit): \");\n String rvCode = input.next();\n return rvCode;\n }", "protected String getInputFromConsole() throws IOException\n {\n BufferedReader consoleInput = new BufferedReader(new InputStreamReader(System.in));\n return consoleInput.readLine();\n }", "String readInput() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "public String userInputString() {\n Scanner scanner = new Scanner(System.in);\n return scanner.nextLine();\n }", "private static String getRoomCodeOrQ() {\n Scanner input = new Scanner(System.in);\n System.out.print(\"Enter room code for more details \"\n\t + \"(or (q)uit to exit): \");\n String roomCode = input.next();\n return roomCode;\n }", "public static String getInput() {\n\t\tScanner inputReader = new Scanner(System.in);\n\t\tString userInput;\n\t\tuserInput = inputReader.nextLine();\n\t\treturn userInput;\n\t}", "private static boolean grabCommand() {\n\t\tif (input.hasNextLine()) {\n\t\t\tString temp = input.nextLine();\n\t\t\tcommand = temp.substring(0, 2);\n\t\t\tif (command.equals(\"SC\"))\n\t\t\t\tcode = temp.substring(3, temp.length()).trim();\n\t\t\treturn true;\n\t\t} else return false;\n\t}", "public String getInputCode() {\r\n return inputCode;\r\n }", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "String getCode();", "private String getClientInput() {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String input = null;\n try {\n input = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return input;\n }", "public String userCommand(){\n return scanner.nextLine();\n }", "public static String getString (String ask)\r\n {\r\n Scanner keyboard = new Scanner(System.in);\r\n System.out.print(ask + \" -> \");\r\n String input = keyboard.nextLine();\r\n return input;\r\n }", "private String getBarcode()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"\");\n System.out.print(\"Indtast stregkode: \");\n return scanner.nextLine();\n }", "public static String readConsole(){\r\n\t\tString number = new String(\"\");\r\n\t\t\r\n\t\tSystem.out.println(\"Bitte geben Sie eine Zahl ein!\");\r\n\t\tBufferedReader bufferOne = new BufferedReader(new InputStreamReader(System.in));\r\n\r\n\t\ttry {\r\n\t\t\tnumber = bufferOne.readLine();\r\n\t\t\t\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn number;\r\n\t}", "static String getCommand() {\n\t\tString command;\n\t\twhile (true) {\n\t\t\tScanner sca = new Scanner(System.in);\n\t\t\tSystem.out.print(\"Enter Command: \");\n\t\t\tcommand = sca.next();\n\t\t\tif (command.equals(\"ac\") || command.equals(\"dc\") || command.equals(\"as\") || command.equals(\"ds\") || command.equals(\"p\") || command.equals(\"q\"))\n\t\t\t\tbreak;\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"Invalid command: \" + command);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\t// System.out.println(command);\n\t\treturn command;\n\t}", "public static String receberSelecaoDoConsoleString() {\n\t\tScanner entrada = new Scanner(System.in);\n\t\t\n\t\t//pega o input que decide se a entrada será no terminal ou em arquivo\n\t\tString valor = entrada.nextLine();\n\t\t\n\t\treturn valor;\n\t}", "public String program();", "public void getGamerInput() {\n\t\ttry {\n\t\t\tsCurrentCharInput = String.format(\"%s\", (consoleInput.readLine())).toUpperCase(Locale.getDefault());\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\tconsoleLog.println(\" \");\n\t\t// System.out.println(\" Quit readline \");\n\t\t/* ************************************* */\n\t\t// if (sCurrentCharInput.length() == 0)\n\t\t// continue;\n\n\t\t// if (sCurrentCharInput.contains(sAskedWord))\n\t\t// continue;\n\n\t}", "public String getUserCommand() {\n out.print(\"Enter command: \");\n String fullInputLine = in.nextLine();\n\n return fullInputLine;\n }", "public String getInput() throws IOException {\n\t\tSystem.out.print(\">> \");\n\t\treturn consoleIn.readLine();\n\t}", "public static String GetInput() {\r\n\t\t// Scanner is created and a value is set for input\r\n\t\tScanner in = new Scanner(System.in);\r\n\t\tString input = in.nextLine();\r\n\t\treturn input;\r\n\r\n\t}", "Code getCode();", "public static String getStringInput() {\n Scanner in = new Scanner(System.in);\n return in.next();\n }", "private static String getUserInput(String prompt){ \r\n Scanner in = new Scanner(System.in);\r\n System.out.print(prompt);\r\n return in.nextLine();\r\n }", "public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n String str = sc.nextLine();\n System.out.println(str);\n }", "java.lang.String getCode();", "java.lang.String getCode();", "public static String readInput() {\r\n return SCANNER.nextLine();\r\n }", "static void take_the_input() throws IOException{\n\t\tSystem.out.print(\"ENTER THE ADDRESS : \");\n\n\t\taddress = hexa_to_deci(scan.readLine());\n\t\tSystem.out.println();\n\n\t\twhile(true){\n\t\t\tprint_the_address(address);\n\t\t\tString instruction = scan.readLine();\n\t\t\tint label_size = check_for_label(instruction);\n\t\t\tinstruction = instruction.substring(label_size);\n\t\t\tmemory.put(address, instruction);\n\t\t\tif(stop_instruction(instruction))\n\t\t\t\tbreak;\n\t\t\taddress+=size_of_code(instruction);\n\t\t}\n\t\tSystem.out.println();\n\t\tSystem.out.print(\"DO YOU WANT TO ENTER ANY FURTHUR CODE (Y/N) : \");\n\t\tString choice = scan.readLine();\n\t\tSystem.out.println();\n\t\tif(choice.equals(\"Y\"))\n\t\t\ttake_the_input();\n\t}", "private String getInput(String prompt) throws IOException {\n System.out.print(prompt);\n BufferedReader in = new BufferedReader(\n new InputStreamReader(System.in));\n return in.readLine();\n }", "public String getUserInput() {\n\t\tString input;\n\t\tinput = this.console.next();\n\t\treturn input;\n\t}", "public void getPlayerInput() {\n System.out.println(\"Enter a Command: \");\n playerInput = inputScanner.nextLine();\n }", "String userInputFromTextArea();", "String getLine();", "public String Get_Input()throws IOException{\r\n\t\tString input=\"\";\r\n\t\tInputStreamReader converter = new InputStreamReader(System.in);\r\n\t\tBufferedReader in = new BufferedReader(converter);\r\n\t\t\r\n\t\tinput = in.readLine();\r\n\t\t\r\n\t\treturn input;\r\n\t}", "public static int getInput() {\n Scanner in = new Scanner(System.in);\n\n return in.nextInt();\n }", "public static String le() throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String texto = reader.readLine();\n return texto;\n }", "public String getUserInput(String question) {\r\n System.out.print(question);\r\n return scanner.next();\r\n }", "String getLine ();", "private static String inputString() {\n Scanner userInput = new Scanner(System.in);\n System.out.print(\"Insert text: \");\n String inputText = userInput.nextLine();\n return inputText;\n }", "public static void main(String[] args) {\n\t\tConsole console = System.console();\n\t\tSystem.out.println(\"console value is : \" + console);\n\t\t\n\t\tString name = console.readLine();\n\t\t\n\t\tSystem.out.println(\"Enter input is: \" + name);\n\t}", "Character getCode();", "public String readCommand() {\n return scanner.nextLine();\n }", "private String askForLine(String message) {\r\n System.out.print(message);\r\n return sc.nextLine();\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tScanner s = new Scanner(System.in);\r\n\t String txt = s.next();\r\n\t //your code here\r\n\t System.out.println(txt.substring(0,2));\r\n\r\n\t}", "String ask();", "public static String promptCity(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the city: \");\n String output = scan.nextLine();\n return output;\n }", "String promptString();", "public static String getString() throws IOException\n {\n InputStreamReader input=new InputStreamReader(System.in);\n BufferedReader b=new BufferedReader(input);\n String str=b.readLine();//reading the string from console\n return str;\n }", "public static String promptZip(){\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Enter the zip code: \");\n String output = scan.nextLine();\n return output;\n }", "public static void main(String[] args) {\n\n\t\tInputStreamReader rd= new InputStreamReader(System.in);\n\t\ttry {\n\t\t\tSystem.out.println(\"enter a number\");\n\t\t\tint value=rd.read();\n\t\t\tSystem.out.println(\"you entered:-\"+(char)value);\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 String weiterSpielen(){\n Scanner keyboard = new Scanner(System.in);\n return keyboard.nextLine();\n }", "public static void getInput() {\n\t\tSystem.out.print(\"Expression y=? \");\n\t\tScanner s = new Scanner(System.in);\n\t\texpression = s.nextLine();\n\t\texpression.toLowerCase();\n\t\tSystem.out.print(\"x? \");\n\t\tx = s.nextDouble();\n\t}", "int getCode();", "int getCode();", "int getCode();", "public static void main(String args[])\n {\n Scanner in=new Scanner(System.in);\n String str=in.nextLine();\n System.out.println(str);\n }", "private int getInput()\n {\n int input = 0;\n Scanner scanner = new Scanner(System.in);\n\n try {\n input = scanner.nextInt();\n }\n catch(Exception e) {\n System.out.println(\"Vælg et tal fra menuen.\");\n scanner.nextLine();\n }\n\n return input;\n }", "public static void main(String[] args) {\n\t\tString nome;\r\n\t\t\t\r\n\t\tScanner leitor = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.println(\"Digite um codigo\");\r\n\t\tnome = leitor.next();\r\n\t\t\r\n\t\t\r\n\t\tswitch(nome) {\r\n\t\tcase \"001\":\r\n\t\t\r\n\t\tSystem.out.println(\"Parafuso\");\r\n\t\tbreak;\r\n\t\t\r\n\t\tcase \"002\":\r\n\t\t\tSystem.out.println(\"Porca\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"003\":\r\n\t\t\tSystem.out.println(\"Prego\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\tcase \"004\":\r\n\t\t\tSystem.out.println(\"Ferramenta\");\r\n\t\t\tbreak;\r\n\t\t\r\n\t\t\r\n\t\tdefault:\r\n\t\tSystem.out.println(\"Diversos\");\r\n\t}\r\n\t}", "public static String getString() {\n return consoleScanner.nextLine();\n }", "GameCode getGameCode(String gameCode);", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n // String input\n String first = sc.nextLine();\n System.out.println(first);\n\n }", "public static void main(String[]args){//inicio del main\r\n\r\n\tScanner in = new Scanner(System.in);// creacion del scanner\r\n\tSystem.out.println(\"Input Character\");//impresion del mensaje en consola\r\n\tchar C= in.next().charAt(0);//lectura del char\r\n\t\r\n\tSystem.out.println(\"The ASCII value of \" +C+ \" is : \"+(int) C);//casteo del caracter e impresion del resultado\r\n\t}", "public static String getCommand(String input) {\n String[] strArr = input.split(\" \", 2);\n return strArr[0];\n }", "String getSelection() {\n String topic = \"\";\n\n var br = new BufferedReader(new InputStreamReader(System.in));\n\n System.out.println(\"Enter topic: \");\n try {\n topic = br.readLine();\n } catch (IOException e) {\n System.out.println(\"Error reading console.\");\n }\n return topic;\n }", "public static void main(String[] args) {\n\t\t Scanner scan = new Scanner (System.in);\n\t\t \n\t\t System.out.println(\"tam isminizi giriniz\");\n\t String tamisim = scan.nextLine();\n\t \n \n System.out.println(\"Yasinizi giriniz\");\n int yas = scan.nextInt();\n System.out.println(yas);\n \n System.out.println(\"Isminizın ilk harfini girin\");\n char ilkHarf = scan.next().charAt(0);\n System.out.println(ilkHarf);\n\t\t\n\t\t\n\t}", "public static String getCommand(String userInput) {\n String[] components = userInput.split(\" \", 2);\n return components[0];\n }", "String getUserInput(String prompt) {\r\n System.out.print(prompt);\r\n try {\r\n return rdr.readLine();\r\n }\r\n catch (IOException ex) {\r\n return null;\r\n }\r\n }", "public static void main(String[] args) {\n\t\tBufferedReader keyboardReader = new BufferedReader(new InputStreamReader(System.in));\n\t\ttry {\n\t\t\tString input;\n\t\t\tdo {\n\t\t\t\tinput = keyboardReader.readLine();\n\t\t\t\tSystem.out.println(\"Your input is:**\"+input+\"**\");\n\t\t\t} while (input.length() > 0);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException occured...\");\n\t\t}\n\n//\t\tConsole c = System.console();\n//\t\tif (c == null) {\n//\t\t\tSystem.err.println(\"No console.\");\n//\t\t\tSystem.exit(1);\n//\t\t}\n//\n//\t\tString login = c.readLine(\"Enter your login: \");\n//\t\tSystem.out.println(\"login is :**\" + login+\"**\");\n\t}", "private static String getUserText()\n {\n\t// Reads the users input.\n\tBufferedReader optionReader = new BufferedReader(new InputStreamReader(System.in));\n\n\ttry\n\t {\n\t\treturn(optionReader.readLine());\n\t }\n\tcatch(Exception ex)\n\t {\n\t\treturn(null);\n\t }\n }", "private static String receiveInput(String message) {\n BufferedReader buffyTheVampireSlayer = new BufferedReader(new InputStreamReader(System.in));\n try {\n System.out.printf(\"%s: \", message);\n return buffyTheVampireSlayer.readLine();\n } catch (IOException e) {\n System.out.println(e);\n System.out.println(\"an unexpected error occured\");\n return null;\n }\n }", "@Override\n\tpublic String read() \n\t{\n\t\tString res = \"\";\n\t\tScanner scan = new Scanner(System.in);\n\t\t\n\t\tif (scan.hasNextLine())\n\t\t\tres = scan.nextLine();\n\t\t\n\t\treturn res;\n\t\t\n\n\t}", "public static void main(String[] args) {\nScanner sc= new Scanner(System.in);\nString name=sc.nextLine();\n\t\tSystem.out.println(\"hello\\n\"+name);\n\t\t\n\t}", "static String lireClavier() {\n\ttry {\n\t BufferedReader clavier =\n\t\tnew BufferedReader(new InputStreamReader(System.in));\n\t return clavier.readLine();\n\t} catch (Exception e) {\n\t return \"erreur dans fonction lireClavier\";\n\t}\n }", "public String getInput(String message) throws IOException {\n\t\tSystem.out.print(\">> \"+message+\" \");\n\t\treturn consoleIn.readLine();\n\t}", "public static void main(String[] args) {\n\t\t\n\t\tInputStream input = System.in;\n\t\tScanner scanner = new Scanner(input);\n\t\t// nextLine()을 실행하기 전에 \n\t\t// 무엇을 해야할지 알려주는 메시지를 먼저 출력 하라.\n\t\t// 이를 'prompt(프롬프트)' 라고 한다\n\t\tSystem.out.println(\"문자열을 입력후 Enter....\");\n\t\tString strInput = scanner.nextLine();\n\t\tSystem.out.println(strInput);\n\n\t}", "public static void main(String[] args) {\n\t\tScanner kb = new Scanner(System.in);\n\t\tBinarySearchTree<Character> tree = buildTree();\n\t\tString [] morse = {\".-\", \"-...\", \"-.-.\", \"-..\", \".\", \"..-.\", \"--.\", \"....\", \"..\", \".---\", \"-.-\", \".-..\", \"--\", \"-.\", \"---\", \".--.\", \"--.-\", \".-.\", \"...\", \"-\", \"..-\", \"...-\", \".--\", \"-..-\", \"-.--\", \"--..\"};\n\t\t\n\t\t// make object to hold the array and built tree\n\t\tMorseCode build = new MorseCode(morse, tree);\n\t\t\n\t\t// create menu and prompt user\n\t\tSystem.out.println(\"What would you like to do?\");\n\t\tSystem.out.println(\"1: Enter String.\");\n\t\tSystem.out.println(\"2: Enter Morse Code.\");\n\t\tSystem.out.println(\"3: Exit.\");\n\t\tint choice = kb.nextInt();\n\t\t\n\t\t// while the user doesn't exit\n\t\twhile (choice != 3) {\n\t\t\tif (choice == 1) {\n\t\t\t\t// clear buffer\n\t\t\t\tkb.nextLine();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Enter string now.\");\n\t\t\t\tString message = kb.nextLine().toUpperCase();\n\t\t\t\t\n\t\t\t\tSystem.out.println(build.encode(message));\n\t\t\t}\n\t\t\telse if (choice == 2) {\n\t\t\t\t// clear buffer\n\t\t\t\tkb.nextLine();\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Enter morse code now.\");\n\t\t\t\tString code = kb.nextLine();\n\t\t\t\t\n\t\t\t\tSystem.out.println(build.decode(code, tree));\n\t\t\t}\n\t\t\t// reprompt for menu choice\n\t\t\tSystem.out.println(\"Enter new choice.\");\n\t\t\tchoice = kb.nextInt();\n\t\t\t\n\t\t} // end while loop\n\t\t\n\t\tSystem.out.println(\"Exit Complete.\");\n\t\tkb.close();\n\t}", "private void getInput() {\n\t\tSystem.out.println(\"****Welcome to TNEB online Payment*****\");\r\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter your current unit\");\r\n\t\tunit = scan.nextInt();\r\n\t}", "public static String readUserInput() {\n return in.nextLine();\n }", "public String getUserStringInput(String tips)\n {\n Scanner console = new Scanner(System.in);\n System.out.println(tips);\n return console.nextLine();\n }", "public String getCode() {\n\t\treturn codeText.getText().toString();\n\t}", "private String getCommandWithPrompt() {\n print(\"dbg<\" + pc + getLabel(pc) + \">\");\n return nextLine();\n }", "private String getPlayerChoice() {\n Scanner userInput = new Scanner(System.in); // Create a Scanner object\n System.out.println(\"Enter choice:\\nr = rock\\np = paper\\ns = scissors\\nq = quit\");\n return userInput.nextLine().toUpperCase(); \n }", "public static void main(String[] args) {\n char option;\n Scanner scan = new Scanner(System.in);\n System.out.println(\"Welcome to MG's adventure world. Now your journey begins. Good luck!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n String input = getInput(scan, \"Cc\");\n System.out.println(\"You are in a dead valley.\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You walked and walked and walked and you saw a cave!\");\n cave();\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"You entered a cave!\");\n System.out.println(\"Please hit 'C' or 'c' to continue, anything else to quit-\");\n input = getInput(scan, \"Cc\");\n System.out.println(\"Unfortunately, you ran into a GIANT!\");\n giant();\n System.out.println(\"Enter 'A' or 'a' to Attack, 'E' or 'E' to Escape, ANYTHING else is to YIELD\");\n input = getInput(scan, \"AaEe\", 10);\n System.out.println(\"Congratulations! You SURVIVED! Get your REWARD!\");\n System.out.println(\"There are three 3 tressure box in front of you! Enter the box number you want to open!\");\n box();\n input = getInput(scan);\n System.out.println(\"Hero! Have a good day!\");\n }", "public static String readLine(String message){\n Scanner in = new Scanner(System.in);\n System.out.print(message);\n return in.nextLine();\n }", "public static void main(String[] args) {\n\t\tScanner io=new Scanner(System.in);\r\n\t\tString s=io.nextLine();\r\n\t\t\r\n\t\tint result=match(s.toCharArray(),s.length());\r\n\t\tSystem.out.println(result);\r\n\t}", "private static void inputInstallerCommand() {\n\t\tScanner scanner = new Scanner(System.in);\n\t\tString commandLine = scanner.nextLine();\n\t\t//Case-sensitive ans should be always Upper case\n\t\tif (!commandLine.equals(\"END\")) {\n\t\t\tcallIstallerCommand(commandLine);\n\t\t\tinputInstallerCommand();\n\t\t}\n\t}", "private void getInput() {\n\t\tScanner scan = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Enter a number\");\r\n\t\tn=scan.nextInt();\r\n\r\n\t}" ]
[ "0.7352033", "0.6983391", "0.6832857", "0.6764623", "0.6759704", "0.67128336", "0.6556942", "0.65249103", "0.64585346", "0.6351351", "0.63287705", "0.63285893", "0.6326738", "0.63240045", "0.63211954", "0.62871164", "0.62842786", "0.62804717", "0.62804717", "0.62804717", "0.62804717", "0.62804717", "0.6264893", "0.62574947", "0.61930037", "0.6188164", "0.61788833", "0.61786354", "0.6153987", "0.6142192", "0.61298454", "0.6129459", "0.61214566", "0.6113247", "0.6106115", "0.6074895", "0.6068687", "0.6068014", "0.6067197", "0.6067197", "0.60553026", "0.6051533", "0.6033788", "0.60039824", "0.60026884", "0.5990845", "0.5975706", "0.5970359", "0.5951786", "0.594667", "0.5946102", "0.5937563", "0.5935189", "0.59318566", "0.59280366", "0.5915125", "0.5904329", "0.5893223", "0.58782274", "0.5826154", "0.58231515", "0.5823096", "0.58209157", "0.58129036", "0.58063394", "0.5802792", "0.57979065", "0.57979065", "0.57979065", "0.5789729", "0.5785242", "0.5782488", "0.57803094", "0.5776517", "0.57720834", "0.5767631", "0.5762334", "0.5751638", "0.574937", "0.57477784", "0.5738973", "0.5731631", "0.5721026", "0.572001", "0.57197523", "0.5711321", "0.570775", "0.5705507", "0.5705204", "0.5695149", "0.569463", "0.5694489", "0.5680704", "0.56683964", "0.56677955", "0.5656388", "0.56517583", "0.5649638", "0.56487095", "0.5640847", "0.5639519" ]
0.0
-1
Build and return an authorized Gmail client service.
public Gmail getGmailService() throws IOException { Credential credential = this.googleCred; return new Gmail.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential) .setApplicationName(APP_NAME) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "GmailClient getGmailClient(Credential credential);", "public static Gmail getGmailService() throws IOException {\n\t\tCredential credential = authorize();\n\t\treturn new Gmail.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential).setApplicationName(APPLICATION_NAME).build();\n\t}", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "private Calendar getGoogleClient(String email)\t{\n\t\tGoogleCredential credential = getGoogleCredential(email);\n\t\tCalendar client = getGoogleClient(credential);\n\t\treturn client;\n\t}", "GoogleAuthenticatorKey createCredentials();", "public void createClientFromCredential() {\n WebPubSubServiceAsyncClient serverClient = new WebPubSubServiceClientBuilder()\n .connectionString(\"<connection-string>\")\n .hub(\"<hub>>\")\n .buildAsyncClient();\n\n // wrap WebPubSubServiceAsyncClient.getClientAccessToken as WebPubSubClientCredential\n WebPubSubClientCredential clientCredential = new WebPubSubClientCredential(Mono.defer(() ->\n serverClient.getClientAccessToken(new GetClientAccessTokenOptions()\n .setUserId(\"<user-name>\")\n .addRole(\"webpubsub.joinLeaveGroup\")\n .addRole(\"webpubsub.sendToGroup\"))\n .map(WebPubSubClientAccessToken::getUrl)));\n\n // create WebPubSub client\n WebPubSubClient client = new WebPubSubClientBuilder()\n .credential(clientCredential)\n .buildClient();\n // END: readme-sample-createClientFromCredential\n }", "private static Calendar getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME).build();\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException\n{\n Credential cred = authorize();\n com.google.api.services.calendar.Calendar.Builder bldr =\n new com.google.api.services.calendar.Calendar.Builder(HTTP_TRANSPORT,JSON_FACTORY,cred);\n bldr.setApplicationName(APPLICATION_NAME);\n\n com.google.api.services.calendar.Calendar cal = bldr.build();\n\n return cal;\n}", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return WorkflowsStubSettings.defaultCredentialsProviderBuilder();\n }", "private GoogleCredential getGoogleCredential(String userId) {\t\t\n\t\t\n\t\ttry { \n\t\t\t// get the service account e-mail address and service account private key from property file\n\t\t\t// this email account and key file are specific for your environment\n\t\t\tif (SERVICE_ACCOUNT_EMAIL == null) {\n\t\t\t\tSERVICE_ACCOUNT_EMAIL = m_serverConfigurationService.getString(\"google.service.account.email\", \"\");\n\t\t\t}\n\t\t\tif (PRIVATE_KEY == null) {\n\t\t\t\tPRIVATE_KEY = m_serverConfigurationService.getString(\"google.private.key\", \"\");\n\t\t\t}\n\t\t\t\n\t\t\tGoogleCredential credential = getCredentialFromCredentialCache(userId);\n\t\t\treturn credential;\n\n\t\t} catch (Exception e) {\n\t\t\t// return null if an exception occurs while communicating with Google.\n\t\t\tM_log.error(\"Error creating a GoogleCredential object or requesting access token: \" + userId + \" \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "private static GoogleApiClient getClient(@NonNull Context context) {\n final String serverClientId = context.getString(R.string.server_client_id);\n final GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(serverClientId)\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API\n return new GoogleApiClient.Builder(context)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return GoogleCredentialsProvider.newBuilder()\n .setScopesToApply(DEFAULT_SERVICE_SCOPES)\n .setUseJwtAccessWithScope(true);\n }", "private DocsService getDocsService() throws DocumentServiceException {\n\tAuthenticationToken token = this.store.getUserToken();\n\tif (token == null) {\n\t throw new DocumentServiceException(\"Service requires authentication.\");\n\t}\n\tPrivateKey key = AuthenticationKey.getAuthSubKey();\n DocsService svc = new DocsService(GDATA_CLIENT_APPLICATION_NAME);\n svc.setConnectTimeout(0);\n svc.setReadTimeout(0);\n svc.setAuthSubToken(token.getToken(), key);\n svc.setProtocolVersion(DocsService.Versions.V3);\n return svc;\n }", "GoogleAuthClient(ManagedChannel channel, CallCredentials callCredentials) {\n this.channel = channel;\n blockingStub = PublisherGrpc.newBlockingStub(channel).withCallCredentials(callCredentials);\n }", "private void createRequest() {\n // Configure Google Sign In\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }", "public CalendarService() throws IOException, GeneralSecurityException {\n InputStream in = CalendarService.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n \n NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "private static PlusDomains authenticate() throws GeneralSecurityException, IOException {\n\n System.out.println(String.format(\"Authenticate the domain for %s\", USER_EMAIL));\n\n HttpTransport httpTransport = new NetHttpTransport();\n JsonFactory jsonFactory = new JacksonFactory();\n\n // Setting the sub field with USER_EMAIL allows you to make API calls using the special keyword \n // 'me' in place of a user id for that user.\n GoogleCredential credential = new GoogleCredential.Builder()\n .setTransport(httpTransport)\n .setJsonFactory(jsonFactory)\n .setServiceAccountId(SERVICE_ACCOUNT_EMAIL)\n .setServiceAccountScopes(SCOPE)\n .setServiceAccountUser(USER_EMAIL)\n .setServiceAccountPrivateKeyFromP12File(\n new java.io.File(SERVICE_ACCOUNT_PKCS12_FILE_PATH))\n .build();\n\n // Create and return the Plus service object\n PlusDomains service = new PlusDomains.Builder(httpTransport, jsonFactory, credential).build();\n return service;\n }", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "public Calendar getCalendarService() throws IOException {\n\t\tCredential credential = this.googleCred;\n\t\treturn new Calendar.Builder(\n\t\t\t\tHTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(APP_NAME)\n\t\t\t\t.build();\n\t}", "public static Credential authorize() throws IOException {\n\t\t// Load client secrets.\n\t\tInputStream in = GmailDownloader.class.getResourceAsStream(\"/client_secret.json\");\n\t\tGoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n\t\t// Build flow and trigger user authorization request.\n\t\tGoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY,\n\t\t\t\tclientSecrets, SCOPES).setDataStoreFactory(DATA_STORE_FACTORY).setAccessType(\"offline\").build();\n\t\tCredential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n\t\tSystem.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n\t\treturn credential;\n\t}", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }", "private static ServiceAccount getInstanceByEnvVars() {\n Map<String, String> env = System.getenv();\n String gaasUrl = env.get(GAAS_URL);\n String gaasApiKey = env.get(GAAS_API_KEY);\n if (gaasUrl == null || gaasApiKey == null) {\n return null;\n }\n logger.info(\"A ServiceAccount is created from environment variables: GAAS_URL=\"\n + gaasUrl + \", GAAS_API_KEY=***\");\n return getInstance(gaasUrl, gaasApiKey);\n }", "public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }", "public DelegateCredentialsProvider build() {\n return new DelegateCredentialsProvider(this);\n }", "private void configureGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n // for the requestIdToken, this is in the values.xml file that\n // is generated from your google-services.json\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n // Build a GoogleSignInClient with the options specified by gso.\n googleSignInClient = GoogleSignIn.getClient(this, gso);\n // Initialize Firebase Auth\n firebaseAuth = FirebaseAuth.getInstance();\n }", "public com.google.cloud.networkmanagement.v1beta1.GoogleServiceInfo.Builder\n getGoogleServiceBuilder() {\n return getGoogleServiceFieldBuilder().getBuilder();\n }", "public static AuthenticatedClient getAuthenticatedClient() {\n\t\treturn getAuthenticatedClient(false);\n\t}", "BuildClient createBuildClient();", "public static com.google.api.services.calendar.Calendar getCalendarService()\n throws IOException, GeneralSecurityException {\n Credential credential = authorize();\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new com.google.api.services.calendar.Calendar.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, credential)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "public static Drive getDriveService(String token) throws IOException, GeneralSecurityException {\n Credential credential = new GoogleCredential().setAccessToken(token);\n return new Drive.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public CalendarService(String userEmail) throws IOException, FileNotFoundException {\n String keyPath = CalendarService.class.getResource(SERVICE_ACCOUNT_FILE_PATH).toString().replace(\"file:\", \"\");\n \n FileInputStream credsFile = new FileInputStream(keyPath);\n GoogleCredential init = GoogleCredential.fromStream(credsFile);\n httpTransport = init.getTransport();\n jsonFactory = init.getJsonFactory();\n \n creds = new GoogleCredential.Builder()\n .setTransport(httpTransport)\n .setJsonFactory(jsonFactory)\n .setServiceAccountId(init.getServiceAccountId())\n .setServiceAccountPrivateKey(init.getServiceAccountPrivateKey())\n .setServiceAccountScopes(Collections.singletonList(CalendarScopes.CALENDAR))\n .setServiceAccountUser(userEmail)\n .build();\n \n service = new Calendar.Builder(httpTransport, jsonFactory, creds)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "public Pokemon.RequestEnvelop.AuthInfo.Builder getAuthBuilder() {\n bitField0_ |= 0x00000080;\n onChanged();\n return getAuthFieldBuilder().getBuilder();\n }", "private YouTube getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n return new YouTube.Builder(httpTransport, JSON_FACTORY, null)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e) {\n throw new AnaplanAPIException(\"Could not initialise service credentials\", e);\n }\n } else if (authType == AUTH_TYPE.OAUTH) {\n return new Credentials(clientId);\n }\n return new Credentials(getUsername(), getPassphrase());\n }", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = GoogleAuthorizeUtil.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "private DefaultHttpClient createHttpClient()\n throws IOException\n {\n XCapCredentialsProvider credentialsProvider\n = new XCapCredentialsProvider();\n credentialsProvider.setCredentials(\n AuthScope.ANY,\n new UsernamePasswordCredentials(getUserName(), password));\n\n return HttpUtils.getHttpClient(\n null , null, uri.getHost(), credentialsProvider);\n }", "public Credential getUsercredentialwithAccessToken(String accessToken) {\n\t\treturn new GoogleCredential.Builder().setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(new JacksonFactory())\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setAccessToken(accessToken);\n\t}", "public GTLServiceTicket() {}", "static IDiscordClient getBuiltDiscordClient(String token) {\r\n // The ClientBuilder object is where you will attach your params for configuring the instance of your bot.\r\n // Such as withToken, setDaemon etc\r\n return new ClientBuilder()\r\n .withToken(token)\r\n .withPingTimeout(1)\r\n .withRecommendedShardCount()\r\n .build();\r\n }", "protected synchronized void buildGoogleApiClient() {\n\t\tmGoogleApiClient = new GoogleApiClient.Builder(context)\n\t\t\t\t.addConnectionCallbacks(this)\n\t\t\t\t.addOnConnectionFailedListener(this)\n\t\t\t\t.addApi(LocationServices.API).build();\n\t}", "private Drive getDriveService(HttpServletRequest req,\n\t\t\tHttpServletResponse resp) throws IOException {\n\n\t\tCredential credentials = getCredential(req, resp);\n\t\treturn new Builder(TRANSPORT, JSON_FACTORY, credentials).build();\n\t}", "public GoogleAPI() {\n try {\n ytService = getService();\n } catch (GeneralSecurityException | IOException e) {\n e.printStackTrace();\n }\n DEVELOPER_KEY = DEVELOPER_KEY_Junwei;\n }", "private void buildGoogleApiClient() {\n if (googleApiClient == null) {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Drive.API)\n .addScope(Drive.SCOPE_FILE)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n }\n }", "protected synchronized void buildGoogleApiClient() {\n //Confirms no instance of GoogleApiClient has been instantiated\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "protected synchronized void createGoogleAPIClient() {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "public static Credential authorize() throws IOException, GeneralSecurityException {\n // Load client secrets.\n InputStream in = GoogleIntegration.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n FileDataStoreFactory DATA_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR);\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_FACTORY)\n .setAccessType(\"offline\")\n .build();\n Credential credential = new AuthorizationCodeInstalledApp(\n flow, new LocalServerReceiver()).authorize(\"user\");\n System.out.println(\n \"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private String getToken() {\n String keyFilePath = System.getenv(\"APE_API_KEY\");\n if (Strings.isNullOrEmpty(keyFilePath)) {\n File globalKeyFile = GlobalConfiguration.getInstance().getHostOptions().\n getServiceAccountJsonKeyFiles().get(GLOBAL_APE_API_KEY);\n if (globalKeyFile == null || !globalKeyFile.exists()) {\n CLog.d(\"Unable to fetch the service key because neither environment variable \" +\n \"APE_API_KEY is set nor the key file is dynamically downloaded.\");\n return null;\n }\n keyFilePath = globalKeyFile.getAbsolutePath();\n }\n if (Strings.isNullOrEmpty(mApiScope)) {\n CLog.d(\"API scope not set, use flag --business-logic-api-scope.\");\n return null;\n }\n try {\n Credential credential = GoogleCredential.fromStream(new FileInputStream(keyFilePath))\n .createScoped(Collections.singleton(mApiScope));\n credential.refreshToken();\n return credential.getAccessToken();\n } catch (FileNotFoundException e) {\n CLog.e(String.format(\"Service key file %s doesn't exist.\", keyFilePath));\n } catch (IOException e) {\n CLog.e(String.format(\"Can't read the service key file, %s\", keyFilePath));\n }\n return null;\n }", "public GoogleAuthenticatorAccount() {\n }", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public IGamePadAIDL create() {\n if (HwGameAssistGamePad.mService == null) {\n HwGameAssistGamePad.bindService();\n }\n return HwGameAssistGamePad.mService;\n }", "private void creatRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id)) //R.string.default_web_client_id需要將系統執行一次,讓他產生\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this,gso);\n }", "private SshClient createClient() {\n java.security.Security.addProvider(\n new org.bouncycastle.jce.provider.BouncyCastleProvider());\n final SshClient client = SshClient.setUpDefaultClient();\n client.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE);\n client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);\n return client;\n }", "public static Credential authorize() throws IOException {\n // Load client secrets.\n InputStream in =\n Quickstart2.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_STORE_FACTORY)\n .setAccessType(\"offline\")\n .build();\n \n Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n \n System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = EventoUtils.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public MJEasyClient() {\n client = new MailjetClient(System.getenv(\"MJ_APIKEY_PUBLIC\"), System.getenv(\"MJ_APIKEY_PRIVATE\"));\n }", "private void buildGoogleApiClient() {\n Log.d(Constants.SERVICE_CREATED, Constants.GOOGLE_MAP_BUILDING);\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(com.google.android.gms.location.LocationServices.API)\n .build();\n Log.d(Constants.SERVICE_CREATED, Constants.GOOGLE_MAP_BUILT);\n createLocationRequest();\n }", "public interface Client {\n \n /**\n * Get the unique id of current client.\n *\n * @return id of client\n */\n String getClientId();\n \n /**\n * Whether is ephemeral of current client.\n *\n * @return true if client is ephemeral, otherwise false\n */\n boolean isEphemeral();\n \n /**\n * Set the last time for updating current client as current time.\n */\n void setLastUpdatedTime();\n \n /**\n * Get the last time for updating current client.\n *\n * @return last time for updating\n */\n long getLastUpdatedTime();\n \n /**\n * Add a new instance for service for current client.\n *\n * @param service publish service\n * @param instancePublishInfo instance\n * @return true if add successfully, otherwise false\n */\n boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);\n \n /**\n * Remove service instance from client.\n *\n * @param service service of instance\n * @return instance info if exist, otherwise {@code null}\n */\n InstancePublishInfo removeServiceInstance(Service service);\n \n /**\n * Get instance info of service from client.\n *\n * @param service service of instance\n * @return instance info\n */\n InstancePublishInfo getInstancePublishInfo(Service service);\n \n /**\n * Get all published service of current client.\n *\n * @return published services\n */\n Collection<Service> getAllPublishedService();\n \n /**\n * Add a new subscriber for target service.\n *\n * @param service subscribe service\n * @param subscriber subscriber\n * @return true if add successfully, otherwise false\n */\n boolean addServiceSubscriber(Service service, Subscriber subscriber);\n \n /**\n * Remove subscriber for service.\n *\n * @param service service of subscriber\n * @return true if remove successfully, otherwise false\n */\n boolean removeServiceSubscriber(Service service);\n \n /**\n * Get subscriber of service from client.\n *\n * @param service service of subscriber\n * @return subscriber\n */\n Subscriber getSubscriber(Service service);\n \n /**\n * Get all subscribe service of current client.\n *\n * @return subscribe services\n */\n Collection<Service> getAllSubscribeService();\n \n /**\n * Generate sync data.\n *\n * @return sync data\n */\n ClientSyncData generateSyncData();\n \n /**\n * Whether current client is expired.\n *\n * @param currentTime unified current timestamp\n * @return true if client has expired, otherwise false\n */\n boolean isExpire(long currentTime);\n \n /**\n * Release current client and release resources if neccessary.\n */\n void release();\n \n /**\n * Recalculate client revision and get its value.\n * @return recalculated revision value\n */\n long recalculateRevision();\n \n /**\n * Get client revision.\n * @return current revision without recalculation\n */\n long getRevision();\n \n /**\n * Set client revision.\n * @param revision revision of this client to update\n */\n void setRevision(long revision);\n \n}", "public Configuration.Builder getClientIdAndClientSecretBuilder() {\n String clientId = \"0993a005480472a69fab10c2f9b8ad0d6bee7acf\";//getString(R.string.client_id);\n String clientSecret=\"oVsWjoQ2RHeHvZ8xK3yrtdHrG7YiN+rnHh4qqBfmscDbCwplTFzytAoVIVrXMnAQShuBYuA6fZftYL+AIvX5zRP8JXOs06dQcej1yeL/ACJSGuiKoQJbqdC6CELuP+Pl\";\n\n String codeGrantRedirectUri = \"deva://robokart\";\n Configuration.Builder configBuilder =\n new Configuration.Builder(clientId, clientSecret, SCOPE, null,\n null);\n configBuilder.setCacheDirectory(this.getCacheDir())\n .setUserAgentString(getUserAgentString(this))\n // Used for oauth flow\n .setCodeGrantRedirectUri(codeGrantRedirectUri);\n\n return configBuilder;\n }", "public RgwAdmin build() {\n if (Stream.of(accessKey, secretKey, endpoint).anyMatch(Strings::isNullOrEmpty)) {\n throw new IllegalArgumentException(\"Missing required parameter to build the instance.\");\n }\n return new RgwAdminImpl(accessKey, secretKey, endpoint);\n }", "public static AccountService getAccountService(){\n\t\treturn new AccountServiceProxy();\n\t}", "private void initGoogleClient() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n\n // [START initialize_auth]\n // Initialize Firebase Auth\n // [END initialize_auth]\n }", "private SubscriptionAdminClient createSubscriptionClient() throws IOException {\n if (useEmulator) {\n SubscriptionAdminSettings adminSettings = SubscriptionAdminSettings.newBuilder()\n .setCredentialsProvider(pubsubCredsProvider)\n .setTransportChannelProvider(channelProvider)\n .build();\n return SubscriptionAdminClient.create(adminSettings);\n } else {\n return SubscriptionAdminClient.create(); // todo arz shutdown listener\n }\n }", "private ClientAuthorizeRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n InputStream in = SheetsRead.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "private static Analyticsreporting initializeAnalyticsReporting() throws GeneralSecurityException, IOException {\n\n httpTransport = GoogleNetHttpTransport.newTrustedTransport();\n dataStoreFactory = new FileDataStoreFactory(DATA_STORE_DIR);\n\n // Load client secrets.\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(HelloAnalytics.class\n .getResourceAsStream(CLIENT_SECRET_JSON_RESOURCE)));\n\n // Set up authorization code flow for all authorization scopes.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow\n .Builder(httpTransport, JSON_FACTORY, clientSecrets,\n AnalyticsreportingScopes.all()).setDataStoreFactory(dataStoreFactory)\n .build();\n\n // Authorize.\n Credential credential = new AuthorizationCodeInstalledApp(flow,\n new LocalServerReceiver()).authorize(\"user\");\n // Construct the Analytics Reporting service object.\n return new Analyticsreporting.Builder(httpTransport, JSON_FACTORY, credential)\n .setApplicationName(APPLICATION_NAME).build();\n }", "public synchronized void buildGoogleApiClient() {\r\n mGoogleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }", "public ClientProvService getClientProvService() throws DMException {\r\n Class<?> serviceClass = ClientProvService.class;\r\n String endPoint = ClientProvService.SERVICE_END_POINT;\r\n\r\n Object client = getXFireSOAPClient(serviceClass, endPoint);\r\n return (ClientProvService)client;\r\n }", "public GoogleDriveSenderService(String name) {\n super(name);\n }", "protected HttpClient getClient() {\n if (client == null) {\n synchronized (this) {\n if (client == null) {\n client = new DefaultHttpClient(conman, params);\n }\n }\n }\n\n return client;\n }", "public CloseableHttpClient build() {\n\t\tCloseableHttpClient httpClient = httpClientBuilder.build();\n\t\treturn httpClient;\n\t}", "private GoogleCredential getCredentialFromCredentialCache(final String userId) throws IOException{\n\t\tGoogleCredential credential = (GoogleCredential)cache.get(userId);\n\t\tif (credential != null){\n\t\t\tM_log.debug(\"Fetching credential from cache for user: \" + userId);\n\t\t\treturn credential;\n\t\t}\n\t\telse{ // Need to create credential and create access token.\n\t\t\tcredential = SakaiGoogleAuthServiceImpl.authorize(userId, SERVICE_ACCOUNT_EMAIL, PRIVATE_KEY, CalendarScopes.CALENDAR);\n\t\t\tif (credential != null){\n\t\t\t\tcredential.refreshToken(); // Populates credential with access token\n\t\t\t\taddCredentialToCache(userId, credential);\n\t\t\t}\n\t\t\treturn credential;\n\t\t}\n\t}", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n }", "public void buildApiClient(){\n if(c==null){\n c = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "protected synchronized void buildGoogleApiClient() {\n\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "public interface IServiceAppAuthenticationClient {\n\n\t/**\n\t * This method gets the <strong>App</strong> authenticated by the Service. It uses Kerberos Protocol\n\t * to achieve mutual authentication between the App and the Service \n\t * @param url \n\t * <code>String</code> url of the web service to be invoked to authenticate App Service Ticket\n\t * @param serviceTicket \n\t * <code>ServiceTicket</code> Kerberos Service Ticket required to access the service\n\t * @return\n\t * <code>AppSession</code> \n\t * @throws IOException\n\t * In case there are some errors encountered while retrieving information\n\t * @throws RestClientException\n\t * If the status of the response is not <strong>200</strong>. The server side error message and error \n\t * response code can be accessed using <code>getMessage</code> and <code>getErrorCode</code> methods respectively\n\t * @throws ResponseDecryptionException \n\t * If the Application was unable to decrypt the Response sent by the server\n\t */\n\tAppSession authenticateAppServiceTicket(String url,\n\t\t\tServiceTicket serviceTicket) throws IOException, RestClientException, ResponseDecryptionException;\n\n}", "public BaseHttpXCapClient()\n {\n ServiceReference guiVerifyReference\n = SipActivator.getBundleContext().getServiceReference(\n CertificateService.class.getName());\n\n if(guiVerifyReference != null)\n certificateVerification\n = (CertificateService)SipActivator.getBundleContext()\n .getService(guiVerifyReference);\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions\n .Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n signInButton = (SignInButton) findViewById(R.id.sign_in_button);\n signInButton.setSize(SignInButton.SIZE_WIDE);\n signInButton.setColorScheme(signInButton.COLOR_DARK);\n signInButton.setOnClickListener((v) -> {\n Intent intent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(intent, SIGN_IN_CODE);\n });\n }", "public static ManagementClientImpl createClient(final Endpoint endpoint, final OptionMap options, final ExecutorService executorService) {\n final OptionMap actual = OptionMap.builder().addAll(DEFAULT_OPTIONS).addAll(options).getMap();\n return internalCreateClient(endpoint, actual, executorService);\n }", "public interface GoogleAccountDataClient {\n AccountNameCheckResponse checkAccountName(AccountNameCheckRequest accountNameCheckRequest) throws ;\n\n CheckFactoryResetPolicyComplianceResponse checkFactoryResetPolicyCompliance(CheckFactoryResetPolicyComplianceRequest checkFactoryResetPolicyComplianceRequest) throws ;\n\n PasswordCheckResponse checkPassword(PasswordCheckRequest passwordCheckRequest) throws ;\n\n CheckRealNameResponse checkRealName(CheckRealNameRequest checkRealNameRequest) throws ;\n\n void clearFactoryResetChallenges() throws ;\n\n ClearTokenResponse clearToken(ClearTokenRequest clearTokenRequest) throws ;\n\n boolean clearWorkAccountAppWhitelist() throws ;\n\n TokenResponse confirmCredentials(ConfirmCredentialsRequest confirmCredentialsRequest) throws ;\n\n TokenResponse createAccount(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n TokenResponse createPlusProfile(GoogleAccountSetupRequest googleAccountSetupRequest) throws ;\n\n @Deprecated\n GoogleAccountData getAccountData(@Deprecated String str) throws ;\n\n Bundle getAccountExportData(String str) throws ;\n\n String getAccountId(String str) throws ;\n\n AccountRecoveryData getAccountRecoveryCountryInfo() throws ;\n\n AccountRecoveryData getAccountRecoveryData(AccountRecoveryDataRequest accountRecoveryDataRequest) throws ;\n\n AccountRecoveryGuidance getAccountRecoveryGuidance(AccountRecoveryGuidanceRequest accountRecoveryGuidanceRequest) throws ;\n\n GetAndAdvanceOtpCounterResponse getAndAdvanceOtpCounter(String str) throws ;\n\n GoogleAccountData getGoogleAccountData(Account account) throws ;\n\n String getGoogleAccountId(Account account) throws ;\n\n GplusInfoResponse getGplusInfo(GplusInfoRequest gplusInfoRequest) throws ;\n\n OtpResponse getOtp(OtpRequest otpRequest) throws ;\n\n TokenResponse getToken(TokenRequest tokenRequest) throws ;\n\n boolean installAccountFromExportData(String str, Bundle bundle) throws ;\n\n AccountRemovalResponse removeAccount(AccountRemovalRequest accountRemovalRequest) throws ;\n\n boolean setWorkAccountAppWhitelistFingerprint(String str, String str2) throws ;\n\n TokenResponse signIn(AccountSignInRequest accountSignInRequest) throws ;\n\n AccountRecoveryUpdateResult updateAccountRecoveryData(AccountRecoveryUpdateRequest accountRecoveryUpdateRequest) throws ;\n\n TokenResponse updateCredentials(UpdateCredentialsRequest updateCredentialsRequest) throws ;\n\n ValidateAccountCredentialsResponse validateAccountCredentials(AccountCredentials accountCredentials) throws ;\n}", "protected synchronized void buildGoogleApiClient() {\n try {\n System.out.println(\"In GOOGLE API CLIENT\");\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n mGoogleApiClient.connect();\n createLocationRequest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }", "public MailjetClient getClient() {\n return client;\n }", "protected static Service getService() throws AnaplanAPIException, UnknownAuthenticationException {\n if (service != null) {\n return service;\n }\n\n ConnectionProperties props = getConnectionProperties();\n service = DefaultServiceProvider.getService(props, Constants.X_ACONNECT_HEADER_KEY, Constants.X_ACONNECT_HEADER_VALUE);\n service.authenticate();\n return service;\n }", "protected synchronized void buildGoogleApiClient() {\r\n googleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }", "public AuthenticationService()\n\t\t\tthrows StorageInitException, AuthConfigurationException {\n\t\tquietLogger();\n\t\tfinal AuthConfig c = new KBaseAuthConfig();\n\t\tlogger = c.getLogger();\n\t\ttry {\n\t\t\tbuildApp(c);\n\t\t} catch (StorageInitException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Failed to initialize storage engine: \" + e.getMessage(),\n\t\t\t\t\te);\n\t\t\tthrow e;\n\t\t} catch (AuthConfigurationException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Invalid configuration: \" + e.getMessage(), e);\n\t\t\tthrow e;\n\t\t}\n\t}", "public BackendService build() {\n return new BackendService(super.buildUnknownFields());\n }", "protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }", "@Bean\n public JavaMailSender javaMailService() {\n JavaMailSenderImpl javaMailSender = new JavaMailSenderImpl();\n \n javaMailSender.setHost(\"smtp.gmail.com\");\n javaMailSender.setPort(587);\n javaMailSender.setUsername(\"\");\n javaMailSender.setPassword(\"\");\n javaMailSender.setJavaMailProperties(getMailProperties());\n \n return javaMailSender;\n }", "public ClientLoginService(){\n this(MessageConnection.CHANNEL_DEFAULT_RELIABLE);\n }", "private Configuration getAuth() {\r\n final ConfigurationBuilder cb = new ConfigurationBuilder();\r\n cb.setOAuthConsumerKey(\"n2g9XOjAr9p44yJwFjXUbeUa2\");\r\n cb.setOAuthConsumerSecret(\"57FHkBBptp17yBGl1v853lldZO9Kh4osJnDQqQEcXd4d9C3xFA\");\r\n cb.setOAuthAccessToken(\"113906448-2fx9njfJgzQrGdnRaGchI9GlZTzLMXrayEzFk2ju\");\r\n cb.setOAuthAccessTokenSecret(\"FJOqMt7dtBp1yuW2VnQDfzksa7IS5h3IxxsJ1ixBGI1ny\");\r\n \r\n return cb.build();\r\n }", "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "public ClientCredentials() {\n }" ]
[ "0.7535891", "0.7281422", "0.7129264", "0.66405624", "0.6448321", "0.62300515", "0.6223113", "0.6090851", "0.600078", "0.5890572", "0.5857012", "0.5853256", "0.58353394", "0.5764167", "0.5744666", "0.5706649", "0.5652753", "0.564887", "0.56399393", "0.55385816", "0.55328065", "0.5526108", "0.54284966", "0.54284245", "0.5421016", "0.5420014", "0.541896", "0.539561", "0.5390214", "0.5387649", "0.5377542", "0.53641397", "0.53564686", "0.53426343", "0.5321508", "0.5309462", "0.530591", "0.53041154", "0.5265704", "0.5247671", "0.5247503", "0.5241175", "0.5214712", "0.5206241", "0.52029747", "0.5183533", "0.5176116", "0.5171248", "0.5162947", "0.5145652", "0.51221853", "0.51184845", "0.511664", "0.5111467", "0.5106822", "0.51039356", "0.50839293", "0.5069673", "0.50691545", "0.506626", "0.5065137", "0.5055878", "0.50477785", "0.50431705", "0.5030101", "0.50281596", "0.5016064", "0.5013019", "0.49949557", "0.49915823", "0.49753758", "0.49669698", "0.4958436", "0.4955257", "0.49533874", "0.49413574", "0.49396414", "0.4937206", "0.4934659", "0.4928668", "0.49253535", "0.49225715", "0.4917941", "0.49163753", "0.49146292", "0.49110752", "0.49063298", "0.49036172", "0.4895674", "0.48911753", "0.4888827", "0.48855677", "0.48783687", "0.48765245", "0.4872554", "0.4861499", "0.48574787", "0.48567712", "0.4854216", "0.48427218" ]
0.70833045
3
Build and return an authorized Calendar client service.
public Calendar getCalendarService() throws IOException { Credential credential = this.googleCred; return new Calendar.Builder( HTTP_TRANSPORT, JSON_FACTORY, credential) .setApplicationName(APP_NAME) .build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static com.google.api.services.calendar.Calendar getCalendarService() throws IOException\n{\n Credential cred = authorize();\n com.google.api.services.calendar.Calendar.Builder bldr =\n new com.google.api.services.calendar.Calendar.Builder(HTTP_TRANSPORT,JSON_FACTORY,cred);\n bldr.setApplicationName(APPLICATION_NAME);\n\n com.google.api.services.calendar.Calendar cal = bldr.build();\n\n return cal;\n}", "private static Calendar getService() throws GeneralSecurityException, IOException {\n final NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME).build();\n }", "public static com.google.api.services.calendar.Calendar getCalendarService()\n throws IOException, GeneralSecurityException {\n Credential credential = authorize();\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n return new com.google.api.services.calendar.Calendar.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, credential)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "public CalendarService() throws IOException, GeneralSecurityException {\n InputStream in = CalendarService.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n \n NetHttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n service = new Calendar.Builder(HTTP_TRANSPORT, JSON_FACTORY, getCredentials(HTTP_TRANSPORT))\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "private Calendar getGoogleClient(String email)\t{\n\t\tGoogleCredential credential = getGoogleCredential(email);\n\t\tCalendar client = getGoogleClient(credential);\n\t\treturn client;\n\t}", "public void createClientFromCredential() {\n WebPubSubServiceAsyncClient serverClient = new WebPubSubServiceClientBuilder()\n .connectionString(\"<connection-string>\")\n .hub(\"<hub>>\")\n .buildAsyncClient();\n\n // wrap WebPubSubServiceAsyncClient.getClientAccessToken as WebPubSubClientCredential\n WebPubSubClientCredential clientCredential = new WebPubSubClientCredential(Mono.defer(() ->\n serverClient.getClientAccessToken(new GetClientAccessTokenOptions()\n .setUserId(\"<user-name>\")\n .addRole(\"webpubsub.joinLeaveGroup\")\n .addRole(\"webpubsub.sendToGroup\"))\n .map(WebPubSubClientAccessToken::getUrl)));\n\n // create WebPubSub client\n WebPubSubClient client = new WebPubSubClientBuilder()\n .credential(clientCredential)\n .buildClient();\n // END: readme-sample-createClientFromCredential\n }", "public CalendarService(String userEmail) throws IOException, FileNotFoundException {\n String keyPath = CalendarService.class.getResource(SERVICE_ACCOUNT_FILE_PATH).toString().replace(\"file:\", \"\");\n \n FileInputStream credsFile = new FileInputStream(keyPath);\n GoogleCredential init = GoogleCredential.fromStream(credsFile);\n httpTransport = init.getTransport();\n jsonFactory = init.getJsonFactory();\n \n creds = new GoogleCredential.Builder()\n .setTransport(httpTransport)\n .setJsonFactory(jsonFactory)\n .setServiceAccountId(init.getServiceAccountId())\n .setServiceAccountPrivateKey(init.getServiceAccountPrivateKey())\n .setServiceAccountScopes(Collections.singletonList(CalendarScopes.CALENDAR))\n .setServiceAccountUser(userEmail)\n .build();\n \n service = new Calendar.Builder(httpTransport, jsonFactory, creds)\n .setApplicationName(APPLICATION_NAME)\n .build();\n }", "private DocsService getDocsService() throws DocumentServiceException {\n\tAuthenticationToken token = this.store.getUserToken();\n\tif (token == null) {\n\t throw new DocumentServiceException(\"Service requires authentication.\");\n\t}\n\tPrivateKey key = AuthenticationKey.getAuthSubKey();\n DocsService svc = new DocsService(GDATA_CLIENT_APPLICATION_NAME);\n svc.setConnectTimeout(0);\n svc.setReadTimeout(0);\n svc.setAuthSubToken(token.getToken(), key);\n svc.setProtocolVersion(DocsService.Versions.V3);\n return svc;\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT)\n throws IOException {\n // Load client secrets.\n InputStream in = GoogleCalendar.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY,\n new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(\n new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\").build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "static synchronized BasisGoogleCalendar getCalendar(UpodWorld w)\n{\n if (DATA_STORE_DIR == null) return null;\n if (cal_service == null) {\n try {\n\t cal_service = getCalendarService();\n }\n catch (IOException e) {\n\t BasisLogger.logE(\"GOOGLECAL: Authorization problem with calendar api: \" + e);\n\t DATA_STORE_DIR = null;\n\t HTTP_TRANSPORT = null;\n\t DATA_STORE_FACTORY = null;\n\t return null;\n }\n }\n\n BasisGoogleCalendar rslt = the_calendars.get(w);\n if (rslt == null) {\n rslt = new BasisGoogleCalendar();\n the_calendars.put(w,rslt);\n }\n\n return rslt;\n}", "@Override\n\tpublic org.sakaiproject.calendar.api.Calendar getCalendar(String ref)\n\t\t\tthrows IdUnusedException, PermissionException {\n\t\tSite site = null;\n\t\tif (ref == null){\n\t\t\tsite = getSite();\n\t\t}\n\t\telse{\n\t\t\tsite = getSite(ref);\n\t\t}\n\t\t// We use the e-mail id of the site creator since the Google calendar is created under this id.\n\t\tCalendar googleClient = getGoogleClient(site.getCreatedBy().getEmail());\n\t\treturn new SakaiGCalendarImpl(googleClient);\n\t}", "public interface CalendarService {\n\n CalendarVo getCalendarById(String id);\n\n CalendarListVo getCalendarList();\n\n CalendarListVo getCalendarListByPage(int page, int size);\n\n boolean addCalendar(Date days, String title, String description, String remark, UserInfo userInfo);\n\n boolean modifyCalendar(String id, Date days, String title, String description, String remark, UserInfo userInfo);\n\n boolean delCalendarById(String id, UserInfo userInfo);\n}", "private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}", "public DelegateCredentialsProvider build() {\n return new DelegateCredentialsProvider(this);\n }", "public static OSClientV2 clientFromAccess(Access access) {\n return OSClientSessionV2.createSession(access);\n }", "public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }", "GoogleAuthenticatorKey createCredentials();", "private Drive getDriveService(HttpServletRequest req,\n\t\t\tHttpServletResponse resp) throws IOException {\n\n\t\tCredential credentials = getCredential(req, resp);\n\t\treturn new Builder(TRANSPORT, JSON_FACTORY, credentials).build();\n\t}", "void createExposedOAuthCredential(IntegrationClientCredentialsDetailsModel integrationCCD);", "public ServiceAccessBean constructServices() throws Exception {\n\n\tif (services == null) {\t\n\t\t// Construct services bean\n\t\tif (getServicecode() != null) {\n\t\t\tservices = new ServiceAccessBean();\n\t\t\tservices.setInitKey_division(getServicecode().intValue());\n\t\t\tservices.refreshCopyHelper();\n\t\t}\n\t}\n\treturn services;\n}", "private static OSS getClient(){\n ClientConfiguration conf = new ClientConfiguration();\n conf.setConnectionTimeout(15 * 1000); // connction time out default 15s\n conf.setSocketTimeout(15 * 1000); // socket timeout,default 15s\n conf.setMaxConcurrentRequest(5); // synchronous request number,default 5\n conf.setMaxErrorRetry(2); // retry,default 2\n OSSLog.enableLog(); //write local log file ,path is SDCard_path\\OSSLog\\logs.csv\n\n // using STS, safer method\n// OSSCredentialProvider credentialProvider = new\n//// OSSStsTokenCredentialProvider(\"LTAI4FcJvJqKBATQSHtdBWLQ\",\n//// \"Q6ocdnZ211qGhyrSJq2c5jMEMugoor\",\n//// \"<StsToken.SecurityToken>\");\n // deprecated method\n OSSCredentialProvider credentialProvider = new\n OSSPlainTextAKSKCredentialProvider(ACS_KEY_ID, ACS_KEY_SCT);\n\n OSS oss = new OSSClient(Factory.app(), END_POINT, credentialProvider, conf);\n return oss;\n }", "public static AuthenticatedClient getAuthenticatedClient() {\n\t\treturn getAuthenticatedClient(false);\n\t}", "public static final LicensesClient create(LicensesStub stub) {\n return new LicensesClient(stub);\n }", "public static OSClientV2 clientFromAccess(Access access, Config config) {\n return OSClientSessionV2.createSession(access, null, null, config);\n }", "BuildClient createBuildClient();", "public interface Client {\n \n /**\n * Get the unique id of current client.\n *\n * @return id of client\n */\n String getClientId();\n \n /**\n * Whether is ephemeral of current client.\n *\n * @return true if client is ephemeral, otherwise false\n */\n boolean isEphemeral();\n \n /**\n * Set the last time for updating current client as current time.\n */\n void setLastUpdatedTime();\n \n /**\n * Get the last time for updating current client.\n *\n * @return last time for updating\n */\n long getLastUpdatedTime();\n \n /**\n * Add a new instance for service for current client.\n *\n * @param service publish service\n * @param instancePublishInfo instance\n * @return true if add successfully, otherwise false\n */\n boolean addServiceInstance(Service service, InstancePublishInfo instancePublishInfo);\n \n /**\n * Remove service instance from client.\n *\n * @param service service of instance\n * @return instance info if exist, otherwise {@code null}\n */\n InstancePublishInfo removeServiceInstance(Service service);\n \n /**\n * Get instance info of service from client.\n *\n * @param service service of instance\n * @return instance info\n */\n InstancePublishInfo getInstancePublishInfo(Service service);\n \n /**\n * Get all published service of current client.\n *\n * @return published services\n */\n Collection<Service> getAllPublishedService();\n \n /**\n * Add a new subscriber for target service.\n *\n * @param service subscribe service\n * @param subscriber subscriber\n * @return true if add successfully, otherwise false\n */\n boolean addServiceSubscriber(Service service, Subscriber subscriber);\n \n /**\n * Remove subscriber for service.\n *\n * @param service service of subscriber\n * @return true if remove successfully, otherwise false\n */\n boolean removeServiceSubscriber(Service service);\n \n /**\n * Get subscriber of service from client.\n *\n * @param service service of subscriber\n * @return subscriber\n */\n Subscriber getSubscriber(Service service);\n \n /**\n * Get all subscribe service of current client.\n *\n * @return subscribe services\n */\n Collection<Service> getAllSubscribeService();\n \n /**\n * Generate sync data.\n *\n * @return sync data\n */\n ClientSyncData generateSyncData();\n \n /**\n * Whether current client is expired.\n *\n * @param currentTime unified current timestamp\n * @return true if client has expired, otherwise false\n */\n boolean isExpire(long currentTime);\n \n /**\n * Release current client and release resources if neccessary.\n */\n void release();\n \n /**\n * Recalculate client revision and get its value.\n * @return recalculated revision value\n */\n long recalculateRevision();\n \n /**\n * Get client revision.\n * @return current revision without recalculation\n */\n long getRevision();\n \n /**\n * Set client revision.\n * @param revision revision of this client to update\n */\n void setRevision(long revision);\n \n}", "protected static Credentials getServiceCredentials() throws AnaplanAPIException {\n if (authType == AUTH_TYPE.CERT) {\n try {\n return new Credentials(getCertificate(), getPrivateKey());\n } catch (Exception e) {\n throw new AnaplanAPIException(\"Could not initialise service credentials\", e);\n }\n } else if (authType == AUTH_TYPE.OAUTH) {\n return new Credentials(clientId);\n }\n return new Credentials(getUsername(), getPassphrase());\n }", "public static OSClientV2 clientFromAccess(Access access, Facing perspective) {\n return OSClientSessionV2.createSession(access, perspective, null, null);\n }", "public GoogleAuthHelper() {\n\t\t\n\t\tLoadType<ClientCredentials> credentials = ofy().load().type(ClientCredentials.class);\n\t\t\n\t\tfor(ClientCredentials credential : credentials) {\n\t\t\t// static ClientCredentials credentials = new ClientCredentials();\n\t\t\tCALLBACK_URI = credential.getCallBackUri();\n\t\t\tCLIENT_ID = credential.getclientId();\n\t\t\tCLIENT_SECRET = credential.getClientSecret();\n\t\t}\n\t\t\n\t\tflow = new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT,\n\t\t\t\tJSON_FACTORY, CLIENT_ID, CLIENT_SECRET, SCOPE).setAccessType(\n\t\t\t\t\"offline\").build();\n\t\tgenerateStateToken();\n\t}", "@Bean\n\tpublic ApiClient apiClient() {\n\t\tApiClient apiClient = new ApiClient(grantType, clientId, clientSecret, accessTokenUri, code);\n\n\t\treturn apiClient;\n\t}", "private MongoClient buildMongo(final AuthConfig c) {\n\t\ttry {\n\t\t\treturn new MongoClient(c.getMongoHost());\n\t\t} catch (MongoException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Failed to connect to MongoDB: \" + e.getMessage(), e);\n\t\t\tthrow e;\n\t\t}\n\t}", "public CloseableHttpClient build() {\n\t\tCloseableHttpClient httpClient = httpClientBuilder.build();\n\t\treturn httpClient;\n\t}", "@Override\n protected String doInBackground(Void... params) {\n credential = GoogleAccountCredential.usingOAuth2(activity,\n Collections.singleton(CalendarScopes.CALENDAR));\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(activity);\n Log.d(tag, \"Google account name: \" + sharedPref.getString(activity.getString(R.string.pref_key_google_account_name),\n null));\n credential.setSelectedAccountName(sharedPref.getString(activity.getString(R.string.pref_key_google_account_name),\n null));\n\n /* Getting Google Calendar client */\n com.google.api.services.calendar.Calendar client =\n new com.google.api.services.calendar.Calendar.Builder(transport, jsonFactory,\n credential).setApplicationName(activity.getString(R.string.app_name)).build();\n\n /* Asking user for choosing Google account */\n if (credential.getSelectedAccountName() == null) {\n activity.startActivityForResult(credential.newChooseAccountIntent(),\n ACCOUNT_REQUEST_CODE);\n retry = true;\n return null;\n }\n\n /* Asking user for permission if needed */\n try {\n Log.d(tag, \"Token: \" + GoogleAuthUtil.getToken(activity.getApplicationContext(),\n credential.getSelectedAccount(), credential.getScope()));\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n } catch (UserRecoverableAuthException e) {\n Log.d(tag, \"Need permission\");\n activity.startActivityForResult(e.getIntent(),PERMISSION_REQUEST_CODE);\n retry = true;\n return null;\n } catch (GoogleAuthException e) {\n e.printStackTrace();\n return null;\n }\n Log.d(tag, \"Permission OK\");\n\n Event event = new Event()\n .setSummary(meeting.name)\n .setLocation(meeting.location)\n .setDescription(meeting.notes);\n\n /* Parsing the meeting date */\n SimpleDateFormat dateFormatter = new SimpleDateFormat(\"MM/dd/yyyy-HH:mm\", Locale.ENGLISH);\n DateTime startDateTime;\n try {\n startDateTime = new DateTime(dateFormatter.parse(meeting.date\n + \"-\" + meeting.time).getTime());\n } catch (ParseException e) {\n e.printStackTrace();\n return null;\n }\n Log.d(tag, \"Parsing meeting date OK\");\n\n EventDateTime start = new EventDateTime()\n .setDateTime(startDateTime);\n event.setStart(start);\n\n EventDateTime end = new EventDateTime()\n .setDateTime(startDateTime);\n event.setEnd(end);\n\n /* Setting attendees list */\n ArrayList<Integer> ids = attendToRepo.getAttendeeIDs(meeting.meeting_ID);\n ArrayList<EventAttendee> attendees = new ArrayList<>();\n for (int id : ids){\n Attendee attendee = attendeeRepo.getAttendeeById(id);\n EventAttendee eventAttendee = new EventAttendee();\n eventAttendee.setDisplayName(attendee.name);\n\n /* Email is mandatory for the API request */\n eventAttendee.setEmail(attendee.name + activity.getString(R.string.google_calendar_email_example));\n attendees.add(eventAttendee);\n Log.d(tag, \"GoogleCalendarTask \" + attendee.name + \" added to attendees\");\n }\n event.setAttendees(attendees);\n\n EventReminder[] reminderOverrides = new EventReminder[] {\n new EventReminder().setMethod(\"popup\").setMinutes(10),\n };\n Event.Reminders reminders = new Event.Reminders()\n .setUseDefault(false)\n .setOverrides(Arrays.asList(reminderOverrides));\n event.setReminders(reminders);\n\n String calendarId = \"primary\";\n try {\n event = client.events().insert(calendarId, event).execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n Log.d(tag, \"Event created link: \" + event.getHtmlLink());\n\n return event.getHtmlLink();\n }", "private com.google.api.services.calendar.model.Calendar createGoogleCalendar(Site site, Calendar client) throws IOException {\n\n\t\tString gcalID;\n\t\t\n\t\tcom.google.api.services.calendar.model.Calendar calendar = new com.google.api.services.calendar.model.Calendar();\n\n\t\tcalendar.setSummary(site.getTitle());\n\t\tcalendar.setTimeZone( TimeService.getLocalTimeZone().getID() );\n\t\tcalendar.setKind(\"calendar#calendar\"); // this string is a special string and is defined by Google. There are other kind strings.\n\n\t\tcom.google.api.services.calendar.model.Calendar createdCalendar = null;\n\t\ttry {\n\t\t\tcreatedCalendar = client.calendars().insert(calendar).execute();\n\t\t} catch (IOException e) {\n StringBuilder errMsg = new StringBuilder(); \n\t\t\terrMsg.append( \"createGoogleCalendar() failed for site \");\n errMsg.append( site.getId() );\n errMsg.append( \" - User may not have a valid google account: \");\n errMsg.append( site.getCreatedBy().getEmail() );\n errMsg.append( \" - \" );\n errMsg.append( e.getMessage() );\n\t\t\tM_log.error( errMsg.toString() );\n\t\t\tthrow e;\n\t\t}\n\t\t\n\t\tif ( createdCalendar == null )\n\t\t\treturn null;\n\t\t\n\t\t// Set permissions on the calendar for global sharing\n\t\t// First retrieve the access rule from the API.\n\t\t// Insert a new one if it exists (updating did not work well)\n\t\tgcalID = createdCalendar.getId();\n\t\t\n\t\t// Now that we have a Google Calendar Id, add it to the site properties.\n\t\taddGcalendarIdToSite(site, gcalID); \n\t\t\n\t\ttry {\n\t\t\tAclRule ruleDefault = client.acl().get(gcalID, ACL_DEFAULT).execute();\n\t\t\tM_log.debug(\" ruleDefault : \" + ruleDefault.toPrettyString());\n\t\t\t\n\t\t\t\n\t\t\t// check to see if we need to update the default ACL\n\t\t\tif ( ruleDefault != null && !ruleDefault.getRole().isEmpty()) {\n\t\t\t\tScope scopeDefault = new Scope();\n\t\t\n\t\t\t\tscopeDefault.setType(ACL_DEFAULT);\n\t\t\t\tscopeDefault.setValue(ACL_NONE);\n\t\t\t\t\n\t\t\t\truleDefault = new AclRule();\n\t\t\t\truleDefault.setScope(scopeDefault);\n\t\t\t\truleDefault.setRole(ACL_NONE); \n\n\t\t\t\tAclRule rule = client.acl().insert(gcalID, ruleDefault).execute();\n\t\t\t\tif ( rule == null )\n\t\t\t\t\tM_log.error( \"Setting Default Google Calendar ACL failed for site: \" + site.getId() + \" - gCalID\" + gcalID);\n\t\t\t}\t \n\t\t} catch (IOException e ){\n\t\t\t// If the exception is a 404 - page not found, then that means that the permission is not set in Google\n\t\t\tint pos404 = e.getMessage().indexOf(\"404\");\n\t\t\t// make sure that 404 is early in the message \n\t\t\tif(pos404 >= 0 && pos404 <= 20 ) {\n\t\t\t\t// okay to continue - Google does not have the permission set\n\t\t\t} \n\t\t\telse {\n\t\t\t\tM_log.error(\"Error setting the default Calendar ACL: \" + site.getId() + \" - \" + e.getMessage());\n\t\t\t}\n\t\t} catch ( Exception eee) {\n\t\t\tM_log.error(\"Setting default Calendar ACL: \"+ site.getId() + \" - \" + eee.getMessage());\n\t\t}\n\t\t\n\t\t\n\t\t// and for the domain\n\t\ttry {\n\t\t\tString emailAddress = site.getCreatedBy().getEmail();\n\t\t\tif ( null != emailAddress) {\n\t\t\t\tString emailDomain = emailAddress.substring(emailAddress.indexOf('@') + 1 );\n\t\t\t\tString aclDomainString = DOMAIN + COLON + emailDomain; // domain:emaildomain\n\t\t\t\tAclRule ruleDomain = client.acl().get(gcalID, aclDomainString).execute();\n\t\t\t\t\n\t\t\t\t// Check to see if we need to update the domain ACL\n\t\t\t\tif ( ruleDomain != null && !ruleDomain.getRole().isEmpty() ) {\n\t\t\t\t\tScope scopeDomain = new Scope();\n\t\t\t\n\t\t\t\t\tscopeDomain.setType(DOMAIN);\n\t\t\t\t\tscopeDomain.setValue(emailDomain);\n\t\t\t\t\t\n\t\t\t\t\tAclRule ruleDefault = new AclRule();\n\t\t\t\t\truleDefault.setScope(scopeDomain);\n\t\t\t\t\truleDefault.setRole(ACL_NONE); \n\t\t\t\n\t\t\t\t\t//AclRule updatedDomain = client.acl().update(gcalID, ruleDefault.getId(), ruleDefault).execute();\n\t\t\t\t\tAclRule rule = client.acl().insert(gcalID, ruleDefault).execute();\n\t\t\t\t\tif ( null == rule || rule.isEmpty() ) {\n\t\t\t\t\t\tM_log.error(\"Failed to update ACL for site\" + site.getId() + \" - \" + gcalID);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tM_log.error(\"Google Calendar Creator does not have an associated email address for Calendar ID\" + gcalID);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException e ){\n\t\t\t// If the exception is a 404 - page not found, then that means that the permission is not set in Google\n\t\t\tint pos404 = e.getMessage().indexOf(\"404\");\n\t\t\t// make sure that 404 is early in the message \n\t\t\tif(pos404 >= 0 && pos404 <= 20 ) {\n\t\t\t\t// okay to continue - Google does not have the permission set\n\t\t\t} \n\t\t\telse {\n\t\t\t\tM_log.error(\"Error setting the domain Calendar ACL for site \" + site.getId() + \" - \" + e.getMessage());\n\t\t\t}\n\t\t} catch ( Exception eee ) {\n\t\t\tM_log.error(\"Error setting the Google domain permissions for site \" + site.getId() + \" - \" + eee.getMessage());\n\t\t}\n\t\treturn createdCalendar;\n\t}", "public Client getClient() {\n\t\tcheckInit();\n\t\tfinal Client cli = tenant.getContext().getBean(Client.class);\n\t\tif (cli.getEventMapper()==null) {\n\t\t\tcli.setEventMapper(getEventMapper());\n\t\t}\n\t\treturn cli;\n\t}", "public static final LicensesClient create() throws IOException {\n return create(LicensesSettings.newBuilder().build());\n }", "GoogleAuthenticatorKey createCredentials(String userName);", "private ProxyCalendar getFactoryProxyCalendar(Class type) {\n // we don't lock here; ok if two proxies get generated for same type\n ProxyCalendar proxy = (ProxyCalendar) _proxies.get(type);\n if (proxy == null) {\n ClassLoader l = GeneratedClasses.getMostDerivedLoader(type,\n ProxyCalendar.class);\n Class pcls = loadBuildTimeProxy(type, l);\n if (pcls == null)\n pcls = generateAndLoadProxyCalendar(type, true, l);\n proxy = (ProxyCalendar) instantiateProxy(pcls, null, null);\n _proxies.put(type, proxy);\n }\n return proxy;\n }", "private static ServiceAccount getInstanceByEnvVars() {\n Map<String, String> env = System.getenv();\n String gaasUrl = env.get(GAAS_URL);\n String gaasApiKey = env.get(GAAS_API_KEY);\n if (gaasUrl == null || gaasApiKey == null) {\n return null;\n }\n logger.info(\"A ServiceAccount is created from environment variables: GAAS_URL=\"\n + gaasUrl + \", GAAS_API_KEY=***\");\n return getInstance(gaasUrl, gaasApiKey);\n }", "public YelpFusionApi initClient() {\n try {\n YelpFusionApiFactory yelpBuild = new YelpFusionApiFactory();\n YelpFusionApi yelpClient = yelpBuild.createAPI(CONFIG.yelpClientID, CONFIG.yelpSecret);\n return yelpClient;\n }\n catch(IOException e) {\n Log.v(\"yelpClient\", e.getStackTrace().toString());\n return null;\n }\n }", "public static final LicensesClient create(LicensesSettings settings) throws IOException {\n return new LicensesClient(settings);\n }", "private static GoogleApiClient getClient(@NonNull Context context) {\n final String serverClientId = context.getString(R.string.server_client_id);\n final GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(serverClientId)\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API\n return new GoogleApiClient.Builder(context)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }", "@Bean(name = \"stormpathClient\")\n @Autowired\n public Client getStormpathClient(BridgeConfig bridgeConfig) {\n ApiKey apiKey = ApiKeys.builder()\n .setId(bridgeConfig.getStormpathId().trim())\n .setSecret(bridgeConfig.getStormpathSecret().trim()).build();\n \n ClientBuilder clientBuilder = Clients.builder().setApiKey(apiKey);\n ((DefaultClientBuilder)clientBuilder).setBaseUrl(bridgeConfig.getStormpathBaseUrl());\n return clientBuilder.build(); \n }", "private static Credential getCredentials(HttpTransport HTTP_TRANSPORT) throws IOException {\r\n // Load client secrets.\r\n InputStream in = SheetsQuickstart.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\r\n if (in == null) {\r\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\r\n }\r\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\r\n\r\n // Build flow and trigger user authorization request.\r\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\r\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\r\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\r\n .setAccessType(\"offline\")\r\n .build();\r\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\r\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\r\n }", "private Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = EventoUtils.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public static OSClientV2 clientFromAccess(Access access, Facing perspective, Config config) {\n return OSClientSessionV2.createSession(access, perspective, null, config);\n }", "public ServiceClient() {\n\t\tsuper();\n\t}", "CdapService createCdapService();", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return WorkflowsStubSettings.defaultCredentialsProviderBuilder();\n }", "public HttpClient build() {\n\t\tCloseableHttpClient httpClient = httpClientBuilder.build();\n\t\treturn new ApacheHttpClient(this.configuration, httpClient);\n\t}", "public RgwAdmin build() {\n if (Stream.of(accessKey, secretKey, endpoint).anyMatch(Strings::isNullOrEmpty)) {\n throw new IllegalArgumentException(\"Missing required parameter to build the instance.\");\n }\n return new RgwAdminImpl(accessKey, secretKey, endpoint);\n }", "public void buildApiClient(){\n if(c==null){\n c = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "protected static Service getService() throws AnaplanAPIException, UnknownAuthenticationException {\n if (service != null) {\n return service;\n }\n\n ConnectionProperties props = getConnectionProperties();\n service = DefaultServiceProvider.getService(props, Constants.X_ACONNECT_HEADER_KEY, Constants.X_ACONNECT_HEADER_VALUE);\n service.authenticate();\n return service;\n }", "@O2Client\n @GET\n @Path(\"/client\")\n public Response clientAuthorizedGET(@Context final SecurityContext c) {\n return Response.ok().build();\n }", "public BackendService build() {\n return new BackendService(super.buildUnknownFields());\n }", "public void createCalendar() throws Exception, IOException, ServiceException {\n // If true, the calendar already exists\n if (getDestinationCalendarUrl() != null) {\n return;\n }\n\n CalendarEntry calendar = new CalendarEntry();\n calendar.setTitle(new PlainTextConstruct(destinationCalendarName));\n// calendar.setSummary(new PlainTextConstruct(\"Lotus Notes Calendar\"));\n // Get this machine's current time zone when creating the new Google calendar\n TimeZone localTimeZone = TimeZone.getDefault();\n calendar.setTimeZone(new TimeZoneProperty(localTimeZone.getID()));\n \n calendar.setHidden(HiddenProperty.FALSE);\n calendar.setSelected(SelectedProperty.TRUE);\n calendar.setColor(new ColorProperty(COLOR));\n\n CalendarEntry returnedCalendar = service.insert(mainCalendarFeedUrl, calendar);\n returnedCalendar.update();\n\n // Get the feed url reference so that we can add events to the new calendar.\n destinationCalendarFeedUrl = new URL(returnedCalendar.getLink(\"alternate\", \"application/atom+xml\").getHref());\n\n return;\n }", "public String enableCalendar(Site site) throws IOException{\n\t\tcom.google.api.services.calendar.model.Calendar siteGCalendar = null;\n\t\t\n\t\tCalendar client;\n\t\t\n\t\tString createdBy = site.getCreatedBy().getEmail();\n\t\tGoogleCredential credential = getGoogleCredential(createdBy);\n\t\tif (credential == null) {\n\t\t\t// error logged in getGoogleCredential()\n\t\t\tthrow new IOException(\"Problem creating Google Credential, user not authorized \"+createdBy);\n\t\t}\n\t\t\n\t\tclient = getGoogleClient( credential );\n\n\t\tsiteGCalendar = createGoogleCalendar(site, client);\n\t\tif (siteGCalendar != null){\n\t\t\treturn siteGCalendar.getId();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "static IDiscordClient getBuiltDiscordClient(String token) {\r\n // The ClientBuilder object is where you will attach your params for configuring the instance of your bot.\r\n // Such as withToken, setDaemon etc\r\n return new ClientBuilder()\r\n .withToken(token)\r\n .withPingTimeout(1)\r\n .withRecommendedShardCount()\r\n .build();\r\n }", "private Drive authentication() throws IOException {\n\t\t// Request a new access token using the refresh token.\n\t\tGoogleCredential credential = new GoogleCredential.Builder()\n\t\t\t\t.setTransport(HTTP_TRANSPORT)\n\t\t\t\t.setJsonFactory(JSON_FACTORY)\n\t\t\t\t.setClientSecrets(CLIENT_ID, CLIENT_SECRET).build()\n\t\t\t\t.setFromTokenResponse(new TokenResponse().setRefreshToken(REFRESH_TOKEN));\n\t\tcredential.refreshToken();\n\t\treturn new Drive.Builder(HTTP_TRANSPORT, JSON_FACTORY, credential)\n\t\t\t\t.setApplicationName(\"tp3\").build();\n\t}", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n // Load client secrets.\n InputStream in = GoogleAuthorizeUtil.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "DocumentManagementService getDocumentManagementService()\n throws ServiceNotAvailableException, LoginFailedException;", "private Calendar chooseCalendar(SignupSite site) throws PermissionException {\n\t\tCalendar calendar = sakaiFacade.getAdditionalCalendar(site.getSiteId());\n\t\tif (calendar == null) {\n\t\t\tcalendar = sakaiFacade.getCalendar(site.getSiteId());\n\t\t}\n\t\treturn calendar;\n\t}", "public static OSClientV2 clientFromAccess(Access access, Facing perspective, CloudProvider provider, Config config) {\n return OSClientSessionV2.createSession(access, perspective, provider, config);\n }", "CdapServiceInstance createCdapServiceInstance();", "public CMSFormClientServices() {\n // Set up the configuration manager.\n config = new ConfigMgr(\"form.cfg\");\n }", "public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() {\n return GoogleCredentialsProvider.newBuilder()\n .setScopesToApply(DEFAULT_SERVICE_SCOPES)\n .setUseJwtAccessWithScope(true);\n }", "public interface IServiceAppAuthenticationClient {\n\n\t/**\n\t * This method gets the <strong>App</strong> authenticated by the Service. It uses Kerberos Protocol\n\t * to achieve mutual authentication between the App and the Service \n\t * @param url \n\t * <code>String</code> url of the web service to be invoked to authenticate App Service Ticket\n\t * @param serviceTicket \n\t * <code>ServiceTicket</code> Kerberos Service Ticket required to access the service\n\t * @return\n\t * <code>AppSession</code> \n\t * @throws IOException\n\t * In case there are some errors encountered while retrieving information\n\t * @throws RestClientException\n\t * If the status of the response is not <strong>200</strong>. The server side error message and error \n\t * response code can be accessed using <code>getMessage</code> and <code>getErrorCode</code> methods respectively\n\t * @throws ResponseDecryptionException \n\t * If the Application was unable to decrypt the Response sent by the server\n\t */\n\tAppSession authenticateAppServiceTicket(String url,\n\t\t\tServiceTicket serviceTicket) throws IOException, RestClientException, ResponseDecryptionException;\n\n}", "public interface ConferenceScheduleBuilderService {\n /**\n * Is finish boolean.\n *\n * @return the boolean\n */\n boolean isFinish();\n\n /**\n * Init conference schedule builder service.\n *\n * @param presentationList the presentation list\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService init(List<Presentation> presentationList);\n\n /**\n * Start event conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService startEvent();\n\n /**\n * End event conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService endEvent();\n\n /**\n * Start networking conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService startNetworking();\n\n /**\n * Start lunch conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService startLunch();\n\n /**\n * End lunch conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService endLunch();\n\n /**\n * Create events from start to lunch conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService createEventsFromStartToLunch();\n\n /**\n * Create events from lunch to network conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService createEventsFromLunchToNetwork();\n\n /**\n * Create events from network to end conference schedule builder service.\n *\n * @return the conference schedule builder service\n */\n ConferenceScheduleBuilderService createEventsFromNetworkToEnd();\n\n /**\n * Build conference schedule.\n *\n * @return the conference schedule\n */\n ConferenceSchedule build();\n}", "private void buildGoogleApiClient() {\n Log.d(Constants.SERVICE_CREATED, Constants.GOOGLE_MAP_BUILDING);\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(com.google.android.gms.location.LocationServices.API)\n .build();\n Log.d(Constants.SERVICE_CREATED, Constants.GOOGLE_MAP_BUILT);\n createLocationRequest();\n }", "private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }", "public static io.dockstore.openapi.client.ApiClient getOpenAPIWebClient(boolean authenticated, String username, TestingPostgres testingPostgres) {\n io.dockstore.openapi.client.ApiClient client = new io.dockstore.openapi.client.ApiClient();\n client.setBasePath(getBasePath());\n if (authenticated) {\n client.addDefaultHeader(\"Authorization\", getDockstoreToken(testingPostgres, username));\n }\n return client;\n }", "protected synchronized void buildGoogleApiClient() {\n\t\tmGoogleApiClient = new GoogleApiClient.Builder(context)\n\t\t\t\t.addConnectionCallbacks(this)\n\t\t\t\t.addOnConnectionFailedListener(this)\n\t\t\t\t.addApi(LocationServices.API).build();\n\t}", "private SubscriptionAdminClient createSubscriptionClient() throws IOException {\n if (useEmulator) {\n SubscriptionAdminSettings adminSettings = SubscriptionAdminSettings.newBuilder()\n .setCredentialsProvider(pubsubCredsProvider)\n .setTransportChannelProvider(channelProvider)\n .build();\n return SubscriptionAdminClient.create(adminSettings);\n } else {\n return SubscriptionAdminClient.create(); // todo arz shutdown listener\n }\n }", "default T calendarAccessAuthorized() {\n return amend(CALENDAR_ACCESS_AUTHORIZED_OPTION, true);\n }", "private void buildGoogleApiClient() {\n if (googleApiClient == null) {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Drive.API)\n .addScope(Drive.SCOPE_FILE)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n }\n }", "protected synchronized void buildGoogleApiClient() {\n //Confirms no instance of GoogleApiClient has been instantiated\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }", "public static ElasticsearchClient getRESTClient() {\n\t\tif (restClient != null) {\n\t\t\treturn restClient;\n\t\t}\n\t\tString esScheme = Para.getConfig().elasticsearchRestClientScheme();\n\t\tString esHost = Para.getConfig().elasticsearchRestClientHost();\n\t\tint esPort = Para.getConfig().elasticsearchRestClientPort();\n\t\tboolean signRequests = Para.getConfig().elasticsearchSignRequestsForAwsEnabled();\n\n\t\tHttpHost host = new HttpHost(esHost, esPort, esScheme);\n\t\tRestClientBuilder clientBuilder = RestClient.builder(host);\n\n\t\tString esPrefix = Para.getConfig().elasticsearchRestClientContextPath();\n\t\tif (StringUtils.isNotEmpty(esPrefix)) {\n\t\t\tclientBuilder.setPathPrefix(esPrefix);\n\t\t}\n\n\t\tList<RestClientBuilder.HttpClientConfigCallback> configurationCallbacks = new ArrayList<>();\n\n\t\tif (signRequests) {\n\t\t\tconfigurationCallbacks.add(getAWSRequestSigningInterceptor(host.getSchemeName() + \"://\" + host.getHostName()));\n\t\t}\n\t\tconfigurationCallbacks.add(getAuthenticationCallback());\n\n\t\t// register all customizations\n\t\tclientBuilder.setHttpClientConfigCallback(httpClientBuilder -> {\n\t\t\tconfigurationCallbacks.forEach(c -> c.customizeHttpClient(httpClientBuilder));\n\t\t\tif (esHost.startsWith(\"localhost\") || !Para.getConfig().inProduction()) {\n\t\t\t\thttpClientBuilder.setSSLHostnameVerifier((hostname, session) -> true);\n//\t\t\t\thttpClientBuilder.setSSLContext(SSLContextBuilder.create().);\n\n\t\t\t}\n\t\t\treturn httpClientBuilder;\n\t\t});\n\n\t\t// Create the transport with a Jackson mapper\n\t\tRestClientTransport transport = new RestClientTransport(clientBuilder.build(), new JacksonJsonpMapper());\n\t\trestClient = new ElasticsearchClient(transport);\n\t\trestClientAsync = new ElasticsearchAsyncClient(transport);\n\n\t\tPara.addDestroyListener(new DestroyListener() {\n\t\t\tpublic void onDestroy() {\n\t\t\t\tshutdownClient();\n\t\t\t}\n\t\t});\n\t\tif (!existsIndex(Para.getConfig().getRootAppIdentifier())) {\n\t\t\tcreateIndex(Para.getConfig().getRootAppIdentifier());\n\t\t}\n\t\treturn restClient;\n\t}", "private void makeLocalCalendar() {\n\t\t// TODO Auto-generated method stub\n\t\tContentValues values = new ContentValues();\n\t\tvalues.put(Calendars.ACCOUNT_NAME, PATIENT_ACCOUNT_NAME);\n\t\tvalues.put(Calendars.ACCOUNT_TYPE, CalendarContract.ACCOUNT_TYPE_LOCAL);\n\t\tvalues.put(Calendars.NAME, PATIENT_NAME);\n\t\tvalues.put(Calendars.CALENDAR_DISPLAY_NAME, PATIENT_NAME);\n\t\tvalues.put(Calendars.CALENDAR_COLOR, Color.BLACK);\n\t\tvalues.put(Calendars.CALENDAR_ACCESS_LEVEL, Calendars.CAL_ACCESS_OWNER);\n\t\tvalues.put(Calendars.OWNER_ACCOUNT, PATIENT_EMAIL);\n\t\tvalues.put(Calendars.CALENDAR_TIME_ZONE, TimeZone.getAvailableIDs()\n\t\t\t\t.toString());\n\t\tvalues.put(Calendars.SYNC_EVENTS, 1);\n\n\t\tUri.Builder builder = CalendarContract.Calendars.CONTENT_URI\n\t\t\t\t.buildUpon();\n\t\tbuilder.appendQueryParameter(Calendars.ACCOUNT_NAME,\n\t\t\t\t\"com.grokkingandroid\");\n\t\tbuilder.appendQueryParameter(Calendars.ACCOUNT_TYPE,\n\t\t\t\tCalendarContract.ACCOUNT_TYPE_LOCAL);\n\t\tbuilder.appendQueryParameter(CalendarContract.CALLER_IS_SYNCADAPTER,\n\t\t\t\t\"true\");\n\n\t\tUri uri = getContentResolver().insert(builder.build(), values);\n\n\t}", "public static ManagementClientImpl createClient(final Endpoint endpoint, final OptionMap options, final ExecutorService executorService) {\n final OptionMap actual = OptionMap.builder().addAll(DEFAULT_OPTIONS).addAll(options).getMap();\n return internalCreateClient(endpoint, actual, executorService);\n }", "public static Client create() {\n ClientConfig clientConfig = new ClientConfig(JacksonFeature.class,\n JacksonJaxbJsonProvider.class,\n JacksonJsonProvider.class);\n return ClientBuilder.newClient(clientConfig);\n }", "public static Credential authorize() throws IOException {\n // Load client secrets.\n InputStream in =\n Quickstart2.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_STORE_FACTORY)\n .setAccessType(\"offline\")\n .build();\n \n Credential credential = new AuthorizationCodeInstalledApp(flow, new LocalServerReceiver()).authorize(\"user\");\n \n System.out.println(\"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "public static Drive getDriveService(String token) throws IOException, GeneralSecurityException {\n Credential credential = new GoogleCredential().setAccessToken(token);\n return new Drive.Builder(GoogleNetHttpTransport.newTrustedTransport(), JacksonFactory.getDefaultInstance(), credential).setApplicationName(APPLICATION_NAME).build();\n }", "@Before\n public void buildClient() {\n BasicCookieStore cookieStore = new BasicCookieStore();\n\n // Build Apache Http Client to execute requests\n this.httpClient = HttpClientBuilder.create()\n .setDefaultCookieStore(cookieStore)\n .setRedirectStrategy(new LaxRedirectStrategy())\n .build();\n }", "private ResourceClient( ResourceConfigurationBase<?> theConfiguration, String theContractRoot, String theContractVersion, String theUserAgent, HttpClient theClient, JsonTranslationFacility theJsonFacility ) {\r\n\t\tPreconditions.checkNotNull( theConfiguration, \"need a configuration object so we can get our endpoint\" );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractRoot ), \"need a contract root\" );\r\n \tPreconditions.checkArgument( theContractRoot.startsWith( \"/\" ), \"the contract root '%s' must be a reference from the root (i.e. start with '/')\", theContractRoot );\r\n \tPreconditions.checkArgument( !Strings.isNullOrEmpty( theContractVersion ), \"need a version for contract root '%s'\", theContractRoot );\r\n \tPreconditions.checkArgument( ContractVersion.isValidVersion( theContractVersion), \"the version string '%s' for contract root '%s' is not valid\", theContractVersion, theContractRoot );\r\n\t\tPreconditions.checkArgument( !Strings.isNullOrEmpty( theUserAgent ), \"need a user agent for this client\" );\r\n\r\n\t\t// lets make sure the configuration is valid\r\n\t\ttheConfiguration.validate();\r\n\t\t\r\n\t\t// now let's start preparing the client\r\n\t\tendpoint = new HttpEndpoint( theConfiguration.getEndpoint( ) ); // this will do validation on the endpoint \r\n\t\tcontractRoot = theContractRoot; \r\n\t\tcontractVersion = theContractVersion;\r\n\t\tuserAgent = theUserAgent;\r\n\t\t\r\n\t\t// use the client if sent in, but create a working one otherwise\r\n\t\tif( theClient == null ) {\r\n\t\t\ttry {\r\n\t\t\t SslContextFactory sslContextFactory = null;\r\n\t\r\n\t\t\t if( endpoint.isSecure( ) ) {\r\n\t\t\t \tif( theConfiguration.getAllowUntrustedSsl() ) {\r\n\t\t\t \t\t// so we need SSL communication BUT we don't need to worry about it being valid, likley\r\n\t\t\t \t\t// because the caller is self-cert'ing or in early development ... we may need to do \r\n\t\t\t \t\t// more here mind you\r\n\t\t\t \t\t\r\n\t\t\t\t \t// the following code was based https://code.google.com/p/misc-utils/wiki/JavaHttpsUrl\r\n\t\t\t\t \t// if we were to look into mutual SSL and overall key handling, I probably want to\r\n\t\t\t\t \t// take a closer look\r\n\t\t\t\t \t\r\n\t\t\t\t \t// We need to create a trust manager that essentially doesn't except/fail checks\r\n\t\t\t\t\t final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\r\n\t\t\t\t\t \t// this was based on the code found here:\r\n\t\t\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void checkClientTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void checkServerTrusted(X509Certificate[] chain,\r\n\t\t\t\t\t\t\t\t\tString authType) throws CertificateException {\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic X509Certificate[] getAcceptedIssuers() {\r\n\t\t\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t } };\r\n\t\t\t\t\t \r\n\t\t\t\t\t // then we need to create an SSL context that uses lax trust manager \r\n\t\t\t\t\t SSLContext sslContext = SSLContext.getInstance( \"SSL\" );\r\n\t\t\t\t\t\tsslContext.init( null, trustAllCerts, new java.security.SecureRandom() );\r\n\t\r\n\t\t\t\t\t\t// and finally, create the SSL context that\r\n\t\t\t\t\t\tsslContextFactory = new SslContextFactory();\r\n\t\t\t\t\t\tsslContextFactory.setSslContext( sslContext );\r\n\t\t\t \t} else {\r\n\t\t\t \t\t// TODO: this needs to be tested against \r\n\t\t\t \t\t//\t\t a) real certs with real paths that aren't expired\r\n\t\t\t \t\t//\t\t b) real certs with real paths that are expired\r\n\t\t\t \t\tsslContextFactory = new SslContextFactory( );\r\n\t\t\t \t}\r\n\t\t\t\t\thttpClient = new HttpClient( sslContextFactory );\r\n\t\t\t } else {\r\n\t\t\t\t\thttpClient = new HttpClient( );\r\n\t\t\t }\r\n\t\t\t httpClient.setFollowRedirects( false ); // tales doesn't have redirects (at least not yet)\r\n\t\t\t httpClient.setStrictEventOrdering( true ); // this seems to fix an odd issue on back-to-back calls to the same service on \r\n\t\t\t\thttpClient.start( );\r\n\t\t\t displayClientConfiguration( httpClient );\r\n\t\t\t} catch (NoSuchAlgorithmException | KeyManagementException e) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to a problem setting up SSL\", e );\r\n\t\t\t} catch (Exception e ) {\r\n\t\t\t\tthrow new IllegalStateException( \"unable to create the resource client due to the inability to start the HttpClient\", e );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\thttpClient = theClient;\r\n\t\t}\r\n\t\thttpClient.setUserAgentField( new HttpField( HttpHeader.USER_AGENT, theUserAgent ) );\r\n\r\n\t\tif( theJsonFacility == null ) {\r\n\t\tjsonFacility = new JsonTranslationFacility( new DataContractTypeSource( ) );\r\n\t\t} else {\r\n\t\t\tjsonFacility = theJsonFacility;\r\n\t\t}\r\n\t\t\r\n\t\tjsonParser = new JsonParser( );\r\n\t\t\r\n\t\t// now that we have the json facility, let's \r\n\t\t// get the adapter for the result type\r\n\t\tJavaType type = new JavaType( ResourceResult.class );\r\n\t\tJsonTypeMap typeMap = jsonFacility.generateTypeMap( type ); // TODO: technically I can, if I have the type of the result, now do the full thing (need to have a field for it)\r\n\t\tresultTypeAdapter = new TypeFormatAdapter( \r\n\t\t\t\ttype,\r\n\t\t\t\ttypeMap.getReflectedType().getName(),\r\n \t\t\tnew JsonObjectToObjectTranslator( typeMap ),\r\n \t\t\tnew ObjectToJsonObjectTranslator( typeMap ) );\t\t\t\t\r\n\t}", "public Configuration.Builder getClientIdAndClientSecretBuilder() {\n String clientId = \"0993a005480472a69fab10c2f9b8ad0d6bee7acf\";//getString(R.string.client_id);\n String clientSecret=\"oVsWjoQ2RHeHvZ8xK3yrtdHrG7YiN+rnHh4qqBfmscDbCwplTFzytAoVIVrXMnAQShuBYuA6fZftYL+AIvX5zRP8JXOs06dQcej1yeL/ACJSGuiKoQJbqdC6CELuP+Pl\";\n\n String codeGrantRedirectUri = \"deva://robokart\";\n Configuration.Builder configBuilder =\n new Configuration.Builder(clientId, clientSecret, SCOPE, null,\n null);\n configBuilder.setCacheDirectory(this.getCacheDir())\n .setUserAgentString(getUserAgentString(this))\n // Used for oauth flow\n .setCodeGrantRedirectUri(codeGrantRedirectUri);\n\n return configBuilder;\n }", "public AuthenticationService()\n\t\t\tthrows StorageInitException, AuthConfigurationException {\n\t\tquietLogger();\n\t\tfinal AuthConfig c = new KBaseAuthConfig();\n\t\tlogger = c.getLogger();\n\t\ttry {\n\t\t\tbuildApp(c);\n\t\t} catch (StorageInitException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Failed to initialize storage engine: \" + e.getMessage(),\n\t\t\t\t\te);\n\t\t\tthrow e;\n\t\t} catch (AuthConfigurationException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Invalid configuration: \" + e.getMessage(), e);\n\t\t\tthrow e;\n\t\t}\n\t}", "public static IOSClientBuilder.V2 builderV2() {\n return new OSClientBuilder.ClientV2();\n }", "public ClientCredentials() {\n }", "private static Credential getCredentials(final NetHttpTransport HTTP_TRANSPORT) throws IOException {\n InputStream in = SheetsRead.class.getResourceAsStream(CREDENTIALS_FILE_PATH);\n if (in == null) {\n throw new FileNotFoundException(\"Resource not found: \" + CREDENTIALS_FILE_PATH);\n }\n GoogleClientSecrets clientSecrets = GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n GoogleAuthorizationCodeFlow flow = new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(new FileDataStoreFactory(new java.io.File(TOKENS_DIRECTORY_PATH)))\n .setAccessType(\"offline\")\n .build();\n LocalServerReceiver receiver = new LocalServerReceiver.Builder().setPort(8888).build();\n return new AuthorizationCodeInstalledApp(flow, receiver).authorize(\"user\");\n }", "public static Credential authorize() throws IOException, GeneralSecurityException {\n // Load client secrets.\n InputStream in = GoogleIntegration.class.getResourceAsStream(\"/client_secret.json\");\n GoogleClientSecrets clientSecrets =\n GoogleClientSecrets.load(JSON_FACTORY, new InputStreamReader(in));\n\n FileDataStoreFactory DATA_FACTORY = new FileDataStoreFactory(DATA_STORE_DIR);\n HttpTransport HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();\n\n // Build flow and trigger user authorization request.\n GoogleAuthorizationCodeFlow flow =\n new GoogleAuthorizationCodeFlow.Builder(\n HTTP_TRANSPORT, JSON_FACTORY, clientSecrets, SCOPES)\n .setDataStoreFactory(DATA_FACTORY)\n .setAccessType(\"offline\")\n .build();\n Credential credential = new AuthorizationCodeInstalledApp(\n flow, new LocalServerReceiver()).authorize(\"user\");\n System.out.println(\n \"Credentials saved to \" + DATA_STORE_DIR.getAbsolutePath());\n return credential;\n }", "private CloseableHttpAsyncClient createHttpClient() {\n RequestConfig.Builder requestConfigBuilder = RequestConfig.custom()\n .setConnectTimeout(Timeout.ofMilliseconds(DEFAULT_CONNECT_TIMEOUT_MILLIS))\n .setResponseTimeout(Timeout.ofMilliseconds(DEFAULT_RESPONSE_TIMEOUT_MILLIS));\n if (requestConfigCallback != null) {\n requestConfigBuilder = requestConfigCallback.customizeRequestConfig(requestConfigBuilder);\n }\n\n try {\n final TlsStrategy tlsStrategy = ClientTlsStrategyBuilder.create()\n .setSslContext(SSLContext.getDefault())\n // See https://issues.apache.org/jira/browse/HTTPCLIENT-2219\n .setTlsDetailsFactory(new Factory<SSLEngine, TlsDetails>() {\n @Override\n public TlsDetails create(final SSLEngine sslEngine) {\n return new TlsDetails(sslEngine.getSession(), sslEngine.getApplicationProtocol());\n }\n })\n .build();\n\n final PoolingAsyncClientConnectionManager connectionManager = PoolingAsyncClientConnectionManagerBuilder.create()\n .setMaxConnPerRoute(DEFAULT_MAX_CONN_PER_ROUTE)\n .setMaxConnTotal(DEFAULT_MAX_CONN_TOTAL)\n .setTlsStrategy(tlsStrategy)\n .build();\n\n HttpAsyncClientBuilder httpClientBuilder = HttpAsyncClientBuilder.create()\n .setDefaultRequestConfig(requestConfigBuilder.build())\n .setConnectionManager(connectionManager)\n .setTargetAuthenticationStrategy(DefaultAuthenticationStrategy.INSTANCE)\n .disableAutomaticRetries();\n if (httpClientConfigCallback != null) {\n httpClientBuilder = httpClientConfigCallback.customizeHttpClient(httpClientBuilder);\n }\n\n final HttpAsyncClientBuilder finalBuilder = httpClientBuilder;\n return AccessController.doPrivileged((PrivilegedAction<CloseableHttpAsyncClient>) finalBuilder::build);\n } catch (NoSuchAlgorithmException e) {\n throw new IllegalStateException(\"could not create the default ssl context\", e);\n }\n }", "private Configuration getAuth() {\r\n final ConfigurationBuilder cb = new ConfigurationBuilder();\r\n cb.setOAuthConsumerKey(\"n2g9XOjAr9p44yJwFjXUbeUa2\");\r\n cb.setOAuthConsumerSecret(\"57FHkBBptp17yBGl1v853lldZO9Kh4osJnDQqQEcXd4d9C3xFA\");\r\n cb.setOAuthAccessToken(\"113906448-2fx9njfJgzQrGdnRaGchI9GlZTzLMXrayEzFk2ju\");\r\n cb.setOAuthAccessTokenSecret(\"FJOqMt7dtBp1yuW2VnQDfzksa7IS5h3IxxsJ1ixBGI1ny\");\r\n \r\n return cb.build();\r\n }", "AmazonComprehendClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) {\n super(clientParams);\n this.awsCredentialsProvider = clientParams.getCredentialsProvider();\n this.advancedConfig = clientParams.getAdvancedConfig();\n init();\n }", "Fog_Services createFog_Services();", "public interface GmailClientFactory {\n /**\n * Creates a GmailClient instance\n *\n * @param credential a valid Google credential object\n * @return a GmailClient instance that contains the user's credentials\n */\n GmailClient getGmailClient(Credential credential);\n}", "@POST\n Response createCalendar(Calendar calendar);", "public WebResource.Builder getClientBuilder(String uri) {\n Client client = Client.create();\n client.addFilter(new HTTPBasicAuthFilter(AUTH_USER, AUTH_PASS));\n WebResource resource = client.resource(baseUrl() + uri);\n log.info(\"XOS REST CALL>> {}\", resource);\n return resource.accept(UTF_8).type(UTF_8);\n }", "private void buildApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Awareness.API)\n .addConnectionCallbacks(this)\n .build();\n mGoogleApiClient.connect();\n }", "public Factory() {\n this(getInternalClient());\n }", "public MSACWrapperSdk() {}" ]
[ "0.7270611", "0.7269977", "0.6819811", "0.67651427", "0.5948289", "0.57664794", "0.5657467", "0.56103545", "0.5585257", "0.5581788", "0.55152214", "0.55108285", "0.54368067", "0.538016", "0.5368877", "0.5294606", "0.52536315", "0.5206401", "0.52025235", "0.51934284", "0.5187416", "0.51820093", "0.5173736", "0.5158646", "0.51562417", "0.5143642", "0.5076905", "0.5064973", "0.5046568", "0.5045348", "0.5015328", "0.50114477", "0.50043225", "0.49840346", "0.49701512", "0.4964356", "0.49616113", "0.49489316", "0.49407008", "0.4929136", "0.4917365", "0.49093372", "0.48989692", "0.48863807", "0.48830825", "0.48743355", "0.487311", "0.48694986", "0.4868502", "0.48542422", "0.48531523", "0.48501217", "0.48480636", "0.4832812", "0.48283502", "0.48104924", "0.48002067", "0.47935188", "0.4780281", "0.47795418", "0.47774765", "0.47765148", "0.47764108", "0.47713715", "0.4766584", "0.47641385", "0.47514635", "0.47487587", "0.47466072", "0.47413146", "0.47404695", "0.47335342", "0.47322994", "0.47277203", "0.47191995", "0.47186297", "0.47148043", "0.47126427", "0.47066823", "0.47062337", "0.47050598", "0.46895805", "0.4683335", "0.46674165", "0.46641338", "0.46614692", "0.46522686", "0.46427715", "0.46397793", "0.463976", "0.46314782", "0.46257734", "0.462339", "0.46218243", "0.4618098", "0.46156657", "0.4611004", "0.46039954", "0.46039942", "0.45967707" ]
0.6723527
4
Faz De Para do objeto entity para o TO
private List<SubServicoTO> parseTO(List<AgvTabSubservico> listaResultado) { ArrayList<SubServicoTO> lista = new ArrayList<SubServicoTO>(); for (Iterator<AgvTabSubservico> iterator = listaResultado.iterator(); iterator.hasNext();) { AgvTabSubservico element = (AgvTabSubservico) iterator.next(); SubServicoTO to = new SubServicoTO(); to.setCdServicoCsi( (element.getCdServicoCsi() == null ? null : element.getCdServicoCsi().toString())); to.setCdSerCom(element.getCdSerCom()); to.setCdServExe(element.getCdServExe()); to.setCdSubservico(element.getCdSubservico()); to.setDataAtualizacao(element.getDtAtualizacao()); to.setDataPublicacao(element.getDtPublicacao()); to.setDsCondExec(element.getDsCondExec()); to.setDsFormaPgto(element.getDsFormaPgto()); to.setDsLink(element.getDsLink()); to.setDsPrazoAtend(element.getDsPrazoAtend()); to.setDsPreco(element.getDsPreco()); to.setDsSubservico(element.getDsSubservico()); to.setFlagPublicGuia(element.getFlPublicGuia()); to.setFlagPublicTabPrecos(element.getFlPublicTabPrecos()); lista.add(to); } return lista; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void toEntity(){\n\n }", "public CuentaEntity toEntity() {\r\n CuentaEntity cuentaE = super.toEntity();\r\n if (this.tarjeta != null) {\r\n if (!this.tarjeta.isEmpty()) {\r\n List<TarjetaEntity> tarjetasEntity = new ArrayList<>();\r\n for (TarjetaDTO dtoTarjeta : tarjeta) {\r\n tarjetasEntity.add(dtoTarjeta.toEntity());\r\n }\r\n cuentaE.setTarjeta(tarjetasEntity);\r\n }\r\n }\r\n if (this.ordenPagos != null) {\r\n if (!this.ordenPagos.isEmpty()) {\r\n List<OrdenPagoEntity> ordenesEntity = new ArrayList<>();\r\n for (OrdenPagoDTO dtoOrdenPago : ordenPagos) {\r\n ordenesEntity.add(dtoOrdenPago.toEntity());\r\n }\r\n cuentaE.setOrdenPagos(ordenesEntity);\r\n }\r\n }\r\n \r\n if (this.estudiante != null) {\r\n System.out.println(\"---------------------------------------------------343434343\");\r\n EstudianteEntity es = estudiante.toEntity();\r\n cuentaE.setEstudiante(es);\r\n System.out.println(es.getDocumento());\r\n System.out.println(cuentaE.getEstudiante());\r\n System.out.println(cuentaE.getEstudiante().getDocumento());\r\n }\r\n\r\n return cuentaE;\r\n }", "BeanPedido fromEntity(PedidosEntity entity);", "public abstract P toEntity();", "@Override\r\n public ViviendaEntity toEntity() {\r\n ViviendaEntity viviendaEntity = super.toEntity();\r\n if (contratos != null) {\r\n List<ContratoEntity> contratosEntity = new ArrayList<>();\r\n for (ContratoDTO dtoContrato : contratos) {\r\n contratosEntity.add(dtoContrato.toEntity());\r\n }\r\n viviendaEntity.setContratos(contratosEntity);\r\n }\r\n\r\n if (cuartos != null) {\r\n List<CuartoEntity> cuartoEntities = new ArrayList<>();\r\n for (CuartoDTO dto : cuartos) {\r\n cuartoEntities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCuartos(cuartoEntities);\r\n }\r\n\r\n if (sitiosDeInteres != null) {\r\n List<SitioInteresEntity> entities = new ArrayList<>();\r\n for (SitioInteresDTO dto : sitiosDeInteres) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setSitiosDeInteres(entities);\r\n }\r\n\r\n if (calificaciones != null) {\r\n List<CalificacionEntity> entities = new ArrayList<>();\r\n for (CalificacionDTO dto : calificaciones) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setCalificaciones(entities);\r\n }\r\n\r\n if (serviciosOfrecidos != null) {\r\n viviendaEntity.setServiciosIncluidos(serviciosOfrecidos);\r\n }\r\n\r\n if (serviciosAdicionales != null) {\r\n List<ServicioAdicionalEntity> entities = new ArrayList<>();\r\n for (ServicioAdicionalDTO dto : serviciosAdicionales) {\r\n entities.add(dto.toEntity());\r\n }\r\n viviendaEntity.setServiciosAdicionales(entities);\r\n }\r\n\r\n return viviendaEntity;\r\n }", "E toEntity(V dto);", "@Override\r\n public AseoEntity toEntity() {\r\n AseoEntity entity = new AseoEntity();\r\n entity.setBanho(this.banho);\r\n entity.setDientes(this.dientes);\r\n entity.setPeluqueria(this.peluqueria);\r\n entity.setCosto(this.getCosto());\r\n entity.setDuracion(this.getDuracion());\r\n entity.setEstado(this.isEstado());\r\n entity.setFecha(this.getFecha());\r\n entity.setRango(this.getRango());\r\n entity.setId(this.id);\r\n if (this.cliente != null) {\r\n entity.setCliente(cliente.toEntity());\r\n }\r\n if (this.mascota != null) {\r\n entity.setMascota(mascota.toEntity());\r\n }\r\n if (this.empleado != null) {\r\n entity.setEmpleado(empleado.toEntity());\r\n }\r\n if (this.factura != null) {\r\n entity.setFactura(factura.toEntity());\r\n }\r\n if (this.calificacion != null) {\r\n entity.setCalificacion(calificacion.toEntity());\r\n }\r\n if (this.getVeterinaria() != null) {\r\n entity.setVeterinaria(this.getVeterinaria().toEntity());\r\n }\r\n return entity;\r\n }", "private void attachEntity(Usuario entity) {\n }", "public CoordinadorEntity toEntity(){\n \n CoordinadorEntity entity = new CoordinadorEntity(); \n entity.setId_coordinador(this.id_coodinador);\n entity.setNombres(this.nombres);\n entity.setApellidos(this.apellidos);\n entity.setGenero(this.genero);\n entity.setEmail(this.email);\n entity.setTipoDocumento(tipo_documento_id);\n entity.setNro_documento(this.nro_documento);\n \n return entity;\n }", "public E getEntity();", "@Override\r\n public BlogEntity toEntity() {\r\n BlogEntity entity = super.toEntity();\r\n if(cliente !=null) entity.setCliente(this.cliente.toEntity());\r\n if(evento !=null) entity.setEvento(this.evento.toEntity());\r\n \r\n return entity;\r\n }", "private EmpresaPorAutorizar getEntity(EmpresaPorAutorizarVO vo){\n\t\tEmpresaPorAutorizar entity = new EmpresaPorAutorizar();\n\t\tentity.setAceptacionTerminos(vo.getAceptacionTerminos());\n\t\tif(null!=vo.getApellido1()){\n\t\t\tentity.setApellido1(vo.getApellido1().toUpperCase());\n\t\t}\n\t\tif(null!=vo.getApellido2()){\n\t\t\tentity.setApellido2(vo.getApellido2().toUpperCase());\n\t\t}\t\t\t\n\t\tentity.setConfidencial(vo.getConfidencial());\n\t\tentity.setContactoEmpresa(vo.getContactoEmpresa());\n\t\tentity.setCorreoElectronico(vo.getCorreoElectronico());\n\t\tentity.setDescripcion(vo.getDescripcion());\n\t\tentity.setEstatus(vo.getEstatus());\n\t\tentity.setFechaActa(vo.getFechaActa());\n\t\tentity.setFechaAlta(vo.getFechaAlta());\n\t\tentity.setFechaNacimiento(vo.getFechaNacimiento());\n\t\tentity.setFechaUltimaActualizacion(vo.getFechaUltimaActualizacion());\n\t\tentity.setIdActividadEconomica(vo.getIdActividadEconomica());\n\t\tentity.setIdEmpresa(vo.getIdEmpresa());\n\t\tentity.setIdMedio(vo.getIdMedio());\t\t\n\t\tentity.setIdPortalEmpleo(vo.getIdPortalEmpleo());\t\t\t\t\n\t\tentity.setIdTipoEmpresa(vo.getIdTipoEmpresa());\n\t\tentity.setIdTipoPersona(vo.getIdTipoPersona());\n\t\tentity.setNombreComercial(vo.getNombreComercial());\n\t\tif(null!=vo.getNombre()){\n\t\t\tentity.setNombre(vo.getNombre().toUpperCase());\n\t\t}\n\t\tentity.setNumeroEmpleados(vo.getNumeroEmpleados());\n\t\tentity.setPaginaWeb(vo.getPaginaWeb());\n\t\tif(null!=vo.getRazonSocial()){\n\t\t\tentity.setRazonSocial(vo.getRazonSocial().toUpperCase());\n\t\t}\n\t\tentity.setRfc(vo.getRfc());\t\t\n\t\tentity.setAseguraDatos(vo.getAseguraDatos());\t\n\t\treturn entity;\n\t}", "EntityType getEntity();", "public Representante toEntity(RepresentanteDTO dto) {\n return toEntity(dto, Representante.builder().build());\n }", "public FacturaDTO(FacturaEntity entity) \n {\n if(entity != null)\n {\n this.costo = entity.getCosto();\n this.id = entity.getId();\n }\n \n }", "public abstract V getEntity();", "public abstract T convertToEntity(D dto);", "T createEntity();", "public ViviendaDTO(ViviendaEntity entity){\r\n if (entity!=null){\r\n this.idVivienda=entity.getIdVivienda();\r\n this.anfitrion=new AnfitrionBasicDTO(entity.getAnfitrion());\r\n this.ciudad=entity.getCiudad();\r\n this.descripcion=entity.getDescripcion();\r\n this.direccion=entity.getDireccion();\r\n this.capacidad=entity.getCapacidad();\r\n this.valorDiario=entity.getValorDiario();\r\n this.imagen=entity.getImagen();\r\n this.numeroHabitaciones=entity.getHabitaciones().size();\r\n }\r\n }", "@Override\n public CalificacionEntity toEntity() {\n CalificacionEntity calificacionEntity = super.toEntity();\n if (this.getHospedaje() != null) {\n calificacionEntity.setHospedaje(this.getHospedaje().toEntity());\n }\n return calificacionEntity;\n }", "Entity createEntity();", "public List<Producto> traerTodos () {\n \n return jpaProducto.findProductoEntities();\n \n \n \n }", "public AtendimentoJuridicoEntity toEntity(AtendimentoJuridicoDTO dto){\n\t\tAtendimentoJuridicoEntity entity = new AtendimentoJuridicoEntity();\n\t\tBeanUtils.copyProperties(dto, entity);\n\t\treturn entity;\n\t}", "public Representante toEntity(RepresentanteDTO dto, Representante entity) {\n\n entity.setIdRepresentante(dto.getIdRepresentante());\n entity.setNome(dto.getNome());\n entity.setTelefone(dto.getTelefone());\n entity.setSexo(dto.getSexo());\n entity.setEmail(dto.getEmail());\n\n return entity;\n }", "@Override\n public Entity getEntity() {\n return super.getEntity();\n }", "public ZEntity getEntity() {\r\n return entity;\r\n }", "<T> void toEntity(T entity, int type);", "Object toDomain(Object entity, Settings settings);", "protected abstract Serializable getEntity();", "public PrestadorEntity toEntity() {\r\n PrestadorEntity prestadorEntity = new PrestadorEntity();\r\n prestadorEntity.setId(this.id);\r\n prestadorEntity.setNombre(this.nombre);\r\n prestadorEntity.setCedula(this.cedula);\r\n prestadorEntity.setCorreo(this.correo);\r\n prestadorEntity.setContrasena(this.contrasena);\r\n if(this.hojaDeVida != null)\r\n prestadorEntity.setHojaDeVida(this.hojaDeVida.toEntity());\r\n return prestadorEntity;\r\n }", "public FacturaEntity toEntity() {\n FacturaEntity entity = new FacturaEntity();\n entity.setCosto(this.getCosto());\n entity.setId(this.getId());\n return entity;\n }", "public OrderDetailEntity toEntity (DetailDTO detailDTO,OrderDetailEntity orderDetailEntity) {\n\t\t\n\t\tShoesEntity shoesEntity = shoesRepository.findOne(detailDTO.getShoesID());\n\t\torderDetailEntity.setShoesEntity(shoesEntity);\n\t\torderDetailEntity.setShoesName(shoesEntity.getShoesName());\n\t\torderDetailEntity.setPrice(detailDTO.getPrice());\n\t\torderDetailEntity.setQuantity(detailDTO.getQuantity());\n\t\treturn orderDetailEntity;\n\t}", "EntityData<?> getEntityData();", "public AseoDetailDTO(AseoEntity entity) {\r\n super(entity);\r\n this.banho = entity.getBanho();\r\n this.dientes = entity.getDientes();\r\n this.peluqueria = entity.getPeluqueria();\r\n\r\n if (entity.getVeterinaria() != null) {\r\n this.veterinaria = new VeterinariaDTO(entity.getVeterinaria());\r\n } else {\r\n entity.setVeterinaria(null);\r\n }\r\n }", "@Override\n\tpublic List<Pedido> toEntity(List<PedidoDTO> dtoList) {\n\t\treturn null;\n\t}", "public EventoEntity toEntity() {\n EventoEntity entity = new EventoEntity();\n entity.setId(this.id);\n entity.setCapacidad(this.capacidad);\n entity.setDistanciaVivienda(this.distanciaVivienda);\n entity.setFechaEvento(this.fechaEvento);\n entity.setNombreEvento(this.nombreEvento);\n entity.setPrivado(this.privado);\n entity.setTipoEvento(this.tipoEvento);\n entity.setUbicacionLat(this.ubicacionLat);\n entity.setUbicacionLon(this.ubicacionLon);\n return entity;\n }", "String getEntity();", "String getEntity();", "@Override\n public Boleto anular(Boleto boleto) throws CRUDException {\n\n Boleto boletoAnular = em.find(Boleto.class, boleto.getIdBoleto());\n\n Optional op = Optional.ofNullable(boletoAnular);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No existe el Boleto\");\n }\n\n if (boletoAnular.getEstado().equals(Boleto.Estado.ANULADO)) {\n throw new CRUDException(\"El Boleto ya se encuentra anulado\");\n }\n\n //Si el Boleto esta Emitido se deben dar de bajas su contabilidad\n if (boletoAnular.getEstado().equals(Boleto.Estado.EMITIDO)) {\n System.out.println(\"Anulando Boleto:\" + boleto.getIdBoleto());\n System.out.println(\"Anulando Boleto NotaDebito:\" + boleto.getIdNotaDebito());\n System.out.println(\"Anulando Boleto IngresoCaja :\" + boleto.getIdIngresoCaja());\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n\n //anulamos los asientos contables de los asientos. (AD y CI)\n ejbComprobante.anularAsientosContables(boletoAnular);\n\n //anulamos las transacciones de la nota de debito\n //El proceso de Anular la transaccion de la Nota de Debito\n //llama internamente en el Procedimiento Almacenado a un proceso de anulacion \n //las transacciones del Ingreso de Caja. esto debido a mejorar el proceso y no \n //realizar un doble barrido en la tabla de transacciones de \n //la nota dede\n ejbNotaDebito.anularTransaccion(boletoAnular);\n\n //anulamos las transacciones del Ingreso de Caja\n //ejbIngresoCaja.anularTransaccion(boleto) ;\n // si esta en Pendiente solo debe cambiar el estado\n } else if (boletoAnular.getEstado().equals(Boleto.Estado.PENDIENTE)\n || boletoAnular.getEstado().equals(Boleto.Estado.CANCELADO)) {\n boletoAnular.setEstado(Boleto.Estado.ANULADO);\n em.merge(boletoAnular);\n //Si el Boleto es Void, se puede volver a ingresar el boleto.\n }\n return boletoAnular;\n\n }", "public Object toPojo(Entity entity) {\n return ofy().load().fromEntity(entity);\n }", "public MuseologicalObjectDO getEntity(){\r\n\t\tMuseologicalObjectDO objDO = new MuseologicalObjectDO();\r\n\t\tif(objectId != null) objDO.setId(objectId);\r\n\t\tobjDO.setName(name);\r\n\t\tobjDO.setDate(date.getTime());\r\n\t\tobjDO.setObjectType(objectType);\r\n\t\treturn objDO;\r\n\t}", "public CuentaDetailDTO(CuentaEntity entity) {\r\n super(entity);\r\n if (entity != null) {\r\n if (entity.getEstudiante() != null) {\r\n this.estudiante = new EstudianteDTO(entity.getEstudiante());\r\n }\r\n if (entity.getTarjeta() != null) {\r\n if (!entity.getTarjeta().isEmpty()) {\r\n tarjeta = new ArrayList<>();\r\n for (TarjetaEntity entityTarjeta : entity.getTarjeta()) {\r\n tarjeta.add(new TarjetaDTO(entityTarjeta));\r\n }\r\n }\r\n }\r\n if (entity.getOrdenPagos() != null) {\r\n if (!entity.getOrdenPagos().isEmpty()) {\r\n ordenPagos = new ArrayList<>();\r\n for (OrdenPagoEntity entityOrdenPago : entity.getOrdenPagos()) {\r\n ordenPagos.add(new OrdenPagoDTO(entityOrdenPago));\r\n }\r\n }\r\n }\r\n }\r\n }", "public ViviendaEntity toEntity() {\r\n ViviendaEntity entity = new ViviendaEntity();\r\n entity.setIdVivienda(this.getIdVivienda());\r\n entity.setCiudad(this.getCiudad());\r\n entity.setDescripcion(this.getDescripcion());\r\n entity.setDireccion(this.getDireccion());\r\n entity.setCapacidad(this.getCapacidad());\r\n \r\n entity.setValorDiario(this.getValorDiario());\r\n entity.setImagen(this.getImagen());\r\n entity.setNumeroHabitaciones (this.getNumeroHabitaciones());\r\n return entity;\r\n }", "VentaJPA obtenerVenta(int comprobante);", "protected T getEntity() {\r\n\t\treturn entity;\r\n\t}", "public Entity toEntity(Object pojo) {\n return ofy().save().toEntity(pojo);\n }", "public ViviendaDTO(ViviendaEntity entity, String condicion)\r\n {\r\n if (entity!=null){\r\n this.idVivienda=entity.getIdVivienda();\r\n this.ciudad=entity.getCiudad();\r\n this.descripcion=entity.getDescripcion();\r\n this.direccion=entity.getDireccion();\r\n this.capacidad=entity.getCapacidad();\r\n this.valorDiario=entity.getValorDiario();\r\n this.imagen=entity.getImagen();\r\n }\r\n }", "void buildFromEntity(E entity);", "ParqueaderoEntidad agregar(ParqueaderoEntidad parqueadero);", "private IngredienteDTO converteIngredienteEntityEmDTO(final IngredienteEntity ingredienteEntity) {\n\n IngredienteDTO ingredienteDTO = new IngredienteDTO();\n\n ingredienteDTO.setCodigoIngrediente(ingredienteEntity.getCodigoIngrediente());\n ingredienteDTO.setNomeIngrediente(ingredienteEntity.getNomeIngrediente());\n ingredienteDTO.setValorIngrediente(ingredienteDTO.getValorIngrediente());\n\n return ingredienteDTO;\n }", "public List<EspecieEntity> encontrarTodos(){\r\n Query todos =em.createQuery(\"select p from EspecieEntity p\");\r\n return todos.getResultList();\r\n }", "public BlogDetailDTO (BlogEntity entity) \r\n {\r\n super(entity);\r\n if(entity.getCliente()!=null)cliente = new ClienteDTO(entity.getCliente());\r\n if(entity.getEvento()!=null)evento = new EventoDTO(entity.getEvento());\r\n \r\n }", "Object toExternal (Object entity, Settings settings);", "@Override\n public ComprobanteContable createAsientoDiarioBoleto(Boleto boleto) throws CRUDException {\n\n Optional op;\n ComprobanteContable comprobante = new ComprobanteContable();\n //ComprobanteContablePK pk = new ComprobanteContablePK();\n //pk.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setEstado(ComprobanteContable.EMITIDO);\n //comprobante.setComprobanteContablePK(pk);\n\n //creamos el concepto\n StringBuilder buff = new StringBuilder();\n\n // DESCRIPCION \n // AEROLINEA/ # Boleto / Pasajero / Rutas\n /*Aerolinea a = em.find(Aerolinea.class, boleto.getIdAerolinea().getIdAerolinea());\n if (a != null) {\n buff.append(a.getNumero());\n }*/\n buff.append(boleto.getIdAerolinea().getNumero());\n\n buff.append(\"/\");\n\n //numero boleto\n buff.append(\"#\");\n buff.append(boleto.getNumero());\n buff.append(\"/\");\n\n //Pasajero\n buff.append(boleto.getNombrePasajero().toUpperCase());\n\n // Rutas \n buff.append(\"/\");\n buff.append(boleto.getIdRuta1() != null ? boleto.getIdRuta1() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta2() != null ? boleto.getIdRuta2() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta3() != null ? boleto.getIdRuta3() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta4() != null ? boleto.getIdRuta4() : \"\");\n buff.append(\"/\");\n buff.append(boleto.getIdRuta5() != null ? boleto.getIdRuta5() : \"\");\n\n //jala el nombre cliente\n Cliente c = em.find(Cliente.class, boleto.getIdCliente().getIdCliente());\n op = Optional.ofNullable(c);\n\n if (!op.isPresent()) {\n throw new CRUDException(\"No se encontro un Cliente para el boleto\");\n }\n\n comprobante.setIdCliente(c);\n comprobante.setConcepto(buff.toString());\n comprobante.setFactorCambiario(boleto.getFactorCambiario());\n comprobante.setFecha(boleto.getFechaEmision());\n comprobante.setFechaInsert(boleto.getFechaInsert());\n comprobante.setIdEmpresa(boleto.getIdEmpresa());\n comprobante.setIdUsuarioCreador(boleto.getIdUsuarioCreador());\n comprobante.setTipo(ComprobanteContable.Tipo.ASIENTO_DIARIO);\n\n Integer numero = getNextComprobantePK(boleto.getFechaEmision(), ComprobanteContable.Tipo.ASIENTO_DIARIO);\n comprobante.setGestion(DateContable.getPartitionDateInt(DateContable.getDateFormat(boleto.getFechaEmision(), DateContable.LATIN_AMERICA_FORMAT)));\n comprobante.setIdNumeroGestion(numero);\n\n return comprobante;\n }", "public OrderDetailEntity toEntity (DetailDTO detailDTO) {\n\t\t\n\t\tOrderDetailEntity orderDetailEntity = new OrderDetailEntity();\n\t\tShoesEntity shoesEntity = shoesRepository.getShoesById(detailDTO.getShoesID());\n\t\torderDetailEntity.setShoesEntity(shoesEntity);\n\t\torderDetailEntity.setShoesName(shoesEntity.getShoesName());\n\t\torderDetailEntity.setPrice(detailDTO.getPrice());\n\t\torderDetailEntity.setQuantity(detailDTO.getQuantity());\n\t\torderDetailEntity.setDeleted(detailDTO.getDeleted());\n\t\t\n\t\treturn orderDetailEntity;\n\t}", "void save(Cartera entity);", "public AtendimentoJuridicoDTO toDTO(AtendimentoJuridicoEntity entity){\n\t\tAtendimentoJuridicoDTO dto = new AtendimentoJuridicoDTO();\n\t\tBeanUtils.copyProperties(entity, dto); \n\t\treturn dto ;\n\t}", "Lancamento persistir(Lancamento lancamento);", "private List<ComentarioEntity> listDTO2Entity(List<ComentarioDTO> dtos) {\n List<ComentarioEntity> list = new ArrayList<>();\n for (ComentarioDTO dto : dtos) {\n list.add(dto.toEntity());\n }\n return list;\n }", "V toDto(E entity);", "void create(E entity);", "public DDetRetContrArtEscenicsAttTO() { }", "E mapToEntity(D dto);", "E create(E entity);", "E create(E entity);", "private List<VueloEntity> vuelosListDTO2Entity(List<VueloDTO> dtos) {\n List<VueloEntity> list = new ArrayList<>();\n for (VueloDTO dto : dtos) {\n list.add(dto.toEntity());\n }\n return list;\n }", "ParqueaderoEntidad agregar(String nombre);", "public ViviendaDetailDTO(ViviendaEntity viviendaEntity) {\r\n super(viviendaEntity);\r\n if (viviendaEntity != null) {\r\n\r\n if (viviendaEntity.getContratos() != null) {\r\n contratos = new ArrayList<>();\r\n for (ContratoEntity entityContrato : viviendaEntity.getContratos()){\r\n contratos.add(new ContratoDTO(entityContrato));\r\n }\r\n }\r\n\r\n if (viviendaEntity.getCuartos() != null) {\r\n cuartos = new ArrayList<>();\r\n for(CuartoEntity entityCuarto : viviendaEntity.getCuartos()){\r\n cuartos.add(new CuartoDTO(entityCuarto));\r\n }\r\n }\r\n\r\n if (viviendaEntity.getSitiosDeInteres() != null){\r\n sitiosDeInteres = new ArrayList<>();\r\n for(SitioInteresEntity sitioEntity : viviendaEntity.getSitiosDeInteres()){\r\n sitiosDeInteres.add(new SitioInteresDTO(sitioEntity));\r\n }\r\n }\r\n\r\n if(viviendaEntity.getCalificaciones() != null ){\r\n calificaciones = new ArrayList<>();\r\n for(CalificacionEntity calificacionEntity : viviendaEntity.getCalificaciones()){\r\n calificaciones.add(new CalificacionDTO(calificacionEntity));\r\n }\r\n }\r\n\r\n if(viviendaEntity.getServiciosAdicionales() != null){\r\n serviciosAdicionales = new ArrayList<>();\r\n for (ServicioAdicionalEntity servicioEntity : viviendaEntity.getServiciosAdicionales()){\r\n serviciosAdicionales.add(new ServicioAdicionalDTO(servicioEntity));\r\n }\r\n }\r\n\r\n if(viviendaEntity.getServiciosIncluidos() != null){\r\n serviciosOfrecidos = new ArrayList<>();\r\n for (String servicio : viviendaEntity.getServiciosIncluidos()){\r\n serviciosOfrecidos.add(servicio);\r\n }\r\n }\r\n }\r\n }", "void create(T entity);", "@Override\n\tpublic Entity getEntity() {\n\t\treturn entity;\n\t}", "public EventoDTO(EventoEntity entity) {\n if(entity != null)\n {\n this.nombreEvento = entity.getNombreEvento();\n this.tipoEvento = entity.getTipoEvento();\n this.fechaEvento = entity.getFechaEvento();\n this.ubicacionLat = entity.getUbicacionLat();\n this.ubicacionLon = entity.getUbicacionLon();\n this.privado = entity.isPrivado();\n this.capacidad = entity.getCapacidad();\n this.distanciaVivienda = entity.getDistanciaVivienda();\n this.id = entity.getId();\n }\n }", "public CursoModel entity2model (Curso curso) {\r\n\t\t\r\n\t\tCursoModel cursoModel = new CursoModel();\r\n\t\t\r\n\t\tcursoModel.setNombre(curso.getNombre());\r\n\t\tcursoModel.setDescripcion(curso.getDescripcion());\r\n\t\tcursoModel.setHoras(curso.getHoras());\r\n\t\tcursoModel.setPrecio(curso.getPrecio());\r\n\t\t\r\n\t\treturn cursoModel;\r\n\t}", "Comment dtoToEntity(CommentDto commentDto);", "public DomicilioEntity toEntity() {\r\n DomicilioEntity domicilioEntity = new DomicilioEntity();\r\n domicilioEntity.setId(this.id);\r\n domicilioEntity.setIdZona(this.idZona);\r\n return domicilioEntity;\r\n }", "public Entity build();", "private List<Produto> retornaProduto (Long cod){\n \n Query q = entityManager.createNamedQuery(\"Produto.findByCodigo\");\n q.setParameter(\"codigo\", cod);\n List <Produto> p = q.getResultList();\n return p; \n}", "@Test\n public void createComentarioTest() {\n PodamFactory factory = new PodamFactoryImpl();\n ComentarioEntity nuevaEntity = factory.manufacturePojo(ComentarioEntity.class);\n ComentarioEntity resultado = comentarioPersistence.create(nuevaEntity);\n\n Assert.assertNotNull(resultado);\n\n ComentarioEntity entity = em.find(ComentarioEntity.class, resultado.getId());\n\n Assert.assertEquals(nuevaEntity.getNombreUsuario(), entity.getNombreUsuario());\n \n }", "private Empresa converterDtoParaEmpresa(CadastroPJDto cadastroPJDto) {\n\t\tEmpresa empresa = new Empresa();\n\t\tempresa.setCnpj(cadastroPJDto.getCnpj());\n\t\tempresa.setRazaoSocial(cadastroPJDto.getRazaoSocial());\n\n\t\treturn empresa;\n\t}", "public Entity(String name)\n {\n super(name);\n isAs = Lists.newArrayList();\n }", "Persona PersonaDTOToPersona(PersonaDTO personaDTO);", "public List<PersonaDTO> consultarPersonas() ;", "@Override\n\tpublic void convertDaoToFrom(CommonEntity ent) {\n\t\tMovie dao=(Movie) ent;\n\t\tthis.setBackgroundImage(dao.getBackgroundImage());\n\t\tthis.setDesc(dao.getDescription());\n\t\tthis.setEmbed(dao.getEmbed());\n\t\tthis.setFeatured(dao.isFeatured());\n\t\tthis.setLatitude(dao.getMap().getLattitude());\n\t\tthis.setLongitude(dao.getMap().getLongitude());\n\t\tthis.setName(dao.getTitle());\n\t\tthis.setRank(dao.getRank());\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic Table getEntity(TableDTO dto) {\n\t\treturn null;\r\n\t}", "EntityBeanDescriptor createEntityBeanDescriptor();", "PersonaDTO PersonaToPersonaDTO(Persona persona);", "public E getEntity() {\n return this.entity;\n }", "public void updateByEntity(Paciente paciente) {\n\t\n}", "public void setEspecialidad (EspecialidadEntity pEspecialidad)\r\n {\r\n this.especialidad = pEspecialidad;\r\n }", "@Test\n public void createQuejaEntityTest() {\n PodamFactory factory = new PodamFactoryImpl();\n QuejaEntity newEntity = factory.manufacturePojo(QuejaEntity.class);\n QuejaEntity result = quejaPersistence.create(newEntity);\n\n Assert.assertNotNull(result);\n QuejaEntity entity = em.find(QuejaEntity.class, result.getId());\n Assert.assertNotNull(entity);\n Assert.assertEquals(newEntity.getName(), entity.getName());\n}", "public DaoAbstrato(Class<T> entityClass) {\n this.entity = entityClass;\n }", "@Override\r\n\tprotected Entity getEntityByFields() throws SQLException {\n\t\t\r\n\t\tint id = rs.getInt(\"id\");\r\n\t\tint productId = rs.getInt(\"id_product\");\r\n\t\tString productName = super.getString(\"productName\");\t// From INNER JOIN\r\n\t\tString productUnit = super.getString(\"productUnit\");\t// From INNER JOIN\r\n\t\tfloat quantity = rs.getFloat(\"quantity\");\r\n\t\tfloat price = rs.getFloat(\"price\");\r\n\t\tfloat summa = rs.getFloat(\"summa\");\r\n\t\t\r\n\t\treturn new DocInvoiceItem(id, productId, productName, productUnit, quantity, price, summa);\r\n\t}", "public ProductoDTO(){\r\n\t\t\r\n\t}", "List<TransportEntity> getAllEntityOfQuery();", "public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\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} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}", "public EntityBase getEntity() {\n return entity;\n }", "private List<EquipoDetailDTO> listEntity2DTO(List<EquipoEntity> listaEntidades)\n {\n List<EquipoDetailDTO> lista = new ArrayList<>();\n for (EquipoEntity e: listaEntidades) \n {\n lista.add(new EquipoDetailDTO(e));\n }\n return lista;\n }", "public void crearPersona(PersonaDTO personaDTO);", "@Override\n public Comment toEntity(CommentDTO dto) {\n Comment entity = new Comment();\n entity.setId(dto.getId());\n entity.setStatus(dto.getStatus());\n entity.setSenderId(dto.getSender().getId());\n entity.setSenderName(dto.getSender().getName());\n entity.setText(dto.getText());\n// entity.setRentInfo(rentInfoDtoMapper.toEntity(dto.getRentInfo()));\n return entity;\n }", "@Override\n public Preparation mapToEntity(PreparationDto dto) {\n return null;\n }", "public Entidad getEntidad() {\n return entidad;\n }", "public Persona newEntity(String nome, String cognome) {\n return newEntity(nome, cognome, \"\", \"\", (Address) null);\n }" ]
[ "0.735221", "0.71379894", "0.7105459", "0.6873525", "0.6698784", "0.6594768", "0.6570399", "0.6492542", "0.6484925", "0.63565886", "0.6247155", "0.6216462", "0.6206151", "0.6188953", "0.6157518", "0.6141779", "0.6140077", "0.6129646", "0.61108655", "0.6104799", "0.608992", "0.60742295", "0.6063383", "0.6053477", "0.60484505", "0.60433805", "0.60432553", "0.60113454", "0.60096246", "0.6008196", "0.5969591", "0.5962947", "0.59625965", "0.59433746", "0.593723", "0.59341896", "0.5921255", "0.5921255", "0.5904986", "0.58953226", "0.5889028", "0.5883844", "0.58663464", "0.5863795", "0.58585596", "0.5857418", "0.58520037", "0.5850419", "0.58498913", "0.5849692", "0.58318496", "0.58203787", "0.5813619", "0.580389", "0.58001184", "0.57868654", "0.5756263", "0.5746734", "0.5745528", "0.57451606", "0.57437557", "0.5731711", "0.5718669", "0.5718286", "0.5718286", "0.5705385", "0.57027525", "0.5696803", "0.5685335", "0.56852096", "0.5680971", "0.56801236", "0.56779426", "0.56747735", "0.5664556", "0.5661864", "0.5658573", "0.56421286", "0.5639984", "0.56318915", "0.5629516", "0.5617619", "0.5607503", "0.5603875", "0.55906695", "0.55906034", "0.5585166", "0.55833685", "0.5574875", "0.5572955", "0.5563398", "0.55575305", "0.5557299", "0.5554791", "0.55512965", "0.55468476", "0.5546399", "0.554468", "0.5538099", "0.5535515", "0.5534377" ]
0.0
-1
TODO: Add different browser detection methods from browser.js Check if user agent is a mobile platform.
public static native boolean isMobile() /*-{ return $wnd.floatz.browser.isMobile(); }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testMobileDetectionEmptyUserAgent()\n\t{\n\t\tfinal String[] uas =\n\t\t{ \"-\", \"\", \" \", \"\\n\", \"\\t\", \"\\0\" };\n\n\t\tfor (int index = 0; index < uas.length; index++)\n\t\t{\n\t\t\tfinal String userAgent = uas[index];\n\t\t\tLOG.info(\"Testing :\" + userAgent);\n\n\t\t\tassertFalse(\"No markup method should render a false positive\", detectionService.isWmlCapable(userAgent, null)\n\t\t\t\t\t|| detectionService.isXhtmlCapable(userAgent, null) || detectionService.isiPhoneCapable(userAgent, null));\n\n\t\t\tassertFalse(\"Api should fail to identify as a mobile device: (\" + userAgent + \")\",\n\t\t\t\t\tdetectionService.isMobileDevice(userAgent));\n\t\t\tassertFalse(\"Api wrongly identify as a desktop device: (\" + userAgent + \")\", detectionService.isDesktop(userAgent));\n\t\t}\n\n\t}", "@Test\n public void testMobileIOS() throws GeneralLeanFtException, InterruptedException, ReportException {\n Browser browser;\n try {\n System.out.println(\"Running test on iOS mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"IOS\");\n description.setOsVersion(\">=9.0\");\n\n Device device = MobileLab.lockDevice(description);\n browser = BrowserFactory.launch(BrowserType.SAFARI, device);\n navigateBrowser(browser);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Safari on iOS\", Status.Passed, browser.getSnapshot());\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n }", "@Test\n\tpublic void testDesktopNonIphone()\n\t{\n\n\t\tfor (final String ua : desktop_ua)\n\t\t{\n\t\t\tLOG.info(\"Testing :\" + ua);\n\t\t\tassertTrue(\"Api fails to identify as a desktop device: (\" + ua + \")\", detectionService.isDesktop(ua));\n\t\t\tassertFalse(\"Api wrongly identify as a iphone: (\" + ua + \")\", detectionService.isiPhoneCapable(ua,\n\t\t\t\t\tnew ArrayList<String>()));\n\t\t\tassertFalse(\"Api wrongly identify as a mobile device: (\" + ua + \")\", detectionService.isMobileDevice(ua));\n\t\t}\n\n\t}", "public boolean isMobile() {\n return SecurityUtil.isMobile();\n }", "boolean hasMobileDeviceConstant();", "@Test\n public void testMobileAndroid() {\n try {\n\n System.out.println(\"Running test on Android mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"Android\");\n description.setOsVersion(\">=6.0\");\n\n Device device = MobileLab.lockDevice(description);\n Browser browser2 = BrowserFactory.launch(BrowserType.CHROME, device);\n navigateBrowser(browser2);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Chrome on Android\", Status.Passed, browser2.getSnapshot());\n windowsSync(1500);\n\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n catch (StringIndexOutOfBoundsException soobEx) {System.out.println(\"StringIndexOutOfBoundsException: \" + soobEx.getMessage());}\n }", "private static boolean supportedPlatform() {\n return System.getProperty(\"os.name\").startsWith(\"iPhone\");\n }", "public static native boolean isMobileWebkit() /*-{\r\n\t\treturn $wnd.floatz.browser.isMobileWebkit();\r\n\t}-*/;", "@Test\n\tpublic void osX_10_7_3_Safari5_1_5() {\n\t\trequest.addHeader(USER_AGENT, UserAgent.OSX_10_7_3_Safari5_1_5);\n\t\tDevice device = resolver.resolveDevice(request);\n\t\tassertEquals(device.toString(), NORMAL_TO_STRING);\n\t}", "boolean hasMobile(String name);", "public static String userAgent() {\n Random random = new Random();\n return userAgents.get(random.nextInt(userAgents.size()));\n }", "private boolean isMobileconnected(){\n\t\tConnectivityManager connMgr\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo networkInfo\n\t\t= connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); \n\t\tboolean isMobileConn = networkInfo.isConnected();\n\t\treturn isMobileConn;\n\t}", "public java.lang.String getMobile () {\r\n\t\treturn mobile;\r\n\t}", "public static String getUserAgent()\n {\n return USER_AGENT;\n }", "public String deviceType(){\n String deviceType;\n size = driver.manage().window().getSize();\n if((size.getHeight()>800)&&(size.getWidth()>500)){\n return deviceType = \"iPad\";\n } else {\n return deviceType = \"iPhone\";\n }\n }", "public String getMobile() {\r\n return mobile;\r\n }", "public String getMobile() {\r\n return mobile;\r\n }", "public String getExecutorMobile() {\n return executorMobile;\n }", "@Test\n\tpublic void iPodTouch() {\n\t\trequest.addHeader(USER_AGENT, UserAgent.iPodTouch_iOS1_1_3);\n\t\tDevice device = resolver.resolveDevice(request);\n\t\tassertMobile(device);\n\t}", "public String getMobile() {\n\t\treturn mobile;\n\t}", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getMobile() {\n return mobile;\n }", "public String getUserAgent(){\n return this.userAgent;\n }", "public static String getMobile(final IUser iUser) {\r\n try {\r\n return SecurityManagerFactory.getSecurityManager().executeAsSystem(new Callable<String>() {\r\n public String call() {\r\n try {\r\n return iUser.getProperty(UserUtils.MOBILE);\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }\r\n });\r\n } catch (Exception e) {\r\n Ivy.log().error(e);\r\n return null;\r\n }\r\n }", "String getBrowser();", "abstract String getUserAgent();", "boolean hasUserAgent();", "public static boolean isBrowser(String[] nonBrowserUserAgents, HttpServletRequest request) {\n String userAgent = request.getHeader(\"User-Agent\");\n LOG.debug(\"User agent is \" + userAgent);\n if (userAgent == null) {\n return false;\n }\n userAgent = userAgent.toLowerCase(Locale.ENGLISH);\n boolean isBrowser = true;\n for (String nonBrowserUserAgent : nonBrowserUserAgents) {\n if (userAgent.contains(nonBrowserUserAgent)) {\n isBrowser = false;\n break;\n }\n }\n return isBrowser;\n }", "public String getUserAgent() {\n return userAgent;\n }", "public static boolean isConnectedMobile(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }", "public static boolean isConnectedMobile(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }", "public boolean getIsImmobile() {\n\t\treturn isImmobile;\n\t}", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "String platform();", "private void checkUserAgent() {\n val userAgent = config.getString(\"user_agent\");\n\n checkArgument(!isNullOrEmpty(userAgent), \"user_agent is not set!\");\n }", "@Test(groups = {\"Sorting_003\"})\n @Execute(asUser = User.USER_3)\n @InBrowser(browserSize = MOBILE_RESOLUTION)\n public void loggedInUserOnMobileCanSortPostsList() {\n userCanSwitchBetweenLatestAndTrendingInDropdown();\n }", "public boolean isTablet();", "@Override\n public boolean isCompatible(ServerSideSession session) {\n return session.isSafariRealDevice();\n }", "String getMobile(String name);", "java.lang.String getUserAgent();", "public static boolean isEmulator(){\n String brand = Build.BRAND;\n if (brand.equalsIgnoreCase(\"generic\")) {\n return true;\n } else {\n return false;\n }\n }", "Object getPlatform();", "public boolean isSetApplierMobile() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPLIERMOBILE_ISSET_ID);\n }", "public static boolean isConnectedMobile(Context context) {\n NetworkInfo info = getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }", "private static BrowserType getBrowserType()\n\t{\n\t\tString browserType = System.getProperty(BROWSER_KEY);\n\t\tif (browserType == null || browserType.isEmpty())\n\t\t{ \n\t\t\treturn BrowserType.Firefox;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tint type = Integer.parseInt(browserType);\n\t\t\t\n\t\t\tif (BrowserType.InternetExplorer.getCode() == type)\n\t\t\t{\n\t\t\t\treturn BrowserType.InternetExplorer;\n\t\t\t}\n\t\t\telse if (BrowserType.Chrome.getCode() == type)\n\t\t\t{\n\t\t\t\treturn BrowserType.Chrome;\n\t\t\t}\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn BrowserType.Firefox;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}", "public String getBrowser() {\n String browser = null;\n\n try\n {\n browser = System.getProperty(\"browser\");\n if(browser !=null)\n return browser;\n else\n return prop.getProperty(BROWSER_KEY);\n\n\n }catch(Exception e)\n {\n return prop.getProperty(BROWSER_KEY);\n }\n\n\n }", "@ApiModelProperty(value = \"Statistics of the campaign on the basis of mobile devices\")\n public Map<String, GetDeviceBrowserStats> getMobile() {\n return mobile;\n }", "private String createUserAgent() {\n String userAgentString = createUserAgentString();\n StringBuilder result = new StringBuilder();\n\n // Removing invalid characters\n for (int i = 0; i < userAgentString.length(); i++) {\n char c = userAgentString.charAt(i);\n if (c == '\\t' || ('\\u0020' <= c && c <= '\\u007e')) {\n result.append(c);\n }\n }\n return result.toString();\n }", "public java.lang.String getUserAgent() {\n java.lang.Object ref = userAgent_;\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 userAgent_ = s;\n }\n return s;\n }\n }", "public java.lang.String getUserAgent() {\n java.lang.Object ref = userAgent_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n userAgent_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getUserMobile() {\n return userMobile;\n }", "public String getUserMobile() {\n return userMobile;\n }", "public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "private void setOsType() {\n addToMobileContext(Parameters.OS_TYPE, \"android\");\n }", "private boolean m21865i() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n return telephonyManager.getNetworkOperatorName().equalsIgnoreCase(\"android\");\n }\n return false;\n }", "public void setUserAgent(String userAgent){\n this.userAgent = userAgent;\n }", "public String getUserAgent();", "public final String getUserAgent() {\n return properties.get(USER_AGENT_PROPERTY);\n }", "String getUserAgent();", "public static String getBrowser() {\n if (System.getProperty(\"browser\") == null) {\n return \"chrome\";\n } else {\n return System.getProperty(\"browser\").toLowerCase();\n }\n }", "public static boolean useInternalBrowser() {\n\t\treturn (isWindows() || isLinux() || isMac());\n\t}", "private String getUserAgent(HTTPSampleResult sampleResult) {\n String res = sampleResult.getRequestHeaders();\n int index = res.indexOf(USER_AGENT);\n if (index >= 0) {\n // see HTTPHC3Impl#getConnectionHeaders\n // see HTTPHC4Impl#getConnectionHeaders\n // see HTTPJavaImpl#getConnectionHeaders\n //': ' is used by JMeter to fill-in requestHeaders, see getConnectionHeaders\n final String userAgentPrefix = USER_AGENT+\": \";\n String userAgentHdr = res.substring(\n index+userAgentPrefix.length(),\n res.indexOf('\\n',// '\\n' is used by JMeter to fill-in requestHeaders, see getConnectionHeaders\n index+userAgentPrefix.length()+1));\n return userAgentHdr.trim();\n } else {\n if (log.isInfoEnabled()) {\n log.info(\"No user agent extracted from requestHeaders:\" + res);\n }\n return null;\n }\n }", "public void setExecutorMobile(String executorMobile) {\n this.executorMobile = executorMobile;\n }", "@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}", "@Override\n\tpublic String getPhoneBrand()\n\t{\n\t\treturn \"Phone model is iPhone.\";\n\t}", "private void determinePlatform() {\n \t\tString os = System.getProperty(\"os.name\");\n \t\t\n \t\tif (os == null)\n \t\t\tthrow new RuntimeException();\n \t\t\n \t\tif (os.startsWith(WINDOWS_ID))\n \t\t\tisWindows = true;\n \t\telse\n \t\t\tisUnixLike = true;\n \t}", "private void findOsVersion() {\n\t\tisGBOrLower = AppUtility.isAndroidGBOrLower();\n\t\tisICSOrHigher = AppUtility.isAndroidICSOrHigher();\n\t}", "private static boolean m4017c() {\n String property = System.getProperty(\"java.runtime.name\");\n if (property == null) {\n return false;\n }\n return property.toLowerCase(Locale.US).contains(AlibcMiniTradeCommon.PF_ANDROID);\n }", "public interface WebsiteDetector {\n Boolean detect( String htmlBody );\n}", "public static String m21397c(Context context) {\n if (TextUtils.isEmpty(f16892c)) {\n try {\n f16892c = VERSION.SDK_INT >= 17 ? WebSettings.getDefaultUserAgent(context) : m21385a();\n } catch (Throwable unused) {\n f16892c = m21385a();\n }\n }\n return f16892c;\n }", "java.lang.String getAgentMac();", "private static String getUserAgent() {\n return \"FBAndroidSDK\";\n }", "public static BrowserType getBrowserType() {\n logger.trace(\"Get the BrowserType\");\n return driverThread.get().getBrowserType();\n }", "public boolean isAbovePlatform() { return isAbovePlatform; }", "public int getMobile() {\n\t\t\treturn Mobile;\r\n\t\t}", "public int getMobile() {return mobile;}", "public interface MediaBrowserProvider {\n MediaBrowserCompat getMediaBrowser();\n}", "public boolean isMobileNoLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Mobile No.\"), SHORTWAIT);\r\n\t}", "public String getBrowserType(){\n\t\treturn browserType;\n\t}", "public boolean isMobHead() {\n return this.type == Type.MOBHEAD;\n }", "boolean onPhone() {\n\t\treturn ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)\n\t\t\t\t< Configuration.SCREENLAYOUT_SIZE_LARGE);\n\t}", "private void checkMobileAvailable(HttpServletRequest request, @NotNull long mobile) {\r\n\t\tString action = getCleanParam(request, config.getParam().getSmsActionName());\r\n\t\t// bind phone , needn't Check account exist\r\n\t\tif (BIND == (Action.safeOf(action))) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t// Getting account information\r\n\t\tIamAccountInfo acc = configurer.getIamAccount(new SmsParameter(String.valueOf(mobile)));\r\n\r\n\t\t// Check mobile(user) available\r\n\t\tif (!(acc != null && !StringUtils.isEmpty(acc.getPrincipal()))) {\r\n\t\t\tlog.warn(\"Illegal users, because mobile phone number: {} corresponding users do not exist\", mobile);\r\n\t\t\tthrow new UnknownAccountException(bundle.getMessage(\"GeneralAuthorizingRealm.notAccount\", String.valueOf(mobile)));\r\n\t\t}\r\n\r\n\t}", "protected String getUserAgent() {\n return null;\n }", "public Optional<Version> platform() { return platform; }", "Capabilities getCapabilities();" ]
[ "0.69283855", "0.6564953", "0.6307931", "0.6261375", "0.6209862", "0.62070704", "0.6165279", "0.6096642", "0.58277565", "0.582155", "0.57600456", "0.5719315", "0.5692708", "0.56808144", "0.56789696", "0.5575821", "0.5575821", "0.5566314", "0.5558163", "0.55520874", "0.5518329", "0.5515908", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.55018586", "0.54976606", "0.54753804", "0.5466238", "0.54653966", "0.5440024", "0.54273117", "0.5413036", "0.54075027", "0.54075027", "0.538028", "0.5376095", "0.5375731", "0.53690076", "0.53560656", "0.535565", "0.53380966", "0.5320711", "0.5314994", "0.53088516", "0.52967024", "0.5289535", "0.5268597", "0.5268336", "0.5268255", "0.5262302", "0.5226445", "0.5221914", "0.52173996", "0.5217337", "0.52160835", "0.52160835", "0.5203852", "0.5201518", "0.519539", "0.5192276", "0.51791996", "0.5164525", "0.51569206", "0.5147282", "0.51439476", "0.514298", "0.5137189", "0.5136857", "0.5134534", "0.5128767", "0.50930345", "0.5077748", "0.5052511", "0.50464714", "0.50327224", "0.50300586", "0.50298995", "0.50248563", "0.5021834", "0.50146717", "0.50126624", "0.5012524", "0.50077015", "0.50006557", "0.4989953", "0.49806315", "0.49767473", "0.4973428", "0.49662068" ]
0.6190555
6
Check if user agent is a mobile webkit platform.
public static native boolean isMobileWebkit() /*-{ return $wnd.floatz.browser.isMobileWebkit(); }-*/;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static native boolean isMobile() /*-{\r\n\t\treturn $wnd.floatz.browser.isMobile();\r\n\t}-*/;", "public boolean isMobile() {\n return SecurityUtil.isMobile();\n }", "private static boolean supportedPlatform() {\n return System.getProperty(\"os.name\").startsWith(\"iPhone\");\n }", "boolean hasMobileDeviceConstant();", "@Test\n\tpublic void testMobileDetectionEmptyUserAgent()\n\t{\n\t\tfinal String[] uas =\n\t\t{ \"-\", \"\", \" \", \"\\n\", \"\\t\", \"\\0\" };\n\n\t\tfor (int index = 0; index < uas.length; index++)\n\t\t{\n\t\t\tfinal String userAgent = uas[index];\n\t\t\tLOG.info(\"Testing :\" + userAgent);\n\n\t\t\tassertFalse(\"No markup method should render a false positive\", detectionService.isWmlCapable(userAgent, null)\n\t\t\t\t\t|| detectionService.isXhtmlCapable(userAgent, null) || detectionService.isiPhoneCapable(userAgent, null));\n\n\t\t\tassertFalse(\"Api should fail to identify as a mobile device: (\" + userAgent + \")\",\n\t\t\t\t\tdetectionService.isMobileDevice(userAgent));\n\t\t\tassertFalse(\"Api wrongly identify as a desktop device: (\" + userAgent + \")\", detectionService.isDesktop(userAgent));\n\t\t}\n\n\t}", "boolean hasUserAgent();", "boolean hasMobile(String name);", "private boolean isMobileconnected(){\n\t\tConnectivityManager connMgr\n\t\t= (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE);\n\t\tNetworkInfo networkInfo\n\t\t= connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE); \n\t\tboolean isMobileConn = networkInfo.isConnected();\n\t\treturn isMobileConn;\n\t}", "public boolean isTablet();", "public static boolean isConnectedMobile(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }", "public static boolean isConnectedMobile(Context context){\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }", "public static boolean isBrowser(String[] nonBrowserUserAgents, HttpServletRequest request) {\n String userAgent = request.getHeader(\"User-Agent\");\n LOG.debug(\"User agent is \" + userAgent);\n if (userAgent == null) {\n return false;\n }\n userAgent = userAgent.toLowerCase(Locale.ENGLISH);\n boolean isBrowser = true;\n for (String nonBrowserUserAgent : nonBrowserUserAgents) {\n if (userAgent.contains(nonBrowserUserAgent)) {\n isBrowser = false;\n break;\n }\n }\n return isBrowser;\n }", "public static boolean isConnectedMobile(Context context) {\n NetworkInfo info = getNetworkInfo(context);\n return (info != null && info.isConnected() && info.getType() == ConnectivityManager.TYPE_MOBILE);\n }", "@Override\n public boolean isCompatible(ServerSideSession session) {\n return session.isSafariRealDevice();\n }", "public static boolean isBrowserSafari() {\r\n\t\treturn ConfigProperties.BROWSER.equalsIgnoreCase(SAFARI);\r\n\t}", "public boolean getIsImmobile() {\n\t\treturn isImmobile;\n\t}", "public static boolean isMobile(String mobile) {\n if (StringUtils.isEmpty(mobile)) return false;\n return MOBILE_PATTERN.matcher(mobile).matches();\n }", "public boolean isMobileNetworkEnabled() {\n final NetworkInfo info = mConnectivityManager.getNetworkInfo(\n ConnectivityManager.TYPE_MOBILE);\n return (info != null && info.isConnected());\n }", "@Test\n\tpublic void osX_10_7_3_Safari5_1_5() {\n\t\trequest.addHeader(USER_AGENT, UserAgent.OSX_10_7_3_Safari5_1_5);\n\t\tDevice device = resolver.resolveDevice(request);\n\t\tassertEquals(device.toString(), NORMAL_TO_STRING);\n\t}", "@Test\n public void testMobileIOS() throws GeneralLeanFtException, InterruptedException, ReportException {\n Browser browser;\n try {\n System.out.println(\"Running test on iOS mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"IOS\");\n description.setOsVersion(\">=9.0\");\n\n Device device = MobileLab.lockDevice(description);\n browser = BrowserFactory.launch(BrowserType.SAFARI, device);\n navigateBrowser(browser);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Safari on iOS\", Status.Passed, browser.getSnapshot());\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n }", "public static boolean useInternalBrowser() {\n\t\treturn (isWindows() || isLinux() || isMac());\n\t}", "@Test\n\tpublic void iPodTouch() {\n\t\trequest.addHeader(USER_AGENT, UserAgent.iPodTouch_iOS1_1_3);\n\t\tDevice device = resolver.resolveDevice(request);\n\t\tassertMobile(device);\n\t}", "public boolean isSetApplierMobile() {\n return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __APPLIERMOBILE_ISSET_ID);\n }", "public static boolean isMac() {\n String os=System.getProperty(\"os.name\").toLowerCase();\n if(\"mac\".equals(os.substring(0,3)))\n {\n return true;\n }\n return false;\n \n }", "@Test\n\tpublic void testDesktopNonIphone()\n\t{\n\n\t\tfor (final String ua : desktop_ua)\n\t\t{\n\t\t\tLOG.info(\"Testing :\" + ua);\n\t\t\tassertTrue(\"Api fails to identify as a desktop device: (\" + ua + \")\", detectionService.isDesktop(ua));\n\t\t\tassertFalse(\"Api wrongly identify as a iphone: (\" + ua + \")\", detectionService.isiPhoneCapable(ua,\n\t\t\t\t\tnew ArrayList<String>()));\n\t\t\tassertFalse(\"Api wrongly identify as a mobile device: (\" + ua + \")\", detectionService.isMobileDevice(ua));\n\t\t}\n\n\t}", "public boolean isMobHead() {\n return this.type == Type.MOBHEAD;\n }", "public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "boolean onPhone() {\n\t\treturn ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)\n\t\t\t\t< Configuration.SCREENLAYOUT_SIZE_LARGE);\n\t}", "private boolean m21865i() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n return telephonyManager.getNetworkOperatorName().equalsIgnoreCase(\"android\");\n }\n return false;\n }", "public static boolean isMac() {\n\t\tString platform = SWT.getPlatform();\n\t\t\n\t\treturn (platform.equalsIgnoreCase(\"carbon\") || platform.equalsIgnoreCase(\"cocoa\"));\n\t}", "@java.lang.Override\n public boolean hasUserAgentVersion() {\n return userAgentVersionTypeCase_ == 7;\n }", "public static boolean isMac()\n {\n return System.getProperty(\"os.name\").toLowerCase().startsWith(\"mac os x\");\n }", "private void checkUserAgent() {\n val userAgent = config.getString(\"user_agent\");\n\n checkArgument(!isNullOrEmpty(userAgent), \"user_agent is not set!\");\n }", "@CalledByNative\n @Override\n protected boolean isInstalledWebappDelegateGeolocation() {\n return mDelegate.isInstalledWebappDelegateGeolocation();\n }", "public static boolean isEmulator(){\n String brand = Build.BRAND;\n if (brand.equalsIgnoreCase(\"generic\")) {\n return true;\n } else {\n return false;\n }\n }", "public static boolean onMac() {\n return System.getProperty(\"mrj.version\") != null || System.getProperty(\"os.name\").toLowerCase(Locale.US).startsWith(\"mac \");\n }", "private static boolean m4017c() {\n String property = System.getProperty(\"java.runtime.name\");\n if (property == null) {\n return false;\n }\n return property.toLowerCase(Locale.US).contains(AlibcMiniTradeCommon.PF_ANDROID);\n }", "public boolean isMobileNoLabelPresent() {\r\n\t\treturn isElementPresent(vehicleName.replace(\"Vehicle Name\", \"Mobile No.\"), SHORTWAIT);\r\n\t}", "public boolean isSetBrowser() {\n return this.browser != null;\n }", "public static boolean isLoadForHome() {\n boolean isSupport = 1 == SystemProperties.getInt(\n \"ro.mtk_c2k_om_nw_sel_type\", 0) ? false : true;\n Log.d(TAG, \"isLoadForHome(): \" + isSupport);\n return isSupport;\n }", "private boolean isPassThruRequest(String userAgent){\n //TODO we can make this more generic, but there are no plans to support anything\n //other than CFME at this time.\n if (userAgent == null){\n return false;\n }\n return userAgent.contains(Constants.CFME_USER_AGENT_BASE) ? true : false;\n }", "boolean isDesktopGL();", "public static boolean isPlatformMac() {\r\n\t\tPlatform current = Platform.getCurrent();\r\n\t\treturn Platform.MAC.is(current);\r\n\t}", "protected boolean isUploadSupported() {\n if (MyWebApp.isDesktop()) {\n return true;\n } else {\n return false;\n }\n//\n//\n// if (MyWebApp.isMobileDevice()) {\n// return false;\n// }\n//\n// return true;\n }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "public static boolean hasTouchScreen(Context context) {\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.touchscreen\")) {\n Log.d(\"HardwareFeatureTest\", \"Device has a touch screen.\");\n return true;\n }\n return false;\n }", "public static String getUserAgent()\n {\n return USER_AGENT;\n }", "@java.lang.Override\n public boolean hasUserAgentBuildVersion() {\n return userAgentVersionTypeCase_ == 8;\n }", "@Test\n public void testMobileAndroid() {\n try {\n\n System.out.println(\"Running test on Android mobile browser\");\n DeviceDescription description = new DeviceDescription();\n description.setOsType(\"Android\");\n description.setOsVersion(\">=6.0\");\n\n Device device = MobileLab.lockDevice(description);\n Browser browser2 = BrowserFactory.launch(BrowserType.CHROME, device);\n navigateBrowser(browser2);\n Reporter.reportEvent(\"Image of Mobile\", \"Using Chrome on Android\", Status.Passed, browser2.getSnapshot());\n windowsSync(1500);\n\n }\n catch (GeneralLeanFtException glftex) {System.out.println(\"GeneralLeanFtException: \" + glftex.getMessage());}\n catch (InterruptedException iex) {System.out.println(\"InterruptedException: \" + iex.getMessage());}\n catch (ReportException rex){System.out.println(\"ReportException: \" + rex.getMessage());}\n catch (StringIndexOutOfBoundsException soobEx) {System.out.println(\"StringIndexOutOfBoundsException: \" + soobEx.getMessage());}\n }", "public static boolean isMmsCapable(Context context) {\n\t\tTelephonyManager telephonyManager = (TelephonyManager) context\n\t\t\t\t.getSystemService(Context.TELEPHONY_SERVICE);\n\t\tif (telephonyManager == null) {\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tClass<?> partypes[] = new Class[0];\n\t\t\tMethod sIsVoiceCapable = TelephonyManager.class.getMethod(\n\t\t\t\t\t\"isVoiceCapable\", partypes);\n\n\t\t\tObject arglist[] = new Object[0];\n\t\t\tObject retobj = sIsVoiceCapable.invoke(telephonyManager, arglist);\n\t\t\treturn (Boolean) retobj;\n\t\t} catch (java.lang.reflect.InvocationTargetException ite) {\n\t\t\t// Failure, must be another device.\n\t\t\t// Assume that it is voice capable.\n\t\t} catch (IllegalAccessException iae) {\n\t\t\t// Failure, must be an other device.\n\t\t\t// Assume that it is voice capable.\n\t\t} catch (NoSuchMethodException nsme) {\n\t\t}\n\t\treturn true;\n\t}", "public static boolean isMultiSimDevice(Context context) {\n return false;\n }", "public boolean isWebShowing();", "public boolean hasUserAgent() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean hasUserAgent() {\n return ((bitField0_ & 0x00000004) == 0x00000004);\n }", "public boolean isAbovePlatform() { return isAbovePlatform; }", "public boolean isTablet() { \n\t \tTelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t \tint type = telephony.getPhoneType();\n\t \tif (type == TelephonyManager.PHONE_TYPE_NONE) { return true;} \n\t \t return false; \n\t }", "public static boolean isBrowserChrome() {\r\n\t\treturn ConfigProperties.BROWSER.equalsIgnoreCase(CHROME);\r\n\t}", "@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}", "private static boolean isPhoneTypeLTE() {\n return true;\n }", "private boolean isXLargeTablet() {\n if (((WindowManager) this.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation() % 180 != 0)\n return true;\n return false;\n }", "private static boolean isMacOSX() {\n String os = System.getProperty(\"os.name\").toLowerCase();\n return os.contains(\"mac\") || os.contains(\"darwin\");\n }", "private boolean isNativeBullet() {\n try {\n Class clazz = Class.forName(\"com.jme3.bullet.util.NativeMeshUtil\");\n return clazz != null;\n } catch (ClassNotFoundException exception) {\n return false;\n }\n }", "public final boolean isOn3G(Context ctx)\n {\n NetworkInfo info = ((ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE))\n .getActiveNetworkInfo();\n return info != null && info.getTypeName().toLowerCase().equals(\"mobile\");\n }", "public static boolean isTablet() {\r\n\t\treturn isTablet;\r\n\t}", "public java.lang.String getMobile () {\r\n\t\treturn mobile;\r\n\t}", "boolean hasMobileAppCategoryConstant();", "boolean currentNodeRequiresClickInWebKit(){\r\n \tif( _currentFocusNode == null ){\r\n \t\treturn false;\r\n \t} \t\r\n if( DeviceInfo.isBlackBerry6() ){\r\n if( _currentFocusNode instanceof HTMLInputElement ){\r\n String type = ( ( HTMLInputElement ) _currentFocusNode ).getType();\r\n return REQUIRE_CLICK_INPUT_TYPES.indexOf( type ) > 0;\r\n }\r\n } \r\n return false;\r\n }", "public boolean isMobileNoFieldPresent() {\r\n\t\treturn isElementPresent(vehicleNameField.replace(\"vehicle_name\", \"sim_no\"), SHORTWAIT);\r\n\t}", "public static boolean isSingaporeMobile(String mobilePhone)\n {\n\t\tif (mobilePhone == null)\n\t\t\treturn false;\n\n if(!mobilePhone.startsWith(\"+\"))\n mobilePhone = canonicalizeMobilePhone(mobilePhone);\n\n //local mobile should be >=11;\n if(mobilePhone.startsWith(\"+65\"))\n return true;\n\n return false;\n\t}", "public String deviceType(){\n String deviceType;\n size = driver.manage().window().getSize();\n if((size.getHeight()>800)&&(size.getWidth()>500)){\n return deviceType = \"iPad\";\n } else {\n return deviceType = \"iPhone\";\n }\n }", "public boolean isSetBrowser()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BROWSER$0) != 0;\n }\n }", "public final boolean isMac() {\n\t\treturn isMac;\n\t}", "private boolean isSmallTablet(DisplayMetrics metrics) {\n float dpWidth = metrics.widthPixels / metrics.density;\n return (dpWidth >= 600 && dpWidth < 720);\n }", "public static boolean isTablet() {\n return TeamUp.getAppContext().getResources().getBoolean(R.bool.is_tablet);\n }", "@Test(groups = {\"Sorting_003\"})\n @Execute(asUser = User.USER_3)\n @InBrowser(browserSize = MOBILE_RESOLUTION)\n public void loggedInUserOnMobileCanSortPostsList() {\n userCanSwitchBetweenLatestAndTrendingInDropdown();\n }", "java.lang.String getUserAgent();", "public String getUserAgent(){\n return this.userAgent;\n }", "public static String userAgent() {\n Random random = new Random();\n return userAgents.get(random.nextInt(userAgents.size()));\n }", "public String getMobile() {\n\t\treturn mobile;\n\t}", "public boolean isTablet() {\n return mState.isTablet;\n }", "public static boolean isEmulator() {\n return Build.FINGERPRINT.startsWith(\"generic\")\n || Build.FINGERPRINT.startsWith(\"unknown\")\n || Build.MODEL.contains(\"google_sdk\")\n || Build.MODEL.contains(\"Emulator\")\n || Build.MODEL.contains(\"Android SDK built for x86\")\n || Build.MANUFACTURER.contains(\"Genymotion\")\n || (Build.BRAND.startsWith(\"generic\") && Build.DEVICE.startsWith(\"generic\"))\n || \"google_sdk\".equals(Build.PRODUCT);\n }", "private boolean checkPhoneNum() {\n\t\tphoneNum = et_phone.getText().toString().trim();\r\n\t\tif(isMobileNO(phoneNum)){\r\n\t\t\treturn true;\r\n\t\t}else{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "public static boolean openBrowser(final URI uri) {\n\t\tif (openURLWithDesktop(uri)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tfor (final String browser : BROWSERS) {\n\t\t\t\tif (openURLWithBrowser(uri.toString(), browser))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tJOptionPane.showInputDialog(null, \"GeneMANIA was unable to open your web browser.. \"\n\t\t\t\t+ \"\\nPlease copy the following URL and paste it into your browser:\", uri);\n\t\t\n\t\treturn false;\n\t}", "private boolean m21869m() {\n return this.f16409k.getPackageManager().hasSystemFeature(\"android.hardware.telephony\");\n }", "boolean hasJvm();", "boolean hasChromeVersion();", "public boolean isImaAndroid() {\r\n return imaAndroid;\r\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "public static String m21385a() {\n return System.getProperty(\"http.agent\");\n }", "@Test\n\t\tvoid WithoutSpace_CheckForValidationForMobile_RetrunFalse() {\n\t\t\tboolean result = ValidateUserDetails.validateMobile(\"919874563214\");\n\t\t\tAssertions.assertFalse(result);\n\t\t}", "public static boolean validateMobile(String phone){\n int k=0;\n k=phone.length();\n if(k==10){\n return true;\n }\n return false;\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "public static boolean isMSJVM() {\n\t\treturn (System.getProperty(\"java.vendor\").indexOf(\"Microsoft\") != -1);\n\t}", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "private boolean checkCameraHardware(Context context) {\n if (context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)) {\n // this device has a camera\n return true;\n } else {\n // no camera on this device\n return false;\n }\n }", "public static boolean isTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK)\n >= Configuration.SCREENLAYOUT_SIZE_LARGE;\n }", "public String getUserAgent();", "public String getMobile() {\r\n return mobile;\r\n }" ]
[ "0.6462801", "0.6389196", "0.59708285", "0.5960529", "0.5916474", "0.5862011", "0.57390994", "0.54986423", "0.5490998", "0.5419912", "0.5419912", "0.54109025", "0.5370118", "0.536815", "0.53616226", "0.53111494", "0.5262059", "0.523055", "0.52221817", "0.5213745", "0.5200714", "0.5190298", "0.51882374", "0.5175513", "0.516477", "0.51240975", "0.5091313", "0.5083764", "0.5041161", "0.50382024", "0.5037862", "0.503739", "0.5034185", "0.50113994", "0.5001287", "0.49768713", "0.4952212", "0.49330598", "0.49096197", "0.48715407", "0.48627236", "0.48615578", "0.48571315", "0.48010784", "0.47945067", "0.47943196", "0.4782994", "0.47825655", "0.4761035", "0.47523388", "0.47496182", "0.47475147", "0.47402036", "0.4737402", "0.47359344", "0.47283813", "0.47111034", "0.4672615", "0.46556142", "0.46492538", "0.4623636", "0.46120012", "0.45904958", "0.45790538", "0.45761016", "0.45673984", "0.45658806", "0.4563965", "0.4552998", "0.4552661", "0.45418185", "0.45395985", "0.4522548", "0.4518936", "0.45146862", "0.45069426", "0.4485583", "0.4478471", "0.44671482", "0.44634297", "0.4459295", "0.44493973", "0.44232902", "0.44225776", "0.4421618", "0.4421574", "0.44206533", "0.4419933", "0.4419933", "0.4419933", "0.44154847", "0.44121918", "0.44086936", "0.44086733", "0.44022092", "0.4399799", "0.4399799", "0.43953973", "0.43923837", "0.4391703" ]
0.7943874
0
Intent intent = new Intent(MyServiceActivity.this, DashBoardClientActivity.class); startActivity(intent);
@Override public void onClick(View view) { finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n startService(new Intent(MainActivity.this, MyService.class));\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(FxService.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(FxService.this, MainActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tstartActivity(new Intent(getApplicationContext(),ServicesActivity.class));\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(Admin2Home.this, Admin2Service.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"busness\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "public void startService(View view) {\n startService(new Intent(getBaseContext(), Myservice.class));\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"carecar\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "@Override\n public void onClick(View v) {\n\n Intent intent = new Intent(MainDashBoardActivity.this, DealerSearchActivity.class);\n startActivity(intent);\n\n\n }", "private void TransferDataToMainActivity(){\n Intent intent = new Intent(ChooseService.this, MainActivity.class);\n intent.putExtra(\"Professional\", professionalName);\n intent.putExtra(\"Service\", serviceName);\n intent.putExtra(\"Price\", servicePrice);\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"house\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "public void startService(View view) {\n startService(new Intent(getBaseContext(), MyFirstService.class));\n }", "@Override\n public void onClick(View view) {\n\n startActivity(getIntent());\n }", "public void onButtonMyReceiverIntent(View view) {\n\n Intent myCustomIntent = new Intent(this, CustomIntent.class);\n startActivity(myCustomIntent);\n\n\n }", "public void onStartClick(View view) {\n Intent intent = new Intent(this, MyIntentService.class);\n intent.putExtra(MyIntentService.PARAM_MSG, \"TASK_1\");\n startService(intent);\n\n intent.putExtra(MyIntentService.PARAM_MSG, \"TASK_2\");\n startService(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, MyService.class);\n//\t\t\t\t// startService(intent);\n\t\t\t\tbindService(intent, conn, BIND_AUTO_CREATE);\n\n\t\t\t}", "public void onClick(View v) {\n\n\n\n startActivity(myIntent);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"health\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getContext(), Dashboard.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent();\n intent.setClass(EntranceActivity.this, ExchangeListActivity.class);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View v) {\n Intent intent = new Intent(ServicesActivity.this, AmbulanceMapsActivity.class);\r\n\r\n startActivity(intent);\r\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, CardapioActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View arg0) {\n Intent i = new Intent(getApplicationContext(), sh1.class);\n startActivity(i);\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n context.startService(new Intent(context, MyService.class));\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"rebuy\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "private void startMainActivity() {\n Intent intent = new Intent(this, MyActivity.class);\n startActivity(intent);\n }", "public void nextIntent(){\n \t\n \tIntent y=new Intent();\n \ty.setClass(MainActivity.this, Dashboard.class);\n \t\n \tstartActivity(y);\n \t\n \t\n}", "@Override\n public void onClick(View view) {\n\n Intent myIntent = new Intent(HostOrConnectActivity.this, HostActivity.class);\n\n HostOrConnectActivity.this.startActivity(myIntent);\n\n\n }", "@Override\n public void onClick(View v) {\n Log.i(\"ServiceExam\",\"start\");\n Intent i = new Intent(\n getApplicationContext(),\n Example17Sub_LifeCycleService.class\n );\n\n i.putExtra(\"MSG\",\"HELLO\");\n // Start Service\n // 만약 서비스 객체가 메모리에 없으면 생성하고 수행\n // onCreate() -> onStartCommand()\n // 만약 서비스 객체가 이미 존재하고 있으면\n // onStartCommand()\n startService(i);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, TriggerActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.setClass(WxcOrderActivity.this, WxcMainActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void startService(View view) {\r\n startService(new Intent(this, CustomService.class));\r\n }", "private void startActivity(Class destination)\n {\n Intent intent = new Intent(MainActivity.this, destination);\n startActivity(intent);\n }", "@Override\r\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tServiceAdditionActivity.setclass(\"green\");\r\n\t\t\t\tstartActivity(new Intent(ServiceActivity.this,ServiceAdditionActivity.class));\r\n\t\t\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n messenger = new Messenger(service);\n try {\n Message msg = Message.obtain(null, 2);\n msg.replyTo = mMessenger;\n messenger.send(msg);\n } catch (Exception e) {\n e.printStackTrace();\n }\n startActivity(new Intent(SplashActivity.this, ElawalletaActivity.class));\n finish();\n }", "@Override\n public void startActivity(Intent intent) {\n startActivity(intent, null);\n }", "void startNewActivity(Intent intent);", "private void startaccessactivity() {\n\t\tIntent intent=new Intent(this,InspectWechatFriendService.class);\n\t\tstartService(intent);\n\t\tToast.makeText(getApplicationContext(), \"start sucess\", 0).show();\n\t}", "public void startService(View view) { \n\t\tstartService(new Intent(getBaseContext(), TestService.class)); \n\t}", "private void startDashboard() {\n Intent intent = new Intent(this, Dashboard.class);\n startActivity(intent);\n }", "@Override\r\n \t\t\tpublic void onClick(View arg0) {\n \t\t\t\tIntent intent = new Intent(AppDownloaded.this, AppManager.class);\r\n \t\t\t\tstartActivity(intent);\r\n \t\t\t}", "@Override\n public void onClick(View view) {\n Intent drakeIntent = new Intent(MainActivity.this, DrakeActivity.class);\n startActivity(drakeIntent);\n }", "@Override\n public void onClick(View arg0) {\n Intent intent = new Intent(Main2Activity.this, com.sha.location.NotifyService.class);\n Main2Activity.this.startService(intent);\n }", "public void onClick(View v) {\n Intent newActivity = new Intent(Detail_1.this,TabHostMENU.class);\r\n newActivity.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n startActivity(newActivity);\r\n }", "@Override\n public void onClick(View v) {\n Intent account = new Intent(Welcome.this, MyAccount.class);\n startActivity(account);\n\n }", "@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n }", "@Override\n public void onClick(View view) {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"http://sozialmusfest.scalingo.io/services\"));\n startActivity(browserIntent);\n }", "public void transferActivity() {\n Intent intent = new Intent(this, AddInfoActivity.class);\n this.startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(StartActivity.this, MainActivity.class));\n }", "public void openCreateAccount(){\n Intent intent = new Intent(this, createAccountActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n\n Intent i = new Intent(OConnectBaseActivity.this, MessagingListActivity.class);\n startActivity(i);\n }", "public void loginUser(){\n Intent intent=new Intent(MainActivity.this,SnapsActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(MainActivity.this, SecondActivity.class);\n startActivity(intent);\n\n }", "@Override\r\n public void onClick(View view) {\r\n Intent paymentsIntent = new Intent(MainActivity.this, PaymentActivity.class);\r\n startActivity(paymentsIntent);\r\n }", "@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tIntent intent=new Intent(MainActivity.this,MyActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}", "public void ClickVtube_Customer_service(View view){\n MainActivity.redirectActivity(this,Vtube_Customer_service.class);\n\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(MainActivity.this, ListDataActivity.class);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstartActivity(new Intent(OnePService.this, MainActivity.class)\n\t\t\t\t\t\t.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK\n\t\t\t\t\t\t\t\t| Intent.FLAG_ACTIVITY_CLEAR_TOP));\n\t\t\t\t// Toast.makeText(OnePService.this, \"onClick\",\n\t\t\t\t// Toast.LENGTH_SHORT)\n\t\t\t\t// .show();\n\t\t\t}", "@Override\n public void performAction(View view) {\n startActivity(new Intent(MainActivity.this, MyInfoActivity.class));\n// QPManager.startRecordActivity(MainActivity.this);\n }", "public void onReceive(Context context, Intent intent) {\n // Intent intentPanel = new Intent(context.getApplicationContext(), GlobalPanelUI.class);\n // intentPanel.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // context.startActivity(intentPanel);\n }", "@Override\n public void onClick(View view) {\n startActivity(new Intent(MainActivity.this, ViewActivity.class));\n }", "@Override\n public void onClick(View view) {\n Intent i = new Intent(getApplicationContext(), BPActivity.class);\n startActivity(i);\n }", "public void Volgende(Intent intent){\r\n\r\n startActivity(intent);\r\n\r\n }", "public void startService() {\r\n Log.d(LOG, \"in startService\");\r\n startService(new Intent(getBaseContext(), EventListenerService.class));\r\n startService(new Intent(getBaseContext(), ActionService.class));\r\n getListenerService();\r\n\r\n }", "public void openNewActivity(){\n Intent intent = new Intent(this, InventoryDisplay.class);\n startActivity(intent);\n }", "@Override\n public void run() {\n startActivity(intent);\n }", "@Override\n public void onStart(Intent intent, int startid) {\n }", "@Override\r\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tIntent i=new Intent(getApplicationContext(),MainActivity.class);\r\n\t\t\t\t\tstartActivity(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}", "@Override\n public void onClick(View v) {\n incidentalIntent = new Intent(getApplicationContext(),IncidentalTaskActivity.class);\n startActivity(incidentalIntent);\n }", "@Override\n public void onClick(View v) {\n Intent HomeScreen = new Intent(v.getContext(), MainActivity.class);\n startActivity(HomeScreen);\n }", "protected void startService() {\n\t\t//if (!isServiceRunning(Constants.SERVICE_CLASS_NAME))\n\t\tthis.startService(new Intent(this, LottoService.class));\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(SubmitPaymentActivity.this, PatientHomeActivity.class);\n //start activity\n startActivity(intent);\n }", "@Override\n\tpublic void onClick(View arg0) {\n\t\tIntent intent = new Intent(MainActivity.this, RgkSateLiteService.class);\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.start_button:\n\t\t\t// ¿ªÆôÎÀÐDz˵¥\n\t\t\tstartService(intent);\n\n\t\t\tbreak;\n\t\tcase R.id.close_button:\n\t\t\t// ¹Ø±ÕÎÀÐDz˵¥\n\t\t\tstopService(intent);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\n\t}", "public void onDealsClick(View view){\n Intent intent = new Intent(user_history_activity.this, Deals_Display.class);\n startActivity(intent);\n }", "public void onClick(View v) {\n Intent myIntent = new Intent(Start.this, Login.class);\n Start.this.startActivity(myIntent);\n }", "@Override\n public void onClick(View view) {\n Intent loginIntent = new Intent(MainActivity.this, LoginActivity.class);\n startActivity(loginIntent);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tIntent i = new Intent(this,MainActivity.class);\n\t\tstartActivity(i);\n\t}", "@Override\n public void onClick(View view) {\n Intent intent = MainActivity.newIntent(getActivity(), mMonitor.getId());\n startActivity(intent);\n\n }", "@Override\r\npublic void onClick(View arg0) {\n\tswitch(arg0.getId())\r\n\t{\r\n\t\tcase R.id.bt_other:\r\n\t\t/*Intent i=new Intent();\r\n\t\t\tstartActivity(i);\r\n\t\t\tsetContentView(R.layout.other);*/\r\n\t\t\tIntent Intent=new Intent(MainPage.this,DataSend.class);\r\n\t\t\tIntent.putExtra(\"KEY_LIST\", device);\r\n\t\t\tIntent.putExtra(\"KEY_LISTNUMBER\", count);\r\n\t\t\tstartActivity(Intent);\r\n\t\t\t/*Intent Intent1=new Intent(MainPage.this,AdminPanel.class);\r\n\t\t\tIntent1.putExtra(\"KEY_LIST\", device);\r\n\t\t\tstartActivity(Intent1);*/\r\n \t//setContentView(R.layout.adminhome);\r\n\t\tbreak;\r\n\t}\r\n}", "@Override\n public void onClick(View v){\n Intent intent = new Intent(MainMenu.this, basketballMenu.class);\n startActivity(intent);\n }", "private void startNewAcitivity(Intent intent, ActivityOptionsCompat options) {\n ActivityCompat.startActivity(this, intent, options.toBundle());\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(getApplicationContext(),AudioService.class);\n intent.putExtra(\"code\",1);\n startService(intent);\n }", "public void startTransactionActivity (String tripName) {\n\n Intent intent = new Intent (MainActivity.this, TransactionsActivity.class);\n intent.putExtra(\"tripName\", tripName);\n startActivity(intent);\n\n\n\n\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n Intent intent = new Intent(SuperScouting.this, HomeScreen.class);\n startActivity(intent);\n }", "public void onClick(DialogInterface dialog, int which) {\n Intent i = new Intent(settingsScr.this,accountScr.class);\n i.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n }", "private void sendIntenttoServiece() {\n\t\tIntent intent = new Intent(context, RedGreenService.class);\n\t\tintent.putExtra(\"sendclean\", \"sendclean\");\n\t\tcontext.startService(intent);\n\n\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(LaunchActivity.this, MainActivity.class);\n startActivity(intent);\n }", "public void handleStartClick(View view)\n {\n Intent intent = new Intent(this, SelectScreen.class);\n startActivity(intent);\n }", "@Override\r\n public void onClick(View view) {\n\r\n Intent gotoWiFISwitch = new Intent(MainActivity.this, WiFISwitch.class);\r\n startActivity(gotoWiFISwitch);\r\n\r\n\r\n }", "@Override\n public void onClick(View v) {\n\n\n\n\n Intent intent = getIntent();\n intent.setClass(ConfirmPayActivity.this,FinishedPayActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n Intent intent=new Intent(Intent.ACTION_CALL_BUTTON);\n //intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }", "@Override\n\t\t\tpublic void onClick(View v){\n\t\t\t\tif (receiver==null) {\n\t\t\t\t\treceiver = new myReceiver();\n\t\t\t\t\tIntentFilter filter=new IntentFilter();\n\t\t\t\t\tfilter.addAction(\"com.chris.hadoop v\");\n\t\t\t\t\tmActivity.registerReceiver(receiver, filter);\n\t\t\t\t}\n\t\t\t\tIntent intent=new Intent(getActivity(),trafficMonitorService.class);\n\t\t\t\tmActivity.startService(intent);\n\t\t\t\tToast.makeText(mActivity,\" \",Toast.LENGTH_SHORT).show();\n\t\t\t}", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(getActivity(), JdMainActivity.class);\n startActivity(intent);\n }", "@Override\n public void onClick(View v) {\n stopService(new Intent(MainActivity.this, MyService.class));\n }", "public void openReserveSeat(){\n Intent intent = new Intent(this, ReserveSeatActivity.class);\n startActivity(intent);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\tswitch(v.getId()){\n\t\tcase R.id.bnext:\n\t\tIntent i = new Intent(getApplicationContext(),ClientServerJSONActivity.class);\n\t\t//Intent i = new Intent(getApplicationContext(),Form.class);\n\t\tstartActivity(i);\n\t\tbreak;\n\t\tcase R.id.bexit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\t}\n\t}", "@Override\r\n public void onStart(Intent intent, int startId) {\n }", "public void onClick(DialogInterface dialog, int which) {\n Service selected = mServices.get(position);\n String serviceId = selected.getId();\n Intent intent = EditServiceActivity.newIntent(ServiceListActivity.this, serviceId);\n startActivity(intent);\n\n\n }", "@Override\n public void onClick(View view) {\n Intent intent = new Intent(NDS_main.this, Urubuga_Services.class);\n intent.putExtra(\"pageId\", \"1\");\n startActivity(intent);\n }", "public static void startService(Context context, String intentAction) {\n context.startService(new Intent(intentAction));\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n\n Intent intentMessage = new Intent(context, MessageActivity.class);\n intentMessage.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intentMessage);\n }" ]
[ "0.78164005", "0.76208466", "0.76208466", "0.7254646", "0.71541643", "0.7122801", "0.6997116", "0.69913614", "0.6984497", "0.69757104", "0.6960284", "0.69172627", "0.68986696", "0.6879214", "0.68726045", "0.68655336", "0.68282294", "0.6814495", "0.6813018", "0.68092394", "0.6802411", "0.6800951", "0.67532814", "0.6753254", "0.6744309", "0.67262834", "0.6719527", "0.6716371", "0.6708107", "0.6683169", "0.6678681", "0.66672903", "0.66583216", "0.6652857", "0.6646895", "0.6645164", "0.6644384", "0.66277176", "0.66275024", "0.6624868", "0.6617755", "0.66116077", "0.6598967", "0.65941817", "0.65722555", "0.6545689", "0.65349233", "0.65316844", "0.65286976", "0.65253264", "0.65250254", "0.6516044", "0.6515586", "0.65128654", "0.6500751", "0.6500053", "0.6499188", "0.6497558", "0.64922786", "0.64916545", "0.64913076", "0.6488951", "0.64880407", "0.6487406", "0.64857465", "0.6480094", "0.6456175", "0.64557946", "0.64523256", "0.6448827", "0.644127", "0.64224017", "0.6403567", "0.64023596", "0.6398368", "0.6397006", "0.6395629", "0.638621", "0.6380347", "0.63800144", "0.63753426", "0.63719976", "0.6370411", "0.6370071", "0.6365877", "0.6365257", "0.6363567", "0.6361742", "0.6361377", "0.63610893", "0.6360311", "0.6355279", "0.63535696", "0.6353482", "0.63524824", "0.6346444", "0.63443553", "0.6341099", "0.6338733", "0.63315684", "0.6327599" ]
0.0
-1
Created by sky on 02/03/2018.
public interface UpdateMakeupExamInfoDelegate { void informMakeupExamUpdated(MakeupExam makeupExam); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "private static void cajas() {\n\t\t\n\t}", "public void mo38117a() {\n }", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "public Pitonyak_09_02() {\r\n }", "private TMCourse() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public void mo4359a() {\n }", "Petunia() {\r\n\t\t}", "@Override\n\tpublic void create () {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\n public void memoria() {\n \n }", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "private void poetries() {\n\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void init() {\n\n }", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@SuppressWarnings(\"unused\")\n private void generateInfo()\n {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\n void init() {\n }", "@Override\n public void init() {\n }", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@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 interr() {\n\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\n protected void initialize() {\n\n \n }", "private UsineJoueur() {}", "@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 create() {\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\tpublic void jugar() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {}", "@Override\n protected void init() {\n }", "public void gored() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\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 }", "private void m50366E() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "private Singletion3() {}", "Consumable() {\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "private ReportGenerationUtil() {\n\t\t\n\t}", "public final void mo91715d() {\n }", "protected boolean func_70814_o() { return true; }", "public void mo12930a() {\n }", "private void init() {\n\n\t}", "public void create() {\n\t\t\n\t}", "public void mo6081a() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override public int describeContents() { return 0; }", "@Override\n\tprotected void initialize() {\n\n\t}", "CreationData creationData();", "@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\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "public static void created() {\n\t\t// TODO\n\t}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}", "@Override\n public void initialize() {}" ]
[ "0.5848932", "0.5834915", "0.5661222", "0.5578379", "0.55374086", "0.54986286", "0.54986286", "0.54768175", "0.5467629", "0.5461678", "0.54280066", "0.5427183", "0.54182667", "0.5406447", "0.5406087", "0.540341", "0.5376007", "0.5364441", "0.5362315", "0.53363895", "0.5318325", "0.53084415", "0.53053766", "0.5291685", "0.5288468", "0.5284116", "0.52821016", "0.5281505", "0.5281505", "0.5281505", "0.5281505", "0.5281505", "0.5281505", "0.527065", "0.5247007", "0.5243109", "0.52385885", "0.5231793", "0.52308136", "0.5223538", "0.5223525", "0.52164215", "0.5205304", "0.52005255", "0.51981366", "0.5195609", "0.5193576", "0.51878995", "0.5183733", "0.5182291", "0.51780427", "0.51780427", "0.51706314", "0.51680505", "0.51680505", "0.51680505", "0.51680505", "0.51680505", "0.51653796", "0.51589274", "0.51559174", "0.5152938", "0.51492596", "0.5147705", "0.5147705", "0.5147705", "0.5147705", "0.5147705", "0.5147705", "0.5147705", "0.5147406", "0.5145632", "0.51447624", "0.51445276", "0.51417327", "0.51417327", "0.5141693", "0.51401776", "0.5139567", "0.51346815", "0.5132984", "0.51195407", "0.51160127", "0.5112614", "0.5112415", "0.5100159", "0.50938416", "0.50814456", "0.5081106", "0.5081106", "0.5081106", "0.5079754", "0.5077493", "0.50713027", "0.5068884", "0.5068884", "0.5068884", "0.50655186", "0.50637496", "0.50637496", "0.50637496" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_weight_list, container, false); /* Create a db helper to access the internal db */ PREFS_NAME = getResources().getString(R.string.Prefs_name); prefs = getActivity().getSharedPreferences(PREFS_NAME, 0); float lastWeight = prefs.getFloat("lastWeight", (float) 0.0); weightDBHelper = new WeightDBHelper(this.getContext()); loadData(); weightsAdapter = new WeightsAdapter(this.getContext(), weights); //weightsAdapter = new WeightsAdapter(this.getContext(), MockedData.mockedWeights); lv_weights = (ListView) view.findViewById(R.id.lv_weights); lv_weights.setAdapter(weightsAdapter); Button btn_enterWeight =(Button) view.findViewById(R.id.enter_weight); Button subWeight = (Button) view.findViewById(R.id.subWeight); Button addWeight = (Button) view.findViewById(R.id.addWeight); final EditText weightCount = (EditText) view.findViewById(R.id.Weight); weightCount.setText(lastWeight+""); final DecimalFormat df = new DecimalFormat("#.##"); df.setRoundingMode(RoundingMode.HALF_UP); btn_enterWeight.setOnClickListener(new View.OnClickListener(){ public void onClick(View v) { double weight = Double.parseDouble(weightCount.getText().toString()); /* format double before inserting into DB */ weightCount.setText(df.format(weight)); weight = Double.parseDouble(weightCount.getText().toString()); if(isDailyDouble()){ Toast.makeText(getContext(), "Only one weight can be recorded a day", Toast.LENGTH_SHORT).show(); }else{ insertWeightIntoDB(weight); SharedPreferences.Editor editor = prefs.edit(); editor.putFloat("lastWeight", (float) weight); editor.commit(); SimpleDateFormat dateFormat = new SimpleDateFormat(getResources().getString(R.string.DateFormat)); Date date = new Date(); String formattedDate = dateFormat.format(date); mListener.onDialogPositiveClick(new Weight(getLastId(), weight, formattedDate)); } } }); addWeight.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { double weight = Double.parseDouble(weightCount.getText().toString()) +.1; weightCount.setText(df.format(weight)); } }); subWeight.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { double weight = Double.parseDouble(weightCount.getText().toString()) - .1; if (weight > 0) { weightCount.setText(df.format(weight)); } } }); registerForContextMenu(lv_weights); adsHelper = new AdsHelper(view, getResources().getString(R.string.admob_weightlist_id),this.getActivity()); adsHelper.setUpAds(); int delay = 1000; // delay for 1 sec. int period = getResources().getInteger(R.integer.ad_refresh_rate); Timer timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { public void run() { adsHelper.refreshAd(); // display the data } }, delay, period); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n 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(getLayoutId(), container, false);\n init(view);\n return view;\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 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\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\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n 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 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 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,\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, 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 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 view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.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, 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,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, 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(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n 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 }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n\n\n view = inflater.inflate(LAYOUT, container, false);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }" ]
[ "0.673917", "0.67246467", "0.67207617", "0.66973495", "0.66911536", "0.6687934", "0.6687156", "0.6684066", "0.6676597", "0.6674479", "0.66666025", "0.666631", "0.6664046", "0.66606456", "0.6653267", "0.6648499", "0.6642142", "0.66378975", "0.6636604", "0.66333616", "0.6624909", "0.661926", "0.66171587", "0.66083974", "0.65965307", "0.6592555", "0.65846574", "0.65842414", "0.657273", "0.65713966", "0.65692973", "0.65688044", "0.65673363", "0.65673256", "0.6565135", "0.65532607", "0.65525806", "0.6544364", "0.6543796", "0.6541405", "0.6538898", "0.6535756", "0.6535738", "0.6535218", "0.6532747", "0.6532247", "0.6531757", "0.65281403", "0.6528012", "0.6525453", "0.6523987", "0.65235907", "0.6523111", "0.6522982", "0.6517837", "0.65123457", "0.651226", "0.65114546", "0.6511261", "0.6510387", "0.65097845", "0.65093553", "0.6508582", "0.65084016", "0.6508325", "0.6502612", "0.6501131", "0.65006375", "0.65004766", "0.64977044", "0.6493013", "0.64909226", "0.64903146", "0.64884", "0.6487079", "0.64867455", "0.6486657", "0.64865863", "0.6485584", "0.64838946", "0.64833415", "0.6481576", "0.64814043", "0.6481035", "0.64801836", "0.6479892", "0.6477297", "0.647679", "0.6475934", "0.6474023", "0.64736354", "0.6470897", "0.64704853", "0.64699966", "0.6469823", "0.64659214", "0.64654046", "0.6462473", "0.6461842", "0.6461607", "0.6460939" ]
0.0
-1
Default constructor. All the available font names in the system will be used if the FontFamilySelector instance is created using this constructor.
public FontFamilySelector() { defaultConfig(Util.getAllFontNames()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setFontFamily(ReaderFontSelection f);", "public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }", "public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }", "private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }", "public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;", "public SelectFontFamilyDlg(Frame arg0, boolean arg1, String family_name) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t\t_family_name = family_name;\r\n\t}", "public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;", "private void setFont() {\n\t}", "public final String getFontFamily() {\n return fontFamily;\n }", "public FontFamilySelector(String namespace) {\n Util.checkString(namespace, \"namespace\");\n\n Set<String> defaultFontFamilyNames = Util.getAllFontNames();\n\n Map<String, String> map = Util.getPropertyMap(namespace, \"fontFamily\");\n if (map == null) {\n // The property is missing, then use default values\n defaultConfig(defaultFontFamilyNames);\n } else {\n // the empty font name\n addItem(\"\");\n\n // the default font name\n // if present in the configuration file, then use it\n // otherwise, use the default font name\n if (map.containsKey(\"default\")) {\n defaultFontFamily = map.get(\"default\");\n\n // The default font name is not available in the system\n if (!defaultFontFamilyNames.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"The default font name \" + defaultFontFamily\n + \" is not supported.\");\n }\n } else {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n addItem(defaultFontFamily);\n listFontFamily.add(defaultFontFamily);\n }\n\n // Add all the configed fonts as items\n Set<Entry<String, String>> entries = map.entrySet();\n for (Entry<String, String> entry : entries) {\n // The default font is skipped\n if (\"default\".equals(entry.getKey())) {\n continue;\n }\n\n // Other fonts are added as items of the combo box\n String fontName = entry.getValue();\n\n // If the font name is not available, then throw StylePanelConfigurationException\n if (!defaultFontFamilyNames.contains(fontName)) {\n throw new StylePanelConfigurationException(\"The font name \" + fontName + \" is not supported.\");\n }\n\n if (!listFontFamily.contains(fontName)) {\n addItem(fontName);\n listFontFamily.add(fontName);\n } else {\n if (fontName.equals(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"There are duplicate font name, it is \" + fontName);\n }\n }\n }\n\n if (!listFontFamily.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\n \"The default font name is missing in the configuration file.\");\n }\n\n this.setSelectedItem(defaultFontFamily);\n }\n }", "public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }", "public SelectFontFamilyDlg(Frame arg0, boolean arg1) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t}", "public Font createFont() {\n\t\treturn null;\n\t}", "public String getFontName();", "public String getFontName();", "public String getFontName();", "public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}", "Font createFont();", "public void init( )\n {\n metFont = new HersheyFont( getDocumentBase(), getParameter(\"font\"));\n }", "public void createFont()\n {\n my_font = new Font(\"Helvetica\", Font.BOLD, (int) (getWidth() * FONT_SIZE));\n }", "public OneFont(String fontName, int fontHeight, int fontStyle) {\r\n\t\tname = fontName;\r\n\t\theight = fontHeight;\r\n\t\tstyle = fontStyle;\r\n\t\tfont = new Font(Display.getDefault(), fontName, fontHeight, fontStyle);\r\n\t}", "public void setFontName(String name)\n {\n font.setFontName(name);\n }", "private static void buildFonts() {\r\n fontSMALL = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_SM );\r\n fontMEDIUM = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_MD );\r\n fontLARGE = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_LG );\r\n }", "public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}", "public static Font getDefaultFont() {\r\n return defaultFont;\r\n }", "public LabelBuilder setFontFamily(String fontFamily) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setFamily(fontFamily);\n\t\treturn this;\n\t}", "public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }", "public String getFontName() {\n return getFontName(Locale.getDefault());\n }", "public TextBox() {\n font = new Font(fontname, fontstyle, fontsize);\n }", "private void loadSystemFont(String font){\n mFont = new Font(font, mFontStyle, (int)mFontSize);\n }", "private FontData() {\n }", "public void addFamilies() {\n GraphicsEnvironment env =\n GraphicsEnvironment.getLocalGraphicsEnvironment();\n family_list = env.getAvailableFontFamilyNames(); /*FAULT:: family_list = new String[10]; */\n for (int i = 0; i < family_list.length; i++) {\n families.addItem(family_list[i]);\n }\n\n\n\n }", "public FontFactory(String font, int size, String text) {\n this.font = new Font(font, Font.BOLD, size);\n ttf = new TrueTypeFont(this.font, true);\n this.text = text;\n }", "public void initFont() {\r\n\t\tFont dosFont = null;\r\n try {\r\n \t//setup font\r\n\t\t\t\tURL fontUrl = getURL(\"fonts/DOSFont.ttf\");\r\n\t\t \tdosFont = Font.createFont(Font.TRUETYPE_FONT, fontUrl.openStream());\r\n\t \tdosFont = dosFont.deriveFont(Font.PLAIN, 15);\r\n\t \tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t \tge.registerFont(dosFont);\r\n\t } catch(Exception e) {\r\n\t e.printStackTrace();\r\n\t System.exit(-1);\r\n\t }\r\n screen.setFont(dosFont);//set font on JTextArea\r\n\t}", "public FontFinder getFontFinder() {\n return NameFont;\n }", "public FontMenuItem(String font) {\r\n super(font, ICON);\r\n\r\n mFont = new Font(font, Font.PLAIN, ModernWidget.FONT.getSize());\r\n }", "public Fuentes () {\n File filearcade = new File (RUTA_ARCADE_FONT);\n File filechess = new File (RUTA_CHESS_FONT);\n File fileinvaders = new File (RUTA_INVADERS_FONT);\n File filesafety = new File (RUTA_SAFETY_FONT);\n\n try {\n setArcadeFont (Font.createFont (Font.TRUETYPE_FONT, filearcade));\n setChessFont (Font.createFont (Font.TRUETYPE_FONT, filechess));\n setInvadersFont (Font.createFont (Font.TRUETYPE_FONT, fileinvaders));\n setSafetyFont (Font.createFont (Font.TRUETYPE_FONT, filesafety));\n\n } catch (FontFormatException | IOException e) {\n e.printStackTrace ();\n }\n }", "public void fontLoader(){\n try {\n //create the font to use. Specify the size!\n customFont = Font.createFont(Font.TRUETYPE_FONT, new File(\".\\\\resources\\\\DS-DIGI.ttf\")).deriveFont(40f);\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n ge.registerFont(customFont);\n } catch (IOException e) {\n e.printStackTrace();\n } catch(FontFormatException e) {\n e.printStackTrace();\n }\n }", "private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }", "protected Choice createFontChoice() {\n CommandChoice choice = new CommandChoice();\n String fonts[] = Toolkit.getDefaultToolkit().getFontList();\n for (int i = 0; i < fonts.length; i++)\n choice.addItem(new ChangeAttributeCommand(fonts[i], \"FontName\", fonts[i], fView));\n return choice;\n }", "public Font GetFont(String name) { return FontList.get(name); }", "public void setFont(Font f) {\n font = f;\n compute();\n }", "private void setupFonts()\r\n\t{\r\n\t\tSystem.out.println(\"In setupFonts()\");\r\n\t\t\r\n\t\t// set up the text fonts\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttextFont = Font.createFont(Font.TRUETYPE_FONT, AppletResourceLoader.getFileFromJar(GameConstants.PATH_FONTS + \"FOXLEY8_.ttf\"));\r\n\t\t\ttextFont = textFont.deriveFont(16.0f);\r\n\t\t\ttextFontBold = textFont.deriveFont(Font.BOLD, 16.0f);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"ERROR IN setupFonts(): \" + e.getClass().getName() + \" - \" + e.getMessage());\r\n\t\t}\r\n\t}", "private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }", "private void defaultConfig(Set<String> defaultFontFamilyNames) {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n\n // the empty font name\n addItem(\"\");\n\n // all the system font names to combo box\n for (String defaultFontFamilyName : defaultFontFamilyNames) {\n this.listFontFamily.add(defaultFontFamilyName);\n addItem(defaultFontFamilyName);\n }\n\n this.setSelectedItem(defaultFontFamily);\n }", "@Override\n public void setFont(String font) {\n graphicsEnvironmentImpl.setFont(canvas, font);\n }", "public void setLabelFont(Font f);", "public BitmapFont(String fontName) {\r\n\t\tthis(fontName, DEFAULT_COLOR_CACHE_CAPACITY);\r\n\t}", "@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }", "public static String getFontName() {\n return \"Comic Sans MS\";\n }", "public FontRenderer(float x, float y, String text, FontType font) {\n\t\tthis(x, y, text, font, 1);\n\t}", "public static Font getFont() {\n return getFont(12);\n }", "abstract Font getFont();", "public String getFontName() {\n\t\treturn this.fontName;\n\t}", "@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }", "private void initFonts() {\n Typeface typeFace = Typeface.createFromAsset(getAssets(), \"fonts/BuriedBeforeBB_Reg.otf\");\n\n TextView textViewScore = (TextView) findViewById(R.id.txtScore);\n TextView textViewLives = (TextView) findViewById(R.id.txtLives);\n TextView txtGameOver = (TextView) findViewById(R.id.txtGameOver);\n TextView txtGameOver2 = (TextView) findViewById(R.id.txtGameOver2);\n\n textViewScore.setTypeface(typeFace);\n textViewLives.setTypeface(typeFace);\n txtGameOver.setTypeface(typeFace);\n txtGameOver2.setTypeface(typeFace);\n txtNextLevel.setTypeface(typeFace);\n }", "public void setDefaultFontFamily(String defaultFontFamily) {\n Util.checkString(defaultFontFamily, \"defaultFontFamily\");\n\n this.defaultFontFamily = defaultFontFamily;\n }", "public final void setFontFamily(final String fontFamily) {\n if (!this.fontFamily.equals(fontFamily)) {\n this.fontFamily = fontFamily;\n flush();\n }\n\n }", "protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}", "private void initFontAndChange(Context context) {\n changeFont(context);\n }", "public FontSelector(Window parent, boolean modal) {\r\n super(parent, (modal \r\n ? ModalityType.APPLICATION_MODAL \r\n : ModalityType.MODELESS));\r\n retnull = false;\r\n fonts = GraphicsEnvironment\r\n .getLocalGraphicsEnvironment()\r\n .getAvailableFontFamilyNames();\r\n initComponents();\r\n this.addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n retnull = true;\r\n setVisible(false);\r\n dispose();\r\n }\r\n });\r\n KeyListener kl = new KeyAdapter() {\r\n public void keyPressed(KeyEvent e) {\r\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE) {\r\n setVisible(false);\r\n dispose();\r\n }\r\n }\r\n };\r\n fontField.addKeyListener(kl);\r\n fontList.addKeyListener(kl);\r\n styleField.addKeyListener(kl);\r\n styleList.addKeyListener(kl);\r\n sizeField.addKeyListener(kl);\r\n sizeList.addKeyListener(kl);\r\n okButton.addKeyListener(kl);\r\n this.setLocationRelativeTo(parent);\r\n }", "@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Arial\", Font.PLAIN, 11)); \r\n }", "@SuppressWarnings(\"unchecked\")\n public TF addFont() {\n final ParameterizedType pt = (ParameterizedType) getClass()\n .getGenericSuperclass();\n final ParameterizedType paramType = (ParameterizedType) pt\n .getActualTypeArguments()[2];\n final Class<TF> fontClass = (Class<TF>) paramType.getRawType();\n try {\n final Constructor<TF> c = fontClass\n .getDeclaredConstructor(ACellStyle.class);\n return c.newInstance(this);\n }\n catch (final Exception e) {\n throw new ReportBuilderException(e);\n }\n }", "private static native Font createFont(String name, GFontPeer peer, int gdkfont);", "public void setFont(Font value) {\r\n this.font = value;\r\n }", "public OneFont(FontData fd) {\r\n\t\tname = fd.getName();\r\n\t\theight = fd.getHeight();\r\n\t\tstyle = fd.getStyle();\r\n\t\tfont = new Font(Display.getDefault(), fd);\r\n\t}", "public String getFontName()\n {\n return font.getFontName();\n }", "public String getName() {\n return fontName;\n }", "private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}", "public void setFont(Font font)\n {\n this.font = font;\n }", "public void clearSelectedFontName()\r\n\t{\r\n\t\t// deselect the currently selected item in the Font Names list if there is one\r\n\t\tfontNamesList.clearSelection();\r\n\t}", "public Handler(Font f)\n {\n font_var=f; //sets font as font button selected\n }", "public static void setFont(String fontName, int fontSize, int style){\n\t\tGComponent.fGlobalFont = new Font(fontName, fontSize, style);\n\t}", "public Font getFont(\n )\n {return font;}", "private SlickRenderFontLoaders() {\r\n super();\r\n }", "public void setFont( Font font ) {\r\n this.font = font;\r\n }", "public String fontName() {\n\t\treturn fontName;\n\t}", "private void loadFont() {\n\t\ttry {\n\t\t\tfont = Font.createFont(Font.TRUETYPE_FONT, new FileInputStream(\"assets/fonts/forced_square.ttf\"));\n\t\t} catch (Exception e) {\n\t\t\tfont = new Font(\"Helvetica\", Font.PLAIN, 22);\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public FontRenderer(float x, float y, String text) {\n\t\tthis(x, y, text, FontType.FNT_ARIAL);\n\t}", "COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}", "public FontDisplay()\r\n\t{\r\n\t\t// Get all Fonts from the System\r\n\t\tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t\tFont[] fonts = ge.getAllFonts();\r\n\r\n\t\t// Build a list of styled Font Names\r\n\t\tStringBuilder sb = new StringBuilder(\"<html><body style='font-size: 18px'>\");\r\n\t\tfor (Font font : fonts)\r\n\t\t{\r\n\t\t\tsb.append(\"<p style='font-family: \");\r\n\t\t\tsb.append(font.getFontName());\r\n\t\t\tsb.append(\"'>\");\r\n\t\t\tsb.append(font.getFontName());\r\n\t\t\tsb.append(\"</p>\");\r\n\t\t}\r\n\r\n\t\t// Add built list to EditorPane\r\n\t\tJEditorPane fontEP = new JEditorPane();\r\n\t\tfontEP.setMargin(new Insets(10, 10, 10, 10));\r\n\t\tfontEP.setContentType(\"text/html\");\r\n\t\tfontEP.setText(sb.toString());\r\n\t\tfontEP.setEditable(false);\r\n\r\n\t\t// Add EditorPane to ScrollPane\r\n\t\tJScrollPane scrollPane = new JScrollPane(fontEP);\r\n\t\tscrollPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));\r\n\r\n\t\t// Create a Label for the EditorPane\r\n\t\tJLabel titleLabel = new JLabel(\"Available Fonts on System\",\r\n SwingConstants.CENTER);\r\n\t\ttitleLabel.setFont(new Font(titleLabel.getFont().getName(), Font.BOLD, 17));\r\n\t\ttitleLabel.setForeground(new Color(21, 149, 211));\r\n\r\n\t\tImageIcon logo = new ImageIcon(\"Snowbound_Software_logo_full_2012.png\");\r\n\t\tJLabel logoLabel = new JLabel();\r\n\t\tlogoLabel.setIcon(logo);\r\n\t\tJPanel logoPane = new JPanel();\r\n\t\tlogoPane.setLayout(new BoxLayout(logoPane, BoxLayout.X_AXIS));\r\n\t\tlogoPane.add(logoLabel);\r\n\t\tlogoPane.add(Box.createHorizontalStrut(12));\r\n\t\tlogoPane.add(new JSeparator(JSeparator.VERTICAL));\r\n\t\tlogoPane.add(Box.createHorizontalStrut(6));\r\n\t\t// Add Label to Panel\r\n\t\tJPanel labelPane = new JPanel(new BorderLayout(0, 10));\r\n\t\tlabelPane.setBorder(BorderFactory.createEmptyBorder(12, 12, 0, 12));\r\n\t\tlabelPane.add(logoPane, BorderLayout.WEST);\r\n\t\tlabelPane.add(titleLabel, BorderLayout.CENTER);\r\n\t\tlabelPane.add(new JSeparator(), BorderLayout.SOUTH);\r\n\r\n\t\t// Add Panels to Frame\r\n\t\tthis.getContentPane().setLayout(new BorderLayout());\r\n\t\tthis.add(labelPane, BorderLayout.NORTH);\r\n\t\tthis.add(scrollPane, BorderLayout.CENTER);\r\n\r\n\t\t// Initialize Frame\r\n\t\tthis.setTitle(\"Snowbound Software :: Font Display\");\r\n\t\tthis.setSize(500, 650);\r\n\t\tthis.setVisible(true);\r\n\t\tthis.setDefaultCloseOperation(EXIT_ON_CLOSE);\r\n\t}", "public abstract Font getFont();", "FONT createFONT();", "public PdfFontProgram() {\n super();\n }", "public static Font[] getSelectableDefaultFonts() {\n Locale locale = Locale.getDefault();\n String language = locale.getLanguage();\n return nativeGetSelectableDefaultFonts(language);\n }", "private JPanel setup_font_family_combo_box() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout( new FlowLayout( FlowLayout.LEFT, 5, 5));\r\n\r\n\t\t_comboBox = CommonTool.get_font_family_combo_box();\r\n\r\n\t\tif ( !_family_name.equals( \"\"))\r\n\t\t\t_comboBox.setSelectedItem( _family_name);\r\n\r\n\t\tlink_to_cancel( _comboBox);\r\n\r\n\t\tpanel.add( _comboBox);\r\n\t\treturn panel;\r\n\t}", "public void setMatchFontName(String matchFontName);", "public FontFrame(JTextArea txtWorkplace) {\n initComponents();\n Font[] fontList = new Font[]{};\n fontList = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();\n for (int i = 0; i < fontList.length; i++) {\n cbbFont.addItem(fontList[i].getFontName());\n }\n fontName = (String) cbbFont.getSelectedItem();\n fontSize = (int) spinnerSize.getValue();\n fontStyle = (int) cbbStyle.getSelectedIndex();\n lblTest.setFont(new Font(fontName,fontSize,fontSize));\n this.txtWorkplace = txtWorkplace;\n }", "private void updateFont() {\n this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),\n Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),\n this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),\n Font.NORMAL,\n this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex())); \n }", "public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }", "private static Font[] loadFonts() throws Exception {\r\n Font font = Font.createFont(Font.TRUETYPE_FONT, Class.class.getClass()\r\n .getResource(\"/language/fonts/code2000.ttf\").openStream());\r\n // since 1.6 we could register the font and use it by name\r\n // but using the font directly makes us 1.5 compatible\r\n // GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(font);\r\n return new Font[]{font};\r\n }", "public static void main(String[] args)\r\n\t{\r\n\t\tnew FontDisplay();\r\n\t}", "public String getFont() {\n return font;\n }", "public SecName(FrillLoc loc) {\n MyLocation = loc;\n NameFont = new FontFinder(FontList.FONT_LABEL);\n }", "public LrcFontDialog(Context context) {\n super(context);\n }", "public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }", "public void initializeText(){\n\t\tfont = new BitmapFont();\n\t\tfont1 = new BitmapFont();\n\t\tfont1.setColor(Color.BLUE);\n\t\tfont2 = new BitmapFont();\n\t\tfont2.setColor(Color.BLACK);\n\t}", "@FXML\r\n void fontAction() {\r\n // default css code for each characteristics of the text\r\n String textFont = \"-fx-font-family: \";\r\n String textSize = \"-fx-font-size: \";\r\n String textStyle = \"\";\r\n\r\n // Create and take the input from the Font dialog\r\n Dialog<Font> fontSelector = new FontSelectorDialog(null);\r\n Optional<Font> result = fontSelector.showAndWait();\r\n\r\n // add changes to the default CSS code above based on the users\r\n if (result.isPresent()) {\r\n Font newFont = result.get();\r\n textFont += \"\\\"\" + newFont.getFamily() + \"\\\";\";\r\n textSize += newFont.getSize() + \"px;\";\r\n\r\n // some basics CSS font characteristics\r\n String style = newFont.getStyle();\r\n String style_italic = \"-fx-font-style: italic;\";\r\n String style_regular = \"-fx-font-weight: normal ;\";\r\n String style_bold = \"-fx-font-weight: bold;\";\r\n switch (style) {\r\n case \"Bold Italic\":\r\n textStyle += style_bold + \"\\n\" + style_italic;\r\n case \"Italic\":\r\n textStyle += style_italic;\r\n case \"Regular\":\r\n textStyle += style_regular;\r\n case \"Regular Italic\":\r\n textStyle += style_italic;\r\n default:\r\n textStyle += style_bold;\r\n }\r\n\r\n // Add all characteristic to a single string\r\n String finalText = textFont + \"\\n\" + textSize;\r\n finalText += \"\\n\" + textStyle;\r\n // Display options and set that options to the text\r\n defOutput.setStyle(finalText);\r\n }\r\n }" ]
[ "0.69013643", "0.66437656", "0.6542583", "0.6506077", "0.6496509", "0.64951897", "0.64768803", "0.64277506", "0.64162356", "0.64066446", "0.63471305", "0.63100284", "0.6233481", "0.6194418", "0.6194418", "0.6194418", "0.61725986", "0.6164199", "0.6145669", "0.6142782", "0.6119919", "0.61126715", "0.6111235", "0.6097309", "0.60958534", "0.6089339", "0.60868764", "0.6060558", "0.6054266", "0.6052339", "0.6051159", "0.6035333", "0.60296744", "0.60245913", "0.6023702", "0.6015135", "0.60098964", "0.5987091", "0.597521", "0.59629744", "0.5953113", "0.5931374", "0.59299135", "0.5929555", "0.59151065", "0.5894444", "0.5893274", "0.58750683", "0.58734196", "0.58630055", "0.5854527", "0.58540773", "0.58234835", "0.5811096", "0.58049047", "0.5803207", "0.5800971", "0.5799499", "0.57990885", "0.5796178", "0.5795767", "0.5785012", "0.57812583", "0.5764494", "0.57525265", "0.57506776", "0.5744501", "0.57333964", "0.5732862", "0.5721112", "0.5713248", "0.57083994", "0.56915027", "0.5688571", "0.56871843", "0.568518", "0.5672455", "0.5671197", "0.56707895", "0.56696975", "0.5650142", "0.5648371", "0.5646549", "0.5641898", "0.5631461", "0.56179935", "0.56166553", "0.5612144", "0.5608702", "0.5608541", "0.56061965", "0.5601369", "0.55957055", "0.5593999", "0.5589152", "0.5586021", "0.55774015", "0.5565061", "0.5564999", "0.55581605" ]
0.81262076
0
Constructor with namespace as the parameter. Sample configuration: &lt;Property name=&quot;fontFamily&quot;&gt; &lt;Property name=&quot;arial&quot;&gt; &lt;Value&gt;Arial&lt;/Value&gt; &lt;/Property&gt; &lt;Property name=&quot;timesnewroman&quot;&gt; &lt;Value&gt;Times New Roman&lt;/Value&gt; &lt;/Property&gt; &lt;Property name=&quot;verdana&quot;&gt; &lt;Value&gt;Verdana&lt;/Value&gt; &lt;/Property&gt; &lt;Property name=&quot;default&quot;&gt; &lt;Value&gt;Verdana&lt;/Value&gt; &lt;/Property&gt; &lt;/Property&gt;
public FontFamilySelector(String namespace) { Util.checkString(namespace, "namespace"); Set<String> defaultFontFamilyNames = Util.getAllFontNames(); Map<String, String> map = Util.getPropertyMap(namespace, "fontFamily"); if (map == null) { // The property is missing, then use default values defaultConfig(defaultFontFamilyNames); } else { // the empty font name addItem(""); // the default font name // if present in the configuration file, then use it // otherwise, use the default font name if (map.containsKey("default")) { defaultFontFamily = map.get("default"); // The default font name is not available in the system if (!defaultFontFamilyNames.contains(defaultFontFamily)) { throw new StylePanelConfigurationException("The default font name " + defaultFontFamily + " is not supported."); } } else { defaultFontFamily = DEFAULT_SELECTED_FONT_NAME; addItem(defaultFontFamily); listFontFamily.add(defaultFontFamily); } // Add all the configed fonts as items Set<Entry<String, String>> entries = map.entrySet(); for (Entry<String, String> entry : entries) { // The default font is skipped if ("default".equals(entry.getKey())) { continue; } // Other fonts are added as items of the combo box String fontName = entry.getValue(); // If the font name is not available, then throw StylePanelConfigurationException if (!defaultFontFamilyNames.contains(fontName)) { throw new StylePanelConfigurationException("The font name " + fontName + " is not supported."); } if (!listFontFamily.contains(fontName)) { addItem(fontName); listFontFamily.add(fontName); } else { if (fontName.equals(defaultFontFamily)) { throw new StylePanelConfigurationException("There are duplicate font name, it is " + fontName); } } } if (!listFontFamily.contains(defaultFontFamily)) { throw new StylePanelConfigurationException( "The default font name is missing in the configuration file."); } this.setSelectedItem(defaultFontFamily); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PropertiesDocument() {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n try {\n\t\t\tthis.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\t} catch (ParserConfigurationException e) {\n\t\t\t// Exception with default configuration\n\t\t\te.printStackTrace();\n\t\t}\n this.properties = new Properties();\n\t}", "public PropertyParser()\n\t{\n\t\tthis(System.getProperties());\n\t}", "public PropertiesDocument(Document testRunArgs) throws ParserConfigurationException {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n this.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tthis.document = this.documentBuilder.newDocument();\n\t\tthis.properties = documentToProperties(testRunArgs);\n\t}", "public XMLElement() {\n this(new Properties(), false, true, true);\n }", "public ResourceConfiguration(String name, String namespace, Map properties) {\n this.name = name;\n this.namespace = namespace;\n \n if (properties == null) {\n this.properties = new HashMap();\n } else {\n this.properties = properties;\n }\n }", "public PropertiesPlus(String properties)\n\t{\n\t\tsuper();\n\t\tdateFormatGMT.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tdateFormatGMT_MS.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\t\tif (properties.startsWith(\"<properties>\"))\n\t\t\tparseXML(properties);\n\t\telse\n\t\t\tparseString(properties);\n\t}", "void setNamespace(java.lang.String namespace);", "void setNamespace(String namespace);", "public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}", "public XMLNamespaces() {\n this(libsbmlJNI.new_XMLNamespaces__SWIG_0(), true);\n }", "private CommonConfigBean(){\n\t\tsuper();\n\t\t\n\t\t\n\t\ttry {\n\n\t\t\tFile fXmlFile = new File(PathTool.getAbsolute(RELATIVE_FILE_PATH));\n\t\t\tDocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();\n\t\t\tDocumentBuilder dBuilder = dbFactory.newDocumentBuilder();\n\t\t\tDocument doc = dBuilder.parse(fXmlFile);\n\t\t\t\t\t\n\t\t\t//optional, but recommended\n\t\t\t//read this - http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work\n\t\t\tdoc.getDocumentElement().normalize();\n\n\t\t\tSystem.out.println(\"Root element :\" + doc.getDocumentElement().getNodeName());\n\t NodeList nList = doc.getElementsByTagName(\"param\");\n\t params = new HashMap<>();\n\t for (int temp = 0; temp < nList.getLength(); temp++) {\n\t Node nodo = nList.item(temp);\n\t System.out.println(\"Elemento:\" + nodo.getNodeName());\n\t if (nodo.getNodeType() == Node.ELEMENT_NODE) {\n\t Element element = (Element) nodo;\n\t params.put(element.getAttribute(\"name\"), element.getAttribute(\"value\"));\n\t }\n\t }\n\t\t\t\n\t\t\t\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t }\n\t}", "public Component(Reference xmlConfigReference) {\r\n this();\r\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\r\n dbf.setNamespaceAware(false);\r\n dbf.setValidating(false);\r\n \r\n try {\r\n DocumentBuilder db = dbf.newDocumentBuilder();\r\n Document document = db.parse(new FileInputStream(\r\n new LocalReference(xmlConfigReference).getFile()));\r\n \r\n // Look for clients\r\n NodeList clientNodes = document.getElementsByTagName(\"client\");\r\n \r\n for (int i = 0; i < clientNodes.getLength(); i++) {\r\n Node clientNode = clientNodes.item(i);\r\n Node item = clientNode.getAttributes().getNamedItem(\"protocol\");\r\n Client client = null;\r\n \r\n if (item == null) {\r\n item = clientNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (item != null) {\r\n String[] protocols = item.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n client = new Client(getContext(), protocolsList);\r\n }\r\n } else {\r\n client = new Client(getContext(), getProtocol(item\r\n .getNodeValue()));\r\n }\r\n \r\n if (client != null) {\r\n this.getClients().add(client);\r\n }\r\n }\r\n \r\n // Look for servers\r\n NodeList serverNodes = document.getElementsByTagName(\"server\");\r\n \r\n for (int i = 0; i < serverNodes.getLength(); i++) {\r\n Node serverNode = serverNodes.item(i);\r\n Node node = serverNode.getAttributes().getNamedItem(\"protocol\");\r\n Node portNode = serverNode.getAttributes().getNamedItem(\"port\");\r\n Server server = null;\r\n \r\n if (node == null) {\r\n node = serverNode.getAttributes().getNamedItem(\"protocols\");\r\n \r\n if (node != null) {\r\n String[] protocols = node.getNodeValue().split(\" \");\r\n List<Protocol> protocolsList = new ArrayList<Protocol>();\r\n \r\n for (int j = 0; j < protocols.length; j++) {\r\n protocolsList.add(getProtocol(protocols[j]));\r\n }\r\n \r\n int port = getInt(portNode, Protocol.UNKNOWN_PORT);\r\n \r\n if (port == Protocol.UNKNOWN_PORT) {\r\n getLogger()\r\n .warning(\r\n \"Please specify a port when defining a list of protocols.\");\r\n } else {\r\n server = new Server(getContext(), protocolsList,\r\n getInt(portNode, Protocol.UNKNOWN_PORT),\r\n this.getServers().getTarget());\r\n }\r\n }\r\n } else {\r\n Protocol protocol = getProtocol(node.getNodeValue());\r\n server = new Server(getContext(), protocol, getInt(\r\n portNode, protocol.getDefaultPort()), this\r\n .getServers().getTarget());\r\n }\r\n \r\n if (server != null) {\r\n this.getServers().add(server);\r\n }\r\n \r\n // Look for default host\r\n NodeList defaultHostNodes = document\r\n .getElementsByTagName(\"defaultHost\");\r\n \r\n if (defaultHostNodes.getLength() > 0) {\r\n parseHost(this.getDefaultHost(), defaultHostNodes.item(0));\r\n }\r\n \r\n // Look for other virtual hosts\r\n NodeList hostNodes = document.getElementsByTagName(\"host\");\r\n \r\n for (int j = 0; j < hostNodes.getLength(); j++) {\r\n VirtualHost host = new VirtualHost();\r\n parseHost(host, hostNodes.item(j));\r\n this.getHosts().add(host);\r\n }\r\n }\r\n \r\n // Look for internal router\r\n NodeList internalRouterNodes = document\r\n .getElementsByTagName(\"internalRouter\");\r\n \r\n if (internalRouterNodes.getLength() > 0) {\r\n Node node = internalRouterNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\r\n \"defaultMatchingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setDefaultMatchingMode(\r\n getInt(item, getInternalRouter()\r\n .getDefaultMatchingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"maxAttempts\");\r\n if (item != null) {\r\n this.getInternalRouter().setMaxAttempts(\r\n getInt(item, this.getInternalRouter()\r\n .getMaxAttempts()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"routingMode\");\r\n if (item != null) {\r\n this.getInternalRouter().setRoutingMode(\r\n getInt(item, this.getInternalRouter()\r\n .getRoutingMode()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"requiredScore\");\r\n if (item != null) {\r\n this.getInternalRouter().setRequiredScore(\r\n getFloat(item, this.getInternalRouter()\r\n .getRequiredScore()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"retryDelay\");\r\n if (item != null) {\r\n this.getInternalRouter().setRetryDelay(\r\n getLong(item, this.getInternalRouter()\r\n .getRetryDelay()));\r\n }\r\n \r\n // Loops the list of \"attach\" instructions\r\n setAttach(getInternalRouter(), node);\r\n }\r\n \r\n // Look for logService\r\n NodeList logServiceNodes = document\r\n .getElementsByTagName(\"logService\");\r\n \r\n if (logServiceNodes.getLength() > 0) {\r\n Node node = logServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"logFormat\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLogFormat(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"loggerName\");\r\n \r\n if (item != null) {\r\n this.getLogService().setLoggerName(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getLogService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"identityCheck\");\r\n \r\n if (item != null) {\r\n this.getLogService().setIdentityCheck(\r\n getBoolean(item, true));\r\n }\r\n }\r\n \r\n // Look for statusService\r\n NodeList statusServiceNodes = document\r\n .getElementsByTagName(\"statusService\");\r\n \r\n if (statusServiceNodes.getLength() > 0) {\r\n Node node = statusServiceNodes.item(0);\r\n Node item = node.getAttributes().getNamedItem(\"contactEmail\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setContactEmail(item.getNodeValue());\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"enabled\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setEnabled(getBoolean(item, true));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"homeRef\");\r\n \r\n if (item != null) {\r\n this.getStatusService().setHomeRef(\r\n new Reference(item.getNodeValue()));\r\n }\r\n \r\n item = node.getAttributes().getNamedItem(\"overwrite\");\r\n \r\n if (item != null) {\r\n this.getStatusService()\r\n .setOverwrite(getBoolean(item, true));\r\n }\r\n }\r\n } catch (Exception e) {\r\n getLogger().log(Level.WARNING,\r\n \"Unable to parse the Component XML configuration.\", e);\r\n }\r\n }", "public ParserImpl(final Namespace namespace) {\n this(namespace, true);\n }", "public PropertiesDocument(File xmlFile) throws ParserConfigurationException, SAXException, IOException {\n\t\tthis.documentBuilderFactory = DocumentBuilderFactory.newInstance();\n this.documentBuilder = documentBuilderFactory.newDocumentBuilder();\n\t\tthis.document = this.documentBuilder.parse(xmlFile);\n\t\tthis.properties = documentToProperties(this.document);\n\t}", "public PDFProperties (String title, String subtitle, float spacing) {\n\t\tthis();\n\t\tthis.title = title;\n\t\tthis.subtitle = subtitle;\n\t\tthis.spacing = spacing;\n\t}", "public Namespace() {\n this(DSL.name(\"namespace\"), null);\n }", "public PXStylesheetParser() {\n this(null);\n }", "public Config() {\n this(System.getProperties());\n\n }", "@Test\n\tpublic void test_TCM__String_getNamespaceURI() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect URI\", attribute.getNamespaceURI().equals(\"http://some.other.place\"));\n\n\t}", "@Test\n\tpublic void test_TCC___String_String_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.UNDECLARED_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "@Test\n\tpublic void test_TCM__String_getNamespacePrefix() {\n\t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", namespace);\n\t\tassertTrue(\"incorrect prefix\", attribute.getNamespacePrefix().equals(\"prefx\"));\n\t}", "public PDFProperties (){\n\t\tthis.title = DEFAULT_TITLE;\n\t\tthis.subtitle = DEFAULT_SUBTITLE;\n\t\tthis.spacing = DEFAULT_SPACING;\n\t\tthis.elementsize = DEFAULT_ELEMENTSIZE;\n\t\tthis.pagesize = DEFAULT_PAGESIZE;\n\t\tthis.title_fontsize = DEFAULT_TITLE_FONTSIZE;\n\t\tthis.subtitle_fontsize = DEFAULT_SUBTITLE_FONTSIZE;\n\t\tthis.leftmargin = DEFAULT_LEFTMARGIN;\n\t\tthis.rightmargin = DEFAULT_RIGHTMARGIN;\n\t\tthis.measurespace = DEFAULT_MEASURESPACE;\n\t}", "public XmlDocumentDefinition() {\n }", "protected XmlPropertiesProvider() {\n // do nothing for now\n }", "@Override\npublic void getPropertyInfo(int arg0, Hashtable arg1, PropertyInfo arg2) {\narg2.setType(Feeds.class);\narg2.setName(\"Feeds\");\n\narg2.setNamespace(n1);\n\n}", "public void setNamespace (\r\n String strNamespace) throws java.io.IOException, com.linar.jintegra.AutomationException;", "protected PropertyPreference(ExternalKey stakeholderKey, ExternalKey propertyKey,\n String namespace) {\n super(stakeholderKey, namespace);\n setPropertyKey(propertyKey);\n }", "public XMLElement(Properties conversionTable) {\n this(conversionTable, false, true, true);\n }", "@Override public com.hp.hpl.jena.rdf.model.Property createProperty(final String nameSpace, final String localName)\n {\n final com.hp.hpl.jena.rdf.model.Property property = super.createProperty(nameSpace, localName);\n \n if (DEBUG.SEARCH && DEBUG.RDF) {\n final String propName;\n if (property instanceof com.hp.hpl.jena.rdf.model.impl.PropertyImpl)\n propName = \"PropertyImpl\";\n else\n propName = property.getClass().getName();\n Log.debug(\"createProperty \" + Util.tags(nameSpace)\n + String.format(\"+%-18s= %s@%08X[%s]\",\n Util.tags(localName), // note need extra padding for escape codes here:\n propName,\n System.identityHashCode(property),\n property.toString()));\n }\n return property;\n }", "public Properties() {\n\n\t\tconfig = new java.util.Properties();\n\n\t\ttry {\n\t\t\tInputStream input = new FileInputStream(new File(\n\t\t\t\t\t\"ConfigurationFile.txt\"));\n\t\t\tconfig.load(input);\n\n\t\t} catch (Exception e) {\n\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}", "public void setNamespace(String namespace) {\n\t\t\r\n\t}", "public DPropertyElement() {\n super(null, null);\n }", "@Override\n\tpublic void startElement(String uri, String localName, String qName,\n\t\t\tAttributes atts) throws SAXException {\n\t\tbuilder.setLength(0);\n\t\tif (localName.equals(\"dimen\")) {\n\t\t\tconfigDimen = new ConfigDimen();\n\t\t\tbuilder.setLength(0);\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tconfigDimen.name = name;\n\t\t\tconfigDimen.type = type;\n\t\t} else if (localName.equals(\"boolean\")) {\n\t\t\tconfigBoolean = new ConfigBoolean();\n\t\t\tconfigBoolean.name = atts.getValue(\"name\");\n\t\t} else if (localName.equals(\"interger\")) {\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString value = atts.getValue(\"value\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tif (type == null || type.isEmpty() || type.equals(\"px\")) {\n\t\t\t\tmInteger.put(name, Integer.parseInt(value));\n\t\t\t} else if (type.equals(\"dp\") || type.equals(\"dip\")) {\n\t\t\t\tmInteger.put(name,\n\t\t\t\t\t\tTools.dip2px(mContext, Integer.parseInt(value)));\n\t\t\t}\n\t\t} else if (localName.equals(\"float\")) {\n\t\t\tString name = atts.getValue(\"name\");\n\t\t\tString value = atts.getValue(\"value\");\n\t\t\tString type = atts.getValue(\"type\");\n\t\t\tif (type == null || type.isEmpty() || type.equals(\"px\")) {\n\t\t\t\tmFloat.put(name, Float.parseFloat(value));\n\t\t\t} else if (type.equals(\"dp\") || type.equals(\"dip\")) {\n\t\t\t\tfinal float scale = appContext.mContainerContext.getResources()\n\t\t\t\t\t\t.getDisplayMetrics().density;\n\t\t\t\tmFloat.put(name, (Float.parseFloat(value) * scale));\n\t\t\t}\n\t\t} else if (localName.equals(\"string\")) {\n\t\t\tconfigString = new ConfigString();\n\t\t\tconfigString.name = atts.getValue(\"name\");\n\n\t\t} else if (localName.equals(\"string-array\")) {\n\t\t\tparentName = atts.getValue(\"name\");\n\t\t\tparentTag = \"string-array\";\n\t\t\tstringList = new ArrayList<String>();\n\t\t\tif (mStringArray.containsKey(parentName)) {\n\t\t\t\tmStringArray.remove(parentName);\n\t\t\t}\n\t\t} else if (localName.equals(\"item\")) {\n\t\t\tif (parentTag.equals(\"string-array\")) {\n\n\t\t\t}\n\t\t}\n\t}", "public XMLEventProtocolParameters() {\n super(XMLEventProtocolParameters.class.getCanonicalName());\n\n // Set the event protocol properties for the XML event protocol\n this.setLabel(XML_EVENT_PROTOCOL_LABEL);\n\n // Set the starting and ending delimiters for text blocks of XML events\n this.setDelimiterToken(XML_TEXT_DELIMITER_TOKEN);\n\n // Set the event protocol plugin class\n this.setEventProtocolPluginClass(Apex2XMLEventConverter.class.getCanonicalName());\n }", "public GongDomObject() throws ParserConfigurationException {\r\n super();\r\n \r\n // Remove the previous anchor\r\n Document document = getDocument();\r\n document.removeChild(document.getDocumentElement());\r\n \r\n // Create the default anchor element\r\n anchor = document.createElementNS(XmlConstants.NAMESPACE_URI, getTag().toString());\r\n document.appendChild(anchor);\r\n }", "public PdfTextStyle(String config) {\n Assert.hasText(config);\n String[] split = config.split(\",\");\n Assert.isTrue(split.length == 3, \"config must look like: 10,Times-Roman,#000000\");\n fontSize = Integer.parseInt(split[0]);\n font = PdfFont.getFont(split[1]);\n color = new Color(Integer.valueOf(split[2].substring(1), 16));\n }", "public PSStyleSheet(Document doc)\n throws java.net.MalformedURLException\n {\n super();\n\n // get the PI node and break it up into the parts we need to know about\n m_PINode = getPINode(doc);\n if (m_PINode != null) {\n String piVal = m_PINode.getData();\n int start = piVal.indexOf('\"') + 1;\n int end = piVal.indexOf('\"', start);\n m_type = piVal.substring(start, end);\n\n start = piVal.indexOf('\"', end+1) + 1;\n end = piVal.indexOf('\"', start);\n piVal = piVal.substring(start, end);\n m_URL = new URL(piVal); // may throw MalformedURLException\n }\n else {\n m_URL = null;\n m_type = null;\n }\n }", "public StringTemplateElement()\n {\n super(String.class);\n }", "public ParserImpl(final Namespace namespace, boolean typeChecking) {\n _defaultNamespace = namespace;\n _typeChecking = typeChecking;\n _tokenizer = null;\n }", "public XMLBuilder()\n\t{\n\t\tthis(\"\");\n\t}", "private Namespace( String mm7Uri ) {\n super( mm7Uri );\n }", "public AS2EnvelopeSettings() {\n }", "public WritingFont() {\n\t\tproperties.set(NAME, \"Untitled\");\n\t\tproperties.set(MEDIAN, .6f);\n\t\tproperties.set(DESCENT, .3f);\n\t\tproperties.set(LEADING, .1f);\n\t}", "protected WebXStyleElementImpl() {\n }", "public void init(String p_options)\n throws ImporterException\n {\n XmlParser parser = null;\n Document dom = null;\n\n try\n {\n parser = XmlParser.hire();\n dom = parser.parseXml(p_options);\n\n Element root = dom.getRootElement();\n\n Node node = root.selectSingleNode(\"//fileOptions\");\n\n // This used to use node.valueOf(\"childnode\") but then\n // entities were incorrectly decoded by the Jaxen library,\n // i.e. \"A&amp;B\" became \"A & B\" instead of \"A&B\".\n\n Element elem = (Element)node;\n m_fileOptions.m_name = elem.elementText(\"fileName\");\n m_fileOptions.m_type = elem.elementText(\"fileType\");\n m_fileOptions.m_encoding = elem.elementText(\"fileEncoding\");\n m_fileOptions.m_separator = elem.elementText(\"separator\");\n m_fileOptions.m_ignoreHeader = elem.elementText(\"ignoreHeader\");\n m_fileOptions.m_entryCount = elem.elementText(\"entryCount\");\n m_fileOptions.m_status = elem.elementText(\"status\");\n m_fileOptions.m_errorMessage = elem.elementText(\"errorMessage\");\n\n initOther(root);\n }\n catch (ImporterException e)\n {\n throw e;\n }\n catch (Exception e)\n {\n CATEGORY.error(\"\", e);\n // cast exception and throw\n error(e.getMessage(), e);\n }\n finally\n {\n XmlParser.fire(parser);\n }\n }", "public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}", "public LPDMODOMAttribute(String name, String value, Namespace namespace) {\n super(name, value, namespace);\n }", "public XMLDocument ()\r\n\t{\r\n\t\tthis (DEFAULT_XML_VERSION, true);\r\n\t}", "public interface DocumentProperties {\n\n /**\n * The character encoding used by the source XML document.\n */\n public interface Charset {\n public void setCharset(java.nio.charset.Charset charset);\n }\n}", "public MyAnnotator(String name, Properties props){\r\n sch = props.getProperty(\"Search.string\",\"the\"); //gets search string if specified, else defaults to \"the\"\r\n }", "public XMLValueNode(String name, String value) {\r\n\t\tsuper(name);\r\n\t\tthis.set(\"xsi:type\", \"xsd:string\");\r\n\t\tthis.setContent(value);\r\n\t}", "public\n YutilProperties()\n {\n super(new Properties());\n }", "@org.junit.Test\n public void constrCompelemName2() {\n final XQuery query = new XQuery(\n \"declare namespace foo=\\\"http://www.example.com/foo\\\"; element foo:elem {'text'}\",\n ctx);\n try {\n result = new QT3Result(query.value());\n } catch(final Throwable trw) {\n result = new QT3Result(trw);\n } finally {\n query.close();\n }\n test(\n assertSerialization(\"<foo:elem xmlns:foo=\\\"http://www.example.com/foo\\\">text</foo:elem>\", false)\n );\n }", "public Element getConfig() {\n Element out = new Element(getElementName(),MarsModel.NAMESPACE);\n out.setAttribute(\"enabled\",String.valueOf(enabled));\n out.setAttribute(\"xmlfile\",xmlfile.getPath());\n out.setAttribute(\"period\",String.valueOf(period));\n out.setAttribute(\"xslthref\",xslthref);\n return out;\n }", "public GMailProperties(final String filepath, final String charsetName) throws FileNotFoundException, IOException {\r\n this.properties = new PropertyStorage(filepath, charsetName);\r\n }", "@Test\n\tpublic void test_TCC___String_String_int_OrgJdomNamespace() {\n {\n \t\tfinal Namespace namespace = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\n \t\t@SuppressWarnings(\"deprecation\")\n\t\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\", Attribute.ID_TYPE.ordinal(), namespace);\n \t\tassertTrue(\"incorrect attribute name\", attribute.getName().equals(\"test\"));\n \t\tassertTrue(\"incoorect attribute value\", attribute.getValue().equals(\"value\"));\n \t\tassertTrue(\"incorrect Namespace\", attribute.getNamespace().equals(namespace));\n\n assertEquals(\"incoorect attribute type\", attribute.getAttributeType(), Attribute.ID_TYPE);\n }\n\n\t\t//now test that the attribute cannot be created with a namespace\n\t\t//without a prefix\n final Namespace defaultNamespace = Namespace.getNamespace(\"http://some.other.place\");\n\t\ttry {\n new Attribute(\"test\", \"value\", defaultNamespace);\n\t\t\tfail(\"allowed creation of attribute with a default namespace\");\n\t\t} catch (final IllegalNameException e) {\n\t\t\t// Do nothing\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Unexpected exception \" + e.getClass());\n\t\t}\n\n\t\ttry {\n new Attribute(\"test\", \"value\", (Namespace)null);\n\t\t} catch (Exception e) {\n \t\tfail(\"didn't handle null attribute namespace\");\n\t\t}\n\t}", "protected abstract String getPropertyPrefix();", "public ConfigurationItem(HierarchicalConfiguration.Node node, XMLConfiguration config)\n {\n HierarchicalConfiguration.Node pnode = config.getRoot();\n config.setRoot(node);\n hcfg = config;\n root = node;\n name = config.getConfigString(\"name\");\n description = config.getConfigString(\"description\");\n className = config.getConfigString(\"class\");\n setProperties(config);\n config.setRoot(pnode);\n }", "IElementDef parse(ConfigSource configSource);", "public interface ResourceConfig {\n\n public ResourceBundle config = ResourceBundle.getBundle(\"resource-config\");\n\n public String DEFAULT_LOCALE = config.getString(\"defaultLocale\");\n\n public String EXCEPTION_MESSAGE_PREFIX = config.getString(\"exception_message_prefix\");\n\n public boolean VALUE_NEED_ENCODE = new Boolean(config.getString(\"stringEncode\")).booleanValue();\n\n public String SOURCE_ENCODE = config.getString(\"sourceEncode\");\n\n public String TARGET_ENCODE = config.getString(\"targetEncode\");\n\n public String LOCALE_LIST = config.getString(\"localeList\");\n\n public String RESOURCEBOX_FILES = config.getString(\"resourcebox_files\");\n\n public String CONSTANTS_FILES = config.getString(\"constants_files\");\n\n}", "public interface PropertyDefinition {\n\n String getLocalName();\n\n FormatConverter getConverter();\n\n List<String> getValues();\n\n boolean isMultiValued();\n\n}", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\n this.namespace = namespace;\n }", "public void setNamespace(String namespace) {\r\n if (StringUtils.isBlank(namespace)) {\r\n throw new IllegalArgumentException(\"namespace is blank\");\r\n }\r\n\t\t\tthis.namespace = namespace;\r\n\t\t}", "public XPathParser(String xmlFileName, String contextNode) {\n this(new InputSource(xmlFileName), contextNode);\n }", "public Properties() \r\n\t{\r\n\t\tsuper();\r\n\t\tthis.port = 1234;\r\n\t\tthis.ip = \"127.0.0.1\";\r\n\t}", "public NsNamespaces() {\n this(DSL.name(\"ns_namespaces\"), null);\n }", "public Phrase(Properties attributes) {\n this(\"\", FontFactory.getFont(attributes));\n clear();\n String value;\n if ((value = (String)attributes.remove(ElementTags.LEADING)) != null) {\n setLeading(Float.valueOf(value + \"f\").floatValue());\n }\n else if ((value = (String)attributes.remove(MarkupTags.CSS_LINEHEIGHT)) != null) {\n setLeading(MarkupParser.parseLength(value));\n }\n if ((value = (String)attributes.remove(ElementTags.ITEXT)) != null) {\n Chunk chunk = new Chunk(value);\n if ((value = (String)attributes.remove(ElementTags.GENERICTAG)) != null) {\n chunk.setGenericTag(value);\n }\n add(chunk);\n }\n if (attributes.size() > 0) setMarkupAttributes(attributes);\n }", "public ConfigFile(String fileName, String encoding) {\n InputStream inputStream = null;\n try {\n inputStream = getClassLoader().getResourceAsStream(fileName); // properties.load(ConfigFile.class.getResourceAsStream(fileName));\n if (inputStream == null) {\n throw new IllegalArgumentException(\"Properties file not found in classpath: \" + fileName);\n }\n\n properties = new Properties();\n if (fileName.endsWith(\"yml\")){\n isYml = true;\n properties= new Yaml().loadAs(new InputStreamReader(inputStream, encoding),Properties.class);\n }else\n properties.load(new InputStreamReader(inputStream, encoding));\n } catch (IOException e) {\n throw new RuntimeException(\"Error loading properties file.\", e);\n } finally {\n if (inputStream != null) try {\n inputStream.close();\n } catch (IOException e) {\n LogKit.error(e.getMessage(), e);\n }\n }\n }", "public Property(String configFileName) {\r\n\r\n\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\tscoringmethod = 0;\r\n\t\tmindistance = 0.5;\r\n\r\n\t\tif (configFileName == null) {\r\n\t\t\tthrow new NullPointerException();\r\n\t\t}\r\n\t\tScanner in = null;\r\n\t\tScanner scan = null;\r\n\t\ttry {\r\n\t\t\tFile conf = new File(configFileName);\r\n\t\t\tin = new Scanner(conf);\r\n\t\t\twhile (in.hasNextLine()) {\r\n\t\t\t\tString line = in.nextLine().replace('=', ',');\r\n\t\t\t\tscan = new Scanner(line);\r\n\t\t\t\tscan.useDelimiter(\",\");\r\n\t\t\t\tString firstWord = scan.next();\r\n\t\t\t\tif (firstWord.equals(\"positive\")) {\r\n\t\t\t\t\tpositive = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"negative\")) {\r\n\t\t\t\t\tnegative = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"stop\")) {\r\n\t\t\t\t\tstop = termsArray(scan);\r\n\t\t\t\t} else if (firstWord.equals(\"scoringmethod\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tscoringmethod = Integer.parseInt(next);\r\n\t\t\t\t} else if (firstWord.equals(\"mindistance\")) {\r\n\t\t\t\t\tString next = scan.next();\r\n\t\t\t\t\tmindistance = Double.parseDouble(next);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} catch (IOException ex) {\r\n\t\t\tSystem.out.println(ex.getMessage());\r\n\t\t\tpositive = new String[] { \"fun\", \"happy\", \"positive\" };\r\n\t\t\tnegative = new String[] { \"sad\", \"bad\", \"angry\" };\r\n\t\t\tstop = new String[] { \"a\", \"an\", \"the\" };\r\n\t\t\tscoringmethod = 0;\r\n\t\t\tmindistance = 0.5;\r\n\t\t} finally{\r\n\t\t\tif(scan != null)\r\n\t\t\t\tscan.close();\r\n\t\t}\r\n\t}", "public Config(String filename) {\n this.filename = filename;\n }", "public PjxParser()\r\n {\r\n LOG.info(this + \" instantiated\");\r\n }", "private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}", "private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}", "public PropertyParser(Properties props)\n\t{\n\t\t_props = props;\n\t}", "protected AbstractXmlSpecification() {\n\t\tthis.properties = new Properties();\n\t}", "public NodePropertiesInternalFrame(Map<String, String> _info, String _nodeName, IConfigurerPrx _config) {\n initComponents();\n this.setClosable(true);\n this.setTitle(_nodeName + \" - properties\");\n initInfo(_info);\n config = _config;\n }", "abstract void putXMLProperty(XMLName name, Object value);", "abstract public Config createConfigFromString(String data);", "public XMLData () {\r\n\r\n //code description\r\n\r\n try {\r\n DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();\r\n this.document = builder.newDocument(); \r\n }\r\n catch (ParserConfigurationException err) {}\r\n\r\n }", "protected XMLElement(Properties conversionTable,\n boolean skipLeadingWhitespace,\n boolean fillBasicConversionTable,\n boolean ignoreCase) {\n this.ignoreCase = ignoreCase;\n this.skipLeadingWhitespace = skipLeadingWhitespace;\n this.tagName = null;\n this.contents = \"\";\n this.attributes = new Properties();\n this.children = new Vector();\n this.conversionTable = conversionTable;\n this.lineNr = 0;\n\n if (fillBasicConversionTable) {\n this.conversionTable.put(\"lt\", \"<\");\n this.conversionTable.put(\"gt\", \">\");\n this.conversionTable.put(\"quot\", \"\\\"\");\n this.conversionTable.put(\"apos\", \"'\");\n this.conversionTable.put(\"amp\", \"&\");\n }\n }", "private void parseProperties()\n {\n List children = rootElement.getChildren(\"property\");\n\n for (Object aChildren : children)\n {\n Element child = (Element) aChildren;\n Property property = new Property(child, properties, this);\n }\n }", "public GongDomObject(String string) throws ParserConfigurationException, InvalidTagException, SAXException, IOException {\r\n super(string);\r\n }", "public NotationValue(String prefix, String uri, String localName, AtomicType typeLabel) {\n qName = new StructuredQName(prefix, uri, localName);\n this.typeLabel = typeLabel;\n }", "public Tag(Property.Name value) {\n\t}", "@Test\n\tpublic void test_TCM__String_getValue() {\n\t\tfinal Namespace ns = Namespace.getNamespace(\"prefx\", \"http://some.other.place\");\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\", ns);\n\t\tassertTrue(\"incorrect value\", attr.getValue().equals(\"value\"));\n\n\t}", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "protected MapNamespaceContext createNamespaceContext() {\r\n // create the xpath with fedora namespaces built in\r\n MapNamespaceContext nsc = new MapNamespaceContext();\r\n nsc.setNamespace(\"fedora-types\", \"http://www.fedora.info/definitions/1/0/types/\");\r\n nsc.setNamespace(\"sparql\", \"http://www.w3.org/2001/sw/DataAccess/rf1/result\");\r\n nsc.setNamespace(\"foxml\", \"info:fedora/fedora-system:def/foxml#\");\r\n nsc.setNamespace(\"rdf\", \"http://www.w3.org/1999/02/22-rdf-syntax-ns#\");\r\n nsc.setNamespace(\"fedora\", \"info:fedora/fedora-system:def/relations-external#\");\r\n nsc.setNamespace(\"rdfs\", \"http://www.w3.org/2000/01/rdf-schema#\");\r\n nsc.setNamespace(\"fedora-model\", \"info:fedora/fedora-system:def/model#\");\r\n nsc.setNamespace(\"oai\", \"http://www.openarchives.org/OAI/2.0/\");\r\n nsc.setNamespace(\"oai_dc\", \"http://www.openarchives.org/OAI/2.0/oai_dc/\", \"http://www.openarchives.org/OAI/2.0/oai_dc.xsd\");\r\n nsc.setNamespace(\"dc\", \"http://purl.org/dc/elements/1.1/\"); \r\n nsc.setNamespace(\"xsi\", \"http://www.w3.org/2001/XMLSchema-instance\");\r\n nsc.setNamespace(\"fedora-management\", \"http://www.fedora.info/definitions/1/0/management/\", \"http://www.fedora.info/definitions/1/0/datastreamHistory.xsd\");\r\n return nsc;\r\n }", "protected abstract void _fromXml_(Element in_xml) throws ConfigurationException;", "public NamespaceHelper(String _namespaceUri, String _prefix, String localName)\n throws ParserConfigurationException {\n this(_namespaceUri, _prefix, DocumentHelper.createDocument(_namespaceUri, getQualifiedName(\n _prefix, localName), null));\n }", "public PropertyReader(String propertyFileName)\r\n\t{\r\n\t\tthis.propertyFileName = propertyFileName;\r\n\t}", "public SimpleXMLPipelineConfiguration() {\n configurations = new HashMap();\n }", "public NetscapeV3Factory() {\r\n }", "private ConfigProperties() {\n\n }", "public XPathParser(String xmlFileName) {\n this(new InputSource(xmlFileName), defaultContextNode);\n }", "protected void init(String fullName, String namespace, String systemID, int lineNr)\n/* */ {\n/* 209 */ this.fullName = fullName;\n/* 210 */ if (namespace == null) {\n/* 211 */ this.name = fullName;\n/* */ } else {\n/* 213 */ int index = fullName.indexOf(':');\n/* 214 */ if (index >= 0) {\n/* 215 */ this.name = fullName.substring(index + 1);\n/* */ } else {\n/* 217 */ this.name = fullName;\n/* */ }\n/* */ }\n/* 220 */ this.namespace = namespace;\n/* 221 */ this.line = lineNr;\n/* 222 */ this.systemID = systemID;\n/* */ }", "protected BaseStreamWriter(XmlWriter xw, String enc, WriterConfig cfg)\n {\n mWriter = xw;\n mEncoding = enc;\n mConfig = cfg;\n\n int flags = cfg.getConfigFlags();\n\n mCheckStructure = (flags & OutputConfigFlags.CFG_VALIDATE_STRUCTURE) != 0;\n mCheckAttrs = (flags & OutputConfigFlags.CFG_VALIDATE_ATTR) != 0;\n\n mCfgAutomaticEmptyElems = (flags & OutputConfigFlags.CFG_AUTOMATIC_EMPTY_ELEMENTS) != 0;\n mCfgCDataAsText = (flags & OutputConfigFlags.CFG_OUTPUT_CDATA_AS_TEXT) != 0;\n mCfgCopyDefaultAttrs = (flags & OutputConfigFlags.CFG_COPY_DEFAULT_ATTRS) != 0;\n \n mReturnNullForDefaultNamespace = mConfig.returnNullForDefaultNamespace();\n }", "public CrossrefUnixrefSaxParser() {\n }", "public WSLNode(String tagName) {this(tagName,new WSLAttributeList());}", "private ARXOrderedString(){\r\n this(\"Default\");\r\n }" ]
[ "0.5688304", "0.56107265", "0.54559237", "0.5347635", "0.53279144", "0.527357", "0.5233408", "0.5211218", "0.51518375", "0.5130114", "0.51181394", "0.5113177", "0.5086115", "0.503104", "0.5023931", "0.49926513", "0.49219567", "0.4920269", "0.48829228", "0.48785338", "0.48661706", "0.48530376", "0.48434004", "0.48433083", "0.48280334", "0.4820651", "0.4814854", "0.48100135", "0.47867036", "0.47846386", "0.4776207", "0.4757271", "0.47547165", "0.4750433", "0.47438827", "0.47424865", "0.47380933", "0.47293288", "0.47288546", "0.47250235", "0.47237524", "0.47211283", "0.4691157", "0.4676548", "0.46714252", "0.46623057", "0.4660798", "0.46591973", "0.4650625", "0.4650577", "0.46482217", "0.46302208", "0.46302012", "0.46294245", "0.4625322", "0.46247646", "0.4618567", "0.46157345", "0.46119702", "0.46084985", "0.4608041", "0.46076903", "0.46076903", "0.46058527", "0.46038526", "0.4599218", "0.4599173", "0.45979047", "0.45978478", "0.45920825", "0.4577435", "0.45752415", "0.45735037", "0.45735037", "0.4572927", "0.45720005", "0.45708203", "0.45668206", "0.456275", "0.4560847", "0.45600218", "0.45506546", "0.45477772", "0.45464605", "0.45360807", "0.45334882", "0.45307213", "0.45274943", "0.4519607", "0.4512633", "0.45125315", "0.45100394", "0.45006284", "0.45005047", "0.44992948", "0.44982967", "0.44970062", "0.44930226", "0.4491778", "0.44882962" ]
0.4902398
18
Config the FontFamilySelector using the default values. All the system available font names are added to the combo box.
private void defaultConfig(Set<String> defaultFontFamilyNames) { defaultFontFamily = DEFAULT_SELECTED_FONT_NAME; // the empty font name addItem(""); // all the system font names to combo box for (String defaultFontFamilyName : defaultFontFamilyNames) { this.listFontFamily.add(defaultFontFamilyName); addItem(defaultFontFamilyName); } this.setSelectedItem(defaultFontFamily); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public FontFamilySelector() {\n defaultConfig(Util.getAllFontNames());\n }", "public FontFamilySelector(String namespace) {\n Util.checkString(namespace, \"namespace\");\n\n Set<String> defaultFontFamilyNames = Util.getAllFontNames();\n\n Map<String, String> map = Util.getPropertyMap(namespace, \"fontFamily\");\n if (map == null) {\n // The property is missing, then use default values\n defaultConfig(defaultFontFamilyNames);\n } else {\n // the empty font name\n addItem(\"\");\n\n // the default font name\n // if present in the configuration file, then use it\n // otherwise, use the default font name\n if (map.containsKey(\"default\")) {\n defaultFontFamily = map.get(\"default\");\n\n // The default font name is not available in the system\n if (!defaultFontFamilyNames.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"The default font name \" + defaultFontFamily\n + \" is not supported.\");\n }\n } else {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n addItem(defaultFontFamily);\n listFontFamily.add(defaultFontFamily);\n }\n\n // Add all the configed fonts as items\n Set<Entry<String, String>> entries = map.entrySet();\n for (Entry<String, String> entry : entries) {\n // The default font is skipped\n if (\"default\".equals(entry.getKey())) {\n continue;\n }\n\n // Other fonts are added as items of the combo box\n String fontName = entry.getValue();\n\n // If the font name is not available, then throw StylePanelConfigurationException\n if (!defaultFontFamilyNames.contains(fontName)) {\n throw new StylePanelConfigurationException(\"The font name \" + fontName + \" is not supported.\");\n }\n\n if (!listFontFamily.contains(fontName)) {\n addItem(fontName);\n listFontFamily.add(fontName);\n } else {\n if (fontName.equals(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"There are duplicate font name, it is \" + fontName);\n }\n }\n }\n\n if (!listFontFamily.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\n \"The default font name is missing in the configuration file.\");\n }\n\n this.setSelectedItem(defaultFontFamily);\n }\n }", "private JPanel setup_font_family_combo_box() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout( new FlowLayout( FlowLayout.LEFT, 5, 5));\r\n\r\n\t\t_comboBox = CommonTool.get_font_family_combo_box();\r\n\r\n\t\tif ( !_family_name.equals( \"\"))\r\n\t\t\t_comboBox.setSelectedItem( _family_name);\r\n\r\n\t\tlink_to_cancel( _comboBox);\r\n\r\n\t\tpanel.add( _comboBox);\r\n\t\treturn panel;\r\n\t}", "void setFontFamily(ReaderFontSelection f);", "public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;", "public SelectFontFamilyDlg(Frame arg0, boolean arg1, String family_name) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t\t_family_name = family_name;\r\n\t}", "public SelectFontFamilyDlg(Frame arg0, boolean arg1) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t}", "public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }", "public void addFamilies() {\n GraphicsEnvironment env =\n GraphicsEnvironment.getLocalGraphicsEnvironment();\n family_list = env.getAvailableFontFamilyNames(); /*FAULT:: family_list = new String[10]; */\n for (int i = 0; i < family_list.length; i++) {\n families.addItem(family_list[i]);\n }\n\n\n\n }", "public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }", "public LabelBuilder setFontFamily(String fontFamily) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setFamily(fontFamily);\n\t\treturn this;\n\t}", "public void setDefaultFontFamily(String defaultFontFamily) {\n Util.checkString(defaultFontFamily, \"defaultFontFamily\");\n\n this.defaultFontFamily = defaultFontFamily;\n }", "private void setFont() {\n\t}", "public void setSelectedFontName( String fontName )\r\n\t{\r\n\t\t// set the currently selected font name as per the string passed in if it exists in the list\r\n\t\t// second parameter set to true so scroll pane will scroll to selected item\r\n\t\tfontNamesList.setSelectedValue( fontName, true );\r\n\t}", "protected Choice createFontChoice() {\n CommandChoice choice = new CommandChoice();\n String fonts[] = Toolkit.getDefaultToolkit().getFontList();\n for (int i = 0; i < fonts.length; i++)\n choice.addItem(new ChangeAttributeCommand(fonts[i], \"FontName\", fonts[i], fView));\n return choice;\n }", "public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;", "public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}", "private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }", "public void setLabelFont(Font f);", "public final void setFontFamily(final String fontFamily) {\n if (!this.fontFamily.equals(fontFamily)) {\n this.fontFamily = fontFamily;\n flush();\n }\n\n }", "public void setFontName(String name)\n {\n font.setFontName(name);\n }", "public void applyFonts()\n\t{\n\t\tFont font = s_cfg.getFont( FontKey.GUI_NOM );\n\t\tm_executorsTable.applyFonts();\n\t\tm_btnTakeControl.setFont( font );\n\t\tm_btnReleaseControl.setFont( font );\n\t\tm_btnBackground.setFont( font );\n\t\tm_btnStartMonitor.setFont( font );\n\t\tm_btnStopMonitor.setFont( font );\n\t\tm_btnKillExecutor.setFont( font );\n\t\tm_btnStopExecutor.setFont( font );\n\t\tm_btnRefresh.setFont( font );\n\t}", "public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }", "private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}", "public void setFontNameText( String text )\r\n\t{\r\n\t\t// set the text in the Font Name text field as per the String passed in\r\n\t\tfontNameTextField.setText( text );\r\n\t}", "private void setFonts() {\n fileTitle.setFont(MasterDisplay.titleFont);\n entryFileButton.setFont(MasterDisplay.tabAndButtonFont);\n entryFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n itemFileButton.setFont(MasterDisplay.tabAndButtonFont);\n itemFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderButton.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderLabel.setFont(MasterDisplay.tabAndButtonFont);\n }", "private void updateFontSet() {\n if (!isBigFontSet()) {\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), null);\n } else {\n// <snip> Install sscaled font\n FontPolicy windowsPolicy = FontPolicies.getDefaultWindowsPolicy();\n FontSet fontSet = windowsPolicy.getFontSet(null, UIManager\n .getLookAndFeelDefaults());\n WrapperFontSet scaled = new WrapperFontSet(fontSet, 5);\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), scaled);\n// </snip>\n }\n updateLookAndFeel();\n }", "public FontSelector(Window parent, boolean modal) {\r\n super(parent, (modal \r\n ? ModalityType.APPLICATION_MODAL \r\n : ModalityType.MODELESS));\r\n retnull = false;\r\n fonts = GraphicsEnvironment\r\n .getLocalGraphicsEnvironment()\r\n .getAvailableFontFamilyNames();\r\n initComponents();\r\n this.addWindowListener(new WindowAdapter() {\r\n @Override\r\n public void windowClosing(WindowEvent e) {\r\n retnull = true;\r\n setVisible(false);\r\n dispose();\r\n }\r\n });\r\n KeyListener kl = new KeyAdapter() {\r\n public void keyPressed(KeyEvent e) {\r\n if(e.getKeyCode() == KeyEvent.VK_ESCAPE) {\r\n setVisible(false);\r\n dispose();\r\n }\r\n }\r\n };\r\n fontField.addKeyListener(kl);\r\n fontList.addKeyListener(kl);\r\n styleField.addKeyListener(kl);\r\n styleList.addKeyListener(kl);\r\n sizeField.addKeyListener(kl);\r\n sizeList.addKeyListener(kl);\r\n okButton.addKeyListener(kl);\r\n this.setLocationRelativeTo(parent);\r\n }", "private void updateFont() {\n this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),\n Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),\n this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),\n Font.NORMAL,\n this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex())); \n }", "public void setFont(Font fnt) {\n\t\tborder.setTitleFont(fnt);\n\t}", "public final String getFontFamily() {\n return fontFamily;\n }", "public void familiesActionPerformed(java.awt.event.ActionEvent evt) {\n myFont.font = (String) families.getSelectedItem(); /*FAULT:: myFont.font = \"xyz\"; */\n }", "public void clearSelectedFontName()\r\n\t{\r\n\t\t// deselect the currently selected item in the Font Names list if there is one\r\n\t\tfontNamesList.clearSelection();\r\n\t}", "protected void installDefaults() {\n this.controlPanel.setBackground(null);\n\n Font font = this.controlPanel.getFont();\n if (font == null || font instanceof UIResource) {\n Font toSet = RadianceThemingCortex.GlobalScope.getFontPolicy().getFontSet().\n getControlFont();\n this.controlPanel.setFont(toSet);\n }\n }", "@FXML\r\n void fontAction() {\r\n // default css code for each characteristics of the text\r\n String textFont = \"-fx-font-family: \";\r\n String textSize = \"-fx-font-size: \";\r\n String textStyle = \"\";\r\n\r\n // Create and take the input from the Font dialog\r\n Dialog<Font> fontSelector = new FontSelectorDialog(null);\r\n Optional<Font> result = fontSelector.showAndWait();\r\n\r\n // add changes to the default CSS code above based on the users\r\n if (result.isPresent()) {\r\n Font newFont = result.get();\r\n textFont += \"\\\"\" + newFont.getFamily() + \"\\\";\";\r\n textSize += newFont.getSize() + \"px;\";\r\n\r\n // some basics CSS font characteristics\r\n String style = newFont.getStyle();\r\n String style_italic = \"-fx-font-style: italic;\";\r\n String style_regular = \"-fx-font-weight: normal ;\";\r\n String style_bold = \"-fx-font-weight: bold;\";\r\n switch (style) {\r\n case \"Bold Italic\":\r\n textStyle += style_bold + \"\\n\" + style_italic;\r\n case \"Italic\":\r\n textStyle += style_italic;\r\n case \"Regular\":\r\n textStyle += style_regular;\r\n case \"Regular Italic\":\r\n textStyle += style_italic;\r\n default:\r\n textStyle += style_bold;\r\n }\r\n\r\n // Add all characteristic to a single string\r\n String finalText = textFont + \"\\n\" + textSize;\r\n finalText += \"\\n\" + textStyle;\r\n // Display options and set that options to the text\r\n defOutput.setStyle(finalText);\r\n }\r\n }", "void setFontNames(String[] associationArray)\n \t{\n \t\tint maxAssociation = 0;\n \t\tfor(int i=0; i<associationArray.length; i++)\n \t\t{\n if (associationArray[i] == null) continue;\n \t\t\tint fontNumber = TextUtils.atoi(associationArray[i]);\n \t\t\tif (fontNumber > maxAssociation) maxAssociation = fontNumber;\n \t\t}\n \t\tif (maxAssociation <= 0) return;\n \n \t\tfontNames = new String[maxAssociation];\n \t\tfor(int i=0; i<maxAssociation; i++) fontNames[i] = null;\n \t\tfor(int i=0; i<associationArray.length; i++)\n \t\t{\n if (associationArray[i] == null) continue;\n \t\t\tint fontNumber = TextUtils.atoi(associationArray[i]);\n \t\t\tif (fontNumber <= 0) continue;\n \t\t\tint slashPos = associationArray[i].indexOf('/');\n \t\t\tif (slashPos < 0) continue;\n \t\t\tfontNames[fontNumber-1] = associationArray[i].substring(slashPos+1);\n \t\t}\n \t}", "protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}", "private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }", "public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}", "public void setFont(Font f) {\n font = f;\n compute();\n }", "public void setFont(Font value) {\r\n this.font = value;\r\n }", "public void setLabelFont(Font value) {\n labelFont = value;\n }", "@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }", "public FontChooseGUI()\r\n\t{\r\n\t\tsuper( \"Choose Font\" ); // call superclass constructor with window title\r\n\t\t\r\n\t\t/**************************************************************\r\n\t\t ** Initialise individual GUI components **\r\n\t\t **************************************************************/\r\n\t\t\r\n\t\tfontNamesList = new JList< String >( FONT_NAMES ); // initialise list of font names \r\n\t\tfontNamesList.setSelectionMode( ListSelectionModel.SINGLE_SELECTION ); // set font names list to allow only single selection\r\n\t\tfontNamesList.setVisibleRowCount( 5 ); // set the number of visible rows in the font names list to five\r\n\t\t\r\n\t\tboldCheckBox = new JCheckBox( \"Bold\" ); // initialise Bold checkbox\r\n\t\titalicCheckBox = new JCheckBox( \"Italic\" ); // initialise Italic checkbox\r\n\t\tfontNameLabel = new JLabel( \"Font\" ); // initialise Font Name label\r\n\t\tfontSizeLabel = new JLabel( \"Size\" ); // initialise Font Size label\r\n\t\tokButton = new JButton( \"OK\" ); // initialise OK button\r\n\t\tcancelButton = new JButton( \"Cancel\" ); // initialise Cancel button\r\n\t\t\r\n\t\t// initialise the array of font sizes with every even number from 2 to 100\r\n\t\tfor( int i = 0; i < 50; i++ )\r\n\t\t\tfontSizes[ i ] = ( i * 2 ) + 2;\r\n\t\t\r\n\t\tfontSizeList = new JList< Integer >( fontSizes ); // initialise list of font sizes\r\n\t\tfontSizeList.setSelectionMode( ListSelectionModel.SINGLE_SELECTION ); // set font sizes list to allow only single selection\r\n\t\tfontSizeList.setVisibleRowCount( 5 ); // set the number of visible rows in the font names list to five\r\n\t\t\r\n\t\tfontNameTextField = new JTextField( 20 ); // initialise the font name text field with 20 columns\r\n\t\tfontSizeTextField = new JTextField( 20 ); // initialise the font size text field with 20 columns\r\n\t\t\r\n\t\tleftBox = Box.createVerticalBox(); // initialise left hand box to add components in vertical layout\r\n\t\trightBox = Box.createVerticalBox(); // initialise right hand box to add components in vertical layout\r\n\t\t\r\n\t\t/**************************************************************\r\n\t\t ** Add components to the GUI **\r\n\t\t **************************************************************/\r\n\t\t\r\n\t\tleftBox.add( fontNameLabel ); // add font name label to left side of GUI\r\n\t\tleftBox.add( fontNameTextField ); // add font name text field to left side of GUI\r\n\t\tleftBox.add( new JScrollPane( fontNamesList ) ); // add font names list within a scroll pane to left side of GUI\r\n\t\tleftBox.add( boldCheckBox ); // add Bold checkbox to left side of GUI\r\n\t\tleftBox.add( okButton ); // add OK button to left side of GUI\r\n\t\t\r\n\t\trightBox.add( fontSizeLabel ); // add font size label to right side of GUI\r\n\t\trightBox.add( fontSizeTextField ); // add font size text field to right side of GUI\r\n\t\trightBox.add( new JScrollPane( fontSizeList ) ); // add font sizes list within a scroll pane to right side of GUI\r\n\t\trightBox.add( italicCheckBox ); // add italic checkbox to right side of GUI\r\n\t\trightBox.add( cancelButton ); // add Cancel button to right side of GUI\r\n\t\t\r\n\t\tsetLayout( new FlowLayout() ); // set the layout of the parent frame to the default Flow Layout\r\n\t\t\r\n\t\tadd( leftBox ); // add left hand side box to the parent frame using default layout\r\n\t\tadd( rightBox ); // add right hand side box to the parent frame using default layout\r\n\t\t\r\n\t\tsetDefaultCloseOperation( JFrame.HIDE_ON_CLOSE ); // set frame to hide when user closes the window\r\n\t\tpack(); // resize window to fit components\r\n\t}", "private void initFontAndChange(Context context) {\n changeFont(context);\n }", "public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}", "public void updateFonts() {\n\t\tfor (int i = 0; i < this.getMenuCount(); i++) {\n\t\t\tJMenu m;\n\t\t\tif ((m = getMenu(i)) != null) {\n\n\t\t\t\t// old method\n\t\t\t\t// problem with keyboard shortcuts\n\t\t\t\t// setMenuFontRecursive(m, app.getPlainFont());\n\n\t\t\t\t// force rebuild next time menu is opened\n\t\t\t\t// see BaseMenu.menuSelected()\n\t\t\t\tm.removeAll();\n\n\t\t\t\t// update title (always visible)\n\t\t\t\tm.setFont(app.getPlainFont());\n\t\t\t}\n\t\t}\n\t}", "private void loadSettingFont() {\n\t\tSharedPreferences mysettings = getSharedPreferences(\n\t\t\t\tPREFERENCES_FILE_NAME, 0);\n\t\tindexFont = mysettings.getInt(\"indexFont\", 1);\n\t\tLog.d(\"indexFont\", indexFont + \"\");\n\t\tswitch (indexFont) {\n\t\tcase 0:\n\t\t\tmTypeface = Typeface.DEFAULT;\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"tinhyeu.ttf\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"thuphap.ttf\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmTypeface = Typeface.createFromAsset(getApplicationContext()\n\t\t\t\t\t.getAssets(), \"SEGOEUI.TTF\");\n\t\t\tbreak;\n\t\t}\n\t}", "public FilterConfigPanel() {\n initComponents();\n list.addListSelectionListener(this);\n // Cannot edit the form anymore, so do this\n Font f = UIManager.getFont(\"Label.font\");\n if (f == null) {\n Integer sz = UIManager.getInt(\"customFontSize\");\n f = new Font(\"Dialog\", Font.PLAIN, sz == null ? 14 : sz.intValue());\n }\n jTextArea1.setFont(f);\n }", "public static void setFont(String fontName, int fontSize, int style){\n\t\tGComponent.fGlobalFont = new Font(fontName, fontSize, style);\n\t}", "public void setFamily( String f )\n {\n family = f.toLowerCase( Locale.ENGLISH );\n }", "public void setMatchFontName(String matchFontName);", "public void setListFontFamily(List<String> listFontFamily) {\n Util.checkList(listFontFamily, \"listFontFamily\");\n if (listFontFamily.isEmpty()) {\n throw new IllegalArgumentException(\"The listFontFamily is empty list.\");\n }\n\n this.removeAllItems();\n\n addItem(\"\");\n for (String font : listFontFamily) {\n addItem(font);\n }\n\n this.listFontFamily = listFontFamily;\n }", "public FontFrame(JTextArea txtWorkplace) {\n initComponents();\n Font[] fontList = new Font[]{};\n fontList = GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts();\n for (int i = 0; i < fontList.length; i++) {\n cbbFont.addItem(fontList[i].getFontName());\n }\n fontName = (String) cbbFont.getSelectedItem();\n fontSize = (int) spinnerSize.getValue();\n fontStyle = (int) cbbStyle.getSelectedIndex();\n lblTest.setFont(new Font(fontName,fontSize,fontSize));\n this.txtWorkplace = txtWorkplace;\n }", "public void setFont(String key, Font value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.getName() + \" \" + value.getSize() + \" \" + value.getStyle());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "@Override\n public void setFont(String font) {\n graphicsEnvironmentImpl.setFont(canvas, font);\n }", "public void initFont() {\r\n\t\tFont dosFont = null;\r\n try {\r\n \t//setup font\r\n\t\t\t\tURL fontUrl = getURL(\"fonts/DOSFont.ttf\");\r\n\t\t \tdosFont = Font.createFont(Font.TRUETYPE_FONT, fontUrl.openStream());\r\n\t \tdosFont = dosFont.deriveFont(Font.PLAIN, 15);\r\n\t \tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t \tge.registerFont(dosFont);\r\n\t } catch(Exception e) {\r\n\t e.printStackTrace();\r\n\t System.exit(-1);\r\n\t }\r\n screen.setFont(dosFont);//set font on JTextArea\r\n\t}", "public String getFontName();", "public String getFontName();", "public String getFontName();", "public void setFont(String font)\n {\n getStateHelper().put(PropertyKeys.font, font);\n }", "public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }", "private void applyFontStyle() {\r\n\t\tfinal Font font = SWTGraphicUtil.buildFontFrom(this.control, PromptSupport.getFontStyle(this.control));\r\n\t\tthis.control.setFont(font);\r\n\t\tSWTGraphicUtil.addDisposer(this.control, font);\r\n\t}", "public LabelBuilder setFont(FontCallback<LabelsContext> fontColorCallback) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.setFont(fontColorCallback);\n\t\treturn this;\n\t}", "public synchronized void setProvider(FontProvider fontProvider) {\n/* 136 */ this.fontInfoByName = createFontInfoByName(fontProvider.getFontInfo());\n/* 137 */ this.fontProvider = fontProvider;\n/* */ }", "@Override\n public void setFont(Font f) {\n super.setFont(f);\n menuDirty = true;\n ResizeUtils.updateSize(this, actions);\n }", "protected void applyFont() {\n\t\tif (fields != null) {\n\t\t\tIterator<FieldEditor> e = fields.iterator();\n\t\t\twhile (e.hasNext()) {\n\t\t\t\tFieldEditor pe = e.next();\n\t\t\t\t// pe.applyFont();\n\t\t\t}\n\t\t}\n\t}", "private static void buildFonts() {\r\n fontSMALL = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_SM );\r\n fontMEDIUM = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_MD );\r\n fontLARGE = new Font( strDEFAULT_TYPEFACE, Font.BOLD, FONT_SIZE_LG );\r\n }", "private void setupFonts()\r\n\t{\r\n\t\tSystem.out.println(\"In setupFonts()\");\r\n\t\t\r\n\t\t// set up the text fonts\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttextFont = Font.createFont(Font.TRUETYPE_FONT, AppletResourceLoader.getFileFromJar(GameConstants.PATH_FONTS + \"FOXLEY8_.ttf\"));\r\n\t\t\ttextFont = textFont.deriveFont(16.0f);\r\n\t\t\ttextFontBold = textFont.deriveFont(Font.BOLD, 16.0f);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"ERROR IN setupFonts(): \" + e.getClass().getName() + \" - \" + e.getMessage());\r\n\t\t}\r\n\t}", "private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }", "public void setFont(Font f) {\n _separator.setFont(f);\n }", "public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}", "public static void setFont(Font font){\n\t\tGComponent.fGlobalFont = font;\n\t}", "private void setFont(Element config) {\r\n\t\tList noeudFils = null;\r\n\t\tElement elementCourant;\r\n\r\n\t\t// Verifier le parametre\r\n\t\t//\r\n\t\tif (config == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Verifier la presence de la cle\r\n\t\t//\r\n\t\tif (config.getChild(\"Police\") == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Recuperer le noeud fils\r\n\t\t//\r\n\t\tnoeudFils = config.getChildren(\"Police\");\r\n\t\tif (noeudFils == null) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\telementCourant = (Element) noeudFils.iterator().next();\r\n\r\n\t\t// Verifier la presence des elements\r\n\t\t//\r\n\t\tif (elementCourant.getChild(\"Famille\") == null || elementCourant.getChild(\"Style\") == null || elementCourant.getChild(\"Taille\") == null)\r\n\t\t\treturn;\r\n\r\n\t\t// Recuperer les valeurs associees\r\n\t\t//\r\n\t\tString Famille = elementCourant.getChild(\"Famille\").getTextTrim();\r\n\t\tString Style = elementCourant.getChild(\"Style\").getTextTrim();\r\n\t\tString Taille = elementCourant.getChild(\"Taille\").getTextTrim();\r\n\r\n\t\t// Creer la nouvelle font\r\n\t\t//\r\n\t\tFont f = new Font(Famille, XML.obtenirStyleFont(Style), (int) Integer.valueOf(Taille).intValue());\r\n\t\tif (f == null)\r\n\t\t\treturn;\r\n\r\n\t\t// Affecter la nouvelle font\r\n\t\t//\r\n\t\tif (zoneAffichage != null)\r\n\t\t\tzoneAffichage.setFont(f);\r\n\t\telse if (list != null)\r\n\t\t\tlist.setFont(f);\r\n\t}", "public static boolean setSelectedDefaultFontName(String name) {\n return nativeSetSelectedDefaultFontName(name);\n }", "public void setTextFont(Font font);", "private void settypeface() {\n }", "public static void setDefault(BitmapFont font) {\r\n\t\tdefaultFont = font;\r\n\t}", "private void loadSystemFont(String font){\n mFont = new Font(font, mFontStyle, (int)mFontSize);\n }", "public void setNodeLabelFont(Font value) {\n nodeLabelfont = value;\n }", "public native void setFont(Font value) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso.font = value.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n }-*/;", "public void setFont(Font font)\n {\n this.font = font;\n }", "public void setFont( Font font ) {\r\n this.font = font;\r\n }", "public static String getFontName() {\n return \"Comic Sans MS\";\n }", "public void fontNameListRegisterHandler( ListSelectionListener listSelectionListener )\r\n\t{\r\n\t\t// register event handler for the Font Names list\r\n\t\tfontNamesList.addListSelectionListener( listSelectionListener );\r\n\t}", "public void setTextFont(Font font)\n {\n setFont(font);\n }", "private void applyFontToMenuItem(MenuItem subMenuItem) {\n\t\tString s = subMenuItem.getTitle().toString();\n\t\t\n\t\t\n\t\tswitch (syth) {\n\t\tcase 1:\n\t\t\tif(FontUtili.defaultFont==2)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ts = (String) ZawGyiToUni(s, false);\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 1), subMenuItem);\n\t\t\t} else {\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 1), subMenuItem);\n\t\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\tcase 2:\n\t\t\tif(FontUtili.defaultFont==1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\ts =(String) ZawGyiToUni(s, true);\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 2), subMenuItem);\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tsetStringTypeFace(s,FontUtili.font(ac, 2), subMenuItem);\n\t\t\t}\n\t\t\tbreak;\n\n\t\tcase 3:\n\t\t\tif(FontUtili.defaultFont ==1)\n\t\t\t{\n\t\t\t\ts = (String) XtremeZawGyi(s, true);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\ts = (String) XtremeUni(s, true);\n\t\t\t}\n\t\t\tsetStringTypeFace(s, FontUtili.font(ac,3), subMenuItem);\n\t\t\tbreak;\n\t\t\t\n\t\t\n\t\t}\n\t}", "public List<String> getListFontFamily() {\n return Collections.unmodifiableList(this.listFontFamily);\n }", "public String getFontName() {\n return getFontName(Locale.getDefault());\n }", "public void setFont(Font f) {\n super.setFont(f);\n columnWidth = 0;\n }", "protected void installDefaults()\n {\n String prefix = getPropertyPrefix();\n Font f = editor.getFont();\n if ((f == null) || (f instanceof UIResource)) {\n editor.setFont(UIManager.getFont(prefix + \".font\"));\n }\n\n Color bg = editor.getBackground();\n if ((bg == null) || (bg instanceof UIResource)) {\n editor.setBackground(UIManager.getColor(prefix + \".background\"));\n }\n\n Color fg = editor.getForeground();\n if ((fg == null) || (fg instanceof UIResource)) {\n editor.setForeground(UIManager.getColor(prefix + \".foreground\"));\n }\n\n Color color = editor.getCaretColor();\n if ((color == null) || (color instanceof UIResource)) {\n editor.setCaretColor(UIManager.getColor(prefix + \".caretForeground\"));\n }\n\n Color s = editor.getSelectionColor();\n if ((s == null) || (s instanceof UIResource)) {\n editor.setSelectionColor(UIManager.getColor(prefix + \".selectionBackground\"));\n }\n\n Color sfg = editor.getSelectedTextColor();\n if ((sfg == null) || (sfg instanceof UIResource)) {\n editor.setSelectedTextColor(UIManager.getColor(prefix + \".selectionForeground\"));\n }\n\n Color dfg = editor.getDisabledTextColor();\n if ((dfg == null) || (dfg instanceof UIResource)) {\n editor.setDisabledTextColor(UIManager.getColor(prefix + \".inactiveForeground\"));\n }\n\n Border b = editor.getBorder();\n if ((b == null) || (b instanceof UIResource)) {\n editor.setBorder(UIManager.getBorder(prefix + \".border\"));\n }\n\n Insets margin = editor.getMargin();\n if (margin == null || margin instanceof UIResource) {\n editor.setMargin(UIManager.getInsets(prefix + \".margin\"));\n }\n\n updateCursor();\n }", "public void setResultsFont()\r\n {\r\n Font UserTextFont = MetalLookAndFeel.getUserTextFont();\r\n if (ResultsTextPane != null)\r\n\t ResultsTextPane.setFont(new Font(\"Monospaced\", Font.PLAIN, UserTextFont.getSize() ));\r\n }", "public static Font[] getSelectableDefaultFonts() {\n Locale locale = Locale.getDefault();\n String language = locale.getLanguage();\n return nativeGetSelectableDefaultFonts(language);\n }", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "public void set_fonts(Graphics2D g2, float scale) {\n if ( XHSIPreferences.get_instance().get_bold_fonts() ) {\n this.font_statusbar = new Font(\"Verdana\", Font.PLAIN, 9);\n this.font_tiny = new Font( \"Verdana\", Font.BOLD, 10);\n this.font_small = new Font( \"Verdana\", Font.BOLD, 12);\n this.font_medium = new Font( \"Verdana\", Font.BOLD, 16);\n this.font_large = new Font( \"Verdana\", Font.PLAIN, 24);\n this.font_zl = new Font( \"Verdana\", Font.PLAIN, Math.round(64.0f * scale));\n this.font_yl = new Font( \"Verdana\", Font.PLAIN, Math.round(32.0f * scale));\n this.font_xxl = new Font( \"Verdana\", Font.BOLD, Math.round(24.0f * scale));\n this.font_xl = new Font( \"Verdana\", Font.BOLD, Math.round(21.0f * scale));\n this.font_l = new Font( \"Verdana\", Font.BOLD, Math.round(18.0f * scale));\n this.font_m = new Font( \"Verdana\", Font.BOLD, Math.round(16.0f * scale));\n this.font_s = new Font( \"Verdana\", Font.BOLD, Math.round(14.0f * scale));\n this.font_xs = new Font( \"Verdana\", Font.BOLD, Math.round(12.0f * scale));\n this.font_xxs = new Font( \"Verdana\", Font.BOLD, Math.round(10.0f * scale));\n this.font_normal = new Font( \"Verdana\", Font.BOLD, Math.round(14.0f * scale));\n } else {\n this.font_statusbar = new Font(\"Verdana\", Font.PLAIN, 9);\n this.font_tiny = new Font( \"Verdana\", Font.PLAIN, 10);\n this.font_small = new Font( \"Verdana\", Font.PLAIN, 12);\n this.font_medium = new Font( \"Verdana\", Font.PLAIN, 16);\n this.font_large = new Font( \"Verdana\", Font.PLAIN, 24);\n this.font_zl = new Font( \"Verdana\", Font.PLAIN, Math.round(64.0f * scale));\n this.font_yl = new Font( \"Verdana\", Font.PLAIN, Math.round(32.0f * scale));\n this.font_xxl = new Font( \"Verdana\", Font.PLAIN, Math.round(24.0f * scale));\n this.font_xl = new Font( \"Verdana\", Font.PLAIN, Math.round(21.0f * scale));\n this.font_l = new Font( \"Verdana\", Font.PLAIN, Math.round(18.0f * scale));\n this.font_m = new Font( \"Verdana\", Font.PLAIN, Math.round(16.0f * scale));\n this.font_s = new Font( \"Verdana\", Font.PLAIN, Math.round(14.0f * scale));\n this.font_xs = new Font( \"Verdana\", Font.PLAIN, Math.round(12.0f * scale));\n this.font_xxs = new Font( \"Verdana\", Font.PLAIN, Math.round(10.0f * scale));\n this.font_normal = new Font( \"Verdana\", Font.PLAIN, Math.round(14.0f * scale));\n }\n\n // calculate font metrics\n // W is probably the largest characher...\n FontMetrics fm;\n\n fm = g2.getFontMetrics(this.font_large);\n this.line_height_large = fm.getAscent();\n this.max_char_advance_large = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_large = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_medium);\n this.line_height_medium = fm.getAscent();\n this.max_char_advance_medium = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_medium = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_small);\n this.line_height_small = fm.getAscent();\n this.max_char_advance_small = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_small = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_tiny);\n this.line_height_tiny = fm.getAscent();\n this.max_char_advance_tiny = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_tiny = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_zl);\n this.line_height_zl = fm.getAscent();\n this.max_char_advance_zl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_zl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_yl);\n this.line_height_yl = fm.getAscent();\n this.max_char_advance_yl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_yl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xxl);\n this.line_height_xxl = fm.getAscent();\n this.max_char_advance_xxl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xxl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xl);\n this.line_height_xl = fm.getAscent();\n this.max_char_advance_xl = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xl = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_l);\n this.line_height_l = fm.getAscent();\n this.max_char_advance_l = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_l = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_m);\n this.line_height_m = fm.getAscent();\n this.max_char_advance_m = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_m = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_s);\n this.line_height_s = fm.getAscent();\n this.max_char_advance_s = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_s = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xs);\n this.line_height_xs = fm.getAscent();\n this.max_char_advance_xs = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xs = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_xxs);\n this.line_height_xxs = fm.getAscent();\n this.max_char_advance_xxs = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_xxs = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n fm = g2.getFontMetrics(this.font_normal);\n this.line_height_normal = fm.getAscent();\n this.max_char_advance_normal = fm.stringWidth(\"WW\") - fm.stringWidth(\"W\");\n this.digit_width_normal = fm.stringWidth(\"88\") - fm.stringWidth(\"8\");\n\n }", "public void init() {\n\n /**\n * FontFile1 = A stream containing a Type 1 font program\n * FontFile2 = A stream containing a TrueType font program\n * FontFile3 = A stream containing a font program other than Type 1 or\n * TrueType. The format of the font program is specified by the Subtype entry\n * in the stream dictionary\n */\n try {\n\n // get an instance of our font factory\n FontFactory fontFactory = FontFactory.getInstance();\n\n if (entries.containsKey(FONT_FILE)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n }\n\n if (entries.containsKey(FONT_FILE_2)) {\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_2);\n if (fontStream != null) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TRUE_TYPE);\n }\n }\n\n if (entries.containsKey(FONT_FILE_3)) {\n\n Stream fontStream = (Stream) library.getObject(entries, FONT_FILE_3);\n String subType = fontStream.getObject(\"Subtype\").toString();\n if (subType != null &&\n (subType.equals(FONT_FILE_3_TYPE_1C) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0) ||\n subType.equals(FONT_FILE_3_CID_FONT_TYPE_0C))\n ) {\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_TYPE_1);\n }\n if (subType != null && subType.equals(FONT_FILE_3_OPEN_TYPE)) {\n// font = new NFontOpenType(fontStreamBytes);\n font = fontFactory.createFontFile(\n fontStream, FontFactory.FONT_OPEN_TYPE);\n }\n }\n }\n // catch everything, we can fall back to font substitution if a failure\n // occurs. \n catch (Throwable e) {\n logger.log(Level.FINE, \"Error Reading Embedded Font \", e);\n }\n\n }", "public void createFont()\n {\n my_font = new Font(\"Helvetica\", Font.BOLD, (int) (getWidth() * FONT_SIZE));\n }", "public void setFont(Font font) {\n\tthis.font = font;\n }", "public FontFinder getFontFinder() {\n return NameFont;\n }", "@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Arial\", Font.PLAIN, 11)); \r\n }" ]
[ "0.80112785", "0.7216503", "0.69172037", "0.6843866", "0.6744954", "0.66061777", "0.64402366", "0.6398671", "0.6271368", "0.61441857", "0.61130977", "0.6061639", "0.6029269", "0.5914393", "0.5872372", "0.5864474", "0.58309984", "0.5816685", "0.57488436", "0.57320637", "0.5721166", "0.5667714", "0.5650043", "0.56316614", "0.56219393", "0.5614419", "0.5612797", "0.56089646", "0.55962867", "0.55906445", "0.5587902", "0.55750436", "0.55735314", "0.5558871", "0.5550244", "0.55450135", "0.55350286", "0.55266833", "0.55195844", "0.5489591", "0.548103", "0.54506767", "0.54255074", "0.54242426", "0.54043597", "0.5402065", "0.5397539", "0.53644174", "0.5355278", "0.5335115", "0.53286374", "0.53017247", "0.5292544", "0.5262545", "0.52610093", "0.52522206", "0.5243992", "0.5236602", "0.5236602", "0.5236602", "0.52288955", "0.52238387", "0.51978797", "0.5195123", "0.5192505", "0.519147", "0.5188044", "0.5187152", "0.5183783", "0.5143988", "0.51412857", "0.51255107", "0.51105094", "0.5096734", "0.5092902", "0.5087138", "0.5065198", "0.50630236", "0.5055997", "0.5046697", "0.5035494", "0.50309074", "0.50272644", "0.5021276", "0.50191945", "0.50156796", "0.50140554", "0.50012577", "0.49958682", "0.49897203", "0.49895534", "0.49893025", "0.4980786", "0.4974799", "0.4963027", "0.49327475", "0.49163923", "0.4913155", "0.4901546", "0.48880997" ]
0.697544
2
Returns the font family name list in this combo box. Note, the returned list is unmodifiable.
public List<String> getListFontFamily() { return Collections.unmodifiableList(this.listFontFamily); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;", "public void addFamilies() {\n GraphicsEnvironment env =\n GraphicsEnvironment.getLocalGraphicsEnvironment();\n family_list = env.getAvailableFontFamilyNames(); /*FAULT:: family_list = new String[10]; */\n for (int i = 0; i < family_list.length; i++) {\n families.addItem(family_list[i]);\n }\n\n\n\n }", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "public final String getFontFamily() {\n return fontFamily;\n }", "public FontFamilySelector() {\n defaultConfig(Util.getAllFontNames());\n }", "String[] getFamilyNames() {\n\t\treturn this.familyMap.keySet().toArray(new String[this.familyMap.size()]);\n\t}", "public FontFamilySelector(String namespace) {\n Util.checkString(namespace, \"namespace\");\n\n Set<String> defaultFontFamilyNames = Util.getAllFontNames();\n\n Map<String, String> map = Util.getPropertyMap(namespace, \"fontFamily\");\n if (map == null) {\n // The property is missing, then use default values\n defaultConfig(defaultFontFamilyNames);\n } else {\n // the empty font name\n addItem(\"\");\n\n // the default font name\n // if present in the configuration file, then use it\n // otherwise, use the default font name\n if (map.containsKey(\"default\")) {\n defaultFontFamily = map.get(\"default\");\n\n // The default font name is not available in the system\n if (!defaultFontFamilyNames.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"The default font name \" + defaultFontFamily\n + \" is not supported.\");\n }\n } else {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n addItem(defaultFontFamily);\n listFontFamily.add(defaultFontFamily);\n }\n\n // Add all the configed fonts as items\n Set<Entry<String, String>> entries = map.entrySet();\n for (Entry<String, String> entry : entries) {\n // The default font is skipped\n if (\"default\".equals(entry.getKey())) {\n continue;\n }\n\n // Other fonts are added as items of the combo box\n String fontName = entry.getValue();\n\n // If the font name is not available, then throw StylePanelConfigurationException\n if (!defaultFontFamilyNames.contains(fontName)) {\n throw new StylePanelConfigurationException(\"The font name \" + fontName + \" is not supported.\");\n }\n\n if (!listFontFamily.contains(fontName)) {\n addItem(fontName);\n listFontFamily.add(fontName);\n } else {\n if (fontName.equals(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"There are duplicate font name, it is \" + fontName);\n }\n }\n }\n\n if (!listFontFamily.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\n \"The default font name is missing in the configuration file.\");\n }\n\n this.setSelectedItem(defaultFontFamily);\n }\n }", "public Font[] getFonts() {\n return fonts;\n }", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n List<Typeface> entryList = familyMap.get(typeface.getFamilyName());\n if (entryList == null) {\n entryList = new ArrayList<>();\n familyMap.put(typeface.getFamilyName(), entryList);\n }\n\n entryList.add(typeface);\n }\n }\n\n List<TypeFamily> familyList = new ArrayList<>(familyMap.size());\n\n for (Map.Entry<String, List<Typeface>> entry : familyMap.entrySet()) {\n String familyName = entry.getKey();\n List<Typeface> typefaces = entry.getValue();\n\n familyList.add(new TypeFamily(familyName, typefaces));\n }\n\n return Collections.unmodifiableList(familyList);\n }", "private JPanel setup_font_family_combo_box() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout( new FlowLayout( FlowLayout.LEFT, 5, 5));\r\n\r\n\t\t_comboBox = CommonTool.get_font_family_combo_box();\r\n\r\n\t\tif ( !_family_name.equals( \"\"))\r\n\t\t\t_comboBox.setSelectedItem( _family_name);\r\n\r\n\t\tlink_to_cancel( _comboBox);\r\n\r\n\t\tpanel.add( _comboBox);\r\n\t\treturn panel;\r\n\t}", "public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}", "public Font GetFont(String name) { return FontList.get(name); }", "public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }", "public String getFontName();", "public String getFontName();", "public String getFontName();", "public Set<String> getFonts() {\n return generators.keySet();\n }", "public static String getFamily(String family){\n\t\tfor(String f : fontFamilies)\n\t\t\tif(f.equalsIgnoreCase(family))\n\t\t\t\treturn f;\n\t\treturn \"Dialog\";\n\t}", "public String getFontName()\n {\n return font.getFontName();\n }", "public String getFontName() {\n\t\treturn this.fontName;\n\t}", "public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;", "public SelectFontFamilyDlg(Frame arg0, boolean arg1, String family_name) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t\t_family_name = family_name;\r\n\t}", "COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}", "public static Font[] getSelectableDefaultFonts() {\n Locale locale = Locale.getDefault();\n String language = locale.getLanguage();\n return nativeGetSelectableDefaultFonts(language);\n }", "public String getFontName() {\n return getFontName(Locale.getDefault());\n }", "public void setListFontFamily(List<String> listFontFamily) {\n Util.checkList(listFontFamily, \"listFontFamily\");\n if (listFontFamily.isEmpty()) {\n throw new IllegalArgumentException(\"The listFontFamily is empty list.\");\n }\n\n this.removeAllItems();\n\n addItem(\"\");\n for (String font : listFontFamily) {\n addItem(font);\n }\n\n this.listFontFamily = listFontFamily;\n }", "public String getFontNameText()\r\n\t{\r\n\t\treturn fontNameTextField.getText(); // return the text in the Font Name text field\r\n\t}", "public static @NonNull List<Typeface> getAvailableTypefaces() {\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n return Collections.unmodifiableList(new ArrayList<>(typefaces));\n }\n }", "public static FontData[] getAllFonts() {\n if (fonts == null) {\n fonts = new ArrayList();\n\n String os = System.getProperty(\"os.name\");\n File[] locs = new File[0];\n\n if (os.startsWith(\"Windows\")) {\n locs = win32;\n }\n if (os.startsWith(\"Linux\")) {\n locs = linux;\n }\n if (os.startsWith(\"Mac OS\")) {\n locs = macos;\n }\n\n for (int i = 0; i < locs.length; i++) {\n File loc = locs[i];\n\n processFontDirectory(loc, fonts);\n }\n\n if (os.startsWith(\"Linux\")) {\n locateLinuxFonts(new File(\"/etc/fonts/fonts.conf\"));\n }\n }\n\n return (FontData[]) fonts.toArray(new FontData[0]);\n }", "public FontFinder getFontFinder() {\n return NameFont;\n }", "public SelectFontFamilyDlg(Frame arg0, boolean arg1) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t}", "public String getFamily() {\n return this.family;\n }", "public static String getFontName() {\n return \"Comic Sans MS\";\n }", "public String getFamilyname() {\n\t\treturn this.family_name;\n\t}", "public String getFamily()\n {\n return _family;\n }", "protected Choice createFontChoice() {\n CommandChoice choice = new CommandChoice();\n String fonts[] = Toolkit.getDefaultToolkit().getFontList();\n for (int i = 0; i < fonts.length; i++)\n choice.addItem(new ChangeAttributeCommand(fonts[i], \"FontName\", fonts[i], fView));\n return choice;\n }", "public String fontName() {\n\t\treturn fontName;\n\t}", "public String getFont() {\n return font;\n }", "public String getFontFace() {\n\t\treturn _fontFace;\n\t}", "public String getFontsCode() {\r\n\t\treturn fontsCode;\r\n\t}", "public String getName() {\n return fontName;\n }", "public static Set getValidFamilies()\n {\n if ( validFamilies != null )\n {\n return validFamilies;\n }\n\n Set valid = new HashSet();\n valid.add( FAMILY_DOS );\n valid.add( FAMILY_MAC );\n valid.add( FAMILY_NETWARE );\n valid.add( FAMILY_NT );\n valid.add( FAMILY_OPENVMS );\n valid.add( FAMILY_OS2 );\n valid.add( FAMILY_OS400 );\n valid.add( FAMILY_TANDEM );\n valid.add( FAMILY_UNIX );\n valid.add( FAMILY_WIN9X );\n valid.add( FAMILY_WINDOWS );\n valid.add( FAMILY_ZOS );\n\n return Collections.unmodifiableSet( valid );\n }", "public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }", "public String family() {\n return this.family;\n }", "public String getFamilyName() {\n return familyName;\n }", "public String getFamilyName() {\n return familyName;\n }", "public java.lang.String getFamilyName() {\n return FamilyName;\n }", "public String getFamilyName()\r\n {\r\n return familyName;\r\n }", "public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }", "void setFontFamily(ReaderFontSelection f);", "public FamilyInfo[] getFamilyInfo() {\n return familyInfo;\n }", "public String getFamilyName() {\n\t\treturn familyName;\n\t}", "public Font getFont() {\n\t\treturn f;\n\t}", "String getFamily();", "String getFamily();", "public SemanticType[] family() {\n return values();\n }", "public String getMatchFontName();", "public void setFamily( String f )\n {\n family = f.toLowerCase( Locale.ENGLISH );\n }", "public Font getFont(\n )\n {return font;}", "public Set collectFontInfo()\n\t{\n\t Style root = getStyle(\"base\");\n\t\tHashSet set = new HashSet();\n\t collectFontInfo(root,set);\n\t\treturn set;\n\t}", "public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }", "public void familiesActionPerformed(java.awt.event.ActionEvent evt) {\n myFont.font = (String) families.getSelectedItem(); /*FAULT:: myFont.font = \"xyz\"; */\n }", "public String[] getAllThemeNames() {\n\tjava.util.List names = resources.getStringList(\"themelist\");\n\treturn (String[]) names.toArray(new String[names.size()]);\n }", "void setFontNames(String[] associationArray)\n \t{\n \t\tint maxAssociation = 0;\n \t\tfor(int i=0; i<associationArray.length; i++)\n \t\t{\n if (associationArray[i] == null) continue;\n \t\t\tint fontNumber = TextUtils.atoi(associationArray[i]);\n \t\t\tif (fontNumber > maxAssociation) maxAssociation = fontNumber;\n \t\t}\n \t\tif (maxAssociation <= 0) return;\n \n \t\tfontNames = new String[maxAssociation];\n \t\tfor(int i=0; i<maxAssociation; i++) fontNames[i] = null;\n \t\tfor(int i=0; i<associationArray.length; i++)\n \t\t{\n if (associationArray[i] == null) continue;\n \t\t\tint fontNumber = TextUtils.atoi(associationArray[i]);\n \t\t\tif (fontNumber <= 0) continue;\n \t\t\tint slashPos = associationArray[i].indexOf('/');\n \t\t\tif (slashPos < 0) continue;\n \t\t\tfontNames[fontNumber-1] = associationArray[i].substring(slashPos+1);\n \t\t}\n \t}", "public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }", "public String displayFamilyMembers() {\n int i = 1;\n StringBuilder ret = new StringBuilder();\n for (FamilyMember fam : this.famMemberList) {\n ret.append(i + \".\" + \" \" + fam.getSkinColour() + \" -> \" + fam.getActionValue());\n ret.append(\" | \");\n i++;\n }\n return ret.toString();\n }", "public void fontNameListRegisterHandler( ListSelectionListener listSelectionListener )\r\n\t{\r\n\t\t// register event handler for the Font Names list\r\n\t\tfontNamesList.addListSelectionListener( listSelectionListener );\r\n\t}", "public static Font getFont() {\n return getFont(12);\n }", "private static Font[] loadFonts() throws Exception {\r\n Font font = Font.createFont(Font.TRUETYPE_FONT, Class.class.getClass()\r\n .getResource(\"/language/fonts/code2000.ttf\").openStream());\r\n // since 1.6 we could register the font and use it by name\r\n // but using the font directly makes us 1.5 compatible\r\n // GraphicsEnvironment.getLocalGraphicsEnvironment().registerFont(font);\r\n return new Font[]{font};\r\n }", "public String getFamiliesSize() {\n return (String) families.getItemAt(0); /*Fault:: return \"xx\"; */\n }", "public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }", "public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}", "public static Font getPriorityFont(String[] familyFontNamnes, int style, int size){\n\t\tFont font = null;\n\t\tString[] names = (familyFontNamnes == null || familyFontNamnes.length == 0)\n\t\t\t\t? pfnames : familyFontNamnes;\n\t\tfor(String name : names){\n\t\t\tfont = getFont(name, style, size);\n\t\t\tif(font != null) return font;\n\t\t}\n\t\treturn getFont(\"Dialog\", style, size);\n\t}", "public List<FamilyMember> listAllFamilyMembers() {\n if (isFamilyMemberMapNullOrEmpty(familyMemberMap)) {\n return new ArrayList<>();\n }\n return new ArrayList<>(familyMemberMap.values());\n }", "public String getFontName(Locale l) {\n if (l == null) {\n throw new NullPointerException(\"null locale doesn't mean default\");\n }\n\treturn getFont2D().getFontName(l);\n }", "public Font getFont() {\r\n return font;\r\n }", "public Font getFont() {\r\n return font;\r\n }", "public String[] getCountryNames() {\r\n return countryNames;\r\n }", "public Font getFont() {\n return this.font;\n }", "public static @Nullable TypeFamily getTypeFamily(@NonNull String familyName) {\n List<Typeface> entryList = new ArrayList<>();\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface : typefaces) {\n if (typeface.getFamilyName().equalsIgnoreCase(familyName)) {\n entryList.add(typeface);\n }\n }\n }\n\n TypeFamily typeFamily = null;\n\n if (entryList.size() > 0) {\n typeFamily = new TypeFamily(familyName, entryList);\n }\n\n return typeFamily;\n }", "private java.awt.Font getFont(Feature feature, Font[] fonts) {\n if (fontFamilies == null) {\n GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\n fontFamilies = new HashSet();\n \n List f = Arrays.asList(ge.getAvailableFontFamilyNames());\n fontFamilies.addAll(f);\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"there are \" + fontFamilies.size() + \" fonts available\");\n }\n }\n \n java.awt.Font javaFont = null;\n \n int styleCode = 0;\n int size = 6;\n String requestedFont = \"\";\n \n for (int k = 0; k < fonts.length; k++) {\n requestedFont = fonts[k].getFontFamily().getValue(feature).toString();\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"trying to load \" + requestedFont);\n }\n \n if (loadedFonts.containsKey(requestedFont)) {\n javaFont = (java.awt.Font) loadedFonts.get(requestedFont);\n \n String reqStyle = (String) fonts[k].getFontStyle().getValue(feature);\n \n if (fontStyleLookup.containsKey(reqStyle)) {\n styleCode = ((Integer) fontStyleLookup.get(reqStyle)).intValue();\n } else {\n styleCode = java.awt.Font.PLAIN;\n }\n \n String reqWeight = (String) fonts[k].getFontWeight().getValue(feature);\n \n if (reqWeight.equalsIgnoreCase(\"Bold\")) {\n styleCode = styleCode | java.awt.Font.BOLD;\n }\n \n size = ((Number) fonts[k].getFontSize().getValue(feature)).intValue();\n \n return javaFont.deriveFont(styleCode, size);\n }\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"not already loaded\");\n }\n \n if (fontFamilies.contains(requestedFont)) {\n String reqStyle = (String) fonts[k].getFontStyle().getValue(feature);\n \n if (fontStyleLookup.containsKey(reqStyle)) {\n styleCode = ((Integer) fontStyleLookup.get(reqStyle)).intValue();\n } else {\n styleCode = java.awt.Font.PLAIN;\n }\n \n String reqWeight = (String) fonts[k].getFontWeight().getValue(feature);\n \n if (reqWeight.equalsIgnoreCase(\"Bold\")) {\n styleCode = styleCode | java.awt.Font.BOLD;\n }\n \n size = ((Number) fonts[k].getFontSize().getValue(feature)).intValue();\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"requesting \" + requestedFont + \" \" + styleCode + \" \" + size);\n }\n \n javaFont = new java.awt.Font(requestedFont, styleCode, size);\n loadedFonts.put(requestedFont, javaFont);\n \n return javaFont;\n }\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"not a system font\");\n }\n \n // may be its a file or url\n InputStream is = null;\n \n if (requestedFont.startsWith(\"http\") || requestedFont.startsWith(\"file:\")) {\n try {\n URL url = new URL(requestedFont);\n is = url.openStream();\n } catch (MalformedURLException mue) {\n // this may be ok - but we should mention it\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"Bad url in java2drenderer\" + requestedFont + \"\\n\" + mue);\n }\n } catch (IOException ioe) {\n // we'll ignore this for the moment\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"IO error in java2drenderer \" + requestedFont + \"\\n\" + ioe);\n }\n }\n } else {\n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"not a URL\");\n }\n \n File file = new File(requestedFont);\n \n //if(file.canRead()){\n try {\n is = new FileInputStream(file);\n } catch (FileNotFoundException fne) {\n // this may be ok - but we should mention it\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"Bad file name in java2drenderer\" + requestedFont + \"\\n\" + fne);\n }\n }\n }\n \n if (LOGGER.isLoggable(Level.FINEST)) {\n LOGGER.finest(\"about to load\");\n }\n \n if (is == null) {\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"null input stream\");\n }\n \n continue;\n }\n \n try {\n javaFont = java.awt.Font.createFont(java.awt.Font.TRUETYPE_FONT, is);\n } catch (FontFormatException ffe) {\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"Font format error in java2drender \" + requestedFont + \"\\n\" + ffe);\n }\n \n continue;\n } catch (IOException ioe) {\n // we'll ignore this for the moment\n if (LOGGER.isLoggable(Level.INFO)) {\n LOGGER.info(\"IO error in java2drenderer \" + requestedFont + \"\\n\" + ioe);\n }\n \n continue;\n }\n \n loadedFonts.put(requestedFont, javaFont);\n \n return javaFont;\n }\n \n return null;\n }", "public Font getFont() {\n\treturn font;\n }", "public Font getFont() {\n\treturn font;\n }", "public void clearSelectedFontName()\r\n\t{\r\n\t\t// deselect the currently selected item in the Font Names list if there is one\r\n\t\tfontNamesList.clearSelection();\r\n\t}", "public Font getFont() {\n return font;\n }", "public static Enumeration getNames() \n {\n return frequency.keys();\n }", "public Set<Integer> getFontSizes(String name) {\n return getBitmapFonts(name).keySet();\n }", "private void updateForename() {\n String mySurname = this.surnameCombo.getSelectedItem().toString();\n //Clear the forename combo\n this.forenameCombo.removeAllItems();\n //Get the list of people\n List<String> forenames = pers.getForenamesforSurname(mySurname);\n for (String str : forenames) {\n this.forenameCombo.addItem(str);\n }\n this.updateText();\n }", "public final int getFamily() {\n return family;\n }", "public Vertex getFamily() {\n\t\treturn family;\n\t}", "public String getFamilyName() throws PDFNetException {\n/* 550 */ return GetFamilyName(this.a);\n/* */ }", "public List<EnumerationValue> getGenders(final SessionContext ctx)\r\n\t{\r\n\t\tList<EnumerationValue> coll = (List<EnumerationValue>)getProperty( ctx, GENDERS);\r\n\t\treturn coll != null ? coll : Collections.EMPTY_LIST;\r\n\t}", "public RMFont getFont()\n {\n return getStyle().getFont();\n }", "public ArrayList<Familymember> getMyFamilymembers() {\n\t\treturn myFamilymembers;\n\t}", "public LinkedList<Integer> getFamilyColorList() {\n\t\treturn familyColorList;\n\t}", "@Deprecated\r\n public String getFont()\r\n {\r\n return this.font;\r\n }", "public List<String> getOptionsNames();", "public FontProps getFontProps() {\n\t\treturn mFont;\n\t}", "public String toString() {\n String name = null;\n if (font != null)\n name = font.getName();\n return super.getPObjectReference() + \" FONTDESCRIPTOR= \" + entries.toString() + \" - \" + name;\n }" ]
[ "0.7298879", "0.70383584", "0.69057864", "0.686085", "0.68419397", "0.6689487", "0.6662402", "0.6601729", "0.65992516", "0.65370226", "0.6494454", "0.63639075", "0.6223181", "0.6178577", "0.6172121", "0.6172121", "0.6172121", "0.61560667", "0.61056066", "0.6092946", "0.6054825", "0.6051297", "0.5990407", "0.59471714", "0.5892815", "0.5866172", "0.5835004", "0.5788996", "0.5768418", "0.5746238", "0.5714862", "0.57140493", "0.56847745", "0.5677647", "0.56742704", "0.5652961", "0.55808884", "0.5560891", "0.5536054", "0.5523735", "0.55165166", "0.5506356", "0.5494966", "0.54756737", "0.5473402", "0.54472554", "0.5428912", "0.5426052", "0.53923315", "0.53643113", "0.534829", "0.5343051", "0.533696", "0.52681917", "0.525475", "0.525475", "0.5243829", "0.5236034", "0.52270275", "0.52134246", "0.5190746", "0.51574296", "0.51536393", "0.51176727", "0.5114201", "0.5100315", "0.509577", "0.5094053", "0.50834846", "0.50734353", "0.50680774", "0.50656843", "0.5045852", "0.5041272", "0.5035433", "0.503496", "0.49991173", "0.49991173", "0.49862593", "0.4979708", "0.4963051", "0.49518108", "0.49513754", "0.49513754", "0.4949855", "0.49421504", "0.49412122", "0.49322757", "0.49321702", "0.4931305", "0.49201086", "0.4915101", "0.49109703", "0.49049652", "0.4902401", "0.48861572", "0.48827645", "0.48823768", "0.48783126", "0.4866428" ]
0.8089992
0
Returns the default font family name.
public String getDefaultFontFamily() { return this.defaultFontFamily; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Font getDefaultFont() {\r\n return defaultFont;\r\n }", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "public String getFontName() {\n return getFontName(Locale.getDefault());\n }", "public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }", "public final String getFontFamily() {\n return fontFamily;\n }", "public String getFontName()\n {\n return font.getFontName();\n }", "public Font getFont() {\n return GraphicsEnvironment.getLocalGraphicsEnvironment()\n .getAllFonts()[0];\n }", "public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }", "public String fontName() {\n\t\treturn fontName;\n\t}", "public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;", "public static BitmapFont getDefault() {\r\n\t\treturn defaultFont;\r\n\t}", "public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }", "public void setDefaultFontFamily(String defaultFontFamily) {\n Util.checkString(defaultFontFamily, \"defaultFontFamily\");\n\n this.defaultFontFamily = defaultFontFamily;\n }", "public String getFontName() {\n\t\treturn this.fontName;\n\t}", "public Font getFont() {\r\n if (font==null)\r\n return getDesktop().getDefaultFont();\r\n else\r\n return font;\r\n }", "public String getFontName();", "public String getFontName();", "public String getFontName();", "public String getName() {\n return fontName;\n }", "public FontFamilySelector() {\n defaultConfig(Util.getAllFontNames());\n }", "public static String getFontName() {\n return \"Comic Sans MS\";\n }", "COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}", "public String getFontName(Locale l) {\n if (l == null) {\n throw new NullPointerException(\"null locale doesn't mean default\");\n }\n\treturn getFont2D().getFontName(l);\n }", "public static Font getFont() {\n return getFont(12);\n }", "public String getFont()\n {\n return (String) getStateHelper().eval(PropertyKeys.font, null);\n }", "public String getSelectedFontName()\r\n\t{\r\n\t\treturn fontNamesList.getSelectedValue(); // return the currently selected font name\r\n\t}", "public String getFontNameText()\r\n\t{\r\n\t\treturn fontNameTextField.getText(); // return the text in the Font Name text field\r\n\t}", "public Font getStandardFont(DiagramContext context) {\n\t\treturn context.getResources().getSystemFont();\n\t}", "public static String getFamily(String family){\n\t\tfor(String f : fontFamilies)\n\t\t\tif(f.equalsIgnoreCase(family))\n\t\t\t\treturn f;\n\t\treturn \"Dialog\";\n\t}", "public FontFinder getFontFinder() {\n return NameFont;\n }", "@Override\n public String getFont() {\n return graphicsEnvironmentImpl.getFont(canvas);\n }", "public String getFont() {\n return font;\n }", "public Font getFont(\n )\n {return font;}", "public Font GetFont(String name) { return FontList.get(name); }", "public String getFontFace() {\n\t\treturn _fontFace;\n\t}", "public static Font getFont(String familyName, int style, int size){\n\t\tFont font = new Font(familyName, style, size);\n\t\tif(familyName.equalsIgnoreCase(font.getFamily()))\n\t\t\treturn font;\n\t\treturn null;\n\t}", "public Font getLabelFont();", "public String getDefaultThemeName() {\n\treturn resources.getString(\"defaultTheme\", null);\n }", "public Font createFont() {\n\t\treturn null;\n\t}", "public String getMatchFontName();", "public Font getFont()\r\n\t{\r\n\t\treturn _g2.getFont();\r\n\t}", "public String getMyFont() {\n return myFont.font; /*Fault:: return \"xx\"; */\n }", "public String getEmbeddedFontName() throws PDFNetException {\n/* 795 */ return GetEmbeddedFontName(this.a);\n/* */ }", "public Font getFont() {\n\t\treturn f;\n\t}", "public static Font getFont(String nm) {\n\treturn getFont(nm, null);\n }", "public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}", "public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;", "private String getFallbackFontName(PDFontDescriptor fontDescriptor) {\n/* */ String fontName;\n/* 235 */ if (fontDescriptor != null) {\n/* */ \n/* */ \n/* 238 */ boolean isBold = false;\n/* 239 */ String name = fontDescriptor.getFontName();\n/* 240 */ if (name != null) {\n/* */ \n/* 242 */ String lower = fontDescriptor.getFontName().toLowerCase();\n/* */ \n/* */ \n/* 245 */ isBold = (lower.contains(\"bold\") || lower.contains(\"black\") || lower.contains(\"heavy\"));\n/* */ } \n/* */ \n/* */ \n/* 249 */ if (fontDescriptor.isFixedPitch()) {\n/* */ \n/* 251 */ fontName = \"Courier\";\n/* 252 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 254 */ fontName = fontName + \"-BoldOblique\";\n/* */ }\n/* 256 */ else if (isBold)\n/* */ {\n/* 258 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 260 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 262 */ fontName = fontName + \"-Oblique\";\n/* */ }\n/* */ \n/* 265 */ } else if (fontDescriptor.isSerif()) {\n/* */ \n/* 267 */ fontName = \"Times\";\n/* 268 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 270 */ fontName = fontName + \"-BoldItalic\";\n/* */ }\n/* 272 */ else if (isBold)\n/* */ {\n/* 274 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 276 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 278 */ fontName = fontName + \"-Italic\";\n/* */ }\n/* */ else\n/* */ {\n/* 282 */ fontName = fontName + \"-Roman\";\n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 287 */ fontName = \"Helvetica\";\n/* 288 */ if (isBold && fontDescriptor.isItalic())\n/* */ {\n/* 290 */ fontName = fontName + \"-BoldOblique\";\n/* */ }\n/* 292 */ else if (isBold)\n/* */ {\n/* 294 */ fontName = fontName + \"-Bold\";\n/* */ }\n/* 296 */ else if (fontDescriptor.isItalic())\n/* */ {\n/* 298 */ fontName = fontName + \"-Oblique\";\n/* */ }\n/* */ \n/* */ }\n/* */ \n/* */ } else {\n/* */ \n/* 305 */ fontName = \"Times-Roman\";\n/* */ } \n/* 307 */ return fontName;\n/* */ }", "public RMFont getFont()\n {\n return getStyle().getFont();\n }", "private Typeface getTypeface(TypefaceName tfn){\n\n switch (tfn) {\n case FURMANITE:\n return moodPromptFont;\n case DATACONTROL:\n return conversationFont;\n default:\n //TODO: pick a Default\n return conversationFont;\n }\n\n }", "public String getFont(String id)\n\t{\n\t\tString font = fontElementMap.get(id);\n\t\tif (font == null)\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn font;\n\t\t}\n\t}", "public void setFontName(String name)\n {\n font.setFontName(name);\n }", "Font createFont();", "private Typeface getFont() {\n Typeface fontText = Typeface.createFromAsset(SnapziApplication.getContext().getAssets(), \"fonts/GothamHTF-Book.ttf\");\n return fontText;\n }", "public String getFamilyName() throws PDFNetException {\n/* 550 */ return GetFamilyName(this.a);\n/* */ }", "public static void setDefault(BitmapFont font) {\r\n\t\tdefaultFont = font;\r\n\t}", "public FontType getFontType() {\n\t\treturn font;\n\t}", "public String getFamilyname() {\n\t\treturn this.family_name;\n\t}", "public String getDefaultStyleString() {\n/* 552 */ return getCOSObject().getString(COSName.DS);\n/* */ }", "public static Font[] getSelectableDefaultFonts() {\n Locale locale = Locale.getDefault();\n String language = locale.getLanguage();\n return nativeGetSelectableDefaultFonts(language);\n }", "public String getDefaultAppearance() {\n/* 530 */ return getCOSObject().getString(COSName.DA);\n/* */ }", "abstract Font getFont();", "public String getDefaultAppearanceString()\r\n {\r\n return ((COSString)option.getObject( 1 ) ).getString();\r\n }", "void setFontFamily(ReaderFontSelection f);", "private void defaultConfig(Set<String> defaultFontFamilyNames) {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n\n // the empty font name\n addItem(\"\");\n\n // all the system font names to combo box\n for (String defaultFontFamilyName : defaultFontFamilyNames) {\n this.listFontFamily.add(defaultFontFamilyName);\n addItem(defaultFontFamilyName);\n }\n\n this.setSelectedItem(defaultFontFamily);\n }", "public static Font getFont(String name) {\r\n\t\treturn (Font) getInstance().addResource(name);\r\n\t}", "public static String getDefaultPlatformName() {\n\t\tPLATFORM_NAME = \"defaultGC\";\n\t\treturn PLATFORM_NAME;\n\t}", "private Typeface getTypeface(String fontFamilyName) {\n\t\tfontFamilyName = fontFamilyName.replace(' ', '_');\n\t\ttry {\n\t\t\treturn Typeface.createFromAsset(mContext.getAssets(),\n\t\t\t\t\tASSETS_FONTS_ROOT_DIRECTORY + \"/\" +\n\t\t\t\t\t\t\tfontFamilyName.toLowerCase() + \".ttf\");\n\t\t}\n\t\tcatch (final Exception e) {\n\t\t\treturn null;\n\t\t}\n\n\t}", "@Override\n\tpublic String getFamilyName() {\n\t\treturn user.getUserInfo().getFamilyName();\n\t}", "private Font getScreenFont() {\n Font scoreFont = null;\n try {\n scoreFont = Font.createFont(Font.TRUETYPE_FONT,\n getClass().getResource(\"\\\\assets\\\\font\\\\game_over.ttf\").openStream());\n } catch (FontFormatException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return scoreFont;\n }", "public String getSoundFont() {\n\t\treturn soundFont;\n\t}", "public String getFamilyName() {\n\t\treturn familyName;\n\t}", "public Font getFontAt(short arg0) {\n\t\treturn null;\n\t}", "public static Font getFont(int size) {\n if (size <= 0) {\n return getFont();\n }\n return new Font(\"Comic Sans MS\", Font.PLAIN, size);\n }", "public org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont getFont()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n return null;\n }\n return target;\n }\n }", "public Font getFont(String key) {\n\t\tFont defaultValue = (Font) getDefault(key);\n\t\tString sp = internal.getProperty(key);\n\t\tif (sp == null) {\n\t\t\treturn defaultValue;\n\t\t}\n\t\ttry {\n\t\t\tint size, type;\n\t\t\tString name;\n\t\t\tString token;\n\t\t\tStringTokenizer st = new StringTokenizer(sp, \" \", false);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\t// the value is not correctly formated => remove it\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\tname = st.nextToken();\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\tsize = Integer.parseInt(token);\n\t\t\tif (!st.hasMoreTokens()) {\n\t\t\t\tinternal.remove(key);\n\t\t\t\treturn defaultValue;\n\t\t\t}\n\t\t\ttoken = st.nextToken();\n\t\t\ttype = Integer.parseInt(token);\n\t\t\treturn new Font(name, type, size);\n\t\t} catch (NumberFormatException e) {\n\t\t\tinternal.remove(key);\n\t\t\treturn defaultValue;\n\t\t}\n\n\t}", "public Font getFont() {\n\treturn font;\n }", "public Font getFont() {\n\treturn font;\n }", "public String getFamilyName() {\n return familyName;\n }", "public String getFamilyName() {\n return familyName;\n }", "public String getFamily() {\n return this.family;\n }", "FONT createFONT();", "public FontFamilySelector(String namespace) {\n Util.checkString(namespace, \"namespace\");\n\n Set<String> defaultFontFamilyNames = Util.getAllFontNames();\n\n Map<String, String> map = Util.getPropertyMap(namespace, \"fontFamily\");\n if (map == null) {\n // The property is missing, then use default values\n defaultConfig(defaultFontFamilyNames);\n } else {\n // the empty font name\n addItem(\"\");\n\n // the default font name\n // if present in the configuration file, then use it\n // otherwise, use the default font name\n if (map.containsKey(\"default\")) {\n defaultFontFamily = map.get(\"default\");\n\n // The default font name is not available in the system\n if (!defaultFontFamilyNames.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"The default font name \" + defaultFontFamily\n + \" is not supported.\");\n }\n } else {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n addItem(defaultFontFamily);\n listFontFamily.add(defaultFontFamily);\n }\n\n // Add all the configed fonts as items\n Set<Entry<String, String>> entries = map.entrySet();\n for (Entry<String, String> entry : entries) {\n // The default font is skipped\n if (\"default\".equals(entry.getKey())) {\n continue;\n }\n\n // Other fonts are added as items of the combo box\n String fontName = entry.getValue();\n\n // If the font name is not available, then throw StylePanelConfigurationException\n if (!defaultFontFamilyNames.contains(fontName)) {\n throw new StylePanelConfigurationException(\"The font name \" + fontName + \" is not supported.\");\n }\n\n if (!listFontFamily.contains(fontName)) {\n addItem(fontName);\n listFontFamily.add(fontName);\n } else {\n if (fontName.equals(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"There are duplicate font name, it is \" + fontName);\n }\n }\n }\n\n if (!listFontFamily.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\n \"The default font name is missing in the configuration file.\");\n }\n\n this.setSelectedItem(defaultFontFamily);\n }\n }", "public abstract Font getFont();", "public static boolean setSelectedDefaultFontName(String name) {\n return nativeSetSelectedDefaultFontName(name);\n }", "public String getFamily()\n {\n return _family;\n }", "private String getFontFile(){\n\t\tif (fontFile == null){\n\t\t\tfontFile = escapeForVideoFilter(ResourcesManager.getResourcesManager().getOpenSansResource().location);\n\t\t}\n\t\treturn fontFile;\n\t}", "private static native Font createFont(String name, GFontPeer peer, int gdkfont);", "public Font getFont() {\r\n return font;\r\n }", "public Font getFont() {\r\n return font;\r\n }", "public String family() {\n return this.family;\n }", "public short getNumberOfFonts() {\n\t\treturn 0;\n\t}", "public Font getFont() {\n return font;\n }", "float getFontSize()\r\n\t{\r\n\t\tif (!appearanceTokens.isEmpty())\r\n\t\t{\r\n\t\t\t// daString looks like \"BMC /Helv 3.4 Tf EMC\"\r\n\t\t\t// use the fontsize of the default existing apperance stream\r\n\t\t\tint fontIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\t\tif (fontIndex != -1)\r\n\t\t\t{\r\n\t\t\t\treturn ((COSNumber) appearanceTokens.get(fontIndex - 1)).floatValue();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn 0f;\r\n\t}", "public static Font getFont(String nm, Font font) {\n\tString str = null;\n\ttry {\n\t str =System.getProperty(nm);\n\t} catch(SecurityException e) {\n\t}\n\tif (str == null) {\n\t return font;\n\t}\n\treturn decode ( str );\n }", "protected final void baseTestDefaultFont(String defaultName, short defaultSize, short defaultColor) throws IOException {\n Workbook workbook = _testDataProvider.createWorkbook();\n Font fontFind=workbook.findFont(false, defaultColor, defaultSize, defaultName, false, false, Font.SS_NONE, Font.U_NONE);\n assertNotNull(fontFind);\n\n //get default font, then change 2 values and check against different values (height changes)\n Font font=workbook.createFont();\n font.setBold(true);\n assertTrue(font.getBold());\n font.setUnderline(Font.U_DOUBLE);\n assertEquals(Font.U_DOUBLE, font.getUnderline());\n font.setFontHeightInPoints((short)15);\n assertEquals(15*20, font.getFontHeight());\n assertEquals(15, font.getFontHeightInPoints());\n fontFind=workbook.findFont(true, defaultColor, (short)(15*20), defaultName, false, false, Font.SS_NONE, Font.U_DOUBLE);\n assertNotNull(fontFind);\n workbook.close();\n }", "public IsFont getFont() {\n\t\treturn getOriginalFont();\n\t}", "public String getAtdfFamily() {\r\n String atdfFamily = pic_.getATDFFamily();\r\n\r\n if(null == atdfFamily) {\r\n atdfFamily = \"\";\r\n }\r\n\r\n return atdfFamily;\r\n }", "public Font font() {\n return font;\n }", "public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}" ]
[ "0.7716986", "0.77161926", "0.7559897", "0.75258887", "0.73816854", "0.7323059", "0.7286539", "0.72357833", "0.70649874", "0.70594865", "0.704953", "0.6992632", "0.69915515", "0.6966365", "0.6961224", "0.69355077", "0.69355077", "0.69355077", "0.6886424", "0.6872843", "0.68690336", "0.68245286", "0.66949815", "0.66931814", "0.6605151", "0.6596005", "0.65850085", "0.6553595", "0.65066344", "0.6505599", "0.6373206", "0.6303835", "0.6282594", "0.6269892", "0.6147431", "0.6139345", "0.613194", "0.6089977", "0.6002564", "0.5996277", "0.5984897", "0.5981714", "0.59754956", "0.59720963", "0.59592825", "0.5952952", "0.5949392", "0.59393936", "0.59392893", "0.5914883", "0.59142965", "0.58969826", "0.58847374", "0.5866256", "0.58494914", "0.5847845", "0.58471406", "0.58172625", "0.5812583", "0.5801936", "0.5765012", "0.5743057", "0.57320774", "0.57318085", "0.5690409", "0.56766415", "0.56675094", "0.566054", "0.5653481", "0.5638307", "0.563028", "0.56290126", "0.56231755", "0.56205744", "0.56151175", "0.5612497", "0.5600209", "0.5600209", "0.5587816", "0.55873317", "0.5579634", "0.5572798", "0.55714804", "0.55691475", "0.55607355", "0.5541395", "0.5539935", "0.5528349", "0.55250084", "0.55250084", "0.5522171", "0.55149674", "0.55084336", "0.55062765", "0.5505249", "0.54935426", "0.54924285", "0.548846", "0.54849595", "0.5469577" ]
0.830727
0
Sets the font family name list.
public void setListFontFamily(List<String> listFontFamily) { Util.checkList(listFontFamily, "listFontFamily"); if (listFontFamily.isEmpty()) { throw new IllegalArgumentException("The listFontFamily is empty list."); } this.removeAllItems(); addItem(""); for (String font : listFontFamily) { addItem(font); } this.listFontFamily = listFontFamily; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFamilies() {\n GraphicsEnvironment env =\n GraphicsEnvironment.getLocalGraphicsEnvironment();\n family_list = env.getAvailableFontFamilyNames(); /*FAULT:: family_list = new String[10]; */\n for (int i = 0; i < family_list.length; i++) {\n families.addItem(family_list[i]);\n }\n\n\n\n }", "public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;", "void setFontFamily(ReaderFontSelection f);", "public void setFontName(String name)\n {\n font.setFontName(name);\n }", "public void setSelectedFontName( String fontName )\r\n\t{\r\n\t\t// set the currently selected font name as per the string passed in if it exists in the list\r\n\t\t// second parameter set to true so scroll pane will scroll to selected item\r\n\t\tfontNamesList.setSelectedValue( fontName, true );\r\n\t}", "public SelectFontFamilyDlg(Frame arg0, boolean arg1, String family_name) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t\t_family_name = family_name;\r\n\t}", "public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}", "public void setFamily( String f )\n {\n family = f.toLowerCase( Locale.ENGLISH );\n }", "public final void setFontFamily(final String fontFamily) {\n if (!this.fontFamily.equals(fontFamily)) {\n this.fontFamily = fontFamily;\n flush();\n }\n\n }", "public void setFontNameText( String text )\r\n\t{\r\n\t\t// set the text in the Font Name text field as per the String passed in\r\n\t\tfontNameTextField.setText( text );\r\n\t}", "void setFontNames(String[] associationArray)\n \t{\n \t\tint maxAssociation = 0;\n \t\tfor(int i=0; i<associationArray.length; i++)\n \t\t{\n if (associationArray[i] == null) continue;\n \t\t\tint fontNumber = TextUtils.atoi(associationArray[i]);\n \t\t\tif (fontNumber > maxAssociation) maxAssociation = fontNumber;\n \t\t}\n \t\tif (maxAssociation <= 0) return;\n \n \t\tfontNames = new String[maxAssociation];\n \t\tfor(int i=0; i<maxAssociation; i++) fontNames[i] = null;\n \t\tfor(int i=0; i<associationArray.length; i++)\n \t\t{\n if (associationArray[i] == null) continue;\n \t\t\tint fontNumber = TextUtils.atoi(associationArray[i]);\n \t\t\tif (fontNumber <= 0) continue;\n \t\t\tint slashPos = associationArray[i].indexOf('/');\n \t\t\tif (slashPos < 0) continue;\n \t\t\tfontNames[fontNumber-1] = associationArray[i].substring(slashPos+1);\n \t\t}\n \t}", "private void setFont() {\n\t}", "public List<String> getListFontFamily() {\n return Collections.unmodifiableList(this.listFontFamily);\n }", "public SelectFontFamilyDlg(Frame arg0, boolean arg1) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t}", "public void setFont(Font f) {\n font = f;\n compute();\n }", "public void fontNameListRegisterHandler( ListSelectionListener listSelectionListener )\r\n\t{\r\n\t\t// register event handler for the Font Names list\r\n\t\tfontNamesList.addListSelectionListener( listSelectionListener );\r\n\t}", "public void addFamilyModifier(String newFamily) {\n\t\tif (family != null) {\n\t\t\tthrow new IllegalStateException(\"Multiple font family names specified\");\n\t\t}\n\t\tthis.family = newFamily;\n\t}", "private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }", "public FontFamilySelector() {\n defaultConfig(Util.getAllFontNames());\n }", "public LabelBuilder setFontFamily(String fontFamily) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setFamily(fontFamily);\n\t\treturn this;\n\t}", "public void setFont(Font fnt) {\n\t\tborder.setTitleFont(fnt);\n\t}", "public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;", "public static void setFont(String fontName, int fontSize, int style){\n\t\tGComponent.fGlobalFont = new Font(fontName, fontSize, style);\n\t}", "public void setFamilyColorlist(LinkedList<Integer> familyColorList) {\n\t\tthis.familyColorList = familyColorList;\n\t}", "public void setFont(Font value) {\r\n this.font = value;\r\n }", "public void setLabelFont(Font f);", "private void defaultConfig(Set<String> defaultFontFamilyNames) {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n\n // the empty font name\n addItem(\"\");\n\n // all the system font names to combo box\n for (String defaultFontFamilyName : defaultFontFamilyNames) {\n this.listFontFamily.add(defaultFontFamilyName);\n addItem(defaultFontFamilyName);\n }\n\n this.setSelectedItem(defaultFontFamily);\n }", "@Override\n public void setFont(String font) {\n graphicsEnvironmentImpl.setFont(canvas, font);\n }", "public void setFont(String font)\n {\n getStateHelper().put(PropertyKeys.font, font);\n }", "public void setFamilyName(String familyName)\r\n {\r\n this.familyName = familyName;\r\n }", "public void changeFonts(){\n Typeface typeFace = Typeface.createFromAsset (this.getAssets (), \"fonts/courier.ttf\");\n sloganTV.setTypeface (typeFace);\n }", "public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}", "public void setDefaultFontFamily(String defaultFontFamily) {\n Util.checkString(defaultFontFamily, \"defaultFontFamily\");\n\n this.defaultFontFamily = defaultFontFamily;\n }", "public void setFamily(String family) {\n this.family = family;\n }", "public native void setFont(Font value) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso.font = value.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n }-*/;", "public void setFont(String key, Font value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.getName() + \" \" + value.getSize() + \" \" + value.getStyle());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public void setFont( Font font ) {\r\n this.font = font;\r\n }", "private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}", "public void setFont(Font newFont) {\n\tfont = newFont;\n }", "public final String getFontFamily() {\n return fontFamily;\n }", "public void updateFonts() {\n\t\tfor (int i = 0; i < this.getMenuCount(); i++) {\n\t\t\tJMenu m;\n\t\t\tif ((m = getMenu(i)) != null) {\n\n\t\t\t\t// old method\n\t\t\t\t// problem with keyboard shortcuts\n\t\t\t\t// setMenuFontRecursive(m, app.getPlainFont());\n\n\t\t\t\t// force rebuild next time menu is opened\n\t\t\t\t// see BaseMenu.menuSelected()\n\t\t\t\tm.removeAll();\n\n\t\t\t\t// update title (always visible)\n\t\t\t\tm.setFont(app.getPlainFont());\n\t\t\t}\n\t\t}\n\t}", "public void setAll(String name, FrillLoc loc, String font) {\n MyName = new String(name);\n MyLocation = loc;\n NameFont = new FontFinder(font, FontList.FONT_LABEL);\n NameFrill = new LabelFrill(name, loc, NameFont);\n }", "private void updateFontSet() {\n if (!isBigFontSet()) {\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), null);\n } else {\n// <snip> Install sscaled font\n FontPolicy windowsPolicy = FontPolicies.getDefaultWindowsPolicy();\n FontSet fontSet = windowsPolicy.getFontSet(null, UIManager\n .getLookAndFeelDefaults());\n WrapperFontSet scaled = new WrapperFontSet(fontSet, 5);\n UIFontUtils.initFontDefaults(UIManager.getDefaults(), scaled);\n// </snip>\n }\n updateLookAndFeel();\n }", "private JPanel setup_font_family_combo_box() {\r\n\t\tJPanel panel = new JPanel();\r\n\t\tpanel.setLayout( new FlowLayout( FlowLayout.LEFT, 5, 5));\r\n\r\n\t\t_comboBox = CommonTool.get_font_family_combo_box();\r\n\r\n\t\tif ( !_family_name.equals( \"\"))\r\n\t\t\t_comboBox.setSelectedItem( _family_name);\r\n\r\n\t\tlink_to_cancel( _comboBox);\r\n\r\n\t\tpanel.add( _comboBox);\r\n\t\treturn panel;\r\n\t}", "public void setFont(Font font)\n {\n this.font = font;\n }", "public void setFamilyName(java.lang.String FamilyName) {\n this.FamilyName = FamilyName;\n }", "public void setMatchFontName(String matchFontName);", "public static void setFont(Font font){\n\t\tGComponent.fGlobalFont = font;\n\t}", "public void setFont(Font font) {\n\tthis.font = font;\n }", "public void setFont(Font newFont) {\r\n\t\tfont = newFont;\r\n\t}", "private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }", "public void setFont(Font font) {\n this.font = font;\r\n repaint();\r\n }", "public void setFont( Font font ) {\n\t\tgraphics.setFont( font );\n\t}", "@Override\n public void setFont(Font f) {\n super.setFont(f);\n menuDirty = true;\n ResizeUtils.updateSize(this, actions);\n }", "private void settypeface() {\n }", "public void setFamily(Vertex family) {\n\t\tthis.family = family;\n\t}", "public synchronized void setProvider(FontProvider fontProvider) {\n/* 136 */ this.fontInfoByName = createFontInfoByName(fontProvider.getFontInfo());\n/* 137 */ this.fontProvider = fontProvider;\n/* */ }", "public static void setFont(PApplet theApplet, String fontName, int fontSize){\n\t\tif(theApplet != null)\n\t\t\tGComponent.globalFont = GFont.getFont(theApplet, fontName, fontSize);\n\t}", "public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }", "public void setFamilyInfo(FamilyInfo[] familyInfo) {\n this.familyInfo = familyInfo;\n }", "public void familiesActionPerformed(java.awt.event.ActionEvent evt) {\n myFont.font = (String) families.getSelectedItem(); /*FAULT:: myFont.font = \"xyz\"; */\n }", "public void setFamilyname(String Familyname) {\n\t\tthis.family_name = Familyname;\n\t}", "private void updateFont() {\n this.currFont = new Font(this.currentFontFamily.getItemText(this.currentFontFamily.getSelectedIndex()),\n Integer.parseInt(this.currentFontSize.getItemText(this.currentFontSize.getSelectedIndex())),\n this.currentFontStyle.getItemText(this.currentFontStyle.getSelectedIndex()),\n Font.NORMAL,\n this.currentFontWeight.getItemText(this.currentFontWeight.getSelectedIndex())); \n }", "private void setFonts() {\n fileTitle.setFont(MasterDisplay.titleFont);\n entryFileButton.setFont(MasterDisplay.tabAndButtonFont);\n entryFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n itemFileButton.setFont(MasterDisplay.tabAndButtonFont);\n itemFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderButton.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderLabel.setFont(MasterDisplay.tabAndButtonFont);\n }", "@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Arial\", Font.PLAIN, 11)); \r\n }", "public FontFamilySelector(String namespace) {\n Util.checkString(namespace, \"namespace\");\n\n Set<String> defaultFontFamilyNames = Util.getAllFontNames();\n\n Map<String, String> map = Util.getPropertyMap(namespace, \"fontFamily\");\n if (map == null) {\n // The property is missing, then use default values\n defaultConfig(defaultFontFamilyNames);\n } else {\n // the empty font name\n addItem(\"\");\n\n // the default font name\n // if present in the configuration file, then use it\n // otherwise, use the default font name\n if (map.containsKey(\"default\")) {\n defaultFontFamily = map.get(\"default\");\n\n // The default font name is not available in the system\n if (!defaultFontFamilyNames.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"The default font name \" + defaultFontFamily\n + \" is not supported.\");\n }\n } else {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n addItem(defaultFontFamily);\n listFontFamily.add(defaultFontFamily);\n }\n\n // Add all the configed fonts as items\n Set<Entry<String, String>> entries = map.entrySet();\n for (Entry<String, String> entry : entries) {\n // The default font is skipped\n if (\"default\".equals(entry.getKey())) {\n continue;\n }\n\n // Other fonts are added as items of the combo box\n String fontName = entry.getValue();\n\n // If the font name is not available, then throw StylePanelConfigurationException\n if (!defaultFontFamilyNames.contains(fontName)) {\n throw new StylePanelConfigurationException(\"The font name \" + fontName + \" is not supported.\");\n }\n\n if (!listFontFamily.contains(fontName)) {\n addItem(fontName);\n listFontFamily.add(fontName);\n } else {\n if (fontName.equals(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\"There are duplicate font name, it is \" + fontName);\n }\n }\n }\n\n if (!listFontFamily.contains(defaultFontFamily)) {\n throw new StylePanelConfigurationException(\n \"The default font name is missing in the configuration file.\");\n }\n\n this.setSelectedItem(defaultFontFamily);\n }\n }", "public void setFont(Font f) {\n _separator.setFont(f);\n }", "public void setLabelFont(Font value) {\n labelFont = value;\n }", "public void setTypeface(Typeface tf) {\n mTypeface = tf;\n }", "@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Times New Roman\", Font.BOLD, 18));\r\n }", "@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }", "public static void setFont(String fontName, int fontSize){\n\t\tsetFont(fontName, fontSize, Font.PLAIN);\n\t}", "private void updateForename() {\n String mySurname = this.surnameCombo.getSelectedItem().toString();\n //Clear the forename combo\n this.forenameCombo.removeAllItems();\n //Get the list of people\n List<String> forenames = pers.getForenamesforSurname(mySurname);\n for (String str : forenames) {\n this.forenameCombo.addItem(str);\n }\n this.updateText();\n }", "public void setFont(Font font)\r\n\t{\r\n\t\t_g2.setFont(font);\r\n\t}", "public void setTextFont(Font font)\n {\n setFont(font);\n }", "public String getFontName();", "public String getFontName();", "public String getFontName();", "protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}", "public void setFamilyName(String familyName) {\n\t\tthis.familyName = familyName;\n\t}", "public void clearSelectedFontName()\r\n\t{\r\n\t\t// deselect the currently selected item in the Font Names list if there is one\r\n\t\tfontNamesList.clearSelection();\r\n\t}", "public void setFont(Font f) {\n super.setFont(f);\n columnWidth = 0;\n }", "public void setTextFont(Font font);", "public void setFont(RMFont aFont) { }", "public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }", "public final void setFont(NativeCallback fontCallback) {\n\t\t// checks if consistent\n\t\tif (fontCallback != null) {\n\t\t\t// resets callback\n\t\t\tsetFont((FontCallback<DatasetContext>) null);\n\t\t\t// adds the callback proxy function to java script object\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, fontCallback);\n\t\t} else {\n\t\t\t// stores the font\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, getOriginalFont());\n\t\t}\n\t}", "public void setFont(String font) {\r\n\t\tProps p = getPage().getPageProperties();\r\n\t\t_fontTagStart = p.getProperty(font + Props.TAG_START);\r\n\t\t_fontTagEnd = p.getProperty(font + Props.TAG_END);\r\n\t}", "public Font GetFont(String name) { return FontList.get(name); }", "public static String[] getFamilyNames() {\n if (fonts == null) {\n getAllFonts();\n }\n\n return (String[]) families.toArray(new String[0]);\n }", "COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}", "public void setFont(String property, Font font) {\r\n Font oldValue = calendarTable.getFont(property);\r\n if (font == oldValue) {\r\n return;\r\n }\r\n calendarTable.setFont(property, font);\r\n if (property.equals(FONT_PREFIX + \"Controls\")) {\r\n for(int i = 0, n = controlsPanel.getComponentCount(); i < n; i++) {\r\n controlsPanel.getComponent(i).setFont(font);\r\n }\r\n }\r\n firePropertyChange(\"Font.\" + property, oldValue, font);\r\n }", "public final void setConsoleFont(Font font) {\r\n\t\tconsole.setFont(font);\r\n\t}", "private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }", "public String getFontName() {\n\t\treturn this.fontName;\n\t}", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "private void initFontAndChange(Context context) {\n changeFont(context);\n }", "private void setupFonts()\r\n\t{\r\n\t\tSystem.out.println(\"In setupFonts()\");\r\n\t\t\r\n\t\t// set up the text fonts\r\n\t\ttry\r\n\t\t{\r\n\t\t\ttextFont = Font.createFont(Font.TRUETYPE_FONT, AppletResourceLoader.getFileFromJar(GameConstants.PATH_FONTS + \"FOXLEY8_.ttf\"));\r\n\t\t\ttextFont = textFont.deriveFont(16.0f);\r\n\t\t\ttextFontBold = textFont.deriveFont(Font.BOLD, 16.0f);\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"ERROR IN setupFonts(): \" + e.getClass().getName() + \" - \" + e.getMessage());\r\n\t\t}\r\n\t}", "public final void setFont(FontCallback<DatasetContext> fontCallback) {\n\t\t// sets the callback\n\t\tthis.fontCallback = fontCallback;\n\t\t// checks if consistent\n\t\tif (fontCallback != null) {\n\t\t\t// adds the callback proxy function to java script object\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, fontCallbackProxy.getProxy());\n\t\t} else {\n\t\t\t// stores the font\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, getOriginalFont());\n\t\t}\n\t}", "@Override\n\tpublic void getAllFamilies() {\n\n\t}", "public void setFontSize(float fs) {\n\t\tif (fs != fontSize) {\n\t\t\tfontSize = fs;\n\t\t\treload();\n\t\t}\n\t}" ]
[ "0.72137594", "0.69837284", "0.6920159", "0.67647755", "0.6719484", "0.66016567", "0.6579113", "0.6573714", "0.6522901", "0.6367064", "0.6342959", "0.62277144", "0.62257344", "0.6172513", "0.6147152", "0.61435723", "0.61326975", "0.60579765", "0.6053483", "0.60361326", "0.6029862", "0.60247165", "0.60085523", "0.5964524", "0.5922076", "0.5890705", "0.58764344", "0.58698356", "0.58609563", "0.58508337", "0.5842915", "0.58277696", "0.57805854", "0.57642984", "0.5762173", "0.5759409", "0.5754373", "0.5754037", "0.5736247", "0.5728127", "0.57175076", "0.5716633", "0.57025254", "0.5698385", "0.56944495", "0.5684471", "0.5671896", "0.56645465", "0.5654934", "0.56534547", "0.56506926", "0.56451184", "0.56213945", "0.5619214", "0.5591715", "0.55669343", "0.55509", "0.55465776", "0.55408716", "0.55380356", "0.552777", "0.55241656", "0.5513866", "0.54973125", "0.5490298", "0.5490217", "0.5489095", "0.54791325", "0.5477383", "0.5476887", "0.54709333", "0.54663956", "0.5463228", "0.54505503", "0.5449939", "0.5449667", "0.5449667", "0.5449667", "0.5438543", "0.5401508", "0.5397906", "0.539601", "0.5394959", "0.5345258", "0.5318983", "0.5311879", "0.52940756", "0.5290462", "0.52899957", "0.5272066", "0.5272004", "0.5257701", "0.5257431", "0.52564913", "0.5239348", "0.5221781", "0.5219767", "0.5203586", "0.51987106", "0.5170906" ]
0.7295699
0
Sets the default font family name.
public void setDefaultFontFamily(String defaultFontFamily) { Util.checkString(defaultFontFamily, "defaultFontFamily"); this.defaultFontFamily = defaultFontFamily; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setDefaultFont(Font f) {\r\n defaultFont = f;\r\n }", "public void setFontName(String name)\n {\n font.setFontName(name);\n }", "public void setFontName(String name) {\n\t\tthis.fontName = name;\n\t}", "private void setFont() {\n try {\n setFont(Font.loadFont(new FileInputStream(FONT_PATH), 23));\n } catch (FileNotFoundException e) {\n setFont(Font.font(\"Verdana\", 23));\n }\n }", "void setFontFamily(ReaderFontSelection f);", "public String getDefaultFontFamily() {\n return this.defaultFontFamily;\n }", "public native final EditorBaseEvent fontFamily(String val) /*-{\n\t\tthis.fontFamily = val;\n\t\treturn this;\n\t}-*/;", "private void setFont() {\n\t}", "public static void setFont(String fontName, int fontSize, int style){\n\t\tGComponent.fGlobalFont = new Font(fontName, fontSize, style);\n\t}", "private void defaultConfig(Set<String> defaultFontFamilyNames) {\n defaultFontFamily = DEFAULT_SELECTED_FONT_NAME;\n\n // the empty font name\n addItem(\"\");\n\n // all the system font names to combo box\n for (String defaultFontFamilyName : defaultFontFamilyNames) {\n this.listFontFamily.add(defaultFontFamilyName);\n addItem(defaultFontFamilyName);\n }\n\n this.setSelectedItem(defaultFontFamily);\n }", "public SelectFontFamilyDlg(Frame arg0, boolean arg1, String family_name) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t\t_family_name = family_name;\r\n\t}", "public void setFontNameText( String text )\r\n\t{\r\n\t\t// set the text in the Font Name text field as per the String passed in\r\n\t\tfontNameTextField.setText( text );\r\n\t}", "public void setFont(Font fnt) {\n\t\tborder.setTitleFont(fnt);\n\t}", "public FontFamilySelector() {\n defaultConfig(Util.getAllFontNames());\n }", "@Override\n public void setFont(String font) {\n graphicsEnvironmentImpl.setFont(canvas, font);\n }", "public static void setDefault(BitmapFont font) {\r\n\t\tdefaultFont = font;\r\n\t}", "public final void setFontFamily(final String fontFamily) {\n if (!this.fontFamily.equals(fontFamily)) {\n this.fontFamily = fontFamily;\n flush();\n }\n\n }", "private void setFont() {\n\t\tsessionTitle.setFont(FONT_TITLE);\n\t\tdetailedDescription.setFont(FONT_DESCRIPTION);\n\t\texitButton.setFont(FONT_BUTTON);\n\t}", "public static void setFont(PApplet theApplet, String fontName, int fontSize){\n\t\tif(theApplet != null)\n\t\t\tGComponent.globalFont = GFont.getFont(theApplet, fontName, fontSize);\n\t}", "public static void setFont(Font font){\n\t\tGComponent.fGlobalFont = font;\n\t}", "private void setFont() {\n Typeface font = Typeface.createFromAsset(getContext().getAssets(), mFontPath);\n setTypeface(font, Typeface.NORMAL);\n }", "public void setFont(Font value) {\r\n this.font = value;\r\n }", "public static boolean setSelectedDefaultFontName(String name) {\n return nativeSetSelectedDefaultFontName(name);\n }", "public LabelBuilder setFontFamily(String fontFamily) {\n\t\tIsBuilder.checkIfValid(getOptionsBuilder());\n\t\tlabel.getFont().setFamily(fontFamily);\n\t\treturn this;\n\t}", "public void setFont(Font f) {\n font = f;\n compute();\n }", "public void setFont(String font)\n {\n getStateHelper().put(PropertyKeys.font, font);\n }", "public SelectFontFamilyDlg(Frame arg0, boolean arg1) {\r\n\t\tsuper(arg0,\r\n\t\t\tResourceManager.get( \"select.font.family.dialog.title\"),\r\n\t\t\targ1);\r\n\t}", "public void setLabelFont(Font f);", "public void setSelectedFontName( String fontName )\r\n\t{\r\n\t\t// set the currently selected font name as per the string passed in if it exists in the list\r\n\t\t// second parameter set to true so scroll pane will scroll to selected item\r\n\t\tfontNamesList.setSelectedValue( fontName, true );\r\n\t}", "@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Arial\", Font.PLAIN, 11)); \r\n }", "public void setFont(String key, Font value) {\n\t\tif (value != null && !value.equals(getDefault(key)))\n\t\t\tinternal.setProperty(key, value.getName() + \" \" + value.getSize() + \" \" + value.getStyle());\n\t\telse\n\t\t\tinternal.remove(key);\n\t}", "public void setFont( Font font ) {\n\t\tgraphics.setFont( font );\n\t}", "public void setFont(String fontname, int fontsize){\n\t\tint tw = textWidth;\n\t\tint fs = (int) localFont.getSize();\n\t\tlocalFont = GFont.getFont(winApp, fontname, fontsize);\n\t\tif(fontsize > fs)\n\t\t\theight += (fontsize - fs);\n\t\tsetText(text);\n\t\tif(textWidth > tw)\n\t\t\twidth += (textWidth - tw);\n\t\tArrayList<GOption> options = optGroup.getOptions();\n\t\tfor(int i = 0; i < options.size(); i++)\n\t\t\toptions.get(i).setWidth((int)width - 10);\n\t\tslider.setX((int)width - 10);\n\t}", "public static Font getDefaultFont() {\r\n return defaultFont;\r\n }", "public String getFontName() {\n return getFontName(Locale.getDefault());\n }", "@Override\r\n public void setFont(Font font) {\r\n super.setFont(new Font(\"Times New Roman\", Font.BOLD, 18));\r\n }", "public final String getFontFamily() {\n return fontFamily;\n }", "public static String getSelectedDefaultFontName() {\n return nativeGetSelectedDefaultFontName();\n }", "public void setFont( Font font ) {\r\n this.font = font;\r\n }", "@Override\n public void setTypeface() {\n mAppNameTxt.setTypeface(Typeface.createFromAsset(getContext().getAssets(),\n CUSTOM_FONTS_ROOT + CUSTOM_FONT_NAME));\n }", "public void setLabelFont(Font value) {\n labelFont = value;\n }", "public native final String fontFamily() /*-{\n\t\treturn this.fontFamily;\n\t}-*/;", "public void setFont(Font font)\n {\n this.font = font;\n }", "public FontConfig() {\n\t\tthis.name = \"Monospaced\";\n\t\tthis.style = FontStyle.PLAIN;\n\t\tthis.size = DEFAULT_SIZE;\n\t}", "public void setFont(Font font) {\n\tthis.font = font;\n }", "public void setFont(Font font)\r\n\t{\r\n\t\t_g2.setFont(font);\r\n\t}", "public static void setFont(String fontName, int fontSize){\n\t\tsetFont(fontName, fontSize, Font.PLAIN);\n\t}", "public final void setConsoleFont(Font font) {\r\n\t\tconsole.setFont(font);\r\n\t}", "protected void doStandardFonts() {\r\n\t\trenderer.txt.setUseStandardFonts(ui.viewStandardFonts.isSelected());\r\n\t}", "public void setTextFont(Font font)\n {\n setFont(font);\n }", "public void setFont(Font newFont) {\r\n\t\tfont = newFont;\r\n\t}", "public void setFont(Font newFont) {\n\tfont = newFont;\n }", "private void setupFont() {\n CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()\n .setDefaultFontPath(\"fonts/Montserrat-Regular.otf\")\n .setFontAttrId(R.attr.fontPath)\n .build()\n );\n }", "public String getFontName() {\n\t\treturn this.fontName;\n\t}", "public void setFont(Font font) {\n this.font = font;\r\n repaint();\r\n }", "public String getFontName();", "public String getFontName();", "public String getFontName();", "public void setFamily( String f )\n {\n family = f.toLowerCase( Locale.ENGLISH );\n }", "public void setTrueFont(Font font)\n\t{\n\t\tString bodyRule = \"body { font-family: \" + font.getFamily() + \"; \" +\n\t\t\t\t\"font-size: \" + font.getSize() + \"pt; }\";\n\t\t((HTMLDocument)getDocument()).getStyleSheet().addRule(bodyRule);\n\t\t//Sets the font for when the JEditorPane is switched to plain text.\n\t\tsetFont(font);\n\t}", "public native void setFont(Font value) /*-{\n\t\tvar jso = this.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n\t\tjso.font = value.@com.emitrom.ti4j.core.client.ProxyObject::getJsObj()();\n }-*/;", "public String fontName() {\n\t\treturn fontName;\n\t}", "public IconBuilder fontName(String font) {\n\t\tthis.fontName = font;\n\t\treturn this;\n\t}", "public static String getFontName() {\n return \"Comic Sans MS\";\n }", "public String getFontName()\n {\n return font.getFontName();\n }", "private void setFonts() {\n fileTitle.setFont(MasterDisplay.titleFont);\n entryFileButton.setFont(MasterDisplay.tabAndButtonFont);\n entryFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n itemFileButton.setFont(MasterDisplay.tabAndButtonFont);\n itemFileLabel.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderButton.setFont(MasterDisplay.tabAndButtonFont);\n outputFolderLabel.setFont(MasterDisplay.tabAndButtonFont);\n }", "public void changeFonts(){\n Typeface typeFace = Typeface.createFromAsset (this.getAssets (), \"fonts/courier.ttf\");\n sloganTV.setTypeface (typeFace);\n }", "public void setTextFont(Font font);", "private void settypeface() {\n }", "public void setFont(String font) {\r\n\t\tProps p = getPage().getPageProperties();\r\n\t\t_fontTagStart = p.getProperty(font + Props.TAG_START);\r\n\t\t_fontTagEnd = p.getProperty(font + Props.TAG_END);\r\n\t}", "public void setMatchFontName(String matchFontName);", "public void setDisplayFont(int size){\n\t\tscreen.setFont(new Font(\"Serif\",Font.BOLD,size));\r\n\t}", "private void loadSystemFont(String font){\n mFont = new Font(font, mFontStyle, (int)mFontSize);\n }", "public String getName() {\n return fontName;\n }", "COSName getFontName()\r\n\t{\r\n\t\tint setFontOperatorIndex = appearanceTokens.indexOf(Operator.getOperator(\"Tf\"));\r\n\t\treturn (COSName) appearanceTokens.get(setFontOperatorIndex - 2);\r\n\t}", "public Font setFontStyle(String font){\n\t\treturn new Font(font, Font.BOLD, 1);\r\n\t}", "public void setTypeface(Typeface tf) {\n mTypeface = tf;\n }", "public String getFontFamily() {\n Object value = library.getObject(entries, FONT_FAMILY);\n if (value instanceof StringObject) {\n StringObject familyName = (StringObject) value;\n return familyName.getDecryptedLiteralString(library.getSecurityManager());\n }\n return FONT_NAME;\n }", "public void change_browser_font(Font font){\n\t\tbrowser_font = font;\n\t\tgui_globals.change_html_pane_font(this.browser, font);\n\t}", "private void initFontAndChange(Context context) {\n changeFont(context);\n }", "public void setFont(org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont font)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont target = null;\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().find_element_user(FONT$0, 0);\n if (target == null)\n {\n target = (org.openxmlformats.schemas.drawingml.x2006.main.CTTextFont)get_store().add_element_user(FONT$0);\n }\n target.set(font);\n }\n }", "public void setNodeLabelFont(Font value) {\n nodeLabelfont = value;\n }", "public void setFont(Font f) {\n super.setFont(f);\n columnWidth = 0;\n }", "public void setFont(String str) {\n if (Strings.notEmpty(str)) {\n Typeface typeface = FontUtils.getTypeface(this.textView.getContext(), str);\n if (typeface != null) {\n this.textView.setTypeface(typeface);\n }\n }\n }", "public void setFont(RMFont aFont) { }", "public Font(String name, int style, int size) {\n\tthis.name = (name != null) ? name : \"Default\";\n\tthis.style = (style & ~0x03) == 0 ? style : 0;\n\tthis.size = size;\n this.pointSize = size;\n }", "public void initFont() {\r\n\t\tFont dosFont = null;\r\n try {\r\n \t//setup font\r\n\t\t\t\tURL fontUrl = getURL(\"fonts/DOSFont.ttf\");\r\n\t\t \tdosFont = Font.createFont(Font.TRUETYPE_FONT, fontUrl.openStream());\r\n\t \tdosFont = dosFont.deriveFont(Font.PLAIN, 15);\r\n\t \tGraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();\r\n\t \tge.registerFont(dosFont);\r\n\t } catch(Exception e) {\r\n\t e.printStackTrace();\r\n\t System.exit(-1);\r\n\t }\r\n screen.setFont(dosFont);//set font on JTextArea\r\n\t}", "public void init( )\n {\n metFont = new HersheyFont( getDocumentBase(), getParameter(\"font\"));\n }", "public void setFamilyName(java.lang.String FamilyName) {\n this.FamilyName = FamilyName;\n }", "public void setFont(AWTFont font) {\r\n\t\trenderer = createRendererFromAWTFont(font);\r\n\t\tthis.font = font;\r\n\t\tupdateValues();\r\n\t}", "public void setDefaultStyleString(String defaultStyleString) {\n/* 564 */ getCOSObject().setString(COSName.DS, defaultStyleString);\n/* */ }", "public FontChooser(JFrame owner) {\n super(owner, \"Font Chooser\", true);\n ff = FontFactory.getInstance();\n }", "public void setFamilyName(String familyName)\r\n {\r\n this.familyName = familyName;\r\n }", "public final void setFont(NativeCallback fontCallback) {\n\t\t// checks if consistent\n\t\tif (fontCallback != null) {\n\t\t\t// resets callback\n\t\t\tsetFont((FontCallback<DatasetContext>) null);\n\t\t\t// adds the callback proxy function to java script object\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, fontCallback);\n\t\t} else {\n\t\t\t// stores the font\n\t\t\tsetValueAndAddToParent(CommonProperty.FONT, getOriginalFont());\n\t\t}\n\t}", "public void setModifierFont(String name, int type, int size, float tracking, Boolean kerning) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size, kerning, tracking);\n _SPR.RefreshModifierFont();\n }", "public void setModifierFont(String name, int type, int size) \n {\n RendererSettings.getInstance().setLabelFont(name, type, size);\n _SPR.RefreshModifierFont();\n }", "public synchronized void setProvider(FontProvider fontProvider) {\n/* 136 */ this.fontInfoByName = createFontInfoByName(fontProvider.getFontInfo());\n/* 137 */ this.fontProvider = fontProvider;\n/* */ }", "public void setFont(BitmapFont font) {\n\t\tthis.font = font;\n\t\tthis.setLabel(this.label);\n\t}", "public void setFont(int fontId){\n this.fontId = fontId;\n }", "public String getFontName() {\n Object value = library.getObject(entries, FONT_NAME);\n if (value instanceof Name) {\n return ((Name) value).getName();\n }\n return FONT_NAME;\n }" ]
[ "0.774415", "0.76185834", "0.73649716", "0.7011642", "0.6980157", "0.6899698", "0.68358505", "0.68212074", "0.67994744", "0.67337584", "0.6684502", "0.6662596", "0.6618741", "0.6599155", "0.6596726", "0.6557074", "0.6523737", "0.65103215", "0.6496436", "0.6472593", "0.6462739", "0.6452108", "0.6444873", "0.64266425", "0.64018595", "0.6376668", "0.6332846", "0.6326603", "0.63209945", "0.62810105", "0.6262659", "0.6257771", "0.6250245", "0.6236094", "0.623553", "0.6214287", "0.62059736", "0.6201321", "0.61964977", "0.61590177", "0.6151528", "0.6114009", "0.610442", "0.60827726", "0.6081216", "0.60647845", "0.605398", "0.6053785", "0.6037744", "0.6027514", "0.60173017", "0.6009996", "0.59987575", "0.5997748", "0.5984091", "0.5984087", "0.5984087", "0.5984087", "0.59656286", "0.5961667", "0.5946596", "0.5914957", "0.59003586", "0.58837086", "0.5881718", "0.58817", "0.5873046", "0.5868373", "0.5844014", "0.58345956", "0.58209485", "0.5810786", "0.5797999", "0.5795556", "0.57694995", "0.5750366", "0.57398385", "0.5731792", "0.5730655", "0.5730514", "0.57084185", "0.5687347", "0.56795186", "0.5669753", "0.56610245", "0.5650971", "0.56395185", "0.5621446", "0.5618442", "0.56142986", "0.56106347", "0.5594865", "0.55893725", "0.55718833", "0.55606854", "0.555868", "0.55544287", "0.55527246", "0.5547633", "0.554616" ]
0.79261184
0
this is for the first file
private void CompareTwoFiles() { GetCharactersFromProject prog1Char; KGram prog1KGram; HashKGram prog1HashKGram; FingerPrint prog1FingerPrint; ArrayList<Integer> fingerprintProg1 = null; GetCharactersFromProject prog2Char; KGram prog2KGram; HashKGram prog2HashKGram; FingerPrint prog2FingerPrint; ArrayList<Integer> fingerprintProg2 = null; //for the first file try { prog1Char = new GetCharactersFromProject(filepath1); prog1KGram = new KGram(prog1Char.getCharacters()); prog1HashKGram = new HashKGram(prog1KGram.ReturnProcessedKGram()); prog1FingerPrint = new FingerPrint(prog1HashKGram.ReturnProcessedHashes()); fingerprintProg1 = prog1FingerPrint.ReturnFingerPrint(); } catch (IOException e) { e.printStackTrace(); } //this is for the second file try { prog2Char = new GetCharactersFromProject(filepath2); prog2KGram = new KGram(prog2Char.getCharacters()); prog2HashKGram = new HashKGram(prog2KGram.ReturnProcessedKGram()); prog2FingerPrint = new FingerPrint(prog2HashKGram.ReturnProcessedHashes()); fingerprintProg2 = prog2FingerPrint.ReturnFingerPrint(); } catch (IOException ex) { ex.printStackTrace(); } //this is for jaccard index. Jaccard index will be the basis of similarity float numSimilarity = 0; boolean isSimilarEncounter = false; int sizeFingerprint1 = fingerprintProg1.size(); int sizeFingerprint2 = fingerprintProg2.size(); for (Integer integer : fingerprintProg1) { for (Integer value : fingerprintProg2) { if ((integer.intValue() == value.intValue()) && !isSimilarEncounter) { numSimilarity++; isSimilarEncounter = true; } } isSimilarEncounter = false; } SimilarityScore = (numSimilarity / (sizeFingerprint1 + sizeFingerprint2 - numSimilarity)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setInitialSourceFile()\n\t{\n\t\tint largestAuthoredId = -1;\n\t\tSourceFile[] files = m_fileInfo.getFileList();\n\t\tfor (int i=0; i<files.length; ++i)\n\t\t{\n\t\t\tSourceFile sf = files[i];\n\t\t\tif (sf.getId() > largestAuthoredId && getFileType(sf) == AUTHORED_FILE)\n\t\t\t\tlargestAuthoredId = sf.getId();\n\t\t}\n\t\tif (largestAuthoredId != -1)\n\t\t\tsetListingPosition(largestAuthoredId, 1);\n\t}", "public String getFirstFilename() {\n\t\tTreeMap<Double,File> tm = new TreeMap<Double,File>();\n\t\tFile file=new File(\"C:\\\\temp\");\n\t\tFile subFile[] = file.listFiles();\n\t\tint fileNum = subFile.length;\n\t\tfor (int i = 0; i < fileNum; i++) {\n\t\t Double tempDouble = new Double(subFile[i].lastModified());\n\t\t tm.put(tempDouble, subFile[i]);\n\t\t }\t \n\t\tint count=0;\n\t\tString fileName=null;\n\t\tSet<Double> set = tm.keySet();\n\t\tIterator<Double> it = set.iterator();\n\t\twhile (it.hasNext()) {\n\t\t Object key = it.next();\n\t\t Object objValue = tm.get(key);\n\t\t File tempFile = (File) objValue;\n\t\t if(count==fileNum-2)\n\t\t\t fileName=tempFile.getName();\n\t\t count++;\n\t\t }\n\t\tSystem.out.println(\"第一个log的文件名称-->\"+fileName);\n\t\treturn fileName;\n\t}", "@Override\r\n\tprotected void doFirst() {\n\t\t\r\n\t}", "public static void processOneFileSelecction()\n {\n int answer = JSoundsMainWindowViewController.jfcOneFile.showOpenDialog(JSoundsMainWindowViewController.jSoundsMainWindow);\n \n if (answer == JFileChooser.APPROVE_OPTION)\n {\n File actualDirectory = JSoundsMainWindowViewController.jfcOneFile.getCurrentDirectory();\n String directory = actualDirectory.getAbsolutePath() + \"/\" + JSoundsMainWindowViewController.jfcOneFile.getSelectedFile().getName();\n UtilFunctions.listOneFile(JSoundsMainWindowViewController.jfcOneFile.getSelectedFile());\n JSoundsMainWindowViewController.orderBy(true, false, false); \n }\n }", "private File callNext() {\r\n \r\n while(fileIterator.hasNext()) {\r\n File temp = ((File) fileIterator.next());\r\n if(temp.getName().contains(searchPattern)) {\r\n \r\n return temp;\r\n }\r\n }\r\n return null;\r\n \r\n }", "private void initHeader(boolean newHeader) throws IOException {\n\n if (newHeader) writeHeader();\n /*\n if (rafShp.read() == -1) { \n //File is empty, write a new one (what else???)\n writeHeader();\n } \n */ \n readHeader();\n }", "@Override\n public void addSingleFile(FileInfo file) {\n }", "private void writeTest1File1() throws IOException{\n fillFile(1, true);\n }", "private void setFile() {\n\t}", "void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }", "public void readFromFile() {\n\n\t}", "public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }", "void doCF()\n {\n try\n {\n int module = propertyGet(LIST_MODULE);\n\t\t\tint currentLine = propertyGet(LIST_LINE);\n\n if (hasMoreTokens())\n {\n String arg = nextToken();\n module = parseFileArg(module, arg);\n\t\t\t\tcurrentLine = 1;\n setListingPosition(module, currentLine);\n }\n\n SourceFile sourceFile = m_fileInfo.getFile(module);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(sourceFile.getName());\n\t\t\tsb.append('#');\n\t\t\tsb.append(sourceFile.getId());\n\t\t\tsb.append(':');\n\t\t\tsb.append(currentLine);\n\t\t\tout( sb.toString() );\n }\n\t\tcatch(NullPointerException npe)\n\t\t{\n\t\t\terr(getLocalizationManager().getLocalizedTextString(\"noFilesFound\")); //$NON-NLS-1$\n\t\t}\n\t\tcatch(ParseException pe)\n\t\t{\n\t\t\terr(pe.getMessage());\n\t\t}\n\t\tcatch(AmbiguousException ae)\n\t\t{\n\t\t\terr(ae.getMessage());\n\t\t}\n\t\tcatch(NoMatchException nme)\n\t\t{\n\t\t\terr(nme.getMessage());\n\t\t}\n }", "public void multiFileStartDocument() throws SAXException\r\n\t{\r\n\t\tsuper.startDocument();\r\n\t\ttagPath = new Stack<Path>();\r\n\t\ttagBeingIgnored = null;\r\n\t\tpassedARecord = false;\r\n\t}", "public File getPrimaryFile() {\n return primaryFile;\n }", "String prepareFile();", "@Override\n public int getFile() {\n return file;\n }", "public String getFileSource(int index) {\n\t\tFile f = openFiles.get(index); \n\t\tString path = f.getAbsolutePath();\n\t\tint last = path.lastIndexOf('/');\n\t\tString pathSimple = path.substring(0, last+1);\n\t\t\n\t\treturn pathSimple;\t\n\t}", "@Override\n public void run() {\n \t\n \t\t\n \t\tSearchFile.findFile(f1);\n }", "public abstract String getFirstLine();", "public SplitFile() {\n\t}", "public abstract boolean isFirstLineHeader();", "public void mo210a(File file) {\n }", "public void start(){\n\t\tboolean readFromFile = readFromIndex();\r\n\t\tif (!readFromFile){\t\r\n\t\t\tfor (int i = 0;i<1000;++i){\r\n\t\t\t\tString file = \"../crawler/pages/page\"+i+\".html\";\r\n\t\t\t\taddFile(file);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void reset() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry{\r\n\t\t\tbr.seek(0);\r\n\t\t}catch(IOException e){\r\n\t\t\tSystem.out.println(\"Files not found.\");\r\n\t\t}\r\n\t}", "public boolean isFileStartHit() {\n return pageRequest.getStart() == 0;\n }", "private static void firstInFirstOut() throws IOException {\n\t\t\n\t\t//File names\n\t\tString fileBank[] = new String[] {\"ReferenceString1.txt\", \"ReferenceString2.txt\",\n\t\t\t\t\"ReferenceString3.txt\", \"ReferenceString4.txt\"};\n\t\t\n\t\t//for-loop: go through each file\n\t\tfor(int currentFile = 0; currentFile < fileBank.length; currentFile++) {\n\t\t\t\n\t\t\t//Indicate which algorithm is being used and which test case is being ran\n\t\t\tSystem.out.println(\"\\nFIFO using file: \" + fileBank[currentFile]\n\t\t\t\t\t+ \"\\nTest Case #\" + (currentFile+1));\n\t\t\tString fileName = fileBank[currentFile];\n\t\t\t\n\t\t\t//Page numbers from reference string\n\t\t\tint pages[] = new int[30];\n\t\t\t//Number of Page Frames value\n\t\t\tint numberOfPageFrames = 0;\n\t\t\t\n\t\t\t//Scan file for number page frames value and reference string\n\t\t\tFile pageFile = new File(fileName);\n\t\t\tScanner scan = new Scanner(pageFile);\n\t\t\tfor(int i = 0; i < 4; i++) {\n\t\t\t\tif(i == 1) {\n\t\t\t\t\tString numberOfPageFrameValue = scan.nextLine();\n\t\t\t\t\tnumberOfPageFrames = Integer.parseInt(numberOfPageFrameValue);\n\t\t\t\t} else if(i == 3) {\n\t\t\t\t\tString referenceString = scan.nextLine();\n\t\t\t\t\tfor(int currentCharacter = 0; currentCharacter < 30; currentCharacter++) {\n\t\t\t\t\t\tpages[currentCharacter] = Character.getNumericValue(referenceString.charAt(currentCharacter));\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tscan.nextLine();\n\t\t\t\t}\n\t\t\t}\n\t\t\tscan.close();\n\t\t\t\n\t\t\t//Frame array size depends on number of page frame value\n\t\t\tint frames[] = new int[numberOfPageFrames];\n\t\t\t\n\t\t\t//Set all values in frame to -1\n\t\t\tfor(int i = 0; i < frames.length; i++) {\n\t\t\t\tframes[i] = -1;\n\t\t\t}\n\t\t\t\n\t\t\t//Pointer to our index in frame array\n\t\t\tint frameIndex = 0;\n\t\t\t//Total page faults\n\t\t\tint pageFaults = 0;\n\t\t\t//Check tests\n\t\t\tboolean check = true;\n\t\t\t\n\t\t\t//for-loop: Goes through all pages[] elements \n\t\t\tfor(int i = 0; i < pages.length; i++) {\n\t\t\t\t//Current page number\n\t\t\t\tint page = pages[i];\n\t\t\t\tcheck = true;\n\t\t\t\t\n\t\t\t\t//If page is already in frames, do nothing\n\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\tif(frames[j] == page) {\n\t\t\t\t\t\tcheck = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//If page is not in frames, add page to frames and update pointer\n\t\t\t\tif(check) {\n\t\t\t\t\tframes[frameIndex] = page;\n\t\t\t\t\tframeIndex++;\n\t\t\t\t\t//If pointer goes out of bounds, move it back to beginning\n\t\t\t\t\tif(frameIndex == frames.length) {\n\t\t\t\t\t\tframeIndex = 0;\n\t\t\t\t\t}\n\t\t\t\t\t//Print out current frame\n\t\t\t\t\tSystem.out.print(\"Frames: \");\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(frames[j] != -1) {\n\t\t\t\t\t\t\tSystem.out.print(frames[j] + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t//Increment page faults\n\t\t\t\t\tpageFaults++;\n\t\t\t\t} else {\n\t\t\t\t\t//Print out current frame\n\t\t\t\t\tSystem.out.print(\"Frames: \");\n\t\t\t\t\tfor(int j = 0; j < frames.length; j++) {\n\t\t\t\t\t\tif(frames[j] != -1) {\n\t\t\t\t\t\t\tSystem.out.print(frames[j] + \" \");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Print total page faults\n\t\t\tSystem.out.println(\"Page faults: \" + pageFaults);\n\t\t}\n\t}", "public void init()\r\n {\n readFile(inputFile);\r\n writeInfoFile();\r\n }", "abstract public MediaFile getMainFile();", "protected int getFilePriority(File file) {\n \treturn 1;\n }", "public abstract long NewFileNumber();", "public void newFile() {\r\n \t\tcurFile = null;\r\n \t}", "@Override\n\t\t\t\tpublic void getFile(int k) {\n\t\t\t\t\tsuper.getFile(k);\n\t\t\t\t\tgetfile(k);\n\t\t\t\t}", "private void updateFiles() {\n\t}", "void seekToFirst();", "default boolean alwaysFormatEntireFile() {\n return false;\n }", "private FileUtil() {\n \t\tsuper();\n \t}", "public void fileRead() {\n\t\tString a, b;\n\t\t\n\t\twhile (input.hasNext()) {\n\t\t\ta = input.next();\n\t\t\tb = input.next();\n\t\t\tSystem.out.printf(\"%s %s\\n\", a, b);\n\t\t}\n\t}", "public FileTwo() {\n System.out.println(\"File Two is constructed\");\n }", "private ControlloFile() {\n\t}", "public void startNewFile(String fileName, int sequenceNumber) throws Exception {\n\n try {\n \n \tif(sequenceNumber == 1)\n \t {\n \t // This is the first zip file for this data. \n \t // Just use the name passed in\n \t this.outputFileName = fileName;\n \t }\n \telse\n \t {\n \t\t// This is not the first zip file for this data\n \t\t// Append a number (e.g. _1 _2) to the file name\n \t\tint dotIndex = fileName.lastIndexOf('.');\n \t\tString beforeDot = fileName.substring(0, dotIndex);\n \t\toutputFileName=beforeDot+\"_part-\"+sequenceNumber+\".zip\";\n \t }\n \t\t\n \t// Add file to the list to be returned\n fileList.add(outputFileName); \t\n \t\n logger.debug(\"output file \" + outputFileName);\n\n FileOutputStream dest = new FileOutputStream(outputFileName);\n logger.debug(\"dest file \" + dest);\n this.out = new ZipOutputStream(new BufferedOutputStream(dest));\n\n\n // Set Default Compression level\n out.setLevel(ZipFiles.DEFAULT_COMPRESSION);\n out.setMethod(ZipOutputStream.DEFLATED);\n this.data = new byte[ZipFiles.BUFFER];\n } catch (FileNotFoundException e) {\n logger.error(\"File \" + outputFileName + \" not found !!\", e);\n throw new Exception(\"File \" + outputFileName + \" not found !!\", e);\n }\n\n }", "@Override\r\n protected FileObject findPrimaryFile(FileObject fo) {\r\n String fileExt = fo.getExt();\r\n\r\n // Ensure all the mandatory files that comprise a shapefile are avialable...\r\n for (String mandatoryExt : MANDATORY_EXTENSIONS) {\r\n FileObject brother = FileUtil.findBrother(fo, mandatoryExt);\r\n if (brother == null) {\r\n return null;\r\n }\r\n }\r\n // ... and then return the primary file object\r\n if (PRIMARY_EXTENSION.equalsIgnoreCase(fileExt)) {\r\n return fo;\r\n }\r\n else {\r\n return FileUtil.findBrother(fo, PRIMARY_EXTENSION);\r\n }\r\n }", "protected void initFile(String id) throws FormatException, IOException {\n // normalize file name\n super.initFile(normalizeFilename(null, id));\n id = currentId;\n String dir = new File(id).getParent();\n\n // parse and populate OME-XML metadata\n String fileName = new Location(id).getAbsoluteFile().getAbsolutePath();\n RandomAccessInputStream ras = new RandomAccessInputStream(fileName);\n String xml;\n IFD firstIFD;\n try {\n TiffParser tp = new TiffParser(ras);\n firstIFD = tp.getFirstIFD();\n xml = firstIFD.getComment();\n }\n finally {\n ras.close();\n }\n\n if (service == null) setupService();\n OMEXMLMetadata meta;\n try {\n meta = service.createOMEXMLMetadata(xml);\n }\n catch (ServiceException se) {\n throw new FormatException(se);\n }\n\n hasSPW = meta.getPlateCount() > 0;\n\n for (int i=0; i<meta.getImageCount(); i++) {\n int sizeC = meta.getPixelsSizeC(i).getValue().intValue();\n service.removeChannels(meta, i, sizeC);\n }\n\n // TODO\n //Hashtable originalMetadata = meta.getOriginalMetadata();\n //if (originalMetadata != null) metadata = originalMetadata;\n\n LOGGER.trace(xml);\n\n if (meta.getRoot() == null) {\n throw new FormatException(\"Could not parse OME-XML from TIFF comment\");\n }\n\n String[] acquiredDates = new String[meta.getImageCount()];\n for (int i=0; i<acquiredDates.length; i++) {\n acquiredDates[i] = meta.getImageAcquiredDate(i);\n }\n\n String currentUUID = meta.getUUID();\n service.convertMetadata(meta, metadataStore);\n\n // determine series count from Image and Pixels elements\n int seriesCount = meta.getImageCount();\n core = new CoreMetadata[seriesCount];\n for (int i=0; i<seriesCount; i++) {\n core[i] = new CoreMetadata();\n }\n info = new OMETiffPlane[seriesCount][];\n\n tileWidth = new int[seriesCount];\n tileHeight = new int[seriesCount];\n\n // compile list of file/UUID mappings\n Hashtable<String, String> files = new Hashtable<String, String>();\n boolean needSearch = false;\n for (int i=0; i<seriesCount; i++) {\n int tiffDataCount = meta.getTiffDataCount(i);\n for (int td=0; td<tiffDataCount; td++) {\n String uuid = null;\n try {\n uuid = meta.getUUIDValue(i, td);\n }\n catch (NullPointerException e) { }\n String filename = null;\n if (uuid == null) {\n // no UUID means that TiffData element refers to this file\n uuid = \"\";\n filename = id;\n }\n else {\n filename = meta.getUUIDFileName(i, td);\n if (!new Location(dir, filename).exists()) filename = null;\n if (filename == null) {\n if (uuid.equals(currentUUID) || currentUUID == null) {\n // UUID references this file\n filename = id;\n }\n else {\n // will need to search for this UUID\n filename = \"\";\n needSearch = true;\n }\n }\n else filename = normalizeFilename(dir, filename);\n }\n String existing = files.get(uuid);\n if (existing == null) files.put(uuid, filename);\n else if (!existing.equals(filename)) {\n throw new FormatException(\"Inconsistent UUID filenames\");\n }\n }\n }\n\n // search for missing filenames\n if (needSearch) {\n Enumeration en = files.keys();\n while (en.hasMoreElements()) {\n String uuid = (String) en.nextElement();\n String filename = files.get(uuid);\n if (filename.equals(\"\")) {\n // TODO search...\n // should scan only other .ome.tif files\n // to make this work with OME server may be a little tricky?\n throw new FormatException(\"Unmatched UUID: \" + uuid);\n }\n }\n }\n\n // build list of used files\n Enumeration en = files.keys();\n int numUUIDs = files.size();\n HashSet fileSet = new HashSet(); // ensure no duplicate filenames\n for (int i=0; i<numUUIDs; i++) {\n String uuid = (String) en.nextElement();\n String filename = files.get(uuid);\n fileSet.add(filename);\n }\n used = new String[fileSet.size()];\n Iterator iter = fileSet.iterator();\n for (int i=0; i<used.length; i++) used[i] = (String) iter.next();\n\n // process TiffData elements\n Hashtable<String, IFormatReader> readers =\n new Hashtable<String, IFormatReader>();\n for (int i=0; i<seriesCount; i++) {\n int s = i;\n LOGGER.debug(\"Image[{}] {\", i);\n LOGGER.debug(\" id = {}\", meta.getImageID(i));\n\n String order = meta.getPixelsDimensionOrder(i).toString();\n\n PositiveInteger samplesPerPixel = null;\n if (meta.getChannelCount(i) > 0) {\n samplesPerPixel = meta.getChannelSamplesPerPixel(i, 0);\n }\n int samples = samplesPerPixel == null ? -1 : samplesPerPixel.getValue();\n int tiffSamples = firstIFD.getSamplesPerPixel();\n\n boolean adjustedSamples = false;\n if (samples != tiffSamples) {\n LOGGER.warn(\"SamplesPerPixel mismatch: OME={}, TIFF={}\",\n samples, tiffSamples);\n samples = tiffSamples;\n adjustedSamples = true;\n }\n\n if (adjustedSamples && meta.getChannelCount(i) <= 1) {\n adjustedSamples = false;\n }\n\n int effSizeC = meta.getPixelsSizeC(i).getValue().intValue();\n if (!adjustedSamples) {\n effSizeC /= samples;\n }\n if (effSizeC == 0) effSizeC = 1;\n if (effSizeC * samples != meta.getPixelsSizeC(i).getValue().intValue()) {\n effSizeC = meta.getPixelsSizeC(i).getValue().intValue();\n }\n int sizeT = meta.getPixelsSizeT(i).getValue().intValue();\n int sizeZ = meta.getPixelsSizeZ(i).getValue().intValue();\n int num = effSizeC * sizeT * sizeZ;\n\n OMETiffPlane[] planes = new OMETiffPlane[num];\n for (int no=0; no<num; no++) planes[no] = new OMETiffPlane();\n\n int tiffDataCount = meta.getTiffDataCount(i);\n boolean zOneIndexed = false;\n boolean cOneIndexed = false;\n boolean tOneIndexed = false;\n\n // pre-scan TiffData indices to see if any of them are indexed from 1\n\n for (int td=0; td<tiffDataCount; td++) {\n NonNegativeInteger firstC = meta.getTiffDataFirstC(i, td);\n NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td);\n NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td);\n int c = firstC == null ? 0 : firstC.getValue();\n int t = firstT == null ? 0 : firstT.getValue();\n int z = firstZ == null ? 0 : firstZ.getValue();\n\n if (c >= effSizeC) cOneIndexed = true;\n if (z >= sizeZ) zOneIndexed = true;\n if (t >= sizeT) tOneIndexed = true;\n }\n\n for (int td=0; td<tiffDataCount; td++) {\n LOGGER.debug(\" TiffData[{}] {\", td);\n // extract TiffData parameters\n String filename = null;\n String uuid = null;\n try {\n filename = meta.getUUIDFileName(i, td);\n } catch (NullPointerException e) {\n LOGGER.debug(\"Ignoring null UUID object when retrieving filename.\");\n }\n try {\n uuid = meta.getUUIDValue(i, td);\n } catch (NullPointerException e) {\n LOGGER.debug(\"Ignoring null UUID object when retrieving value.\");\n }\n NonNegativeInteger tdIFD = meta.getTiffDataIFD(i, td);\n int ifd = tdIFD == null ? 0 : tdIFD.getValue();\n NonNegativeInteger numPlanes = meta.getTiffDataPlaneCount(i, td);\n NonNegativeInteger firstC = meta.getTiffDataFirstC(i, td);\n NonNegativeInteger firstT = meta.getTiffDataFirstT(i, td);\n NonNegativeInteger firstZ = meta.getTiffDataFirstZ(i, td);\n int c = firstC == null ? 0 : firstC.getValue();\n int t = firstT == null ? 0 : firstT.getValue();\n int z = firstZ == null ? 0 : firstZ.getValue();\n\n // NB: some writers index FirstC, FirstZ and FirstT from 1\n if (cOneIndexed) c--;\n if (zOneIndexed) z--;\n if (tOneIndexed) t--;\n\n int index = FormatTools.getIndex(order,\n sizeZ, effSizeC, sizeT, num, z, c, t);\n int count = numPlanes == null ? 1 : numPlanes.getValue();\n if (count == 0) {\n core[s] = null;\n break;\n }\n\n // get reader object for this filename\n if (filename == null) {\n if (uuid == null) filename = id;\n else filename = files.get(uuid);\n }\n else filename = normalizeFilename(dir, filename);\n IFormatReader r = readers.get(filename);\n if (r == null) {\n r = new MinimalTiffReader();\n readers.put(filename, r);\n }\n\n Location file = new Location(filename);\n if (!file.exists()) {\n // if this is an absolute file name, try using a relative name\n // old versions of OMETiffWriter wrote an absolute path to\n // UUID.FileName, which causes problems if the file is moved to\n // a different directory\n filename =\n filename.substring(filename.lastIndexOf(File.separator) + 1);\n filename = dir + File.separator + filename;\n\n if (!new Location(filename).exists()) {\n filename = currentId;\n }\n }\n\n // populate plane index -> IFD mapping\n for (int q=0; q<count; q++) {\n int no = index + q;\n planes[no].reader = r;\n planes[no].id = filename;\n planes[no].ifd = ifd + q;\n planes[no].certain = true;\n LOGGER.debug(\" Plane[{}]: file={}, IFD={}\",\n new Object[] {no, planes[no].id, planes[no].ifd});\n }\n if (numPlanes == null) {\n // unknown number of planes; fill down\n for (int no=index+1; no<num; no++) {\n if (planes[no].certain) break;\n planes[no].reader = r;\n planes[no].id = filename;\n planes[no].ifd = planes[no - 1].ifd + 1;\n LOGGER.debug(\" Plane[{}]: FILLED\", no);\n }\n }\n else {\n // known number of planes; clear anything subsequently filled\n for (int no=index+count; no<num; no++) {\n if (planes[no].certain) break;\n planes[no].reader = null;\n planes[no].id = null;\n planes[no].ifd = -1;\n LOGGER.debug(\" Plane[{}]: CLEARED\", no);\n }\n }\n LOGGER.debug(\" }\");\n }\n\n if (core[s] == null) continue;\n\n // verify that all planes are available\n LOGGER.debug(\" --------------------------------\");\n for (int no=0; no<num; no++) {\n LOGGER.debug(\" Plane[{}]: file={}, IFD={}\",\n new Object[] {no, planes[no].id, planes[no].ifd});\n if (planes[no].reader == null) {\n LOGGER.warn(\"Image ID '{}': missing plane #{}. \" +\n \"Using TiffReader to determine the number of planes.\",\n meta.getImageID(i), no);\n TiffReader r = new TiffReader();\n r.setId(currentId);\n try {\n planes = new OMETiffPlane[r.getImageCount()];\n for (int plane=0; plane<planes.length; plane++) {\n planes[plane] = new OMETiffPlane();\n planes[plane].id = currentId;\n planes[plane].reader = r;\n planes[plane].ifd = plane;\n }\n num = planes.length;\n }\n finally {\n r.close();\n }\n }\n }\n LOGGER.debug(\" }\");\n\n // populate core metadata\n info[s] = planes;\n try {\n if (!info[s][0].reader.isThisType(info[s][0].id)) {\n info[s][0].id = currentId;\n }\n for (int plane=0; plane<info[s].length; plane++) {\n if (!info[s][plane].reader.isThisType(info[s][plane].id)) {\n info[s][plane].id = info[s][0].id;\n }\n }\n\n info[s][0].reader.setId(info[s][0].id);\n tileWidth[s] = info[s][0].reader.getOptimalTileWidth();\n tileHeight[s] = info[s][0].reader.getOptimalTileHeight();\n\n core[s].sizeX = meta.getPixelsSizeX(i).getValue().intValue();\n int tiffWidth = (int) firstIFD.getImageWidth();\n if (core[s].sizeX != tiffWidth) {\n LOGGER.warn(\"SizeX mismatch: OME={}, TIFF={}\",\n core[s].sizeX, tiffWidth);\n }\n core[s].sizeY = meta.getPixelsSizeY(i).getValue().intValue();\n int tiffHeight = (int) firstIFD.getImageLength();\n if (core[s].sizeY != tiffHeight) {\n LOGGER.warn(\"SizeY mismatch: OME={}, TIFF={}\",\n core[s].sizeY, tiffHeight);\n }\n core[s].sizeZ = meta.getPixelsSizeZ(i).getValue().intValue();\n core[s].sizeC = meta.getPixelsSizeC(i).getValue().intValue();\n core[s].sizeT = meta.getPixelsSizeT(i).getValue().intValue();\n core[s].pixelType = FormatTools.pixelTypeFromString(\n meta.getPixelsType(i).toString());\n int tiffPixelType = firstIFD.getPixelType();\n if (core[s].pixelType != tiffPixelType) {\n LOGGER.warn(\"PixelType mismatch: OME={}, TIFF={}\",\n core[s].pixelType, tiffPixelType);\n core[s].pixelType = tiffPixelType;\n }\n core[s].imageCount = num;\n core[s].dimensionOrder = meta.getPixelsDimensionOrder(i).toString();\n\n // hackish workaround for files exported by OMERO that have an\n // incorrect dimension order\n String uuidFileName = \"\";\n try {\n if (meta.getTiffDataCount(i) > 0) {\n uuidFileName = meta.getUUIDFileName(i, 0);\n }\n }\n catch (NullPointerException e) { }\n if (meta.getChannelCount(i) > 0 && meta.getChannelName(i, 0) == null &&\n meta.getTiffDataCount(i) > 0 &&\n uuidFileName.indexOf(\"__omero_export\") != -1)\n {\n core[s].dimensionOrder = \"XYZCT\";\n }\n\n core[s].orderCertain = true;\n PhotoInterp photo = firstIFD.getPhotometricInterpretation();\n core[s].rgb = samples > 1 || photo == PhotoInterp.RGB;\n if ((samples != core[s].sizeC && (samples % core[s].sizeC) != 0 &&\n (core[s].sizeC % samples) != 0) || core[s].sizeC == 1 ||\n adjustedSamples)\n {\n core[s].sizeC *= samples;\n }\n\n if (core[s].sizeZ * core[s].sizeT * core[s].sizeC >\n core[s].imageCount && !core[s].rgb)\n {\n if (core[s].sizeZ == core[s].imageCount) {\n core[s].sizeT = 1;\n core[s].sizeC = 1;\n }\n else if (core[s].sizeT == core[s].imageCount) {\n core[s].sizeZ = 1;\n core[s].sizeC = 1;\n }\n else if (core[s].sizeC == core[s].imageCount) {\n core[s].sizeT = 1;\n core[s].sizeZ = 1;\n }\n }\n\n if (meta.getPixelsBinDataCount(i) > 1) {\n LOGGER.warn(\"OME-TIFF Pixels element contains BinData elements! \" +\n \"Ignoring.\");\n }\n core[s].littleEndian = firstIFD.isLittleEndian();\n core[s].interleaved = false;\n core[s].indexed = photo == PhotoInterp.RGB_PALETTE &&\n firstIFD.getIFDValue(IFD.COLOR_MAP) != null;\n if (core[s].indexed) {\n core[s].rgb = false;\n }\n core[s].falseColor = true;\n core[s].metadataComplete = true;\n }\n catch (NullPointerException exc) {\n throw new FormatException(\"Incomplete Pixels metadata\", exc);\n }\n }\n\n // remove null CoreMetadata entries\n\n Vector<CoreMetadata> series = new Vector<CoreMetadata>();\n Vector<OMETiffPlane[]> planeInfo = new Vector<OMETiffPlane[]>();\n for (int i=0; i<core.length; i++) {\n if (core[i] != null) {\n series.add(core[i]);\n planeInfo.add(info[i]);\n }\n }\n core = series.toArray(new CoreMetadata[series.size()]);\n info = planeInfo.toArray(new OMETiffPlane[0][0]);\n\n MetadataTools.populatePixels(metadataStore, this, false, false);\n for (int i=0; i<acquiredDates.length; i++) {\n if (acquiredDates[i] != null) {\n metadataStore.setImageAcquiredDate(acquiredDates[i], i);\n }\n }\n metadataStore = getMetadataStoreForConversion();\n }", "@Override\n\tpublic int getFileStatus() {\n\t\treturn 0;\n\t}", "public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }", "public boolean isFirst() {\n\t\treturn first;\n\t}", "public abstract File mo41087j();", "public void mo83570c() {\n File[] listFiles;\n File file = new File(this.f60297d);\n if (file.isDirectory() && (listFiles = file.listFiles()) != null && listFiles.length >= this.f60294a) {\n Arrays.sort(listFiles, this.f60295b);\n for (int i = 0; i < listFiles.length && listFiles.length >= this.f60294a; i++) {\n File file2 = listFiles[i];\n if (!this.f60299f.contains(file2)) {\n ArgusLogger.m85574b(String.format(C6969H.m41409d(\"G4D8AC619BE22AF20E809D047FEE1C6C47DC3D008AD3FB969E71DD05BE6EAD1D26DC3D008AD3FB969EA079D41E6A5D1D26880DD1FBB70E36CF547\"), file2.getPath()));\n mo83569b(Collections.singleton(file2));\n }\n }\n }\n }", "public long getFileIndex(){\n \tString fileName=file.getName();\n// \tSystem.out.println(\"fileName:\"+fileName);\n \tfinal long start = Long.parseLong(fileName.substring(0,\n\t\t\t\tfileName.length() - FILE_SUFFIX.length()));\n// \tSystem.out.println(\"start:\"+start);\n \treturn start;\n }", "public String getFileName()\r\n/* 11: */ {\r\n/* 12:45 */ return this.fileName;\r\n/* 13: */ }", "public LinkedListItr first( )\n {\n return new LinkedListItr( header.next );\n }", "public static YFiles FirstFiles()\n {\n YAPIContext yctx = YAPI.GetYCtx(false);\n if (yctx == null) return null;\n String next_hwid = yctx._yHash.getFirstHardwareId(\"Files\");\n if (next_hwid == null) return null;\n return FindFilesInContext(yctx, next_hwid);\n }", "void loadNextSplit() throws IOException {\n\t\tcurrentRAF = null;\n\t\t\n\t\tif (! fsIterator.hasNext()) return;\n\n\t\t// Go through the loop for one iteration loop cycle only\n\t\tint cycle = fsIterator.cycle();\n\n\t\twhile (cycle > 0) {\n\t\t\tfsIterator.next();\n\t\t\tloadNextSplitCurrentDir();\n\t\t\tif (hasNext()) \n\t\t\t\tbreak;\n\t\t\tcycle --;\n\t\t}\n\t\t\n\t}", "@Override\n\t\t\t\tpublic void run() \n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"reading..\" +next.getFileName());\n\t\t\t\t\ttry \n\t\t\t\t\t{\n\t\t\t\t\t//ts1.finalWrite(next.getFileName(),(int)file.length());\n\t\t\t\t\t\t\tInputStream in = new FileInputStream(readFile);\n\t\t\t\t\t\t\tint i;\n\t\t\t\t\t\t\tint fileNameLength =readFile.length();\n\t\t\t\t\t\t\tlong fileLength = file.length();\n\t\t\t\t\t\t\tlong total = (2+fileNameLength+fileLength);\n\t\t\t\t\t\t\t//System.out.println(\"toal length\" +total);\n\t\t\t\t\t\t\tqu.put((byte)total);\n\t\t\t\t\t\t\tqu.put((byte)readFile.length()); // file name length\n\t\t\t\t\t\t\tqu.put((byte)file.length()); //file content length\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor(int j=0;j<readFile.length();j++)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)readFile.charAt(j)); //writing file Name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\twhile((i=in.read())!=-1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tqu.put((byte)i);\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tin.close();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (IOException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t\tcatch (InterruptedException e) \n\t\t\t\t\t{\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}", "private String nakedFileName() {\n return f.getName().split(\"\\\\.\")[0];\n }", "protected abstract int getFirstFrag();", "@Override\n\tprotected String getFileName() {\n\t\treturn null;\n\t}", "public T caseFile(File object) {\n\t\treturn null;\n\t}", "public abstract File mo41088k();", "void checkFirstRecord(int code, int lineCount) {\n if (lineCount == 1) {\n outputError(lineCount + \" - Fatal - \" +\n \"Load file must start with a code 01 record. \" +\n \"This record is code: \" + code);\n } // if (lineCount == 1)\n }", "protected void initFile(String id) throws FormatException, IOException {\n super.initFile(id);\n in = new RandomAccessFile(id, \"r\");\n \n // initialize an array containing tag offsets, so we can\n // use an O(1) search instead of O(n) later.\n // Also determine whether we will be reading color or grayscale\n // images\n \n //in.seek(0);\n byte[] toRead = new byte[4];\n in.read(toRead);\n long order = batoi(toRead); // byte ordering\n little = toRead[2] != 0xff || toRead[3] != 0xff;\n \n toRead = new byte[4];\n Vector v = new Vector(); // a temp vector containing offsets.\n \n // Get first offset.\n in.seek(16);\n in.read(toRead);\n int nextOffset = batoi(toRead);\n int nextOffsetTemp;\n \n boolean first = true;\n while(nextOffset != 0) {\n in.seek(nextOffset + 4);\n in.read(toRead);\n // get next tag, but still need this one\n nextOffsetTemp = batoi(toRead);\n in.read(toRead);\n if ((new String(toRead)).equals(\"PICT\")) {\n boolean ok = true;\n if (first) {\n // ignore first image if it is called \"Original Image\" (pure white)\n first = false;\n in.skipBytes(47);\n byte[] layerNameBytes = new byte[127];\n in.read(layerNameBytes);\n String layerName = new String(layerNameBytes);\n if (layerName.startsWith(\"Original Image\")) ok = false;\n }\n if (ok) v.add(new Integer(nextOffset)); // add THIS tag offset\n }\n if (nextOffset == nextOffsetTemp) break;\n nextOffset = nextOffsetTemp;\n }\n \n in.seek(((Integer) v.firstElement()).intValue());\n \n // create and populate the array of offsets from the vector\n numBlocks = v.size();\n offsets = new int[numBlocks];\n for (int i = 0; i < numBlocks; i++) {\n offsets[i] = ((Integer) v.get(i)).intValue();\n }\n \n // populate the imageTypes that the file uses\n toRead = new byte[2];\n imageType = new int[numBlocks];\n for (int i = 0; i < numBlocks; i++) {\n in.seek(offsets[i]);\n in.skipBytes(40);\n in.read(toRead);\n imageType[i] = batoi(toRead);\n }\n \n initMetadata();\n }", "@Override\n public HashMap initFileSet()\n {\n return null;\n }", "@Override\n\tpublic int InsertFile(MyFile file) {\n\t\tint i=fdi.InsertFile(file);\n\t\treturn i;\n\t}", "public String getFileName() {\n/* 43:43 */ return this.fileName;\n/* 44: */ }", "private void gatherFile(FileStatus[] fstat)\r\n\t{\r\n\t inputSize = 0;\t\r\n\t paths = new Path[fstat.length];\t\r\n\t for(int i=0;i<fstat.length;i++)\r\n\t {\r\n\t inputSize+=fstat[i].getLen();\r\n\t paths[i] = fstat[i].getPath();\r\n\t }\r\n\t }", "void citire(FileReader f);", "private FileManager()\n {\n bookFile.open(\"bookdata.txt\");\n hisFile.open(\"history.txt\");\n idFile.open(\"idpassword.txt\");\n createIDMap();\n createHisMap(Customer.getInstance());\n }", "void setFile(String i) {\n file = i;\n }", "protected void startNextSound() {\n\t\tsoundIndex = (soundIndex < audioFiles.length - 1) ? soundIndex + 1 : 0;\t\n\t\tString nextSoundId = audioFiles[soundIndex];\n\t\tstartPlayer(nextSoundId);\n\t}", "void singleModeLoading( File dataPath, File resultsPath, int scenarioNumber );", "public void startInfo(Document src);", "@Test\r\n\tpublic void testSampleFile() {\r\n\r\n\t\tRaceList rl = null;\r\n\t\trl = WolfResultsReader.readRaceListFile(\"test-files/sample.md\");\r\n\t\tassertEquals(2, rl.size());\r\n\r\n\t}", "@Override\n public boolean visit(File file)\n {\n return true;\n }", "public static String head(File file, Integer n) {\n\t\ttry {\n\t\t\tInputStream is = new FileInputStream(file);\n\t\t\treturn head(is, n);\n\t\t} catch (Exception exp) {\n\t\t\tthrow new RuntimeException(exp);\n\t\t}\n\t}", "@Override\r\n public Object next() {\r\n if (this.hasNext()) {\r\n Object temp = this.nextMatchingFile;\r\n this.nextMatchingFile = this.callNext();\r\n return temp;\r\n } else {\r\n throw new NoSuchElementException(\"There is no other file object in the directory.\");\r\n }\r\n}", "public String getFirstLine() {\r\n return this.firstLine;\r\n }", "public FirstRun( ) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "public abstract String getFileLocation();", "@Override\n protected String getFileName() {\n return null;\n }", "@Override\n protected String getFileName() {\n return null;\n }", "@Override\n protected String getFileName() {\n return null;\n }", "public EditFile() {\r\n\t\tsuper();\r\n\t}", "@Override\r\n\tpublic void initialLoad() throws IOException {\n\t\t\r\n\t}", "public void changeHeaderFile(){\n if ( changedAttr.isEmpty() ) return;\n else {\n Set<Object> tmpAttr = changedAttr.keySet();\n Object[] attributes = tmpAttr.toArray(new Object[tmpAttr.size()]);\n for (int i = 0; i < attributes.length; i++){\n if ( headerFile.containsKey(attributes[i]) ) {\n headerFile.put(attributes[i], changedAttr.get(attributes[i]));\n // DeidData.imageHandler.findImageByDisplayName(curimage.getImageDisplayName())\n // .getHeader().put(attributes[i], changedAttr.get(attributes[i]));\n curimage.getHeader().put(attributes[i], changedAttr.get(attributes[i]));\n //System.out.println(curimage.getHeader().get(attributes[i]));\n }\n }\n curimage.changeHeader();\n \n }\n }", "@Override\n\t\tpublic FileInputStream nextElement() {\n\t\t\treturn fileStreams[index++];\n\t\t}", "protected void initFile(String id) throws FormatException, IOException {\n super.initFile(id);\n in = new RandomAccessInputStream(id);\n\n String endian = in.readString(2);\n boolean little = endian.equals(\"II\");\n in.order(little);\n\n in.seek(98);\n int seriesCount = in.readInt();\n\n in.seek(192);\n while (in.read() == 0);\n String description = in.readCString();\n addGlobalMeta(\"Description\", description);\n\n while (in.readInt() == 0);\n\n long fp = in.getFilePointer();\n if ((fp % 2) == 0) fp -= 4;\n else fp--;\n\n offsets = new long[seriesCount];\n core = new CoreMetadata[seriesCount];\n for (int i=0; i<seriesCount; i++) {\n in.seek(fp + i*256);\n core[i] = new CoreMetadata();\n core[i].littleEndian = little;\n core[i].sizeX = in.readInt();\n core[i].sizeY = in.readInt();\n int numBits = in.readInt();\n core[i].sizeC = in.readInt();\n core[i].sizeZ = in.readInt();\n core[i].sizeT = in.readInt();\n\n core[i].imageCount = core[i].sizeZ * core[i].sizeC * core[i].sizeT;\n int nBytes = numBits / 8;\n core[i].pixelType =\n FormatTools.pixelTypeFromBytes(nBytes, false, nBytes == 8);\n\n core[i].dimensionOrder = \"XYCZT\";\n core[i].rgb = false;\n\n in.skipBytes(4);\n\n long pointer = in.getFilePointer();\n String name = in.readCString();\n\n if (i == 0) {\n in.skipBytes((int) (92 - in.getFilePointer() + pointer));\n while (true) {\n int check = in.readInt();\n if (check > in.getFilePointer()) {\n offsets[i] = (long) check + LUT_SIZE;\n break;\n }\n in.skipBytes(92);\n }\n }\n else {\n offsets[i] = offsets[i - 1] + core[i - 1].sizeX * core[i - 1].sizeY *\n core[i - 1].imageCount *\n FormatTools.getBytesPerPixel(core[i - 1].pixelType);\n }\n offsets[i] += 352;\n in.seek(offsets[i]);\n while (in.getFilePointer() + 116 < in.length() && in.read() == 3 &&\n in.read() == 37)\n {\n in.skipBytes(114);\n offsets[i] = in.getFilePointer();\n }\n in.seek(in.getFilePointer() - 1);\n byte[] buf = new byte[3 * 1024 * 1024];\n int n = in.read(buf, 0, 1);\n boolean found = false;\n while (!found && in.getFilePointer() < in.length()) {\n n += in.read(buf, 1, buf.length - 1);\n for (int q=0; q<buf.length - 1; q++) {\n if ((buf[q] & 0xff) == 192 && (buf[q + 1] & 0xff) == 46) {\n offsets[i] = in.getFilePointer() - n + q;\n found = true;\n break;\n }\n }\n buf[0] = buf[buf.length - 1];\n n = 1;\n }\n if (found) offsets[i] += 16063;\n if (i == offsets.length - 1 && !compressed && i > 0) {\n offsets[i] = (int) (in.length() -\n (core[i].sizeX * core[i].sizeY * core[i].imageCount * (numBits / 8)));\n }\n }\n\n MetadataStore store = makeFilterMetadata();\n MetadataTools.populatePixels(store, this);\n MetadataTools.setDefaultCreationDate(store, id, 0);\n }", "public File_Delet() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void setup(Context context){\n\t\tfileName = ((FileSplit) context.getInputSplit()).getPath().getName();\n\t}", "public void start(String filenameA , String filenameB){\n\t\t\n\t\t// READ DATA\n\t\treadKeyDataToIdentifyTransactions();\n\t\treadDataFromUserLog(userData,filenameA);\n\t\treadDataFromUserLog(userData,filenameB);\n\t\t\n\t\t//Enable the below to print the data read from the files\n\t\t//printData(userData);\n\t\t\t\t\n\t\t// ADD DATA TO RESPECTIVE SETS\n\t\tcategorizeData();\t\t\n\t\t\t\n\t\t// GIVE RECOMMENDATION\n\t\tprintRecommendation();\n\t}", "void loadNextSplitCurrentDir() throws IOException {\n\t\tCollection<File> files = fsIterator.getFiles();\n\t\n\t\tif (files == null || files.size() == 0)\n\t\t\treturn;\n\t\t\n\t\tIterator<File> it = files.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tFile file = it.next();\n\t\t\tRandomAccessFile raf = openedRAFs.get(file.getAbsolutePath());\n\t\t\tif (raf == null) {\n\t\t\t\ttry {\n\t\t\t\t\traf = new RandomAccessFile(file, \"r\");\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\t//e.printStackTrace();\n\t\t\t\t\t// TODO: show warning that the file cannot be read\n\t\t\t\t\tit.remove();\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tRandomAccessFile old = \n\t\t\t\t\t\topenedRAFs.put(file.getAbsolutePath(), raf);\n\t\t\t\tif (old != null)\n\t\t\t\t\told.close();\n\t\t\t}\n\t\t\t\n\t\t\tlong begin = splitter.splitBegin(raf);\n\t\t\tif (begin == -1) {\n\t\t\t\traf.close();\n\t\t\t\tit.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\traf.seek(begin);\n\t\t\t\n\t\t\tlong end = splitter.splitEnd(raf, blocksize);\n\t\t\t\n\t\t\tif (begin == end) {\n\t\t\t\traf.close();\n\t\t\t\tit.remove();\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\traf.seek(end);\n\t\t\t\n\t\t\tcurrentRAF = new RandomAccessFile(file, \"r\");\n\t\t\tcurrentRAF.seek(begin);\n\t\t\tcurrentLength = end - begin;\n\t\t\t\n\t\t\tlogger.debug(String.format(\"Generated Split. %s %d %d\",\n\t\t\t\t\tfile.getAbsolutePath(), begin, end));\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t}", "public void afficherFile() {\r\n\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"Voici la File (tete a gauche, queue a droite): \");\r\n\t\tSystem.out.println(\"----------------------------------------------\");\r\n\r\n\t\tif (this.estVide() == true) {\r\n\r\n\t\t\tSystem.out.println();\r\n\t\t} else {\r\n\r\n\t\t\tCellule<T> ref = this.tete;\r\n\r\n\t\t\tfor (int i = 1; i <= this.getLongueurFile(); i++) {\r\n\r\n\t\t\t\tSystem.out.print(ref.getValeur() + \" \");\r\n\r\n\t\t\t\tif (ref.getSuivant() != null) {\r\n\r\n\t\t\t\t\tref = ref.getSuivant();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println();\r\n\t}", "@Override\r\n public FirstElement documentBodyParse(String filePath) {\n return null;\r\n }", "private void initializeFile() {\n\t\twriter.println(\"name \\\"advcalc\\\"\");\n\t\twriter.println(\"org 100h\");\n\t\twriter.println(\"jmp start\");\n\t\tdeclareArray();\n\t\twriter.println(\"start:\");\n\t\twriter.println(\"lea si, \" + variables);\n\t}", "protected void readHeader() {\n // Denote no lines have been read.\n this.lineCount = 0;\n // Read the header.\n if (! this.reader.hasNext()) {\n // Here the entire file is empty. Insure we get EOF on the first read.\n this.nextLine = null;\n } else {\n this.headerLine = this.reader.next();\n // Parse the header line into labels and normalize them to lower case.\n this.labels = this.splitLine(headerLine);\n // Set up to return the first data line.\n this.readAhead();\n }\n }", "public void read() {\n String line = \"\";\n int counter = 0;\n try {\n input = new BufferedReader(new FileReader(file));\n while (line != null) {\n if (!(line.equals(\"arglebargle\"))) {//not a default\n names.add(line);\n }\n }\n input.close();\n }\n catch (IOException e) {\n }\n }", "@Override\n\tpublic void doStuff(File fileName) {\n\t\tScanner s;\n\t\tint lineTotal=0;\n\t\ttry {\n\t\t\ts = new Scanner(fileName);\n\t\t\twhile(s.hasNext()){\n\t\t\t\ts.nextLine();\n\t\t\t\tlineTotal++;\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tif(lineTotal>0){\n\t\t\tInteger i = lineTotal;\n\t\t\tmap.put(fileName, i);\n\t\t}\n\t}", "@Override\r\n public List<FirstElement> documentBodyParse(String filePath, int subLength, int subSum) {\n return null;\r\n }", "@Override\n public void updateFirstHeader() {\n padToCacheAlign();\n long pos = bytes.writePosition();\n updateFirstHeader(pos);\n }", "public void incFileCount(){\n\t\tthis.num_files++;\n\t}", "myFile(String Name){\n\t this.FileName = Name + \".txt\"\t;\n\t System.out.println(FileName);\n\t try {\n\t\treadFile() ;\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t\tSystem.out.println(\"No,This File Please run again\"); \n\t}\n\t}", "private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}" ]
[ "0.6637358", "0.6200717", "0.6126492", "0.6111677", "0.59671056", "0.59426564", "0.5877673", "0.58638906", "0.5843408", "0.5830857", "0.5771125", "0.5762768", "0.57617515", "0.5750612", "0.5724387", "0.5721598", "0.56951535", "0.56761587", "0.5666857", "0.56577724", "0.5656084", "0.5655501", "0.5640418", "0.56122375", "0.5573593", "0.55564624", "0.55562973", "0.554596", "0.5544131", "0.5538145", "0.55324084", "0.55314296", "0.5507123", "0.5484253", "0.5478337", "0.5467745", "0.5463249", "0.54610956", "0.544582", "0.5445492", "0.54363513", "0.5421754", "0.5411225", "0.5408211", "0.54030615", "0.539941", "0.53968614", "0.53833646", "0.5376456", "0.5373028", "0.53693104", "0.5368976", "0.53615", "0.53613985", "0.5357705", "0.53546923", "0.53466004", "0.5342603", "0.53387225", "0.5331582", "0.5327348", "0.5325278", "0.5318192", "0.5317455", "0.53115386", "0.53093183", "0.53030664", "0.5297473", "0.5292875", "0.5292791", "0.5289212", "0.5288654", "0.5280441", "0.52799547", "0.527644", "0.5274044", "0.5271884", "0.52678317", "0.525393", "0.525393", "0.525393", "0.52452457", "0.5240375", "0.52330655", "0.52311504", "0.5219802", "0.52197576", "0.52115065", "0.5209728", "0.52096796", "0.52092695", "0.5203206", "0.519906", "0.5194781", "0.51922816", "0.51900935", "0.51897126", "0.5185696", "0.5184327", "0.517446", "0.5163072" ]
0.0
-1
Tests the equals and unequals operation for constraints.
@Test public void testEquals() throws ValueDoesNotMatchTypeException { TestEvaluationContext context = new TestEvaluationContext(); DecisionVariableDeclaration decl = new DecisionVariableDeclaration("x", IntegerType.TYPE, null); ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0)); ConstraintSyntaxTree cst1 = new OCLFeatureCall( new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0); ConstraintSyntaxTree cst2 = new OCLFeatureCall( new Variable(decl), IntegerType.GREATER_EQUALS_INTEGER_INTEGER.getName(), c0); EvaluationAccessor val1 = Utils.createValue(ConstraintType.TYPE, context, cst1); EvaluationAccessor val2 = Utils.createValue(ConstraintType.TYPE, context, cst2); EvaluationAccessor nullV = Utils.createNullValue(context); // equals is useless and will be tested in the EvaluationVisitorTest Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val1); Utils.testEquals(true, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val2); Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, val2); Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, val1); Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val1, nullV); Utils.testEquals(false, ConstraintType.EQUALS, ConstraintType.UNEQUALS, val2, nullV); val1.release(); val2.release(); nullV.release(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Equality createEquality();", "public void testEquals()\n {\n // test passing null to equals returns false\n // (as specified in the JDK docs for Object)\n EthernetAddress x =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"equals(null) didn't return false\",\n x.equals((Object)null));\n \n // test passing an object which is not a EthernetAddress returns false\n assertFalse(\"x.equals(non_EthernetAddress_object) didn't return false\",\n x.equals(new Object()));\n \n // test a case where two EthernetAddresss are definitly not equal\n EthernetAddress w =\n new EthernetAddress(ANOTHER_VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == w didn't return false\",\n x == w);\n assertFalse(\"x.equals(w) didn't return false\",\n x.equals(w));\n\n // test refelexivity\n assertTrue(\"x.equals(x) didn't return true\",\n x.equals(x));\n \n // test symmetry\n EthernetAddress y =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"y.equals(x) didn't return true\",\n y.equals(x));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n \n // now we'll test transitivity\n EthernetAddress z =\n new EthernetAddress(VALID_ETHERNET_ADDRESS_BYTE_ARRAY);\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertFalse(\"x == y didn't return false\",\n y == z);\n assertFalse(\"x == y didn't return false\",\n x == z);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"y.equals(z) didn't return true\",\n y.equals(z));\n assertTrue(\"x.equals(z) didn't return true\",\n x.equals(z));\n \n // test consistancy (this test is just calling equals multiple times)\n assertFalse(\"x == y didn't return false\",\n x == y);\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n assertTrue(\"x.equals(y) didn't return true\",\n x.equals(y));\n }", "@Test\n @DisplayName(\"Test should detect inequality between unequal states.\")\n public void testShouldResultInInequality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Goodbye\");\n\n Assertions.assertThat(os1).isNotEqualTo(os2);\n }", "@Test\n public void testEquals() {\n Term t1 = structure(\"abc\", atom(\"a\"), atom(\"b\"), atom(\"c\"));\n Term t2 = structure(\"abc\", integerNumber(), decimalFraction(), variable());\n PredicateKey k1 = PredicateKey.createForTerm(t1);\n PredicateKey k2 = PredicateKey.createForTerm(t2);\n testEquals(k1, k2);\n }", "@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }", "boolean equivalent(Concept x, Concept y);", "@Test\n @DisplayName(\"Test should detect equality between equal states.\")\n public void testShouldResultInEquality() {\n ObjectBag os1 = new ObjectBag(null, \"Hi\");\n ObjectBag os2 = new ObjectBag(null, \"Hi\");\n\n Assertions.assertThat(os1).isEqualTo(os2);\n }", "@Test\n public void testSpecificationEqualsContract() {\n EqualsVerifier.forClass(PdfaSpecificationImpl.class).verify();\n }", "boolean canEqual(Object obj);", "@Test\n public void testEquals_sameParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are equivalent\n assertThat(cellIdentityNr).isEqualTo(anotherCellIdentityNr);\n }", "@Test\n\tpublic void testEqualityCheck() {\n\t\tadd(\"f(x)=x^3\");\n\t\tadd(\"g(x)=-x^3\");\n\t\tt(\"f==g\", \"false\");\n\t\tt(\"f!=g\", \"true\");\n\t\tt(\"f==-g\", \"true\");\n\t\tt(\"f!=-g\", \"false\");\n\t}", "protected boolean isEqual( Object lhs, Object rhs ){\r\n\t\tboolean x = lhs==null;\r\n\t\tboolean y = rhs == null;\r\n\t\t//XOR OPERATOR, only one is null\r\n\t\tif ((x || y) && !(x && y))\r\n\t\t\treturn false;\r\n\t\tif (lhs.equals(rhs))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "protected abstract boolean isEqual(E entryA, E entryB);", "public static boolean proveEquality(Tableau tableau) {\n boolean retVal = expandAllAlphas(tableau);\n // Deltas\n retVal = expandAllDeltas(tableau) || retVal;\n // Brown's rule\n retVal = tableau.applyAllBrowns() || retVal;\n // Beta or Gamma\n if (expandOneBeta(tableau))\n return true;\n if (Prover.unifyEquality(tableau) != null)\n return false;\n return expandOneGamma(tableau) || retVal;\n }", "protected abstract boolean equalityTest(Object key, Object key2);", "private boolean constraintChecker(Norm norm1, Norm norm2) {\n\t\tif (norm1.getActivationConstraint() == null || norm1.getDeactivationConstraint() == null ||\n\t\t\tnorm2.getActivationConstraint() == null || norm2.getDeactivationConstraint() == null) {\n\t\t\t\n\t\t\tnorm1.setActivationConstraint(null);\n\t\t\tnorm2.setActivationConstraint(null);\n\t\t\tnorm1.setDeactivationConstraint(null);\n\t\t\tnorm2.setDeactivationConstraint(null);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tConstraintType na1 = norm1.getActivationConstraint().getConstraintType();\n\t\tConstraintType nd1 = norm1.getDeactivationConstraint().getConstraintType();\n\t\t\n\t\tConstraintType na2 = norm2.getActivationConstraint().getConstraintType();\n\t\tConstraintType nd2 = norm2.getDeactivationConstraint().getConstraintType();\n\t\t\n\t\t//it is necessary only 3 tests\n\t\tif (!na1.equals(nd1) || !na2.equals(nd2) || !na1.equals(na2)) {\n\t\t\tnorm1.setActivationConstraint(null);\n\t\t\tnorm2.setActivationConstraint(null);\n\t\t\tnorm1.setDeactivationConstraint(null);\n\t\t\tnorm2.setDeactivationConstraint(null);\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t// If the activation conditions are actions\n\t\tif (norm1.getActivationConstraint().getConstraintType().equals(ConstraintType.ACTIONTYPE)\n\t\t\t\t&& norm1.getActivationConstraint().getConstraintType().equals(ConstraintType.ACTIONTYPE)) {\n\n\t\t\t//todo...o tratamento vai ser realizado no futuro, caso necessário\n\t\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t//\n\t\t//at this moment the constrainttype are both DATETYPE, so it is not necessary more comparisons\n\t\t//\n\t\t\n\t\tDateTime d1Begin = ((ConstraintDate) norm1.getActivationConstraint()).getDate();\n\t\tDateTime d1End = ((ConstraintDate) norm1.getDeactivationConstraint()).getDate();\n\t\tDateTime d2Begin = ((ConstraintDate) norm2.getActivationConstraint()).getDate();\n\t\tDateTime d2End = ((ConstraintDate) norm2.getDeactivationConstraint()).getDate();\n\t\t\n\t\tboolean r = this.compareDateIntervals(d1Begin, d1End, d2Begin, d2End);\n\t\treturn r;\n\t}", "@Test\n public void equals() {\n Plan aliceCopy = new PersonBuilder(ALICE).build();\n assertTrue(ALICE.equals(aliceCopy));\n\n // same object -> returns true\n assertTrue(ALICE.equals(ALICE));\n\n // null -> returns false\n assertFalse(ALICE.equals(null));\n\n // different type -> returns false\n assertFalse(ALICE.equals(5));\n\n // different plan -> returns false\n assertFalse(ALICE.equals(BOB));\n\n // different name -> returns false\n Plan editedAlice = new PersonBuilder(ALICE).withName(VALID_NAME_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different address -> returns false\n editedAlice = new PersonBuilder(ALICE).withAddress(VALID_ADDRESS_BOB).build();\n assertFalse(ALICE.equals(editedAlice));\n\n // different tags -> returns false\n editedAlice = new PersonBuilder(ALICE).withTags(VALID_TAG_HUSBAND).build();\n assertFalse(ALICE.equals(editedAlice));\n }", "@Test\n public void testEquals_differentParameters() {\n CellIdentityNr cellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI,\n ALPHAL, ALPHAS, Collections.emptyList());\n CellIdentityNr anotherCellIdentityNr =\n new CellIdentityNr(PCI, TAC, NRARFCN, BANDS, MCC_STR, MNC_STR, NCI + 1,\n ALPHAL, ALPHAS, Collections.emptyList());\n\n // THEN this two objects are different\n assertThat(cellIdentityNr).isNotEqualTo(anotherCellIdentityNr);\n }", "@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}", "public abstract boolean equals(Object o);", "@Test\n\tpublic void testEqualsVerdadeiro() {\n\t\t\n\t\tassertTrue(contato1.equals(contato3));\n\t}", "@Test\n void compareTo_Identical_AllParts()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.yes, AnswerType.yes, ContactMatchType.Identical);\n }", "public interface Equality extends Clause {}", "@SuppressWarnings({\"UnnecessaryLocalVariable\"})\n @Test\n void testEqualsAndHashCode(SoftAssertions softly) {\n SortOrder sortOrder0 = new SortOrder(\"i0\", true, false, true);\n SortOrder sortOrder1 = sortOrder0;\n SortOrder sortOrder2 = new SortOrder(\"i0\", true, false, true);\n\n softly.assertThat(sortOrder0.hashCode()).isEqualTo(sortOrder2.hashCode());\n //noinspection EqualsWithItself\n softly.assertThat(sortOrder0.equals(sortOrder0)).isTrue();\n //noinspection ConstantConditions\n softly.assertThat(sortOrder0.equals(sortOrder1)).isTrue();\n softly.assertThat(sortOrder0.equals(sortOrder2)).isTrue();\n\n SortOrder sortOrder3 = new SortOrder(\"i1\", true, false, true);\n softly.assertThat(sortOrder0.equals(sortOrder3)).isFalse();\n\n //noinspection EqualsBetweenInconvertibleTypes\n softly.assertThat(sortOrder0.equals(new SortOrders())).isFalse();\n }", "private void checkNeqContradictions(HashMap<ComparableExpression, HashSet<ComparableExpression>> cNeq,\n HashMap<TimeSelector, Long> lowerBounds,\n HashMap<TimeSelector, Long> upperBounds)\n throws QueryContradictoryException {\n ArrayList<ArrayList<ComparableExpression>> neq = relationToTuples(cNeq);\n for (ArrayList<ComparableExpression> tuple : neq) {\n if (tuple.get(0) instanceof TimeSelector) {\n TimeSelector sel = (TimeSelector) tuple.get(0);\n // if lower(sel)!=upper(sel), no constraint sel!=x is contradictory\n if (!lowerBounds.get(sel).equals(upperBounds.get(sel))) {\n return;\n }\n // selector1 != selector2 only contradictory if both selectors have the same fixed value\n // (lower(selector1)=upper(selector1)=lower(selector2)=upper(selector2)\n if (tuple.get(1) instanceof TimeSelector) {\n TimeSelector sel2 = (TimeSelector) tuple.get(1);\n if (lowerBounds.get(sel).equals(lowerBounds.get(sel2)) &&\n lowerBounds.get(sel2).equals(upperBounds.get(sel2))) {\n throw new QueryContradictoryException();\n } // selector != literal only contradictory if lower(selector)=upper(selector)=literal\n } else if (tuple.get(1) instanceof TimeLiteral) {\n Long literalValue = ((TimeLiteral) tuple.get(1)).getMilliseconds();\n if (lowerBounds.get(sel).equals(literalValue)) {\n throw new QueryContradictoryException();\n }\n }\n } else if (tuple.get(0) instanceof TimeLiteral && tuple.get(1) instanceof TimeSelector) {\n // selector != literal only contradictory if lower(selector)=upper(selector)=literal\n TimeSelector sel = (TimeSelector) tuple.get(1);\n Long literalValue = ((TimeLiteral) tuple.get(0)).getMilliseconds();\n if (lowerBounds.get(sel).equals(upperBounds.get(sel)) && lowerBounds.get(sel).equals(literalValue)) {\n throw new QueryContradictoryException();\n }\n }\n }\n }", "@Test\r\n public void testReflexiveForEqual() throws Exception {\n\r\n EmployeeImpl emp1 = new EmployeeImpl(\"7993389\", \"gagandeep.singh@rbs.com\");\r\n EmployeeImpl emp2 = new EmployeeImpl(\"7993389\", \"ramandeep.singh@rbs.com\");\r\n\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == 0);\r\n Assert.assertTrue(\"Comparable implementation is incorrect\", emp1.compareTo(emp2) == emp2.compareTo(emp1));\r\n }", "boolean hasIsEquivalent();", "public abstract boolean equals(Object other);", "public AlgoAreEqual(Construction cons, GeoElement inputElement1,\n\t\t\tGeoElement inputElement2) {\n\t\tsuper(cons);\n\t\tthis.inputElement1 = inputElement1;\n\t\tthis.inputElement2 = inputElement2;\n\n\t\toutputBoolean = new GeoBoolean(cons);\n\n\t\tsetInputOutput();\n\t\tcompute();\n\n\t}", "@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}", "@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}", "public boolean equal (Bag u) {\n return u.cardinality() == this.cardinality();\n }", "private static void checkEqualsAndHashCodeMethods(Object lhs, Object rhs,\n boolean expectedResult) {\n if ((lhs == null) && (rhs == null)) {\n Assert.assertTrue(\n \"Your check is dubious...why would you expect null != null?\",\n expectedResult);\n return;\n }\n\n if ((lhs == null) || (rhs == null)) {\n Assert.assertFalse(\n \"Your check is dubious...why would you expect an object \"\n + \"to be equal to null?\", expectedResult);\n }\n\n if (lhs != null) {\n assertEquals(expectedResult, lhs.equals(rhs));\n }\n if (rhs != null) {\n assertEquals(expectedResult, rhs.equals(lhs));\n }\n\n if (expectedResult) {\n String hashMessage =\n \"hashCode() values for equal objects should be the same\";\n Assert.assertTrue(hashMessage, lhs.hashCode() == rhs.hashCode());\n }\n }", "private static boolean equiv(VObject src, VObject dst)\n {\n return ((src.getId() != null && src.getId().equals(dst.getId()))\n || (src.getSid() != null && src.getSid().equals(dst.getSid())) \n || (src.getName() != null && src.getName().equals(dst.getName())));\n }", "@Test\n public void testEquals() {\n assertFalse(jesseOberstein.equals(nathanGoodman));\n assertTrue(kateHutchinson.equals(kateHutchinson));\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }", "public static void assertInEqualStrict( Object expected, Object actual ){\r\n\t\tassertInEqual( expected, actual );\r\n\t\tassertTrue( \r\n\t\t\tString.format(\"%s.hashcode() is expected to be inequal to %s.hashcode()\", expected, actual), \r\n\t\t\t!expected.equals(actual) );\t\r\n\t}", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "public void testEqualsObject() {\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.0\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.1\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.2\")); //$NON-NLS-1$\n\t\t\tif (tipo1 != tipo1)\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.3\")); //$NON-NLS-1$\n\t\t\tif (!tipo1.equals(tipo2))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.4\"));\t\t\t //$NON-NLS-1$\n\t\t\tif (tipo1.equals(tipo3))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.5\"));\t //$NON-NLS-1$\n\t\t}", "@SuppressWarnings(\"resource\")\n @Test\n public void testEquals() {\n try {\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions1 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions2 = new SubtenantPolicyGroupListOptions(Integer.valueOf(-51),\n Long.valueOf(105),\n Order.getDefault(),\n \"efc9e20d-db05-4f2f-b41f-016029d4faff\",\n null,\n null);\n SubtenantPolicyGroupListOptions subtenantpolicygrouplistoptions3 = new SubtenantPolicyGroupListOptions(Integer.valueOf(101),\n Long.valueOf(87),\n Order.getDefault(),\n \"99c3b952-8e9d-4dd1-9075-8be04a5e58e8\",\n null,\n null);\n assertNotNull(subtenantpolicygrouplistoptions1);\n assertNotNull(subtenantpolicygrouplistoptions2);\n assertNotNull(subtenantpolicygrouplistoptions3);\n assertNotSame(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertNotSame(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions2, subtenantpolicygrouplistoptions1);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions2);\n assertEquals(subtenantpolicygrouplistoptions1, subtenantpolicygrouplistoptions1);\n assertFalse(subtenantpolicygrouplistoptions1.equals(null));\n assertNotEquals(subtenantpolicygrouplistoptions3, subtenantpolicygrouplistoptions1);\n } catch (Exception exception) {\n fail(exception.getMessage());\n }\n }", "@Test\n\tpublic void testEquals() {\n\t\tPMUser user = new PMUser(\"Smith\", \"John\", \"jsmith@gmail.com\");\n\t\tPark a = new Park(\"name\", \"address\", user);\n\t\tPark b = new Park(\"name\", \"address\", user);\n\t\tPark c = new Park(\"name\", \"different address\", user);\n\t\tassertEquals(a, a);\n\t\tassertEquals(a, b);\n\t\tassertEquals(b, a);\n\t\tassertFalse(a.equals(c));\n\t}", "@Test\n\tpublic void equalsContract()\n\t{\n\t\tEqualsVerifier.forClass(ExperienceChangedReport.class).verify();\n\t}", "@Test\n public void testEquals() {\n ColumnType typeBool = new ColumnType(-7, \"bool\");\n ColumnType typeBoolean = new ColumnType(16, \"boolean\");\n ColumnType typeBool2 = new ColumnType(-7, \"bool\");\n assertEquals(\"Expected bool types are equal\", typeBool, typeBool2);\n assertNotSame(\"Expected bool and boolean are not equal\", typeBool, typeBoolean);\n }", "@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }", "@Test\n public void testEquals04() {\n System.out.println(\"equals\");\n\n Set<City> cities = new HashSet<>();\n cities.add(new City(new Pair(41.243345, -8.674084), \"city0\", 28));\n cities.add(new City(new Pair(41.237364, -8.846746), \"city1\", 72));\n cities.add(new City(new Pair(40.519841, -8.085113), \"city2\", 81));\n cities.add(new City(new Pair(41.118700, -8.589700), \"city3\", 42));\n cities.add(new City(new Pair(41.467407, -8.964340), \"city4\", 64));\n cities.add(new City(new Pair(41.337408, -8.291943), \"city5\", 74));\n cities.add(new City(new Pair(41.314965, -8.423371), \"city6\", 80));\n cities.add(new City(new Pair(40.822244, -8.794953), \"city7\", 11));\n cities.add(new City(new Pair(40.781886, -8.697502), \"city8\", 7));\n cities.add(new City(new Pair(40.851360, -8.136585), \"city9\", 65));\n\n Object otherObject = new SocialNetwork(new HashSet(), cities);\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }", "@Test\n public void testEqualsTrue() {\n Rectangle r5 = new Rectangle(7, 4, new Color(255, 0, 0), new Position2D(50, 75));\n Rectangle r6 = new Rectangle(0, 4, new Color(255, 255, 255),\n new Position2D(-50, 75));\n Rectangle r7 = new Rectangle(7, 0, new Color(255, 255, 0), new Position2D(50, -75));\n Rectangle r8 = new Rectangle(0, 0, new Color(200, 150, 133),\n new Position2D(-50, -75));\n\n assertEquals(r1, r5);\n assertEquals(r2, r6);\n assertEquals(r3, r7);\n assertEquals(r4, r8);\n }", "private Equals() {}", "@Test \n\tpublic void checkEquality() {\n\t\tassertTrue(testCell.equals(testCell));\n\t\tassertFalse(testCell.equals(new Cell(false)));\n\n\t}", "@Test\n void compareTo_MatchButModifying_NameAndAddress()\n {\n runIsMatchTest(AnswerType.yes, AnswerType.yes, AnswerType.no, AnswerType.no, ContactMatchType.MatchButModifying);\n }", "@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }", "public AlgoAreEqual(Construction cons, String label,\n\t\t\tGeoElement inputElement1, GeoElement inputElement2) {\n\t\tthis(cons, inputElement1, inputElement2);\n\t\toutputBoolean.setLabel(label);\n\t}", "public boolean equals(ArticulationParameter rhs) {\n boolean ivarsEqual = true;\n\n if (rhs.getClass() != this.getClass()) {\n return false;\n }\n\n if (!(parameterTypeDesignator == rhs.parameterTypeDesignator)) {\n ivarsEqual = false;\n }\n if (!(changeIndicator == rhs.changeIndicator)) {\n ivarsEqual = false;\n }\n if (!(partAttachedTo == rhs.partAttachedTo)) {\n ivarsEqual = false;\n }\n if (!(parameterType == rhs.parameterType)) {\n ivarsEqual = false;\n }\n if (!(parameterValue == rhs.parameterValue)) {\n ivarsEqual = false;\n }\n\n return ivarsEqual;\n }", "@Test\n\tpublic void testEqualsFalso() {\n\t\t\n\t\tassertFalse(contato1.equals(contato2));\n\t}", "public boolean equals(Object o) { return compareTo(o) == 0; }", "@Test\n public void testEquals() {\n\n final Role role = new Role(Role.Name.ROLE_USER);\n\n assertNotEquals(role, null);\n assertNotEquals(role, new Object());\n assertEquals(role, role);\n\n final Role roleEquals = new Role(Role.Name.ROLE_USER);\n\n assertEquals(role, roleEquals);\n\n final Role roleNotEquals = new Role(Role.Name.ROLE_COMPANY);\n final Role roleNotEquals1 = new Role(Role.Name.ROLE_TRAINING_ORGANIZATION);\n\n assertNotEquals(roleNotEquals, roleNotEquals1);\n }", "@Test\n public void testEquals() {\n }", "@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }", "@Override\n\tpublic boolean equals(Object obj) {\n\t\tState State = (State) obj;\n\t\tSquare aux = null;\n\t\tboolean isequal = true;\n\t\tif (getTractor().getColumn()!=State.getTractor().getColumn() || getTractor().getRow()!=State.getTractor().getRow())\n\t\t\tisequal = false;\n\t\telse {\n\t\t\tfor (int i = 0;i<getRows() && isequal; i++) {\n\t\t\t\tfor (int j = 0;j < getColumns() && isequal; j++) {\n\t\t\t\t\taux = new Square (i,j);\n\t\t\t\t\tif (cells[i][j].getSand() != State.getSquare(aux).getSand()) \n\t\t\t\t\t\tisequal = false; \n\t\t\t\t}\n\t\t\t} \n\t\t} \n\t\treturn isequal;\n\t}", "@Override\r\n\tpublic boolean isConsistent(List<Constraint> constraints)\r\n\t\t\tthrows DomainSizeException {\r\n\t\treturn QXKCTools.isConsistent(constraints, this.numberOfConstraints);\r\n\t}", "@Test\n public void equals_trulyEqual() {\n SiteInfo si1 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n SiteInfo si2 = new SiteInfo(\n Amount.valueOf(12000, SiteInfo.CUBIC_FOOT),\n Amount.valueOf(76, NonSI.FAHRENHEIT),\n Amount.valueOf(92, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n Amount.valueOf(100, NonSI.FAHRENHEIT),\n 56,\n Damage.CLASS2,\n Country.USA,\n \"Default Site\"\n );\n\n Assert.assertEquals(si1, si2);\n }", "private void testEquals() {\n init();\n assertTrue(\"l0.equals(l0)\", l0.equals(l0));\n assertTrue(\"l3.equals(l5)\", l3.equals(l5));\n }", "@Test\n public void testEquals_2() {\n LOGGER.info(\"testEquals_2\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hej\");\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }", "public boolean equals (SetADT<T> set);", "static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }", "@Test\n public void equals_DifferentObjects_Test() {\n Assert.assertFalse(bq1.equals(ONE));\n }", "public void testEquals() {\n XIntervalDataItem item1 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n XIntervalDataItem item2 = new XIntervalDataItem(1.0, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.0, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.0, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.0);\n item1 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n item2 = new XIntervalDataItem(1.1, 2.2, 3.3, 4.4);\n }", "@SuppressWarnings(\"unlikely-arg-type\")\n @Test\n public void testEquals() {\n Order order = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order same = new Order(\"Test\", LocalTime.NOON, GridCoordinate.ZERO);\n Order other = new Order(\"Test\", LocalTime.MIDNIGHT, GridCoordinate.ZERO);\n Order another = new Order(\"Test\", LocalTime.NOON, GridCoordinate.of(1, 1));\n Order more = new Order(\"Test2\", LocalTime.NOON, GridCoordinate.ZERO);\n\n Assert.assertTrue(\"Two objects with the same addresses should be equal.\", order.equals(order));\n Assert.assertFalse(\"Null check.\", order.equals(null));\n Assert.assertFalse(\"Type check.\", order.equals(\"\"));\n Assert.assertFalse(\"Different order times.\", order.equals(other));\n Assert.assertFalse(\"Different customer locations.\", order.equals(another));\n Assert.assertFalse(\"Different order IDs.\", order.equals(more));\n Assert.assertTrue(\"Same values.\", order.equals(same));\n }", "public boolean equals(Object o);", "@Override // com.google.common.base.Equivalence\n public boolean doEquivalent(Object a, Object b) {\n return false;\n }", "static boolean argEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n LObjBoolPair other = (LObjBoolPair) two;\n\n return argEquals(one.first(), one.second(), other.first(), other.second());\n });\n }", "@Override\n public void checkEq(Type lt, Type t, ASTNode<?> origin) {\n NullableType lnt = getNullableTypeDefault(lt);\n NullableType rnt = getNullableTypeDefault(t);\n checkAssignable(lnt, rnt, origin);\n checkAssignable(rnt, lnt, origin);\n }", "private static final boolean equal(Object a, Object b) {\n if (a == b)\n return true;\n if (a == null)\n return false;\n if (b == null)\n return false;\n return a.equals(b);\n }", "@Test\n public void checkEquals() {\n EqualsVerifier.forClass(GenericMessageDto.class).usingGetClass()\n .suppress(Warning.NONFINAL_FIELDS).verify();\n }", "@Test\n public void testEquals_1() {\n LOGGER.info(\"testEquals_1\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = new AtomString(\"Hello\");\n final boolean actual = atomString.equals(atom);\n assertTrue(actual);\n }", "public boolean equalsImpl(Object obj)\n {\n boolean ivarsEqual = true;\n\n final EntityTypeVP rhs = (EntityTypeVP)obj;\n\n if( ! (recordType == rhs.recordType)) ivarsEqual = false;\n if( ! (changeIndicator == rhs.changeIndicator)) ivarsEqual = false;\n if( ! (entityType.equals( rhs.entityType) )) ivarsEqual = false;\n if( ! (padding == rhs.padding)) ivarsEqual = false;\n if( ! (padding1 == rhs.padding1)) ivarsEqual = false;\n return ivarsEqual;\n }", "public boolean isConsistent(Variable var, Variable[][] assignment) {\n\t\tfor (Constraint constraint : var.constraints) {\n\t\t\tif ( assignment[constraint.row][constraint.col].value == var.value\n\t\t\t\t\t|| grid[constraint.row][constraint.col].value == var.value) { \n\t\t\t\treturn false; \n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "@Test(timeout = 4000)\n public void test007() throws Throwable {\n DefaultDBTable defaultDBTable0 = new DefaultDBTable(\"--O:56ve\");\n String[] stringArray0 = new String[6];\n DBPrimaryKeyConstraint dBPrimaryKeyConstraint0 = new DBPrimaryKeyConstraint(defaultDBTable0, \"--Yq-y_4.s9]jt\", false, stringArray0);\n boolean boolean0 = DBUtil.equivalent(dBPrimaryKeyConstraint0, dBPrimaryKeyConstraint0);\n assertTrue(boolean0);\n }", "public void testEquals() throws Exception {\n State state1 = new State();\n state1.setCanJump(1);\n state1.setDirection(1);\n state1.setGotHit(1);\n state1.setHeight(1);\n state1.setMarioMode(1);\n state1.setOnGround(1);\n state1.setEnemiesSmall(new boolean[3]);\n state1.setObstacles(new boolean[4]);\n state1.setDistance(1);\n state1.setStuck(1);\n\n State state2 = new State();\n state2.setCanJump(1);\n state2.setDirection(1);\n state2.setGotHit(1);\n state2.setHeight(1);\n state2.setMarioMode(1);\n state2.setOnGround(1);\n state2.setEnemiesSmall(new boolean[3]);\n state2.setObstacles(new boolean[4]);\n state2.setStuck(1);\n\n State state3 = new State();\n state3.setCanJump(1);\n state3.setDirection(1);\n state3.setGotHit(1);\n state3.setHeight(1);\n state3.setMarioMode(2);\n state3.setOnGround(1);\n state3.setEnemiesSmall(new boolean[3]);\n state3.setObstacles(new boolean[4]);\n assertEquals(state1,state2);\n assertTrue(state1.equals(state2));\n assertFalse(state1.equals(state3));\n Set<State> qTable = new HashSet<State>();\n qTable.add(state1);\n qTable.add(state2);\n assertEquals(1,qTable.size());\n qTable.add(state3);\n assertEquals(2,qTable.size());\n\n }", "@Test\n void testEquals() {\n final boolean expected_boolean = true;\n\n // Properties for the objects\n final String username = \"username\";\n final String name = \"their_name\";\n final String password = \"password\";\n\n // Create two LoginAccount objects\n LoginAccount first_account = new LoginAccount(username, name, password);\n LoginAccount second_account = new LoginAccount(username, name, password);\n\n // Variable to check\n boolean objects_are_equal = first_account.equals(second_account);\n\n // Assert that the two boolean values are the same\n assertEquals(expected_boolean, objects_are_equal);\n }", "@Test\n public void equality() {\n new EqualsTester()\n .addEqualityGroup(UnitConverters.identity())\n .addEqualityGroup(UnitConverters.shift(100))\n .addEqualityGroup(UnitConverters.multiply(2))\n .addEqualityGroup(UnitConverters.pow(10, 6))\n .addEqualityGroup(UnitConverters.pow(UnitConverters.multiply(5), 2))\n .addEqualityGroup(UnitConverters.root(UnitConverters.multiply(5), 2))\n .addEqualityGroup(UnitConverters.compose(UnitConverters.shift(100), UnitConverters.multiply(2)))\n .testEquals();\n }", "public void reactivateEqConstraints() {\n\t\t// NOP\n\t}", "@Test\n public void testEquals_3() {\n LOGGER.info(\"testEquals_3\");\n final AtomString atomString = new AtomString(\"Hello\");\n final Atom atom = null;\n final boolean actual = atomString.equals(atom);\n assertFalse(actual);\n }", "@Test\n public void testEquals() {\n \n Beneficiaire instance = ben2;\n Beneficiaire unAutreBeneficiaire = ben3;\n boolean expResult = false;\n boolean result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n\n unAutreBeneficiaire = ben2;\n expResult = true;\n result = instance.equals(unAutreBeneficiaire);\n assertEquals(expResult, result);\n }", "@Test\n\tpublic void testEquals1() {\n\t\tDistance d1 = new Distance(0, 0);\n\t\tDistance d2 = new Distance();\n\t\tassertEquals(false, d1.equals(d2));\n\t}", "@Override\n protected boolean runInEQ() {\n return true;\n }", "public boolean equal(Object obj) {\n\t\tif((super.equal(obj))==false) {return false;}\n\t\tif (!(this.purpose).equals(((Airborne)obj).purpose)) {return false;}\n\t\treturn true;\n\t}", "private boolean equals() {\r\n return MARK(EQUALS) && CHAR('=') && gap();\r\n }", "@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Employee sum = null;\n assertFalse(emp.equals(sum));\n sum = new Employee(1, \"Anu\", \"Sha\", 12345678, new Date(), 600000);\n assertFalse(emp.equals(sum));\n sum = new Employee(1, \"Auk\", \"Sau\", 12345678, new Date(), 600000);\n assertEquals(emp, sum);\n \n }", "@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }", "public boolean equals( Object obj );", "public boolean equals(Object object);", "private void assertSymmetric(UMLMessageArgument msgArg1,UMLMessageArgument msgArg2) throws Exception\r\n\t{\r\n\t\tif( msgArg1!=null && msgArg2!=null)\r\n\t\t\tassertEquals(msgArg1.equals(msgArg2),msgArg2.equals(msgArg1));\r\n\t}", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);", "boolean equals(Object o);" ]
[ "0.63273335", "0.6289128", "0.6268122", "0.60819674", "0.60284543", "0.60280216", "0.59856313", "0.59431034", "0.59284467", "0.58674914", "0.5864692", "0.5810328", "0.58074087", "0.57720566", "0.57682925", "0.57574743", "0.57544243", "0.5737997", "0.5729841", "0.57155466", "0.5709142", "0.5694554", "0.56682754", "0.56663054", "0.56554097", "0.56345206", "0.5628958", "0.5627316", "0.5627125", "0.56262475", "0.5624035", "0.56200457", "0.5606832", "0.56047493", "0.56013274", "0.5592208", "0.5587862", "0.55718756", "0.5562616", "0.5560676", "0.5554128", "0.55493474", "0.5548405", "0.5548131", "0.55417675", "0.55370164", "0.5533532", "0.55238736", "0.55160284", "0.5514841", "0.5512974", "0.551261", "0.5503938", "0.549838", "0.5481227", "0.54776174", "0.547664", "0.54722863", "0.54694617", "0.54633194", "0.5459903", "0.5454042", "0.5453681", "0.5451048", "0.54438674", "0.5441745", "0.5431851", "0.5428873", "0.5422", "0.5416657", "0.54154366", "0.5411314", "0.54002607", "0.5391692", "0.53914666", "0.5390815", "0.53825265", "0.5381331", "0.5375661", "0.5375364", "0.53728837", "0.53702897", "0.5366319", "0.5365895", "0.5363101", "0.53535414", "0.53405505", "0.53404874", "0.5337591", "0.5331426", "0.5331161", "0.5321616", "0.53199506", "0.53196955", "0.53178346", "0.5317062", "0.53159547", "0.53159547", "0.53159547", "0.53159547" ]
0.6498569
0
Tests the isdefined operation.
@Test public void testDefined() throws ValueDoesNotMatchTypeException { DecisionVariableDeclaration decl = new DecisionVariableDeclaration("x", IntegerType.TYPE, null); ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0)); ConstraintSyntaxTree cst = new OCLFeatureCall( new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0); Utils.testDefined(ConstraintType.TYPE, ConstraintType.IS_DEFINED, cst); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasDef();", "public final void mDEFINED() throws RecognitionException {\r\n try {\r\n int _type = DEFINED;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:267:9: ( 'defined' )\r\n // C:\\\\sandbox\\\\objc2j\\\\src\\\\ru\\\\andremoniy\\\\objctojavacnv\\\\antlr\\\\Preprocessor.g:267:11: 'defined'\r\n {\r\n match(\"defined\"); \r\n\r\n\r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }", "boolean isSetSpecimen();", "boolean hasOperation();", "boolean defined(K k);", "boolean hasTestFlag();", "public boolean isDefined() {\n return lineNumber >= 0;\n }", "abstract boolean hasFunctionSelfArgument(Object definedOn);", "boolean hasIsPerformOf();", "boolean defined(ThreadContext tc, RakudoObject obj);", "boolean isTestEligible();", "public boolean isTest() {\n\t\treturn this.operation instanceof MagicCriterion;\n\t}", "boolean hasPredefinedValues();", "boolean isOp();", "boolean _non_existent();", "public boolean testPredefinedtype(EIfccablecarrierfitting type) throws SdaiException;", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean hasX();", "boolean isSetTarget();", "boolean hasBasisValue();", "public abstract void MussBeDefined();", "boolean hasDescribe();", "boolean isEvaluable();", "boolean isPlaced();", "boolean hasParameterValue();", "boolean isIntroduced();", "public boolean test() throws Exception {\n throw new Exception(\"Test funcationality not yet implemented: unclear API\");\n }", "public abstract boolean test(Fluid fluid);", "boolean hasHas_action();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "boolean hasValue();", "@Override\n\tpublic boolean test() {\n\t\treturn false;\n\t}", "public Object visitDefinedExpression(GNode n) {\n String parameter = n.getGeneric(0).getString(0);\n \n //evaluate the defined operation, preserving configurations\n if (macroTable != null) {\n List<Entry> definitions = macroTable.get(parameter, presenceConditionManager);\n \n if (definitions != null && definitions.size() > 0) {\n boolean hasDefined, hasUndefined, hasFree;\n \n //three conditions\n //1) defined under all configurations, so output 1 (true)\n //2) undefined under all configurations, so output 0 (false)\n //3) partially defined, so output union of configurations\n \n hasDefined = false;\n hasUndefined = false;\n hasFree = false;\n for (Entry def : definitions) {\n if (def.macro.state == Macro.State.FREE) {\n hasFree = true;\n }\n else if (def.macro.state == Macro.State.DEFINED) {\n hasDefined = true;\n }\n else if (def.macro.state == Macro.State.UNDEFINED) {\n hasUndefined = true;\n }\n }\n \n if (hasDefined && ! hasUndefined && ! hasFree) {\n //fully defined in this presenceCondition\n return B.one(); //the constant true BDD\n \n } else if (hasUndefined && ! hasDefined && ! hasFree) {\n //not defined in this presenceCondition\n return B.zero(); //the constant false BDD\n \n } else {\n //partially defined in this presenceCondition\n BDD defined = B.zero();\n List<Token> tokenlist;\n int c;\n \n for (Entry def : definitions) {\n if (def.macro.state == Macro.State.FREE) {\n BDD newDefined;\n BDD varBDD;\n BDD term;\n \n varBDD = presenceConditionManager.getVariableManager()\n .getDefinedVariable(parameter);\n \n term = def.presenceCondition.getBDD().and(varBDD);\n newDefined = defined.or(term);\n term.free();\n defined.free();\n varBDD.free();\n defined = newDefined;\n \n } else if (def.macro.state == Macro.State.DEFINED) {\n BDD newDefined;\n \n newDefined = defined.or(def.presenceCondition.getBDD());\n defined.free();\n defined = newDefined;\n } else if (def.macro.state == Macro.State.UNDEFINED) {\n //do nothing\n }\n }\n \n return defined;\n } //end partially defined\n \n } else {\n // The macro was used in a conditional expression before or\n // without being defined, therefore it is a configuration\n // variable.\n if (runtime.test(\"configurationVariables\")) {\n macroTable.configurationVariables.add(parameter);\n }\n }\n } //end has macro table\n \n /*if (runtime.test(\"cppmode\")) {\n //return false in cpp mode\n return \"0\";\n }\n else*/ {\n //if there are no macro table entries, just return the operation as is\n return \"defined \" + parameter; //return a string\n }\n }", "public boolean testOperationtype(EIfcdoorstyle type) throws SdaiException;", "public static boolean isSomethingToAttackDefined() {\n\t\treturn _attackTargetUnit != null && !_attackTargetUnit.getType().isOnGeyser();\n\t}", "boolean hasIsInputTo();", "boolean isSetScoreAnalysis();", "public final expressionParser.defined_return defined() throws RecognitionException {\n expressionParser.defined_return retval = new expressionParser.defined_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal52=null;\n\n CommonTree string_literal52_tree=null;\n RewriteRuleTokenStream stream_50=new RewriteRuleTokenStream(adaptor,\"token 50\");\n\n try {\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:98:3: ( 'defined' -> DEFINED )\n // C:\\\\work\\\\art\\\\latest-code\\\\vclang-code-dd0a89f0d579f02ec8c3d8cd398ea8f7cbb445aa\\\\src\\\\art\\\\grammar\\\\expression.g:98:5: 'defined'\n {\n string_literal52=(Token)match(input,50,FOLLOW_50_in_defined542); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_50.add(string_literal52);\n\n\n\n // AST REWRITE\n // elements: \n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 98:15: -> DEFINED\n {\n adaptor.addChild(root_0, (CommonTree)adaptor.create(DEFINED, \"DEFINED\"));\n\n }\n\n retval.tree = root_0;}\n }\n\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }", "@Test\r\n\tpublic void hasScoreTest() \r\n\t{\r\n\t\tassertTrue(scoreBehavior.hasScore());\r\n\t}", "boolean hasSuit();", "boolean isSetDescription();", "boolean isSetDescription();", "public abstract boolean promulgationDataDefined();", "@JRubyMethod(name = \"const_defined?\", required = 1)\n public RubyBoolean const_defined_p(ThreadContext context, IRubyObject symbol) {\n // Note: includes part of fix for JRUBY-1339\n return context.getRuntime().newBoolean(fastIsConstantDefined(validateConstant(symbol.asJavaString()).intern()));\n }", "@Test\n public void testContains_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n instance.add(3);\n\n boolean expResult = true;\n boolean result = instance.contains(1);\n assertEquals(expResult, result);\n }", "boolean isSetValue();", "boolean isSetValue();", "boolean hasVarValue();", "public boolean isKnown();", "boolean isSetInterpretation();", "@Test\n public void testContains_Not_Contain() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>();\n instance.add(1);\n instance.add(2);\n\n boolean expResult = false;\n boolean result = instance.contains(3);\n assertEquals(expResult, result);\n }", "boolean isSetLastrunresult();", "boolean hasCondition();", "boolean land();", "boolean hasForecast();", "boolean isSetIdentifier();", "public boolean test() {\r\n\t\treturn (hit() == size);\r\n\t}", "boolean hasFieldId();", "boolean hasHas();", "boolean isMet();", "boolean hasDescription();", "boolean hasDescription();", "boolean hasDescription();", "boolean hasHasSCF();", "boolean hasUnknown();", "boolean hasHasAlcoholResult();", "boolean isSetDesc();", "boolean hasAction();", "boolean hasAction();", "@Override\n public boolean isDefined()\n {\n return getValue() != null || getChildrenCount() > 0\n || getAttributeCount() > 0;\n }", "public boolean isDefined(AttributeDefinition attribute) \n throws UnknownAttributeException\n {\n if(builtinAttributes.containsKey(attribute.getName()))\n {\n if(attribute.getName().equals(\"parent\"))\n {\n return parent != null;\n }\n else\n {\n return true;\n }\n }\n else\n {\n throw new UnknownAttributeException(\"not a builtin attribute: '\"+\n attribute.getName()+\"'\");\n }\n }", "boolean hasQueryLogicName();" ]
[ "0.68893945", "0.6166333", "0.61544", "0.61456364", "0.6061735", "0.5880989", "0.5871569", "0.5838071", "0.58256775", "0.57684964", "0.57355475", "0.5734182", "0.57150096", "0.5712162", "0.56079066", "0.5604348", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.55998474", "0.5590577", "0.55854815", "0.5565367", "0.55636907", "0.5553821", "0.5553164", "0.55427176", "0.5540921", "0.5529612", "0.5523511", "0.552005", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5519338", "0.5504117", "0.5498921", "0.5497356", "0.5497068", "0.54809016", "0.5466222", "0.5458067", "0.54503804", "0.5449793", "0.54491055", "0.54491055", "0.54484594", "0.54377925", "0.5434783", "0.54343957", "0.54343957", "0.5434356", "0.54303074", "0.5421242", "0.5415013", "0.5409715", "0.54095054", "0.5396533", "0.5392167", "0.53891647", "0.5383198", "0.53820765", "0.537958", "0.53784144", "0.5377457", "0.5377457", "0.5377457", "0.53770363", "0.53719825", "0.5367804", "0.5361746", "0.5356977", "0.5356977", "0.5355979", "0.5352237", "0.5339343" ]
0.65694416
1
Tests the "typeOf" operation.
@Test public void testTypeOf() throws ValueDoesNotMatchTypeException { TestEvaluationContext context = new TestEvaluationContext(); DecisionVariableDeclaration decl = new DecisionVariableDeclaration("x", IntegerType.TYPE, null); ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0)); ConstraintSyntaxTree cst = new OCLFeatureCall( new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0); EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst); Utils.testTypeOf(context, ConstraintType.TYPE_OF, cValue); cValue.release(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testIsTypeOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_TYPE_OF);\n }", "@Test\n public void testIsKindOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_KIND_OF);\n }", "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "public final void testGetType() {\n assertEquals(Hello.SAY_HELLO_INVOKED, n.getType());\n }", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "String type();", "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "type getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();" ]
[ "0.76998544", "0.7048347", "0.70104575", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.6970973", "0.67770815", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67416376", "0.67346334", "0.6581973", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.6581317", "0.65712625", "0.65712625", "0.65712625", "0.65712625", "0.65712625", "0.65712625", "0.65712625", "0.65712625" ]
0.0
-1
Tests the "isTypeOf" operation.
@Test public void testIsTypeOf() throws ValueDoesNotMatchTypeException { testTypeKindOf(AnyType.IS_TYPE_OF); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isTypeOf(ItemType type);", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "@Test\n public void testIsKindOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_KIND_OF);\n }", "public boolean isType(String type) {\n return m_Type.equals(type);\n }", "private boolean isType(String type, Object value) {\n boolean ret = false;\n String val = String.valueOf(value).toUpperCase();\n if (val.equals(\"NULL\")) {\n ret = true;\n } else if (val.contains(\"BASE64\")) {\n ret = true;\n } else {\n if (type.equals(\"NULL\") && value instanceof JSONObject) ret = true;\n if (type.equals(\"TEXT\") && value instanceof String) ret = true;\n if (type.equals(\"INTEGER\") && value instanceof Integer) ret = true;\n if (type.equals(\"INTEGER\") && value instanceof Long) ret = true;\n if (type.equals(\"REAL\") && value instanceof Float) ret = true;\n if (type.equals(\"BLOB\") && value instanceof Blob) ret = true;\n }\n return ret;\n }", "public boolean handlesType(Class<?> clazz);", "abstract protected boolean checkType(String myType);", "public final void mT__60() throws RecognitionException {\n try {\n int _type = T__60;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:58:7: ( 'isTypeOf' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:58:9: 'isTypeOf'\n {\n match(\"isTypeOf\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public abstract boolean isTypeCorrect();", "public boolean isType() {\n return type;\n }", "public boolean is( Type type ) {\n return this.type == type;\n }", "abstract public boolean isTyped();", "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "boolean isImageType();", "private boolean checkForType(IfStmt ifStmt, FieldDeclaration compareVariable) {\n boolean isOfType = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n String comparedTypeName = compareVariable.getVariables().get(0).getNameAsString();\n if (!ifAsBinary.getLeft().isNullLiteralExpr()) {\n isOfType |= ifAsBinary.getLeft().asNameExpr().getNameAsString().equals(\n comparedTypeName);\n }\n if (!ifAsBinary.getRight().isNullLiteralExpr()) {\n isOfType |= ifAsBinary.getRight().asNameExpr().getNameAsString().equals(\n comparedTypeName);\n }\n return isOfType;\n }", "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "boolean isAnyTypeReference();", "public abstract boolean isObject(T type);", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public boolean isInstanceOf(Class c);", "public boolean verificaTipo(String tipo) {\r\n\t\tif(tipo.equals(\"single\") || tipo.equals(\"double\") || tipo.equals(\"suite\")) return true;\r\n\t\telse return false;\r\n\t}", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "boolean isHandled(Class<?> type);", "public final void testGetType() {\n assertEquals(Hello.SAY_HELLO_INVOKED, n.getType());\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "private static boolean expectedInterfaceType(Expr e) {\n \t\treturn e.attrExpectedTyp() instanceof PscriptTypeInterface || e.attrExpectedTyp() instanceof PscriptTypeTypeParam;\n \t}", "public boolean isPrimitiveOrString(String fieldType) {\n return fieldType.equals(\"int\") || fieldType.equals(\"short\") || fieldType.equals(\"long\") ||\n fieldType.equals(\"byte\") || fieldType.equals(\"char\") || fieldType.equals(\"float\") ||\n fieldType.equals(\"double\") || fieldType.equals(\"boolean\") || fieldType.equals(\"String\");\n }", "type getType();", "public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }", "@Test\n public void testTypeOf() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst);\n Utils.testTypeOf(context, ConstraintType.TYPE_OF, cValue);\n cValue.release();\n }", "Object isMatch(Object arg, String wantedType);", "public boolean isOfType(int index, JSONType type) {\n\t\tif(!has(index)) return false;\n\t\treturn JSONType.isOfType(get(index), type);\n\t}", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "public static boolean typeSupported(Object body) {\r\n final Class<?>[] knownTypes = new Class<?>[] {\r\n String.class,\r\n MessageAdapter.class,\r\n ca.uhn.hl7v2.model.Message.class,\r\n File.class,\r\n InputStream.class,\r\n java.nio.ByteBuffer.class,\r\n byte[].class,\r\n GenericFile.class\r\n };\r\n \r\n for(Class<?> type : knownTypes) {\r\n try {\r\n type.cast(body);\r\n return true;\r\n } catch (ClassCastException cce) {\r\n // nop\r\n }\r\n }\r\n \r\n return false;\r\n }", "public boolean hasType() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "boolean matchesType( Name primaryType,\n Set<Name> mixinTypes );", "public void testGetType() {\n CLImage instance = new CLImage();\n String expResult = \"image\";\n String result = instance.getType();\n assertEquals(expResult, result);\n }" ]
[ "0.75851035", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.7539132", "0.73319024", "0.6735996", "0.6606181", "0.6566503", "0.65545595", "0.6500252", "0.64911157", "0.6486091", "0.6399164", "0.6266536", "0.6251793", "0.6222271", "0.6204744", "0.6201372", "0.6157807", "0.61375946", "0.6056816", "0.60563296", "0.6026001", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.6025486", "0.59971285", "0.5995539", "0.59842044", "0.59457654", "0.59381056", "0.59283555", "0.5909227", "0.5848859", "0.5846822", "0.5846356", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.58460855", "0.5843011", "0.58378357", "0.5830265", "0.5818473" ]
0.8434576
0
Tests the "isTypeOf" operation.
@Test public void testIsKindOf() throws ValueDoesNotMatchTypeException { testTypeKindOf(AnyType.IS_KIND_OF); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testIsTypeOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_TYPE_OF);\n }", "public abstract boolean isTypeOf(ItemType type);", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "public boolean isType(String type) {\n return m_Type.equals(type);\n }", "private boolean isType(String type, Object value) {\n boolean ret = false;\n String val = String.valueOf(value).toUpperCase();\n if (val.equals(\"NULL\")) {\n ret = true;\n } else if (val.contains(\"BASE64\")) {\n ret = true;\n } else {\n if (type.equals(\"NULL\") && value instanceof JSONObject) ret = true;\n if (type.equals(\"TEXT\") && value instanceof String) ret = true;\n if (type.equals(\"INTEGER\") && value instanceof Integer) ret = true;\n if (type.equals(\"INTEGER\") && value instanceof Long) ret = true;\n if (type.equals(\"REAL\") && value instanceof Float) ret = true;\n if (type.equals(\"BLOB\") && value instanceof Blob) ret = true;\n }\n return ret;\n }", "public boolean handlesType(Class<?> clazz);", "abstract protected boolean checkType(String myType);", "public final void mT__60() throws RecognitionException {\n try {\n int _type = T__60;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:58:7: ( 'isTypeOf' )\n // ../org.xtext.example.webgme_mtl/src-gen/org/xtext/example/webgme/parser/antlr/internal/InternalMTL.g:58:9: 'isTypeOf'\n {\n match(\"isTypeOf\"); \n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }", "public abstract boolean isTypeCorrect();", "public boolean isType() {\n return type;\n }", "public boolean is( Type type ) {\n return this.type == type;\n }", "abstract public boolean isTyped();", "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "boolean isImageType();", "private boolean checkForType(IfStmt ifStmt, FieldDeclaration compareVariable) {\n boolean isOfType = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n String comparedTypeName = compareVariable.getVariables().get(0).getNameAsString();\n if (!ifAsBinary.getLeft().isNullLiteralExpr()) {\n isOfType |= ifAsBinary.getLeft().asNameExpr().getNameAsString().equals(\n comparedTypeName);\n }\n if (!ifAsBinary.getRight().isNullLiteralExpr()) {\n isOfType |= ifAsBinary.getRight().asNameExpr().getNameAsString().equals(\n comparedTypeName);\n }\n return isOfType;\n }", "public void test_getType() {\n assertEquals(\"'type' value should be properly retrieved.\", type, instance.getType());\n }", "boolean isAnyTypeReference();", "public abstract boolean isObject(T type);", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "public boolean isInstanceOf(Class c);", "public boolean verificaTipo(String tipo) {\r\n\t\tif(tipo.equals(\"single\") || tipo.equals(\"double\") || tipo.equals(\"suite\")) return true;\r\n\t\telse return false;\r\n\t}", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "Type getType();", "boolean isHandled(Class<?> type);", "public final void testGetType() {\n assertEquals(Hello.SAY_HELLO_INVOKED, n.getType());\n }", "protected abstract boolean isSupportedTestType(Properties prop);", "private static boolean expectedInterfaceType(Expr e) {\n \t\treturn e.attrExpectedTyp() instanceof PscriptTypeInterface || e.attrExpectedTyp() instanceof PscriptTypeTypeParam;\n \t}", "public boolean isPrimitiveOrString(String fieldType) {\n return fieldType.equals(\"int\") || fieldType.equals(\"short\") || fieldType.equals(\"long\") ||\n fieldType.equals(\"byte\") || fieldType.equals(\"char\") || fieldType.equals(\"float\") ||\n fieldType.equals(\"double\") || fieldType.equals(\"boolean\") || fieldType.equals(\"String\");\n }", "type getType();", "public TypeDefinition isType(String name){\n return((TypeDefinition)typeDefs.get(getDefName(name)));\n }", "@Test\n public void testTypeOf() throws ValueDoesNotMatchTypeException {\n TestEvaluationContext context = new TestEvaluationContext();\n DecisionVariableDeclaration decl = new DecisionVariableDeclaration(\"x\", IntegerType.TYPE, null);\n ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0));\n ConstraintSyntaxTree cst = new OCLFeatureCall(\n new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0);\n EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst);\n Utils.testTypeOf(context, ConstraintType.TYPE_OF, cValue);\n cValue.release();\n }", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "Object isMatch(Object arg, String wantedType);", "public boolean isOfType(int index, JSONType type) {\n\t\tif(!has(index)) return false;\n\t\treturn JSONType.isOfType(get(index), type);\n\t}", "public static boolean typeSupported(Object body) {\r\n final Class<?>[] knownTypes = new Class<?>[] {\r\n String.class,\r\n MessageAdapter.class,\r\n ca.uhn.hl7v2.model.Message.class,\r\n File.class,\r\n InputStream.class,\r\n java.nio.ByteBuffer.class,\r\n byte[].class,\r\n GenericFile.class\r\n };\r\n \r\n for(Class<?> type : knownTypes) {\r\n try {\r\n type.cast(body);\r\n return true;\r\n } catch (ClassCastException cce) {\r\n // nop\r\n }\r\n }\r\n \r\n return false;\r\n }", "public boolean hasType() {\n return ((bitField0_ & 0x00000020) == 0x00000020);\n }", "boolean matchesType( Name primaryType,\n Set<Name> mixinTypes );", "public void testGetType() {\n CLImage instance = new CLImage();\n String expResult = \"image\";\n String result = instance.getType();\n assertEquals(expResult, result);\n }" ]
[ "0.8433963", "0.75862277", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.75415677", "0.6738725", "0.66092175", "0.6567547", "0.6558298", "0.650006", "0.6493969", "0.64897877", "0.64022636", "0.6267943", "0.62527436", "0.6224773", "0.6206285", "0.6204126", "0.61588424", "0.6139203", "0.6058685", "0.60556763", "0.6029438", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.6027612", "0.5998902", "0.59972006", "0.5984193", "0.5947079", "0.59388095", "0.59306854", "0.59107715", "0.58488965", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.58487064", "0.5847803", "0.5847681", "0.5843908", "0.5839483", "0.5832583", "0.5820314" ]
0.7331375
44
Tests kind/type of as we do not have to consider type inheritance relations.
private static void testTypeKindOf(Operation op) throws ValueDoesNotMatchTypeException { TestEvaluationContext context = new TestEvaluationContext(); DecisionVariableDeclaration decl = new DecisionVariableDeclaration("x", IntegerType.TYPE, null); ConstantValue c0 = new ConstantValue(ValueFactory.createValue(IntegerType.TYPE, 0)); ConstraintSyntaxTree cst = new OCLFeatureCall( new Variable(decl), IntegerType.LESS_EQUALS_INTEGER_INTEGER.getName(), c0); EvaluationAccessor cValue = Utils.createValue(ConstraintType.TYPE, context, cst); Utils.testIsTypeKindOf(context, op, cValue, false, IntegerType.TYPE, RealType.TYPE, StringType.TYPE); cValue.release(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testIsKindOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_KIND_OF);\n }", "@Test\n public void testIsTypeOf() throws ValueDoesNotMatchTypeException {\n testTypeKindOf(AnyType.IS_TYPE_OF);\n }", "public void testType() {\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tInteger).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6))).oclIsTypeOf(tReal).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tPersonFQ).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(\"foo\"))).oclIsTypeOf(tOclString).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(true))).oclIsTypeOf(tBoolean).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tReal).isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(6.0))).oclIsTypeOf(tInteger).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p2))).oclIsTypeOf(tCompany).not().isTrue() );\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(false))).oclIsTypeOf(tAny).not().isTrue() ); //differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0.0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(0))).oclIsTypeOf(tAny).not().isTrue() ); // differs\n assertTrue( ((OclAny)(Ocl.getOclRepresentationFor(p1))).oclIsTypeOf(tObject).not().isTrue() ); // differs\n }", "@Override\n boolean doIsAssignableFromNonUnionType(SoyType srcType) {\n return false;\n }", "public void test_inheritence() {\n assertTrue(\"invalid inheritence.\", Task.class.getSuperclass() == BaseTaskEntity.class);\n }", "public Verification verifySubtypeOf(Type type, String meaningThisType, String meaningOtherType, Element cause);", "public abstract boolean isTypeCorrect();", "public static boolean checkTypeDerivationOk(XSTypeDefinition derived, XSTypeDefinition base, short block) {\n/* 117 */ if (derived == SchemaGrammar.fAnyType) {\n/* 118 */ return (derived == base);\n/* */ }\n/* */ \n/* 121 */ if (derived == SchemaGrammar.fAnySimpleType) {\n/* 122 */ return (base == SchemaGrammar.fAnyType || base == SchemaGrammar.fAnySimpleType);\n/* */ }\n/* */ \n/* */ \n/* */ \n/* 127 */ if (derived.getTypeCategory() == 16) {\n/* */ \n/* 129 */ if (base.getTypeCategory() == 15)\n/* */ {\n/* */ \n/* 132 */ if (base == SchemaGrammar.fAnyType) {\n/* 133 */ base = SchemaGrammar.fAnySimpleType;\n/* */ } else {\n/* 135 */ return false;\n/* */ } } \n/* 137 */ return checkSimpleDerivation((XSSimpleType)derived, (XSSimpleType)base, block);\n/* */ } \n/* */ \n/* */ \n/* 141 */ return checkComplexDerivation((XSComplexTypeDecl)derived, base, block);\n/* */ }", "public void testGeneralizationImpl_CorrectType() {\n assertEquals(\"equal value expected.\",\n GeneralizationImpl.class.getSuperclass(), RelationshipAbstractImpl.class);\n assertTrue(\"true value expected.\",\n Generalization.class.isAssignableFrom(GeneralizationImpl.class));\n }", "abstract protected boolean checkType(String myType);", "public void checkNotPolymorphicOrUnknown() {\n if (isPolymorphic())\n throw new AnalysisException(\"Unexpected polymorphic value!\");\n if (isUnknown())\n throw new AnalysisException(\"Unexpected 'unknown' value!\");\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "protected void checkSubclass() {\n }", "boolean isSubclass(Concept x, Concept y);", "@Override\n public abstract boolean isAssignableBy(TypeUsage other);", "protected void checkSubclass() {\n }", "boolean isSuperclass(Concept x, Concept y);", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "@Test\n void cannotInferType() {\n }", "private static boolean expectedInterfaceType(Expr e) {\n \t\treturn e.attrExpectedTyp() instanceof PscriptTypeInterface || e.attrExpectedTyp() instanceof PscriptTypeTypeParam;\n \t}", "private boolean checkForType(IfStmt ifStmt, FieldDeclaration compareVariable) {\n boolean isOfType = false;\n BinaryExpr ifAsBinary = ifStmt.getCondition().asBinaryExpr();\n String comparedTypeName = compareVariable.getVariables().get(0).getNameAsString();\n if (!ifAsBinary.getLeft().isNullLiteralExpr()) {\n isOfType |= ifAsBinary.getLeft().asNameExpr().getNameAsString().equals(\n comparedTypeName);\n }\n if (!ifAsBinary.getRight().isNullLiteralExpr()) {\n isOfType |= ifAsBinary.getRight().asNameExpr().getNameAsString().equals(\n comparedTypeName);\n }\n return isOfType;\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n protected void checkSubclass() {\n }", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\r\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Override\n\tprotected void checkSubclass() {\n\t}", "@Test\n\tpublic void testInternalEntityRelatedTypes() {\n\t\tlogger.info(\"Run testInternalEntityRelatedTypes\");\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\n\t\t// Entity1InputType\n\t\tfinal IntrospectionFullType entity1InputType = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(27, entity1InputType.getInputFields().size());\n\n\t\tassertInputField(entity1InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"intAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLInt.getName());\n\t\tassertInputField(entity1InputType, \"longAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLLong.getName());\n\t\tassertInputField(entity1InputType, \"doubleAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLFloat.getName());\n\t\tassertInputField(entity1InputType, \"stringAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"booleanAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBoolean.getName());\n\t\tassertInputField(entity1InputType, \"bigIntAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigInteger.getName());\n\t\tassertInputField(entity1InputType, \"bigDecimalAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLBigDecimal.getName());\n\t\tassertInputField(entity1InputType, \"bytesAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLByte.getName());\n\t\tassertInputField(entity1InputType, \"shortAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tScalars.GraphQLShort.getName());\n\t\tassertInputField(entity1InputType, \"charAttr\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLChar.getName());\n\t\tassertInputField(entity1InputType, \"dateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLDate.getName());\n\t\tassertInputField(entity1InputType, \"fileAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLFile.getName());\n\t\tassertInputField(entity1InputType, \"localDateAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDate.getName());\n\t\tassertInputField(entity1InputType, \"localDateTimeAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLLocalDateTime.getName());\n\t\tassertInputField(entity1InputType, \"instantAttr\", IntrospectionTypeKindEnum.SCALAR,\n\t\t\t\tGQLJavaScalars.GraphQLInstant.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"stringList\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\t\tassertInputField(entity1InputType, \"stringSet\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLString.getName());\n\n\t\tassertInputField(entity1InputType, \"enumAttr\", IntrospectionTypeKindEnum.ENUM, Enum1.class.getSimpleName());\n\n\t\tassertInputField(entity1InputType, \"enumList\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\t\tassertInputField(entity1InputType, \"enumSet\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.ENUM,\n\t\t\t\tEnum1.class);\n\n\t\tassertInputField(entity1InputType, \"entity2\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity3\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity1InputType, \"entity4\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\tassertInputField(entity1InputType, \"embeddedData1\", IntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tassertInputField(entity1InputType, \"embeddedData1s\", IntrospectionTypeKindEnum.LIST,\n\t\t\t\tIntrospectionTypeKindEnum.INPUT_OBJECT,\n\t\t\t\tEmbeddedData1.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\n\t\t// Entity1LoadResult\n\t\tfinal IntrospectionFullType entity1LoadResult = getFullType(introspection,\n\t\t\t\tEntity1.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity1LoadResult.getFields().size());\n\n\t\tassertField(entity1LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity1.class.getSimpleName());\n\t\tassertField(entity1LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity1LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity2InputType\n\t\tfinal IntrospectionFullType entity2InputType = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity2InputType.getInputFields().size());\n\n\t\tassertInputField(entity2InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity2InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity2LoadResult\n\t\tfinal IntrospectionFullType entity2LoadResult = getFullType(introspection,\n\t\t\t\tEntity2.class.getSimpleName() + schemaConfig.getQueryGetListOutputTypeNameSuffix());\n\t\tAssert.assertEquals(3, entity2LoadResult.getFields().size());\n\n\t\tassertField(entity2LoadResult, \"data\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tEntity2.class.getSimpleName());\n\t\tassertField(entity2LoadResult, \"orderBy\", IntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.OBJECT,\n\t\t\t\tgetOrderByOutputTypeName());\n\t\tassertField(entity2LoadResult, \"paging\", IntrospectionTypeKindEnum.OBJECT, getPagingOutputTypeName());\n\n\t\t// Entity3InputType\n\t\tfinal IntrospectionFullType entity3InputType = getFullType(introspection,\n\t\t\t\tEntity3.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity3InputType.getInputFields().size());\n\n\t\tassertInputField(entity3InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity3InputType, \"entity1\" + schemaConfig.getAttributeIdSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\n\t\t// Entity4InputType\n\t\tfinal IntrospectionFullType entity4InputType = getFullType(introspection,\n\t\t\t\tEntity4.class.getSimpleName() + schemaConfig.getInputTypeNameSuffix());\n\t\tAssert.assertEquals(2, entity4InputType.getInputFields().size());\n\n\t\tassertInputField(entity4InputType, \"id\", IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t\tassertInputField(entity4InputType, \"entity1\" + schemaConfig.getAttributeIdPluralSuffix(),\n\t\t\t\tIntrospectionTypeKindEnum.LIST, IntrospectionTypeKindEnum.SCALAR, Scalars.GraphQLID.getName());\n\t}", "boolean isHandled(Class<?> type);", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();", "boolean hasType();" ]
[ "0.7304935", "0.65319884", "0.64876026", "0.6325342", "0.62281686", "0.61752033", "0.6078183", "0.5983607", "0.5947522", "0.5938295", "0.588718", "0.58817244", "0.58817244", "0.58817244", "0.58742905", "0.58651596", "0.5854716", "0.5837603", "0.58051085", "0.57848036", "0.57802665", "0.5709559", "0.5702278", "0.5702278", "0.5702278", "0.569408", "0.56577194", "0.56577194", "0.56577194", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5657215", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5645181", "0.5622162", "0.5575804", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141", "0.5567141" ]
0.5824201
18
Returns a long as a byte array.
public static byte[] getLongAsBytes(long l) { return new byte[] { (byte) (l >> 56), (byte) (l >> 48), (byte) (l >> 40), (byte) (l >> 32), (byte) (l >> 24), (byte) (l >> 16), (byte) (l >> 8), (byte) l }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] longToBytes(long l) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_LONG);\n byteBuffer.putLong(l);\n return byteBuffer.array();\n\n }", "public static byte[] longToBytes(long x) {\n\t ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);\n\t buffer.putLong(x);\n\t return buffer.array();\n\t}", "private static final byte[] longToByteArray(long l) {\n\t\tbyte[] retVal = new byte[8];\n\n\t\tfor (int i = 0; i < 8; i++) {\n\t\t\tretVal[i] = (byte) l;\n\t\t\tl >>= 8;\n\t\t}\n\n\t\treturn retVal;\n\t}", "public static byte[] getBytes(long value) {\r\n\t\treturn ByteBuffer.allocate(8).order(ByteOrder.LITTLE_ENDIAN).putLong(value).array();\r\n\t}", "public byte[] getByteArray() {\n long val = getValue();\n return new byte[] {\n (byte)((val>>24) & 0xff),\n (byte)((val>>16) & 0xff),\n (byte)((val>>8) & 0xff),\n (byte)(val & 0xff) };\n }", "public byte[] l2b(long value) {\n byte[] data = new byte[8];\n data[0] = (byte) ((value >> 56) & 0xFF);\n data[1] = (byte) ((value >> 48) & 0xFF);\n data[2] = (byte) ((value >> 40) & 0xFF);\n data[3] = (byte) ((value >> 32) & 0xFF);\n data[4] = (byte) ((value >> 24) & 0xFF);\n data[5] = (byte) ((value >> 16) & 0xFF);\n data[6] = (byte) ((value >> 8) & 0xFF);\n data[7] = (byte) (value & 0xFF);\n return data;\n }", "public abstract long[] toLongArray();", "public native static long getConvertBytes();", "public static byte[] toBytes(long val) {\n byte [] b = new byte[8];\n for (int i = 7; i > 0; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n b[0] = (byte) val;\n return b;\n }", "static byte[] long2byteArray(long number, int length, boolean swapHalfWord) {\n }", "public byte[] readRawLong() throws IOException {\n byte[] bytes = new byte[9];\n bytes[0] = (byte) Type.LONG.code;\n in.readFully(bytes, 1, 8);\n return bytes;\n }", "public long[] read();", "public static byte[] toBytes(final long number) {\n\t\treturn new byte[] {\n\t\t\t(byte) (number >>> 56),\n\t\t\t(byte) (number >>> 48),\n\t\t\t(byte) (number >>> 40),\n\t\t\t(byte) (number >>> 32),\n\t\t\t(byte) (number >>> 24),\n\t\t\t(byte) (number >>> 16),\n\t\t\t(byte) (number >>> 8),\n\t\t\t(byte) (number)\n\t\t};\n\t}", "public long toLong() {\n return this.toLongArray()[0];\n }", "public static void longToByteArray(long value, byte[] buffer, int offset) {\n buffer[offset] = (byte) (value >> 56 & 0xFF);\n buffer[offset + 1] = (byte) (value >> 48 & 0xFF);\n buffer[offset + 2] = (byte) (value >> 40 & 0xFF);\n buffer[offset + 3] = (byte) (value >> 32 & 0xFF);\n buffer[offset + 4] = (byte) (value >> 24 & 0xFF);\n buffer[offset + 5] = (byte) (value >> 16 & 0xFF);\n buffer[offset + 6] = (byte) (value >> 8 & 0xFF);\n buffer[offset + 7] = (byte) (value & 0xFF);\n }", "public static byte[] convertLong(long v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[8];\r\n if (isLE)\r\n {\r\n bytes[0] = (byte) (v >>> 0);\r\n bytes[1] = (byte) (v >>> 8);\r\n bytes[2] = (byte) (v >>> 16);\r\n bytes[3] = (byte) (v >>> 24);\r\n bytes[4] = (byte) (v >>> 32);\r\n bytes[5] = (byte) (v >>> 40);\r\n bytes[6] = (byte) (v >>> 48);\r\n bytes[7] = (byte) (v >>> 56);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) (v >>> 56);\r\n bytes[1] = (byte) (v >>> 48);\r\n bytes[2] = (byte) (v >>> 40);\r\n bytes[3] = (byte) (v >>> 32);\r\n bytes[4] = (byte) (v >>> 24);\r\n bytes[5] = (byte) (v >>> 16);\r\n bytes[6] = (byte) (v >>> 8);\r\n bytes[7] = (byte) (v >>> 0);\r\n }\r\n return bytes;\r\n }", "public long[] getAsLongs() {\n return (long[])data;\n }", "com.google.protobuf.ByteString\n getLongTokenBytes();", "com.google.protobuf.ByteString\n getLongTokenBytes();", "private byte[] toByte(long address) {\n byte[] addressInBytes = new byte[]{\n (byte) (address >> 40 & 0xff),\n (byte) (address >> 32 & 0xff),\n (byte) (address >> 24 & 0xff),\n (byte) (address >> 16 & 0xff),\n (byte) (address >> 8 & 0xff),\n (byte) (address >> 0 & 0xff)\n };\n return addressInBytes;\n }", "public synchronized static byte [] LongToBytes ( long ldata, int n )\n {\n byte buff[] = new byte [ n ];\n\n for ( int i=n-1; i>=0; i--)\n {\n // Keep assigning the right most 8 bits to the\n // byte arrays while shift 8 bits during each iteration\n buff [ i ] = (byte) ldata;\n ldata = ldata >> 8;\n }\n return buff;\n }", "public static long toInt64(byte[] value) {\r\n\t\treturn toInt16(value, 0);\r\n\t}", "long decodeLong();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default long[] asLongArray() {\n \n return notSupportedCast(\"long[]\");\n }", "public static byte[] longToByteArray(long value, int valueSize, int length) {\n long val = value;\n // Convert the long to 8-byte BE representation\n byte[] b = new byte[8];\n for (int i = 7; i >= 0 && val != 0L; i--) {\n b[i] = (byte) val;\n val >>>= 8;\n }\n // Then copy the rightmost valueSize bytes\n // e.g., for an integer we want rightmost 4 bytes\n return Arrays.copyOfRange(b, 8 - valueSize, 8 + length - valueSize);\n }", "public static byte[] LongToOpaque(long number) { \n long temp = number; \n byte[] b = new byte[16]; //0-7 time stamp, 8-15 customized \n for (int i = 0; i < 8; i++) { \n b[i] = new Long(temp & 0xff).byteValue();\n temp = temp >> 8; // right shift 8\n } \n return b; \n }", "private long getLong() {\n longBuffer.rewind();\n archive.read(longBuffer);\n longBuffer.flip();\n return longBuffer.getLong();\n }", "public long toLong()\n\t{\n\t\t// holds the int to return\n\t\tlong result = 0;\n\t\t\n\t\t// for every byte value\n\t\tfor (int i = 0; i < bytes.length; i++)\n\t\t{\n\t\t\t// Extract the bits out of the array by \"and\"ing them with the\n\t\t\t// maximum value of\n\t\t\t// a byte. This is done because java does not support unsigned\n\t\t\t// types. Now that the\n\t\t\t// unsigned byte has been extracted, shift it to the right as far as\n\t\t\t// it is needed.\n\t\t\t// Examples:\n\t\t\t// byte array int\n\t\t\t// {0x01, 0x00} = 256\n\t\t\t//\n\t\t\t// byte array int\n\t\t\t// {0x01, 0x8C 0xF0} = 0x018CF0\n\t\t\tresult += (byteToLong(bytes[i]) << (Byte.SIZE * (bytes.length - i - 1)));\n\t\t}\n\t\t\n\t\t// return the int\n\t\treturn result;\n\t}", "String longWrite();", "public final long bytes()\n\t{\n\t\treturn value;\n\t}", "public native long[] __longArrayMethod( long __swiftObject, long[] arg );", "public static byte[] toBytes(final long... numbers) {\n\t\tbyte[] bytes = new byte[numbers.length * 8];\n\t\tfor (int i = 0, j = 0; i < numbers.length; i++, j += 8) {\n\t\t\tSystem.arraycopy(toBytes(numbers[i]), 0, bytes, j, 8);\n\t\t}\n\t\treturn bytes;\n\t}", "public abstract void read_longlong_array(long[] value, int offset, int\nlength);", "long getLongValue();", "long getLongValue();", "long readLong();", "public static long getBytesAsLong(byte[] b) {\n\t\treturn ((long) (b[0] & 0xff) << 56)\n\t\t\t\t| ((long) (b[1] & 0xFF) << 48)\n\t\t\t\t| ((long) (b[2] & 0xFF) << 40)\n\t\t\t\t| ((long) (b[3] & 0xFF) << 32)\n\t\t\t\t| ((long) (b[4] & 0xFF) << 24)\n\t\t\t\t| ((long) (b[5] & 0xFF) << 16)\n\t\t\t\t| ((long) (b[6] & 0xFF) << 8)\n\t\t\t\t| ((long) (b[7] & 0xFF));\n\t}", "public long longValue();", "String longRead();", "private byte[] toByteArray() {\n\n byte[] validUntilBytes = ByteBuffer.allocate(Long.BYTES).putLong(validUntil).array();\n return Tools.concatAllBytes(pseudoniem, validUntilBytes);\n }", "public abstract long read_longlong();", "public long[] toLongArray()\r\n {\r\n long[] a = new long[count];\r\n \r\n VectorItem<O> vi = first;\r\n \r\n for (int i=0;i<=count-1;i++)\r\n {\r\n a[i] = (Long) vi.getObject();\r\n vi = vi.getNext();\r\n }\r\n\r\n return a; \r\n }", "public static byte[] longToBytes(float x) {\n int bits = Float.floatToIntBits(x);\n byte[] buffer = new byte[4];\n buffer[0] = (byte)(bits & 0xff);\n buffer[1] = (byte)((bits >> 8) & 0xff);\n buffer[2] = (byte)((bits >> 16) & 0xff);\n buffer[3] = (byte)((bits >> 24) & 0xff);\n\n return buffer;\n }", "public static long convertToLong(byte[] longBuffer)\r\n {\r\n if (longBuffer.length >= 8)\r\n {\r\n return (((long) longBuffer[0] << 56)\r\n + ((long) (longBuffer[1] & 255) << 48)\r\n + ((long) (longBuffer[2] & 255) << 40)\r\n + ((long) (longBuffer[3] & 255) << 32)\r\n + ((long) (longBuffer[4] & 255) << 24)\r\n + ((longBuffer[5] & 255) << 16)\r\n + ((longBuffer[6] & 255) << 8) + ((longBuffer[7] & 255) << 0));\r\n }\r\n return 0;\r\n }", "public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }", "public abstract int read_long();", "long readS64BE()\n throws IOException, EOFException;", "public static int[] getBytesFromQuadByte(final long longValue) {\n int[] intArray = new int[4];\n\n intArray[0] = (int) ((longValue >>> 3 * BYTE_LENGTH) & BYTE_MASK);\n intArray[1] = (int) ((longValue >>> 2 * BYTE_LENGTH) & BYTE_MASK);\n intArray[2] = (int) ((longValue >>> BYTE_LENGTH) & BYTE_MASK);\n intArray[3] = (int) (longValue & BYTE_MASK);\n\n return intArray;\n }", "public static long readlong()\n\t{\n\t\treturn sc.nextLong();\n\t}", "public native byte[] __byteArrayMethod( long __swiftObject, byte[] arg );", "private long read_long(MappedByteBuffer buff) throws IOException {\n long number = 0;\n for (int i = 0; i < 8; ++i) {\n number += ((long) (buff.get() & 0xFF)) << (8 * i);\n }\n return number;\n }", "public long longValue() {\n return value;\n }", "public long readLong() throws IOException;", "public ByteArray(final long value)\n\t{\n\t\t// create the array\n\t\tthis.bytes = new byte[8];\n\t\t\n\t\t// for every byte\n\t\tfor (int i = 0; i < 8; i++)\n\t\t{\n\t\t\t// assign the array of bytes\n\t\t\tthis.bytes[i] = (byte) (value >> ((7 - i) * 8));\n\t\t}\n\t}", "public static byte[] longToByteArray_ASN1_Value(long toBeConverted) {\n\t\t\t\n\t\t\t//create the temporary version of what will be returned\n\t\t\tbyte[] tempToBeReturned = {\n\t\t\t\t\t(byte)(toBeConverted >> 56),\n\t\t\t\t\t(byte)(toBeConverted >> 48),\n\t\t\t\t\t(byte)(toBeConverted >> 40),\n\t\t\t\t\t(byte)(toBeConverted >> 32),\n\t\t\t\t\t(byte)(toBeConverted >> 24),\n\t\t\t\t\t(byte)(toBeConverted >> 16),\n\t\t\t\t\t(byte)(toBeConverted >> 8),\n\t\t\t\t\t(byte)toBeConverted};\n\t\t\t\n\t\t\t\n\t\t\t//converting positive long values\n\t\t\tif(toBeConverted >= 0) {\n\t\t\t\t//0 to 127: return only one octet\n\t\t\t\tif(toBeConverted<=127) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[1];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[7];\t\t\t\t\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//128 to 32768-1 return two octets\n\t\t\t\telse if(toBeConverted<=32767) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[2];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[6];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//32767 to 8388607 return three octets\n\t\t\t\telse if(toBeConverted<=8388607) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[3];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[5];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//8388608 to 2147483647 return four octets\n\t\t\t\telse if(toBeConverted<=2147483647) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[4];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[4];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//the value 0 if x == y; a value less than 0 if x < y; and a value greater than 0 if x > y\n\t\t\t\t//2147483648 to 549755813887 return five octets\n\t\t\t\telse if((Long.compare(toBeConverted, 549755813888L))<0) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[5];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[3];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[4];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[4] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//549755813888 to 140737488355327 return six octets\n\t\t\t\telse if((Long.compare(toBeConverted, 140737488355328L))<0) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[6];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[2];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[3];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[4];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[4] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[5] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//140737488355328 to 36028797018963967 return seven octets\n\t\t\t\telse if((Long.compare(toBeConverted, 36028797018963967L))<0) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[7];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[1];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[2];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[3];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[4];\n\t\t\t\t\ttoBeReturned[4] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[5] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[6] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//above: return eight octets\n\t\t\t\telse {\n\t\t\t\t\treturn tempToBeReturned;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t//converting negative long values\n\t\t\telse if(toBeConverted<0) {\n\t\t\t\t//-1 to -128 1 octet \n\t\t\t\tif(toBeConverted>=-128) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[1];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[7];\t\t\t\t\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-129 to -32768 2 octets\n\t\t\t\telse if(toBeConverted>=-32768) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[2];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[6];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-32769 to -8388608 3 octets\n\t\t\t\telse if(toBeConverted>=-8388608) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[3];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[5];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//-8388609 to -2147483648 4 octets\n\t\t\t\telse if(toBeConverted>=-2147483648) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[4];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[4];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//the value 0 if x == y; a value less than 0 if x < y; and a value greater than 0 if x > y\n\t\t\t\t//-2147483649 to -549755813888 5 octets \n\t\t\t\telse if((Long.compare(toBeConverted, -549755813889L))>0) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[5];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[3];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[4];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[4] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-549755813889 to -140737488355328 6 octets\n\t\t\t\telse if((Long.compare(toBeConverted, -140737488355329L))>0) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[6];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[2];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[3];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[4];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[4] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[5] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//-140737488355329 to 36028797018963968 7 octets\n\t\t\t\telse if((Long.compare(toBeConverted, -36028797018963969L))>0) {\n\t\t\t\t\tbyte[] toBeReturned = new byte[7];\n\t\t\t\t\ttoBeReturned[0] = tempToBeReturned[1];\t\t\t\t\n\t\t\t\t\ttoBeReturned[1] = tempToBeReturned[2];\n\t\t\t\t\ttoBeReturned[2] = tempToBeReturned[3];\n\t\t\t\t\ttoBeReturned[3] = tempToBeReturned[4];\n\t\t\t\t\ttoBeReturned[4] = tempToBeReturned[5];\n\t\t\t\t\ttoBeReturned[5] = tempToBeReturned[6];\n\t\t\t\t\ttoBeReturned[6] = tempToBeReturned[7];\n\t\t\t\t\treturn toBeReturned;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//below that: 8 octets\n\t\t\t\telse {\n\t\t\t\t\treturn tempToBeReturned;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//if method fails for any reason, it returns null\n\t\t\treturn null;\n\t\t}", "public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return instance.getLongTokenBytes();\n }", "public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return instance.getLongTokenBytes();\n }", "void writeLongs(long[] l, int off, int len) throws IOException;", "public static Bytes bytes(final long bytes)\n\t{\n\t\treturn new Bytes(bytes);\n\t}", "long[] getBuffer() {\n\t\treturn buffer;\n\t}", "Long mo20729a();", "abstract public long[] getBlockListAsLongs();", "public abstract void read_ulonglong_array(long[] value, int offset, int\nlength);", "public long longValue() {\r\n return intValue();\r\n }", "public long getValue();", "public static long asn1Value_ByteArrayToLong(byte[] asn1LongValue) throws ValueNullException, ValueTooBigException {\n\t\t//check if the array is null\n\t\tif(asn1LongValue == null) {\n\t\t\tthrow new ValueNullException(\"The input is null, not an encoded long\");\n\t\t}\n\t\t//check if the value 0 has been encoded\n\t\tif((asn1LongValue[0] == 0) && (asn1LongValue.length == 1) ) {\n\t\t\treturn 0L;\n\t\t}\n\t\t//check if the value is too long to be converted to a long\n\t\tif((asn1LongValue.length>8)) {\n\t\t\tthrow new ValueTooBigException(\"Java long can only hold 64 bits or 8 octets. The passed value is bigger than that\");\n\t\t}\n\t\t\n\t\tBigInteger tmpLong = new BigInteger(asn1LongValue);\n\t\treturn tmpLong.longValue();\n\t}", "public static byte[] intToBytes(int i) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_INT);\n byteBuffer.putInt(i);\n return byteBuffer.array();\n\n }", "public long longValue() {\n return number;\n }", "public byte[] getByteArray(){\r\n\r\n byte[] b = new byte[0x54];\r\n\r\n System.arraycopy(PID_pointer, 0, b, 0, 4);\r\n System.arraycopy(MPID_pointer, 0, b, 4, 4);\r\n System.arraycopy(Null_pointer, 0, b, 8, 4);\r\n System.arraycopy(Portrait_pointer, 0, b, 12, 4);\r\n System.arraycopy(Class_pointer, 0, b, 16, 4);\r\n System.arraycopy(Affiliation_pointer, 0, b, 20, 4);\r\n System.arraycopy(Weaponlevel_pointer, 0, b, 24, 4);\r\n System.arraycopy(Skill1_pointer, 0, b, 28, 4);\r\n System.arraycopy(Skill2_pointer, 0, b, 32, 4);\r\n System.arraycopy(Skill3_pointer, 0, b, 36, 4);\r\n System.arraycopy(Animation1_pointer, 0, b, 40, 4);\r\n System.arraycopy(Animation2_pointer, 0, b, 44, 4);\r\n b[48] = unknownbyte1;\r\n b[49] = unknownbyte2;\r\n b[50] = unknownbyte3;\r\n b[51] = unknownbyte4;\r\n b[52] = unknownbyte5;\r\n b[53] = unknownbyte6;\r\n b[54] = level;\r\n b[55] = build;\r\n b[56] = weight;\r\n System.arraycopy(bases, 0, b, 57, 8);\r\n System.arraycopy(growths, 0, b, 65, 8);\r\n System.arraycopy(supportgrowth, 0, b, 73, 8);\r\n b[81] = unknownbyte9;\r\n b[82] = unknownbyte10;\r\n b[83] = unknownbyte11;\r\n\r\n return b;\r\n }", "private final long get_BIGINT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos())\n return dataBuffer_.getLong(columnDataPosition_[column - 1]);\n else\n return dataBuffer_.getLongLE(columnDataPosition_[column - 1]);\n// return SignedBinary.getLong(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }", "public static long toInt64(byte[] value, int startIndex) {\r\n\t\treturn ByteBuffer.wrap(value, startIndex, 8).order(ByteOrder.LITTLE_ENDIAN).getLong();\r\n\t}", "public byte[] intToBytes(int x) {\n\t\tByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES);\n\t\tbuffer.putInt(x);\n\t\treturn buffer.array();\n\t}", "public abstract void read_long_array(int[] value, int offset, int\nlength);", "@Test\n public void testReadWriteLong() {\n System.out.println(\"readLong\");\n ByteArray instance = new ByteArray();\n \n instance.writeLong(12, 0);\n instance.writeLong(12345678, 8);\n instance.writeLong(13, instance.compacity());\n \n assertEquals(12, instance.readLong(0));\n assertEquals(12345678, instance.readLong(8));\n assertEquals(13, instance.readLong(instance.compacity() - 8));\n \n instance.writeLong(14, 8);\n assertEquals(14, instance.readLong(8));\n }", "public abstract long read_ulonglong();", "long readLong() throws IOException;", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default long asLong() {\n \n return notSupportedCast(BasicTypeID.LONG);\n }", "private static BIG byte_to_BIG(byte [] array){\n BIG result = new BIG();\n long[] long_ = new long[4];\n for(int i=long_.length; i > 0;i--){\n long_[i-1] =\n ((array[i*7-3] & 0xFFL) << 48) |\n ((array[i*7-2] & 0xFFL) << 40) |\n ((array[i*7-1] & 0xFFL) << 32) |\n ((array[i*7] & 0xFFL) << 24) | \n ((array[i*7+1] & 0xFFL) << 16) | \n ((array[i*7+2] & 0xFFL) << 8) | \n ((array[i*7+3] & 0xFFL) << 0) ; \n }\n int int_ = \n (int) (((array[0] & 0xFFL) << 24) |\n\t\t ((array[1] & 0xFFL) << 16) |\n\t\t ((array[2] & 0xFFL) << 8) |\n\t\t ((array[3] & 0xFFL) << 0)) ;\n \n long[] temp = {long_[3],long_[2],long_[1],long_[0],int_};\n\n result = new BIG(temp);\n return result;\n }", "public long toLong() {\n return nano;\n }", "public long longValue() {\n return this.value;\n }", "long getELong();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default byte[] asByteArray() {\n //TODO this is actually sbyte[], but @Unsigned doesn't work on arrays right now\n return notSupportedCast(\"byte[]\");\n }", "public long getData() {\n return data;\n }", "public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(longToken_);\n }", "public com.google.protobuf.ByteString\n getLongTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(longToken_);\n }", "public long getLongValue() {\n return longValue_;\n }", "long fetch64(BytesStore bytes, @NonNegative long off) throws IllegalStateException, BufferUnderflowException {\n return bytes.readLong(off);\n }", "void writeLong(long value);", "public byte[] toByteArray() {\n byte[] array = new byte[count];\n System.arraycopy(buf, 0, array, 0, count);\n return array;\n }", "public static int writeLong(byte[] target, int offset, long value) {\n target[offset] = (byte) (value >>> 56);\n target[offset + 1] = (byte) (value >>> 48);\n target[offset + 2] = (byte) (value >>> 40);\n target[offset + 3] = (byte) (value >>> 32);\n target[offset + 4] = (byte) (value >>> 24);\n target[offset + 5] = (byte) (value >>> 16);\n target[offset + 6] = (byte) (value >>> 8);\n target[offset + 7] = (byte) value;\n return Long.BYTES;\n }", "public long getLongValue() {\n return longValue_;\n }", "public static long toLong(byte[] macAddress) {\n return MACAddress.valueOf(macAddress).toLong();\n }", "private long read_long(RandomAccessFile file) throws IOException {\n long number = 0;\n for (int i = 0; i < 8; ++i) {\n number += ((long) (file.readByte() & 0xFF)) << (8 * i);\n }\n return number;\n }", "public static long toNumber(final byte[] bytes) {\n\t\treturn toNumber(bytes, 0, bytes.length);\n\t}", "public long getLongValue() {\n if (getValueIndex() <= 0)\n return 0L;\n return ((LongEntry) getPool().getEntry(getValueIndex())).getValue();\n }", "public static long consecutiveBytesAsLong(byte... bytes) {\r\n\t\tlong result = 0;\r\n\t\tfor(int i=0; i<bytes.length; i++) {\r\n\t\t\tint shiftFactor = 8 * (bytes.length - (i + 1));\r\n\t\t\tresult += bytes[i] << shiftFactor;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "long mo25074b();", "public long readLong() throws IOException {\n return in.readLong();\n }", "static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }", "public static long getBytesOut() {\n return bytesOut;\n }" ]
[ "0.74947864", "0.7425163", "0.7161992", "0.69416684", "0.6816421", "0.6795225", "0.6776985", "0.6747312", "0.6649649", "0.6608364", "0.65746397", "0.653996", "0.65319645", "0.6531292", "0.6527978", "0.64334595", "0.6402421", "0.63899547", "0.63899547", "0.63537925", "0.6352695", "0.6348675", "0.63365954", "0.63117903", "0.62976015", "0.62827814", "0.62569046", "0.6210124", "0.62036616", "0.6174017", "0.6145391", "0.60628706", "0.5996169", "0.5989267", "0.5989267", "0.5981267", "0.59771734", "0.59495103", "0.5895111", "0.58672816", "0.58667904", "0.58298784", "0.5749227", "0.5744792", "0.5721946", "0.57110995", "0.5695191", "0.5694839", "0.56928736", "0.56763065", "0.56631005", "0.5641074", "0.56257004", "0.5613869", "0.5612359", "0.56088394", "0.56088394", "0.56047255", "0.5588501", "0.55863595", "0.55529517", "0.55449766", "0.5544445", "0.55412686", "0.5534908", "0.5516511", "0.5507127", "0.5497025", "0.54945403", "0.5492065", "0.5490613", "0.5486213", "0.54776424", "0.5471475", "0.5459373", "0.54483825", "0.5447241", "0.54436636", "0.54369247", "0.5436093", "0.5426535", "0.54045475", "0.53966635", "0.53915745", "0.53915745", "0.53902304", "0.5380371", "0.5380047", "0.5378793", "0.5375862", "0.53728586", "0.53611815", "0.5360709", "0.5348446", "0.5340555", "0.53357214", "0.53349805", "0.5325137", "0.53119", "0.5309176" ]
0.73811543
2
Returns a long from a given byte array.
public static long getBytesAsLong(byte[] b) { return ((long) (b[0] & 0xff) << 56) | ((long) (b[1] & 0xFF) << 48) | ((long) (b[2] & 0xFF) << 40) | ((long) (b[3] & 0xFF) << 32) | ((long) (b[4] & 0xFF) << 24) | ((long) (b[5] & 0xFF) << 16) | ((long) (b[6] & 0xFF) << 8) | ((long) (b[7] & 0xFF)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static long bytesToLong(byte[] bytes) {\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);\n return byteBuffer.getLong();\n\n }", "public static long byteArrayToLong(byte[] ba, int offset) {\n long value = 0;\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n return value;\n }", "public long toLong()\n\t{\n\t\t// holds the int to return\n\t\tlong result = 0;\n\t\t\n\t\t// for every byte value\n\t\tfor (int i = 0; i < bytes.length; i++)\n\t\t{\n\t\t\t// Extract the bits out of the array by \"and\"ing them with the\n\t\t\t// maximum value of\n\t\t\t// a byte. This is done because java does not support unsigned\n\t\t\t// types. Now that the\n\t\t\t// unsigned byte has been extracted, shift it to the right as far as\n\t\t\t// it is needed.\n\t\t\t// Examples:\n\t\t\t// byte array int\n\t\t\t// {0x01, 0x00} = 256\n\t\t\t//\n\t\t\t// byte array int\n\t\t\t// {0x01, 0x8C 0xF0} = 0x018CF0\n\t\t\tresult += (byteToLong(bytes[i]) << (Byte.SIZE * (bytes.length - i - 1)));\n\t\t}\n\t\t\n\t\t// return the int\n\t\treturn result;\n\t}", "public static long byteArrayToUnsignedLong(byte @NotNull [] data) {\n return byteArrayToUnsignedLong(data, 0, Endian.BIG, LONG_WIDTH);\n }", "public static long readLong(byte[] source, int position) {\n return makeLong(source[position], source[position + 1], source[position + 2], source[position + 3],\n source[position + 4], source[position + 5], source[position + 6], source[position + 7]);\n }", "public static long toInt64(byte[] value) {\r\n\t\treturn toInt16(value, 0);\r\n\t}", "public static long toLong(byte[] macAddress) {\n return MACAddress.valueOf(macAddress).toLong();\n }", "public long b2l(byte[] b, int offset) {\n return (b[offset + 7] & 0xFF)\n | ((b[offset + 6] & 0xFF) << 8)\n | ((b[offset + 5] & 0xFF) << 16)\n | ((b[offset + 4] & 0xFF) << 24)\n | ((b[offset + 3] & 0xFF) << 32)\n | ((b[offset + 2] & 0xFF) << 40)\n | ((b[offset + 1] & 0xFF) << 48)\n | ((b[offset] & 0xFF) << 56);\n }", "public static long convertToLong(byte[] longBuffer)\r\n {\r\n if (longBuffer.length >= 8)\r\n {\r\n return (((long) longBuffer[0] << 56)\r\n + ((long) (longBuffer[1] & 255) << 48)\r\n + ((long) (longBuffer[2] & 255) << 40)\r\n + ((long) (longBuffer[3] & 255) << 32)\r\n + ((long) (longBuffer[4] & 255) << 24)\r\n + ((longBuffer[5] & 255) << 16)\r\n + ((longBuffer[6] & 255) << 8) + ((longBuffer[7] & 255) << 0));\r\n }\r\n return 0;\r\n }", "public static long toNumber(final byte[] bytes) {\n\t\treturn toNumber(bytes, 0, bytes.length);\n\t}", "public static long byteArrayToLong(byte[] bytes, int size) {\n return byteArrayToLong(bytes, size, true);\n }", "public static long getLong(final byte[] buffer, final int index, final int len) {\n switch (len) {\n case 0: return 0xFFFFFFFF_FFFFFFFFL;\n case 1: return 0xFFFFFFFF_FFFFFF00L | _getByte(buffer, index, 1);\n case 2: return 0xFFFFFFFF_FFFF0000L | _getShort(buffer, index, 2);\n case 3: return 0xFFFFFFFF_FF000000L | _getInt(buffer, index, 3);\n case 4: return 0xFFFFFFFF_00000000L | _getInt(buffer, index, 4);\n case 5: return 0xFFFFFF00_00000000L | _getLong(buffer, index, 5);\n case 6: return 0xFFFF0000_00000000L | _getLong(buffer, index, 6);\n case 7: return 0xFF000000_00000000L | _getLong(buffer, index, 7);\n case 8: return _getLong(buffer, index, 8);\n default: throw new IllegalArgumentException(\"len is out of range: \" + len);\n }\n }", "public static long byteArrayToUnsignedLong(byte @NotNull [] data, int offset) {\n return byteArrayToUnsignedLong(data, offset, Endian.BIG, LONG_WIDTH);\n }", "public static long consecutiveBytesAsLong(byte... bytes) {\r\n\t\tlong result = 0;\r\n\t\tfor(int i=0; i<bytes.length; i++) {\r\n\t\t\tint shiftFactor = 8 * (bytes.length - (i + 1));\r\n\t\t\tresult += bytes[i] << shiftFactor;\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public static long byteArrayToLong(byte[] bytes, int size, boolean bigEndian) {\n if (size > 8) {\n throw new IllegalArgumentException(\"Can't convert more than 8 bytes.\");\n }\n if (size > bytes.length) {\n throw new IllegalArgumentException(\"Size can't be larger than array length.\");\n }\n long total = 0L;\n for (int i = 0; i < size; i++) {\n if (bigEndian) {\n total = total << 8 | bytes[i] & 0xff;\n } else {\n total = total << 8 | bytes[size - i - 1] & 0xff;\n }\n }\n return total;\n }", "private long convertByteValueToLong(byte[] b) {\n long m = 0;\n for (int i = 0; i < b.length; i++) {\n m = m * 256 + (b[i] < 0 ? (256 + (long) b[i]) : b[i]);\n }\n return m;\n }", "long decodeLong();", "public static long asn1Value_ByteArrayToLong(byte[] asn1LongValue) throws ValueNullException, ValueTooBigException {\n\t\t//check if the array is null\n\t\tif(asn1LongValue == null) {\n\t\t\tthrow new ValueNullException(\"The input is null, not an encoded long\");\n\t\t}\n\t\t//check if the value 0 has been encoded\n\t\tif((asn1LongValue[0] == 0) && (asn1LongValue.length == 1) ) {\n\t\t\treturn 0L;\n\t\t}\n\t\t//check if the value is too long to be converted to a long\n\t\tif((asn1LongValue.length>8)) {\n\t\t\tthrow new ValueTooBigException(\"Java long can only hold 64 bits or 8 octets. The passed value is bigger than that\");\n\t\t}\n\t\t\n\t\tBigInteger tmpLong = new BigInteger(asn1LongValue);\n\t\treturn tmpLong.longValue();\n\t}", "public static long toInt64(byte[] value, int startIndex) {\r\n\t\treturn ByteBuffer.wrap(value, startIndex, 8).order(ByteOrder.LITTLE_ENDIAN).getLong();\r\n\t}", "public abstract void read_longlong_array(long[] value, int offset, int\nlength);", "private long getNumberBufAsLong(ByteOrder byteOrder, int nrReadBytes,\n int firstBytePos) {\n\n long result = 0L;\n long bytePortion = 0L;\n for (int i = 0; i < nrReadBytes; i++) {\n bytePortion = 0xFF & (byteBuffer.get(firstBytePos++));\n\n if (byteOrder == ByteOrder.LittleEndian)\n // reshift bytes\n result = result | bytePortion << (i << 3);\n else\n result = bytePortion << ((nrReadBytes - i - 1) << 3) | result;\n }\n\n return result;\n }", "private long byteToLong(byte b)\n\t{\n\t\treturn (b & 0xFF);\n\t}", "public abstract void read_long_array(int[] value, int offset, int\nlength);", "public abstract void read_ulonglong_array(long[] value, int offset, int\nlength);", "private static long getLongLittleEndian(byte[] buf, int offset) {\n return ((long) buf[offset + 7] << 56) | ((buf[offset + 6] & 0xffL) << 48)\n | ((buf[offset + 5] & 0xffL) << 40) | ((buf[offset + 4] & 0xffL) << 32)\n | ((buf[offset + 3] & 0xffL) << 24) | ((buf[offset + 2] & 0xffL) << 16)\n | ((buf[offset + 1] & 0xffL) << 8) | ((buf[offset] & 0xffL));\n }", "@Override\n\tpublic int decode(byte[] buffer, int offset) throws IOException {\n\t\tlong value = NeuronReader.readRawInt64(buffer, offset);\n\t\tunionCache.setLong(fieldIndex, value);\n\n\t\treturn NeuronReader.LONG_SIZE;\n\t}", "public static long toNumber(final byte[] bytes, final int start, final int end) {\n\t\tlong result = 0;\n\t\tfor (int i = start; i < end; i++) {\n\t\t\tresult = (result << 8) | (bytes[i] & 0xff);\n\t\t}\n\t\treturn result;\n\t}", "private long m674a(byte[] bArr) {\n return ((((long) bArr[7]) & 255) << 56) | ((((long) bArr[6]) & 255) << 48) | ((((long) bArr[5]) & 255) << 40) | ((((long) bArr[4]) & 255) << 32) | ((((long) bArr[3]) & 255) << 24) | ((((long) bArr[2]) & 255) << 16) | ((((long) bArr[1]) & 255) << 8) | (255 & ((long) bArr[0]));\n }", "public static long byteToUnsignedLong(byte b) {\n return b & 0xff;\n }", "private long getLong() {\n longBuffer.rewind();\n archive.read(longBuffer);\n longBuffer.flip();\n return longBuffer.getLong();\n }", "static int fromArray(byte[] payload) {\n return payload[0] << 24 | (payload[1] & 0xFF) << 16 | (payload[2] & 0xFF) << 8 | (payload[3] & 0xFF);\n }", "@Override\n public long applyAsLong(BytesStore bytes) {\n return applyAsLong(bytes, bytes.readRemaining());\n }", "public static int readNumberFromBytes(byte[] data) {\n return readNumberFromBytes(data, data.length, 0);\n }", "private long read_long(MappedByteBuffer buff) throws IOException {\n long number = 0;\n for (int i = 0; i < 8; ++i) {\n number += ((long) (buff.get() & 0xFF)) << (8 * i);\n }\n return number;\n }", "private static BIG byte_to_BIG(byte [] array){\n BIG result = new BIG();\n long[] long_ = new long[4];\n for(int i=long_.length; i > 0;i--){\n long_[i-1] =\n ((array[i*7-3] & 0xFFL) << 48) |\n ((array[i*7-2] & 0xFFL) << 40) |\n ((array[i*7-1] & 0xFFL) << 32) |\n ((array[i*7] & 0xFFL) << 24) | \n ((array[i*7+1] & 0xFFL) << 16) | \n ((array[i*7+2] & 0xFFL) << 8) | \n ((array[i*7+3] & 0xFFL) << 0) ; \n }\n int int_ = \n (int) (((array[0] & 0xFFL) << 24) |\n\t\t ((array[1] & 0xFFL) << 16) |\n\t\t ((array[2] & 0xFFL) << 8) |\n\t\t ((array[3] & 0xFFL) << 0)) ;\n \n long[] temp = {long_[3],long_[2],long_[1],long_[0],int_};\n\n result = new BIG(temp);\n return result;\n }", "long fetch64(BytesStore bytes, @NonNegative long off) throws IllegalStateException, BufferUnderflowException {\n return bytes.readLong(off);\n }", "public final long getLong(final boolean endianess) throws IOException {\r\n b1 = (tagBuffer[bPtr] & 0xff);\r\n b2 = (tagBuffer[bPtr + 1] & 0xff);\r\n b3 = (tagBuffer[bPtr + 2] & 0xff);\r\n b4 = (tagBuffer[bPtr + 3] & 0xff);\r\n b5 = (tagBuffer[bPtr + 4] & 0xff);\r\n b6 = (tagBuffer[bPtr + 5] & 0xff);\r\n b7 = (tagBuffer[bPtr + 6] & 0xff);\r\n b8 = (tagBuffer[bPtr + 7] & 0xff);\r\n\r\n long tmpLong;\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n tmpLong = ( ((long) b1 << 56) | ((long) b2 << 48) | ((long) b3 << 40) | ((long) b4 << 32)\r\n | ((long) b5 << 24) | ((long) b6 << 16) | ((long) b7 << 8) | b8);\r\n } else {\r\n tmpLong = ( ((long) b8 << 56) | ((long) b7 << 48) | ((long) b6 << 40) | ((long) b5 << 32)\r\n | ((long) b4 << 24) | ((long) b3 << 16) | ((long) b2 << 8) | b1);\r\n }\r\n\r\n bPtr += 8;\r\n\r\n return (tmpLong);\r\n }", "public native static long getConvertBytes();", "public long toLong() {\n return this.toLongArray()[0];\n }", "long readLong();", "public static int putLong(byte[] bytes, int offset, long val) {\n if (bytes.length - offset < SIZEOF_LONG) {\n throw new IllegalArgumentException(\"Not enough room to put a long at\"\n + \" offset \" + offset + \" in a \" + bytes.length + \" byte array\");\n }\n\n for(int i = offset + 7; i > offset; i--) {\n bytes[i] = (byte) val;\n val >>>= 8;\n }\n bytes[offset] = (byte) val;\n return offset + SIZEOF_LONG;\n\n }", "static final long get32(byte b[], int off) {\n return get16(b, off) | ((long) get16(b, off + 2) << 16);\n }", "public static int bytesToInt(byte[] bytes,int offset,int length) {\n ByteBuffer byteBuffer = ByteBuffer.wrap(bytes,offset,length);\n return byteBuffer.getInt();\n\n }", "private long m10259a(byte[] bArr) {\r\n return ((((((((((long) bArr[7]) & 255) << 56) | ((((long) bArr[6]) & 255) << 48)) | ((((long) bArr[5]) & 255) << 40)) | ((((long) bArr[4]) & 255) << 32)) | ((((long) bArr[3]) & 255) << 24)) | ((((long) bArr[2]) & 255) << 16)) | ((((long) bArr[1]) & 255) << 8)) | (((long) bArr[0]) & 255);\r\n }", "long readLong() throws IOException;", "public long[] read();", "private static int getIntFromByteArray(byte[] bytes)\r\n {\r\n int val = 0;\r\n for (int i=0; i<4; i++)\r\n {\r\n val = (val << 8) - Byte.MIN_VALUE + bytes[i];\r\n }\r\n return val;\r\n }", "public static long read(byte[] buffer, long offset, long length) {\n offset =0;\n long result = 0 ;\n int shift_count = 0 ;\n\n while ( length -- > 0 ) {\n int temp = buffer[(int) offset++] & 0xFF;\n result |= temp << shift_count ;\n shift_count += 8;\n }\n return(result);\n }", "@SuppressWarnings(\"cast\")\n public static long makeLong(int b1, int b2, int b3, int b4, int b5, int b6, int b7, int b8) {\n return ((long) b1 << 56) +\n ((long) (b2 & 255) << 48) +\n ((long) (b3 & 255) << 40) +\n ((long) (b4 & 255) << 32) +\n ((long) (b5 & 255) << 24) +\n (long) ((b6 & 255) << 16) +\n (long) ((b7 & 255) << 8) +\n (long) ((b8 & 255));\n }", "public int read(long[] l) throws IOException {\n\t\treturn read(l, 0, l.length);\n\t}", "private long read_long(RandomAccessFile file) throws IOException {\n long number = 0;\n for (int i = 0; i < 8; ++i) {\n number += ((long) (file.readByte() & 0xFF)) << (8 * i);\n }\n return number;\n }", "public long readLong() throws IOException;", "public long getAsLong(int index) {\n switch (type) {\n case TIFFTag.TIFF_BYTE: case TIFFTag.TIFF_UNDEFINED:\n return ((byte[])data)[index] & 0xff;\n case TIFFTag.TIFF_SBYTE:\n return ((byte[])data)[index];\n case TIFFTag.TIFF_SHORT:\n return ((char[])data)[index] & 0xffff;\n case TIFFTag.TIFF_SSHORT:\n return ((short[])data)[index];\n case TIFFTag.TIFF_SLONG:\n return ((int[])data)[index];\n case TIFFTag.TIFF_LONG: case TIFFTag.TIFF_IFD_POINTER:\n return ((long[])data)[index];\n case TIFFTag.TIFF_SRATIONAL:\n int[] ivalue = getAsSRational(index);\n return (long)((double)ivalue[0]/ivalue[1]);\n case TIFFTag.TIFF_RATIONAL:\n long[] lvalue = getAsRational(index);\n return (long)((double)lvalue[0]/lvalue[1]);\n case TIFFTag.TIFF_ASCII:\n String s = ((String[])data)[index];\n return (long)Double.parseDouble(s);\n default:\n throw new ClassCastException();\n }\n }", "public void testGetLongLE() {\n byte[] array = new byte[] {\n 0x78, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,\n -0x1, -0x1, -0x1, -0x1, -0x1, -0x1, -0x1, 0x7F\n };\n // end::noformat\n BytesReference ref = new BytesArray(array, 0, array.length);\n assertThat(ref.getLongLE(0), equalTo(888L));\n assertThat(ref.getLongLE(8), equalTo(Long.MAX_VALUE));\n Exception e = expectThrows(ArrayIndexOutOfBoundsException.class, () -> ref.getLongLE(9));\n assertThat(e.getMessage(), equalTo(\"Index 9 out of bounds for length 9\"));\n }", "public long readAsLong(int nrBits) {\n return readAsLong(bitPos, nrBits, ByteOrder.BigEndian);\n }", "private Integer extractByteFromLong(final Long longvalue, final Byte offset) {\n\t\tfinal Long mask = 0xFFL << ((long) offset * 0x8L);\n\t\tfinal Long tmpval = longvalue & mask;\n\t\tfinal Long ret = (tmpval >>> ((long) offset * 0x8L));\n\t\treturn ret.intValue();\n\t}", "public int read(long[] l, int start, int len) throws IOException {\n\n\t\tint i = start;\n\t\ttry {\n\t\t\tfor (; i < start + len; i += 1) {\n\t\t\t\tif (count - pos < 8) {\n\t\t\t\t\tfillBuf(8);\n\t\t\t\t}\n\t\t\t\tint i1 = buf[pos] << 24 | (buf[pos + 1] & 0xFF) << 16\n\t\t\t\t\t\t| (buf[pos + 2] & 0xFF) << 8 | (buf[pos + 3] & 0xFF);\n\t\t\t\tint i2 = buf[pos + 4] << 24 | (buf[pos + 5] & 0xFF) << 16\n\t\t\t\t\t\t| (buf[pos + 6] & 0xFF) << 8 | (buf[pos + 7] & 0xFF);\n\t\t\t\tl[i] = ((long) i1) << 32 | ((long) i2 & 0x00000000FFFFFFFFL);\n\t\t\t\tpos += 8;\n\t\t\t}\n\n\t\t} catch (EOFException e) {\n\t\t\treturn eofCheck(e, i, start, 8);\n\t\t}\n\t\treturn 8 * len;\n\t}", "public static int bytesToInt(byte[] bytes) {\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);\n return byteBuffer.getInt();\n\n }", "public long getLongFromMemory(long number){\n\t\tif (number % 8L != 0L){\n\t\t\tSystem.out.println(\"Wrong number for access in memory\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tlong l1 = 0L;\n\t\ttry{\n\t\t\tint i = memory[((int)number / 4)];\n\t\t\tint j = memory[(((int)number + 4) / 4)];\n\t\t\tlong l3 = i;\n\t\t\tl3 &= 0xFFFFFFFFL; //bitwise AND with FFFFFFFF long\n\t\t\tlong l2 = j; \n\t\t\tl2 <<= 32;\t\t//shift 32 bits to left\n\t\t\tl1 = l2 | l3; \t//bitwise OR to get the result\n\t\t}\n\t\tcatch (Exception e){\n\t\t\tSystem.out.println(e.getMessage());\n\t\t\tSystem.exit(0);\n\t\t}\n\t\treturn l1;\n\t}", "protected final long getLong(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getLong(tableData, cursor+offset);\n }", "public static LongArrayBitVector wrap( final long[] array ) {\n\t\treturn wrap( array, (long)array.length * Long.SIZE );\n\t}", "protected long _getLongLE(int index)\r\n/* 411: */ {\r\n/* 412:425 */ return HeapByteBufUtil.getLongLE(this.array, index);\r\n/* 413: */ }", "public abstract int read_long();", "public static int convertToInt32(byte[] bytes)\r\n {\r\n if (bytes.length >= 4)\r\n {\r\n return (((bytes[0] & 0xff) << 24) + ((bytes[1] & 0xff) << 16)\r\n + ((bytes[2] & 0xff) << 8) + ((bytes[3] & 0xff) << 0));\r\n }\r\n return 0;\r\n }", "@Test\n public void testByteArray2Integer() {\n System.out.println(\"byteArray2Integer\");\n SntParser instance = new SntParser();\n byte[] array = {0x20, 0x00, 0x30, 0x34};\n int start = 0;\n int length = 3;\n int expResult = 0x200030;\n int result = byteArray2Integer(array, start, length);\n assertEquals(expResult, result);\n }", "public static final int m64148E(@C6003d byte[] bArr, @C6003d C6080l<? super Byte, Integer> lVar) {\n C14445h0.m62478f(bArr, \"$receiver\");\n C14445h0.m62478f(lVar, \"selector\");\n int i = 0;\n for (byte valueOf : bArr) {\n i += ((Number) lVar.invoke(Byte.valueOf(valueOf))).intValue();\n }\n return i;\n }", "public static long ipToLong(String ipAddress) {\n\n\t\tString[] ipAddressInArray = ipAddress.split(\"\\\\.\");\n\n\t\tlong result = 0;\n\t\tfor (int i = 0; i < ipAddressInArray.length; i++) {\n\n\t\t\tint power = 3 - i;\n\t\t\tint ip = Integer.parseInt(ipAddressInArray[i]);\n\t\t\tresult += ip * Math.pow(256, power);\n\n\t\t}\n\n\t\treturn result;\n\t}", "public static long parse(String s) throws NumberFormatException {\n return parse(s, ByteUnit.B);\n }", "public static long[] splitHash(byte[] hash) {\n if (hash == null || hash.length != 16) {\n return new long[]{0L, 0L};\n }\n\n ByteBuffer buffer = ByteBuffer.wrap( hash );\n long[] ret = new long[2];\n ret[0] = buffer.getLong();\n ret[1] = buffer.getLong();\n\n\n return ret;\n }", "protected long _getLong(int index)\r\n/* 400: */ {\r\n/* 401:414 */ return HeapByteBufUtil.getLong(this.array, index);\r\n/* 402: */ }", "public static JobID fromByteArray(byte[] bytes) {\n return new JobID(bytes);\n }", "public static Long toLong(Object o,byte type) throws ExecException {\n try {\n switch (type) {\n case BOOLEAN:\n if (((Boolean)o) == true) {\n return Long.valueOf(1);\n } else {\n return Long.valueOf(0);\n }\n\n case BYTE:\n return Long.valueOf(((Byte)o).longValue());\n\n case INTEGER:\n return Long.valueOf(((Integer)o).longValue());\n\n case LONG:\n return (Long)o;\n\n case FLOAT:\n return Long.valueOf(((Float)o).longValue());\n\n case DOUBLE:\n return Long.valueOf(((Double)o).longValue());\n\n case BYTEARRAY:\n return Long.valueOf(((DataByteArray)o).toString());\n\n case CHARARRAY:\n return Long.valueOf((String)o);\n\n case BIGINTEGER:\n return Long.valueOf(((BigInteger)o).longValue());\n\n case BIGDECIMAL:\n return Long.valueOf(((BigDecimal)o).longValue());\n\n case NULL:\n return null;\n\n case DATETIME:\n return Long.valueOf(((DateTime)o).getMillis());\n case MAP:\n case INTERNALMAP:\n case TUPLE:\n case BAG:\n case UNKNOWN:\n default:\n int errCode = 1071;\n String msg = \"Cannot convert a \" + findTypeName(o) +\n \" to a Long\";\n throw new ExecException(msg, errCode, PigException.INPUT);\n }\n } catch (ClassCastException cce) {\n throw cce;\n } catch (ExecException ee) {\n throw ee;\n } catch (NumberFormatException nfe) {\n int errCode = 1074;\n String msg = \"Problem with formatting. Could not convert \" + o + \" to Long.\";\n throw new ExecException(msg, errCode, PigException.INPUT, nfe);\n } catch (Exception e) {\n int errCode = 2054;\n String msg = \"Internal error. Could not convert \" + o + \" to Long.\";\n throw new ExecException(msg, errCode, PigException.BUG);\n }\n\n }", "public static int readNumberFromBytes(byte[] data, int readSize, int startIndex) {\n int value = 0;\n for (int i = 0; i < readSize; i++)\n value += ((long) data[startIndex + i] & 0xFFL) << (Constants.BITS_PER_BYTE * i);\n return value;\n }", "public long getLong(String key) {\n long result;\n Object value = get(key);\n if (value instanceof Long) {\n result = (Long)value;\n } else if (value instanceof String) {\n try {\n String valueString = (String)value;\n if (valueString.length() == 0) {\n result = 0;\n } else if (valueString.charAt(0) == '-') {\n result = Long.parseLong(valueString);\n } else {\n result = Long.parseUnsignedLong((String)value);\n }\n } catch (NumberFormatException exc) {\n result = 0;\n }\n } else {\n result = 0;\n }\n return result;\n }", "public long getLong(int addr) throws ProgramException {\n return getLittleEndian(addr, Long.BYTES);\n }", "public abstract long[] toLongArray();", "public abstract long read_ulonglong();", "public byte[] readRawLong() throws IOException {\n byte[] bytes = new byte[9];\n bytes[0] = (byte) Type.LONG.code;\n in.readFully(bytes, 1, 8);\n return bytes;\n }", "public static long readlong()\n\t{\n\t\treturn sc.nextLong();\n\t}", "public static Stats fromByteArray(byte[] byteArray) {\n/* 548 */ Preconditions.checkNotNull(byteArray);\n/* 549 */ Preconditions.checkArgument((byteArray.length == 40), \"Expected Stats.BYTES = %s remaining , got %s\", 40, byteArray.length);\n/* */ \n/* */ \n/* */ \n/* */ \n/* 554 */ return readFrom(ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN));\n/* */ }", "public abstract long read_longlong();", "public native long[] __longArrayMethod( long __swiftObject, long[] arg );", "public static long toNumber(final char[] hexadecimal) {\n\t\treturn toNumber(toBytes(hexadecimal));\n\t}", "public int bytesToInt(byte[] bytes) {\n\t\tByteBuffer buffer = ByteBuffer.allocate(Integer.BYTES);\n\t\tbuffer.put(bytes);\n\t\tbuffer.flip();//need flip \n\t\treturn buffer.getInt();\n\t}", "public String getLong(long offset) throws IOException {\n\t\tdataBase.seek(offset);\n\t\tString[] array = dataBase.readLine().split(\"\\\\|\");\n\t\treturn array[8];\n\t}", "public int fromByteArray(byte [] value, int start, int length)\n {\n int Return = 0;\n for (int i=start; i< start+length; i++)\n {\n Return = (Return << 8) + (value[i] & 0xff);\n }\n return Return;\n }", "public int byteArrayToInt(byte[] byteArray) {\n\t\t// http://snippets.dzone.com/posts/show/93\n\t\treturn (byteArray[0] << 24) + ((byteArray[1] & 0xFF) << 16)\n\t\t\t\t+ ((byteArray[2] & 0xFF) << 8) + (byteArray[3] & 0xFF);\n\t}", "@Override\n public SchemaVersion versionFromBytes(byte[] version) {\n ByteBuffer bb = ByteBuffer.wrap(version);\n return new LongSchemaVersion(bb.getLong());\n }", "public final long getLong(final String tagToGet) {\n try {\n return Long.parseLong(getStr(tagToGet));\n } catch (final Exception t) {\n return 0;\n }\n }", "long readS64BE()\n throws IOException, EOFException;", "public abstract void read_ulong_array(int[] value, int offset, int\nlength);", "public void testValueOfLong()\n {\n // let's test that creating a EthernetAddress from an zero long\n // gives a null EthernetAddress (definition of a null EthernetAddress)\n EthernetAddress ethernet_address =\n EthernetAddress.valueOf(0x0000000000000000L);\n assertEquals(\n \"EthernetAddress.valueOf did not create expected EthernetAddress\",\n NULL_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n \n // let's test creating an array from a good long\n ethernet_address =\n EthernetAddress.valueOf(VALID_ETHERNET_ADDRESS_LONG);\n assertEquals(\n \"EthernetAddress.valueOf did not create expected EthernetAddress\",\n VALID_ETHERNET_ADDRESS_LONG,\n ethernet_address.toLong());\n }", "public static long extractLongValue(Object object) {\n\t\tClass<?> c = object.getClass();\n\t\ttry {\n\t\t\tif (c.isArray()) {\n\t\t\t\tfinal Object[] objects = (Object[]) object;\n\t\t\t\tif (LOG.isDebugEnabled()) {\n\t\t\t\t\tfor (Object o : objects) {\n\t\t\t\t\t\tLOG.debug(o.getClass().getName() + \" isPrimitive=\" + o.getClass().isPrimitive() + \" toString=\" + o.toString());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (objects[0].getClass().equals(BigInteger.class)) {\n\t\t\t\t\tobject = objects[objects.length-1];\n\t\t\t\t} else if (objects[objects.length-1].getClass().equals(BigDecimal.class)) {\n\t\t\t\t\tobject = objects[0];\n\t\t\t\t} else {\n\t\t\t\t\tthrow new RuntimeException(\"Unsupported object type to cenvert to long.\");\n\t\t\t\t}\n\t\t\t\tc = object.getClass();\n\t\t\t}\n\t\t\treturn ((Long) c.getMethod(\"longValue\").invoke(object)).longValue();\n\t\t} catch (Exception e) {\n\t\t\tLOG.error(c.getName() + \", isPrimitive=\" + c.isPrimitive(), e);\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public static int byteArrayToInt(byte[] b) {\n\n\t\tint aux = 0;\n\t\tif ((b!=null) && (b.length !=0)) {\n\t\t\tif (b.length>2 ) {\n\t\t\t\tthrow new NumberFormatException(\"To Much Digits to convert (max 2): \"+b.length);\n\t\t\t} else if (b.length==2){\n\t\t\t\tshort aux1 = (short) (b[1] & 0xff);\n\t\t\t\tshort aux2 = (short) (b[0] & 0xff);\n\t\t\t\taux = (int) ((aux2 << 8) | aux1);\n\t\t\t} else if (b.length==1) {\n\t\t\t\tshort aux1 = (short) (b[0] & 0xff);\n\t\t\t\tshort aux2 = (short) (0x00 & 0xff);\n\t\t\t\taux = (int) ((aux2 << 8) | aux1);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new NumberFormatException(\"No Bytes to convert.\");\n\t\t}\n\n\t\treturn aux;\n\t}", "public static final long readLong(InputStream in) throws IOException {\n byte[] buff = new byte[8];\n StreamTool.readFully(in, buff);\n return getLong(buff, 0);\n }", "private synchronized long readLong(int len) throws IOException {\n\t\tread(bytes, len);\n\t\treturn readLong(bytes, 0, len);\n\t}", "public static int ByteArrayToInt(byte[] bytes) {\r\n\t\tif(bytes.length != 4){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\treturn bytes[3] & 0xFF | \r\n\t (bytes[2] & 0xFF) << 8 | \r\n\t (bytes[1] & 0xFF) << 16 | \r\n\t (bytes[0] & 0xFF) << 24; \r\n\t}", "String longRead();", "public static int byteArrayToInt(byte[] ba, int offset) {\n int value = 0;\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n return value;\n }", "public static long parseLong(final CharSequence s)\n {\n // no string\n if (s == null)\n {\n throw new NumberFormatException(\"null\");\n }\n\n // determine length\n final int length = s.length();\n\n if (length == 0)\n {\n throw new NumberFormatException(\"length = 0\");\n }\n\n // that is safe, we already know that we are > 0\n final int digit = s.charAt(0);\n\n // turn the compare around to allow the compiler and cpu\n // to run the next code most of the time\n if (digit < '0' || digit > '9')\n {\n return Long.parseLong(s.toString());\n }\n\n long value = digit - DIGITOFFSET;\n\n for (int i = 1; i < length; i++)\n {\n final int d = s.charAt(i);\n if (d < '0' || d > '9')\n {\n throw new NumberFormatException(\"Not a long \" + s.toString());\n }\n\n value = ((value << 3) + (value << 1));\n value += (d - DIGITOFFSET);\n }\n\n return value;\n }" ]
[ "0.7419533", "0.7323998", "0.727692", "0.7196713", "0.710844", "0.7060876", "0.6974408", "0.6942432", "0.6922281", "0.6908147", "0.6883488", "0.68794954", "0.6863302", "0.6758233", "0.66495925", "0.66326576", "0.6588479", "0.6532689", "0.6508919", "0.63316214", "0.63076496", "0.6298452", "0.62657547", "0.62080824", "0.61254585", "0.6083462", "0.5983041", "0.59730536", "0.59251106", "0.5911083", "0.58865", "0.5852025", "0.58236724", "0.58234006", "0.58181596", "0.58097136", "0.57934725", "0.5779536", "0.57700574", "0.5752678", "0.57315606", "0.5722049", "0.56850445", "0.5676693", "0.5668732", "0.566821", "0.56662476", "0.5658632", "0.56583154", "0.56498986", "0.562945", "0.56236017", "0.5622907", "0.56184113", "0.5612306", "0.55837786", "0.55801195", "0.5575066", "0.55647755", "0.5540506", "0.55274755", "0.55196685", "0.5516609", "0.5508922", "0.54967374", "0.5483549", "0.547962", "0.5478313", "0.5476662", "0.5476396", "0.5472328", "0.5466569", "0.5466224", "0.5457875", "0.5456316", "0.54459023", "0.5440941", "0.54270774", "0.54265654", "0.5425358", "0.5425345", "0.54236025", "0.5421423", "0.54207414", "0.5413422", "0.5409628", "0.5409254", "0.540908", "0.5408245", "0.5402305", "0.54012495", "0.540008", "0.53886163", "0.5387154", "0.5379423", "0.5376536", "0.5376123", "0.5367146", "0.5353958", "0.5353057" ]
0.7567841
0
Returns a short as a byte array.
public static byte[] getShortAsBytes(short s) { return new byte[] { (byte) (s >>> 8), (byte) s }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] shortToBytes(short s) {\n\n ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_SHORT);\n byteBuffer.putShort(s);\n return byteBuffer.array();\n\n }", "private static byte[] shortToBytes(short value) {\n ByteBuffer bb = ByteBuffer.allocate(2);\n bb.putShort(value);\n return bb.array();\n }", "public static byte[] getBytes(short value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putShort(value).array();\r\n\t}", "private byte[] shortToByteArray(short i) {\n ByteBuffer bbf = ByteBuffer.allocate(2)\n .order(ByteOrder.LITTLE_ENDIAN)\n .putShort(i);\n return bbf.array();\n }", "public abstract short[] toShortArray();", "public short toShort() {\n return this.toShortArray()[0];\n }", "private byte[] short2byte(short[] sData) {\n int shortArrsize = sData.length;\n byte[] bytes = new byte[shortArrsize * 2];\n for (int i = 0; i < shortArrsize; i++) {\n bytes[i * 2] = (byte) (sData[i] & 0x00FF);\n bytes[(i * 2) + 1] = (byte) (sData[i] >> 8);\n sData[i] = 0;\n }\n return bytes;\n\n }", "public static void shortToByteArray(short value, byte[] buffer, int offset) {\n buffer[offset] = (byte) (value >> 8 & 0xFF);\n buffer[offset + 1] = (byte) (value & 0xFF);\n }", "public short[] getAsShorts() {\n return (short[])data;\n }", "private int getShort() {\n shortBuffer.rewind();\n archive.read(shortBuffer);\n shortBuffer.flip();\n return (int) shortBuffer.getShort();\n }", "public short toShort()\n\t{\n\t\treturn (short)this.ordinal();\n\t}", "public static int shortToBytes(short s, byte bc[], int index) {\n bc[index++] = (byte) ((s >> 8) & 0xff);\n bc[index++] = (byte) (s & 0xff);\n return index;\n }", "public short getShortA() {\n\t\tint i = (payload.get() & 0xFF) << 8 | payload.get() - 128 & 0xFF;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public static short getBytesAsShort(byte[] b) {\n\t\tint i = (b[0] & 0xFF << 8)\n\t\t\t\t| (b[1] & 0xFF);\n\t\t\n\t\treturn (short) i;\n\t}", "private static byte[] intToSmallBytes(int value) {\n return shortToBytes((short)value);\n }", "void writeShorts(short[] s, int off, int len) throws IOException;", "public static byte[] get(final short key)\n {\n return new byte[]{getA(key), getB(key)};\n }", "public short getLEShort() {\n\t\tint i = payload.get() & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public static short getShort(byte bc[], int index) {\n short s, bh, bl;\n bh = (bc[index]);\n bl = (bc[index + 1]);\n s = (short) (((bh << 8) & 0xff00) | (bl & 0xff));\n // s = (short)((int)(bc[index])<<8 + bc[index+1]);\n return s;\n }", "public native short[] __shortArrayMethod( long __swiftObject, short[] arg );", "com.google.protobuf.ByteString\n getBShortTokenBytes();", "public short getLEShortA() {\n\t\tint i = payload.get() - 128 & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "com.google.protobuf.ByteString\n getShortTokenBytes();", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default short asShort() {\n \n return notSupportedCast(BasicTypeID.SHORT);\n }", "void writeShort(short value);", "public static byte[] convertInt16(short v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[2];\r\n if (isLE)\r\n {\r\n bytes[1] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[0] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n return bytes;\r\n }", "public static short toInt16(byte[] value) {\r\n\t\treturn toInt16(value, 0);\r\n\t}", "public static short toShort(byte b1, byte b2) {\n\t\tByteBuffer bb = ByteBuffer.allocate(2);\n\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\tbb.put(b1);\n\t\tbb.put(b2);\n\t\treturn bb.getShort(0);\n\t}", "short decodeShort();", "public static void main(String[] args) {\nshort i = 128;\r\nbyte shortToByte = (byte)i;\r\nSystem.out.println(shortToByte);\r\nbyte t = 127;\r\nt++;\r\nSystem.out.println(t);\r\nt++;\r\nSystem.out.println(t);\r\n\r\n\t}", "void writeShort(int v) throws IOException;", "public int getUnsignedShort() {\n\t\treturn payload.getUnsignedShort();\n\t}", "public abstract void read_short_array(short[] value, int offset, int\nlength);", "public byte[] toByteArray() {\n/* 510 */ ByteBuffer buff = ByteBuffer.allocate(40).order(ByteOrder.LITTLE_ENDIAN);\n/* 511 */ writeTo(buff);\n/* 512 */ return buff.array();\n/* */ }", "public void testNIO_short_array() throws Exception {\n short[] shortArray = new short[8];\n ShortBuffer sb = ShortBuffer.wrap(shortArray);\n shortBufferTest(sb);\n }", "public static byte[] readFullyByByteShort(InputStream in) throws IOException {\n int oneByte;\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n while((oneByte = in.read()) != -1){\n out.write(oneByte);\n }\n return out.toByteArray();\n }", "@Test\n public void testReadWriteShort() {\n System.out.println(\"readShort\");\n ByteArray instance = new ByteArray();\n \n instance.writeShort((short) 12, 0);\n instance.writeShort((short) 15, 2);\n instance.writeShort((short) 13, instance.compacity());\n \n assertEquals(12, instance.readShort(0));\n assertEquals(15, instance.readShort(2));\n assertEquals(13, instance.readShort(instance.compacity() - 2));\n \n instance.writeShort((short) 14, 2);\n assertEquals(14, instance.readShort(2));\n }", "public ByteBuf writeShort(int value)\r\n/* 539: */ {\r\n/* 540:550 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 541:551 */ return super.writeShort(value);\r\n/* 542: */ }", "public void write( short[] array, int firstIndex, int numShorts )\n\t{\n\t\tint numShortsLeft = numShorts;\n\t\tint shortsInBuffer = buffer.length >> 1;\n\t\tint shortIndex = firstIndex;\n\t\twhile( numShortsLeft > 0 )\n\t\t{\n\t\t\tint numShortsToWrite = (numShortsLeft < shortsInBuffer) ? numShortsLeft\n\t\t\t\t\t: shortsInBuffer;\n\n\t\t\tint byteIndex = 0;\n\t\t\tfor( int i = 0; i < numShortsToWrite; i++ )\n\t\t\t{\n\t\t\t\tshort sample = array[shortIndex++];\n\t\t\t\tbuffer[byteIndex++] = (byte) (sample);\n\t\t\t\tbuffer[byteIndex++] = (byte) (sample >> 8);\n\t\t\t}\n\t\t\tnumShortsLeft -= numShortsToWrite;\n\n\t\t\t// Shift by one to convert shorts to bytes.\n\t\t\tbyteArray.write( buffer, 0, byteIndex );\n\t\t}\n\t}", "@Override\r\n\tpublic short getShort(int pos) {\n\t\treturn buffer.getShort(pos);\r\n\t}", "public static byte[] getBytes(int value) {\r\n\t\treturn ByteBuffer.allocate(4).order(ByteOrder.LITTLE_ENDIAN).putInt(value).array();\r\n\t}", "short readShort();", "public static short bytesToShort(byte[] bytes) {\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);\n return byteBuffer.getShort();\n\n }", "public short readShort() throws IOException;", "@NonNull\n public String toShortString() {\n return toShortString(new StringBuilder(32));\n }", "public com.google.protobuf.ByteString\n getBShortTokenBytes() {\n return instance.getBShortTokenBytes();\n }", "static byte[] Int16ToByteArray(int data) {\n byte[] result = new byte[2];\n result[0] = (byte) ((data & 0x000000FF));\n result[1] = (byte) ((data & 0x0000FF00) >> 8);\n return result;\n }", "static byte[] toArray(int value) {\n return new byte[] {\n (byte) (value >> 24),\n (byte) (value >> 16),\n (byte) (value >> 8),\n (byte) value };\n }", "public static int writeShort(OutputStream target, short value) throws IOException {\n target.write((byte) (value >>> 8 & 255));\n target.write((byte) (value & 255));\n return Short.BYTES;\n }", "public short readShort() {\n return ((short) readLong());\n }", "private int getUnsignedShort(final ByteBuffer byteBuffer) {\n return byteBuffer.getShort() & 0xffff;\n }", "public byte[] serialize() { length 9 bits, each value == byte\n // info string\n final short scratch = (short) ((0x7f & this.type) << 9 | 0x1ff & this.length);\n final byte[] data = new byte[2 + this.length];\n final ByteBuffer bb = ByteBuffer.wrap(data);\n bb.putShort(scratch);\n if (this.value != null) {\n bb.put(this.value);\n }\n return data;\n }", "static Nda<Short> of( short... value ) { return Tensor.of( Short.class, Shape.of( value.length ), value ); }", "public final int getSignedShort(final boolean endianess) throws IOException {\r\n b3 = 0;\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n b3 = ( (tagBuffer[bPtr] & 0xff) << 8) | (tagBuffer[bPtr + 1] & 0xff);\r\n } else {\r\n b3 = ( (tagBuffer[bPtr + 1] & 0xff) << 8) | (tagBuffer[bPtr] & 0xff);\r\n }\r\n\r\n if ( (b3 & 0x0080) != 0) {\r\n b3 = b3 | 0xff00;\r\n }\r\n\r\n bPtr += 2;\r\n\r\n return b3;\r\n }", "short readShort() throws IOException;", "public short getElement_data(int index1) {\n return (short)getUIntBEElement(offsetBits_data(index1), 8);\n }", "public static short getShort(byte[] buffer, int index, int len) {\n switch (len) {\n case 0: return (short) 0xFFFF;\n case 1: return (short) (0xFFFFFF00 | _getByte(buffer, index, 1));\n case 2: return _getShort(buffer, index, 2);\n default: throw new IllegalArgumentException(\"len is out of range: \" + len);\n }\n }", "public abstract short read_short();", "public short getShort(int addr) throws ProgramException {\n return (short) getLittleEndian(addr, Short.BYTES);\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return instance.getShortTokenBytes();\n }", "public ByteBuf writeShortLE(int value)\r\n/* 859: */ {\r\n/* 860:868 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 861:869 */ return super.writeShortLE(value);\r\n/* 862: */ }", "public static short byteArrayToShort(byte[] ba, int offset) {\n int value = 0;\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n return (short) value;\n }", "public com.google.protobuf.ByteString\n getBShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(bShortToken_);\n }", "short getDQ1( byte[] buffer, short offset );", "public short getValue() {\n return value;\n }", "public short[] getShortArray(final String key) {\n return getShortArray(key, ArrayUtils.EMPTY_SHORT_ARRAY);\n }", "public short getValue() {\n return value;\n }", "@Override\r\n\tpublic Buffer appendUnsignedShort(int s) {\n\t\treturn null;\r\n\t}", "public static short pack(final byte a, final byte b)\n {\n return (short) ((a << SHIFT) | (b & BITS));\n }", "public static short toInt16(byte[] value, int startIndex) {\r\n\t\treturn ByteBuffer.wrap(value, startIndex, 2).order(ByteOrder.LITTLE_ENDIAN).getShort();\r\n\t}", "public String getShort() {\n return m_short;\n }", "public short getShort(int index)\r\n/* 328: */ {\r\n/* 329:342 */ ensureAccessible();\r\n/* 330:343 */ return _getShort(index);\r\n/* 331: */ }", "public static byte[] convertInt16(int v, boolean isLE)\r\n {\r\n return convertInt16((short) v, isLE);\r\n }", "String shortWrite();", "short getDP1( byte[] buffer, short offset );", "public static byte[] convertInt8(int v)\r\n {\r\n byte[] bytes = new byte[1];\r\n bytes[0] = (byte) v;\r\n return bytes;\r\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(shortToken_);\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(shortToken_);\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(shortToken_);\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(shortToken_);\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(shortToken_);\n }", "public com.google.protobuf.ByteString\n getShortTokenBytes() {\n return com.google.protobuf.ByteString.copyFromUtf8(shortToken_);\n }" ]
[ "0.76668525", "0.75819266", "0.7572177", "0.7413529", "0.7339584", "0.7086113", "0.70489746", "0.6819312", "0.68017304", "0.6704444", "0.66723526", "0.6650386", "0.66387534", "0.6612697", "0.6558553", "0.64761645", "0.6459259", "0.64222836", "0.64104235", "0.63974535", "0.6374422", "0.6287996", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62704074", "0.62434125", "0.62325054", "0.6206363", "0.6196981", "0.6184854", "0.6168361", "0.6161884", "0.6151368", "0.6095267", "0.6065657", "0.60429615", "0.6037169", "0.6035143", "0.60171485", "0.60079163", "0.59630215", "0.5959505", "0.5942731", "0.59393555", "0.59341115", "0.59119904", "0.5904536", "0.59025586", "0.58915013", "0.58849335", "0.5884628", "0.58810663", "0.5878068", "0.58609366", "0.5838907", "0.5820718", "0.5818372", "0.58133304", "0.5790555", "0.57833976", "0.5768759", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57558817", "0.57518345", "0.57392967", "0.57293135", "0.57280856", "0.5726677", "0.57082945", "0.5704549", "0.56950796", "0.5683285", "0.56805336", "0.56758195", "0.5671369", "0.56615525", "0.56499416", "0.5646837", "0.562869", "0.56265396", "0.56265396", "0.56265396", "0.56265396", "0.56265396", "0.56265396" ]
0.72983104
5
Returns a short from a given byte array.
public static short getBytesAsShort(byte[] b) { int i = (b[0] & 0xFF << 8) | (b[1] & 0xFF); return (short) i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static short byteArrayToShort(byte[] ba, int offset) {\n int value = 0;\n value = (value << 8) | (ba[offset++] & 0xFF);\n value = (value << 8) | (ba[offset++] & 0xFF);\n return (short) value;\n }", "public static short bytesToShort(byte[] bytes) {\n\n ByteBuffer byteBuffer = ByteBuffer.wrap(bytes);\n return byteBuffer.getShort();\n\n }", "public static short toInt16(byte[] value) {\r\n\t\treturn toInt16(value, 0);\r\n\t}", "public static short getShort(byte[] buffer, int index, int len) {\n switch (len) {\n case 0: return (short) 0xFFFF;\n case 1: return (short) (0xFFFFFF00 | _getByte(buffer, index, 1));\n case 2: return _getShort(buffer, index, 2);\n default: throw new IllegalArgumentException(\"len is out of range: \" + len);\n }\n }", "public static short getShort(byte bc[], int index) {\n short s, bh, bl;\n bh = (bc[index]);\n bl = (bc[index + 1]);\n s = (short) (((bh << 8) & 0xff00) | (bl & 0xff));\n // s = (short)((int)(bc[index])<<8 + bc[index+1]);\n return s;\n }", "public abstract void read_short_array(short[] value, int offset, int\nlength);", "public static short toInt16(byte[] value, int startIndex) {\r\n\t\treturn ByteBuffer.wrap(value, startIndex, 2).order(ByteOrder.LITTLE_ENDIAN).getShort();\r\n\t}", "public static short toShort(byte b1, byte b2) {\n\t\tByteBuffer bb = ByteBuffer.allocate(2);\n\t\tbb.order(ByteOrder.LITTLE_ENDIAN);\n\t\tbb.put(b1);\n\t\tbb.put(b2);\n\t\treturn bb.getShort(0);\n\t}", "public static short pack(final byte a, final byte b)\n {\n return (short) ((a << SHIFT) | (b & BITS));\n }", "short decodeShort();", "public short getShortA() {\n\t\tint i = (payload.get() & 0xFF) << 8 | payload.get() - 128 & 0xFF;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public static short uByte(byte b) {\n\t\treturn (short)(((short)b+256)%256);\n\t}", "public short getLEShort() {\n\t\tint i = payload.get() & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "public short getLEShortA() {\n\t\tint i = payload.get() - 128 & 0xFF | (payload.get() & 0xFF) << 8;\n\t\tif (i > 32767) {\n\t\t\ti -= 0x10000;\n\t\t}\n\t\treturn (short) i;\n\t}", "short readShort();", "public static short checkSum(byte[] b) {\r\n\t\tint sum = 0;\r\n\t\tint i = 0;\r\n\t\twhile(i < b.length-1) {\r\n\t\t\tbyte first = b[i];\r\n\t\t\tbyte second = b[i+1];\r\n\t\t\tsum += ((first<<8 & 0xFF00) | (second & 0xFF));\r\n\r\n\t\t\tif((sum & 0xFFFF0000) > 0) {\r\n\t\t\t\tsum &= 0xFFFF;\r\n\t\t\t\tsum++;\r\n\t\t\t}\r\n\t\t\ti = i + 2;\r\n\t\t}\r\n\r\n\t\t//If bArray size is odd\r\n\t\tif((b.length)%2 == 1) {\r\n\t\t\tbyte last = b[(b.length-1)];\r\n\t\t\tsum += ((last<<8) & 0xFF00);\r\n\r\n\t\t\tif((sum & 0xFFFF0000) > 0) {\r\n\t\t\t\tsum &= 0xFFFF;\r\n\t\t\t\tsum++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (short) ~(sum & 0xFFFF);\r\n\t}", "short getDP1( byte[] buffer, short offset );", "public short toShort() {\n return this.toShortArray()[0];\n }", "abstract int readShort(int start);", "short getDQ1( byte[] buffer, short offset );", "private int getShort() {\n shortBuffer.rewind();\n archive.read(shortBuffer);\n shortBuffer.flip();\n return (int) shortBuffer.getShort();\n }", "short readShort() throws IOException;", "public abstract short[] toShortArray();", "public static short unsigned(byte data) {\n\t\treturn (short) (data & 0xFF);\n\t}", "public short readShort() throws IOException;", "private short toDec(byte[] source, short index){\r\n \treturn (short)(source[index] - (short)48);\r\n }", "public abstract short read_short();", "short getP( byte[] buffer, short offset );", "protected final short getShort(int offset)\n {\n final byte[] tableData = tables.getTablesData();\n return Bytes.getShort(tableData, cursor+offset);\n }", "private int getUnsignedShort(final ByteBuffer byteBuffer) {\n return byteBuffer.getShort() & 0xffff;\n }", "private static short decode(byte alaw)\n {\n //Invert every other bit, and the sign bit (0xD5 = 1101 0101)\n alaw ^= 0xD5;\n\n //Pull out the value of the sign bit\n int sign = alaw & 0x80;\n //Pull out and shift over the value of the exponent\n int exponent = (alaw & 0x70) >> 4;\n //Pull out the four bits of data\n int data = alaw & 0x0f;\n\n //Shift the data four bits to the left\n data <<= 4;\n //Add 8 to put the result in the middle of the range (like adding a half)\n data += 8;\n \n //If the exponent is not 0, then we know the four bits followed a 1,\n //and can thus add this implicit 1 with 0x100.\n if (exponent != 0)\n data += 0x100;\n /* Shift the bits to where they need to be: left (exponent - 1) places\n * Why (exponent - 1) ?\n * 1 2 3 4 5 6 7 8 9 A B C D E F G\n * . 7 6 5 4 3 2 1 . . . . . . . . <-- starting bit (based on exponent)\n * . . . . . . . Z x x x x 1 0 0 0 <-- our data (Z is 0 only when exponent is 0)\n * We need to move the one under the value of the exponent,\n * which means it must move (exponent - 1) times\n * It also means shifting is unnecessary if exponent is 0 or 1.\n */\n if (exponent > 1)\n data <<= (exponent - 1);\n\n return (short)(sign == 0 ? data : -data);\n }", "void writeShorts(short[] s, int off, int len) throws IOException;", "public native short[] __shortArrayMethod( long __swiftObject, short[] arg );", "public static short byteToUnsignedShort(byte unsignedByte) {\n short num = (short) unsignedByte;\n if (num < 0)\n num += 256;\n return num;\n }", "private short readShort(SeekableStream stream)\n throws IOException {\n if (isBigEndian) {\n return stream.readShort();\n } else {\n return stream.readShortLE();\n }\n }", "public short getElement_data(int index1) {\n return (short)getUIntBEElement(offsetBits_data(index1), 8);\n }", "public short readAsShort(int nrBits) {\n return readAsShort(bitPos, nrBits, ByteOrder.BigEndian);\n }", "private byte[] short2byte(short[] sData) {\n int shortArrsize = sData.length;\n byte[] bytes = new byte[shortArrsize * 2];\n for (int i = 0; i < shortArrsize; i++) {\n bytes[i * 2] = (byte) (sData[i] & 0x00FF);\n bytes[(i * 2) + 1] = (byte) (sData[i] >> 8);\n sData[i] = 0;\n }\n return bytes;\n\n }", "public short getShort(int addr) throws ProgramException {\n return (short) getLittleEndian(addr, Short.BYTES);\n }", "public static short checkSum(byte[] byteArray)\n\t{\n\t\tlong sum = 0;\n\t\tint n;\n\t\tfor(int i = 0; i < byteArray.length; i = i + 2)\n\t\t{\n\t\t\tn = byteArray[i];\n\t\t\t\n\t\t\tn = (n << 8) & 0xFF00;\n\t\t\tn = n + (byteArray[i+1] & 0xFF);\n\t\t\t\n\t\t\tsum += n;\n\t\t\t\n\t\t\tif((sum & 0xFFFF0000) > 0)\n\t\t\t{\n\t\t\t\t//carry occurred, so wrap around.\n\t\t\t\tsum &= 0xFFFF;\n\t\t\t\tsum++;\n\t\t\t}\n\t\t}\n\t\treturn (short)(~(sum & 0xFFFF));\n\t}", "public static void shortToByteArray(short value, byte[] buffer, int offset) {\n buffer[offset] = (byte) (value >> 8 & 0xFF);\n buffer[offset + 1] = (byte) (value & 0xFF);\n }", "public static short min(final short[] data) {\r\n short min = Short.MAX_VALUE;\r\n for (final short element : data) {\r\n if (min > element) {\r\n min = element;\r\n }\r\n }\r\n return min;\r\n }", "private short getUnsignedByte(final ByteBuffer byteBuffer) {\n return (short) (byteBuffer.get() & 0xff);\n }", "public Short _parseShort(JsonParser jVar, DeserializationContext gVar) throws IOException {\n JsonToken l = jVar.mo29328l();\n if (l == JsonToken.VALUE_NUMBER_INT) {\n return Short.valueOf(jVar.mo29336B());\n }\n if (l == JsonToken.VALUE_STRING) {\n String trim = jVar.mo29334t().trim();\n if (trim.length() == 0) {\n return (Short) _coerceEmptyString(gVar, this._primitive);\n }\n if (_hasTextualNull(trim)) {\n return (Short) _coerceTextualNull(gVar, this._primitive);\n }\n _verifyStringForScalarCoercion(gVar, trim);\n try {\n int a = NumberInput.m23779a(trim);\n if (_shortOverflow(a)) {\n return (Short) gVar.mo31517b(this._valueClass, trim, \"overflow, value cannot be represented as 16-bit value\", new Object[0]);\n }\n return Short.valueOf((short) a);\n } catch (IllegalArgumentException unused) {\n return (Short) gVar.mo31517b(this._valueClass, trim, \"not a valid Short value\", new Object[0]);\n }\n } else if (l == JsonToken.VALUE_NUMBER_FLOAT) {\n if (!gVar.mo31509a(DeserializationFeature.ACCEPT_FLOAT_AS_INT)) {\n _failDoubleToIntCoercion(jVar, gVar, \"Short\");\n }\n return Short.valueOf(jVar.mo29336B());\n } else if (l == JsonToken.VALUE_NULL) {\n return (Short) _coerceNullToken(gVar, this._primitive);\n } else {\n if (l == JsonToken.START_ARRAY) {\n return (Short) _deserializeFromArray(jVar, gVar);\n }\n return (Short) gVar.mo31493a(this._valueClass, jVar);\n }\n }", "public static final short m64147D(@C6003d short[] sArr) {\n C14445h0.m62478f(sArr, \"$receiver\");\n int length = sArr.length;\n if (length == 0) {\n throw new NoSuchElementException(\"Array is empty.\");\n } else if (length == 1) {\n return sArr[0];\n } else {\n throw new IllegalArgumentException(\"Array has more than one element.\");\n }\n }", "public final int getSignedShort(final boolean endianess) throws IOException {\r\n b3 = 0;\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n b3 = ( (tagBuffer[bPtr] & 0xff) << 8) | (tagBuffer[bPtr + 1] & 0xff);\r\n } else {\r\n b3 = ( (tagBuffer[bPtr + 1] & 0xff) << 8) | (tagBuffer[bPtr] & 0xff);\r\n }\r\n\r\n if ( (b3 & 0x0080) != 0) {\r\n b3 = b3 | 0xff00;\r\n }\r\n\r\n bPtr += 2;\r\n\r\n return b3;\r\n }", "public short toShort()\n\t{\n\t\treturn (short)this.ordinal();\n\t}", "static Nda<Short> of( short... value ) { return Tensor.of( Short.class, Shape.of( value.length ), value ); }", "public int read(short[] s) throws IOException {\n\t\treturn read(s, 0, s.length);\n\t}", "public static short decodeLowBits(int i) {\n\n return (short) i;\n\n }", "public static short parseHexShort(CharSequence seq) {\n short result = 0;\n int last = seq.length() - 1;\n if (last > 3) {\n throw new NumberFormatException(\"Too many characters (> 8) for an \"\n + \"int in '\" + seq + \"'\");\n }\n if (Strings.startsWith(seq, \"0x\")) {\n seq = seq.subSequence(2, seq.length());\n }\n for (int i = last, j = 0; i >= 0; i--, j += 4) {\n int val = charToNybbl(seq.charAt(i));\n val <<= j;\n result |= val;\n }\n return result;\n }", "protected short _getShort(int index)\r\n/* 334: */ {\r\n/* 335:348 */ return HeapByteBufUtil.getShort(this.array, index);\r\n/* 336: */ }", "public short readShort() {\n return ((short) readLong());\n }", "public void testNIO_short_array() throws Exception {\n short[] shortArray = new short[8];\n ShortBuffer sb = ShortBuffer.wrap(shortArray);\n shortBufferTest(sb);\n }", "public static int shortToBytes(short s, byte bc[], int index) {\n bc[index++] = (byte) ((s >> 8) & 0xff);\n bc[index++] = (byte) (s & 0xff);\n return index;\n }", "public abstract void read_ushort_array(short[] value, int offset, int\nlength);", "public synchronized void read( int readIndex, short[] array,\n\t\t\tint firstIndex, int numShorts )\n\t{\n\t\tint numShortsLeft = numShorts;\n\t\tint shortsInBuffer = buffer.length >> 1;\n\t\tint shortIndex = firstIndex;\n\t\tint byteReadIndex = readIndex << 1;\n\t\twhile( numShortsLeft > 0 )\n\t\t{\n\t\t\tint numShortsToRead = (numShortsLeft < shortsInBuffer) ? numShortsLeft\n\t\t\t\t\t: shortsInBuffer;\n\n\t\t\t// Shift by one to convert numShorts to numBytes.\n\t\t\tint numBytesToRead = (numShortsToRead << 1);\n\t\t\tbyteArray.read( byteReadIndex, buffer, 0, numBytesToRead );\n\t\t\tbyteReadIndex += numBytesToRead;\n\n\t\t\tint byteIndex = 0;\n\t\t\tfor( int i = 0; i < numShortsToRead; i++ )\n\t\t\t{\n\t\t\t\tint loByte = buffer[byteIndex++];\n\t\t\t\tint hiByte = buffer[byteIndex++];\n\n\t\t\t\tint sample = (hiByte << 8) | (loByte & 0x00FF);\n\t\t\t\tarray[shortIndex++] = (short) sample;\n\t\t\t}\n\t\t\tnumShortsLeft -= numShortsToRead;\n\t\t}\n\t}", "public static final short m65024e(@C6003d short[] sArr, @C6003d C6084p<? super Short, ? super Short, Short> pVar) {\n C14445h0.m62478f(sArr, \"$receiver\");\n C14445h0.m62478f(pVar, \"operation\");\n int s = m65314s(sArr);\n if (s >= 0) {\n int i = s - 1;\n short s2 = sArr[s];\n while (i >= 0) {\n int i2 = i - 1;\n s2 = ((Number) pVar.mo24962d(Short.valueOf(sArr[i]), Short.valueOf(s2))).shortValue();\n i = i2;\n }\n return s2;\n }\n throw new UnsupportedOperationException(\"Empty array can't be reduced.\");\n }", "public short getShort(String key) {\n Object value = get(key);\n return ((value instanceof Long) ? (short)((Long)value).intValue() : 0);\n }", "@Override\r\n\tpublic short getShort(int pos) {\n\t\treturn buffer.getShort(pos);\r\n\t}", "public short getShort(int index)\r\n/* 328: */ {\r\n/* 329:342 */ ensureAccessible();\r\n/* 330:343 */ return _getShort(index);\r\n/* 331: */ }", "String shortRead();", "public static final short readShort(InputStream in) throws IOException {\n byte[] buff = new byte[2];\n StreamTool.readFully(in, buff);\n return getShort(buff, 0);\n }", "static int fromArray(byte[] payload) {\n return payload[0] << 24 | (payload[1] & 0xFF) << 16 | (payload[2] & 0xFF) << 8 | (payload[3] & 0xFF);\n }", "public static short[] valueToShorts(Number value, int dataType) {\n // 2 bytes\n if (dataType == DataType.TWO_BYTE_INT_UNSIGNED || dataType == DataType.TWO_BYTE_INT_SIGNED)\n return new short[] {value.shortValue()};\n \n if (dataType == DataType.TWO_BYTE_BCD) {\n short s = value.shortValue();\n return new short[] { (short)(\n (((s / 1000) % 10) << 12) |\n (((s / 100) % 10) << 8) |\n (((s / 10) % 10) << 4) |\n (s % 10))\n };\n }\n \n // 4 bytes\n if (dataType == DataType.FOUR_BYTE_INT_UNSIGNED || dataType == DataType.FOUR_BYTE_INT_SIGNED) {\n int i = value.intValue();\n return new short[] {(short)(i >> 16), (short)i};\n }\n \n if (dataType == DataType.FOUR_BYTE_INT_UNSIGNED_SWAPPED || dataType == DataType.FOUR_BYTE_INT_SIGNED_SWAPPED) {\n int i = value.intValue();\n return new short[] {(short)i, (short)(i >> 16)};\n }\n \n if (dataType == DataType.FOUR_BYTE_FLOAT) {\n int i = Float.floatToIntBits(value.floatValue());\n return new short[] {(short)(i >> 16), (short)i};\n }\n \n if (dataType == DataType.FOUR_BYTE_FLOAT_SWAPPED) {\n int i = Float.floatToIntBits(value.floatValue());\n return new short[] {(short)i, (short)(i >> 16)};\n }\n \n if (dataType == DataType.FOUR_BYTE_BCD) {\n int i = value.intValue();\n return new short[] {\n (short)((((i / 10000000) % 10) << 12) |\n (((i / 1000000) % 10) << 8) |\n (((i / 100000) % 10) << 4) |\n ((i / 10000) % 10)),\n (short)((((i / 1000) % 10) << 12) |\n (((i / 100) % 10) << 8) |\n (((i / 10) % 10) << 4) |\n (i % 10))\n };\n }\n \n // 8 bytes\n if (dataType == DataType.EIGHT_BYTE_INT_UNSIGNED || dataType == DataType.EIGHT_BYTE_INT_SIGNED) {\n long l = Float.floatToIntBits(value.floatValue());\n return new short[] {(short)(l >> 48), (short)(l >> 32), (short)(l >> 16), (short)l};\n }\n \n if (dataType == DataType.EIGHT_BYTE_INT_UNSIGNED_SWAPPED || \n dataType == DataType.EIGHT_BYTE_INT_SIGNED_SWAPPED) {\n long l = Float.floatToIntBits(value.floatValue());\n return new short[] {(short)l, (short)(l >> 16), (short)(l >> 32), (short)(l >> 48)};\n }\n \n if (dataType == DataType.EIGHT_BYTE_FLOAT) {\n long l = Double.doubleToLongBits(value.doubleValue());\n return new short[] {(short)(l >> 48), (short)(l >> 32), (short)(l >> 16), (short)l};\n }\n \n if (dataType == DataType.EIGHT_BYTE_FLOAT_SWAPPED) {\n long l = Double.doubleToLongBits(value.doubleValue());\n return new short[] {(short)l, (short)(l >> 16), (short)(l >> 32), (short)(l >> 48)};\n }\n \n throw new RuntimeException(\"Unsupported data type: \"+ dataType);\n }", "ITaggedData Create(short tag, byte[] data, int offset, int count);", "public abstract short read_ushort();", "public short getShort(String name) {\n\t\tfinal Object val = values.get(name);\n\t\tif (val == null) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but not specified\");\n\t\t}\n\t\tif (val instanceof Number) {\n\t\t\treturn ((Number) val).shortValue();\n\t\t}\n\t\ttry {\n\t\t\treturn Short.parseShort((String) val);\n\t\t} catch (Exception e) {\n\t\t\tthrow new IllegalArgumentException(\"Short value required, but found: \" + val);\n\t\t}\n\t}", "public static short hexToShort(String s) {\n\n return Short.parseShort(s, 16);\n\n }", "public static final short m64083A(@C6003d short[] sArr, @C6003d C6080l<? super Short, Boolean> lVar) {\n C14445h0.m62478f(sArr, \"$receiver\");\n C14445h0.m62478f(lVar, \"predicate\");\n Short sh = null;\n boolean z = false;\n for (short s : sArr) {\n if (((Boolean) lVar.invoke(Short.valueOf(s))).booleanValue()) {\n if (!z) {\n sh = Short.valueOf(s);\n z = true;\n } else {\n throw new IllegalArgumentException(\"Array contains more than one matching element.\");\n }\n }\n }\n if (!z) {\n throw new NoSuchElementException(\"Array contains no element matching the predicate.\");\n } else if (sh != null) {\n return sh.shortValue();\n } else {\n throw new TypeCastException(\"null cannot be cast to non-null type kotlin.Short\");\n }\n }", "public static int OpaqueToType(byte[] b) { \n int type = b[8];\n return type; \n }", "public short readShort() throws IOException {\n\n\t\tif (read(bb, 0, 2) < 2) {\n\t\t\tthrow new EOFException();\n\t\t}\n\n\t\tshort s = (short) (bb[0] << 8 | (bb[1] & 0xFF));\n\t\treturn s;\n\t}", "protected static final int parseUnsignedShort(ByteArrayInputStream stream) throws EOFException\n {\n return (EASMessage.parseUnsignedByte(stream) << 8) | EASMessage.parseUnsignedByte(stream);\n }", "static final int get16(byte b[], int off) {\n return (b[off] & 0xff) | ((b[off + 1] & 0xff) << 8);\n }", "private static short crc16(final byte[] buffer, int offset, int len) {\n CRC16 crc16 = new CRC16();\n crc16.update(buffer, offset, len);\n return (short) crc16.getValue();\n }", "public short[] getAsShorts() {\n return (short[])data;\n }", "public int read(short[] s, int start, int len) throws IOException {\n\n\t\tint i = start;\n\t\ttry {\n\t\t\tfor (; i < start + len; i += 1) {\n\t\t\t\tif (count - pos < 2) {\n\t\t\t\t\tfillBuf(2);\n\t\t\t\t}\n\t\t\t\ts[i] = (short) (buf[pos] << 8 | (buf[pos + 1] & 0xFF));\n\t\t\t\tpos += 2;\n\t\t\t}\n\t\t} catch (EOFException e) {\n\t\t\treturn eofCheck(e, i, start, 2);\n\t\t}\n\t\treturn 2 * len;\n\t}", "public final int getUnsignedShort(final boolean endianess) throws IOException {\r\n b3 = 0;\r\n\r\n if (endianess == FileDicomBaseInner.BIG_ENDIAN) {\r\n b3 = ( (tagBuffer[bPtr] & 0xff) << 8) | (tagBuffer[bPtr + 1] & 0xff); // Big Endian\r\n } else {\r\n b3 = ( (tagBuffer[bPtr + 1] & 0xff) << 8) | (tagBuffer[bPtr] & 0xff); // Little Endian\r\n }\r\n\r\n bPtr += 2;\r\n\r\n return b3;\r\n }", "protected void _setShort(int index, int value)\r\n/* 435: */ {\r\n/* 436:449 */ HeapByteBufUtil.setShort(this.array, index, value);\r\n/* 437: */ }", "public short readShortLE()\r\n/* 817: */ {\r\n/* 818:826 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 819:827 */ return super.readShortLE();\r\n/* 820: */ }", "public short getShortLE(int index)\r\n/* 339: */ {\r\n/* 340:353 */ ensureAccessible();\r\n/* 341:354 */ return _getShortLE(index);\r\n/* 342: */ }", "protected short _getShortLE(int index)\r\n/* 345: */ {\r\n/* 346:359 */ return HeapByteBufUtil.getShortLE(this.array, index);\r\n/* 347: */ }", "public short getShort(int pos) {\n return Tuples.toShort(getObject(pos));\n }", "public static _short parse(javax.xml.stream.XMLStreamReader reader)\n throws java.lang.Exception {\n _short object = new _short();\n\n int event;\n javax.xml.namespace.QName currentQName = null;\n java.lang.String nillableValue = null;\n java.lang.String prefix = \"\";\n java.lang.String namespaceuri = \"\";\n\n try {\n while (!reader.isStartElement() && !reader.isEndElement())\n reader.next();\n\n currentQName = reader.getName();\n\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (\"true\".equals(nillableValue) ||\n \"1\".equals(nillableValue)) {\n // Skip the element and report the null value. It cannot have subelements.\n while (!reader.isEndElement())\n reader.next();\n\n object.set_short(java.lang.Short.MIN_VALUE);\n\n return object;\n }\n\n // Note all attributes that were handled. Used to differ normal attributes\n // from anyAttributes.\n java.util.Vector handledAttributes = new java.util.Vector();\n\n while (!reader.isEndElement()) {\n if (reader.isStartElement()) {\n if (reader.isStartElement() &&\n new javax.xml.namespace.QName(\n \"http://schemas.microsoft.com/2003/10/Serialization/\",\n \"short\").equals(reader.getName())) {\n nillableValue = reader.getAttributeValue(\"http://www.w3.org/2001/XMLSchema-instance\",\n \"nil\");\n\n if (!\"true\".equals(nillableValue) &&\n !\"1\".equals(nillableValue)) {\n java.lang.String content = reader.getElementText();\n\n object.set_short(org.apache.axis2.databinding.utils.ConverterUtil.convertToShort(\n content));\n } else {\n object.set_short(java.lang.Short.MIN_VALUE);\n\n reader.getElementText(); // throw away text nodes if any.\n }\n } // End of if for expected property start element\n\n else {\n // 3 - A start element we are not expecting indicates an invalid parameter was passed\n throw new org.apache.axis2.databinding.ADBException(\n \"Unexpected subelement \" +\n reader.getName());\n }\n } else {\n reader.next();\n }\n } // end of while loop\n } catch (javax.xml.stream.XMLStreamException e) {\n throw new java.lang.Exception(e);\n }\n\n return object;\n }", "int processFirstShort(int index) {\n\t\t// process the first Short integer in the Key Entry Set\n\t\treturn (int) keyEntrySet.get(index);\n\t}", "public static void main(String[] args) {\nshort i = 128;\r\nbyte shortToByte = (byte)i;\r\nSystem.out.println(shortToByte);\r\nbyte t = 127;\r\nt++;\r\nSystem.out.println(t);\r\nt++;\r\nSystem.out.println(t);\r\n\r\n\t}", "public static int convertToInt16(byte[] bytes)\r\n {\r\n if (bytes.length >= 2)\r\n {\r\n return ((bytes[0] & 0xff) << 8) + ((bytes[1] & 0xff) << 0);\r\n }\r\n return 0;\r\n }", "public short getShort(String key)\n {\n return getShort(key, (short) 0);\n }", "private static byte[] shortToBytes(short value) {\n ByteBuffer bb = ByteBuffer.allocate(2);\n bb.putShort(value);\n return bb.array();\n }", "void execute(short[] data);", "public short readShort()\r\n/* 399: */ {\r\n/* 400:412 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 401:413 */ return super.readShort();\r\n/* 402: */ }", "public short getShortLE(int index)\r\n/* 751: */ {\r\n/* 752:760 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 753:761 */ return super.getShortLE(index);\r\n/* 754: */ }", "short getQ( byte[] buffer, short offset );", "public void readRecordUshort(short[] data, int start, int length,\n\t\tint offset, int pixelStride, int n2, int n3) throws IOException;", "private final short get_SMALLINT(int column) {\n // @AGG force Little Endian\n if (metadata.isZos())\n return dataBuffer_.getShort(columnDataPosition_[column - 1]);\n else\n return dataBuffer_.getShortLE(columnDataPosition_[column - 1]);\n// return SignedBinary.getShort(dataBuffer_,\n// columnDataPosition_[column - 1]);\n }", "@ZenCodeType.Caster\n @ZenCodeType.Method\n default short asShort() {\n \n return notSupportedCast(BasicTypeID.SHORT);\n }", "public static byte[] getBytes(short value) {\r\n\t\treturn ByteBuffer.allocate(2).order(ByteOrder.LITTLE_ENDIAN).putShort(value).array();\r\n\t}", "public native short __shortMethod( long __swiftObject, short arg );", "public Short getShort(final int index) {\n Object returnable = this.get(index);\n if (returnable == null) {\n return null;\n }\n if (returnable instanceof String) {\n /* A String can be used to construct a BigDecimal. */\n returnable = new BigDecimal((String) returnable);\n }\n return ((Number) returnable).shortValue();\n }", "public static byte[] convertInt16(short v, boolean isLE)\r\n {\r\n byte[] bytes = new byte[2];\r\n if (isLE)\r\n {\r\n bytes[1] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[0] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n else\r\n {\r\n bytes[0] = (byte) ((v >>> 8) & 0xFF);\r\n bytes[1] = (byte) ((v >>> 0) & 0xFF);\r\n }\r\n return bytes;\r\n }" ]
[ "0.76600844", "0.7522262", "0.7222804", "0.7054048", "0.7016173", "0.69533575", "0.67746454", "0.67418253", "0.66447896", "0.6642779", "0.6642572", "0.6541755", "0.653918", "0.6487107", "0.64172834", "0.6370346", "0.6308067", "0.6296594", "0.62890637", "0.6280358", "0.62568784", "0.6247085", "0.61987513", "0.6152753", "0.61436105", "0.61251295", "0.612129", "0.61052734", "0.6074175", "0.6066723", "0.6060624", "0.6056333", "0.6014205", "0.6005282", "0.5996496", "0.5994929", "0.59808743", "0.5976235", "0.59665716", "0.5965129", "0.5964551", "0.59597325", "0.59505326", "0.5922905", "0.59171456", "0.5907754", "0.5871367", "0.5864322", "0.5842634", "0.5824403", "0.5822353", "0.58176714", "0.5810803", "0.580208", "0.579388", "0.57892555", "0.5782633", "0.5759112", "0.575751", "0.5751466", "0.5749793", "0.57114244", "0.57109845", "0.56828445", "0.5670414", "0.566055", "0.56508404", "0.5643217", "0.5634029", "0.5633231", "0.56305844", "0.5624966", "0.56033385", "0.5591165", "0.5589296", "0.5583208", "0.5573822", "0.55633223", "0.5531886", "0.55295336", "0.55237675", "0.55086887", "0.5506677", "0.54708827", "0.5465105", "0.54642445", "0.5448057", "0.5442384", "0.54408413", "0.5426191", "0.5422987", "0.5415938", "0.5412174", "0.5410725", "0.53889716", "0.53857434", "0.5383631", "0.53829175", "0.53598255", "0.53581667" ]
0.7860666
0
/ access modifiers changed from: packageprivate
@AppNameInUserAgent public abstract String assertUserAgentAppName();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "public abstract void mo70713b();", "public void m23075a() {\n }", "public void mo38117a() {\n }", "private MApi() {}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public abstract void mo56925d();", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "public void mo21779D() {\n }", "public abstract void mo27386d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void m1864a() {\r\n }", "public abstract Object mo26777y();", "public void mo21825b() {\n }", "protected boolean func_70814_o() { return true; }", "public final void mo91715d() {\n }", "public abstract void mo27385c();", "public void mo97908d() {\n }", "public void mo21782G() {\n }", "private TMCourse() {\n\t}", "private test5() {\r\n\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private Util() { }", "protected void mo6255a() {\n }", "private abstract void privateabstract();", "public void mo21877s() {\n }", "public void mo21787L() {\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "public void mo21791P() {\n }", "private MetallicityUtils() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public void mo55254a() {\n }", "public abstract void mo6549b();", "public void mo23813b() {\n }", "@DSComment(\"Private Method\")\n @DSBan(DSCat.PRIVATE_METHOD)\n @DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 13:00:49.426 -0500\", hash_original_method = \"26D71A046B8A5E21DEFC65FB89CD9FDA\", hash_generated_method = \"2293476E78FCC8BDA181F927AEA93BD1\")\n \nprivate void copyTables ()\n {\n if (prefixTable != null) {\n prefixTable = (Hashtable)prefixTable.clone();\n } else {\n prefixTable = new Hashtable();\n }\n if (uriTable != null) {\n uriTable = (Hashtable)uriTable.clone();\n } else {\n uriTable = new Hashtable();\n }\n elementNameTable = new Hashtable();\n attributeNameTable = new Hashtable();\n declSeen = true;\n }", "public void mo44053a() {\n }", "public void smell() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo115190b() {\n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public void mo21785J() {\n }", "public void mo21793R() {\n }", "public void mo21878t() {\n }", "public void mo56167c() {\n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "public abstract String mo118046b();", "public void mo115188a() {\n }", "private SourcecodePackage() {}", "public abstract String mo41079d();", "void mo57277b();", "public void mo6944a() {\n }", "public abstract void mo30696a();", "public abstract void mo42329d();", "private final zzgy zzgb() {\n }", "private Utils() {\n\t}", "private Utils() {\n\t}", "protected boolean func_70041_e_() { return false; }", "zzafe mo29840Y() throws RemoteException;", "private Singletion3() {}", "public abstract void mo42331g();", "public abstract void mo35054b();", "public abstract String mo13682d();", "public void mo21786K() {\n }", "public void mo3376r() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void mo3749d() {\n }", "public void mo21794S() {\n }", "public void mo12628c() {\n }", "private Infer() {\n\n }", "public void mo9848a() {\n }", "public abstract void mo27464a();", "private OMUtil() { }", "@Override\n\tpublic void ligar() {\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}", "private NativeSupport() {\n\t}", "public void mo2740a() {\n }", "@Override\n public boolean isPrivate() {\n return true;\n }" ]
[ "0.71507126", "0.66852754", "0.6558074", "0.6482426", "0.64311445", "0.638545", "0.63839656", "0.63482744", "0.63302624", "0.6277197", "0.62635255", "0.6250569", "0.62368745", "0.6233547", "0.6228953", "0.6197293", "0.6197293", "0.6194772", "0.6184139", "0.6180766", "0.61573917", "0.6152649", "0.6152198", "0.6116647", "0.61093503", "0.6108619", "0.60879374", "0.60821515", "0.60723346", "0.6068983", "0.60565233", "0.60564804", "0.605594", "0.6050983", "0.60498387", "0.60470885", "0.60436356", "0.603736", "0.60237354", "0.60237354", "0.60237354", "0.60237354", "0.6019666", "0.60196143", "0.6018301", "0.601686", "0.60056096", "0.600329", "0.5999082", "0.5997544", "0.59962994", "0.5995191", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991293", "0.5991282", "0.5987402", "0.5987402", "0.5984476", "0.59827936", "0.5973211", "0.5958472", "0.5957542", "0.5953589", "0.59519774", "0.594738", "0.59457314", "0.59445536", "0.5942774", "0.5940164", "0.5938114", "0.5938083", "0.5926483", "0.59255004", "0.59255004", "0.5925304", "0.5914172", "0.5909818", "0.59050065", "0.59049857", "0.5904506", "0.5899379", "0.5896449", "0.5894286", "0.58935714", "0.5890183", "0.58829314", "0.58781534", "0.58774024", "0.58768195", "0.5875799", "0.5873635", "0.5867603", "0.5867603", "0.5866908", "0.58663774", "0.58619076" ]
0.0
-1
Typically do this: Model.of(object) or new DetachableMyClassModel(object)
protected abstract IModel<T> createModel(T object);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "InstanceModel createInstanceOfInstanceModel();", "CsticModel createInstanceOfCsticModel();", "public T caseModel(Model object)\n {\n return null;\n }", "public T caseModel(Model object)\n {\n return null;\n }", "public T caseModel(Model object)\n {\n return null;\n }", "private Model(){}", "public ModelBolting(){}", "public T caseModel(Model object) {\n\t\treturn null;\n\t}", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "Model createModel();", "@Override\n\tpublic Model create() {\n\t\treturn null;\n\t}", "public abstract M toModel(DTO dto);", "public Model() {\n }", "public Model() {\n }", "public Model() {\n }", "public ModelObject read(ModelObject obj);", "public Model() {\n\n }", "public Model() {\n\t}", "public Model() {\n\t}", "public ModelBean provideModel();", "public Model createBaseModel() {\n return ModelFactory.createDefaultModel();\n }", "protected Model makeModel()\n {\n LayerList layers = new LayerList();\n\n for (Layer layer : this.observered.getModel().getLayers())\n {\n if (layer instanceof TiledImageLayer) // share TiledImageLayers\n layers.add(layer);\n }\n\n Model model = new BasicModel();\n model.setGlobe(this.observered.getModel().getGlobe()); // share the globe\n model.setLayers(layers);\n\n return model;\n }", "DataModel createDataModel();", "PriceModel createInstanceOfPriceModel();", "public M getInstanceModel(DTO modelDTO, Class<M> modelBDClass) {\n\n M model = null;\n\n EntityUtil entityUtil = new EntityUtil();\n\n try {\n\n model = entityUtil.copyEntity(modelDTO, modelBDClass.getConstructor().newInstance());\n\n } catch (InstantiationException e) {\n LogManager.getLog(this.getClass()).warn(e);\n } catch (IllegalAccessException e) {\n LogManager.getLog(this.getClass()).warn(e);\n } catch (InvocationTargetException e) {\n LogManager.getLog(this.getClass()).warn(e);\n } catch (NoSuchMethodException e) {\n LogManager.getLog(this.getClass()).warn(e);\n }\n\n return model;\n }", "public BaseModel initObj() {\n\t\treturn null;\n\t}", "public ViewModel(IModel model) {\n this.model = model;\n }", "UserModel()\n {/*Used for Gson*/}", "public Model doCreateModel() {\n Model m = m_baseModelName == null ? maker.createFreshModel() : maker.createModel( m_baseModelName );\n return new OntModelImpl( this, m );\n }", "SolvableConflictModel createInstanceOfSolvableConflictModel();", "public UserModel() {\n }", "DomainModel createDomainModel();", "protected Object resolveModel(Object model) {\n\t\treturn model;\n\t}", "public interface ModelFactory <ModelObject> {\n public void createElement(ModelObject object);\n}", "private Model() {\n lists.put(ItemType.DEVELOPER, new ItemList());\n lists.put(ItemType.PROJECT, new ItemList());\n lists.put(ItemType.STORY, new ItemList());\n lists.put(ItemType.STORY_DEVELOPER, new ItemList());\n }", "public interface CustomObjectExpansionModel<T> {\n\n static <T> CustomObjectExpansionModel<CustomObject<T>> of(){\n return new CustomObjectExpansionModelImpl<>();\n }\n}", "@Override\r\n\tpublic TemplateModel wrap(Object object) throws TemplateModelException\r\n {\r\n\t\tif (object == null)\r\n\t\t{\r\n\t\t\treturn super.wrap(object);\r\n\t\t}\r\n\t\t\r\n\t\tif (object instanceof TemplateModel) {\r\n return (TemplateModel) object;\r\n }\r\n\t\t\r\n\t\t//TODO implement caching, see super.wrap\r\n\t\t\r\n \tModelFactory modelFactory = _getModelFactory(object.getClass());\r\n \t\r\n \tif (modelFactory == null)\r\n\t\t{\r\n\t\t\t//we have no model factory, let super handle it\r\n\t\t\treturn super.wrap(object);\r\n\t\t} else\r\n\t\t{\r\n\t\t\t//use the factory to wrap the model\r\n\t\t\treturn modelFactory.create(object, this);\r\n\t\t}\r\n }", "public Model() {\n this(DSL.name(\"model\"), null);\n }", "ZenModel createZenModel();", "public final InternalMessageModel newMessageModel() {\n return (InternalMessageModel) newProxy(InternalMessageModel.class,\n MessageModelImpl.class);\n }", "public UserModel()\r\n\t{\r\n\t}", "public DefaultObjectModel ()\n {\n this (new Schema ());\n }", "@ModelEntity\n\tpublic static interface ModelObject {\n\n\t\tpublic static final String CHILDREN = \"children\";\n\t\tpublic static final String PARENT = \"parent\";\n\n\t\t@Getter(value = PARENT, inverse = CHILDREN)\n\t\tpublic ModelObject getParent();\n\n\t\t@Setter(PARENT)\n\t\tpublic void setParent(ModelObject parent);\n\n\t\t@Getter(value = CHILDREN, cardinality = Cardinality.LIST, inverse = PARENT)\n\t\tpublic List<ModelObject> getChildren();\n\n\t\t@Setter(CHILDREN)\n\t\tpublic void setChildren(List<ModelObject> children);\n\n\t\t@Adder(CHILDREN)\n\t\tpublic void addToChildren(ModelObject child);\n\n\t\t@Remover(CHILDREN)\n\t\tpublic void removeFromChildren(ModelObject child);\n\t}", "public abstract M getModel();", "public static DataModel toDataModel(Object value)\n {\n if (value instanceof DataModel)\n {\n return (DataModel) value;\n }\n\n if (value instanceof Object[])\n {\n return new ArrayDataModel((Object[]) value);\n }\n\n if (value == null)\n {\n return new ListDataModel(Collections.emptyList());\n }\n else if (value instanceof List)\n return new ListDataModel((List) value);\n\n return new ScalarDataModel(value);\n }", "ModelData getModel();", "ConfigModel createInstanceOfConfigModel();", "public static MlTableModel createModel(MlObjectTable table) {\n\n MlTableModel model = null;\n switch (table.getType()) {\n case Contact:\n model = new ContactTableModel(table);\n break;\n case Task:\n model = new TaskTableModel(table);\n break;\n case Image:\n model = new ImageTableModel(table);\n break;\n case Knowlet:\n case Collection:\n case Map:\n case Container:\n case Any:\n model = new AllObjectTableModel(table);\n break;\n default:\n throw new IllegalStateException(\"No table model found for specified object class: \" + table.getType().name());\n }\n return model;\n }", "public final InternalDerbyModel newDerbyModel() {\n return (InternalDerbyModel) newProxy(InternalDerbyModel.class,\n DerbyModelImpl.class);\n }", "@Override\r\n\tpublic T getModel() {\n\t\treturn model;\r\n\t}", "EisModel createEisModel();", "protected ObjectModel createObjectModel(String uid, String xml) {\r\n throw new IllegalStateException(\"You must register the same object model on all sites.\");\r\n }", "public UseCaseItem() {\n delegate = new MyModel.Builder().build();\n }", "public Object caseMetaModel(MetaModel object) {\n\t\treturn null;\n\t}", "public static Model getMinimalModel(final Resource individual, final OntClass asClass)\n\t{\n\t\tfinal Model model = ModelFactory.createDefaultModel();\n\t\tMinimalModelVisitor visitor = new MinimalModelVisitor(model, individual);\n\t\tnew VisitingDecomposer(visitor, visitor, visitor).decompose(asClass);\n\t\treturn model;\n\t}", "public Object caseConModelClass(ConModelClass object) {\r\n\t\treturn null;\r\n\t}", "public static synchronized Model getInstance() {\n if (instance == null) {\n instance = new Model();\n }\n return instance;\n }", "GoalModel createGoalModel();", "Model copy();", "ConflictingAssumptionModel createInstanceOfConflictingAssumptionModel();", "IModel getWrappedModel();", "A getModel();", "public T caseMetamodel(Metamodel object) {\n\t\treturn null;\n\t}", "public UserModel()\n\t{}", "public final InternalReportModel newReportModel() {\n return (InternalReportModel) newProxy(InternalReportModel.class,\n ReportModelImpl.class);\n }", "public ModelManagerImpl() {\n this( null );\n }", "public DTO getInstanceDTO(M model, Class<DTO> dtoClass) {\n\n DTO modelDTO = null;\n\n EntityUtil entityUtil = new EntityUtil();\n\n try {\n\n modelDTO = entityUtil.copyEntity(model, dtoClass.getConstructor().newInstance());\n\n } catch (InstantiationException e) {\n LogManager.getLog(this.getClass()).warn(e);\n } catch (IllegalAccessException e) {\n LogManager.getLog(this.getClass()).warn(e);\n } catch (InvocationTargetException e) {\n LogManager.getLog(this.getClass()).warn(e);\n } catch (NoSuchMethodException e) {\n LogManager.getLog(this.getClass()).warn(e);\n }\n\n return modelDTO;\n }", "public interface IModel {\n}", "@MainThread\n public abstract NetworkModel entityToNetworkModel(CacheEntity entity);", "public static Model createModel(RepositoryConnection connection)\n { \n Graph graph = new GraphRepository(connection) ;\n return ModelFactory.createModelForGraph(graph) ;\n }", "public interface BaseModel {\n}", "public interface BaseModel {\n}", "private SingleObject(){}", "Build_Model() {\n\n }", "public abstract DTO toDTO(M model);", "public interface Model {\n\n public ModelData getModelData();\n\n public void loadUsers();\n\n public void loadDeletedUsers();\n\n public void loadUserById(long userId);\n\n public void deleteUserById(long l);\n\n void changeUserData(String name, long id, int level);\n}", "@Override\n public Model newModel(CatalogItem item) {\n return null;\n }", "public interface UserModel {\n\n\n}", "public static Model createModel(RepositoryConnection connection, Resource context)\n { \n Graph graph = new GraphRepository(connection, context) ;\n return ModelFactory.createModelForGraph(graph) ;\n }", "public Model() {\n this(Persistence.createEntityManagerFactory(PERSISTENCE_UNIT_NAME), new TextRepository());\n }", "public ModelAccessException() {\n\t\tsuper();\n\n\t}", "PriceSummaryModel createInstanceOfPriceSummaryModel();", "public Model getModel () { return _model; }", "public static MusicModel createModel() {\n return new MusicModelImpl();\n }", "public interface BaseModel {\n\n}", "DataModel getDataModel ();", "TypedModel getModel();", "public T caseInputModel(InputModel object) {\n\t\treturn null;\n\t}", "public interface Model {\n /** Clears existing backing model and replaces with the provided new data. */\n void resetData(ReadOnlyAddressBook newData);\n\n /** Returns the AddressBook */\n ReadOnlyAddressBook getAddressBook();\n\n /** Deletes the given person. */\n void deletePerson(ReadOnlyPerson target) throws UniquePersonList.PersonNotFoundException;\n\n /** Adds the given person */\n void addPerson(Person person) throws UniquePersonList.DuplicatePersonException;\n\n /** Returns the filtered person list as an {@code UnmodifiableObservableList<ReadOnlyPerson>} */\n UnmodifiableObservableList<ReadOnlyPerson> getFilteredPersonList();\n\n /** Updates the filter of the filtered person list to show all persons */\n void updateFilteredListToShowAll();\n\n /** Updates the filter of the filtered person list to filter by the given keywords*/\n void updateFilteredPersonList(Set<String> keywords);\n\n}", "void create(Model model) throws Exception;", "public interface ModelProvider\n{\n\t/* public: ModelProvider interface */\n\n\tpublic ModelBean provideModel();\n}", "public boolean create(ModelObject obj);", "@JsonIgnore\n @Override\n public Model getModel() {\n return this.model;\n }", "public static DataModelBuilder create() {\n return new DataModelBuilder();\n }", "public static Model newOf(Model model) {\n\t\tModel newModel = Model.newOf();\n\t\tnewModel.setTitle(model.getTitle());\n\t\tnewModel.setTableCode(model.getTableCode());\n\t\tnewModel.setDescription(model.getDescription());\n\t\treturn newModel;\n\t}" ]
[ "0.67289805", "0.63542163", "0.63222736", "0.63222736", "0.63222736", "0.6221129", "0.6020133", "0.6011245", "0.597342", "0.597342", "0.597342", "0.597342", "0.597342", "0.597342", "0.597342", "0.5950602", "0.5885165", "0.58635736", "0.58635736", "0.58635736", "0.581233", "0.5803648", "0.57995313", "0.57995313", "0.5799377", "0.5772371", "0.5724219", "0.5696935", "0.5677203", "0.5611249", "0.5602175", "0.5580706", "0.5575816", "0.55708975", "0.5559446", "0.5524714", "0.549624", "0.5490429", "0.5485067", "0.5451105", "0.54509944", "0.54353756", "0.5428066", "0.54202116", "0.5412358", "0.537815", "0.53583246", "0.53345895", "0.5325203", "0.5320241", "0.53184605", "0.53176874", "0.53152615", "0.53144926", "0.5305086", "0.5303982", "0.5296099", "0.5294581", "0.5293762", "0.5281973", "0.5277716", "0.5264025", "0.52542865", "0.5246668", "0.52346945", "0.5229456", "0.5228256", "0.5224885", "0.52247936", "0.5224673", "0.5222862", "0.5220921", "0.5217892", "0.5204518", "0.519625", "0.5196131", "0.5196131", "0.5189164", "0.51847816", "0.5184399", "0.51824385", "0.5181129", "0.5175853", "0.5171482", "0.51604986", "0.5154331", "0.5150711", "0.513643", "0.5134584", "0.51245266", "0.51152545", "0.5110481", "0.5101726", "0.5093792", "0.5093504", "0.5092368", "0.50874984", "0.5082582", "0.50746", "0.5067037" ]
0.6573964
1
Builds a filter which will be useful for most tables. If user searches for "John Doe", the filter will accept properties with exact or partial match, such as name="John Doe Smith". But it will also accept records such as firstname="John Mayer", lastname="Doe". Make sure to separate property names properly, or an exception will be thrown. Normally, string properties are put in the caseInsensitivePropertyNames array, but if you want filtering to be casesensitive, put all properties in otherPropertyNames together with numeric properties, etc.
public Filter getStandardOrFilter(String filterText, String[] caseInsensitivePropertyNames, String[] otherPropertyNames) { if (StringUtils.isBlank(filterText)) { return null; } String[] filterTextElements = StringUtils.split(filterText, ' '); Or[] ors = new Or[filterTextElements.length]; for (int f = 0; f < filterTextElements.length; f++) { Like[] likes = new Like[caseInsensitivePropertyNames.length + otherPropertyNames.length]; for (int l = 0; l < likes.length; l++) { if (l < caseInsensitivePropertyNames.length) { likes[l] = new Like(caseInsensitivePropertyNames[l], filterTextElements[f], false); } else { // Note: for non-string properties we can't specify case-insensitive filtering (causes error) likes[l] = new Like(otherPropertyNames[l-caseInsensitivePropertyNames.length], filterTextElements[f]); } } ors[f] = new Or(likes); } if (ors.length == 1) { return ors[0]; } else { return new And(ors); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String constructFilter(Map<String, String> properties) {\r\n\r\n String filter = null;\r\n StringBuffer filterBuffer = new StringBuffer();\r\n\r\n if (properties != null && properties.size() > 0) {\r\n filterBuffer.append(\"(&\");\r\n\r\n Map<String, String> serviceProperties = properties;\r\n for (String key : serviceProperties.keySet()) {\r\n filterBuffer.append(\"(\" + key + \"=\" + serviceProperties.get(key) + \")\");\r\n }\r\n\r\n filterBuffer.append(\")\");\r\n filter = new String(filterBuffer);\r\n }\r\n\r\n return filter;\r\n }", "String genWhereConditionsFromFilters(TableFields tableFields, String filters);", "private static Predicate<Person> predicate(CrudFilter filter) {\n return filter.getConstraints().entrySet().stream()\n .map(constraint -> (Predicate<Person>) person -> {\n try {\n Object value = valueOf(constraint.getKey(), person);\n return value != null && value.toString().toLowerCase()\n .contains(constraint.getValue().toLowerCase());\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n })\n .reduce(Predicate::and)\n .orElse(e -> true);\n }", "private FilterCriteria buildCriteria(String preProcessFields,\n\t\t\tMap<String, String> builtInProperties,\n\t\t\tMap<String, String> dynaProperties) {\n\t\tFilterCriteria criteria = null;\n\n\t\t// EntityProperty to Hibernate Property mappings\n\t\tMap<String, String> hibMap = new HashMap<String, String>();\n\t\thibMap.put(LogMessage.EP_DEVICE_IDENTIFICATION,\n\t\t\t\tLogMessage.HP_DEVICE_IDENTIFICATION);\n\t\thibMap.put(LogMessage.EP_APP_SEVERITY_NAME,\n\t\t\t\tLogMessage.HP_APP_SEVERITY_NAME);\n\t\thibMap.put(LogMessage.EP_TEXT_MESSAGE, LogMessage.HP_TEXT_MESSAGE);\n\t\thibMap.put(LogMessage.EP_OPERATION_STATUS_NAME,\n\t\t\t\tLogMessage.HP_OPERATION_STATUS_NAME);\n\t\thibMap.put(LogMessage.EP_REPORT_DATE, LogMessage.HP_REPORT_DATE);\n\t\thibMap.put(LogMessage.EP_MONITOR_STATUS_NAME,\n\t\t\t\tLogMessage.HP_MONITOR_STATUS_NAME);\n\n\t\tStringTokenizer stkn = new StringTokenizer(preProcessFields, \",\");\n\t\tint criteriaCount = stkn.countTokens();\n\t\tint matchCount = 0;\n\t\tint dynamicPropCount = 0;\n\t\twhile (stkn.hasMoreTokens()) {\n\t\t\tString field = stkn.nextToken();\n\t\t\tif (builtInProperties != null\n\t\t\t\t\t&& builtInProperties.containsKey(field)) {\n\t\t\t\tmatchCount++;\n\t\t\t\tif (criteria == null)\n\t\t\t\t\tcriteria = FilterCriteria.eq(hibMap.get(field),\n\t\t\t\t\t\t\tbuiltInProperties.get(field));\n\t\t\t\telse\n\t\t\t\t\tcriteria.and(FilterCriteria.eq(hibMap.get(field),\n\t\t\t\t\t\t\tbuiltInProperties.get(field)));\n\t\t\t} // end if\n\t\t\tif (dynaProperties != null && dynaProperties.containsKey(field)) {\n\t\t\t\tmatchCount++;\n\t\t\t\t// An exception for monitorstatus name as this field comes as\n\t\t\t\t// dynamic properties.\n\t\t\t\tif (field.equals(LogMessage.EP_MONITOR_STATUS_NAME)) {\n\t\t\t\t\tif (criteria == null)\n\t\t\t\t\t\tcriteria = FilterCriteria.eq(field, builtInProperties\n\t\t\t\t\t\t\t\t.get(field));\n\t\t\t\t\telse\n\t\t\t\t\t\tcriteria.and(FilterCriteria.eq(field, builtInProperties\n\t\t\t\t\t\t\t\t.get(field)));\n\t\t\t\t} // end if\n\t\t\t\telse {\n\t\t\t\t\tif (criteria == null) {\n\t\t\t\t\t\tcriteria = FilterCriteria.eq(\"propertyValues.name\"+ \"_\" + dynamicPropCount,\n\t\t\t\t\t\t\t\tfield);\n\t\t\t\t\t\tcriteria.and(FilterCriteria.eq(\n\t\t\t\t\t\t\t\t\"propertyValues.valueString\"+ \"_\" + dynamicPropCount, dynaProperties\n\t\t\t\t\t\t\t\t\t\t.get(field)));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcriteria.and(FilterCriteria.eq(\n\t\t\t\t\t\t\t\t\"propertyValues.name\"+ \"_\" + dynamicPropCount, field));\n\t\t\t\t\t\tcriteria.and(FilterCriteria.eq(\n\t\t\t\t\t\t\t\t\"propertyValues.valueString\"+ \"_\" + dynamicPropCount, dynaProperties\n\t\t\t\t\t\t\t\t\t\t.get(field)));\n\t\t\t\t\t} // end if\n\t\t\t\t} // end if\n\t\t\t\tdynamicPropCount++;\n\t\t\t} // end if\n\t\t} // end while\n\t\tif (matchCount == criteriaCount) {\n\t\t\t// if all the fields matches then append the open criteria\n\t\t\tcriteria.and(FilterCriteria.eq(LogMessage.HP_OPERATION_STATUS_NAME,\n\t\t\t\t\t\"OPEN\"));\n\t\t\treturn criteria;\n\t\t} // end if\n\t\treturn null;\n\t}", "public static PropertyFilter getDocumentPropertyFilter(\n Set<String> includedMetaNames) {\n Set<String> filterSet = new HashSet<String>();\n if (includedMetaNames != null) {\n filterSet.addAll(includedMetaNames);\n }\n filterSet.add(PropertyNames.ID);\n filterSet.add(PropertyNames.CLASS_DESCRIPTION);\n filterSet.add(PropertyNames.CONTENT_ELEMENTS);\n filterSet.add(PropertyNames.DATE_LAST_MODIFIED);\n filterSet.add(PropertyNames.MIME_TYPE);\n filterSet.add(PropertyNames.VERSION_SERIES);\n filterSet.add(PropertyNames.VERSION_SERIES_ID);\n filterSet.add(PropertyNames.RELEASED_VERSION);\n filterSet.add(PropertyNames.OWNER);\n filterSet.add(PropertyNames.PERMISSIONS);\n filterSet.add(PropertyNames.PERMISSION_TYPE);\n filterSet.add(PropertyNames.PERMISSION_SOURCE);\n\n StringBuilder buf = new StringBuilder();\n for (String filterName : filterSet) {\n buf.append(filterName).append(\" \");\n }\n buf.deleteCharAt(buf.length() - 1);\n\n PropertyFilter filter = new PropertyFilter();\n filter.addIncludeProperty(\n new FilterElement(null, null, null, buf.toString(), null));\n return filter;\n }", "void generateWriteProperty2WhereCondition(Builder methodBuilder, String beanName, TypeName beanClass, ModelProperty property);", "@Test\n public void testCreateFilter() throws Exception {\n System.out.println(\"createFilter\");\n \n String expResult = \"{\\\"key\\\":{\\\"Delivery\\\":\\\"***REMOVED***\\\",\\\"FunctionalEnvironment\\\":\\\"Production\\\"},\"\n + \"\\\"values\\\":[\\\"Company\\\",\\\"VirtualDC\\\",\\\"Manufacturer\\\"]}\";\n \n \n TreeMap<String,String> key = new TreeMap<String,String>();\n List<String> values =new ArrayList<String>();\n key.put(\"Delivery\", \"***REMOVED***\");\n key.put(\"FunctionalEnvironment\", \"Production\");\n \n \n \n values.add(\"Company\");\n values.add(\"VirtualDC\");\n values.add(\"Manufacturer\");\n \n CriteriaFilter instance = new CriteriaFilter(key, values);\n \n List<CriteriaFilter> resultList = new ArrayList<CriteriaFilter>();\n resultList.add(instance);\n \n \n String result = \"\";\n for (CriteriaFilter criterio: resultList){\n System.out.println(\"result is \" + criterio);\n result = criterio.toString();\n }\n \n assertEquals(expResult, result);\n \n }", "public static FieldMatcher ignoreCase() {\n return (columnName, recordOneField, recordTwoField) -> {\n //we do not want to do a case-insensitive comparison for the key and for case-sensitive columns\n if (!caseSensitiveColumns.contains(columnName) && !columnName.equals(keyColumn)) {\n return recordOneField.equalsIgnoreCase(recordTwoField);\n } else {\n return recordOneField.equals(recordTwoField);\n }\n };\n }", "@Override\n public SqlDatabaseTable filter(SqlDatabaseTable table, List<FilterRule> filterRules) {\n if (filterRules.isEmpty()) return table;\n\n StringBuilder sql = new StringBuilder();\n sql.append(\"SELECT * FROM \").append(table.getFullRef());\n sql.append(\" WHERE\");\n for (int i = 0; i < filterRules.size(); i++) {\n FilterRule filterRule = filterRules.get(i);\n if (filterRule instanceof ColumnFilterRule) {\n int lhs = ((ColumnFilterRule) filterRule).getRowId();\n int rhs = ((ColumnFilterRule) filterRule).getAnotherRowId();\n sql.append(\" `_\").append(lhs).append(\"`=`_\").append(rhs).append(\"`\");\n } else if (filterRule instanceof ConstantFilterRule) {\n int rowId = ((ConstantFilterRule) filterRule).getRowId();\n String value = ((ConstantFilterRule) filterRule).getValue();\n sql.append(\" `_\").append(rowId).append(\"`='\").append(value).append(\"'\");\n } else {\n throw new IllegalArgumentException();\n }\n if (i != filterRules.size() - 1) {\n sql.append(\" AND\");\n }\n }\n\n return new SqlDatabaseQueryTable(sql.toString(), table.getArity());\n }", "@Override\n public Function<String, Predicate<String>> getFieldFilter() {\n return index -> field -> true;\n }", "@JsonCreator\n public Filter(String filterStr) {\n Matcher matcher = FILTER_PATTERN.matcher(filterStr);\n if (matcher.find()) {\n _expression = filterStr;\n _leftOperand = getOperand(matcher.group(1));\n _operator = Operator.fromString(matcher.group(2).replaceAll(\"\\\\s+\", \"\"));\n _rightOperand = getOperand(matcher.group(4));\n } else {\n throw new IllegalArgumentException(\"Illegal filter string pattern: '\" + filterStr + \"'\");\n }\n }", "@Override\n public Filter getFilter() {\n\n return new Filter() {\n @Override\n protected FilterResults performFiltering(CharSequence charSequence) {\n\n String charString = charSequence.toString();\n\n if (charString.isEmpty()) {\n\n mDataset = mArrayList;\n } else {\n\n ArrayList<DataObject> filteredList = new ArrayList<>();\n\n for (DataObject data : mArrayList) {\n\n if (data.getid().toLowerCase().contains(charString.toLowerCase()) || data.getname().toLowerCase().contains(charString.toLowerCase())) {\n\n filteredList.add(data);\n }\n }\n\n mDataset = filteredList;\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = mDataset;\n return filterResults;\n }\n\n @Override\n protected void publishResults(CharSequence charSequence, FilterResults filterResults) {\n mDataset = (ArrayList<DataObject>) filterResults.values;\n notifyDataSetChanged();\n }\n };\n }", "public QueryUserFilter(QueryUserFilter source) {\n if (source.PropertyKey != null) {\n this.PropertyKey = new String(source.PropertyKey);\n }\n if (source.PropertyValue != null) {\n this.PropertyValue = new String(source.PropertyValue);\n }\n if (source.Logic != null) {\n this.Logic = new Boolean(source.Logic);\n }\n if (source.OperateLogic != null) {\n this.OperateLogic = new String(source.OperateLogic);\n }\n }", "protected List<Tuple<Operator, Property>> getPropertyFilters() {\n if (properties == null) {\n EntityDescriptor ed = getDescriptor();\n properties = filters.stream()\n .map(filter -> Tuple.create(filter.getFirst(), ed.getProperty(filter.getSecond())))\n .toList();\n }\n\n return Collections.unmodifiableList(properties);\n }", "public QueryElement addLowerThen(String property, Object value);", "@Override\n\tpublic List<PropertyFilter> buildPropertyFilter(CcNoticereceive entity) {\n\t\treturn null;\n\t}", "public PropertyCriteria() {\n\t\tsuper();\n\t}", "public QueryElement addLowerEqualsThen(String property, Object value);", "Parameters genParamatersFromFilters(TableFields tableFields, String filters);", "@Test\n public void testSearchFilter_WithoutAddedSearchBase_WithoutParensInQuery_WithoutParensInParam() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError expectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n expectedError = e;\n }\n\n assertNotNull(expectedError);\n }", "DbQuery setEqualsFilter(String value) {\n filter = Filter.EQUALS;\n filterType = FilterType.STRING;\n this.equals = value;\n return this;\n }", "Map<String, String> getFilters();", "java.lang.String getFilter();", "public abstract Query<T> buildFilter(Query<T> builder, T exampleObj);", "@FXML\n public void filterIngredients(){\n String searchText = searchIngredient.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n ingredientsList.setItems(filterObservableList);\n }", "public String buildWhereSQL() throws Exception {\r\n if (!inputData.hasFilter()) {\r\n return null;\r\n }\r\n\r\n List<BasicFilter> filters = null;\r\n try {\r\n String filterString = inputData.getFilterString();\r\n Object filterObj = getFilterObject(filterString);\r\n\r\n filters = convertBasicFilterList(filterObj, filters);\r\n\r\n StringBuffer sb = new StringBuffer();\r\n String andDivisor = \"\";\r\n for (Object obj : filters) {\r\n BasicFilter filter = (BasicFilter) obj;\r\n\r\n sb.append(andDivisor);\r\n andDivisor = \" AND \";\r\n\r\n ColumnDescriptor column = inputData.getColumn(filter.getColumn().index());\r\n //the column name of filter\r\n sb.append(column.columnName());\r\n\r\n //the operation of filter\r\n FilterParser.Operation op = filter.getOperation();\r\n switch (op) {\r\n case HDOP_LT:\r\n sb.append(\"<\");\r\n break;\r\n case HDOP_GT:\r\n sb.append(\">\");\r\n break;\r\n case HDOP_LE:\r\n sb.append(\"<=\");\r\n break;\r\n case HDOP_GE:\r\n sb.append(\">=\");\r\n break;\r\n case HDOP_EQ:\r\n sb.append(\"=\");\r\n break;\r\n default:\r\n throw new UnsupportedFilterException(\"unsupported Filter operation : \" + op);\r\n }\r\n\r\n Object val = filter.getConstant().constant();\r\n switch (DataType.get(column.columnTypeCode())) {\r\n case SMALLINT:\r\n case INTEGER:\r\n case BIGINT:\r\n case FLOAT8:\r\n case REAL:\r\n case BOOLEAN:\r\n sb.append(val.toString());\r\n break;\r\n case TEXT:\r\n sb.append(\"'\").append(val.toString()).append(\"'\");\r\n break;\r\n case DATE:\r\n sb.append(\"'\" + val.toString() + \"'\");\r\n break;\r\n default:\r\n throw new UnsupportedFilterException(\"unsupported column type for filtering : \" + column.columnTypeCode());\r\n }\r\n\r\n }\r\n return sb.toString();\r\n } catch (UnsupportedFilterException ex) {\r\n // Do not throw exception, impose no constraints instead\r\n return null;\r\n }\r\n }", "private void filteringWithTypesOtherThanString() {\n PersonService personService = new PersonService(500);\n\n ComboBox<Person> comboBox = new ComboBox<>(\"Person\");\n comboBox.setPlaceholder(\"Enter minimum age to filter\");\n comboBox.setPattern(\"^\\\\d+$\");\n comboBox.setAllowedCharPattern(\"^\\\\d+$\");\n\n // Configuring fetch callback with a filter converter, so entered filter\n // strings can refer also to other typed properties like age (integer):\n comboBox.setItemsWithFilterConverter(\n query -> personService.fetchOlderThan(\n query.getFilter().orElse(null), query.getOffset(),\n query.getLimit()),\n ageStr -> ageStr.trim().isEmpty() ? null\n : Integer.parseInt(ageStr));\n comboBox.setItemLabelGenerator(person -> person.getFirstName() + \" \"\n + person.getLastName() + \" - \" + person.getAge());\n comboBox.setClearButtonVisible(true);\n comboBox.setWidth(WIDTH_STRING);\n addCard(\"Filtering\", \"Filtering with types other than String\",\n comboBox);\n }", "public static ObjectInputFilter createFilter(String param1String) {\n/* 383 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 384 */ return Global.createFilter(param1String, true);\n/* */ }", "boolean isFilterByExpression();", "public static ObjectInputFilter createFilter(String param1String) {\n/* 381 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 382 */ return Global.createFilter(param1String, true);\n/* */ }", "List<Student> findByNameContainingIgnoringCase(String name);", "void setFilterByExpression(boolean filterByExpression);", "public String buildFilter() {\n String qs = \"\";\n Set<Map.Entry<String, String>> set = instance.arguments.entrySet();\n\n for (Map.Entry<String, String> entry : set) {\n qs += entry.getKey() + \"=\" + entry.getValue() + \"&\";\n }\n return qs.substring(0, qs.length() - 1);\n }", "public static MultiValueMap<String, Object> validFieldNamesWithCastedValues(MultiValueMap<String, String> requestedFilter, Class<?> entityClass) {\n\n Set<String> inputFieldNames = requestedFilter.keySet();\n\n // Regarding case insensitivity: build a map that maps from the input field name to its original field name,\n // but add only those fields to the map that exist in the entity\n Map<String, String> validInputFieldNameToOrigFieldName = new HashMap<>();\n\n List<String> filterableFieldNames = getFilterableOrRestrictableFieldNames(entityClass);\n for (String filterableFieldName : filterableFieldNames) {\n // find the corresponding field in the input\n for (String inputFieldName : inputFieldNames) {\n if (filterableFieldName.equalsIgnoreCase(inputFieldName)) {\n validInputFieldNameToOrigFieldName.put(inputFieldName, filterableFieldName);\n break;\n }\n }\n }\n\n MultiValueMap<String, Object> result = new LinkedMultiValueMap<>();\n\n for (Map.Entry<String, String> entry : validInputFieldNameToOrigFieldName.entrySet()) {\n String validInputFieldName = entry.getKey();\n String origInputFieldName = entry.getValue();\n\n List<String> stringValues = requestedFilter.get(validInputFieldName);\n\n // cast to the correct type to avoid hibernate exceptions when querying db or similar\n for (String fieldStringValue : stringValues) {\n Field f = FieldUtils.getField(entityClass, origInputFieldName, true);\n Class<?> fieldType = f.getType();\n Object castedValue = ConvertUtils.convert(fieldStringValue, fieldType);\n result.add(origInputFieldName, castedValue);\n }\n }\n\n return result;\n }", "public FilterCriterion createFilter(String column, Object value, FilterCriterion.FilterType type)\n {\n return new FilterCriterion(column, value, type);\n }", "private RowFilter<Object, Object> getFilter(List<String> selectedCheckBoxes, final String regex) {\n FilterMapKey key = new FilterMapKey(selectedCheckBoxes);\n if (tableFilterMap.containsKey(key)) {\n return tableFilterMap.get(key);\n }\n\n RowFilter<Object, Object> filter = new RowFilter<Object, Object>() {\n @Override\n public boolean include(RowFilter.Entry entry) {\n String severity = (String) entry.getValue(1);\n return severity.matches(regex);\n }\n };\n tableFilterMap.put(key, filter);\n return filter;\n }", "@Query(\"SELECT i FROM Item i WHERE \"+\n \"upper(i.name) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.number) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.waybill) LIKE concat('%',upper(?1),'%') OR \"+\n \"upper(i.factory) LIKE concat('%',upper(?1),'%')\")\n Page<Item> filterAll(String substring, Pageable pageable);", "FilterInfo addFilter(String filtercode, String filter_type, String filter_name, String disableFilterPropertyName, String filter_order);", "List<String> getFilters();", "String getFilter();", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n String searchText = constraint.toString().toLowerCase();\n\n List<MapDataModel> filteredList = new ArrayList<>();\n\n if(searchText.isEmpty() || searchText.length() == 0){\n filteredList.addAll(doctorslist);\n }else{\n for (MapDataModel doctorlist: doctorslist){\n\n if (doctorlist.getDoctorname().toLowerCase().contains(searchText)){\n filteredList.add(doctorlist);\n }\n }\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredList;\n\n return filterResults;\n }", "public StatementBuilder where(String property, Object value) {\n return where(Where.eq(property, value));\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n List<EnquiryModel> filteredList = new ArrayList<>();\n\n if(constraint == null || constraint.length() == 0){\n //show all data\n filteredList.addAll(enquiryAll);\n }else {\n //filter using keys\n String filterPattern = constraint.toString().toLowerCase().trim();\n for(EnquiryModel enquiryModel : enquiryAll){\n if(enquiryModel.getUser_name().toLowerCase().contains(filterPattern) || enquiryModel.getUser_email().toLowerCase().contains(filterPattern)|| enquiryModel.getHostel_name().contains(filterPattern)|| enquiryModel.getEnquiry_status().contains(filterPattern)){\n filteredList.add(enquiryModel); //store those enquiry whose hostel name contains list as asked.\n }\n }\n }\n\n FilterResults filterResults = new FilterResults();\n filterResults.values = filteredList;\n\n return filterResults;\n }", "@Test\n public void testSearchFilter_WithoutAddedSearchBase_WithoutParensInQuery_WithParensInParam() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "public static FilterBuilder filters()\n {\n return new FilterBuilder();\n }", "private String getFilteringWhereClause(String tableAlias, boolean withWHERE) {\n StringBuilder expr = new StringBuilder();\n if (filter != null && filter.length()>0 && keywordAllFields != null && keywordAllFields.size()>0) {\n int i = 0;\n expr.append(withWHERE ? \" WHERE \" : \"\");\n for (String column : keywordAllFields) {\n if (i++==0) expr.append(\"concat(\");\n else expr.append(\",'||',\");\n if (tableAlias != null && tableAlias.length()>0) {\n expr.append(\"COALESCE(\");\n expr.append(tableAlias);\n expr.append(\".\");\n }\n expr.append(column);\n expr.append(\", '')\");\n }\n expr.append(\") like '%\");\n expr.append(filter);\n expr.append(\"%'\");\n }\n return expr.toString();\n }", "private boolean matchesFilter(RecordObj record) {\n\t\tString filterString = searchField.getText().trim();\n\t\tif (filterString == null || filterString.isEmpty()) {\n\t\t\treturn true;\n\t\t} // End if statement\n\n\t\tif (record.getRfid().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t} // End if statement\n\t\telse if (record.getCampus().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getBldg().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getRm().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getComments().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getTimeStamp().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getLastScanedBy().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getPurchaseOrder().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\telse if (record.getServiceTag().toLowerCase().indexOf(filterString.toLowerCase()) != -1) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false; \n\t}", "private void searchTableDetailFilter() {\n DefaultTableModel table = (DefaultTableModel) tblLimitDetail.getModel();\n String search;\n search = txtSearchFilterDetail.getText();\n TableRowSorter<DefaultTableModel> tr;\n tr = new TableRowSorter<>(table);\n tblLimitDetail.setRowSorter(tr);\n tr.setRowFilter(RowFilter.regexFilter(\"(?i)\" + search, 1, 2, 3, 4));\n }", "protected static Map<String, Object> prepareQueryForSelection(JsonObject parameters) {\n Map<String, Object> queryFilters = new HashMap<String, Object>();\n\n // Date fields\n processDateFilter(Entity.CREATION_DATE, parameters, queryFilters);\n processDateFilter(Entity.MODIFICATION_DATE, parameters, queryFilters);\n\n // String fields\n processStringFilter(Consumer.EMAIL, parameters, queryFilters);\n processStringFilter(Consumer.JABBER_ID, parameters, queryFilters);\n processStringFilter(Consumer.NAME, parameters, queryFilters);\n processStringFilter(Consumer.TWITTER_ID, parameters, queryFilters);\n\n // Long fields\n processLongFilter(Consumer.FACEBOOK_ID, parameters, queryFilters);\n\n return queryFilters;\n }", "List<TypePatientPropertyCondition> search(String query);", "private static Filter newFilter()\r\n {\r\n Filter filter = new Filter(\"filter1\", new Source(\"display1\", \"name1\", \"server\", \"key1\"));\r\n filter.getOtherSources().add(filter.getSource());\r\n Group group = new Group();\r\n group.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"123\"));\r\n Group group2 = new Group();\r\n group2.addFilterCriteria(new Criteria(\"field1\", Conditional.EQ, \"124\"));\r\n group.addFilterGroup(group2);\r\n filter.setFilterGroup(group);\r\n return filter;\r\n }", "@Override\n protected FilterResults performFiltering(CharSequence arg0) {\n FilterResults filterResults = new FilterResults();\n if (arg0 == null || arg0.length() == 0) {\n filterResults.values = MyArrayObjects;\n filterResults.count = MyArrayObjects.size();\n } else {\n String filterString = arg0.toString().toLowerCase();\n final ArrayList<Com_ItemObject> TempList = new ArrayList<Com_ItemObject>();\n for (Com_ItemObject Sis_ItemObject : MyArrayObjects) {\n //Filters both from Name and Bottom Text\n if ((Sis_ItemObject.getName() + \" \" + Sis_ItemObject.getBottomText()).toLowerCase().contains(filterString)) {\n TempList.add(Sis_ItemObject);\n }\n }\n\n filterResults.values = TempList;\n filterResults.count = TempList.size();\n }\n\n return filterResults;\n }", "protected AbstractJoSQLFilter ()\n {\n\n }", "private Filter guardAgainstNulls(Filter filter, Expression potentialPropertyName) {\r\n if (potentialPropertyName instanceof PropertyName) {\r\n PropertyName pn = (PropertyName) potentialPropertyName;\r\n String name = pn.getPropertyName();\r\n if (isNillable(name)) {\r\n Not notNull = ff.not(ff.isNull(ff.property(name)));\r\n if (filter instanceof And) {\r\n And and = (And) filter;\r\n List<Filter> children = new ArrayList<Filter>(and.getChildren());\r\n children.add(notNull);\r\n return ff.and(children);\r\n } else {\r\n return ff.and(filter, notNull);\r\n }\r\n }\r\n }\r\n\r\n return filter;\r\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results=new FilterResults();\n\n if(constraint != null && constraint.length()>0)\n {\n //CONSTARINT TO UPPER\n constraint=constraint.toString().toUpperCase();\n\n ArrayList<Busqueda> filters=new ArrayList<Busqueda>();\n\n //get specific items\n for(int i=0;i<FilterDatos.size();i++)\n {\n if(FilterDatos.get(i).getTitulo().toUpperCase().contains(constraint))\n {\n Busqueda p=new Busqueda();\n p.setId(FilterDatos.get(i).getId());\n p.setTitulo(FilterDatos.get(i).getTitulo());\n p.setDescripcion(FilterDatos.get(i).getDescripcion());\n p.setContraseña(FilterDatos.get(i).getContraseña());\n p.setLongitud(FilterDatos.get(i).getLongitud());\n p.setTerminada(FilterDatos.get(i).getTerminada());\n p.setPuntos(FilterDatos.get(i).getPuntos());\n filters.add(p);\n }\n }\n\n results.count=filters.size();\n results.values=filters;\n\n }else\n {\n results.count=FilterDatos.size();\n results.values=FilterDatos;\n\n }\n\n return results;\n }", "@Test\n public void testSearchFilter_WithoutAddedSearchBase_WithParens() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "@TransactionAttribute(TransactionAttributeType.SUPPORTS)\n protected Criteria<Customer, Customer> configRestrictions(Filter<Customer> filter) {\n Criteria<Customer, Customer> criteria = criteria();\n \n if (filter.hasParam(Customer_.id.getName())) {\n criteria.eq(Customer_.id, filter.getLongParam(Customer_.id.getName())); \n } \n if (filter.hasParam(Customer_.name.getName())) {\n criteria.eq(Customer_.name, (String)filter.getParam(Customer_.name.getName())); \n } \n if (filter.hasParam(Customer_.email.getName())) {\n criteria.eq(Customer_.email, (String)filter.getParam(Customer_.email.getName())); \n } \n if (filter.hasParam(Customer_.dateOfBirth.getName())) {\n criteria.eq(Customer_.dateOfBirth, (Date)filter.getParam(Customer_.dateOfBirth.getName())); \n } \n if (filter.hasParam(Customer_.city.getName())) {\n criteria.join(Customer_.city,\n where(City.class, JoinType.LEFT)\n .eq(City_.id, ((City) filter.getParam(\"city\")).getId()));\n } \n if (filter.hasParam(Customer_.state.getName())) {\n criteria.join(Customer_.state,\n where(State.class, JoinType.LEFT)\n .eq(State_.id, ((State) filter.getParam(\"state\")).getId()));\n } \n\n //create restrictions based on filter entity\n if (has(filter.getEntity())) {\n Customer filterEntity = filter.getEntity();\n \n\t if (has(filterEntity.getId())) {\n criteria.eq(Customer_.id, filterEntity.getId()); \n\t } \n\t if (has(filterEntity.getName())) {\n criteria.eq(Customer_.name, filterEntity.getName()); \n\t } \n\t if (has(filterEntity.getEmail())) {\n criteria.eq(Customer_.email, filterEntity.getEmail()); \n\t } \n\t if (has(filterEntity.getDateOfBirth())) {\n criteria.eq(Customer_.dateOfBirth, filterEntity.getDateOfBirth()); \n\t } \n\t if (has(filterEntity.getCity())) {\n criteria.join(Customer_.city,\n where(City.class, JoinType.LEFT)\n .eq(City_.id, filterEntity.getCity().getId()));\n\t } \n\t if (has(filterEntity.getState())) {\n criteria.join(Customer_.state,\n where(State.class, JoinType.LEFT)\n .eq(State_.id, filterEntity.getState().getId()));\n\t } \n }\n return criteria;\n }", "@Override\n public String propertyToColumnName(String propertyName) {\n if (Pattern.compile(\"[A-Z]+\").matcher(propertyName).find()) {\n return \"\\\"\" + propertyName + \"\\\"\";\n } else {\n return super.propertyToColumnName(propertyName);\n }\n }", "public String buildFilterString(SearchCriteria search){\n System.out.println(search);\n\n int i = 0;\n if(search.getTitle().equals(\"title\")){\n i++;\n }\n if(search.getAuthor().equals(\"author\")){\n i++;\n }\n if(search.getPublisher().equals(\"publisher\")){\n i++;\n }\n if(search.getLanguage().equals(\"language\")){\n i++;\n }\n if(search.getFormat().equals(\"format\")){\n i++;\n }\n if(search.getIsbn10().equals(\"isbn10\")){\n i++;\n }\n if(search.getIsbn13().equals(\"isbn13\")){\n i++;\n }\n\n String filter = \"SELECT * from testdb.book WHERE\";\n System.out.println(filter);\n System.out.println(\"number of filters \" + i);\n if(search.getTitle().equals(\"title\")){\n i--;\n System.out.println(filter);\n\n filter += \" title LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n\n filter += \" OR\";\n\n }\n }\n if(search.getAuthor().equals(\"author\")){\n i--;\n filter += \" author LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n\n filter += \" OR\";\n\n }\n }\n if(search.getPublisher().equals(\"publisher\")){\n i--;\n filter += \" publisher LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter +=\" OR\";\n\n }\n }\n if(search.getLanguage().equals(\"language\")){\n i--;\n filter += \" language LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getFormat().equals(\"format\")){\n i--;\n filter += \" format LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getIsbn10().equals(\"isbn10\")){\n i--;\n filter += \" isbn10 LIKE '%\" + search.getSearch() + \"%'\";\n if(i>0){\n filter += \" OR\";\n }\n }\n if(search.getIsbn13().equals(\"isbn13\")){\n\n filter += \" isbn13 LIKE '%\" + search.getSearch() + \"%'\";\n\n }\n System.out.println(\"END \" + filter);\n return filter;\n }", "public void setFilterExcludeProperties(List<String> filterExcludeProperties) {\n\n\t\tthis.filterExcludeProperties = filterExcludeProperties;\n\t}", "public static ObjectInputFilter createFilter2(String param1String) {\n/* 394 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 395 */ return Global.createFilter(param1String, false);\n/* */ }", "public static List<SearchFilter> getUserFilterList(\n\t\t\tUserSearchTerms searchTerms) {\n\t\tfinal List<SearchFilter> filters = new ArrayList<SearchFilter>();\n\t\t\n//\t\tif (!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()) &&\n//\t\t\t\t!StringUtils.isNotBlank(searchTerms.getUid())) {\n//\t\t\treturn filters;\n//\t\t}\n\t\t/** Each search term that wishes to be a part of the basic keyword\n\t\t * search should check for false isAdvancedSearch() and then provide\n\t\t * a fall back to getKeywords() in the filter\n\t\t */\n\n\t\tif (Validator.isNotNull(searchTerms.getFirstName()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.givenName,\n\t\t\t\t\tsearchTerms.getFirstName() != null ?\n\t\t\t\t\t\t\tsearchTerms.getFirstName() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getLastName()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.sn,\n\t\t\t\t\tsearchTerms.getLastName() != null ?\n\t\t\t\t\t\t\tsearchTerms.getLastName() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getEmailAddress()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.mail,\n\t\t\t\t\tsearchTerms.getEmailAddress() != null ?\n\t\t\t\t\t\t\tsearchTerms.getEmailAddress() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\t\t\n\t\tif (Validator.isNotNull(searchTerms.getDomain()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.esuccMailPrimaryDomain,\n\t\t\t\t\tsearchTerms.getDomain() != null ?\n\t\t\t\t\t\t\tsearchTerms.getDomain() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\t\t\n\t\tif (Validator.isNotNull(searchTerms.getEsuccEntity()) ||\n\t\t\t\t(!searchTerms.isAdvancedSearch() && StringUtils.isNotBlank(searchTerms.getKeywords()))) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.esuccEntity,\n\t\t\t\t\tsearchTerms.getEsuccEntity() != null ?\n\t\t\t\t\t\t\tsearchTerms.getEsuccEntity() : searchTerms.getKeywords(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getUid())) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.uid,\n\t\t\t\t\tsearchTerms.getUid(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\tif (Validator.isNotNull(searchTerms.getUidNumber())) {\n\t\t\tSearchFilter filter = new SearchFilter(\n\t\t\t\t\tFilter.uidNumber,\n\t\t\t\t\tsearchTerms.getUidNumber(),\n\t\t\t\t\tfalse);\n\t\t\tfilters.add(filter);\n\t\t}\n\n\t\t\n\t\treturn filters;\n\t}", "public FilterBuilder setFilter(FilterBy filterBy, String value) {\n instance.arguments.put(filterBy.getFilterKey(), value);\n return this;\n }", "private FormatFilter(final Function<ImageReaderWriterSpi, String[]> property) {\n this.property = property;\n }", "public static ObjectInputFilter createFilter2(String param1String) {\n/* 396 */ Objects.requireNonNull(param1String, \"pattern\");\n/* 397 */ return Global.createFilter(param1String, false);\n/* */ }", "String getWhereClause();", "List<StudentRecord> getStudentsWithNameFilter(char lastNameCharFilter, String clientId) throws Exception;", "private String getWhereFilter(ArrayList<Object> prmList) {\n StringBuffer filterBuffer = new StringBuffer();\n /* set id filter */\n if (this.idFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.id = ? \");\n prmList.add(this.idFilter);\n }\n\n if (this.typeFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.type LIKE ? \");\n prmList.add(this.typeFilter);\n }\n\n if (this.propertyInfoFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.property_info LIKE ? \");\n prmList.add(this.propertyInfoFilter);\n }\n\n if (this.landCertificateFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_certificate LIKE ? \");\n prmList.add(this.landCertificateFilter);\n }\n\n if (this.landMapNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_map_number LIKE ? \");\n prmList.add(this.landMapNumberFilter);\n }\n\n if (this.landNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_number LIKE ? \");\n prmList.add(this.landNumberFilter);\n }\n\n if (this.landAddressFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.land_address LIKE ? \");\n prmList.add(this.landAddressFilter);\n }\n\n if (this.carLicenseNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_license_number LIKE ? \");\n prmList.add(this.carLicenseNumberFilter);\n }\n\n if (this.carRegistNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_regist_number LIKE ? \");\n prmList.add(this.carRegistNumberFilter);\n }\n\n if (this.carFrameNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_frame_number LIKE ? \");\n prmList.add(this.carFrameNumberFilter);\n }\n\n if (this.carMachineNumberFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.car_machine_number LIKE ? \");\n prmList.add(this.carMachineNumberFilter);\n }\n\n if (this.originKindFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.origin_kind LIKE ? \");\n prmList.add(this.originKindFilter);\n }\n\n if (this.releaseFlgFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.release_flg = ? \");\n prmList.add(this.releaseFlgFilter);\n }\n\n if (this.deleteFlgFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ndp.delete_flg = ? \");\n prmList.add(this.deleteFlgFilter);\n }\n\n if (this.typeKeySearchFilter != null) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" npp.type LIKE ? \");\n prmList.add(this.typeKeySearchFilter);\n }\n\n if (this.keySearchFilter != null) {\n for (int i = 0; i < subKeys.size(); i++) {\n String subkey = subKeys.get(i);\n\n if (Constants.PLUS.equals(subkey)) {\n appendAnd(filterBuffer);\n filterBuffer.append(\" ( \");\n if (i == 0) {\n filterBuffer.append(\" ( \");\n }\n } else if (Constants.SPACE.equals(subkey)) {\n appendOr(filterBuffer);\n filterBuffer.append(\" ( \");\n } else {\n filterBuffer.append(\" MATCH(npp.property_info, npp.owner_info, npp.other_info, \" +\n \"ndp.prevent_in_book_number, ndp.prevent_person_info, ndp.prevent_doc_number, ndp.prevent_doc_summary, \" +\n \"ndp.prevent_note, ndp.release_in_book_number, ndp.release_person_info, \" +\n \"ndp.release_doc_number, ndp.release_doc_summary, ndp.release_note) \");\n filterBuffer.append(\" AGAINST(? IN BOOLEAN MODE) \");\n prmList.add(subkey);\n\n if (subkey.charAt(0) == '\"') {\n subkey = subkey.substring(1, subkey.length() - 1);\n }\n\n if (subkey.charAt(subkey.length() - 1) == '\"') {\n subkey = subkey.substring(0, subkey.length() - 2);\n }\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.property_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.owner_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.other_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n \n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n filterBuffer.append(\" ) \");\n }\n }\n filterBuffer.append(\" ) \");\n\n filterBuffer.append(\" ORDER BY \");\n for (int j = 1; j < subKeys.size(); j++) {\n String subkey = subKeys.get(j);\n if (!Constants.PLUS.equals(subkey) && !Constants.SPACE.equals(subkey)) {\n\n filterBuffer.append(\" ( \");\n filterBuffer.append(\" MATCH(npp.property_info, npp.owner_info, npp.other_info, \" +\n \"ndp.prevent_in_book_number, ndp.prevent_person_info, ndp.prevent_doc_number, ndp.prevent_doc_summary, \" +\n \"ndp.prevent_note, ndp.release_in_book_number, ndp.release_person_info, \" +\n \"ndp.release_doc_number, ndp.release_doc_summary, ndp.release_note) \");\n filterBuffer.append(\" AGAINST(? IN BOOLEAN MODE) \");\n prmList.add(subkey);\n\n if (subkey.charAt(0) == '\"') {\n subkey = subkey.substring(1, subkey.length() - 1);\n }\n\n if (subkey.charAt(subkey.length() - 1) == '\"') {\n subkey = subkey.substring(0, subkey.length() - 2);\n }\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.property_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.owner_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" npp.other_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n \n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.prevent_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_in_book_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_person_info LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_number LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_doc_summary LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n appendOr(filterBuffer);\n filterBuffer.append(\" ndp.release_note LIKE ? \");\n prmList.add(buildFilterString(subkey, FilterKind.MIDDLE.getValue()));\n\n if (j == subKeys.size() - 1) {\n filterBuffer.append(\" ) \");\n } else {\n filterBuffer.append(\" ) + \");\n }\n }\n }\n filterBuffer.append(\" DESC, prevent_doc_receive_date DESC \");\n }\n\n if (this.officeCode != null && !\"\".equals(this.officeCode)) {\n \tappendAnd(filterBuffer);\n filterBuffer.append(\" ndp.synchronize_id LIKE ? \");\n prmList.add(this.officeCode);\n }\n \n return filterBuffer.toString();\n }", "@Test\n public void testSearchFilter_WithAddedSearchBase_NoQueryParens() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"<%=parameter[\\\"Search String\\\"]%>\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"OU=Users(samaccountname=mary.olowu)\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }", "public KeyedFilter(StreamInput in) throws IOException {\n key = in.readString();\n filter = in.readNamedWriteable(QueryBuilder.class);\n }", "KTable<K, V> filter(Predicate<K, V> predicate);", "@Test\n void getByPropertyLikeSuccess() {\n List<User> users = dao.findAllByPropertyLike(\"lastName\", \"Q\");\n assertEquals(1, users.size());\n }", "private void fetchPropertiesAccordingToUserInput() {\n String query = \"SELECT * FROM Property WHERE mId > 0\";\n if (!TextUtils.isEmpty(mBinding.fragmentSearchZipcodeTxt.getText()))\n query += \" AND mZipCode = \" + mZipcodeInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchCityTxt.getText()))\n query += \" AND Property.mCity LIKE \" + \"'%\" + mCityInput + \"%'\";\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinSurfaceTxt.getText()))\n query += \" AND Property.mSurface >= \" + mMinSurfaceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxSurfaceTxt.getText()))\n query += \" AND Property.mSurface <= \" + mMaxSurfaceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinPriceTxt.getText()))\n query += \" AND Property.mPrice >= \" + mMinPriceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMaxPriceTxt.getText()))\n query += \" AND Property.mPrice <= \" + mMaxPriceInput;\n if (!TextUtils.isEmpty(mBinding.fragmentSearchMinFloorsTxt.getText()))\n query += \" AND Property.mFloors >= \" + mFloorsInput;\n if (!mTypeInput.equals(\"()\"))\n query += \" AND Property.mTypeProperty IN \" + mTypeInput;\n if (mAmenitiesInput.contains(\"School\"))\n query += \" AND Property.mAmenities LIKE '%School%'\";\n if (mAmenitiesInput.contains(\"Shops\"))\n query += \" AND Property.mAmenities LIKE '%Shops%'\";\n if (mAmenitiesInput.contains(\"Public transport\"))\n query += \" AND Property.mAmenities LIKE '%Public transport%'\";\n if (mAmenitiesInput.contains(\"Garden\"))\n query += \" AND Property.mAmenities LIKE '%Garden%'\";\n if (mChipRoomsInput != 0)\n query += \" AND Property.mNbRooms >= \" + mChipRoomsInput;\n if (mChipBedroomsInput != 0)\n query += \" AND Property.mNbBedrooms >= \" + mChipBedroomsInput;\n if (mChipBathroomsInput != 0)\n query += \" AND Property.mNbBathrooms >= \" + mChipBathroomsInput;\n if (mChipCoownerInput != 10)\n query += \" AND Property.mCoOwnership = \" + mChipCoownerInput;\n if (mChipIsSoldInput != 10)\n query += \" AND Property.mSold = \" + mChipIsSoldInput;\n if (mForSaleDate != 0)\n query += \" AND Property.mInitialSale >= \" + mForSaleDate;\n if (mSoldDate != 0)\n query += \" AND Property.mFinalSale <= \" + mSoldDate;\n if (mChipPhotoInput != 0)\n query += \" AND Property.mNbPictures >= \" + mChipPhotoInput;\n query += \" ;\";\n\n fetchPropertiesAccordingToCriteria(query);\n }", "private Filter ssoFilter() {\n\t\tCompositeFilter filter = new CompositeFilter();\n\t\tList<Filter> filters = new ArrayList<>();\n\t\tfilters.add(ssoFilter(facebook(), \"/login/facebook\"));\n\t\tfilters.add(ssoFilter(github(), \"/login/github\"));\n//\t\tfilters.add(ssoFilter(twitter(), \"/login/twitter\"));\n\t\tfilters.add(ssoFilter(linkedin(), \"/login/linkedin\"));\n\t\tfilter.setFilters(filters);\n\t\treturn filter;\n\t}", "public MapFilter(Properties p, String prefix) {\n // Properties extends HashTable<Object,Object> so it implements Map.\n // I need Map<String,T> so I wrap it in a HashMap for simplicity.\n // Java-8 breaks if we use diamond inference.\n this(new HashMap<>((Map) p), prefix);\n }", "List<User> findByfnameContaining(String search);", "public Input filterBy(Filter filter) {\n JsonArray filters = definition.getArray(FILTERS);\n if (filters == null) {\n filters = new JsonArray();\n definition.putArray(FILTERS, filters);\n }\n filters.add(Serializer.serialize(filter));\n return this;\n }", "@Override\n protected FilterResults performFiltering(CharSequence constraint) {\n\n FilterResults results = new FilterResults();\n if (constraint != null && constraint.length() > 0) {\n\n ArrayList<VehicleData> filterList = new ArrayList<>();\n\n for (int i = 0; i < mflatFilterList.size(); i++) {\n if (\n mflatFilterList.get(i).getName().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getModel().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getColor().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getNumber().toLowerCase().contains(constraint.toString().toLowerCase())\n || mflatFilterList.get(i).getFlat().getName().toLowerCase().contains(constraint.toString().toLowerCase())\n ) {\n filterList.add(mflatFilterList.get(i));\n }\n }\n\n results.count = filterList.size();\n\n results.values = filterList;\n\n } else {\n results.count = mflatFilterList.size();\n results.values = mflatFilterList;\n }\n return results;\n }", "public static void streamFilter(List<Associate> associateList, String filter) {\n\n\t\tString filter2 = filter.toLowerCase();\n\n\t\tassociateList.stream()\n\t\t\t\t.filter((Associate a) -> new StringBuilder(a.getFirstname().toLowerCase()).indexOf(filter2) != -1)\n\n\t\t\t\t.forEach((Associate a) -> {\n\t\t\t\t\tSystem.out.println(a.getFirstname());\n\n\t\t\t\t});\n\t}", "public void filterByUserName(final String username) {\n andWhere(\"LOWER(user.username) = :\" + USER_NAME);\n setParameter(USER_NAME, username.toLowerCase());\n }", "@FXML\n public void filterCupboardIngredients(){\n String searchText = searchIngredientCupboard.getText();\n List<Ingredient> filteredList = ingredientsFromDatabase.stream().filter(new Predicate<Ingredient>() {\n @Override\n public boolean test(Ingredient ingredient) {\n //inclusive of the upper cases makes it case insensitive\n if (ingredient.getName().toUpperCase().contains(searchText.toUpperCase())){\n return true;\n } else {\n return false;\n }\n }\n }).collect(Collectors.toList());\n filterObservableList = FXCollections.observableList(filteredList);\n allIngredientsCupboardPane.setItems(filterObservableList);\n }", "public ColumnBasedTableFilter(RowObjectTableModel<R> model) {\n\t\tthis.model = model;\n\t\tthis.name = null;\n\t}", "@Test\n public void testFilterStudent() {\n System.out.println(\"filterStudent\");\n HashMap<String, Student> result = new HashMap<>();\n School instance = new School();\n\n result.put(student1.getId(), student1);\n result.put(student2.getId(), student2);\n result.put(student3.getId(), student3);\n instance.setStudents(students);\n\n assertEquals(result, instance.filterStudent(\"\", students));\n assertEquals(result, instance.filterStudent(\" \", students));\n System.out.println(\"PASS with null filter\");\n\n result.remove(student1.getId());\n result.remove(student2.getId());\n assertEquals(result, instance.filterStudent(\"Hong\", students));\n System.out.println(\"PASS with name field\");\n\n result.put(student1.getId(), student1);\n result.put(student2.getId(), student2);\n assertEquals(result, instance.filterStudent(\"@\", students));\n assertEquals(result, instance.filterStudent(\"0909090909\", students));\n assertEquals(result, instance.filterStudent(\"08-0808-0808\", students));\n System.out.println(\"PASS with other fields\");\n\n result.clear();\n assertEquals(result, instance.filterStudent(\"qwerty\", students));\n System.out.println(\"PASS with not-found filter\");\n\n System.out.println(\"PASS ALL\");\n }", "@Override\n public List<MongoPrideAssay> filterByAttributes(List<Triple<String, String, String>> filters) {\n Query queryMongo = PrideMongoUtils.buildQuery(filters);\n return mongoTemplate.find(queryMongo, MongoPrideAssay.class);\n }", "public FilterCriterion(String columnName, Object value, Object value2, FilterType type)\n {\n this.columnName = columnName;\n this.value = value;\n this.type = type;\n this.value2 = value2;\n }", "public <T extends Model> QuerySet<T> filter(Class<T> modelClass, String... fields) {\n QuerySet<T> querySet = new QuerySet<T>();\n querySet.setEntity((Class<T>) this.entity);\n PreparedStatement statement = null;\n ResultSet resultSet = null;\n OneToOneField oneToOneFieldAnnotation = null;\n ForeignKeyField foreignKeyFieldAnnotation = null;\n ManyToManyField manyToManyFieldAnnotation = null;\n if (fields != null) {\n try {\n String sql = String.format(\"SELECT * FROM %s WHERE\", tableName);\n String format = \"SELECT\\n\\t*\\nFROM\\n\\t%s AS %s\\n%s%s\";\n String joins = \"\";\n String join = \"\";\n String where = \"\";\n String fieldName = \"\";\n String fieldValue = \"\";\n // Iterates through the pairs field=value passed.\n for (int i = 0; i < fields.length; i++) {\n fields[i] = fields[i] == null ? \"\" : fields[i].trim();\n if (fields[i].isEmpty()) {\n continue;\n }\n join = FieldLookup.translateJoin(entityName + \".\" + fields[i]);\n if (!joins.contains(join)) {\n joins += join;\n if (fields[i].matches(\"(\\\\w+\\\\.)+\\\\w+__.*\")) {\n fields[i] = fields[i].replace(fields[i].replaceAll(\"\\\\w+\\\\.\\\\w+__.*\", \"\"), \"\");\n }\n }\n if (fields[i].equalsIgnoreCase(\"AND\")) {\n fields[i] = \"AND\";\n }\n if (fields[i].equalsIgnoreCase(\"OR\")) {\n fields[i] = \"OR\";\n }\n String[] decomposedEl = FieldLookup.decompose(fields[i]);\n if (decomposedEl.length > 0) {\n Field associationField = JediEngine.getField(decomposedEl[0], entity);\n if (JediEngine.isOneToOneField(associationField) || JediEngine.isForeignKeyField(associationField)) {\n fields[i] = fields[i].replace(decomposedEl[0], decomposedEl[0] + \"_id\");\n }\n }\n // Changes the name of the field to the corresponding pattern\n // name on the database.\n if (fields[i].contains(\"=\")) {\n fieldName = fields[i].substring(0, fields[i].lastIndexOf(\"=\"));\n fieldName = TableUtil.getColumnName(fieldName);\n fieldValue = fields[i].substring(fields[i].lastIndexOf(\"=\"));\n fields[i] = String.format(\"%s%s\", fieldName, fieldValue);\n }\n // Adds a blank space between the field name and value.\n fields[i] = fields[i].replace(\"=\", \" = \");\n // Replaces % by \\%\n fields[i] = fields[i].replace(\"%\", \"\\\\%\");\n // Adds a blank space between the values separated by commas.\n fields[i] = fields[i].replace(\",\", \", \");\n // Checks if the current pair contains __startswith, __contains\n // or __endswith.\n if (fields[i].indexOf(\"__startswith\") > -1 || fields[i].indexOf(\"__!startswith\") > -1 ||\n fields[i].indexOf(\"__istartswith\") > -1 || fields[i].indexOf(\"__!istartswith\") > -1 ||\n fields[i].indexOf(\"__contains\") > -1 || fields[i].indexOf(\"__icontains\") > -1 || fields[i].indexOf(\"__!contains\") > -1 ||\n fields[i].indexOf(\"__!icontains\") > -1 || fields[i].indexOf(\"__endswith\") > -1 || fields[i].indexOf(\"__!endswith\") > -1 ||\n fields[i].indexOf(\"__iendswith\") > -1 || fields[i].indexOf(\"__!iendswith\") > -1) {\n // Creates a LIKE statement in SQL.\n if (fields[i].indexOf(\"__startswith\") > -1) {\n fields[i] = fields[i].replace(\"__startswith = \", \" LIKE \");\n // Replaces 'value' by 'value%'.\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\'\";\n } else if (fields[i].indexOf(\"__!startswith\") > -1) {\n fields[i] = fields[i].replace(\"__!startswith = \", \" NOT LIKE \");\n // Replaces 'value' by 'value%'.\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\'\";\n } else if (fields[i].indexOf(\"__istartswith\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__istartswith *= *(.*)$\", \"UPPER($1) LIKE UPPER($2)\");\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\')\";\n } else if (fields[i].indexOf(\"__!istartswith\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!istartswith *= *(.*)$\", \"UPPER($1) NOT LIKE UPPER($2)\");\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\')\";\n } else if (fields[i].indexOf(\"__contains\") > -1) {\n fields[i] = fields[i].replace(\"__contains = \", \" LIKE \");\n // Replaces 'value' by '%value%'.\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\'\";\n } else if (fields[i].indexOf(\"__!contains\") > -1) {\n fields[i] = fields[i].replace(\"__!contains = \", \" NOT LIKE \");\n // Replaces 'value' by '%value%'.\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\'\";\n } else if (fields[i].indexOf(\"__icontains\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__icontains *= *(.*)$\", \"UPPER($1) LIKE UPPER($2)\");\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\')\";\n } else if (fields[i].indexOf(\"__!icontains\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!icontains *= *(.*)$\", \"UPPER($1) NOT LIKE UPPER($2)\");\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n fields[i] = fields[i].substring(0, fields[i].lastIndexOf(\"\\'\"));\n fields[i] = fields[i] + \"%\\')\";\n } else if (fields[i].indexOf(\"__endswith\") > -1) {\n fields[i] = fields[i].replace(\"__endswith = \", \" LIKE \");\n // Replaces 'value' by '%value'.\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n } else if (fields[i].indexOf(\"__iendswith\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__iendswith *= *(.*)$\", \"UPPER($1) LIKE UPPER($2)\");\n // Replaces 'value' by '%value'.\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n } else if (fields[i].indexOf(\"__!endswith\") > -1) {\n fields[i] = fields[i].replace(\"__!endswith = \", \" NOT LIKE \");\n // Replaces 'value' by '%value'.\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n } else if (fields[i].indexOf(\"__!iendswith\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!iendswith *= *(.*)$\", \"UPPER($1) NOT LIKE UPPER($2)\");\n // Replaces 'value' by '%value'.\n fields[i] = fields[i].replaceFirst(\"\\'\", \"\\'%\");\n }\n }\n if (fields[i].indexOf(\"__in\") > -1) {\n // Creates a IN statement in SQL.\n fields[i] = fields[i].replace(\"__in = \", \" IN \");\n // Replaces [] by ()\n fields[i] = fields[i].replace(\"[\", \"(\");\n fields[i] = fields[i].replace(\"]\", \")\");\n }\n if (fields[i].indexOf(\"__!in\") > -1) {\n // Creates a IN statement in SQL.\n fields[i] = fields[i].replace(\"__!in = \", \" NOT IN \");\n // Replaces [] by ()\n fields[i] = fields[i].replace(\"[\", \"(\");\n fields[i] = fields[i].replace(\"]\", \")\");\n }\n if (fields[i].indexOf(\"__range\") > -1) {\n // Creates a BETWEEN statement in SQL.\n fields[i] = fields[i].replace(\"__range = \", \" BETWEEN \");\n // Removes [ or ] characters.\n fields[i] = fields[i].replace(\"[\", \"\");\n fields[i] = fields[i].replace(\"]\", \"\");\n // Replaces , (comma character) by AND.\n fields[i] = fields[i].replace(\", \", \" AND \");\n }\n if (fields[i].indexOf(\"__!range\") > -1) {\n // Creates a BETWEEN statement in SQL.\n fields[i] = fields[i].replace(\"__!range = \", \" NOT BETWEEN \");\n // Removes [ or ] characters.\n fields[i] = fields[i].replace(\"[\", \"\");\n fields[i] = fields[i].replace(\"]\", \"\");\n // Replaces , (comma character) by AND.\n fields[i] = fields[i].replace(\", \", \" AND \");\n }\n if (fields[i].indexOf(\"__regex\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__regex ?= ?(.*)$\", \" $1 REGEXP BINARY '$2'\");\n }\n if (fields[i].indexOf(\"__iregex\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__iregex ?= ?(.*)$\", \" $1 REGEXP '$2'\");\n }\n if (fields[i].matches(\".*__year__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__lt *= *(\\\\d{4})$\", \" $1 < '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year ?< ?(\\\\d{4})$\", \" $1 < '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__!lt *= *(\\\\d{4})$\", \" NOT $1 < '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__lte *= *(\\\\d{4})$\", \" $1 <= '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year ?<= ?(\\\\d{4})$\", \" $1 <= '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__!lte *= *(\\\\d{4})$\", \" NOT $1 <= '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__gt *= *(\\\\d{4})$\", \" $1 > '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year ?> ?(\\\\d{4})$\", \" $1 > '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__!gt *= *(\\\\d{4})$\", \" NOT $1 > '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__gte *= *(\\\\d{4})$\", \" $1 >= '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year ?>= ?(\\\\d{4})$\", \" $1 >= '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__!gte *= *(\\\\d{4})$\", \" NOT $1 >= '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__exact *= *(\\\\d{4})$\", \" $1 = '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year__!exact *= *(\\\\d{4})$\", \" NOT $1 = '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year *= *(\\\\d{4})$\", \" $1 BETWEEN '$2-01-01' AND '$2-12-31'\");\n }\n if (fields[i].matches(\".*__!year *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!year *= *(\\\\d{4})$\", \" $1 NOT BETWEEN '$2-01-01' AND '$2-12-31'\");\n }\n if (fields[i].matches(\".*__year ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year ?!= ?(\\\\d{4})$\", \" $1 != '$2-01-01'\");\n }\n if (fields[i].matches(\".*__year ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__year ?<> ?(\\\\d{4})$\", \" $1 <> '$2-01-01'\");\n }\n if (fields[i].matches(\".*__month__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__lt *= *(\\\\d{2})$\", \" EXTRACT(month FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__month ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month ?< ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__month__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__!lt *= *(\\\\d{2})$\", \" NOT EXTRACT(month FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__month__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__lte *= *(\\\\d{2})$\", \" EXTRACT(month FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__month ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month ?<= ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__month__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__!lte *= *(\\\\d{2})$\", \" NOT EXTRACT(month FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__month__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__gt *= *(\\\\d{2})$\", \" EXTRACT(month FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__month ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month ?> ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__month__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__!gt *= *(\\\\d{2})$\", \" NOT EXTRACT(month FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__month__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__gte *= *(\\\\d{2})$\", \" EXTRACT(month FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__month ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month ?>= ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__month__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__!gte *= *(\\\\d{2})$\", \" NOT EXTRACT(month FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__month__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__exact *= *(\\\\d{2})$\", \" EXTRACT(month FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__month__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month__!exact *= *(\\\\d{2})$\", \" NOT EXTRACT(month FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__month *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month *= *(\\\\d{2})$\", \" EXTRACT(month FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__!month *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!month *= *(\\\\d{2})$\", \" NOT EXTRACT(month FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__month ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month ?!= ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) != '$2'\");\n }\n if (fields[i].matches(\".*__month ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__month ?<> ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) <> '$2'\");\n }\n if (fields[i].matches(\".*__day__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__lt *= *(\\\\d{2})$\", \" EXTRACT(day FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__day ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day ?< ?(\\\\d{2})$\", \" EXTRACT(day FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__day__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__!lt *= *(\\\\d{2})$\", \" NOT EXTRACT(day FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__day__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__lte *= *(\\\\d{2})$\", \" EXTRACT(day FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__day ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day ?<= ?(\\\\d{2})$\", \" EXTRACT(day FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__day__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__!lte *= *(\\\\d{2})$\", \" NOT EXTRACT(day FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__day__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__gt *= *(\\\\d{2})$\", \" EXTRACT(day FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__day ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day ?> ?(\\\\d{2})$\", \" EXTRACT(day FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__day__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__!gt *= *(\\\\d{2})$\", \" NOT EXTRACT(day FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__day__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__gte *= *(\\\\d{2})$\", \" EXTRACT(day FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__day ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day ?>= ?(\\\\d{2})$\", \" EXTRACT(day FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__day__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__!gte *= *(\\\\d{2})$\", \" NOT EXTRACT(day FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__day__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__exact *= *(\\\\d{2})$\", \" EXTRACT(day FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__day__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day__!exact *= *(\\\\d{2})$\", \" NOT EXTRACT(day FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__day *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day *= *(\\\\d{2})$\", \" EXTRACT(day FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__!day *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!day *= *(\\\\d{2})$\", \" NOT EXTRACT(day FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__day ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day ?!= ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) != '$2'\");\n }\n if (fields[i].matches(\".*__day ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__day ?<> ?(\\\\d{2})$\", \" EXTRACT(month FROM $1) <> '$2'\");\n }\n if (fields[i].matches(\".*__week_day__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__lt *= *(\\\\d{2})$\", \" WEEKDAY($1) < '$2'\");\n }\n if (fields[i].matches(\".*__week_day ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day ?< ?(\\\\d{2})$\", \" WEEKDAY($1) < '$2'\");\n }\n if (fields[i].matches(\".*__week_day__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__!lt *= *(\\\\d{2})$\", \" NOT WEEKDAY($1) < '$2'\");\n }\n if (fields[i].matches(\".*__week_day__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__lte *= *(\\\\d{2})$\", \" WEEKDAY($1) <= '$2'\");\n }\n if (fields[i].matches(\".*__week_day ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day ?<= ?(\\\\d{2})$\", \" WEEKDAY($1) <= '$2'\");\n }\n if (fields[i].matches(\".*__week_day__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__!lte *= *(\\\\d{2})$\", \" NOT WEEKDAY($1) <= '$2'\");\n }\n if (fields[i].matches(\".*__week_day__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__gt *= *(\\\\d{2})$\", \" WEEKDAY($1) > '$2'\");\n }\n if (fields[i].matches(\".*__week_day ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day ?> ?(\\\\d{2})$\", \" WEEKDAY($1) > '$2'\");\n }\n if (fields[i].matches(\".*__week_day__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__!gt *= *(\\\\d{2})$\", \" NOT WEEKDAY($1) > '$2'\");\n }\n if (fields[i].matches(\".*__week_day__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__gte *= *(\\\\d{2})$\", \" WEEKDAY($1) >= '$2'\");\n }\n if (fields[i].matches(\".*__week_day ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day ?>= ?(\\\\d{2})$\", \" WEEKDAY($1) >= '$2'\");\n }\n if (fields[i].matches(\".*__week_day__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__!gte *= *(\\\\d{2})$\", \" NOT WEEKDAY($1) >= '$2'\");\n }\n if (fields[i].matches(\".*__week_day__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__exact *= *(\\\\d{2})$\", \" WEEKDAY($1) = '$2'\");\n }\n if (fields[i].matches(\".*__week_day__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day__exact *= *(\\\\d{2})$\", \" NOT WEEKDAY($1) = '$2'\");\n }\n if (fields[i].matches(\".*__week_day *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day *= *(\\\\d{2})$\", \" WEEKDAY($1) = '$2'\");\n }\n if (fields[i].matches(\".*__!week_day *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!week_day *= *(\\\\d{2})$\", \" NOT WEEKDAY($1) = '$2'\");\n }\n if (fields[i].matches(\".*__week_day ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day ?!= ?(\\\\d{2})$\", \" WEEKDAY($1) != '$2'\");\n }\n if (fields[i].matches(\".*__week_day ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__week_day ?<> ?(\\\\d{2})$\", \" WEEKDAY($1) <> '$2'\");\n }\n if (fields[i].matches(\".*__hour__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__lt *= *(\\\\d{2})$\", \" EXTRACT(hour FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__hour ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour ?< ?(\\\\d{2})$\", \" EXTRACT(hour FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__hour__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__!lt *= *(\\\\d{2})$\", \" NOT EXTRACT(hour FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__hour__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__lte *= *(\\\\d{2})$\", \" EXTRACT(hour FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__hour ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour ?<= ?(\\\\d{2})$\", \" EXTRACT(hour FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__hour__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__!lte *= *(\\\\d{2})$\", \" NOT EXTRACT(hour FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__hour__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__gt *= *(\\\\d{2})$\", \" EXTRACT(hour FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__hour ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour ?> ?(\\\\d{2})$\", \" EXTRACT(hour FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__hour__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__!gt *= *(\\\\d{2})$\", \" NOT EXTRACT(hour FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__hour__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__gte *= *(\\\\d{2})$\", \" EXTRACT(hour FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__hour ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour ?>= ?(\\\\d{2})$\", \" EXTRACT(hour FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__hour__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__!gte *= *(\\\\d{2})$\", \" NOT EXTRACT(hour FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__hour__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__exact *= *(\\\\d{2})$\", \" EXTRACT(hour FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__hour__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour__!exact *= *(\\\\d{2})$\", \" NOT EXTRACT(hour FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__hour *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour *= *(\\\\d{2})$\", \" EXTRACT(hour FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__!hour *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!hour *= *(\\\\d{2})$\", \" NOT EXTRACT(hour FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__hour ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour ?!= ?(\\\\d{2})$\", \" EXTRACT(hour FROM $1) != '$2'\");\n }\n if (fields[i].matches(\".*__hour ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__hour ?<> ?(\\\\d{2})$\", \" EXTRACT(hour FROM $1) <> '$2'\");\n }\n if (fields[i].matches(\".*__minute__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__lt *= *(\\\\d{2})$\", \" EXTRACT(minute FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__minute ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute ?< ?(\\\\d{2})$\", \" EXTRACT(minute FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__minute__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__!lt *= *(\\\\d{2})$\", \" NOT EXTRACT(minute FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__minute__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__lte *= *(\\\\d{2})$\", \" EXTRACT(minute FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__minute ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute ?<= ?(\\\\d{2})$\", \" EXTRACT(minute FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__minute__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__!lte *= *(\\\\d{2})$\", \" NOT EXTRACT(minute FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__minute__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__gt *= *(\\\\d{2})$\", \" EXTRACT(minute FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__minute ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute ?> ?(\\\\d{2})$\", \" EXTRACT(minute FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__minute__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__!gt *= *(\\\\d{2})$\", \" NOT EXTRACT(minute FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__minute__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__gte *= *(\\\\d{2})$\", \" EXTRACT(minute FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__minute ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute ?>= ?(\\\\d{2})$\", \" EXTRACT(minute FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__minute__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__!gte *= *(\\\\d{2})$\", \" NOT EXTRACT(minute FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__minute__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__exact *= *(\\\\d{2})$\", \" EXTRACT(minute FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__minute__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute__!exact *= *(\\\\d{2})$\", \" NOT EXTRACT(minute FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__minute *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute *= *(\\\\d{2})$\", \" EXTRACT(minute FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__!minute *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!minute *= *(\\\\d{2})$\", \" NOT EXTRACT(minute FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__minute ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute ?!= ?(\\\\d{2})$\", \" EXTRACT(minute FROM $1) != '$2'\");\n }\n if (fields[i].matches(\".*__minute ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__minute ?<> ?(\\\\d{2})$\", \" EXTRACT(minute FROM $1) <> '$2'\");\n }\n if (fields[i].matches(\".*__second__lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__lt *= *(\\\\d{2})$\", \" EXTRACT(second FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__second ?< ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second ?< ?(\\\\d{2})$\", \" EXTRACT(second FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__second__!lt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__!lt *= *(\\\\d{2})$\", \" NOT EXTRACT(second FROM $1) < '$2'\");\n }\n if (fields[i].matches(\".*__second__lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__lte *= *(\\\\d{2})$\", \" EXTRACT(second FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__second ?<= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second ?<= ?(\\\\d{2})$\", \" EXTRACT(second FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__second__!lte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__!lte *= *(\\\\d{2})$\", \" NOT EXTRACT(second FROM $1) <= '$2'\");\n }\n if (fields[i].matches(\".*__second__gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__gt *= *(\\\\d{2})$\", \" EXTRACT(second FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__second ?> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second ?> ?(\\\\d{2})$\", \" EXTRACT(second FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__second__!gt.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__!gt *= *(\\\\d{2})$\", \" NOT EXTRACT(second FROM $1) > '$2'\");\n }\n if (fields[i].matches(\".*__second__gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__gte *= *(\\\\d{2})$\", \" EXTRACT(second FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__second ?>= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second ?>= ?(\\\\d{2})$\", \" EXTRACT(second FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__second__!gte.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__!gte *= *(\\\\d{2})$\", \" NOT EXTRACT(second FROM $1) >= '$2'\");\n }\n if (fields[i].matches(\".*__second__exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__exact *= *(\\\\d{2})$\", \" EXTRACT(second FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__second__!exact.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second__!exact *= *(\\\\d{2})$\", \" NOT EXTRACT(second FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__second *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second *= *(\\\\d{2})$\", \" EXTRACT(second FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__!second *= *.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!second *= *(\\\\d{2})$\", \" NOT EXTRACT(second FROM $1) = '$2'\");\n }\n if (fields[i].matches(\".*__second ?!= ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second ?!= ?(\\\\d{2})$\", \" EXTRACT(second FROM $1) != '$2'\");\n }\n if (fields[i].matches(\".*__second ?<> ?.*\")) {\n fields[i] = fields[i].replaceAll(\"^(.*)__second ?<> ?(\\\\d{2})$\", \" EXTRACT(second FROM $1) <> '$2'\");\n }\n if (fields[i].indexOf(\"__lt\") > -1) {\n fields[i] = fields[i].replace(\"__lt = \", \" < \");\n }\n if (fields[i].indexOf(\"__!lt\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!lt *= *(.*)$\", \"NOT $1 < $2\");\n }\n if (fields[i].indexOf(\"__lte\") > -1) {\n fields[i] = fields[i].replace(\"__lte = \", \" <= \");\n }\n if (fields[i].indexOf(\"__!lte\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!lte *= *(.*)$\", \"NOT $1 <= $2\");\n }\n if (fields[i].indexOf(\"__gt\") > -1) {\n fields[i] = fields[i].replace(\"__gt = \", \" > \");\n }\n if (fields[i].indexOf(\"__!gt\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!gt *= *(.*)$\", \"NOT $1 > $2\");\n }\n if (fields[i].indexOf(\"__gte\") > -1) {\n fields[i] = fields[i].replace(\"__gte = \", \" >= \");\n }\n if (fields[i].indexOf(\"__!gte\") > -1) {\n fields[i] = fields[i].replaceAll(\"^(.*)__!gte *= *(.*)$\", \"NOT $1 >= $2\");\n }\n if (fields[i].indexOf(\"__exact\") > -1) {\n fields[i] = fields[i].replace(\"__exact = \", \" = \");\n }\n if (fields[i].indexOf(\"__!exact\") > -1) {\n fields[i] = fields[i].replace(\"__!exact = \", \" != \");\n }\n if (fields[i].indexOf(\"__isnull\") > -1) {\n String bool = fields[i].substring(fields[i].indexOf(\"=\") + 1, fields[i].length()).trim();\n if (bool.equalsIgnoreCase(\"true\")) {\n fields[i] = fields[i].replace(\"__isnull = \", \" IS NULL \");\n }\n if (bool.equalsIgnoreCase(\"false\")) {\n fields[i] = fields[i].replace(\"__isnull = \", \" IS NOT NULL \");\n }\n fields[i] = fields[i].replace(bool, \"\");\n }\n where += fields[i] + \" AND \";\n where = where.replace(\" AND OR AND\", \" OR\");\n where = where.replace(\" AND AND AND\", \" AND\");\n }\n where = where.substring(0, where.lastIndexOf(\"AND\"));\n where = where.trim();\n if (joins.isEmpty()) {\n sql = String.format(\"%s %s\", sql, where);\n } else {\n sql = String.format(format, tableName, entityName, joins, where.isEmpty() ? \"\" : \"WHERE\\n\\t\" + where);\n // controla o grau de identação da instrução SQL.\n sql = sql.replaceAll(\"\\t\", \" \");\n }\n String _sql = likeSqlDateTime(sql);\n if (!_sql.isEmpty()) {\n sql = _sql;\n }\n if (JediEngine.DEBUG) {\n System.out.println(sql + \";\\n\");\n }\n connect();\n statement = connection.prepareStatement(sql);\n resultSet = statement.executeQuery();\n if (!resultSet.next()) {\n return querySet;\n }\n resultSet.beforeFirst();\n while (resultSet.next()) {\n Object obj = entity.newInstance();\n if (resultSet.getObject(\"id\") != null) {\n Field id = jedi.db.models.Model.class.getDeclaredField(\"id\");\n id.setAccessible(true);\n if (connection.toString().startsWith(\"oracle\")) {\n id.set(obj, ((java.math.BigDecimal) resultSet.getObject(id.getName())).intValue());\n } else {\n id.set(obj, resultSet.getObject(id.getName()));\n }\n }\n // Iterates through the fields of the model.\n List<Field> _fields = JediEngine.getAllFields(this.entity);\n for (Field field : _fields) {\n // Sets private or protected fields as accessible.\n field.setAccessible(true);\n // Discards non annotated fields\n if (!JediEngine.isJediField(field)) {\n continue;\n }\n // Discards the serialVersionUID field.\n if (field.getName().equals(\"serialVersionUID\"))\n continue;\n // Discards the objects field.\n if (field.getName().equalsIgnoreCase(\"objects\"))\n continue;\n // Checks if the field are annotated as OneToOneField,\n // ForeignKeyField or ManyToManyField.\n oneToOneFieldAnnotation = field.getAnnotation(OneToOneField.class);\n foreignKeyFieldAnnotation = field.getAnnotation(ForeignKeyField.class);\n manyToManyFieldAnnotation = field.getAnnotation(ManyToManyField.class);\n FetchType fetchType = JediEngine.FETCH_TYPE;\n Manager manager = null;\n if (manyToManyFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? manyToManyFieldAnnotation.fetch_type() : fetchType;\n if (fetchType.equals(FetchType.EAGER)) {\n Class superClazz = null;\n Class clazz = null;\n String packageName = this.entity.getPackage().getName();\n String model = manyToManyFieldAnnotation.model().getSimpleName();\n model = Model.class.getSimpleName().equals(model) ? \"\" : model;\n if (model.isEmpty()) {\n ParameterizedType genericType = null;\n if (ParameterizedType.class.isAssignableFrom(field.getGenericType().getClass())) {\n genericType = (ParameterizedType) field.getGenericType();\n superClazz = ((Class) (genericType.getActualTypeArguments()[0])).getSuperclass();\n if (superClazz == Model.class) {\n clazz = (Class) genericType.getActualTypeArguments()[0];\n model = clazz.getSimpleName();\n }\n }\n }\n String references = manyToManyFieldAnnotation.references();\n if (references == null || references.trim().isEmpty()) {\n if (clazz != null) {\n references = TableUtil.getTableName(clazz);\n } else {\n references = TableUtil.getTableName(model);\n }\n }\n Class associatedModelClass = Class.forName(String.format(\"%s.%s\", packageName, model));\n manager = new Manager(associatedModelClass);\n List<List<Map<String, Object>>> recordSet = null;\n // Performs a SQL query.\n recordSet = manager.raw(\n String.format(\n \"SELECT %s_id FROM %s_%s WHERE %s_id = %d\",\n TableUtil.getColumnName(model),\n tableName,\n TableUtil.getTableName(references),\n TableUtil.getColumnName(this.entity),\n ((Model) obj).id()\n )\n );\n String args = recordSet.toString();\n args = args.replace(\"[\", \"\");\n args = args.replace(\"{\", \"\");\n args = args.replace(\"]\", \"\");\n args = args.replace(\"}\", \"\");\n args = args.replace(\"=\", \"\");\n args = args.replace(\", \", \",\");\n args = args.replace(String.format(\"%s_id\", TableUtil.getColumnName(model)), \"\");\n args = String.format(\"id__in=[%s]\", args);\n QuerySet querySetAssociatedModels = manager._filter(args);\n field.set(obj, querySetAssociatedModels);\n } else {\n field.set(obj, null);\n }\n } else if (oneToOneFieldAnnotation != null || foreignKeyFieldAnnotation != null) {\n if (oneToOneFieldAnnotation != null) {\n fetchType = fetchType.equals(FetchType.NONE) ? oneToOneFieldAnnotation.fetch_type() : fetchType;\n } else {\n fetchType = fetchType.equals(FetchType.NONE) ? foreignKeyFieldAnnotation.fetch_type() : fetchType;\n }\n if (fetchType.equals(FetchType.EAGER)) {\n // If it's recovers the field's class.\n Class associatedModelClass = Class.forName(field.getType().getName());\n // Instanciates a Model Manager.\n manager = new Manager(associatedModelClass);\n String columnName = TableUtil.getColumnName(field);\n Object id = resultSet.getObject(String.format(\"%s_id\", columnName));\n Model associatedModel = manager.get(\"id\", id);\n // Calls the get method recursivelly.\n // References the model associated by foreign key\n // annotation.\n field.set(obj, associatedModel);\n } else {\n field.set(obj, null);\n }\n } else {\n // Sets fields the aren't Model's instances.\n if ((field.getType().getSimpleName().equals(\"int\") || field.getType().getSimpleName().equals(\"Integer\")) &&\n connection.toString().startsWith(\"oracle\")) {\n if (resultSet.getObject(TableUtil.getColumnName(field.getName())) == null) {\n field.set(obj, 0);\n } else {\n String columnName = TableUtil.getColumnName(field.getName());\n BigDecimal columnValue = (BigDecimal) resultSet.getObject(columnName);\n field.set(obj, columnValue.intValue());\n }\n } else {\n String columnName = TableUtil.getColumnName(field.getName());\n Object columnValue = resultSet.getObject(columnName);\n if (columnValue instanceof java.sql.Date) {\n java.sql.Date date = (java.sql.Date) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(date.getTime());\n calendar.set(Calendar.HOUR_OF_DAY, 0);\n calendar.set(Calendar.MINUTE, 0);\n calendar.set(Calendar.SECOND, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof java.sql.Time) {\n java.sql.Time time = (java.sql.Time) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(time.getTime());\n calendar.set(Calendar.YEAR, 0);\n calendar.set(Calendar.MONTH, 0);\n calendar.set(Calendar.DAY_OF_MONTH, 0);\n columnValue = calendar.getTime();\n }\n if (columnValue instanceof Timestamp) {\n Timestamp timestamp = (Timestamp) columnValue;\n Calendar calendar = Calendar.getInstance();\n calendar.setTimeInMillis(timestamp.getTime());\n columnValue = calendar.getTime();\n }\n field.set(obj, columnValue);\n }\n }\n manager = null;\n }\n T model = (T) obj;\n if (model != null) {\n model.setPersisted(true);\n }\n querySet.add(model);\n }\n if (querySet != null) {\n querySet.setPersisted(true);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n close(statement, resultSet, connection);\n }\n }\n return querySet;\n }", "PropertiedObjectFilter<O> getFilter();", "private String createQuery(MultivaluedMap<String, String> filters, Boolean count) {\n String where = \"\";\n String fields = \"\";\n String orderBy = \"\";\n\n for (Map.Entry<String, List<String>> entry : filters.entrySet()) {\n switch (entry.getKey()) {\n case \"range\":\n where = (\"\".equals(where)) ? \" WHERE \" : \" AND \";\n String[] range = entry.getValue().get(0).split(\"-\");\n where += \"id >= \" + range[0] + \" AND id <= \" + range[1];\n break;\n case \"fields\":\n for (String field : entry.getValue()){\n fields = (\"\".equals(fields)) ? field : \",\" + field;\n }\n break;\n case \"asc\":\n orderBy = \" ORDER BY \" + entry.getValue() + \" ASC\";\n break;\n case \"desc\":\n orderBy = \" ORDER BY \" + entry.getValue() + \" DESC\";\n break;\n default:\n for (String condition : entry.getValue()) {\n where = (\"\".equals(where)) ? \" WHERE \" : \" AND \";\n where += entry.getKey() + \" = '\" + condition + \"'\";\n }\n }\n }\n\n fields = (\"\".equals(fields)) ? \"*\" : fields;\n fields = count ? \"(\" + fields + \")\" : fields;\n return \"SELECT \" + fields + \" FROM decodedFile \" + where + orderBy;\n }", "@RestResource(path = \"search\", rel = \"search\")\n List<MonographEditors> findByFirstNameContainingAndLastNameContainingAndMiddleNameContainingAndEmailContainingAndAffiliationsContainingAllIgnoreCase(\n @Param(\"firstName\") String firstName,\n @Param(\"lastName\") String lastName,\n @Param(\"middleName\") String middleName,\n @Param(\"email\") String email,\n @Param(\"affiliations\") String affiliations);", "public List setFilter(java.lang.String filter) {\n this.filter = filter;\n return this;\n }", "private static Filter createFilter(final BundleContext bundleContext, final Class<?>... classes) {\r\n\t\tfinal StringBuilder filter = new StringBuilder();\r\n\t\tif (classes != null) {\r\n\t\t\tif (classes.length > 1) {\r\n\t\t\t\tfilter.append(\"(|\");\r\n\t\t\t}\r\n\t\t\tfor (Class<?> clazz : classes) {\r\n\t\t\t\tfilter.append(\"(\").append(Constants.OBJECTCLASS).append(\"=\").append(clazz.getName()).append(\")\");\r\n\t\t\t}\r\n\t\t\tif (classes.length > 1) {\r\n\t\t\t\tfilter.append(\")\");\r\n\t\t\t}\r\n\t\t}\r\n\t\ttry {\r\n\t\t\treturn bundleContext.createFilter(filter.toString());\r\n\t\t} catch (InvalidSyntaxException e) {\r\n\t\t\tthrow new IllegalArgumentException(\"Unexpected InvalidSyntaxException: \" + e.getMessage());\r\n\t\t}\r\n\t}", "protected void addExampleFiltering(Criteria criteria, Map params) {\n FarmIcsConversion entity = (FarmIcsConversion) params.get(FILTER);\n if (entity != null) {\n\n criteria.createAlias(\"farmer\", \"f\");\n // criteria.createAlias(\"farm\", \"fm\");\n \n \n if (!ObjectUtil.isEmpty(entity.getFarmer()) && entity.getFarmer().getId()!=0)\n criteria.add(Restrictions.eq(\"f.id\", entity.getFarmer().getId()));\n /* \n if (!ObjectUtil.isEmpty(entity.getFarm()) && entity.getFarm().getId()!=0)\n criteria.add(Restrictions.eq(\"fm.id\", entity.getFarm().getId()));*/\n \n // sorting direction\n String dir = (String) params.get(DIR);\n // sorting column\n String sort = (String) params.get(SORT_COLUMN);\n if (dir.equals(DESCENDING)) {\n // sort descending\n criteria.addOrder(Order.desc(sort));\n } else {\n // sort ascending\n criteria.addOrder(Order.asc(sort));\n }\n }\n }", "public List<Object> queryByWhere(String col_name, String dto, List<List<Triple>> filter, List<String> keys) {\n\t\tList<Object> res = new ArrayList<Object>();\n\t\tDBCollection dbc = db.getCollection(col_name);\n\t\t// filter\n\t\tBasicDBObject all_ref = new BasicDBObject();\n\t\tDBObject _keys = new BasicDBObject();\n\t\t\n\t\tif(keys != null)\n\t\t\tfor(String key : keys) \n\t\t\t\t_keys.put(key, true);\n\t\t\n\t\tBasicDBList list = new BasicDBList();\n\t\tfor(List<Triple> and : filter) {\n\t\t\tBasicDBObject ref = new BasicDBObject();\n\t\t\tfor(Triple tri : and) {\n\t\t\t\tif(!ref.containsField(tri.key_name)) {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) \n\t\t\t\t\t\tref.put(tri.key_name, tri.value);\n\t\t\t\t\t\n\t\t\t\t\telse \n\t\t\t\t\t\tref.put(tri.key_name, new BasicDBObject(tri.condition, tri.value));\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif(tri.condition.equals(Condition.EQUAL)) {\n\t\t\t\t\t\t// TODO It is impossible\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tBasicDBObject bo = (BasicDBObject)ref.get(tri.key_name);\n\t\t\t\t\t\tbo.append(tri.condition, tri.value);\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} // end an \"and\" query\n\t\t\tlist.add(ref);\n\t\t}\n\t\t\n\t\tall_ref.put(\"$or\", list);\n\t\t\n\t\ttry {\n\t DBCursor cur = dbc.find(all_ref, _keys);\n\t \twhile (cur.hasNext()) {\n\t \t\tDBObject doc = cur.next();\n\t \t\ttry {\n\t \t\t\tres.add(Util.deserialize(doc, dto));\n\t \t\t} catch(InvocationTargetException ite) {\n\t \t\t\tite.printStackTrace();\n\t \t\t} \t\t\n\t \t\t//System.out.println(doc);\n\t }\n\n\t\t} catch(ClassNotFoundException cnfe) {\n \tcnfe.printStackTrace();\n } catch(InstantiationException ie) {\n \tie.printStackTrace();\n } catch(IllegalAccessException iae) {\n \tiae.printStackTrace();\n }\n\n \treturn res;\n\t}", "@Override\n public List<UserInfo> findList(UserListFilterDto dto) {\n CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder();\n CriteriaQuery<UserInfo> criteriaQuery = criteriaBuilder.createQuery(UserInfo.class);\n Root<UserInfo> root = criteriaQuery.from(UserInfo.class);\n Predicate predicate1\n = criteriaBuilder.equal(root.get(\"office\").get(\"id\"), dto.getOfficeId());\n Predicate finalPredicate = criteriaBuilder.and(predicate1);\n if (dto.getFirstName() != null) {\n Predicate predicate2\n = criteriaBuilder.equal(root.get(\"firstName\"), dto.getFirstName());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate2);\n }\n if (dto.getSecondName() != null) {\n Predicate predicate3\n = criteriaBuilder.equal(root.get(\"secondName\"), dto.getSecondName());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate3);\n }\n if (dto.getMiddleName() != null) {\n Predicate predicate4\n = criteriaBuilder.equal(root.get(\"middleName\"), dto.getMiddleName());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate4);\n }\n if (dto.getPosition() != null) {\n Predicate predicate5\n = criteriaBuilder.equal(root.get(\"position\"), dto.getPosition());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate5);\n }\n if (dto.getDocCode() != null) {\n Predicate predicate6\n = criteriaBuilder.equal(root.get(\"userDoc\").get(\"doc\").get(\"code\"), dto.getDocCode());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate6);\n }\n if (dto.getCitizenshipCode() != null) {\n Predicate predicate7\n = criteriaBuilder.equal(root.get(\"country\").get(\"code\"), dto.getCitizenshipCode());\n finalPredicate = criteriaBuilder.and(finalPredicate, predicate7);\n }\n criteriaQuery.select(root).where(finalPredicate);\n return entityManager.createQuery(criteriaQuery).getResultList();\n }", "void setFilter(String filter);", "public BwObjectFilter(final String name,\n final ObjectFilter of) {\n super(name, PropertyInfoIndex.CATEGORIES);\n\n setEntity(of);\n setPropertyIndex(of.getPropertyIndex());\n setParentPropertyIndex(of.getParentPropertyIndex());\n setExact(of.getExact());\n setNot(of.getNot());\n setCaseless(of.getCaseless());\n }", "public SamFilterParams create() {\n return new SamFilterParams(this);\n }", "public void testCtor2() {\r\n columnNames.put(\" \", \"modification_user\");\r\n\r\n try {\r\n new DbBaseFilterFactory(columnNames);\r\n fail(\"IllegalArgumentException expected.\");\r\n } catch (IllegalArgumentException iae) {\r\n //good\r\n }\r\n }", "public Set<String> getStringPropertyNames();", "@Test\n public void testSearchFilter_WithAddedSearchBase() {\n BridgeRequest request = new BridgeRequest();\n\n // Add the fields\n List<String> fields = new ArrayList<>();\n fields.add(\"name\");\n fields.add(\"sn\");\n request.setFields(fields);\n\n // Set the Structure\n // This gets appended to the filter as (objectClass=STRUCTURE)\n request.setStructure(\"User\");\n\n // Set the Query\n request.setQuery(\"OU=Users(<%=parameter[\\\"Search String\\\"]%>)\");\n\n // Set the Parameters to be replaced in the Query\n Map parameters = new HashMap();\n parameters.put(\"Search String\", \"samaccountname=mary.olowu\");\n request.setParameters(parameters);\n\n BridgeError unexpectedError = null;\n RecordList list = null;\n try {\n list = getAdapter().search(request);\n } catch (BridgeError e) {\n unexpectedError = e;\n }\n\n assertNull(unexpectedError);\n assertTrue(list.getRecords().size() > 0);\n }" ]
[ "0.5798781", "0.5795605", "0.54588926", "0.5212608", "0.5201706", "0.51462895", "0.51443833", "0.5115016", "0.511203", "0.50304717", "0.5000126", "0.49820855", "0.48654228", "0.48506194", "0.48455593", "0.48110625", "0.47986513", "0.47749174", "0.47524858", "0.47396034", "0.47394216", "0.47117755", "0.47056127", "0.47041813", "0.46969578", "0.46884754", "0.46776003", "0.46736172", "0.46707383", "0.46469304", "0.46212858", "0.460827", "0.46043316", "0.46041605", "0.45863605", "0.4582409", "0.4579874", "0.45637423", "0.4539083", "0.453284", "0.45236647", "0.45225173", "0.45157188", "0.45091027", "0.4503373", "0.44967967", "0.449515", "0.44807148", "0.4475319", "0.44729114", "0.4457372", "0.4444469", "0.44428298", "0.44390076", "0.4439002", "0.44279832", "0.4426186", "0.44195455", "0.44176394", "0.44166562", "0.44147477", "0.44129753", "0.44061133", "0.4405025", "0.43923926", "0.4390389", "0.43896645", "0.43808246", "0.43733194", "0.43721753", "0.43704706", "0.4370307", "0.43680045", "0.43655372", "0.4363242", "0.4361047", "0.435995", "0.43595314", "0.43469986", "0.43433684", "0.43357518", "0.4332517", "0.43301845", "0.4324805", "0.4318191", "0.43140033", "0.43112478", "0.4302543", "0.43012705", "0.42962086", "0.4288339", "0.4287313", "0.42845243", "0.4281771", "0.42787012", "0.42767903", "0.42753255", "0.42729422", "0.4271631", "0.42632517" ]
0.6435215
0
is it ok that this vRioariable is static?
public static void main( String[] args) { NetworkTable piVals = NetworkTable.getTable("piTable"); double startPro = 0; long startMills = Instant.now().toEpochMilli(); //double start = System.currentTimeMillis(); // String address = "roboRIO-5822-FRC.local"; System.loadLibrary(Core.NATIVE_LIBRARY_NAME); VideoCapture capture = new VideoCapture(); //this link has changed, check with code on the pi right now capture.open("http://10.58.22.72/mjpg/video.mjpg"); Mat bgr = new Mat(); Mat hsvConvert = new Mat(); Mat hsv = new Mat(); MatOfPoint test = new MatOfPoint(); ArrayList<MatOfPoint> contours = new ArrayList<MatOfPoint>(); ArrayList<MatOfPoint> finalContours = new ArrayList<MatOfPoint>(); MatOfPoint biggest = null; Mat mhierarchy = new Mat(); //have no clue why hierarchy is needed. Still need to figure this one out. double centerX; double distance; double [] nums = new double [4]; nums = null; //int greta = 0; while (true) { startPro = piVals.getNumber("RioTime",0); contours.clear(); finalContours.clear(); capture.read(bgr); //Imgcodecs.imwrite("greenCart.jpg",bgr); Imgproc.cvtColor(bgr, hsvConvert, Imgproc.COLOR_BGR2HSV); //using RGB does not work. MUST use BGR. We are still unsure of the reasons. Core.inRange(hsvConvert, new Scalar (13, 39, 135), new Scalar (92, 118, 255), hsv); //those two Scalar values are the the max and min HSV values respectively. Those were determined in GRIP. Imgproc.findContours(hsv, contours, mhierarchy, Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE); //first enum lets you control things about hierarchy, I chose option with no hierarchy int idex=0; int size = contours.size(); //changed to a for loop for (idex=0; idex < contours.size(); idex++) { test = contours.get(idex); if (Imgproc.contourArea(test)>100) { finalContours.add(test); } idex++; } if (finalContours.size()>0) { nums = findCenterXDistance(finalContours.get(0).toList()); //System.out.println("CENTER X COORIDINATE OF CONTOUR " +0+ ": " + nums[2]); System.out.println("DISTANCE TO CONTOUR " +0+ ": " + (12*nums[3])); piVals.putNumber("Center", nums[2]); piVals.putNumber("Distance", (12*nums[3])); piVals.putNumber("Start Time", startPro); } //for (int count = 0; count < finalContours.size(); count++) //{ // nums = findCenterXDistance(finalContours.get(count).toList()); //System.out.println("CENTER X COORIDINATE OF CONTOUR " +count+ ": " + nums[2]); // System.out.println("DISTANCE TO CONTOUR " +count+ ": " + (12*nums[3])); // robot.Send(rioMillis, true, nums[2], nums[3]); //} } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void staticFun()\n {\n }", "@Override\n\tpublic boolean isStatic() {\n\t\treturn false;\n\t}", "public static void isStatic() {\n\n }", "public default boolean isStatic() {\n\t\treturn false;\n\t}", "boolean isStatic();", "boolean isStatic();", "public static void staticMethod() {\n Log.e(\"LOG_TAG\", \"Company: STATIC Instance method\");\n }", "private Util() { }", "boolean getIsStatic();", "private StaticData() {\n\n }", "static void test(){\n\t }", "private static interface Holder\r\n {\r\n //~ Static fields/initializers -----------------------------------------\r\n\r\n public static final ViewParameters INSTANCE = new ViewParameters();\r\n\r\n }", "static void init() {}", "@Override\n public boolean getIsStatic() {\n return isStatic_;\n }", "private static void LessonInstanceVsStatic() {\n System.out.println(MathHelper.E);\n System.out.println(MathHelper.PI);\n System.out.println(MathHelper.square(5));\n //Three helper methods for StringHelper\n System.out.println(StringHelper.removeLeadingAndTrailingSpaces(\" Hello \"));\n System.out.println(StringHelper.removeAllSpace(\" He ll o !\"));\n System.out.println(StringHelper.yelling(\"hello\"));\n //Three helper methods for MathHelper\n System.out.println(MathHelper.cubed(5));\n System.out.println(MathHelper.areaOfRectangle(2,3));\n System.out.println(MathHelper.perimeterOfRectangle(4, 5));\n\n }", "@Override\n\t/**\n\t * returns a false because a class cannot be static\n\t * \n\t * @return false\n\t */\n\tpublic boolean getStatic() {\n\t\treturn false;\n\t}", "boolean inStaticContext();", "private stendhal() {\n\t}", "private void someUtilityMethod() {\n }", "private void someUtilityMethod() {\n }", "static void sm() {\n }", "private Util() {\n }", "@Override\n public boolean getIsStatic() {\n return isStatic_;\n }", "final public boolean isStatic ()\n {\n\treturn myIsStatic;\n }", "private Helper() {\r\n // empty\r\n }", "Reproducible newInstance();", "private InstanceUtil() {\n }", "private static interface Service {}", "public boolean needsVtable() {\n return !isStatic();\n }", "private Utils() {}", "private Utils() {}", "private Utils() {}", "private Utils() {}", "@Test public void singletonResolutionInFunctions() {\n fail( \"Not yet implemented\" );\n }", "private StaticProperty() {}", "@SuppressWarnings(\"UnusedDeclaration\")\n public static void __staticInitializer__() {\n }", "protected VboUtil() {\n }", "public void visitGETSTATIC(GETSTATIC o){\n\t\t// Field must be static: see Pass 3a.\n\t}", "private Util() {\n }", "private Util() {\n }", "public static void getInfo1() {\n\t\tSystem.out.println(\"I am a static Method\");\n\t\t\t\t\t\t\t\t\t\t\t\t // we can not access non static Members within static Method!!\n\t}", "private Utils() {\n\t}", "private Utils() {\n\t}", "private CommonMethods() {\n }", "private Reactive() {\r\n\t\t// utility class\r\n\t}", "private SingletonLectorPropiedades() {\n\t}", "private MetallicityUtils() {\n\t\t\n\t}", "public boolean isStatic() {\n return isStatic;\n }", "public static aa a() {\n }", "@Override\n\t/**\n\t * does nothing because a class cannot be static\n\t */\n\tpublic void setStatic(boolean b) {\n\n\t}", "@Test\n public void testReflectionStatics() {\n final ReflectionStaticFieldsFixture instance1 = new ReflectionStaticFieldsFixture();\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString]\",\n ReflectionToStringBuilder.toString(instance1, null, false, true, ReflectionStaticFieldsFixture.class));\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString,staticTransientInt=54321,staticTransientString=staticTransientString,transientInt=98765,transientString=transientString]\",\n ReflectionToStringBuilder.toString(instance1, null, true, true, ReflectionStaticFieldsFixture.class));\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString]\",\n this.toStringWithStatics(instance1, null, ReflectionStaticFieldsFixture.class));\n assertEquals(\n this.toBaseString(instance1) + \"[instanceInt=67890,instanceString=instanceString,staticInt=12345,staticString=staticString]\",\n this.toStringWithStatics(instance1, null, ReflectionStaticFieldsFixture.class));\n }", "private Utils()\n {\n // Private constructor to prevent instantiation\n }", "boolean isContextStatic(){\r\n\t\tif(curField == null) {\r\n\t\t\treturn curOperation.isStaticElement();\r\n\t\t} else {\r\n\t\t\treturn curField.isStaticElement();\r\n\t\t}\r\n\t}", "static void test1(){\n\t\n\t}", "public static void t(){\n\n\n }", "private VlcUtils()\n {\n \n }", "private Util()\n {\n // Empty default ctor, defined to override access scope.\n }", "private CheckUtil(){ }", "Shared shared();", "@Override\n\tpublic void staticByViewListener() {\n\t\t\n\t}", "public interface OurService {\n\n static public void provideService(){\n System.out.println(\"OurService Static provideService()\");\n }\n}", "static void method1()\r\n {\n }", "private ComparableEntitySpanUtils() {\n // Singleton\n }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "public static void memBar(){\n \n }", "private FactoryCacheValet() {\n\t\tsuper();\n\t}", "public boolean isStatic() {\n\t\t\treturn this.IsStatic;\n\t\t}", "public void getInfo() {\n\tSystem.out.println(\"My name is \"+ name+ \" my last name is \"+ lastName);\n\t // we can access static members within non static Method!!\n\t\n}", "static void method2(){\n StaticDemo staticDemo=new StaticDemo();\n System.out.println(staticDemo.name);\n staticDemo.method1();\n method3();\n\n }", "public void test() {\n\t\t\tSystem.out.println(\"I am non static test method\");\n\t\t}", "public static void a() {\n\n }", "public static void getInfo1() {\n \t//\tSystem.out.println(\"My name is \"+ name+ \"and my last name is \"+ lastName);\n \t\t//will get an error\n \tSystem.out.println(\"I am a static method \");\n \t// we can't access non static method within static \n \t}", "public abstract Object mo1771a();", "private BuilderUtils() {}", "static void method3(){\n\n }", "private Verify(){\n\t\t// Private constructor to prevent instantiation\n\t}", "public void smell() {\n\t\t\n\t}", "public void checkPublic() {\n }", "abstract int pregnancy();", "private SparkseeUtils()\n {\n /*\n * Intentionally left empty.\n */\n }", "private ApplicationConstants(){\n\t\t//not do anything \n\t}", "private Helper() {\r\n // do nothing\r\n }", "void add1() {\n\t\tStatic_Demo s=new Static_Demo();\r\n\t\ts.add();\r\n\t\t\r\n\t\t//calling static method of one class inside another non static of different class via classname\r\n\t\tStatic_Demo.sub();\r\n\t}", "private WAPIHelper() { }", "private CollectionUtils() {\n\n\t}", "protected raVersionInfo() {\n }", "private Constantes() {\r\n\t\t// No way\r\n\t}", "private Utility() {\n\t}", "public static void thisDemo() {\n\t}", "public Fun_yet_extremely_useless()\n {\n\n }", "static void staticShow() {\n System.out.println(\"In a static class static method\");\n }", "ResilientExecutionUtil() {\n // do nothing\n }", "private WolUtil() {\n }", "private Get() {}", "private Get() {}", "public boolean isStatic() {\n\t\treturn (access & Opcodes.ACC_STATIC) != 0;\n\t}", "private Utility() {\n throw new IllegalAccessError();\n }", "public void setStatic() {\r\n\t\tthis.isStatic = true;\r\n\t}", "public boolean isStatic() {\n return staticMethod;\n }", "static void m2(){\n\t}", "private DrillCalciteWrapperUtility() {\n }" ]
[ "0.67529297", "0.66404265", "0.6540382", "0.6520649", "0.6494737", "0.6494737", "0.6396799", "0.6194807", "0.6192647", "0.6173344", "0.6080724", "0.60466135", "0.6043298", "0.6038705", "0.6036825", "0.6031397", "0.6014424", "0.6006058", "0.59923553", "0.59923553", "0.59918135", "0.5976886", "0.59678286", "0.5947742", "0.5916706", "0.5905782", "0.5904325", "0.58861816", "0.5874045", "0.5872834", "0.5872834", "0.5872834", "0.5872834", "0.58451945", "0.5804436", "0.57974356", "0.5775059", "0.57693666", "0.5756996", "0.5756996", "0.5755986", "0.57492614", "0.57492614", "0.5743387", "0.5743117", "0.5739158", "0.57363003", "0.5735059", "0.5710879", "0.5705253", "0.5678407", "0.56655157", "0.5664223", "0.5661897", "0.5661118", "0.56502724", "0.5646185", "0.5639619", "0.5631776", "0.5621177", "0.56172085", "0.5617074", "0.56079257", "0.56041074", "0.56010425", "0.5597909", "0.55928427", "0.55880475", "0.55860204", "0.5585019", "0.55739164", "0.557175", "0.5569455", "0.5556673", "0.55552286", "0.55541545", "0.5551711", "0.5549605", "0.5535488", "0.5534669", "0.5530405", "0.55245334", "0.5523272", "0.54913926", "0.5490255", "0.5490144", "0.54875576", "0.54830176", "0.54789275", "0.5474194", "0.5470539", "0.54675746", "0.5454286", "0.5454194", "0.5454194", "0.54492897", "0.5444182", "0.5430913", "0.54274875", "0.54229057", "0.540697" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public VersionInfoExample() { oredCriteria = new ArrayList<Criteria>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.6828705", "0.6393162", "0.63825506", "0.63770574", "0.6367192", "0.6221846", "0.6067397", "0.6065189", "0.6023013", "0.5983748", "0.5972557", "0.5955663", "0.5955663", "0.5955663", "0.5955663", "0.5955663", "0.5937606", "0.588693", "0.5879829", "0.58024454", "0.5791238", "0.5787106", "0.57749337", "0.57713085", "0.57713085", "0.57713085", "0.57713085", "0.57701516", "0.5763202", "0.57594424", "0.5746962", "0.5739705", "0.5725181", "0.571752", "0.57108444", "0.5710437", "0.5710344", "0.57079035", "0.5704801", "0.569195", "0.5691197", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5687342", "0.5685642", "0.56618494", "0.5661401", "0.56594795", "0.56594795", "0.56594795", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.5653914", "0.56486577", "0.56349707", "0.56349707", "0.56266606", "0.5622617", "0.5619747", "0.5618789", "0.5617751", "0.5612265", "0.5612265", "0.5612265", "0.56089383", "0.56051797", "0.5601085", "0.5599086", "0.55894285", "0.558873", "0.5587438", "0.557466", "0.5573613", "0.5573613", "0.5563884", "0.55625135", "0.5560344", "0.55586344", "0.55586344", "0.554709", "0.5539058", "0.5533458", "0.553152", "0.553114", "0.5530452", "0.55274004", "0.55256975", "0.5517219", "0.5512697", "0.55116016", "0.5508943", "0.54934585" ]
0.5589867
76
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "public Version getVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.68282694", "0.6391548", "0.638283", "0.63750577", "0.6366563", "0.6221217", "0.60655916", "0.6064851", "0.60234106", "0.5982685", "0.5973177", "0.5954892", "0.5954892", "0.5954892", "0.5954892", "0.5954892", "0.59384537", "0.58872634", "0.5878296", "0.5800361", "0.5790003", "0.5785671", "0.5774535", "0.57719797", "0.57719797", "0.57719797", "0.57719797", "0.5770504", "0.57646275", "0.57607627", "0.57472396", "0.5739771", "0.5724912", "0.57188267", "0.5712415", "0.5711841", "0.5711465", "0.57075286", "0.5704927", "0.569148", "0.5689696", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5688748", "0.5686058", "0.56624734", "0.5660683", "0.5659967", "0.5659967", "0.5659967", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5655074", "0.5647891", "0.56360346", "0.56360346", "0.5625758", "0.56234896", "0.5620233", "0.56199205", "0.561633", "0.5613495", "0.5613495", "0.5613495", "0.56089544", "0.5605614", "0.5602543", "0.55999887", "0.5591356", "0.55897456", "0.5588869", "0.55879027", "0.55759746", "0.55747336", "0.55747336", "0.5564352", "0.55625635", "0.55603933", "0.5560282", "0.5560282", "0.55464405", "0.554052", "0.5533581", "0.5531257", "0.55312055", "0.5530561", "0.5528057", "0.55250156", "0.55173916", "0.5513208", "0.5511884", "0.55102986", "0.5493719" ]
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table version_info
public String getOrderByClause() { return orderByClause; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getVersion() {\n String sql = \"SELECT * FROM \" + tableName;\n\n return query(new QueryAllStatement<Integer>(sql) {\n @Override\n public Integer processResults(ResultSet set) throws SQLException {\n set.next();\n return set.getInt(VERSION_COL);\n }\n });\n }", "abstract public int dbVersion();", "public TableVersion() {\n this(DSL.name(\"table_version\"), null);\n }", "@Override\n public String getDatabaseProductVersion() {\n return \"1.0\";\n }", "@Override\n\tpublic void checkTableVersion() {\n\n\t}", "public String getVersionStatement() {\r\n\t\treturn dbVersion.getVersionStatement();\r\n\t}", "@Override\n\tpublic ImmutableList<TOU> getTOUVersion() {\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\ttry {\n\t\t\tstmt = _conn.prepareStatement(SQL_GET_TOUVERSION);\n\t\t\trs = stmt.executeQuery();\n\t\t\treturn createTOU(rs);\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\tthrow new DatabaseProviderException(e);\n\t\t} finally {\n\t\t\t H2Utils.close(rs);\n\t\t\t H2Utils.close(stmt);\n\t\t}\n\t}", "public interface VersiontableModel extends BaseModel {\n\n /**\n * Get the {@code version_name} value.\n * Can be {@code null}.\n */\n @Nullable\n String getVersionName();\n\n /**\n * Get the {@code version_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getVersionId();\n\n /**\n * Get the {@code model_id} value.\n * Can be {@code null}.\n */\n @Nullable\n Integer getModelId();\n\n /**\n * Get the {@code fuel_type} value.\n * Can be {@code null}.\n */\n @Nullable\n String getFuelType();\n}", "public String getVersionNumber ();", "String getSchemaVersion();", "public String getVersionDate();", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public Date getVersionRow(){\n\t\treturn this.versionRow;\r\n\t}", "public void setVersion(String version){\r\n this.version = version;\r\n }", "public String getVersionNum();", "public String getDbVersion() {\n return dbVersion;\n }", "@Override\n public int getDatabaseMinorVersion() {\n return 0;\n }", "public String getDbVersion() {\r\n init();\r\n\r\n return _dbVersion;\r\n }", "@Override\n public int getDatabaseMajorVersion() {\n return 1;\n }", "public int getVersionIndex();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public String getVersion();", "public Date getVersionDate ();", "public void setVersion( Integer version ) {\n this.version = version;\n }", "public void setVersion(Integer version)\r\n {\r\n this.version = version;\r\n }", "public abstract int getVersion();", "long getVersionNumber();", "Long getVersion();", "public String versionNumber (){\r\n\t\t\treturn _versionNumber;\r\n\t\t}", "public int getVersion()\n {\n return info.getVersion().intValueExact();\n }", "public void setVersion(Integer version) {\r\n this.version = version;\r\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public int getVersion() { return 1; }", "public String getVersion(){\r\n return version;\r\n }", "@Override\n\tpublic String getVersion() {\n\t\treturn \"0\";\n\t}", "@Override\n public Class<TableVersionRecord> getRecordType() {\n return TableVersionRecord.class;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n this.version = version;\n }", "public String getProductVersion();", "protected abstract String upgradeSql(int oldVersion, int newVersion);", "public Version getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "public abstract String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "java.lang.String getVersion();", "int getVendorListVersion();", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "@Override\r\n\tpublic int getVersion() {\n\t\treturn 0;\r\n\t}", "@CheckForNull\n String getVersion();", "public abstract double getVersionNumber();", "public void setVersion(String version)\n {\n this.version = version;\n }", "public IbatisVersionsDao getIbatisVersionsDao() {\r\n \t\treturn ibatisVersionsDao;\r\n \t}", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public void setVersion(String version) {\n this.version = version;\n }", "public Long getVersionId() {\n return versionId;\n }", "public void setVersion(long version) {\n this.version = version;\n }", "public void setVersion(Integer version) {\n\t\tthis.version = version;\n\t}", "@Override\n public String toString() {\n return versionString;\n }", "public VersionInfoExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public void setVersion(String version);", "String getVersionFilter(String tableAlias);", "public void setVersion(String version) {\n\t\t\r\n\t}", "private void createVersionTable(SQLiteDatabase db) {\n // SQL statement to create version table\n String CREATE_VERSION_TABLE = \"CREATE TABLE IF NOT EXISTS \" + VERSION_TABLE_NAME + \" (\" +\n NAME_ID + \" INTEGER PRIMARY KEY,\" +\n NAME_FULL_NAME + \" TEXT,\" +\n NAME_SLUG + \" TEXT,\" +\n NAME_ANDROID_VERSION + \" TEXT,\" +\n NAME_CHANGELOG + \" TEXT,\" +\n NAME_CREATED_AT + \" TEXT,\" +\n NAME_PUBLISHED_AT + \" TEXT,\" +\n NAME_DOWNLOADS + \" INTEGER,\" +\n NAME_VERSION_NUMBER + \" INTEGER,\" +\n NAME_FULL_ID + \" INTEGER,\" +\n NAME_DELTA_ID + \" INTEGER\" +\n \")\";\n // create version table\n db.execSQL(CREATE_VERSION_TABLE);\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public void setVersion(int version) {\n this.version = version;\n }", "public Integer getVersionNo() {\r\n\t\treturn versionNo;\r\n\t}", "@Override\n\tpublic String getVersion() {\n\t\treturn \"1.0\";\n\t}", "@java.lang.Override\n public long getVersion() {\n return instance.getVersion();\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "public void setVersionNumber(Long versionNumber){\r\n this.versionNumber = versionNumber;\r\n }", "@Override\n\tpublic ApiResponseResult queryAppVersion() throws Exception {\n\t\tMap m = new HashMap();\n\t\t List<Map<String, Object>> l = sysUserDao.queryAppVersion();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Version\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryApkUrl();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Url\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t return ApiResponseResult.failure(\"未设置更新版本的下载地址\");\n\t\t }\n\t\t \n\t\t l = sysUserDao.queryAppSize();\n\t\t if(l.size() > 0){\n\t\t\t m.put(\"Size\", l.get(0).get(\"PV\"));\n\t\t }else{\n\t\t\t m.put(\"Size\", 0);\n\t\t }\n\t\t\n\t\treturn ApiResponseResult.success().data(m);\n\t}", "public void setVersionNo(Integer versionNo) {\r\n\t\tthis.versionNo = versionNo;\r\n\t}", "CurrentVersionCacheDao getCurrentVersionCacheConnection(Long tableId);", "@java.lang.Override\n public long getVersion() {\n return version_;\n }", "@Override\r\n\tpublic String getVersion() {\r\n\t\treturn \"1.0.5\";\r\n\t}", "public String getVersion() {\n \treturn metricMetadata.getVersion();\n }", "Integer getVersion();", "@Override\n public int getVersion() {\n return 0;\n }", "private boolean checkForVersionProperties(DeployBeanDescriptor<?> desc) {\n for (DeployBeanProperty prop : desc.propertiesBase()) {\n if (prop.isVersionColumn()) {\n return true;\n }\n }\n return false;\n }", "public String getVersionId() {\n return versionId;\n }", "@Key(\"application.version\")\n\tString applicationVersion();", "public void setVersion(String version) {\r\n\t\tthis.version = version;\r\n\t}", "public String getVersionConstraint() {\n return version;\n }" ]
[ "0.6828057", "0.6392046", "0.6381866", "0.6375635", "0.6367022", "0.6221832", "0.60662436", "0.6063608", "0.6022423", "0.5981807", "0.5971875", "0.5953997", "0.5953997", "0.5953997", "0.5953997", "0.5953997", "0.5935702", "0.5886104", "0.5878172", "0.5801646", "0.57899404", "0.5786268", "0.57733744", "0.57703805", "0.57703805", "0.57703805", "0.57703805", "0.5769284", "0.576121", "0.5757441", "0.5746087", "0.5739221", "0.57241726", "0.5716898", "0.5710691", "0.5708473", "0.5708437", "0.57066464", "0.57038355", "0.5691065", "0.5689411", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.5685383", "0.56841457", "0.56618106", "0.56603146", "0.565888", "0.565888", "0.565888", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.565324", "0.56464565", "0.5633074", "0.5633074", "0.56253475", "0.5621805", "0.56194067", "0.561695", "0.56167203", "0.56104565", "0.56104565", "0.56104565", "0.56072205", "0.5603025", "0.55991834", "0.5598401", "0.5588668", "0.5587306", "0.5586546", "0.55853075", "0.5574996", "0.5571456", "0.5571456", "0.55630016", "0.55615884", "0.55586433", "0.5557323", "0.5557323", "0.554513", "0.55377656", "0.5533407", "0.5530356", "0.5530061", "0.5529839", "0.55264634", "0.55245245", "0.55153465", "0.5511362", "0.5509758", "0.55071586", "0.54926467" ]
0.0
-1